config

package
v0.0.0-...-c753aa7 Latest Latest
Warning

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

Go to latest
Published: Sep 17, 2020 License: BSD-2-Clause Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ServiceConfig

type ServiceConfig struct {
	LogLevel string `env:"LOG_LEVEL" envDefault:"debug"`

	LogFormat string `env:"LOG_FORMAT" envDefault:"prettyjson"`

	Port string `env:"PORT" envDefault:"8080"`

	DatabaseHost   string `env:"DB_HOST" envDefault:"mysql.abandonedfactory.net"`
	DatabaseName   string `env:"DB_NAME" envDefault:"af_names"`
	DatabasePort   int    `env:"DB_PORT" envDefault:"3306"`
	DatabaseUser   string `env:"DB_USER" envDefault:"af_namer"`
	DatabasePass   string `env:"DB_PASS"`
	DatabaseDriver string `env:"DB_DRIVER" envDefault:"mysql"`
	// contains filtered or unexported fields
}

func LoadConfig

func LoadConfig() *ServiceConfig

func (*ServiceConfig) GetDbConn

func (cfg *ServiceConfig) GetDbConn() (*sqlx.DB, error)

func (*ServiceConfig) GetLogger

func (cfg *ServiceConfig) GetLogger() *log.Entry

Jump to

Keyboard shortcuts

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