database

package
v0.0.0-...-861a228 Latest Latest
Warning

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

Go to latest
Published: Apr 26, 2020 License: MIT Imports: 13 Imported by: 0

Documentation

Index

Constants

View Source
const (
	GORM Driver = iota
	REDIS
	MEMCACHE

	None Database = iota
	MySQL
	PostgreSQL
	Sqlite3
	Redis
	Memcache
)
View Source
const (
	Default = "Default"
)

Variables

This section is empty.

Functions

func BootStrap

func BootStrap() iris.Configurator

func CacheConn

func CacheConn(name ...string) (interface{}, error)

func G

func G(name ...string) *gorm.DB

func M

func M(name ...string) *memcache.Client

func R

func R(name ...string) *redis.Client

func SqlConn

func SqlConn(name ...string) (interface{}, error)

Types

type Connection

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

type Database

type Database int32

func (Database) String

func (c Database) String() string

type Databases

type Databases map[string]Connection

type Driver

type Driver int32

Jump to

Keyboard shortcuts

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