Documentation ¶
Index ¶
- Constants
- func ArrayCompletion(array ...string) ...
- func ExistsRegularFile(flagName string) cobra.PositionalArgs
- func GetAliasesDel() []string
- func GetEditorHelpText() string
- func GetJCLIPluginPath(userHome, name string, binary bool) string
- func GetSystemStdio() terminal.Stdio
- func NoFileCompletion(_ *cobra.Command, _ []string, _ string) ([]string, cobra.ShellCompDirective)
- type BatchOption
- type EditContent
- type HookOption
- type InteractiveOption
- type JenkinsClient
- type JenkinsConfigMgr
- type MsgConfirm
- type Option
- type Selector
- type WatchOption
Constants ¶
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"
)
Variables ¶
This section is empty.
Functions ¶
func ArrayCompletion ¶ added in v0.0.33
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 ¶ added in v0.0.31
func ExistsRegularFile(flagName string) cobra.PositionalArgs
ExistsRegularFile returns a function to check if target file is a regular file
func GetAliasesDel ¶
func GetAliasesDel() []string
GetAliasesDel returns the aliases for delete command
func GetEditorHelpText ¶
func GetEditorHelpText() string
GetEditorHelpText returns the help text related a text editor
func GetJCLIPluginPath ¶ added in v0.0.32
GetJCLIPluginPath returns the path of a jcli plugin
func GetSystemStdio ¶
GetSystemStdio returns the stdio from system
func NoFileCompletion ¶ added in v0.0.32
NoFileCompletion avoid completion with files
Types ¶
type BatchOption ¶
BatchOption represent the options for a batch operation
func (*BatchOption) Confirm ¶
func (b *BatchOption) Confirm(message string) bool
Confirm promote user if they really want to do this
func (*BatchOption) SetFlag ¶
func (b *BatchOption) SetFlag(cmd *cobra.Command)
SetFlag the flag for batch option
type EditContent ¶
EditContent is the interface for editing content from a file
type HookOption ¶
HookOption is the option whether skip command hook
type InteractiveOption ¶
type InteractiveOption struct {
Interactive bool
}
InteractiveOption allow user to choose whether the mode is interactive
func (*InteractiveOption) SetFlag ¶
func (b *InteractiveOption) SetFlag(cmd *cobra.Command)
SetFlag set the option flag to this cmd
type JenkinsClient ¶ added in v0.0.30
type JenkinsClient interface { GetCurrentJenkinsFromOptions() (jenkinsServer *config.JenkinsServer) GetCurrentJenkinsAndClient(jClient *client.JenkinsCore) *config.JenkinsServer }
JenkinsClient is the interface of get Jenkins client
type JenkinsConfigMgr ¶ added in v0.0.30
type JenkinsConfigMgr interface { GetMirror(string) string GetGitHubClient() *github.Client SetGitHubClient(gitHubClient *github.Client) }
JenkinsConfigMgr is the interface of getting configuration
type MsgConfirm ¶
MsgConfirm is the interface for confirming a message
type Option ¶ added in v0.0.31
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
type Selector ¶
type Selector interface {
Select(options []string, message, defaultOpt string) (target string, err error)
}
Selector is the interface for selecting an option
type WatchOption ¶
WatchOption for the resources which can be watched
func (*WatchOption) SetFlag ¶
func (o *WatchOption) SetFlag(cmd *cobra.Command)
SetFlag for WatchOption