dao

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Jul 28, 2022 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewMysqlDao

func NewMysqlDao(dao *MysqlDao) *gorm.DB

NewMysqlDao 获取新的数据库连接

func NewMysqlDaoSingleton

func NewMysqlDaoSingleton(dao *MysqlDao) *gorm.DB

NewMysqlDaoSingleton 获取同一个数据库连接

func NewRedisDao

func NewRedisDao(options *RedisDao) *redis.Client

NewRedisDao 连接池

func NewRedisDaoSingleton

func NewRedisDaoSingleton(options *RedisDao) *redis.Client

NewRedisDaoSingleton 获取同一个redis连接

Types

type MysqlDao

type MysqlDao struct {
	User     string
	Password string
	Addr     string
	Port     uint
	DBName   string
	Charset  string
	Debug    bool
}

MysqlDao 数据库操作类型

type RedisDao

type RedisDao struct {
	Addr     string
	Port     int
	Password string
	DB       int
}

RedisDao redis dao

Jump to

Keyboard shortcuts

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