package
Version:
v0.0.0-...-186c3ae
Opens a new window with list of versions in this module.
Published: Nov 25, 2021
License: MIT
Opens a new window with license information.
Imports: 3
Opens a new window with list of imports.
Imported by: 0
Opens a new window with list of known importers.
Documentation
¶
ReadEnv reads some configs from environment variables
type Account struct {
MinUsernameLength int `yaml:"min_username_length"`
}
type App struct {
Name string `yaml:"name" envconfig:"CLEANSERVICE_APP_NAME"`
Address string `yaml:"port" envconfig:"CLEANSERVICE_APP_ADDRESS"`
}
type Config struct {
App App `yaml:"app"`
Mysql Mysql `yaml:"mysql"`
Account Account `yaml:"account"`
}
type Mysql struct {
Username string `yaml:"username" envconfig:"CLEANSERVICE_MYSQL_USERNAME"`
Password string `yaml:"password" envconfig:"CLEANSERVICE_MYSQL_PASSWORD"`
DBName string `yaml:"db_name" envconfig:"CLEANSERVICE_MYSQL_DBNAME"`
Host string `yaml:"host" envconfig:"CLEANSERVICE_MYSQL_HOST"`
Port string `yaml:"port" envconfig:"CLEANSERVICE_MYSQL_PORT"`
}
Source Files
¶
Click to show internal directories.
Click to hide internal directories.