Documentation ¶
Index ¶
Constants ¶
View Source
const ( // Development is string literal for dev environments Development = "DEVELOPMENT" // Test is string literal for test environments Test = "TEST" // Production is string literal for prod environments Production = "PRODUCTION" )
Variables ¶
This section is empty.
Functions ¶
func ParseOverrides ¶
ParseOverrides overrides values in the config struct with environment variables and values passed from os.Args through opts
Types ¶
type Config ¶
type Config struct { Env string `yaml:"env" env:"ENV" cli:"env"` Net struct { Static string `yaml:"static" env:"STATIC" cli:"static"` IP string `yaml:"ip" env:"IP" cli:"ip"` Port string `yaml:"port" env:"PORT" cli:"port"` Liveness int `yaml:"liveness" env:"liveness" cli:"liveness"` } Timeout struct { Read int `yaml:"read" env:"READ_TIMEOUT" cli:"read-timeout"` Write int `yaml:"write" env:"WRITE_TIMEOUT" cli:"write-timeout"` Stop int `yaml:"stop" env:"STOP_TIMEOUT" cli:"stop-timeout"` Idle int `yaml:"idle" env:"IDLE_TIMEOUT" cli:"idle-timeout"` } AWS struct { Region string `yaml:"region" env:"AWS_REGION" cli:"region"` DynamoDB struct { Endpoint string `yaml:"endpoint" env:"DB_ENDPOINT" cli:"db-endpoint"` PaginationLimit int64 `yaml:"pagination_limit" env:"PAGINATION" cli:"db-pagination"` Table Tables } } }
Config manages the configuration options of the program. Program options are configured first attempting to locate and open `httpd.yml`, first in the path specified by `QAAS_CONFIG` then in /etc/qaas Default values given in config are overriden by env var specified under the `env:"<VAL>"` attribute tags, and then by cli flags specified under the `cli:"<VAL"` attribute tag
Click to show internal directories.
Click to hide internal directories.