data

package
v0.0.0-...-1c37eff Latest Latest
Warning

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

Go to latest
Published: Mar 14, 2022 License: MIT Imports: 9 Imported by: 0

README

Data

go generate ./ent

Documentation

Index

Constants

This section is empty.

Variables

ProviderSet is data providers.

Functions

func NewCardRepo

func NewCardRepo(data *Data, logger log.Logger) biz.CardRepo

func NewDB

func NewDB(conf *conf.Data, logger log.Logger) *gorm.DB

NewDB gorm Connecting to a Database

func NewTransaction

func NewTransaction(d *Data) biz.Transaction

NewTransaction .

func NewUserRepo

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

NewUserRepo .

Types

type Card

type Card struct {
	ID        int64
	UserID    int64
	Money     int64
	CreatedAt time.Time
	UpdatedAt time.Time
}

type Data

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

Data .

func NewData

func NewData(db *gorm.DB, logger log.Logger) (*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

type User

type User struct {
	ID        int64
	Name      string
	Email     string
	CreatedAt time.Time
	UpdatedAt time.Time
}

Jump to

Keyboard shortcuts

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