# README
go-ipfs-cmds
ipfs commands library
cmds offers tools for describing and calling commands both locally and remotely, as well as encoding, formatting and transferring the result. It is the successor of go-ipfs/commands and contains a legacy layer such that it can handle previously defined commands.
Lead Maintainer
Documentation
https://godoc.org/github.com/ipfs/go-ipfs-cmds
Contribute
Feel free to join in. All welcome. Open an issue!
This repository falls under the IPFS Code of Conduct.
Want to hack on IPFS?
License
MIT
# Functions
No description provided by the author
No description provided by the author
Copy sends all values received on res to re.
DelimitedStringsOption like StringsOption is a command option that can handle a slice of strings.
No description provided by the author
EmitOnce is a helper that emits a value wrapped in Single, to signal that this will be the only value sent.
Errorf returns an Error with the given code and format specification.
No description provided by the author
No description provided by the author
GetEncoder takes a request and returns returns the encoding type and the encoder.
GetEncoding returns the EncodingType set in a request, falling back to JSON.
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
constructor helper functions.
NewReaderResponse creates a Response from the given reader.
NewRequest returns a request initialized with given arguments An non-nil error will be returned if the provided option values are invalid.
NewWriterResponseEmitter creates a response emitter that sends responses to the given WriterCloser.
No description provided by the author
No description provided by the author
StringsOption is a command option that can handle a slice of strings.
No description provided by the author
No description provided by the author
# Constants
Active command, doesn't produce any special indication.
No description provided by the author
No description provided by the author
Types of Command options.
Flag names.
PostRunTypes.
DefaultOutputEncoding defines the default API output encoding.
No description provided by the author
Flag names.
Flag names.
Flag names.
ErrClient means the client made an invalid request.
ErrForbidden is returned when the client doesn't have permission to perform the requested operation.
ErrImplementation means there's a bug in the implementation.
ErrNormal is a normal error.
ErrRateLimited is returned when the operation has been rate-limited.
Other commands will be shown their statuses in the help text.
Types of Command options.
Flag names.
Flag names.
Flag names.
Flag names.
Types of Command options.
Types of Command options.
Types of Command options.
EncodingTypes.
Flag names.
Flag names.
Supported EncodingType constants.
Flag names.
Flag names.
No description provided by the author
Flag names.
Types of Command options.
Types of Command options.
Supported EncodingType constants.
Supported EncodingType constants.
Flag names.
Types of Command options.
Types of Command options.
General purpose.
Supported EncodingType constants.
# Variables
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
ErrIncorrectType signales that the commands returned a value with unexpected type.
ErrNoFormatter signals that the command can not be formatted.
ErrNotCallable signals a command that cannot be called.
No description provided by the author
options that are used by this package.
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
# Structs
No description provided by the author
Command is a runnable command, with input arguments and options (flags).
Error is a struct for marshalling errors.
Extra is a set of tag information for a command.
HelpText is a set of strings used to generate command help text.
No description provided by the author
ReqLog represents a request log.
ReqLogEntry represent a log entry for a request.
Request represents a call to a command from a consumer.
Single can be used to signal to any ResponseEmitter that only one value will be emitted.
No description provided by the author
# Interfaces
Decoder decodes values into value (which should be a pointer).
Encoder encodes values onto e.g.
Environment is the environment passed to commands.
No description provided by the author
No description provided by the author
Option is used to specify a field that will be provided by a consumer.
Response is the result of a command request.
ResponseEmitter encodes and sends the command code's output to the client.
StdinArguments is used to iterate through arguments piped through stdin.
# Type aliases
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
EncodingType defines a supported encoding.
ErrorType signfies a category of errors.
Function is the type of function that Commands use.
MakeEnvironment takes a context and the request to construct the environment that is passed to the command's Run function.
MakeExecutor takes the request and environment variable to construct the executor that determines how to call the command - i.e.
No description provided by the author
PostRunMap is the map used in Command.PostRun.
PostRunType defines which PostRunFunc should be used.
Status indicates whether this command is active/deprecated/experimental/etc which is signaled in the help text produced.