cmd

package
v0.4.0 Latest Latest
Warning

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

Go to latest
Published: Jan 28, 2022 License: Apache-2.0 Imports: 28 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Execute

func Execute(version string)

create and execute a root command, the given version string will be used in help texts and returned by --version.

Types

type BlockAddCommand added in v0.3.0

type BlockAddCommand struct {
	*common.BaseCommand
	BlockMainCmd *BlockMainCommand
	ForceAccount bool
}

represents the 'block add' command.

func (*BlockAddCommand) Run added in v0.3.0

func (cmd *BlockAddCommand) Run(_ *cobra.Command, args []string)

type BlockListAllCommand added in v0.3.0

type BlockListAllCommand struct {
	*common.BaseCommand
	BlockMainCmd *BlockMainCommand
}

represents the 'block list-all' command.

func (*BlockListAllCommand) Run added in v0.3.0

func (cmd *BlockListAllCommand) Run(_ *cobra.Command, args []string)

type BlockListCommand added in v0.3.0

type BlockListCommand struct {
	*common.BaseCommand
	BlockMainCmd *BlockMainCommand
}

represents the 'block list' command.

func (*BlockListCommand) Run added in v0.3.0

func (cmd *BlockListCommand) Run(_ *cobra.Command, args []string)

type BlockMainCommand added in v0.3.0

type BlockMainCommand struct {
	*common.BaseCommand
	RootCmd *RootCommand

	Account string
	// contains filtered or unexported fields
}

represents the 'block' main command.

func (*BlockMainCommand) Credentials added in v0.4.0

func (cmd *BlockMainCommand) Credentials() *common.GitlabCredentials

func (*BlockMainCommand) TargetRepository added in v0.3.0

func (cmd *BlockMainCommand) TargetRepository() string

Implement common.RepoCommand.TargetRepo.

type ConfigAddAccountCommand added in v0.4.0

type ConfigAddAccountCommand struct {
	*common.BaseCommand
	*common.GitlabCredentials
	ConfigMainCmd *ConfigMainCommand
	SkipBrowser   bool
	AccountName   string
}

represents the 'config add-account' command.

func (*ConfigAddAccountCommand) Run added in v0.4.0

func (cmd *ConfigAddAccountCommand) Run(_ *cobra.Command, args []string)

type ConfigListAccountsCommand added in v0.4.0

type ConfigListAccountsCommand struct {
	*common.BaseCommand
	ConfigMainCmd *ConfigMainCommand
}

represents the `config list-accounts` command.

func (*ConfigListAccountsCommand) Run added in v0.4.0

func (cmd *ConfigListAccountsCommand) Run(_ *cobra.Command, args []string)

type ConfigMainCommand added in v0.3.0

type ConfigMainCommand struct {
	*common.BaseCommand
	RootCmd *RootCommand
}

represents the 'config' main command.

type ConfigNewTokenCommand added in v0.3.0

type ConfigNewTokenCommand struct {
	*common.BaseCommand
	*common.GitlabCredentials
	ConfigMainCmd *ConfigMainCommand
}

represents the 'config new-token' command. Deprecated: functionality will be added to the add-account command.

func (*ConfigNewTokenCommand) Run added in v0.3.0

func (cmd *ConfigNewTokenCommand) Run(_ *cobra.Command, args []string)

type ConfigSelectAccountCommand added in v0.4.0

type ConfigSelectAccountCommand struct {
	*common.BaseCommand
	ConfigMainCmd *ConfigMainCommand
}

represents the `config select-account` command.

func (*ConfigSelectAccountCommand) Run added in v0.4.0

func (cmd *ConfigSelectAccountCommand) Run(_ *cobra.Command, args []string)

type ConfigViewCommand added in v0.3.0

type ConfigViewCommand struct {
	*common.BaseCommand
	ConfigMainCmd *ConfigMainCommand
	LatestSchema  bool
}

represents the 'config view' command.

