data

package
v0.0.0-...-0025a43 Latest Latest
Warning

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

Go to latest
Published: Oct 10, 2022 License: MIT Imports: 26 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

ProviderSet is data providers.

Functions

func NewDB

func NewDB(conf *config.Configuration, gLog *zap.Logger) *gorm.DB

NewDB .

func NewJwtRepo

func NewJwtRepo(data *Data, log *zap.Logger) service.JwtRepo

func NewMediaRepo

func NewMediaRepo(data *Data, log *zap.Logger, storage *compo.Storage) service.MediaRepo

func NewRedis

func NewRedis(c *config.Configuration, gLog *zap.Logger) *redis.Client

NewRedis .

func NewTransaction

func NewTransaction(d *Data) service.Transaction

NewTransaction .

func NewUserRepo

func NewUserRepo(data *Data, log *zap.Logger) service.UserRepo

Types

type Data

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

Data .

func NewData

func NewData(logger *zap.Logger, db *gorm.DB, rdb *redis.Client, sf *sonyflake.Sonyflake) (*Data, func(), error)

NewData .

func (*Data) DB

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

func (*Data) ExecTx

func (d *Data) ExecTx(ctx context.Context, fn func(ctx context.Context) error) error

Jump to

Keyboard shortcuts

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