Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Config ¶
type Config struct { CacheControlHeader string `yaml:"cacheControlHeader"` DebugLevel string `yaml:"debugLevel"` Fetchers []map[string]interface{} `yaml:"fetchers"` Paths []PathConfig `yaml:"paths"` FaceAPI struct { DefaultProvider string `yaml:"defaultProvider"` MicrosoftFaceAPI struct { Key string `yaml:"key"` URL string `yaml:"url"` } `yaml:"microsoftFaceAPI"` GoogleCloudVisionAPI struct { Key string `yaml:"key"` } `yaml:"googleCloudVisionAPI"` AWSRekognition struct { Region string `yaml:"region"` } `yaml:"awsRekognition"` } `yaml:"faceapi"` Cache struct { Active bool `yaml:"active"` Provider string `yaml:"provider"` InMemory struct { Size int `yaml:"size"` } `yaml:"inmemory"` Redis struct { Host string `yaml:"host"` Port int `yaml:"port"` DB int `yaml:"db"` } `yaml:"redis"` } `yaml:"cache"` }
Config provides a configuration struct for the server
func LoadConfig ¶
LoadConfig loads the config file
func (*Config) GetFetcherConfigKeyValue ¶
GetFetcherConfigKeyValue returns a configuration key value of a fetcher
func (*Config) GetPathConfigByPath ¶
func (cfg *Config) GetPathConfigByPath(path string) *PathConfig
GetPathConfigByPath returns the path config by the specified path
type PathConfig ¶
type PathConfig struct { Path string `yaml:"path"` FetcherName string `yaml:"fetcherName"` CacheControl string `yaml:"cacheControl"` }
PathConfig represents configuration for a path serving images
Click to show internal directories.
Click to hide internal directories.