Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Connect ¶
Connect to database MySQL/SQLite using gorm gorm (GO ORM for SQL): http://gorm.io/docs/connecting_to_the_database.html TODO Switch to Config struct
Types ¶
type Config ¶
type Config struct {
Driver string `yaml:"driver" env:"DATABASE_DRIVER" env-description:"Database driver"`
Host string `yaml:"host" env:"DATABASE_HOST" env-description:"Database host"`
Port string `yaml:"port" env:"DATABASE_PORT" env-description:"Database port"`
Name string `yaml:"name" env:"DATABASE_NAME" env-description:"Database name"`
User string `yaml:"user" env:"DATABASE_USER" env-description:"Database user"`
Pass string `env:"DATABASE_PASS" env-description:"Database user password"`
Pool int `yaml:"pool" env:"DATABASE_POOL" env-description:"Database pool size"`
Schema string `yaml:"schema" env:"DATABASE_SCHEMA" env-description:"Database schema name"`
}
Config for database connection TODO Set all default values
Click to show internal directories.
Click to hide internal directories.