Documentation ¶
Index ¶
Constants ¶
View Source
const (
Prefix = ""
)
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type App ¶
type App struct { Host string `default:"0.0.0.0" envconfig:"HOST"` Port int `default:"8080" envconfig:"PORT"` RunMode string `default:"debug" envconfig:"RUN_MODE"` DB MySQL BasicAuth BasicAuthAccounts Env string `default:"DEV" envconfig:"ENV"` ServiceName string `envconfig:"SERVICE_NAME"` }
App represents all configuration of qr-service application.
var AppConfig App
AppConfig app config
func (*App) AddressListener ¶
AddressListener returns address listener of HTTP server.
type BasicAuthAccounts ¶
type BasicAuthAccounts struct { Internal struct { Username string `default:"" envconfig:"AUTH_USERNAME"` Password string `default:"" envconfig:"AUTH_PASSWORD"` } }
BasicAuthAccounts contains accounts for basic authenticating.
type MySQL ¶
type MySQL struct { Username string `default:"vin_id" envconfig:"MYSQL_USER"` Password string `default:"vin_id" envconfig:"MYSQL_PASS"` Host string `default:"127.0.0.1" envconfig:"MYSQL_HOST"` Port int `default:"3306" envconfig:"MYSQL_PORT"` Database string `default:"gamezone" envconfig:"MYSQL_DB"` MaxOpenConnection int `default:"10" envconfig:"MYSQL_MAX_OPEN"` MaxIdleConnection int `default:"10" envconfig:"MYSQL_MAX_IDLE"` MaxLifeTime int `default:"24" envconfig:"MYSQL_MAX_LIFETIME"` }
MySQL represents configuration of MySQL database.
func (*MySQL) ConnectionString ¶
ConnectionString returns connection string of MySQL database.
Click to show internal directories.
Click to hide internal directories.