Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ApplicationConfig ¶
type ApplicationConfig struct { Env Environment `default:"dev"` Logger LoggerConfig Queue QueueConfig Web Web }
func ReadConfig ¶
func ReadConfig() (*ApplicationConfig, error)
ReadConfig reads configuration from the environment and populates the structure with it
type Environment ¶ added in v1.2.0
type Environment string
Environment defines the application environment to adjust settings to it.
const ( Dev Environment = "dev" Prod Environment = "prod" )
type LoggerConfig ¶ added in v1.2.0
type LoggerConfig struct {
Level LoggerLevel `default:"info"` //Level of minimum logging
}
LoggerConfig represents configuration of the logger
type LoggerLevel ¶ added in v1.2.0
type LoggerLevel string
LoggerLevel defines the minimum logging level to process
const ( TraceLevel LoggerLevel = "trace" DebugLevel LoggerLevel = "debug" InfoLevel LoggerLevel = "info" WarnLevel LoggerLevel = "warn" ErrorLevel LoggerLevel = "error" PanicLevel LoggerLevel = "panic" )
func (LoggerLevel) ToZapLevel ¶ added in v1.2.0
func (ll LoggerLevel) ToZapLevel() zapcore.Level
type QueueConfig ¶
type QueueConfig struct { //UrlRequestQueue name to listen to the new events UrlRequestQueue string `default:"data-scraping-asd" envconfig:"URL_REQUEST_QUEUE"` //ScrapingResultQueue represents a queue name to send processed ApiSpecDoc ScrapingResultQueue string `default:"storage-update-asd" envconfig:"SCRAPING_RESULT_QUEUE"` //NotificationQueue represents a queue name to notify a user about an error or success (if required) NotificationQueue string `default:"gateway-scrape-notifications" envconfig:"NOTIFICATION_QUEUE"` //Url is a RabbitMQ url Url string `default:"amqp://guest:guest@localhost:5672/"` //Concurrency represents number of parallel handlers Concurrency int `default:"30"` }
QueueConfig queue configuration
Click to show internal directories.
Click to hide internal directories.