db

package
v0.0.0-...-fc18315 Latest Latest
Warning

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

Go to latest
Published: Nov 30, 2024 License: MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewSingleRdb

func NewSingleRdb(viper *viper.Viper) *redis.Client

NewSingleRdb 单节点

Types

type DB

type DB interface {
	Db(ctx context.Context) *gorm.DB
}

type MysqlDb

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

func NewMysql

func NewMysql(viper *viper.Viper, writer io.Writer) *MysqlDb

func (*MysqlDb) Db

func (m *MysqlDb) Db(ctx context.Context) *gorm.DB

type RedisDb

type RedisDb struct {
	Rdb *redis.Client
}

func NewRedisDb

func NewRedisDb(rdb *redis.Client) *RedisDb

Jump to

Keyboard shortcuts

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