Documentation ¶
Overview ¶
Package commands is the base of all commands. All commands should be in a sub package, implement the Command interface, and register itself through the init function using the Register function
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var Parser = flags.NewParser(&Opts, flags.Default)
Parser defines all the commands
View Source
var ( // Tokens to use to connect to the endpoint Tokens types.TokenFile = types.TokenFile{Endpoint: map[string]types.TokenFileToken{}} )
Functions ¶
func AddCommand ¶
AddCommand register a new command to be parsed
func AddIfNotEmpty ¶
AddIfNotEmpty is a convenient method to add in a map if value is not empty
func GetDefaultDescriptionAnnotation ¶
func GetDefaultDescriptionAnnotation() string
GetDefaultDescriptionAnnotation returns the default description annotation sent
func RequiresAnnotation ¶
func RequiresAnnotation() error
RequiresAnnotation mandates the annotation for that command
Types ¶
type Command ¶
type Command interface { flags.Commander Data() interface{} // Return the data after the command ran successfully PrettyPrint() error // Pretty print the output of the command. It is given the data as returned by the Run method }
Command is implemented by all our commands
type DefaultOpts ¶
type DefaultOpts struct { Dump bool `long:"dump" description:"outputs as go structure"` JSONNeeded bool `long:"json" description:"outputs as json"` Capath string `long:"capath" description:"SSL_CERT_DIR for GOMEME" env:"GOMEME_CERT_DIR"` Endpoint string `long:"endpoint" description:"endpoint" env:"GOMEME_ENDPOINT" required:"true"` Debug bool `long:"debug"` Subject string `long:"subject" description:"annotation subject"` Description string `long:"description" description:"annotation description"` }
DefaultOpts are the common options for every command
var Opts DefaultOpts
Opts is the list of default opts
Directories ¶
Path | Synopsis |
---|---|
Package config contain command to retrieve the server configuration Package config contain command to retrieve the server configuration Package config contain command to retrieve the server configuration Package config contain command to retrieve the server configuration
|
Package config contain command to retrieve the server configuration Package config contain command to retrieve the server configuration Package config contain command to retrieve the server configuration Package config contain command to retrieve the server configuration |
Package curl defines the curl command gomeme does not provide everything, so in last resort one can still call the API by hand through curl.
|
Package curl defines the curl command gomeme does not provide everything, so in last resort one can still call the API by hand through curl. |
Package deploy call the deploy API
|
Package deploy call the deploy API |
Package job defines commands to list, order and modify jobs
|
Package job defines commands to list, order and modify jobs |
Package login defines the login command that retrieves a token and save it into a file
|
Package login defines the login command that retrieves a token and save it into a file |
Package qr accesses Quantitative Resources
|
Package qr accesses Quantitative Resources |
Package secret contains a few commands to handle secrets Package secret contains a few commands to handle secrets Package secret contains a few commands to handle secrets
|
Package secret contains a few commands to handle secrets Package secret contains a few commands to handle secrets Package secret contains a few commands to handle secrets |
Click to show internal directories.
Click to hide internal directories.