session

package
v0.0.8 Latest Latest
Warning

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

Go to latest
Published: Jun 4, 2018 License: Apache-2.0 Imports: 18 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AddFlagKey

func AddFlagKey(cmd *cobra.Command, flags *pflag.FlagSet)

func AddFlagKeyType

func AddFlagKeyType(cmd *cobra.Command, flags *pflag.FlagSet)

func AddFlagNode

func AddFlagNode(cmd *cobra.Command, flags *pflag.FlagSet)

func AddFlagNonce

func AddFlagNonce(cmd *cobra.Command, flags *pflag.FlagSet)

func AddFlagWait

func AddFlagWait(cmd *cobra.Command, flags *pflag.FlagSet)

func SetupBaseCommand

func SetupBaseCommand(cmd *cobra.Command)

func WithSession

func WithSession(fn Runner) cmdRunner

Types

type Runner

type Runner func(sess Session, cmd *cobra.Command, args []string) error

func RequireKey

func RequireKey(fn Runner) Runner

func RequireKeyManager

func RequireKeyManager(fn Runner) Runner

func RequireNode

func RequireNode(fn Runner) Runner

func RequireRootDir

func RequireRootDir(fn Runner) Runner

type Session

type Session interface {
	RootDir() string
	KeyManager() (keys.Keybase, error)
	Node() string
	Client() *tmclient.HTTP
	TxClient() (txutil.Client, error)
	QueryClient() query.Client
	KeyName() string
	KeyType() (keys.CryptoAlgo, error)
	Key() (keys.Info, error)
	Nonce() (uint64, error)
	Log() log.Logger
	Signer() (txutil.Signer, keys.Info, error)
	Ctx() context.Context
	Wait() bool
}

Jump to

Keyboard shortcuts

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