Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func UnmarshalFromEnv ¶
func UnmarshalFromEnv(cfg *Config, opts *UnmarshalOptions) error
Types ¶
type Config ¶
type Config struct { Server ServerConfig Log LogConfig Crawler CrawlerConfig Database DatabaseConfig Cache RedisConfig // REFACTOR: rename to CacheConfig where will be more drivers }
type CrawlerConfig ¶
type CrawlerConfig struct {
Size int `env:"CRAWLER_GORS_COUNT" envDefault:"4"`
}
type DatabaseConfig ¶
type HttpsConfig ¶
type RedisConfig ¶
type ServerConfig ¶
type ServerConfig struct { Host string `env:"SERVER_HOST" envDefault:"localhost"` Port string `env:"SERVER_PORT" envDefault:"8000"` Https HttpsConfig Cors bool `env:"ENABLE_CORS" envDefault:"true"` }
type UnmarshalOptions ¶
type UnmarshalOptions struct {
Dev bool
}
Click to show internal directories.
Click to hide internal directories.