Documentation
¶
Index ¶
- func CurrentLogLevel() string
- func Init(configPath string) error
- func LineBreakReplacer(s string) string
- func ValidateConfigPath(path string) error
- type Config
- type ConfigVars
- func (e *ConfigVars) GetAzureClientID() string
- func (e *ConfigVars) GetAzureClientSecret() string
- func (e *ConfigVars) GetAzureLocationDefault() string
- func (e *ConfigVars) GetAzureSubscriptionID() string
- func (e *ConfigVars) GetAzureTenantID() string
- func (e *ConfigVars) GetBusyBoxImage() string
- func (e *ConfigVars) GetCurlImage() string
- func (e *ConfigVars) GetImageRepository() string
- func (e *ConfigVars) GetKubeConfigPath(d string)
- func (e *ConfigVars) GetOutputType(s string) string
- func (e *ConfigVars) SetKubeConfigPath(p string)
- func (e *ConfigVars) SetOutputType(s string)
- func (e *ConfigVars) SetTags(t string)
- type EnvConfig
- func (e *EnvConfig) GetAzureClientID() *string
- func (e *EnvConfig) GetAzureClientSecret() *string
- func (e *EnvConfig) GetAzureLocationDefault() *string
- func (e *EnvConfig) GetAzureSubscriptionID() *string
- func (e *EnvConfig) GetAzureTenantID() *string
- func (e *EnvConfig) GetBusyBoxImage() *string
- func (e *EnvConfig) GetCurlImage() *string
- func (e *EnvConfig) GetImageRepository() *string
- func (e *EnvConfig) GetKubeConfigPath() *string
- func (e *EnvConfig) GetOutputType() *string
- func (e *EnvConfig) SetKubeConfigPath(p *string)
- func (e *EnvConfig) SetOutputType(s string)
- func (e *EnvConfig) String() string
- type EnvVariable
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CurrentLogLevel ¶
func CurrentLogLevel() string
CurrentLogLevel returns the current log level. It cannot be changed.
func LineBreakReplacer ¶
LineBreakReplacer replaces carriage return (\r), linefeed (\n), formfeed (\f) and other similar characters with a space.
func ValidateConfigPath ¶
ValidateConfigPath simply ensures the file exists
Types ¶
type Config ¶
type Config interface { GetKubeConfigPath() *string SetKubeConfigPath(*string) GetAzureSubscriptionID() *string GetAzureClientID() *string GetAzureClientSecret() *string GetAzureTenantID() *string GetAzureLocationDefault() *string GetImageRepository() *string GetCurlImage() *string GetBusyBoxImage() *string GetOutputType() *string SetOutputType(string) }
Config ...
type ConfigVars ¶
type ConfigVars struct { KubeConfigPath string `yaml:"kubeConfig"` OutputType string `yaml:"outputType"` Images struct { Repository string `yaml:"repository"` Curl string `yaml:"curl"` BusyBox string `yaml:"busyBox"` } `yaml:"Images"` Azure struct { SubscriptionID string `yaml:"subscriptionID"` ClientID string `yaml:"clientID"` ClientSecret string `yaml:"clientSecret"` TenantID string `yaml:"tenantID"` LocationDefault string `yaml:"locationDefault"` } `yaml:"azure"` Tests struct { Tags string `yaml:"tags"` } `yaml:"Tests"` }
ConfigVars contains all possible config vars. May be set by .yml, env, or defaults.
var Vars ConfigVars
Vars ...
func NewConfig ¶
func NewConfig(c string) (ConfigVars, error)
NewConfig can be used multiple times, if the need arises
func (*ConfigVars) GetAzureClientID ¶
func (e *ConfigVars) GetAzureClientID() string
GetAzureClientID ...
func (*ConfigVars) GetAzureClientSecret ¶
func (e *ConfigVars) GetAzureClientSecret() string
GetAzureClientSecret ...
func (*ConfigVars) GetAzureLocationDefault ¶
func (e *ConfigVars) GetAzureLocationDefault() string
GetAzureLocationDefault ...
func (*ConfigVars) GetAzureSubscriptionID ¶
func (e *ConfigVars) GetAzureSubscriptionID() string
GetAzureSubscriptionID ...
func (*ConfigVars) GetAzureTenantID ¶
func (e *ConfigVars) GetAzureTenantID() string
GetAzureTenantID ...
func (*ConfigVars) GetBusyBoxImage ¶
func (e *ConfigVars) GetBusyBoxImage() string
GetBusyBoxImage ...
func (*ConfigVars) GetImageRepository ¶
func (e *ConfigVars) GetImageRepository() string
GetImageRepository ...
func (*ConfigVars) GetKubeConfigPath ¶
func (e *ConfigVars) GetKubeConfigPath(d string)
GetKubeConfigPath ...
func (*ConfigVars) GetOutputType ¶
func (e *ConfigVars) GetOutputType(s string) string
GetOutputType ...
func (*ConfigVars) SetKubeConfigPath ¶
func (e *ConfigVars) SetKubeConfigPath(p string)
SetKubeConfigPath ...
type EnvConfig ¶
type EnvConfig struct {
// contains filtered or unexported fields
}
EnvConfig ...
func (*EnvConfig) GetAzureClientID ¶
GetAzureClientID ...
func (*EnvConfig) GetAzureClientSecret ¶
GetAzureClientSecret ...
func (*EnvConfig) GetAzureLocationDefault ¶
GetAzureLocationDefault ...
func (*EnvConfig) GetAzureSubscriptionID ¶
GetAzureSubscriptionID ...
func (*EnvConfig) GetAzureTenantID ¶
GetAzureTenantID ...
func (*EnvConfig) GetBusyBoxImage ¶
GetBusyBoxImage ...
func (*EnvConfig) GetImageRepository ¶
GetImageRepository ...
func (*EnvConfig) GetKubeConfigPath ¶
GetKubeConfigPath ...
func (*EnvConfig) SetKubeConfigPath ¶
SetKubeConfigPath ...
type EnvVariable ¶
type EnvVariable int
EnvVariable ...
const ( KubeConfig EnvVariable = iota AzSubscriptionID AzClientID AzClientSecret AzTenantID AzLocationDefault ImageRepository CurlImage BusyBoxImage )
EnvVariable ...
func (EnvVariable) String ¶
func (v EnvVariable) String() string