data

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

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

Go to latest
Published: May 5, 2024 License: MIT Imports: 28 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var DataClient *ent.Client

ProviderSet is data providers.

Functions

func NewCurrencyRepo

func NewCurrencyRepo(data *Data) biz.CurrencyRateRepo

func NewIcoCouponRepo

func NewIcoCouponRepo(data *Data) biz.IcoCouponRepo

func NewIcoRepo

func NewIcoRepo(data *Data) biz.ICORepo

func NewLockRepo

func NewLockRepo(data *Data) biz.LockRepo

func NewTransactionRepo

func NewTransactionRepo(data *Data) biz.TransactionRepo

func NewWalletRepo

func NewWalletRepo(data *Data) biz.UserWalletRepo

Types

type Data

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

func NewData

func NewData(conf *conf.Data) (*Data, func(), error)

NewData .

func (*Data) GetClient

func (d *Data) GetClient(ctx context.Context) *ent.Client

func (*Data) GetSQL

func (d *Data) GetSQL(ctx context.Context) *entsql.Driver

func (*Data) NewTxContext

func (d *Data) NewTxContext(ctx context.Context, tx *ent.Tx) context.Context

func (*Data) TxCompleted

func (d *Data) TxCompleted(ctx context.Context) context.Context

func (*Data) TxFromContext

func (d *Data) TxFromContext(ctx context.Context) (tx *ent.Tx, ok bool)

func (*Data) WithTx

func (r *Data) WithTx(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