static

package
v0.1.13 Latest Latest
Warning

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

Go to latest
Published: Jan 1, 2024 License: MIT Imports: 5 Imported by: 0

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

Jump to

Keyboard shortcuts

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