usecase

package
v0.0.0-...-3ab84a5 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ProviderSet = wire.NewSet(NewService)

Functions

func NewService

func NewService(r Repository) payment.PaymentSvc

NewService create new service

Types

type Repository

type Repository interface {
	GetByOutOrderNo(ctx context.Context, outOrderNo string) (*entity.Order, error)
	UpdateOrderStatus(ctx context.Context, outOrderNo string, orderStatus int8) error
	Create(ctx context.Context, order *entity.Order) error
}

Repository is the interface of usecase dependent on. the interface is the part of usecase logic,so we put it here.

type Service

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

func (*Service) CloseOrder

func (s *Service) CloseOrder(ctx context.Context, req *payment.CloseOrderReq) (r *payment.CloseOrderResp, err error)

CloseOrder implements payment.PaymentSvc.CloseOrder

func (*Service) QRPay

func (s *Service) QRPay(ctx context.Context, req *payment.QRPayReq) (r *payment.QRPayResp, err error)

QRPay implements payment.PaymentSvc.QRPay

func (*Service) QueryOrder

func (s *Service) QueryOrder(ctx context.Context, req *payment.QueryOrderReq) (r *payment.QueryOrderResp, err error)

QueryOrder implements payment.PaymentSvc.QueryOrder

func (*Service) UnifyPay

func (s *Service) UnifyPay(ctx context.Context, req *payment.UnifyPayReq) (r *payment.UnifyPayResp, err error)

UnifyPay implements payment.PaymentSvc.UnifyPay

Jump to

Keyboard shortcuts

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