configuration

package
v3.5.1+incompatible Latest Latest
Warning

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

Go to latest
Published: Jul 13, 2018 License: MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// ErrUnableToSaveConfig -- unable to save config
	ErrUnableToSaveConfig chkitErrors.Err = "unable to sync config"
	// ErrUnableToLoadConfig -- unable to load config
	ErrUnableToLoadConfig chkitErrors.Err = "unable to load config"

	ErrIncompatibleConfig chkitErrors.Err = "it seems you try to run chkit with incompatible config file. " +
		"Please, delete config file and run 'chkit login'"
)
View Source
const (
	ErrNoNamespaces chkitErrors.Err = "no namespaces in account"
)

Variables

This section is empty.

Functions

func GetFirstClientNamespace

func GetFirstClientNamespace(ctx *context.Context) (string, error)

GetFirstClientNamespace -- fetches namespace list and returns first element. Needed for login.

func LoadConfig

func LoadConfig(ctx *context.Context) error

LoadConfig -- loads config from fs

func LoadTokens

func LoadTokens(ctx *context.Context) (model.Tokens, error)

LoadTokens -- loads tokens from fs

func LogFileName

func LogFileName() string

func ReadConfigFromDisk

func ReadConfigFromDisk(configPath string) (context.Storable, error)

func SaveTokens

func SaveTokens(ctx *context.Context, tokens model.Tokens) error

SaveTokens -- save tokens in config path

func SyncConfig

func SyncConfig(ctx *context.Context) error

SyncConfig -- writes config from Context to config dir

Types

This section is empty.

Jump to

Keyboard shortcuts

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