Documentation
¶
Index ¶
Constants ¶
View Source
const ( // ErrDriverInit is returned when we cannot initialize the driver. ErrDriverInit = errors.Error("failed to initialize db driver") // ErrMigrateInit is returned when we cannot initialize migration driver. ErrMigrateInit = errors.Error("failed to initialize migration driver") // ErrMigration is returned when we cannot run a migration. ErrMigration = errors.Error("failed to migrate database") )
View Source
const ( // ErrConnect is returned when we cannot connect to the database. ErrConnect = errors.Error("failed to connect to db") // ErrClose is returned when we cannot close the database. ErrClose = errors.Error("failed to close db connection") )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Config ¶
type Config struct {
DSN string `env:"DSN" validate:"required"`
}
Config represents the configuration for our database.
type Driver ¶
type Driver struct {
// contains filtered or unexported fields
}
Driver provides an implementation for connecting to a database.
Click to show internal directories.
Click to hide internal directories.