Documentation ¶
Index ¶
Constants ¶
View Source
const ( // DBString to format connection string to database DBString = "host=%s port=%s dbname=%s user=%s password=%s sslmode=disable" // DBDialect for the database to use DBDialect = "postgres" // DBKey to identify the configuration JSON key DBKey = "db" )
Variables ¶
This section is empty.
Functions ¶
Types ¶
type JSONConfigurationDB ¶
type JSONConfigurationDB struct { Host string `json:"host"` Port string `json:"port"` Name string `json:"name"` Username string `json:"username"` Password string `json:"password"` MaxIdleConns int `json:"max_idle_conns"` MaxOpenConns int `json:"max_open_conns"` ConnMaxLifetime int `json:"conn_max_lifetime"` }
JSONConfigurationDB to hold all backend configuration values
func LoadConfiguration ¶
func LoadConfiguration(file, key string) (JSONConfigurationDB, error)
LoadConfiguration to load the DB configuration file and assign to variables
Click to show internal directories.
Click to hide internal directories.