cmd

package
v0.0.16 Latest Latest
Warning

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

Go to latest
Published: Jul 22, 2019 License: MIT Imports: 18 Imported by: 0

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.11

type BatchOption struct {
	Batch bool
}

BatchOption represent the options for a batch operation

func (*BatchOption) Confirm added in v0.0.11

func (b *BatchOption) Confirm(message string) bool

Confirm prompte user if they really want to do this

func (*BatchOption) SetFlag added in v0.0.16

func (b *BatchOption) SetFlag(cmd *cobra.Command)

type CenterOption added in v0.0.14

type CenterOption struct {
	WatchOption

	CeneterStatus string
}

type Config

type Config struct {
	Current        string          `yaml:"current"`
	JenkinsServers []JenkinsServer `yaml:"jenkins_servers"`
}

type ConfigAddOptions added in v0.0.10

type ConfigAddOptions struct {
	JenkinsServer
}

type ConfigOptions added in v0.0.9

type ConfigOptions struct {
	Current  string
	Show     bool
	Generate bool
	List     bool

	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.11

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

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"`
}

JenkinsServer holds the configuration of your Jenkins

type JobBuildOption added in v0.0.11

type JobBuildOption struct {
	BatchOption
}

type JobCreateOption added in v0.0.16

type JobCreateOption struct {
}

type JobDeleteOption added in v0.0.16

type JobDeleteOption struct {
	BatchOption
}

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

	Name    string
	History bool
}

type JobSearchOption added in v0.0.10

type JobSearchOption struct {
	OutputOption
}

type JobTypeOption added in v0.0.15

type JobTypeOption struct {
	OutputOption
}

func (*JobTypeOption) Output added in v0.0.15

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

type OpenOption added in v0.0.10

type OpenOption struct {
	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.11

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

type PluginOptions

type PluginOptions struct {
	OutputOption

	Upload      bool
	CheckUpdate bool
	Open        bool
	List        bool

	Install   []string
	Uninstall string

	Filter []string
}

PluginOptions contains the command line options

func (*PluginOptions) Output added in v0.0.11

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

type PluginSearchOption added in v0.0.12

type PluginSearchOption struct {
	OutputOption
}

func (*PluginSearchOption) Output added in v0.0.13

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

type QueueOption added in v0.0.9

type QueueOption struct {
	OutputOption
}

type RestartOption added in v0.0.11

type RestartOption struct {
	BatchOption
}

RestartOption holds the options for restart cmd

type RootOptions added in v0.0.9

type RootOptions struct {
	Version bool
}

type UserCreateOption added in v0.0.16

type UserCreateOption struct {
}

type UserDeleteOption added in v0.0.16

type UserDeleteOption struct {
	BatchOption
}

type UserEditOption added in v0.0.11

type UserEditOption struct {
	Description bool
}

type UserOption added in v0.0.11

type UserOption struct {
	OutputOption
}

type UserTokenOption added in v0.0.11

type UserTokenOption struct {
	Generate bool
	Name     string
}

type WatchOption added in v0.0.13

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