data

package
v1.0.2 Latest Latest
Warning

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

Go to latest
Published: Oct 9, 2024 License: MIT Imports: 23 Imported by: 0

README

Data

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ProviderSetData = wire.NewSet(NewData, NewGreeterRepo)

ProviderSetData is data providers.

Functions

func GenBizDatabaseName

func GenBizDatabaseName(teamID uint32) string

GenBizDatabaseName 生成业务库名称

func NewGreeterRepo

func NewGreeterRepo(data *Data) biz.GreeterRepo

NewGreeterRepo .

Types

type Data

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

Data .

func NewData

func NewData(c *palaceconf.Bootstrap) (*Data, func(), error)

NewData .

func (*Data) Exit

func (d *Data) Exit() <-chan struct{}

Exit 推出data

func (*Data) GetAlarmGormDB

func (d *Data) GetAlarmGormDB(teamID uint32) (*gorm.DB, error)

GetAlarmGormDB 获取告警库连接

func (*Data) GetAlertQueue

func (d *Data) GetAlertQueue() watch.Queue

GetAlertQueue 获取告警队列

func (*Data) GetBizDB

func (d *Data) GetBizDB(_ context.Context) *sql.DB

GetBizDB 获取业务库连接

func (*Data) GetBizGormDB

func (d *Data) GetBizGormDB(teamID uint32) (*gorm.DB, error)

GetBizGormDB 获取业务库连接

func (*Data) GetCacher

func (d *Data) GetCacher() cache.ICacher

GetCacher 获取缓存

func (*Data) GetCasbin

func (d *Data) GetCasbin(teamID uint32) *casbin.SyncedEnforcer

GetCasbin 获取casbin

func (*Data) GetEmailer

func (d *Data) GetEmailer() email.Interface

GetEmailer 获取邮件发送器

func (*Data) GetMainDB

func (d *Data) GetMainDB(ctx context.Context) *gorm.DB

GetMainDB 获取主库连接

func (*Data) GetStrategyQueue

func (d *Data) GetStrategyQueue() watch.Queue

GetStrategyQueue 获取策略队列

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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