configuration

package
v3.1.1+incompatible Latest Latest
Warning

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

Go to latest
Published: May 23, 2018 License: MIT Imports: 11 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// ErrUnableToSaveConfig -- unable to save config
	ErrUnableToSaveConfig chkitErrors.Err = "unable to save config"
	// ErrUnableToLoadConfig -- unable to load config
	ErrUnableToLoadConfig chkitErrors.Err = "unable to load config"
)
View Source
const (
	ErrNoNamespaces chkitErrors.Err = "no namespaces in account"
)

Variables

This section is empty.

Functions

func ExportData

func ExportData(renderer model.Renderer, config ExportConfig) error

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 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

type ExportConfig

type ExportConfig struct {
	Filename string
	Format   ExportFormat
}

type ExportFormat

type ExportFormat string
const (
	PRETTY ExportFormat = ""
	JSON   ExportFormat = "json"
	YAML   ExportFormat = "yaml"
)

Jump to

Keyboard shortcuts

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