Documentation ¶
Index ¶
- Variables
- func AddCommand(cmd cli.Command)
- func CheckFlagsPresence(c *cli.Context, flags ...string)
- func CurrentStack() string
- func EnsureOnlyFlags(c *cli.Context, args []string)
- func ExitOnError(err error)
- func ExitOnErrorf(msg string, args ...interface{})
- func FlagsToOptions(c *cli.Context, args []string) map[string]string
- func GetAppSetting(setting string) string
- func GetAppStack() string
- func GetAuthContextOrDie(stack string) (*Auth, *Apprc)
- func GetAuthOrDie(c *cli.Context) (*Auth, *Apprc)
- func HandlePanicErr(err error, token, version string)
- func New() *cli.App
- func ReadSetting(name, setting string) string
- func RmSettingDir(path string) error
- func SetAuth(a *Auth) error
- func Usage(c *cli.Context)
- func WriteAppSetting(setting, value string) error
- func WriteSetting(name, setting, value string) error
- type Apprc
- type Auth
Constants ¶
This section is empty.
Variables ¶
Functions ¶
func AddCommand ¶
func CheckFlagsPresence ¶
func CurrentStack ¶
func CurrentStack() string
func EnsureOnlyFlags ¶
EnsureOnlyFlags ensures that every element in the args slice starts with --
func ExitOnError ¶
func ExitOnError(err error)
func ExitOnErrorf ¶
func ExitOnErrorf(msg string, args ...interface{})
func FlagsToOptions ¶
FlagsToOptions converts a list of '--key=value'/'--bool' strings to 'key: value, bool: true'-style map
func GetAppSetting ¶
func GetAppStack ¶
func GetAppStack() string
func GetAuthContextOrDie ¶
Exits if there is any error.
func HandlePanicErr ¶
func ReadSetting ¶
func RmSettingDir ¶
func WriteAppSetting ¶
func WriteSetting ¶
Types ¶
type Apprc ¶
type Apprc struct { Context string `json:"context,omitempty"` Auths []*Auth `json:"auths,omitempty"` }
func (*Apprc) DeleteAuth ¶
type Auth ¶
type Auth struct { Name string `json:"name,omitempty"` Provider string `json:"provider,omitempty"` ApiServer string `json:"api_server,omitempty"` ApiKey string `json:"api_key,omitempty"` Project string `json:"project,omitempty"` // for gcp only Bucket string `json:"bucket,omitempty"` Region string `json:"region,omitempty"` // for aws only }
func NewAnonAUth ¶
func NewAnonAUth() *Auth
Click to show internal directories.
Click to hide internal directories.