Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewDBConnection ¶ added in v0.0.6
func NewDBConnection(connector DBConnector, cfg Config) (gorm.Dialector, error)
NewDBConnection establishes a new database connection.
Types ¶
type DBConnector ¶ added in v0.0.6
DBConnector represents an interface for establishing database connections.
type MySQLDialector ¶ added in v0.0.6
type MySQLDialector struct{}
MySQLDialector is the MySQL database connection
func (*MySQLDialector) OpenConnection ¶ added in v0.0.6
func (d *MySQLDialector) OpenConnection(cfg Config) (gorm.Dialector, error)
OpenConnection opens a new MySQL connection
type PostgreSQLDialector ¶ added in v0.0.6
type PostgreSQLDialector struct{}
PostgreSQLDialector is the PostgreSQL database connection
func (*PostgreSQLDialector) OpenConnection ¶ added in v0.0.6
func (d *PostgreSQLDialector) OpenConnection(cfg Config) (gorm.Dialector, error)
OpenConnection opens a new PostgreSQL connection
Click to show internal directories.
Click to hide internal directories.