Documentation
¶
Index ¶
- Constants
- func Get(key string) interface{}
- func GetBool(key string) bool
- func GetDuration(key string) time.Duration
- func GetFloat64(key string) float64
- func GetInt(key string) int
- func GetString(key string) string
- func GetStringMap(key string) map[string]interface{}
- func GetStringMapString(key string) map[string]string
- func GetStringSlice(key string) []string
- func GetTime(key string) time.Time
- func GithubEnvContentsPath(env string) string
- func Init() error
- func InitApp() error
- func IsSet(key string) bool
- func KubernetesClientCert(env string) string
- func KubernetesClientKey(env string) string
- func KubernetesNamespace(env string) string
- func KubernetesURL(env string) string
- func Require(keys ...string) error
- func Set(key string, value interface{})
- func SetDefault(key string, value interface{})
Constants ¶
const ( ListenAddr = "listen-addr" BuildDir = "build-dir" ServerTimeout = "server-timeout" URI = "vili-uri" StaticLiveReload = "static-live-reload" Environments = "environments" ProdEnvs = "prod-envs" ApprovalEnvs = "approval-envs" DefaultEnv = "default-env" LogDebug = "log-debug" LogJSON = "log-json" RedisPort = "redis-port" RedisDB = "redis-db" AuthService = "auth-service" OktaEntrypoint = "okta-entrypoint" OktaIssuer = "okta-issuer" OktaCert = "okta-cert" OktaDomain = "okta-domain" GithubToken = "github-token" GithubOwner = "github-owner" GithubRepo = "github-repo" GithubContentsPath = "github-contents-path" RegistryURL = "registry-url" RegistryBranchDelimiter = "registry-branch-delimiter" RegistryNamespace = "registry-namespace" RegistryUsername = "registry-username" RegistryPassword = "registry-password" AWSRegion = "aws-region" AWSAccessKeyID = "aws-access-key-id" AWSSecretAccessKey = "aws-secret-access-key" ECRAccountID = "ecr-account-id" DockerMode = "docker-mode" FirebaseURL = "firebase-url" FirebaseSecret = "firebase-secret" SlackToken = "slack-token" SlackChannel = "slack-channel" SlackUsername = "slack-username" SlackEmoji = "slack-emoji" SlackDeployUsernames = "slack-deploy-usernames" )
Config variables
Variables ¶
This section is empty.
Functions ¶
func Get ¶
func Get(key string) interface{}
Get returns the value found for <key> by searching overrides (see Set), environment, config dir, and defaults (see SetDefault), in that order. If no value is found, returns nil.
func GetBool ¶
GetBool is like Get but runs strconv.ParseBool on the value. Returns false if no value is found.
func GetDuration ¶
GetDuration is like Get but runs time.ParseDuration on the value. Returns a zero-length duration if no value is found.
func GetFloat64 ¶
GetFloat64 is like Get but parses the value into a float64. Returns 0.0 if no value is found.
func GetStringMap ¶
GetStringMap is only useful with JSON, YAML and TOML config files, which we aren't using at the moment.
func GetStringMapString ¶
GetStringMapString is only useful with JSON, YAML and TOML config files, which we aren't using at the moment.
func GetStringSlice ¶
GetStringSlice is like Get but runs strings.Fields on the value. Returns an empty slice if no value is found.
func GetTime ¶
GetTime is like Get but parses the value into a time.Time. It can parse RFCs 3339, 1123 and 822; ISO 8601; ANSI C, Unix, and Ruby timestamps; and the following ad hoc formats: "2006-01-02 15:04:05Z07:00", "02 Jan 06 15:04 MST", "2006-01-02", "02 Jan 2006". If no value is found, returns midnight on 1/1/1.
func GithubEnvContentsPath ¶
GithubEnvContentsPath returns the config variable name for robot tokens
func IsSet ¶
IsSet returns true if <key> is set via Set, in environment, config dir, or via SetDefault
func KubernetesClientCert ¶ added in v1.1.0
KubernetesClientCert returns the config variable name for robot tokens
func KubernetesClientKey ¶ added in v1.1.0
KubernetesClientKey returns the config variable name for robot tokens
func KubernetesNamespace ¶
KubernetesNamespace returns the config variable name for robot tokens
func KubernetesURL ¶
KubernetesURL returns the config variable name for robot tokens
func Set ¶
func Set(key string, value interface{})
Set assigns <value> to <key>, overriding values set in any other source
func SetDefault ¶
func SetDefault(key string, value interface{})
SetDefault assigns <value> to <key> if it has no value in any other source
Types ¶
This section is empty.