Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ( ErrNoUpstream = errors.New("upstream cannot be empty") ErrAPIKeysToShort = errors.New("API keys must be at least 16 characters long") RegexSplit = regexp.MustCompile(`[,\s]+`) )
Functions ¶
Types ¶
type Config ¶
type Config struct { LogLevel string `json:"log_level" yaml:"log_level" mapstructure:"log_level"` Upstream string `json:"upstream" yaml:"upstream" mapstructure:"upstream"` HTTPServer *httpserver.Config `json:"http_server" yaml:"http_server" mapstructure:"http_server"` Authentication *authentication.Config `json:"authentication" yaml:"authentication" mapstructure:"authentication"` RateLimit *ratelimit.Config `json:"rate_limit" yaml:"rate_limit" mapstructure:"rate_limit"` // contains filtered or unexported fields }
Config defines the essential parameters for serving this application.
func NewConfig ¶
func NewConfig() *Config
NewConfig creates and returns a new Config having default values from the given configuration file.
func (*Config) GetUpstream ¶
Click to show internal directories.
Click to hide internal directories.