repository

package
v0.0.3 Latest Latest
Warning

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

Go to latest
Published: Apr 5, 2024 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type OrderRepository

type OrderRepository interface {
	CreateOrder(ctx context.Context, order domain.Order) (domain.Order, error)
	UpdateOrder(ctx context.Context, order domain.Order) error
	FindOrderBySN(ctx context.Context, sn string) (domain.Order, error)
	FindOrderBySNAndBuyerID(ctx context.Context, sn string, buyerID int64) (domain.Order, error)

	TotalOrders(ctx context.Context, uid int64) (int64, error)
	ListOrdersByUID(ctx context.Context, offset, limit int, uid int64) ([]domain.Order, error)

	TotalExpiredOrders(ctx context.Context, ctime int64) (int64, error)
	ListExpiredOrders(ctx context.Context, offset, limit int, ctime int64) ([]domain.Order, error)
	CloseExpiredOrders(ctx context.Context, orderIDs []int64) error
}

func NewRepository

func NewRepository(d dao.OrderDAO) OrderRepository

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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