Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type DBConfig ¶
type DBConfig struct { MaxIdleConns int // maximum number of connections in the idle connection pool MaxOpenConns int // maximum number of open connections to the database }
DBConfig is db related configuration
type DBConnector ¶
type DBConnector interface { // Connect connects to the database and returns a *gorm.DB instance and an error. Connect() (*gorm.DB, error) }
DBConnector is an interface that represents a database connector.
type MockDBConnector ¶
MockDBConnector is a mock implementation of a DBConnector interface that returns a pre-configured GORM database instance.
type PostgresDBConnector ¶
PostgresDBConnector is an implementation of the DBConnector interface that connects to a real database for PostgreSQL.
Click to show internal directories.
Click to hide internal directories.