Documentation ¶
Index ¶
Constants ¶
View Source
const ( DBUser = "brucewayne" DBPass = "batman" DBName = "demo" DBCollection = "sample" )
Shared config.
View Source
const (
MySQL = "mysql"
)
All dependencies.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ConfigMySQL ¶
func (*ConfigMySQL) DataSourceName ¶
func (c *ConfigMySQL) DataSourceName() string
DataSourceName returns a connection string suitable for sql.Open.
func (*ConfigMySQL) New ¶
func (c *ConfigMySQL) New() (*sql.DB, error)
New returns a new mysql connection.
func (*ConfigMySQL) SetupConfig ¶
func (c *ConfigMySQL) SetupConfig() error
SetupConfig populates mysql config using environment variables.
Click to show internal directories.
Click to hide internal directories.