config

package
v2.2.0+incompatible Latest Latest
Warning

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

Go to latest
Published: Mar 16, 2019 License: Apache-2.0 Imports: 6 Imported by: 17

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	Servers map[string]*ServerConfig
	//Path to the config file
	Path string `json:"path,omitempty"`
	// CurrentServer the user has in focus
	CurrentServer string
}

Config holds the main config for the user

func (Config) FocusedServer

func (c Config) FocusedServer() *ServerConfig

func (Config) Write

func (c Config) Write() error

type ServerConfig

type ServerConfig struct {
	AccessKey string `json:"accessKey"`
	SecretKey string `json:"secretKey"`
	TokenKey  string `json:"tokenKey"`
	URL       string `json:"url"`
	Project   string `json:"project"`
	CACerts   string `json:"cacert"`
}

ServerConfig holds the config for each server the user has setup

func (ServerConfig) EnvironmentURL

func (c ServerConfig) EnvironmentURL() (string, error)

func (ServerConfig) FocusedCluster

func (c ServerConfig) FocusedCluster() string

Jump to

Keyboard shortcuts

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