config

package
v0.2.6 Latest Latest
Warning

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

Go to latest
Published: Mar 28, 2020 License: BSD-3-Clause Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetContext

func GetContext(context string) error

func SetAPIKey

func SetAPIKey(context, apikey string)

func SetAccount

func SetAccount(context, account string)

func SetContext

func SetContext(context, account, apikey, host string)

func SetHost

func SetHost(context, host string)

func UseContext

func UseContext(context string)

Types

type Config

type Config struct {
	CurrentContext string `yaml: "CurrentContext"`

	Contexts map[string]Context
}

func Get

func Get() Config

type Context

type Context struct {
	APIKey  string `yaml: "APIKey"`
	Account string `yaml: "Account"`
	Host    string `yaml: "Host"`
}

func GetConfigContext

func GetConfigContext(context string) (Context, error)

func GetCurrentContext

func GetCurrentContext() Context

Jump to

Keyboard shortcuts

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