config

package
v0.0.34 Latest Latest
Warning

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

Go to latest
Published: Jun 27, 2019 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var AppName string = InitAppName()
View Source
var Config = RestClientConfig{}

Functions

func AddAppName

func AddAppName(str string) string

Application name can change over time so it is made parameteric

func InitAppName

func InitAppName() string

Application name is automacially set to the calling name

Types

type ClientConfig

type ClientConfig struct {
	Url            string `yaml:"url,omitempty" json:"url,omitempty"`
	Cert           string `yaml:"cert,omitempty" json:"cert,omitempty"`
	Username       string `yaml:"username,omitempty" json:"username,omitempty"`
	RefreshToken   string `yaml:"refresh_token,omitempty" json:"refresh_token,omitempty"`
	AccessToken    string `yaml:"access_token,omitempty" json:"access_token,omitempty"`
	ExpirationTime int64  `yaml:"expiration_time,omitempty" json:"expiration_time,omitempty"`
	Project        string `yaml:"project,omitempty" json:"project,omitempty"`
	Cluster        string `yaml:"cluster,omitempty" json:"cluster,omitempty"`
	VirtualCluster string `yaml:"virtualcluster,omitempty" json:"virtualcluster,omitempty"`
	APIVersion     string `yaml:"apiversion,omitempty" json:"apiversion,omitempty"`
}

ClientConfig respresents serializable client configuration

type RestClientConfig

type RestClientConfig struct {
	CfgFile string
	ClientConfig
}

RestClientConfig provides fields and methods for client configuration manipulation

func (*RestClientConfig) InitConfig

func (rcc *RestClientConfig) InitConfig()

InitConfig reads in config file and ENV variables if set.

func (*RestClientConfig) WriteConfigFile

func (rcc *RestClientConfig) WriteConfigFile() error

Jump to

Keyboard shortcuts

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