Documentation
¶
Overview ¶
Package csql helps create and manage database connections
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var WireModule = wire.NewSet( NewDBConnection, NewMigrator, wire.Struct(new(NewMigratorParams), "*"), )
WireModule can be used as part of google/wire setup.
Functions ¶
Types ¶
type Migration ¶
type Migration interface {
Run() error
}
Migration can be implemented by any struct that runs a database migration
type Migrator ¶
type Migrator struct {
// contains filtered or unexported fields
}
Migrator can run database migrations by running all of the provided migrations
func NewMigrator ¶
func NewMigrator(p NewMigratorParams) *Migrator
NewMigrator creates a new Migrator
type NewMigratorParams ¶
NewMigratorParams holds the params needed for NewMigrator
Click to show internal directories.
Click to hide internal directories.