Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CLI and API command output encoding #215

Draft
wants to merge 9 commits into
base: master
Choose a base branch
from

Commits on Sep 8, 2021

  1. Add Command.DisplayCLI method signature

    Following the approach described in ipfs#115, define a new method signature on `Command` that supports full processing of the `Response` object when text encoding is requested.
    
    Add an encoding check and dispatch to DisplayCLI in local, http client, and http handler code paths.
    
    Unblocks resolution of `encoding` option processing in multiple go-ipfs issues.
    
    - ipfs/kubo#7050 json encoding for `ls`
    - ipfs/kubo#1121 json encoding for `add`
    - ipfs/kubo#5594 json encoding for `stats bw`
    jbouwman committed Sep 8, 2021
    Configuration menu
    Copy the full SHA
    957684f View commit details
    Browse the repository at this point in the history
  2. revert local encoder

    jbouwman committed Sep 8, 2021
    Configuration menu
    Copy the full SHA
    16f14e9 View commit details
    Browse the repository at this point in the history
  3. Post-run emitter helper

    - When both PostRun (output transformer) and DisplayCLI (terminal output) are present, ensure that both are run.
    
    `EmitResponse` helper in executor.go is invoked by both local and HTTP client executors: the client fibs the command.Run interface via anonymous function.
    jbouwman committed Sep 8, 2021
    Configuration menu
    Copy the full SHA
    11083f0 View commit details
    Browse the repository at this point in the history
  4. Run gofmt

    jbouwman committed Sep 8, 2021
    Configuration menu
    Copy the full SHA
    9bff5f3 View commit details
    Browse the repository at this point in the history

Commits on Sep 23, 2021

  1. Configuration menu
    Copy the full SHA
    ed1225f View commit details
    Browse the repository at this point in the history
  2. Read from display error channel in EmitResponse

    Close the channel immediately if it will never be used.
    jbouwman committed Sep 23, 2021
    Configuration menu
    Copy the full SHA
    f47dce6 View commit details
    Browse the repository at this point in the history

Commits on Sep 30, 2021

  1. Configuration menu
    Copy the full SHA
    d3455df View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    bce8c65 View commit details
    Browse the repository at this point in the history

Commits on Apr 28, 2022

  1. Merge branch 'ipfs:master' into display-cli

    Jesse Bouwman authored Apr 28, 2022
    Configuration menu
    Copy the full SHA
    11a3754 View commit details
    Browse the repository at this point in the history