Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type MysqlDataPool ¶ added in v0.0.2
type MysqlDataPool struct {
// contains filtered or unexported fields
}
func (*MysqlDataPool) GetDB ¶ added in v0.0.2
func (d *MysqlDataPool) GetDB() *gorm.DB
GetDB
@Description: 获取数据库连接 @receiver d @return *gorm.DB
func (*MysqlDataPool) InitMysql ¶ added in v0.0.2
func (d *MysqlDataPool) InitMysql(host string, port string, username string, password string, dbName string)
InitMysql
@Description: 通过参数初始化数据库 @receiver d @param host @param port @param username @param password @param dbName
func (*MysqlDataPool) InitMysqlWithConfig ¶ added in v0.0.2
func (d *MysqlDataPool) InitMysqlWithConfig(config map[string]string)
InitMysqlWithConfig
@Description: 通过配置初始化数据库 @receiver d @param config
type RedisDataPool ¶ added in v0.0.2
type RedisDataPool struct {
// contains filtered or unexported fields
}
func (*RedisDataPool) GetDB ¶ added in v0.0.2
func (d *RedisDataPool) GetDB() *redis.Client
func (*RedisDataPool) InitRedisWithConfig ¶ added in v0.0.2
func (d *RedisDataPool) InitRedisWithConfig(config map[string]string) (bool, error)
初始化redis
Click to show internal directories.
Click to hide internal directories.