config

package
v0.0.0-...-a4ecc4f Latest Latest
Warning

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

Go to latest
Published: Sep 7, 2022 License: MIT Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	LogLevel string `mapstructure:"log_level"`
	Port     string `mapstructure:"port"`

	Gin struct {
		Mode string `mapstructure:"mode"`
	} `mapstructure:"gin"`

	Swagger struct {
		Hostname string `mapstructure:"hostname"`
	} `mapstructure:"swagger"`

	Sentry struct {
		DSN        string  `mapstructure:"dsn"`
		SampleRate float32 `mapstructure:"sample_rate"`
	} `mapstructure:"sentry"`

	Database struct {
		URL string `mapstructure:"url"`
		Log bool   `mapstructure:"log"`
	} `mapstructure:"database"`

	Redis struct {
		URL string        `mapstructure:"url"`
		TTL time.Duration `mapstructure:"ttl"`
	} `mapstructure:"redis"`

	Prometheus struct {
		NameSpace string `mapstructure:"namespace"`
		SubSystem string `mapstructure:"subsystem"`
	} `mapstructure:"prometheus"`
}
var Default Config //nolint:gochecknoglobals // config must be global

Default is a config instance.

Jump to

Keyboard shortcuts

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