cmd

package
v0.1.7 Latest Latest
Warning

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

Go to latest
Published: Aug 10, 2023 License: MIT Imports: 20 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(cmd *cobra.Command, args []string) error

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
	Revision    string
	Environment string
	BuildDate   string
	GoVersion   string
	Platform    string
}

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"`
	JSON     bool      `yaml:"-"`
	YAML     bool      `yaml:"-"`
	NoColor  bool      `yaml:"-"`
	LogLevel string    `yaml:"-"`
	FromFile string    `yaml:"-"`
	ToFile   string    `yaml:"-"`
	// contains filtered or unexported fields
}

Config holds the information of the cli config.

Jump to

Keyboard shortcuts

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