biz

package
v0.0.0-...-b12402e Latest Latest
Warning

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

Go to latest
Published: Jul 5, 2022 License: MIT, MIT Imports: 3 Imported by: 0

README

Biz

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ProviderSet = wire.NewSet(NewOrderUseCase)

ProviderSet is biz providers.

Functions

This section is empty.

Types

type Order

type Order struct {
	Id     int64
	UserId int64
}

type OrderRepo

type OrderRepo interface {
	CreateOrder(ctx context.Context, c *Order) (*Order, error)
	GetOrder(ctx context.Context, id int64) (*Order, error)
	UpdateOrder(ctx context.Context, c *Order) (*Order, error)
	ListOrder(ctx context.Context, pageNum, pageSize int64) ([]*Order, error)
}

type OrderUseCase

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

func NewOrderUseCase

func NewOrderUseCase(repo OrderRepo, logger log.Logger) *OrderUseCase

func (*OrderUseCase) Create

func (uc *OrderUseCase) Create(ctx context.Context, u *Order) (*Order, error)

func (*OrderUseCase) Get

func (uc *OrderUseCase) Get(ctx context.Context, id int64) (*Order, error)

func (*OrderUseCase) List

func (uc *OrderUseCase) List(ctx context.Context, pageNum, pageSize int64) ([]*Order, error)

func (*OrderUseCase) Update

func (uc *OrderUseCase) Update(ctx context.Context, u *Order) (*Order, error)

Jump to

Keyboard shortcuts

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