config

package
v0.5.4 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Sep 18, 2021 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

View Source
const (
	NoCache  = "nocache"
	InMemory = "inmemory"
	Redis    = "redis"
	Memcache = "memcache"
)

List of available cache type.

View Source
const (
	NSQ      = "nsq"
	RabbitMQ = "rabbitmq"
)

List of available pubsub type.

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	// Web server config.
	Web webConfig `envconfig:"WEB"`
	// Worker config.
	Worker workerConfig `envconfig:"WORKER"`
	// Cache config.
	Cache cacheConfig `envconfig:"CACHE"`
	// Database config.
	DB dbConfig `envconfig:"DB"`
	// Logging config.
	Log logConfig `envconfig:"LOG"`
	// Elasticsearch config.
	ES esConfig `envconfig:"ES"`
	// PubSub config.
	PubSub pubSubConfig `envconfig:"PUBSUB"`
}

Config is configuration model for whole malscraper project.

func GetConfig

func GetConfig() (cfg Config, err error)

GetConfig to read and parse config from `.env`.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL