cmd

package
v0.0.19 Latest Latest
Warning

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

Go to latest
Published: Aug 28, 2019 License: MIT Imports: 23 Imported by: 1

Documentation

Index

Constants

View Source
const (
	JsonOutputFormat  string = "json"
	YAMLOutputFormat  string = "yaml"
	TableOutputFormat string = "table"
)

Variables

This section is empty.

Functions

func Execute

func Execute()

func Format added in v0.0.9

func Format(obj interface{}, format string) (data []byte, err error)

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)

type CenterOption added in v0.0.18

type CenterOption struct {
	WatchOption

	CeneterStatus string
}

type CenterWatchOption added in v0.0.19

type CenterWatchOption struct {
	WatchOption

	CeneterStatus string
}

CenterWatchOption as the options of watch command

type Config

type Config struct {
	Current        string          `yaml:"current"`
	JenkinsServers []JenkinsServer `yaml:"jenkins_servers"`
	PreHooks       []PreHook       `yaml:"preHooks"`
	PluginSuites   []PluginSuite   `yaml:"pluginSuites"`
}

type ConfigAddOptions added in v0.0.10

type ConfigAddOptions struct {
	JenkinsServer
}

type ConfigGenerateOption added in v0.0.18

type ConfigGenerateOption struct {
	Copy bool
}

type ConfigOptions added in v0.0.9

type ConfigOptions struct {
	ConfigFileLocation string
}

type CrumbIssuer

type CrumbIssuer struct {
	Crumb             string `json:"crumb"`
	CrumbRequestField string `json:"crumbRequestField"`
}

type CrumbIssuerOptions

type CrumbIssuerOptions struct {
	Upload bool
}

Start contains the command line options

type FormatOutput added in v0.0.18

type FormatOutput interface {
	Output(obj interface{}, format string) (data []byte, err error)
}

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 JobBuildOption added in v0.0.18

type JobBuildOption struct {
	BatchOption

	Param string
	Debug bool
}

type JobCreateOption added in v0.0.18

type JobCreateOption struct {
}

type JobDeleteOption added in v0.0.18

type JobDeleteOption struct {
	BatchOption
}

type JobHistoryOption added in v0.0.18

type JobHistoryOption struct {
	OutputOption
}

func (*JobHistoryOption) Output added in v0.0.18

func (o *JobHistoryOption) Output(obj interface{}) (data []byte, err error)

type JobLogOption added in v0.0.10

type JobLogOption struct {
	WatchOption
	History int

	LogText      string
	LastBuildID  int
	LastBuildURL string
}

type JobOption added in v0.0.10

type JobOption struct {
	OutputOption
}

type JobParamOption added in v0.0.18

type JobParamOption struct {
	OutputOption

	Indent bool
}

type JobSearchOption added in v0.0.10

type JobSearchOption struct {
	OutputOption
}

type JobStopOption added in v0.0.18

type JobStopOption struct {
	BatchOption
}

type JobTypeOption added in v0.0.18

type JobTypeOption struct {
	OutputOption
}

func (*JobTypeOption) Output added in v0.0.18

func (o *JobTypeOption) Output(obj interface{}) (data []byte, err error)

type OpenOption added in v0.0.10

type OpenOption struct {
	InteractiveOption

	Name   string
	Config bool
}

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)

func (*OutputOption) SetFlag added in v0.0.18

func (o *OutputOption) SetFlag(cmd *cobra.Command)

type PluginListOption added in v0.0.18

type PluginListOption struct {
	OutputOption

	Filter []string
}

func (*PluginListOption) Output added in v0.0.18

func (o *PluginListOption) Output(obj interface{}) (data []byte, err error)

type PluginOptions

type PluginOptions struct {
	Suite string
}

PluginOptions contains the command line options

type PluginSearchOption added in v0.0.18

type PluginSearchOption struct {
	OutputOption
}

func (*PluginSearchOption) Output added in v0.0.18

func (o *PluginSearchOption) Output(obj interface{}) (data []byte, err error)

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 PluginUploadOption added in v0.0.18

type PluginUploadOption struct {
	Remote         string
	RemoteUser     string
	RemotePassword string
	RemoteJenkins  string
	// contains filtered or unexported fields
}

PluginUploadOption will hold the options of plugin cmd

type PreHook added in v0.0.19

type PreHook struct {
	Path    string `yaml:"path"`
	Command string `yaml:"cmd"`
}

type QueueOption added in v0.0.9

type QueueOption struct {
	OutputOption
}

type RestartOption added in v0.0.18

type RestartOption struct {
	BatchOption
}

RestartOption holds the options for restart cmd

type RootOptions added in v0.0.9

type RootOptions struct {
	Jenkins string
	Version bool
	Debug   bool
}

RootOptions is a global option for whole cli

type UserCreateOption added in v0.0.18

type UserCreateOption struct {
}

type UserDeleteOption added in v0.0.18

type UserDeleteOption struct {
	BatchOption
}

type UserEditOption added in v0.0.18

type UserEditOption struct {
	Description bool
}

type UserOption added in v0.0.18

type UserOption struct {
	OutputOption
}

type UserTokenOption added in v0.0.18

type UserTokenOption struct {
	Generate bool
	Name     string
}

type WatchOption added in v0.0.18

type WatchOption struct {
	Watch    bool
	Interval int
}

WatchOption for the resources which can be watched

Jump to

Keyboard shortcuts

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