Documentation
¶
Overview ¶
cmd/ipfs/kubo implements the primary CLI binary for kubo
Index ¶
- Constants
- Variables
- func BuildDefaultEnv(ctx context.Context, req *cmds.Request) (cmds.Environment, error)
- func BuildEnv(pl PluginPreloader) func(ctx context.Context, req *cmds.Request) (cmds.Environment, error)
- func Start(...) (exitCode int)
- func YesNoPrompt(prompt string) bool
- type PluginPreloader
Constants ¶
View Source
const (
EnvEnableProfiling = "IPFS_PROF"
)
Variables ¶
View Source
var Root = &cmds.Command{ Options: commands.Root.Options, Helptext: commands.Root.Helptext, }
Root is the CLI root, used for executing commands accessible to CLI clients. Some subcommands (like 'ipfs daemon' or 'ipfs init') are only accessible here, and can't be called through the HTTP API.
Functions ¶
func BuildDefaultEnv ¶
func BuildEnv ¶
func BuildEnv(pl PluginPreloader) func(ctx context.Context, req *cmds.Request) (cmds.Environment, error)
BuildEnv creates an environment to be used with the kubo CLI. Note: the plugin preloader should only call functions associated with preloaded plugins (i.e. Load).
func Start ¶
func Start(buildEnv func(ctx context.Context, req *cmds.Request) (cmds.Environment, error)) (exitCode int)
Start roadmap: - parse the commandline to get a cmdInvocation - if user requests help, print it and exit. - run the command invocation - output the response - if anything fails, print error, maybe with help.
func YesNoPrompt ¶
Types ¶
type PluginPreloader ¶
type PluginPreloader func(*loader.PluginLoader) error
Click to show internal directories.
Click to hide internal directories.