Documentation ¶
Overview ¶
Package models implements models.
Index ¶
Constants ¶
View Source
const ( LogStd = "logstd" LogRus = "logrus" XDraw = "xdraw" NfntCrop = "nfnt_crop" MD5 = "md5" SHA1 = "sha1" SHA256 = "sha256" LRU = "lru" NoLimit = "nolimit" Disk = "disk" InMemory = "inmemory" )
implementer's constants.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Config ¶
type Config struct { Source string `yaml:"-"` Logger string `yaml:"logger"` LogFile string `yaml:"log_file"` LogLevel string `yaml:"log_level"` ListenHTTP string `yaml:"http_listen"` ListenPrometheus string `yaml:"prometheus_listen"` ListenPprof string `yaml:"pprof_listen"` Previewer string `yaml:"previewer"` Interpolation entities.Interpolation `yaml:"interpolation"` NoProxyHeaders []string `yaml:"no_proxy_headers"` ImageURLEncoder string `yaml:"img_url_encoder"` Cacher string `yaml:"cache"` MaxCacheItems int `yaml:"max_cache_items"` Storager string `yaml:"storage"` StoragePath string `yaml:"storage_path"` }
Config is the base config struct.
func (Config) FillConfig ¶ added in v0.2.1
FillConfig fills empty config's fields.
func (Config) GetDefaults ¶
func (c Config) GetDefaults() ConfigDefaults
GetDefaults returns default config fields.
type ConfigDefaults ¶ added in v0.2.1
type ConfigDefaults map[string]interface{}
ConfigDefaults is for default parameters.
type Logger ¶
type Logger struct { Fields LoggerFields WithFields bool }
Logger is the base struct for all loggers.
type Loggerer ¶
type Loggerer interface { GetLogger() Loggerer Debugf(format string, args ...interface{}) Infof(format string, args ...interface{}) Warnf(format string, args ...interface{}) Errorf(format string, args ...interface{}) WithFields(LoggerFields) Loggerer }
Loggerer is the main interface for loggers.
Click to show internal directories.
Click to hide internal directories.