Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Config ¶
type Config struct { Yaml *YamlConfig KeysMap map[string]bool PathPrefix string }
Config global config variable
var Conf *Config
Conf global variable for storing the config from the file
func (*Config) CreateKeyMap ¶
func (c *Config) CreateKeyMap()
CreateKeyMap will take an array of keys and turn it in to a map for quicker authentication
type YamlConfig ¶
type YamlConfig struct { ControlPlane struct { Host string `yaml:"host"` Port string `yaml:"port"` HTPasswd string `yaml:"htpasswd"` NumberOfKeys int `yaml:"number-of-keys"` Keys []string `yaml:"keys"` AllowedOrigins []string `yaml:"allowed-origins"` } `yaml:"control-plane"` Bucket struct { Location string `yaml:"filename"` Export struct { Allowed bool `yaml:"allowed"` Compression string `yaml:"compression"` } `yaml:"export"` } `yaml:"bucket"` }
YamlConfig stuct for yaml file
Click to show internal directories.
Click to hide internal directories.