import "github.com/jenkins-zh/jenkins-cli/app/cmd/common"
cmd_valid.go common.go completion.go plugin.go version_since.go
const ( // VersionSince0028 represents v0.0.28 VersionSince0028 = "v0.0.28" // VersionSince0024 represents v0.0.24 VersionSince0024 = "v0.0.24" // VersionSince0031 represents v0.0.31 VersionSince0031 = "v0.0.31" )
const ( // Since indicate when the feature war added Since = "since" )
func ArrayCompletion(array ...string) func(cmd *cobra.Command, args []string, toComplete string) ([]string, cobra.ShellCompDirective)
ArrayCompletion return a completion which base on an array
func ExistsRegularFile(flagName string) cobra.PositionalArgs
ExistsRegularFile returns a function to check if target file is a regular file
GetAliasesDel returns the aliases for delete command
GetEditorHelpText returns the help text related a text editor
GetJCLIPluginPath returns the path of a jcli plugin
GetSystemStdio returns the stdio from system
NoFileCompletion avoid completion with files
BatchOption represent the options for a batch operation
func (b *BatchOption) Confirm(message string) bool
Confirm promote user if they really want to do this
func (b *BatchOption) SetFlag(cmd *cobra.Command)
SetFlag the flag for batch option
EditContent is the interface for editing content from a file
HookOption is the option whether skip command hook
InteractiveOption allow user to choose whether the mode is interactive
func (b *InteractiveOption) SetFlag(cmd *cobra.Command)
SetFlag set the option flag to this cmd
type JenkinsClient interface { GetCurrentJenkinsFromOptions() (jenkinsServer *config.JenkinsServer) GetCurrentJenkinsAndClient(jClient *client.JenkinsCore) *config.JenkinsServer }
JenkinsClient is the interface of get Jenkins client
type JenkinsConfigMgr interface { GetMirror(string) string GetGitHubClient() *github.Client SetGitHubClient(gitHubClient *github.Client) }
JenkinsConfigMgr is the interface of getting configuration
MsgConfirm is the interface for confirming a message
type Option struct { ExecContext util.ExecContext SystemCallExec util.SystemCallExec LookPathContext util.LookPathContext RoundTripper http.RoundTripper Logger *zap.Logger GitHubClient *github.Client Stdio terminal.Stdio // EditFileName allow editor has a better performance base on this EditFileName string }
Option contains the common options
Editor edit a file than return the content
Select return a target
type Selector interface { Select(options []string, message, defaultOpt string) (target string, err error) }
Selector is the interface for selecting an option
WatchOption for the resources which can be watched
func (o *WatchOption) SetFlag(cmd *cobra.Command)
SetFlag for WatchOption
Package common imports 12 packages (graph) and is imported by 3 packages. Updated 2021-01-27. Refresh now. Tools for package owners.