db

package
v0.0.0-...-3b7be81 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 18, 2020 License: MIT Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrDBConnNotEstablished = errors.New("database connection not established")

Functions

This section is empty.

Types

type DB

type DB struct {
	// contains filtered or unexported fields
}

func NewDB

func NewDB(ctx *context.Context) (*DB, error)

Initialize initialize database

func (*DB) Migrate

func (db *DB) Migrate()

Migrates database.

func (*DB) SetSchemaName

func (db *DB) SetSchemaName(name string)

func (*DB) Start

func (db *DB) Start() error

Start start db

type MigrationsType

type MigrationsType int

MigrationsType represents enumerator for acceptable migration types.

const (
	MigrationTypeSQLFiles MigrationsType = iota
	MigrationTypeGoCode
)

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL