Documentation ¶
Index ¶
- func AddCommands(rootCmd *cobra.Command, cmdFuncs map[string]CommandEntry)
- type CommandContext
- func (c CommandContext) AdminClient() service.AdminServiceClient
- func (c CommandContext) AdminDeleterExt() ext.AdminDeleterExtInterface
- func (c CommandContext) AdminFetcherExt() ext.AdminFetcherExtInterface
- func (c CommandContext) AdminUpdaterExt() ext.AdminUpdaterExtInterface
- func (c CommandContext) InputPipe() io.Reader
- func (c CommandContext) OutputPipe() io.Writer
- type CommandEntry
- type CommandFunc
- type PFlagProvider
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AddCommands ¶
func AddCommands(rootCmd *cobra.Command, cmdFuncs map[string]CommandEntry)
Types ¶
type CommandContext ¶
type CommandContext struct {
// contains filtered or unexported fields
}
func NewCommandContext ¶
func NewCommandContext(adminClient service.AdminServiceClient, out io.Writer) CommandContext
func NewCommandContextWithExt ¶ added in v0.1.7
func NewCommandContextWithExt( adminClient service.AdminServiceClient, fetcher ext.AdminFetcherExtInterface, updater ext.AdminUpdaterExtInterface, deleter ext.AdminDeleterExtInterface, out io.Writer) CommandContext
NewCommandContextWithExt construct command context with injected extensions. Helps in injecting mocked ones for testing.
func (CommandContext) AdminClient ¶
func (c CommandContext) AdminClient() service.AdminServiceClient
func (CommandContext) AdminDeleterExt ¶ added in v0.1.7
func (c CommandContext) AdminDeleterExt() ext.AdminDeleterExtInterface
func (CommandContext) AdminFetcherExt ¶ added in v0.1.7
func (c CommandContext) AdminFetcherExt() ext.AdminFetcherExtInterface
func (CommandContext) AdminUpdaterExt ¶ added in v0.1.7
func (c CommandContext) AdminUpdaterExt() ext.AdminUpdaterExtInterface
func (CommandContext) InputPipe ¶
func (c CommandContext) InputPipe() io.Reader
func (CommandContext) OutputPipe ¶
func (c CommandContext) OutputPipe() io.Writer
type CommandEntry ¶
type CommandEntry struct { ProjectDomainNotRequired bool CmdFunc CommandFunc Aliases []string Short string Long string PFlagProvider PFlagProvider }
type CommandFunc ¶
type CommandFunc func(ctx context.Context, args []string, cmdCtx CommandContext) error
type PFlagProvider ¶
Click to show internal directories.
Click to hide internal directories.