config

package
v0.0.0-...-8328a67 Latest Latest
Warning

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

Go to latest
Published: Oct 15, 2020 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 {
	Name    string `envconfig:"NAME" default:"candi-api-expected"`
	APIPort string `envconfig:"PORT" default:"8080"`

	MysqlHost                  string `envconfig:"MYSQL_HOST" default:"localhost"`
	MysqlPort                  string `envconfig:"MYSQL_PORT" default:"3306"`
	MysqlUsername              string `envconfig:"MYSQL_USERNAME" default:"herryg91"`
	MysqlDBName                string `envconfig:"MYSQL_DB_NAME" default:"demo"`
	MysqlPassword              string `envconfig:"MYSQL_PASSWORD" default:"password"`
	MysqlMaxOpenConnection     int    `envconfig:"MYSQL_MAX_OPEN_CONNECTION" default:"10"`
	MysqlMaxIdleConnection     int    `envconfig:"MYSQL_MAX_IDLE_CONNECTION" default:"5"`
	MysqlMaxLifetimeConnection int    `envconfig:"MYSQL_MAX_LIFETIME_CONNECTION" default:"1"`
	MysqlLogMode               bool   `envconfig:"MYSQL_LOG_MODE" default:"true"`
}

func Get

func Get() Config

Get to get defined configuration

Jump to

Keyboard shortcuts

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