mysql

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Aug 2, 2017 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Creator

func Creator(cfg interface{}) (interface{}, error)

Types

type DB

type DB struct {
	Config *DBConfig
	Write  *gorm.DB
	Reads  []*gorm.DB
}

func NewDB

func NewDB(cfg *DBConfig) (*DB, error)

func (*DB) Get

func (this *DB) Get(write bool) *gorm.DB

type DBConfig

type DBConfig struct {
	Driver string
	Dsn    string
	Reads  []string
}

Jump to

Keyboard shortcuts

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