cmd

package
v0.2.4 Latest Latest
Warning

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

Go to latest
Published: Apr 3, 2024 License: MIT Imports: 27 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	// Version specifies the version of the application and cannot be changed by end user.
	Version string

	// Env tells end user that what variant (here we use the name of the git branch to make it simple)
	// of application is he using.
	Env string

	// BuildDate of the app.
	BuildDate string
	// GoVersion represents golang version used.
	GoVersion string
	// Platform is the combination of OS and Architecture for which the binary is built for.
	Platform string
	// Revision represents the git revision used to build the current version of app.
	Revision string
)

Functions

func AppVersion added in v0.0.2

func AppVersion(_ *cobra.Command, _ []string) error

func Contains added in v0.1.8

func Contains(slice []string, image string) bool

func GetUniqEntries added in v0.1.8

func GetUniqEntries(slice []string) []string

func Main

func Main()

Main will take the workload of executing/starting the cli, when the command is passed to it.

func SetGoCDCliCommands added in v0.0.9

func SetGoCDCliCommands() *cobra.Command

func SetLogger

func SetLogger(logLevel string)

Types

type BuildInfo added in v0.0.2

type BuildInfo struct {
	Version     string `json:"version,omitempty"`
	Revision    string `json:"revision,omitempty"`
	Environment string `json:"environment,omitempty"`
	BuildDate   string `json:"buildDate,omitempty"`
	GoVersion   string `json:"goVersion,omitempty"`
	Platform    string `json:"platform,omitempty"`
}

BuildInfo represents version of utility.

func GetBuildInfo added in v0.0.2

func GetBuildInfo() BuildInfo

GetBuildInfo return the version and other build info of the application.

type Config

type Config struct {
	URL          string     `yaml:"url,omitempty"`
	CaPath       string     `yaml:"ca_path,omitempty"`
	Auth         gocd.Auth  `yaml:"auth,omitempty"`
	Yes          bool       `yaml:"-"`
	OutputFormat string     `yaml:"-"`
	NoColor      bool       `yaml:"-"`
	LogLevel     string     `yaml:"-"`
	APILogLevel  string     `yaml:"-"`
	FromFile     string     `yaml:"-"`
	ToFile       string     `yaml:"-"`
	TableData    [][]string `yaml:"-"`
	// contains filtered or unexported fields
}

Config holds the information of the cli config.

func (*Config) CheckDiffAndAllow added in v0.2.4

func (cfg *Config) CheckDiffAndAllow(oldData, newData string) error

func (*Config) GetOutputFormat added in v0.2.4

func (cfg *Config) GetOutputFormat() string

type PipelineVSM added in v0.2.0

type PipelineVSM struct {
	Pipeline            string   `json:"pipeline,omitempty"             yaml:"pipeline,omitempty"`
	DownstreamPipelines []string `json:"downstream_pipelines,omitempty" yaml:"downstream_pipelines,omitempty"`
	UpstreamPipelines   []string `json:"upstream_pipelines,omitempty"   yaml:"upstream_pipelines,omitempty"`
}

Jump to

Keyboard shortcuts

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