Documentation
¶
Index ¶
- Constants
- func ExitOnErr(log *logrus.Logger, err error)
- func GetClient(ctx *cli.Context) *chClient.Client
- func GetConfig(ctx *cli.Context) model.Config
- func GetConfigPath(ctx *cli.Context) string
- func GetFirstClientNamespace(ctx *cli.Context) (string, error)
- func GetNamespace(ctx *cli.Context) string
- func GetTokens(ctx *cli.Context) model.Tokens
- func GetVersion(ctx *cli.Context) semver.Version
- func LoadConfig(configFilePath string, config *model.Config) error
- func LoadTokens(ctx *cli.Context) (model.Tokens, error)
- func LogFileName() string
- func SaveConfig(ctx *cli.Context) error
- func SaveTokens(ctx *cli.Context, tokens model.Tokens) error
- func SetClient(ctx *cli.Context, client *chClient.Client)
- func SetConfig(ctx *cli.Context, config model.Config)
- func SetTokens(ctx *cli.Context, tokens model.Tokens)
- func StoreClient(ctx *cli.Context, client *chClient.Client)
- func WriteConfig(ctx *cli.Context) error
- func WriteData(ctx *cli.Context, renderer model.Renderer) error
Constants ¶
View Source
const (
ErrNoNamespaces chkitErrors.Err = "no namespaces in account"
)
View Source
const ( // ErrUnableToSaveConfig -- unable to save config ErrUnableToSaveConfig chkitErrors.Err = "unable to save config" )
Variables ¶
This section is empty.
Functions ¶
func GetConfigPath ¶
GetConfigPath -- exctract config path from Context
func GetFirstClientNamespace ¶
GetFirstClientNamespace -- fetches namespace list and returns first element. Needed for login.
func GetNamespace ¶
GetNamespace -- return namespace for usage in commands. Priority: "namespace" flag, config file.
func LoadConfig ¶
LoadConfig -- loads config from fs
func LoadTokens ¶
LoadTokens -- loads tokens from fs
func LogFileName ¶
func LogFileName() string
func SaveConfig ¶
SaveConfig -- writes config in config path
func SaveTokens ¶
SaveTokens -- save tokens in config path
func StoreClient ¶
func WriteConfig ¶
WriteConfig -- writes config from Context to config dir
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.