config

package
v0.1.3 Latest Latest
Warning

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

Go to latest
Published: Nov 21, 2021 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Bucket

type Bucket struct {
	TTL           time.Duration
	CleanInterval time.Duration
	Rate          int
}

func GetBucketByRate

func GetBucketByRate(rate int) *Bucket

type Config

type Config struct {
	Environment    EnvType `envconfig:"ENVIRONMENT"`
	DBType         string  `envconfig:"DB_TYPE"`
	Host           string  `envconfig:"HOST"`
	Port           string  `envconfig:"PORT"`
	RateLogin      int     `envconfig:"RATE_LOGIN"`
	RatePassword   int     `envconfig:"RATE_PASSWORD"`
	RateIP         int     `envconfig:"RATE_IP"`
	PrometheusPort string  `envconfig:"PROMETHEUS_PORT"`
	Logger         *Logger
}

func Get

func Get() *Config

func (*Config) IsDev

func (c *Config) IsDev() bool

type EnvType

type EnvType string

type Logger

type Logger struct {
	Level string `envconfig:"LOGGER_LEVEL"`
	File  string `envconfig:"LOGGER_FILE"`
}

Jump to

Keyboard shortcuts

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