Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Configuration ¶
type Configuration struct { LogLevel string `yaml:"logLevel"` RequirementPath string `yaml:"requirementPath"` TLSPort string `yaml:"TLSPort"` Port string `yaml:"port"` AllowDirectoryIndex bool `yaml:"allowDirectoryIndex"` SitesAvailable []Site `yaml:"sitesAvailable"` DisableHealthCheck bool `yaml:"disableHealthCheck"` HealthCheckPort int `yaml:"healthCheckPort"` Compress bool `yaml:"compress"` CompressLevel int `yaml:"compressionLevel"` Expires expires `yaml:"expires"` ExpiresParsed ExpiresParsed }
Configuration is the configuration loaded from config.yaml
var Config Configuration
Config global app configuration
func ReadConfig ¶
func ReadConfig(filePath string) (*Configuration, error)
ReadConfig reads the config from the file provided and parses it as Yaml returning a Config object if parsed successfully.
type ExpiresParsed ¶
ExpiresParsed type is processed config of what duration to add to each file type
type Site ¶
type Site struct { StaticPath string `yaml:"path"` IndexFile string `yaml:"index"` HostName string `yaml:"host"` CertFile string `yaml:"certFile"` KeyFile string `yaml:"keyFile"` Redirect bool `yaml:"redirectNonTLS"` Compress bool `yaml:"compress"` CompressLevel int `yaml:"compressionLevel"` Expires expires `yaml:"expires"` ExpiresParsed ExpiresParsed }
Site holds configuration for individual spa sites
Click to show internal directories.
Click to hide internal directories.