Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Config ¶
type Config struct { Database struct { Host string `default:"127.0.0.1"` Port string `validate:"required"` DB string `validate:"required"` User string `validate:"required"` Password string `validate:"required"` Driver string `validate:"required"` SSL string `default:"disable"` } // contains filtered or unexported fields }
Config struct is used to store the db connection data.
func Get ¶
func Get() *Config
Get returns a config object with the db connection data already in place.
func (*Config) GetDBConnStr ¶
GetDBConnStr returns the connection string.
func (*Config) GetMigration ¶
GetMigration return up or down string to instruct the program if it should migrate database up or down.
func (*Config) GetSQLXDBConnStr ¶ added in v0.2.0
GetSQLXDBConnStr returns the connection string.
func (*Config) GetTestDBConnStr ¶
GetTestDBConnStr returns the test connection string.
Click to show internal directories.
Click to hide internal directories.