kubo

package
v0.28.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 15, 2024 License: Apache-2.0, MIT, Apache-2.0, + 1 more Imports: 76 Imported by: 0

Documentation

Overview

cmd/ipfs/kubo implements the primary CLI binary for kubo

Index

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 BuildDefaultEnv(ctx context.Context, req *cmds.Request) (cmds.Environment, error)

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

func YesNoPrompt(prompt string) bool

Types

type PluginPreloader

type PluginPreloader func(*loader.PluginLoader) error

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL