Documentation ¶
Index ¶
- Constants
- func GetGorm(name string) (db *gorm.DB, put func(), err error)
- func GetMongo(name string) (db *mgo.Database, put func(), err error)
- func GetMysql(name string) (db *gorm.DB, put func(), err error)
- func GetPostgre(name string) (db *pgo.DB, put func(), err error)
- func GetRedis(name string) (db redis.Conn, put func(), err error)
- func PutConn(put func())
- func RegisterAll()
- type DataBase
- type GormDB
- type MongoDB
- type MysqlDB
- type PostgreDB
- type RedisDB
Constants ¶
View Source
const ( MySQL = "mysql" PostgreSQL = "postgres" SQLite = "sqlite" SQLServer = "sqlserver" Clickhouse = "clickhouse" )
Variables ¶
This section is empty.
Functions ¶
func GetPostgre ¶ added in v0.2.33
GetPostgre 获取一个GetPostgre连接
Types ¶
type DataBase ¶
type DataBase interface { RegisterAll() Register(string) // contains filtered or unexported methods }
type MongoDB ¶ added in v0.1.13
type MongoDB struct {
// contains filtered or unexported fields
}
Click to show internal directories.
Click to hide internal directories.