func (*ConfigViewCommand) Run added in v0.4.0

func (c *ConfigViewCommand) Run(_ *cobra.Command, args []string)

type GenDocsCommand added in v0.3.0

type GenDocsCommand struct {
	*common.BaseCommand
	RootCmd *RootCommand
}

represents the (hidden) 'gen-docs' command.

func (*GenDocsCommand) Run added in v0.3.0

func (cmd *GenDocsCommand) Run(_ *cobra.Command, args []string)

type RepoAddCommand added in v0.3.0

type RepoAddCommand struct {
	*common.BaseCommand
	RepoMainCmd    *RepoMainCommand
	GroupID        int
	KubeConfigFile string
}

represents the 'repo add' command.

func (*RepoAddCommand) Run added in v0.3.0

func (cmd *RepoAddCommand) Run(_ *cobra.Command, args []string)

nolint:gocognit,cyclop // XXX refactor

type RepoDeleteCommand added in v0.3.0

type RepoDeleteCommand struct {
	*common.BaseCommand
	RepoMainCmd                *RepoMainCommand
	SkipLocal, SkipGitlab, Yes bool
}

represents the 'repo delete' command.

func (*RepoDeleteCommand) Run added in v0.3.0

func (cmd *RepoDeleteCommand) Run(_ *cobra.Command, args []string)

type RepoListCommand added in v0.3.0

type RepoListCommand struct {
	*common.BaseCommand
	RepoMainCmd *RepoMainCommand
}

represents the 'repo list' command.

func (*RepoListCommand) Run added in v0.3.0

func (cmd *RepoListCommand) Run(_ *cobra.Command, args []string)

type RepoMainCommand added in v0.3.0

type RepoMainCommand struct {
	*common.BaseCommand
	*common.GitlabCredentials
	RootCmd *RootCommand
	Account string
}

represents the 'repo' main command.

func (*RepoMainCommand) Credentials added in v0.4.0

func (cmd *RepoMainCommand) Credentials() *common.GitlabCredentials

type RepoSelectCommand added in v0.3.0

type RepoSelectCommand struct {
	*common.BaseCommand
	RepoMainCmd *RepoMainCommand
}

represents the `repo select` command.

func (*RepoSelectCommand) Run added in v0.3.0

func (cmd *RepoSelectCommand) Run(_ *cobra.Command, args []string)

type RootCommand added in v0.3.0

type RootCommand struct {
	*common.BaseCommand
	CfgFile string
	// contains filtered or unexported fields
}

represents the root command.

func NewRootCmd added in v0.3.0

func NewRootCmd(version string) *RootCommand

creates a new root command with the given version string.

func (*RootCommand) GenerateDocs added in v0.3.0

func (cmd *RootCommand) GenerateDocs(path string) error

generate man pages and markdown docs for the whole command tree. NB: markdown output is under source control.

func (*RootCommand) GetConfig added in v0.4.0

func (cmd *RootCommand) GetConfig() *common.Config

implementing common.ConfiguredCommand.GetConfig.

func (*RootCommand) InitConfig added in v0.3.0

func (cmd *RootCommand) InitConfig() *RootCommand

func (*RootCommand) IsVerbose added in v0.3.0

func (cmd *RootCommand) IsVerbose() bool

implementing common.VerboseCommand.IsVerbose.

func (*RootCommand) PreRun added in v0.4.0

func (cmd *RootCommand) PreRun(_ *cobra.Command, _ []string)

func (*RootCommand) Run added in v0.4.0

func (cmd *RootCommand) Run(_ *cobra.Command, args []string)

func (*RootCommand) Verbose added in v0.3.0

func (cmd *RootCommand) Verbose(on bool)

func (*RootCommand) Verbosef added in v0.3.0

func (cmd *RootCommand) Verbosef(format string, args ...interface{})

implementing common.VerboseCommand.Verbosef.

Jump to

Keyboard shortcuts

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