cmd

package
v0.8.1 Latest Latest
Warning

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

Go to latest
Published: Dec 13, 2022 License: Apache-2.0 Imports: 35 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Execute

func Execute(version string, doneAt 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
	Publish, Yes bool
}

represents the 'block add' command.

func (*BlockAddCommand) Run added in v0.3.0

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

type BlockEditCommand added in v0.8.0

type BlockEditCommand struct {
	*common.BaseCommand
	BlockMainCmd            *BlockMainCommand
	NoEditor, NoAddDefaults bool
}

represents the 'block edit' command.

func (*BlockEditCommand) Run added in v0.8.0

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

type BlockListAllCommand added in v0.3.0

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

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(creds *common.GitlabCredentials) *common.RepoInfo

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 ConfigRemoveAccountCommand added in v0.8.0

type ConfigRemoveAccountCommand struct {
	*common.BaseCommand
	ConfigMainCmd *ConfigMainCommand
	Yes           bool
}

func (*ConfigRemoveAccountCommand) Run added in v0.8.0

func (cmd *ConfigRemoveAccountCommand) 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, Raw 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
}

generates markdown docs and manpages.

func (*GenDocsCommand) Run added in v0.3.0

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

type MigrateReposCommand added in v0.6.0

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

NB: remove with 1.0 migrates location of local repo clones.

func (*MigrateReposCommand) Run added in v0.6.0

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

type RepoAddCommand added in v0.3.0

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

represents the 'repo add' command.

func (*RepoAddCommand) PreRun added in v0.5.0

func (cmd *RepoAddCommand) PreRun(cc *cobra.Command, args []string)

flags/argument validation.

func (*RepoAddCommand) Run added in v0.3.0

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

the actual command implementation.

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
	Short       bool
}

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 NewRepoMainCmd added in v0.8.0

func NewRepoMainCmd(root *RootCommand) *RepoMainCommand

func (*RepoMainCommand) Credentials added in v0.4.0

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

func (*RepoMainCommand) CurrentRepo added in v0.7.0

func (cmd *RepoMainCommand) CurrentRepo(args []string) *common.RepoInfo

returns the repo info object for the explicitly provided name or for the selected repository otherwise.

type RepoPublishCommand added in v0.7.0

type RepoPublishCommand struct {
	*common.BaseCommand
	RepoMainCmd *RepoMainCommand
	Empty       bool
}

represents the `repo publish` command.

func (*RepoPublishCommand) Run added in v0.7.0

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

the actual command.

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, doneAt 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