Documentation ¶
Index ¶
- Constants
- func Execute()
- func Format(obj interface{}, format string) (data []byte, err error)
- type BatchOption
- type CenterDownloadOption
- type CenterOption
- type CenterUpgradeOption
- type CenterWatchOption
- type CommndHook
- type Config
- type ConfigAddOptions
- type ConfigGenerateOption
- type ConfigOptions
- type CrumbIssuer
- type CrumbIssuerOptions
- type FormatOutput
- type HookOption
- type InteractiveOption
- type JenkinsServer
- type JobArtifactDownloadOption
- type JobArtifactOption
- type JobBuildOption
- type JobCreateOption
- type JobDeleteOption
- type JobHistoryOption
- type JobInputOption
- type JobLogOption
- type JobOption
- type JobParamOption
- type JobSearchOption
- type JobStopOption
- type JobTypeOption
- type OpenOption
- type OutputOption
- type PluginListOption
- type PluginOptions
- type PluginSearchOption
- type PluginSuite
- type PluginTreadOption
- type PluginUninstallOption
- type PluginUpgradeOption
- type PluginUploadOption
- type QueueCancelOption
- type QueueListOption
- type RestartOption
- type RootOptions
- type UserCreateOption
- type UserDeleteOption
- type UserEditOption
- type UserOption
- type UserTokenOption
- type WatchOption
Constants ¶
const ( // JSONOutputFormat is the format of json JSONOutputFormat string = "json" // YAMLOutputFormat is the format of yaml YAMLOutputFormat string = "yaml" // TableOutputFormat is the format of table TableOutputFormat string = "table" )
Variables ¶
This section is empty.
Functions ¶
Types ¶
type BatchOption ¶ added in v0.0.18
type BatchOption struct {
Batch bool
}
BatchOption represent the options for a batch operation
func (*BatchOption) Confirm ¶ added in v0.0.18
func (b *BatchOption) Confirm(message string) bool
Confirm prompte user if they really want to do this
func (*BatchOption) SetFlag ¶ added in v0.0.18
func (b *BatchOption) SetFlag(cmd *cobra.Command)
SetFlag the flag for batch option
type CenterDownloadOption ¶ added in v0.0.20
type CenterDownloadOption struct { LTS bool Output string ShowProgress bool RoundTripper http.RoundTripper }
CenterDownloadOption as the options of download command
type CenterOption ¶ added in v0.0.18
type CenterOption struct { WatchOption RoundTripper http.RoundTripper CeneterStatus string }
CenterOption is the center cmd option
type CenterUpgradeOption ¶ added in v0.0.20
type CenterUpgradeOption struct {
RoundTripper http.RoundTripper
}
CenterUpgradeOption option for upgrade Jenkins
type CenterWatchOption ¶ added in v0.0.19
type CenterWatchOption struct { WatchOption UtilNeedRestart bool UtilInstallComplete bool RoundTripper http.RoundTripper CeneterStatus string }
CenterWatchOption as the options of watch command
type CommndHook ¶ added in v0.0.20
CommndHook is a hook
type Config ¶
type Config struct { Current string `yaml:"current"` JenkinsServers []JenkinsServer `yaml:"jenkins_servers"` PreHooks []CommndHook `yaml:"preHooks"` PostHooks []CommndHook `yaml:"postHooks"` PluginSuites []PluginSuite `yaml:"pluginSuites"` }
Config is a global config struct
type ConfigAddOptions ¶ added in v0.0.10
type ConfigAddOptions struct {
JenkinsServer
}
ConfigAddOptions is the config ad option
type ConfigGenerateOption ¶ added in v0.0.18
type ConfigGenerateOption struct {
Copy bool
}
ConfigGenerateOption is the config generate cmd option
type ConfigOptions ¶ added in v0.0.9
type ConfigOptions struct {
ConfigFileLocation string
}
ConfigOptions is the config cmd option
type CrumbIssuer ¶
type CrumbIssuer struct { Crumb string `json:"crumb"` CrumbRequestField string `json:"crumbRequestField"` }
CrumbIssuer represents Jenkins crumb
type CrumbIssuerOptions ¶
type CrumbIssuerOptions struct {
Upload bool
}
CrumbIssuerOptions contains the command line options
type FormatOutput ¶ added in v0.0.18
FormatOutput is the interface of format output
type HookOption ¶ added in v0.0.20
HookOption is the option whether skip command hook
type InteractiveOption ¶ added in v0.0.18
type InteractiveOption struct {
Interactive bool
}
InteractiveOption allow user to choose whether the mode is interactive
func (*InteractiveOption) SetFlag ¶ added in v0.0.18
func (b *InteractiveOption) SetFlag(cmd *cobra.Command)
SetFlag set the option flag to this cmd
type JenkinsServer ¶
type JenkinsServer struct { Name string `yaml:"name"` URL string `yaml:"url"` UserName string `yaml:"username"` Token string `yaml:"token"` Proxy string `yaml:"proxy"` ProxyAuth string `yaml:"proxyAuth"` Description string `yaml:"description"` }
JenkinsServer holds the configuration of your Jenkins
type JobArtifactDownloadOption ¶ added in v0.0.21
type JobArtifactDownloadOption struct { ID string ShowProgress bool DownloadDir string Jenkins *JenkinsServer RoundTripper http.RoundTripper }
JobArtifactDownloadOption is the options of job artifact download command
type JobArtifactOption ¶ added in v0.0.21
type JobArtifactOption struct { OutputOption RoundTripper http.RoundTripper }
JobArtifactOption is the options of job artifact command
func (*JobArtifactOption) Output ¶ added in v0.0.21
func (o *JobArtifactOption) Output(obj interface{}) (data []byte, err error)
Output render data into byte array
type JobBuildOption ¶ added in v0.0.18
type JobBuildOption struct { BatchOption Param string Debug bool RoundTripper http.RoundTripper }
JobBuildOption is the job build option
type JobCreateOption ¶ added in v0.0.18
type JobCreateOption struct { }
JobCreateOption is the job create option
type JobDeleteOption ¶ added in v0.0.18
type JobDeleteOption struct { BatchOption RoundTripper http.RoundTripper }
JobDeleteOption is the job delete option
type JobHistoryOption ¶ added in v0.0.18
type JobHistoryOption struct {
OutputOption
}
JobHistoryOption is the job history option
func (*JobHistoryOption) Output ¶ added in v0.0.18
func (o *JobHistoryOption) Output(obj interface{}) (data []byte, err error)
Output print the output
type JobInputOption ¶ added in v0.0.21
type JobInputOption struct { BatchOption Action string RoundTripper http.RoundTripper Stdio terminal.Stdio }
JobInputOption is the job delete option
type JobLogOption ¶ added in v0.0.10
type JobLogOption struct { WatchOption History int LogText string LastBuildID int LastBuildURL string }
JobLogOption is the job log option
type JobOption ¶ added in v0.0.10
type JobOption struct {
OutputOption
}
JobOption is the job cmd option
type JobParamOption ¶ added in v0.0.18
type JobParamOption struct { OutputOption Indent bool }
JobParamOption is the job param option
type JobSearchOption ¶ added in v0.0.10
type JobSearchOption struct { OutputOption PrintAll bool Max int RoundTripper http.RoundTripper }
JobSearchOption is the options of job search command
func (*JobSearchOption) Output ¶ added in v0.0.20
func (o *JobSearchOption) Output(obj interface{}) (data []byte, err error)
Output render data into byte array
type JobStopOption ¶ added in v0.0.18
type JobStopOption struct { BatchOption RoundTripper http.RoundTripper }
JobStopOption is the job stop option
type JobTypeOption ¶ added in v0.0.18
type JobTypeOption struct { OutputOption RoundTripper http.RoundTripper }
JobTypeOption is the job type cmd option
func (*JobTypeOption) Output ¶ added in v0.0.18
func (o *JobTypeOption) Output(obj interface{}) (data []byte, err error)
Output renders data into a table
type OpenOption ¶ added in v0.0.10
type OpenOption struct { InteractiveOption Name string Config bool }
OpenOption is the open cmd option
type OutputOption ¶ added in v0.0.9
type OutputOption struct {
Format string
}
OutputOption represent the format of output
func (*OutputOption) Output ¶ added in v0.0.18
func (o *OutputOption) Output(obj interface{}) (data []byte, err error)
Output print the object into byte array
func (*OutputOption) SetFlag ¶ added in v0.0.18
func (o *OutputOption) SetFlag(cmd *cobra.Command)
SetFlag set flag of output format
type PluginListOption ¶ added in v0.0.18
type PluginListOption struct { OutputOption Filter []string RoundTripper http.RoundTripper }
PluginListOption option for plugin list command
func (*PluginListOption) Output ¶ added in v0.0.18
func (o *PluginListOption) Output(obj interface{}) (data []byte, err error)
Output render data into byte array as a table format
type PluginOptions ¶
type PluginOptions struct {
Suite string
}
PluginOptions contains the command line options
type PluginSearchOption ¶ added in v0.0.18
type PluginSearchOption struct { OutputOption RoundTripper http.RoundTripper }
PluginSearchOption is the plugin search option
func (*PluginSearchOption) Output ¶ added in v0.0.18
func (o *PluginSearchOption) Output(obj interface{}) (data []byte, err error)
Output output the data into buffer
type PluginSuite ¶ added in v0.0.19
type PluginSuite struct { Name string `yaml:"name"` Plugins []string `yaml:"plugins"` Description string `yaml:"description"` }
PluginSuite define a suite of plugins
type PluginTreadOption ¶ added in v0.0.21
type PluginTreadOption struct {
RoundTripper http.RoundTripper
}
PluginTreadOption is the option of plugin trend command
type PluginUninstallOption ¶ added in v0.0.20
type PluginUninstallOption struct {
RoundTripper http.RoundTripper
}
PluginUninstallOption the option of uninstall a plugin
type PluginUpgradeOption ¶ added in v0.0.20
type PluginUpgradeOption struct { Filter []string RoundTripper http.RoundTripper }
PluginUpgradeOption option for plugin list command
type PluginUploadOption ¶ added in v0.0.18
type PluginUploadOption struct { Remote string RemoteUser string RemotePassword string RemoteJenkins string ShowProgress bool RoundTripper http.RoundTripper HookOption // contains filtered or unexported fields }
PluginUploadOption will hold the options of plugin cmd
type QueueCancelOption ¶ added in v0.0.20
type QueueCancelOption struct {
RoundTripper http.RoundTripper
}
QueueCancelOption represents the option of queue cancel command
type QueueListOption ¶ added in v0.0.20
type QueueListOption struct { OutputOption RoundTripper http.RoundTripper }
QueueListOption represents the option of queue list command
type RestartOption ¶ added in v0.0.18
type RestartOption struct { BatchOption RoundTripper http.RoundTripper }
RestartOption holds the options for restart cmd
type RootOptions ¶ added in v0.0.9
RootOptions is a global option for whole cli
type UserCreateOption ¶ added in v0.0.18
type UserCreateOption struct {
RoundTripper http.RoundTripper
}
UserCreateOption is user create cmd option
type UserDeleteOption ¶ added in v0.0.18
type UserDeleteOption struct { BatchOption RoundTripper http.RoundTripper }
UserDeleteOption is user delete cmd option
type UserEditOption ¶ added in v0.0.18
type UserEditOption struct {
Description bool
}
UserEditOption is the user edit cmd option
type UserOption ¶ added in v0.0.18
type UserOption struct { OutputOption RoundTripper http.RoundTripper }
UserOption is the user cmd option
type UserTokenOption ¶ added in v0.0.18
type UserTokenOption struct { Generate bool Name string RoundTripper http.RoundTripper }
UserTokenOption represents a user token cmd option
type WatchOption ¶ added in v0.0.18
WatchOption for the resources which can be watched
func (*WatchOption) SetFlag ¶ added in v0.0.20
func (o *WatchOption) SetFlag(cmd *cobra.Command)
SetFlag for WatchOption
Source Files ¶
- center.go
- center_download.go
- center_upgrade.go
- center_watch.go
- common.go
- completion.go
- config.go
- config_add.go
- config_edit.go
- config_generate.go
- config_list.go
- config_remove.go
- config_select.go
- crumbIssuer.go
- doc.go
- job.go
- job_artifact.go
- job_artifact_download.go
- job_build.go
- job_create.go
- job_delete.go
- job_edit.go
- job_history.go
- job_input.go
- job_log.go
- job_param.go
- job_search.go
- job_stop.go
- job_type.go
- open.go
- plugin.go
- plugin_check.go
- plugin_download.go
- plugin_install.go
- plugin_list.go
- plugin_open.go
- plugin_search.go
- plugin_trend.go
- plugin_uninstall.go
- plugin_upgrade.go
- plugin_upload.go
- queue.go
- queue_cancel.go
- queue_list.go
- restart.go
- root.go
- user.go
- user_create.go
- user_delete.go
- user_edit.go
- user_token.go