cli

package
v0.3.0 Latest Latest
Warning

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

Go to latest
Published: May 14, 2020 License: Apache-2.0, MIT Imports: 66 Imported by: 58

Documentation

Index

Constants

This section is empty.

Variables

View Source
var Commands = []*cli.Command{
	withCategory("basic", sendCmd),
	withCategory("basic", walletCmd),
	withCategory("basic", clientCmd),
	withCategory("basic", multisigCmd),
	withCategory("basic", paychCmd),
	withCategory("developer", authCmd),
	withCategory("developer", mpoolCmd),
	withCategory("developer", stateCmd),
	withCategory("developer", chainCmd),
	withCategory("developer", logCmd),
	withCategory("developer", waitApiCmd),
	withCategory("developer", fetchParamCmd),
	withCategory("network", netCmd),
	withCategory("network", syncCmd),
	versionCmd,
}
View Source
var CommonCommands = []*cli.Command{
	netCmd,
	authCmd,
	logCmd,
	waitApiCmd,
	fetchParamCmd,
	versionCmd,
}

Functions

func DaemonContext

func DaemonContext(cctx *cli.Context) context.Context

func EncodedString added in v0.3.0

func EncodedString(sv *paych.SignedVoucher) (string, error)

func GetAPI

func GetAPI(ctx *cli.Context) (api.Common, jsonrpc.ClientCloser, error)

func GetFullNodeAPI

func GetFullNodeAPI(ctx *cli.Context) (api.FullNode, jsonrpc.ClientCloser, error)

func GetMultisigPending added in v0.3.0

func GetMultisigPending(ctx context.Context, lapi api.FullNode, hroot cid.Cid) (map[int64]*samsig.Transaction, error)

func GetRawAPI

func GetRawAPI(ctx *cli.Context, t repo.RepoType) (string, http.Header, error)

func GetStorageMinerAPI

func GetStorageMinerAPI(ctx *cli.Context) (api.StorageMiner, jsonrpc.ClientCloser, error)

func LoadTipSet added in v0.3.0

func LoadTipSet(ctx context.Context, cctx *cli.Context, api api.FullNode) (*types.TipSet, error)

func NewCliError added in v0.2.10

func NewCliError(s string) error

func ReqContext

func ReqContext(cctx *cli.Context) context.Context

ReqContext returns context for cli execution. Calling it for the first time installs SIGTERM handler that will close returned context. Not safe for concurrent execution.

func SyncWait

func SyncWait(ctx context.Context, napi api.FullNode) error

Types

type APIInfo

type APIInfo struct {
	Addr  multiaddr.Multiaddr
	Token []byte
}

func GetAPIInfo

func GetAPIInfo(ctx *cli.Context, t repo.RepoType) (APIInfo, error)

func (APIInfo) AuthHeader

func (a APIInfo) AuthHeader() http.Header

func (APIInfo) DialArgs

func (a APIInfo) DialArgs() (string, error)

type ApiConnector

type ApiConnector func() api.FullNode

ApiConnector returns API instance

type ErrCmdFailed added in v0.2.10

type ErrCmdFailed struct {
	// contains filtered or unexported fields
}

func (*ErrCmdFailed) Error added in v0.2.10

func (e *ErrCmdFailed) Error() string

Jump to

Keyboard shortcuts

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