cli

package
v0.0.0-...-d40a6bc Latest Latest
Warning

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

Go to latest
Published: Nov 3, 2020 License: Apache-2.0 Imports: 17 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var Commands = []*cli.Command{
	withCategory("basic", blsCmd),
}
View Source
var CommonCommands = []*cli.Command{
	blsCmd,
}

Functions

func DaemonContext

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

func GetAPI

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

func GetRawAPI

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

func NewCliError

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.

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

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

func (*ErrCmdFailed) Error

func (e *ErrCmdFailed) Error() string

Jump to

Keyboard shortcuts

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