Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var Conf = New()
View Source
var Logger *zap.Logger
Logger instance
Functions ¶
func IsOnBlackList ¶
IsOnBlackList checks wether the url is on the blacklist or not.
func ReOrderQuery ¶
ReOrderQuery orders url query for hash consistency.
func SetupLogger ¶
func SetupLogger(l *lumberjack.Logger) *zap.Logger
SetupLogger initialize a zap logger instance.
Types ¶
type Config ¶
type Config struct { Database db `yaml:"database"` Log log `yaml:"log"` Server server `yaml:"server"` }
Config is a yaml structure for managing config.
func (*Config) ReadConfig ¶
func (c *Config) ReadConfig()
ReadConfig checks if the configuration file exists. If it exists than unmarshal it to a structure. Else, create one with default settings and exit(0).
Click to show internal directories.
Click to hide internal directories.