Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type DBProvider ¶
type DBProvider interface {
GetDatabaseConfig() DatabaseConfig
}
type DatabaseConfig ¶
type DatabaseConfig struct {
Driver DatabaseDriver `mapstructure:"driver"`
Name string `mapstructure:"name"`
Host string `mapstructure:"host"`
Port int `mapstructure:"port"`
Username string `mapstructure:"username"`
Password string `mapstructure:"password"`
SSLMode string `mapstructure:"ssl_mode"`
DataSource string
}
func (*DatabaseConfig) BuildDataSource ¶
func (d *DatabaseConfig) BuildDataSource()
func (*DatabaseConfig) Validate ¶
func (d *DatabaseConfig) Validate() error
type DatabaseDriver ¶
type DatabaseDriver string
const ( DatabaseDriverPostgres DatabaseDriver = "postgres" DatabaseDriverYugabyte DatabaseDriver = "yugabyte" )
func (DatabaseDriver) IsValid ¶
func (d DatabaseDriver) IsValid() bool
Click to show internal directories.
Click to hide internal directories.