Documentation
¶
Index ¶
- Variables
- func ApplyMockIO(app *cli.App) (BufferReader, BufferWriter)
- func ContextWithReader(ctx context.Context, r io.Reader) context.Context
- func ExecTestCmd(ctx context.Context, app *cli.App, args []string) error
- func FlagSetFromCmdFlags(name string, flags []cli.Flag) (*flag.FlagSet, error)
- func LoginCommand() *cli.Command
- func NewApp() *cli.App
- func ParseServerConfig(ctx *cli.Context) (*koanf.Koanf, error)
- func PublishCommand() *cli.Command
- func StartServerCommand() *cli.Command
- type BufferReader
- type BufferWriter
- type CLIFlagProvider
- type Credentials
- type Registry
Constants ¶
This section is empty.
Variables ¶
var ( // Version defines the binary version at compile-time Version = "" // Commit defines the binary commit hash at compile-time Commit = "" // Branch defines the binary branch at compile-time Branch = "" )
Functions ¶
func ApplyMockIO ¶
func ApplyMockIO(app *cli.App) (BufferReader, BufferWriter)
ApplyMockIO replaces stdout/err with buffers that can be used during testing. Returns an input BufferReader and an output BufferWriter.
func ContextWithReader ¶
ContextWithReader returns a Context with a given io.Reader.
func ExecTestCmd ¶
ExecCmd executes a command in a test environment with a given Context and set of arguments. If an error occurs, it is written to the App's ErrWriter.
func FlagSetFromCmdFlags ¶
FlagSetFromCmdFlags returns a reference to a stdlib FlagSet given a slice of command flags.
func LoginCommand ¶
func LoginCommand() *cli.Command
LoginCommand returns a login CLI command handler.
func ParseServerConfig ¶
ParseServerConfig returns a server configuration, given a command Context, by parsing the following in order of precedence:
- flags - environment variables - configuration file (TOML)
func PublishCommand ¶
func PublishCommand() *cli.Command
PublishCommand returns a CLI command handler responsible for publishing Cosmos SDK modules to the Atlas registry.
func StartServerCommand ¶
func StartServerCommand() *cli.Command
StartServerCommand returns a CLI command handler responsible for starting the Atlas service daemon.
Types ¶
type BufferReader ¶
BufferReader is implemented by types that read from a string buffer.
type BufferWriter ¶
BufferWriter is implemented by types that write to a buffer.
type CLIFlagProvider ¶
type CLIFlagProvider struct {
// contains filtered or unexported fields
}
CLIFlagProvider implements a simple Koanf CLI flag provider.
func NewCLIFlagProvider ¶
func NewCLIFlagProvider(ctx *cli.Context, delim string, konfig *koanf.Koanf) *CLIFlagProvider
func (*CLIFlagProvider) Read ¶
func (p *CLIFlagProvider) Read() (map[string]interface{}, error)
Read reads the flag variables and returns a nested conf map.
func (*CLIFlagProvider) ReadBytes ¶
func (p *CLIFlagProvider) ReadBytes() ([]byte, error)
ReadBytes is not supported by the env koanf.
func (*CLIFlagProvider) Watch ¶
func (p *CLIFlagProvider) Watch(cb func(event interface{}, err error)) error
Watch is not supported.
type Credentials ¶
type Credentials struct {
Registry Registry `json:"registry" toml:"registry"`
}
Credentials holds the registry token when a user performs a login.