datasource

package
v0.0.0-...-7bb2ca5 Latest Latest
Warning

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

Go to latest
Published: Nov 12, 2022 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ProviderSet = wire.NewSet(NewData)

ProviderSet is datasource providers.

Functions

func GetRedisClient

func GetRedisClient() *redis.Client

Types

type Data

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

Data .

func NewData

func NewData(d *setting.Datasource) (*Data, func(), error)

NewData .

func (*Data) GetMasterDb

func (d *Data) GetMasterDb() *sqlx.DB

GetMasterDb 获取主数据源

func (*Data) GetSlaveDb

func (d *Data) GetSlaveDb() *sqlx.DB

GetSlaveDb 获取从数据源

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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