Documentation ¶
Index ¶
Constants ¶
View Source
const ( // EnvPath is config .env file path that will be parsed. EnvPath = "../../config/.env" // EnvPrefix is environment EnvPrefix = "MAL" // DefaultPort is default HTTP port for go-malscraper. DefaultPort = "8005" // DefaultLogger is default value of logger config. DefaultLogger = true // DefaultRedisTime is default redis caching time (1 day). DefaultRedisTime = 86400 // DefaultImageURLCleaner is default MyAnimeList image URL cleaning. DefaultImageURLCleaner = false // DefaultVideoURLCleaner is default MyAnimeList video URL cleaning. DefaultVideoURLCleaner = false // DefaultVerbose is default verbose level. Showing Info, Error, and Fatal log. DefaultVerbose = mallogger.DefaultLevel )
Variables ¶
This section is empty.
Functions ¶
func ConvertToKeeperConfig ¶ added in v0.8.0
ConvertToKeeperConfig to convert parsed config from `.env` to malkeeper config.
func ConvertToMalConfig ¶ added in v0.3.0
ConvertToMalConfig to convert parsed config from `.env` to malscraper config.
Types ¶
type Config ¶ added in v0.3.0
type Config struct { // HTTP port. Port string `envconfig:"PORT"` // Log HTTP request and response. Logger bool `envconfig:"LOGGER"` // Verbose written in console/terminal. Verbose int `envconfig:"VERBOSE"` // Redis configuration similar with go-redis options. Redis *configRedis `envconfig:"REDIS"` // Database configuration for Postgresql. Database *configDB `envconfig:"DB"` // Clean URL from MyAnimeList. UrlCleaner configCleaner `envconfig:"CLEAN"` }
Config is configuration read from `.env` for whole go-malscraper project.
Click to show internal directories.
Click to hide internal directories.