Documentation ¶
Index ¶
- Variables
- func NewService(r Repository) payment.PaymentSvc
- type Repository
- type Service
- func (s *Service) CloseOrder(ctx context.Context, req *payment.CloseOrderReq) (r *payment.CloseOrderResp, err error)
- func (s *Service) QRPay(ctx context.Context, req *payment.QRPayReq) (r *payment.QRPayResp, err error)
- func (s *Service) QueryOrder(ctx context.Context, req *payment.QueryOrderReq) (r *payment.QueryOrderResp, err error)
- func (s *Service) UnifyPay(ctx context.Context, req *payment.UnifyPayReq) (r *payment.UnifyPayResp, err error)
Constants ¶
This section is empty.
Variables ¶
View Source
var ProviderSet = wire.NewSet(NewService)
Functions ¶
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
Click to show internal directories.
Click to hide internal directories.