Documentation
¶
Index ¶
- func BuildURL(opts *Options) string
- func Connect(opts *Options) (*sqlx.DB, error)
- func Create(opts *Options) error
- func Drop(opts *Options) error
- func MigrateDown(opts *Options, migrationsPath string) error
- func MigrateTo(opts *Options, migrationsPath string, version uint) error
- func MigrateUp(opts *Options, migrationsPath string) error
- func SeedDown(opts *Options, seedsPath string) error
- func SeedTo(opts *Options, seedsPath string, version uint) error
- func SeedUp(opts *Options, seedsPath string) error
- type Logger
- type Options
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func MigrateDown ¶
MigrateDown rollbacks migrations on the given database
Types ¶
type Options ¶
type Options struct { DBName string User string Password string Host string Port uint SSLMode string ConnectTimeout int SSLCert string SSLKey string SSLRootCert string // The maximum amount of time a connection may be reused. // Additional info: https://golang.org/pkg/database/sql/#DB.SetConnMaxLifetime ConnMaxLifetime int // The maximum number of connections in the idle connection pool. // Additional info: https://golang.org/pkg/database/sql/#DB.SetMaxIdleConns MaxOpenConns int // The maximum number of open connections to the database. // Additional info: https://golang.org/pkg/database/sql/#DB.SetMaxOpenConns MaxIdleConns int }
Options is connection parameters Additional info: https://godoc.org/github.com/lib/pq#hdr-Connection_String_Parameters
Click to show internal directories.
Click to hide internal directories.