data

package
v0.0.0-...-5afd5f5 Latest Latest
Warning

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

Go to latest
Published: Nov 29, 2024 License: MIT Imports: 19 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

ProviderSet is data providers.

Functions

func NewMysql

func NewMysql(c *conf.Data, logger log.Logger) (*dal.Query, func(), error)

func NewRedis

func NewRedis(c *conf.Data, logger log.Logger) (redis.Cmdable, func(), error)

func NewTransaction

func NewTransaction(d *Data) biz.Transaction

func NewUserRepo

func NewUserRepo(data *Data, logger log.Logger) domain.UserRepo

Types

type Data

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

Data .

func NewData

func NewData(c *conf.Data, qry *dal.Query, cache redis.Cmdable) (*Data, error)

NewData .

func (*Data) DB

func (d *Data) DB(ctx context.Context) *dal.Query

func (*Data) InTx

func (d *Data) InTx(ctx context.Context, f func(ctx context.Context) error) error

Directories

Path Synopsis
gorm_gen
dal

Jump to

Keyboard shortcuts

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