dao

package
v0.0.0-...-e809d31 Latest Latest
Warning

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

Go to latest
Published: May 17, 2023 License: GPL-3.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrMerchantNotFound = errors.New("no such user")
	ErrMerchantExist    = errors.New("user already exist")
)

Functions

This section is empty.

Types

type Merchant

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

func NewMerchant

func NewMerchant(db *gorm.DB, rdb *redis.Client) *Merchant

func (*Merchant) CacheMerchantInfo

func (m *Merchant) CacheMerchantInfo(ctx context.Context, merchant *model.Merchant) error

func (*Merchant) CreateMerchant

func (m *Merchant) CreateMerchant(merchant *model.Merchant) error

func (*Merchant) GetMerchantById

func (m *Merchant) GetMerchantById(id int64) (merchant *model.Merchant, err error)

func (*Merchant) GetMerchantByName

func (m *Merchant) GetMerchantByName(name string) (merchant *model.Merchant, err error)

Jump to

Keyboard shortcuts

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