config

package
v0.0.0-...-c1658d6 Latest Latest
Warning

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

Go to latest
Published: Nov 29, 2024 License: Apache-2.0 Imports: 5 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 {
	Env        `yaml:"env" mapstructure:"env"`
	HTTPServer `yaml:"http_server" mapstructure:"http_server"`
	Postgres   `yaml:"postgres" mapstructure:"postgres"`
}
var (
	ConfigInstance *Config
)

func GetConfig

func GetConfig() *Config

type Env

type Env struct {
	Environment string `yaml:"environment" mapstructure:"environment"`
	LogLevel    string `yaml:"log_level" mapstructure:"log_level"`
}

type HTTPServer

type HTTPServer struct {
	Address      string        `yaml:"address" mapstructure:"address"`
	Timeout      time.Duration `yaml:"timeout" mapstructure:"timeout"`
	IdleTimeout  time.Duration `yaml:"idle_timeout" mapstructure:"idle_timeout"`
	ReadTimeout  time.Duration `yaml:"read_timeout" mapstructure:"read_timeout"`
	WriteTimeout time.Duration `yaml:"write_timeout" mapstructure:"write_timeout"`
}

type Postgres

type Postgres struct {
	Host     string `yaml:"host" mapstructure:"host"`
	Port     string `yaml:"port" mapstructure:"port"`
	User     string `yaml:"user" mapstructure:"user"`
	Password string `yaml:"password" mapstructure:"password"`
	Database string `yaml:"database" mapstructure:"database"`
	SSLMode  string `yaml:"sslmode" mapstructure:"sslmode"`
}

Jump to

Keyboard shortcuts

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