Documentation ¶
Index ¶
- Constants
- Variables
- func AddFlagHost(cmd *cobra.Command, flags *pflag.FlagSet)
- func AddFlagKey(cmd *cobra.Command, flags *pflag.FlagSet)
- func AddFlagKeyOptional(cmd *cobra.Command, flags *pflag.FlagSet)
- func AddFlagKeyType(cmd *cobra.Command, flags *pflag.FlagSet)
- func AddFlagNode(cmd *cobra.Command, flags *pflag.FlagSet)
- func AddFlagNonce(cmd *cobra.Command, flags *pflag.FlagSet)
- func AddFlagWait(cmd *cobra.Command, flags *pflag.FlagSet)
- func SetupBaseCommand(cmd *cobra.Command)
- func WithSession(fn Runner) cmdRunner
- type IPrinter
- type NoKeysForDefaultError
- type Printer
- type PrinterData
- type PrinterLog
- type PrinterLogLevel
- type PrinterResult
- type PrinterResultMode
- type Runner
- type Session
- type TooManyKeysForDefaultError
- type UIComponent
- type ULog
Constants ¶
View Source
const ( PrinterLogLevelInfo PrinterLogLevel = "info" PrinterLogLevelDebug = "debug" PrinterLogLevelError = "error" )
Variables ¶
View Source
var KeybaseName = "akash"
KeybaseName is the default name of the Keybase
Functions ¶
func AddFlagKeyOptional ¶ added in v0.3.0
func SetupBaseCommand ¶
func WithSession ¶
func WithSession(fn Runner) cmdRunner
Types ¶
type IPrinter ¶ added in v0.4.3
type IPrinter interface { // AddTitle adds a title with the given string and // returns the instance of IPrinter with the title AddTitle(string) IPrinter // AddText adds a text component with the given string and // returns the instance of IPrinter with the text AddText(string) IPrinter // Add adds the components to the printer Add(UIComponent) IPrinter // Flush prints the output to the writer and clears the buffer Flush() error // Bytes returns the formmated string of the output Bytes() []byte }
func NewIPrinter ¶ added in v0.4.3
NewIPrinter returns a pointer to a new printer object
type NoKeysForDefaultError ¶ added in v0.4.3
type NoKeysForDefaultError struct{}
func (NoKeysForDefaultError) Error ¶ added in v0.4.3
func (e NoKeysForDefaultError) Error() string
type Printer ¶ added in v0.4.3
type Printer interface { Flush() error Data() *PrinterData }
func NewJSONPrinter ¶ added in v0.4.3
func NewJSONPrinter(data *PrinterData, out io.Writer) Printer
func NewTextPrinter ¶ added in v0.4.3
func NewTextPrinter(data *PrinterData, out io.Writer) Printer
type PrinterData ¶ added in v0.4.3
type PrinterData struct { Result []map[string]string `json:"result,omitempty"` Raw interface{} `json:"raw,omitempty"` Log []PrinterLog `json:"log,omitempty"` // contains filtered or unexported fields }
func NewPrinterDataKV ¶ added in v0.4.3
func NewPrinterDataKV() *PrinterData
func NewPrinterDataList ¶ added in v0.4.3
func NewPrinterDataList() *PrinterData
func (*PrinterData) AddResultKV ¶ added in v0.4.3
func (d *PrinterData) AddResultKV(key, value string) *PrinterData
func (*PrinterData) AddResultList ¶ added in v0.4.3
func (d *PrinterData) AddResultList(results ...PrinterResult) *PrinterData
func (*PrinterData) ResultMode ¶ added in v0.4.3
func (d *PrinterData) ResultMode() PrinterResultMode
type PrinterLog ¶ added in v0.4.3
type PrinterLog struct { Timestamp time.Time Message interface{} Level PrinterLogLevel }
type PrinterLogLevel ¶ added in v0.4.3
type PrinterLogLevel string
type PrinterResult ¶ added in v0.4.3
type PrinterResultMode ¶ added in v0.4.3
type PrinterResultMode uint
const ( PrinterResultModeKV PrinterResultMode = iota PrinterResultModeList )
type Runner ¶
func RequireHost ¶ added in v0.2.4
func RequireKey ¶
func RequireKeyManager ¶
func RequireNode ¶
func RequireRootDir ¶
func WithPrinter ¶ added in v0.4.0
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.SigningAlgo, error) Key() (keys.Info, error) Nonce() (uint64, error) Log() log.Logger Signer() (txutil.Signer, keys.Info, error) Ctx() context.Context NoWait() bool Host() string Password() (string, error) Printer() uiutil.Printer Mode() dsky.Mode ULog() ULog }
type TooManyKeysForDefaultError ¶ added in v0.4.3
type TooManyKeysForDefaultError struct{ KeysCount int }
func (*TooManyKeysForDefaultError) Error ¶ added in v0.4.3
func (e *TooManyKeysForDefaultError) Error() string
type UIComponent ¶ added in v0.4.3
type UIComponent interface {
Bytes() []byte
}
UIComponent in the interface that UI components need to implement
Click to show internal directories.
Click to hide internal directories.