Documentation ¶
Overview ¶
Code generated by MockGen. DO NOT EDIT. Source: service.go
Generated by this command:
mockgen -source=service.go -package=paymentmocks -destination=../../mocks/payment.mock.go -typed Service
Package paymentmocks is a generated GoMock package.
Index ¶
- type MockService
- func (m *MockService) CloseTimeoutPayment(ctx context.Context, pmt domain.Payment) error
- func (m *MockService) CreatePayment(ctx context.Context, pmt domain.Payment) (domain.Payment, error)
- func (m *MockService) EXPECT() *MockServiceMockRecorder
- func (m *MockService) FindPaymentByID(ctx context.Context, pmtID int64) (domain.Payment, error)
- func (m *MockService) FindTimeoutPayments(ctx context.Context, offset, limit int, ctime int64) ([]domain.Payment, int64, error)
- func (m *MockService) GetPaymentChannels(ctx context.Context) []domain.PaymentChannel
- func (m *MockService) HandleCreditCallback(ctx context.Context, pmt domain.Payment) error
- func (m *MockService) HandleWechatCallback(ctx context.Context, txn *payments.Transaction) error
- func (m *MockService) PayByID(ctx context.Context, pmtID int64) (domain.Payment, error)
- func (m *MockService) SetPaymentStatusPaidFailed(ctx context.Context, pmt *domain.Payment) error
- func (m *MockService) SyncWechatInfo(ctx context.Context, pmt domain.Payment) error
- type MockServiceMockRecorder
- func (mr *MockServiceMockRecorder) CloseTimeoutPayment(ctx, pmt any) *ServiceCloseTimeoutPaymentCall
- func (mr *MockServiceMockRecorder) CreatePayment(ctx, pmt any) *ServiceCreatePaymentCall
- func (mr *MockServiceMockRecorder) FindPaymentByID(ctx, pmtID any) *ServiceFindPaymentByIDCall
- func (mr *MockServiceMockRecorder) FindTimeoutPayments(ctx, offset, limit, ctime any) *ServiceFindTimeoutPaymentsCall
- func (mr *MockServiceMockRecorder) GetPaymentChannels(ctx any) *ServiceGetPaymentChannelsCall
- func (mr *MockServiceMockRecorder) HandleCreditCallback(ctx, pmt any) *ServiceHandleCreditCallbackCall
- func (mr *MockServiceMockRecorder) HandleWechatCallback(ctx, txn any) *ServiceHandleWechatCallbackCall
- func (mr *MockServiceMockRecorder) PayByID(ctx, pmtID any) *ServicePayByIDCall
- func (mr *MockServiceMockRecorder) SetPaymentStatusPaidFailed(ctx, pmt any) *ServiceSetPaymentStatusPaidFailedCall
- func (mr *MockServiceMockRecorder) SyncWechatInfo(ctx, pmt any) *ServiceSyncWechatInfoCall
- type ServiceCloseTimeoutPaymentCall
- func (c *ServiceCloseTimeoutPaymentCall) Do(f func(context.Context, domain.Payment) error) *ServiceCloseTimeoutPaymentCall
- func (c *ServiceCloseTimeoutPaymentCall) DoAndReturn(f func(context.Context, domain.Payment) error) *ServiceCloseTimeoutPaymentCall
- func (c *ServiceCloseTimeoutPaymentCall) Return(arg0 error) *ServiceCloseTimeoutPaymentCall
- type ServiceCreatePaymentCall
- func (c *ServiceCreatePaymentCall) Do(f func(context.Context, domain.Payment) (domain.Payment, error)) *ServiceCreatePaymentCall
- func (c *ServiceCreatePaymentCall) DoAndReturn(f func(context.Context, domain.Payment) (domain.Payment, error)) *ServiceCreatePaymentCall
- func (c *ServiceCreatePaymentCall) Return(arg0 domain.Payment, arg1 error) *ServiceCreatePaymentCall
- type ServiceFindPaymentByIDCall
- func (c *ServiceFindPaymentByIDCall) Do(f func(context.Context, int64) (domain.Payment, error)) *ServiceFindPaymentByIDCall
- func (c *ServiceFindPaymentByIDCall) DoAndReturn(f func(context.Context, int64) (domain.Payment, error)) *ServiceFindPaymentByIDCall
- func (c *ServiceFindPaymentByIDCall) Return(arg0 domain.Payment, arg1 error) *ServiceFindPaymentByIDCall
- type ServiceFindTimeoutPaymentsCall
- func (c *ServiceFindTimeoutPaymentsCall) Do(f func(context.Context, int, int, int64) ([]domain.Payment, int64, error)) *ServiceFindTimeoutPaymentsCall
- func (c *ServiceFindTimeoutPaymentsCall) DoAndReturn(f func(context.Context, int, int, int64) ([]domain.Payment, int64, error)) *ServiceFindTimeoutPaymentsCall
- func (c *ServiceFindTimeoutPaymentsCall) Return(arg0 []domain.Payment, arg1 int64, arg2 error) *ServiceFindTimeoutPaymentsCall
- type ServiceGetPaymentChannelsCall
- func (c *ServiceGetPaymentChannelsCall) Do(f func(context.Context) []domain.PaymentChannel) *ServiceGetPaymentChannelsCall
- func (c *ServiceGetPaymentChannelsCall) DoAndReturn(f func(context.Context) []domain.PaymentChannel) *ServiceGetPaymentChannelsCall
- func (c *ServiceGetPaymentChannelsCall) Return(arg0 []domain.PaymentChannel) *ServiceGetPaymentChannelsCall
- type ServiceHandleCreditCallbackCall
- func (c *ServiceHandleCreditCallbackCall) Do(f func(context.Context, domain.Payment) error) *ServiceHandleCreditCallbackCall
- func (c *ServiceHandleCreditCallbackCall) DoAndReturn(f func(context.Context, domain.Payment) error) *ServiceHandleCreditCallbackCall
- func (c *ServiceHandleCreditCallbackCall) Return(arg0 error) *ServiceHandleCreditCallbackCall
- type ServiceHandleWechatCallbackCall
- func (c *ServiceHandleWechatCallbackCall) Do(f func(context.Context, *payments.Transaction) error) *ServiceHandleWechatCallbackCall
- func (c *ServiceHandleWechatCallbackCall) DoAndReturn(f func(context.Context, *payments.Transaction) error) *ServiceHandleWechatCallbackCall
- func (c *ServiceHandleWechatCallbackCall) Return(arg0 error) *ServiceHandleWechatCallbackCall
- type ServicePayByIDCall
- func (c *ServicePayByIDCall) Do(f func(context.Context, int64) (domain.Payment, error)) *ServicePayByIDCall
- func (c *ServicePayByIDCall) DoAndReturn(f func(context.Context, int64) (domain.Payment, error)) *ServicePayByIDCall
- func (c *ServicePayByIDCall) Return(arg0 domain.Payment, arg1 error) *ServicePayByIDCall
- type ServiceSetPaymentStatusPaidFailedCall
- func (c *ServiceSetPaymentStatusPaidFailedCall) Do(f func(context.Context, *domain.Payment) error) *ServiceSetPaymentStatusPaidFailedCall
- func (c *ServiceSetPaymentStatusPaidFailedCall) DoAndReturn(f func(context.Context, *domain.Payment) error) *ServiceSetPaymentStatusPaidFailedCall
- func (c *ServiceSetPaymentStatusPaidFailedCall) Return(arg0 error) *ServiceSetPaymentStatusPaidFailedCall
- type ServiceSyncWechatInfoCall
- func (c *ServiceSyncWechatInfoCall) Do(f func(context.Context, domain.Payment) error) *ServiceSyncWechatInfoCall
- func (c *ServiceSyncWechatInfoCall) DoAndReturn(f func(context.Context, domain.Payment) error) *ServiceSyncWechatInfoCall
- func (c *ServiceSyncWechatInfoCall) Return(arg0 error) *ServiceSyncWechatInfoCall
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type MockService ¶
type MockService struct {
// contains filtered or unexported fields
}
MockService is a mock of Service interface.
func NewMockService ¶
func NewMockService(ctrl *gomock.Controller) *MockService
NewMockService creates a new mock instance.
func (*MockService) CloseTimeoutPayment ¶
CloseTimeoutPayment mocks base method.
func (*MockService) CreatePayment ¶
func (m *MockService) CreatePayment(ctx context.Context, pmt domain.Payment) (domain.Payment, error)
CreatePayment mocks base method.
func (*MockService) EXPECT ¶
func (m *MockService) EXPECT() *MockServiceMockRecorder
EXPECT returns an object that allows the caller to indicate expected use.
func (*MockService) FindPaymentByID ¶
FindPaymentByID mocks base method.
func (*MockService) FindTimeoutPayments ¶
func (m *MockService) FindTimeoutPayments(ctx context.Context, offset, limit int, ctime int64) ([]domain.Payment, int64, error)
FindTimeoutPayments mocks base method.
func (*MockService) GetPaymentChannels ¶
func (m *MockService) GetPaymentChannels(ctx context.Context) []domain.PaymentChannel
GetPaymentChannels mocks base method.
func (*MockService) HandleCreditCallback ¶
HandleCreditCallback mocks base method.
func (*MockService) HandleWechatCallback ¶
func (m *MockService) HandleWechatCallback(ctx context.Context, txn *payments.Transaction) error
HandleWechatCallback mocks base method.
func (*MockService) SetPaymentStatusPaidFailed ¶
SetPaymentStatusPaidFailed mocks base method.
func (*MockService) SyncWechatInfo ¶
SyncWechatInfo mocks base method.
type MockServiceMockRecorder ¶
type MockServiceMockRecorder struct {
// contains filtered or unexported fields
}
MockServiceMockRecorder is the mock recorder for MockService.
func (*MockServiceMockRecorder) CloseTimeoutPayment ¶
func (mr *MockServiceMockRecorder) CloseTimeoutPayment(ctx, pmt any) *ServiceCloseTimeoutPaymentCall
CloseTimeoutPayment indicates an expected call of CloseTimeoutPayment.
func (*MockServiceMockRecorder) CreatePayment ¶
func (mr *MockServiceMockRecorder) CreatePayment(ctx, pmt any) *ServiceCreatePaymentCall
CreatePayment indicates an expected call of CreatePayment.
func (*MockServiceMockRecorder) FindPaymentByID ¶
func (mr *MockServiceMockRecorder) FindPaymentByID(ctx, pmtID any) *ServiceFindPaymentByIDCall
FindPaymentByID indicates an expected call of FindPaymentByID.
func (*MockServiceMockRecorder) FindTimeoutPayments ¶
func (mr *MockServiceMockRecorder) FindTimeoutPayments(ctx, offset, limit, ctime any) *ServiceFindTimeoutPaymentsCall
FindTimeoutPayments indicates an expected call of FindTimeoutPayments.
func (*MockServiceMockRecorder) GetPaymentChannels ¶
func (mr *MockServiceMockRecorder) GetPaymentChannels(ctx any) *ServiceGetPaymentChannelsCall
GetPaymentChannels indicates an expected call of GetPaymentChannels.
func (*MockServiceMockRecorder) HandleCreditCallback ¶
func (mr *MockServiceMockRecorder) HandleCreditCallback(ctx, pmt any) *ServiceHandleCreditCallbackCall
HandleCreditCallback indicates an expected call of HandleCreditCallback.
func (*MockServiceMockRecorder) HandleWechatCallback ¶
func (mr *MockServiceMockRecorder) HandleWechatCallback(ctx, txn any) *ServiceHandleWechatCallbackCall
HandleWechatCallback indicates an expected call of HandleWechatCallback.
func (*MockServiceMockRecorder) PayByID ¶
func (mr *MockServiceMockRecorder) PayByID(ctx, pmtID any) *ServicePayByIDCall
PayByID indicates an expected call of PayByID.
func (*MockServiceMockRecorder) SetPaymentStatusPaidFailed ¶
func (mr *MockServiceMockRecorder) SetPaymentStatusPaidFailed(ctx, pmt any) *ServiceSetPaymentStatusPaidFailedCall
SetPaymentStatusPaidFailed indicates an expected call of SetPaymentStatusPaidFailed.
func (*MockServiceMockRecorder) SyncWechatInfo ¶
func (mr *MockServiceMockRecorder) SyncWechatInfo(ctx, pmt any) *ServiceSyncWechatInfoCall
SyncWechatInfo indicates an expected call of SyncWechatInfo.
type ServiceCloseTimeoutPaymentCall ¶
ServiceCloseTimeoutPaymentCall wrap *gomock.Call
func (*ServiceCloseTimeoutPaymentCall) Do ¶
func (c *ServiceCloseTimeoutPaymentCall) Do(f func(context.Context, domain.Payment) error) *ServiceCloseTimeoutPaymentCall
Do rewrite *gomock.Call.Do
func (*ServiceCloseTimeoutPaymentCall) DoAndReturn ¶
func (c *ServiceCloseTimeoutPaymentCall) DoAndReturn(f func(context.Context, domain.Payment) error) *ServiceCloseTimeoutPaymentCall
DoAndReturn rewrite *gomock.Call.DoAndReturn
func (*ServiceCloseTimeoutPaymentCall) Return ¶
func (c *ServiceCloseTimeoutPaymentCall) Return(arg0 error) *ServiceCloseTimeoutPaymentCall
Return rewrite *gomock.Call.Return
type ServiceCreatePaymentCall ¶
ServiceCreatePaymentCall wrap *gomock.Call
func (*ServiceCreatePaymentCall) Do ¶
func (c *ServiceCreatePaymentCall) Do(f func(context.Context, domain.Payment) (domain.Payment, error)) *ServiceCreatePaymentCall
Do rewrite *gomock.Call.Do
func (*ServiceCreatePaymentCall) DoAndReturn ¶
func (c *ServiceCreatePaymentCall) DoAndReturn(f func(context.Context, domain.Payment) (domain.Payment, error)) *ServiceCreatePaymentCall
DoAndReturn rewrite *gomock.Call.DoAndReturn
func (*ServiceCreatePaymentCall) Return ¶
func (c *ServiceCreatePaymentCall) Return(arg0 domain.Payment, arg1 error) *ServiceCreatePaymentCall
Return rewrite *gomock.Call.Return
type ServiceFindPaymentByIDCall ¶
ServiceFindPaymentByIDCall wrap *gomock.Call
func (*ServiceFindPaymentByIDCall) Do ¶
func (c *ServiceFindPaymentByIDCall) Do(f func(context.Context, int64) (domain.Payment, error)) *ServiceFindPaymentByIDCall
Do rewrite *gomock.Call.Do
func (*ServiceFindPaymentByIDCall) DoAndReturn ¶
func (c *ServiceFindPaymentByIDCall) DoAndReturn(f func(context.Context, int64) (domain.Payment, error)) *ServiceFindPaymentByIDCall
DoAndReturn rewrite *gomock.Call.DoAndReturn
func (*ServiceFindPaymentByIDCall) Return ¶
func (c *ServiceFindPaymentByIDCall) Return(arg0 domain.Payment, arg1 error) *ServiceFindPaymentByIDCall
Return rewrite *gomock.Call.Return
type ServiceFindTimeoutPaymentsCall ¶
ServiceFindTimeoutPaymentsCall wrap *gomock.Call
func (*ServiceFindTimeoutPaymentsCall) Do ¶
func (c *ServiceFindTimeoutPaymentsCall) Do(f func(context.Context, int, int, int64) ([]domain.Payment, int64, error)) *ServiceFindTimeoutPaymentsCall
Do rewrite *gomock.Call.Do
func (*ServiceFindTimeoutPaymentsCall) DoAndReturn ¶
func (c *ServiceFindTimeoutPaymentsCall) DoAndReturn(f func(context.Context, int, int, int64) ([]domain.Payment, int64, error)) *ServiceFindTimeoutPaymentsCall
DoAndReturn rewrite *gomock.Call.DoAndReturn
func (*ServiceFindTimeoutPaymentsCall) Return ¶
func (c *ServiceFindTimeoutPaymentsCall) Return(arg0 []domain.Payment, arg1 int64, arg2 error) *ServiceFindTimeoutPaymentsCall
Return rewrite *gomock.Call.Return
type ServiceGetPaymentChannelsCall ¶
ServiceGetPaymentChannelsCall wrap *gomock.Call
func (*ServiceGetPaymentChannelsCall) Do ¶
func (c *ServiceGetPaymentChannelsCall) Do(f func(context.Context) []domain.PaymentChannel) *ServiceGetPaymentChannelsCall
Do rewrite *gomock.Call.Do
func (*ServiceGetPaymentChannelsCall) DoAndReturn ¶
func (c *ServiceGetPaymentChannelsCall) DoAndReturn(f func(context.Context) []domain.PaymentChannel) *ServiceGetPaymentChannelsCall
DoAndReturn rewrite *gomock.Call.DoAndReturn
func (*ServiceGetPaymentChannelsCall) Return ¶
func (c *ServiceGetPaymentChannelsCall) Return(arg0 []domain.PaymentChannel) *ServiceGetPaymentChannelsCall
Return rewrite *gomock.Call.Return
type ServiceHandleCreditCallbackCall ¶
ServiceHandleCreditCallbackCall wrap *gomock.Call
func (*ServiceHandleCreditCallbackCall) Do ¶
func (c *ServiceHandleCreditCallbackCall) Do(f func(context.Context, domain.Payment) error) *ServiceHandleCreditCallbackCall
Do rewrite *gomock.Call.Do
func (*ServiceHandleCreditCallbackCall) DoAndReturn ¶
func (c *ServiceHandleCreditCallbackCall) DoAndReturn(f func(context.Context, domain.Payment) error) *ServiceHandleCreditCallbackCall
DoAndReturn rewrite *gomock.Call.DoAndReturn
func (*ServiceHandleCreditCallbackCall) Return ¶
func (c *ServiceHandleCreditCallbackCall) Return(arg0 error) *ServiceHandleCreditCallbackCall
Return rewrite *gomock.Call.Return
type ServiceHandleWechatCallbackCall ¶
ServiceHandleWechatCallbackCall wrap *gomock.Call
func (*ServiceHandleWechatCallbackCall) Do ¶
func (c *ServiceHandleWechatCallbackCall) Do(f func(context.Context, *payments.Transaction) error) *ServiceHandleWechatCallbackCall
Do rewrite *gomock.Call.Do
func (*ServiceHandleWechatCallbackCall) DoAndReturn ¶
func (c *ServiceHandleWechatCallbackCall) DoAndReturn(f func(context.Context, *payments.Transaction) error) *ServiceHandleWechatCallbackCall
DoAndReturn rewrite *gomock.Call.DoAndReturn
func (*ServiceHandleWechatCallbackCall) Return ¶
func (c *ServiceHandleWechatCallbackCall) Return(arg0 error) *ServiceHandleWechatCallbackCall
Return rewrite *gomock.Call.Return
type ServicePayByIDCall ¶
ServicePayByIDCall wrap *gomock.Call
func (*ServicePayByIDCall) Do ¶
func (c *ServicePayByIDCall) Do(f func(context.Context, int64) (domain.Payment, error)) *ServicePayByIDCall
Do rewrite *gomock.Call.Do
func (*ServicePayByIDCall) DoAndReturn ¶
func (c *ServicePayByIDCall) DoAndReturn(f func(context.Context, int64) (domain.Payment, error)) *ServicePayByIDCall
DoAndReturn rewrite *gomock.Call.DoAndReturn
func (*ServicePayByIDCall) Return ¶
func (c *ServicePayByIDCall) Return(arg0 domain.Payment, arg1 error) *ServicePayByIDCall
Return rewrite *gomock.Call.Return
type ServiceSetPaymentStatusPaidFailedCall ¶
ServiceSetPaymentStatusPaidFailedCall wrap *gomock.Call
func (*ServiceSetPaymentStatusPaidFailedCall) Do ¶
func (c *ServiceSetPaymentStatusPaidFailedCall) Do(f func(context.Context, *domain.Payment) error) *ServiceSetPaymentStatusPaidFailedCall
Do rewrite *gomock.Call.Do
func (*ServiceSetPaymentStatusPaidFailedCall) DoAndReturn ¶
func (c *ServiceSetPaymentStatusPaidFailedCall) DoAndReturn(f func(context.Context, *domain.Payment) error) *ServiceSetPaymentStatusPaidFailedCall
DoAndReturn rewrite *gomock.Call.DoAndReturn
func (*ServiceSetPaymentStatusPaidFailedCall) Return ¶
func (c *ServiceSetPaymentStatusPaidFailedCall) Return(arg0 error) *ServiceSetPaymentStatusPaidFailedCall
Return rewrite *gomock.Call.Return
type ServiceSyncWechatInfoCall ¶
ServiceSyncWechatInfoCall wrap *gomock.Call
func (*ServiceSyncWechatInfoCall) Do ¶
func (c *ServiceSyncWechatInfoCall) Do(f func(context.Context, domain.Payment) error) *ServiceSyncWechatInfoCall
Do rewrite *gomock.Call.Do
func (*ServiceSyncWechatInfoCall) DoAndReturn ¶
func (c *ServiceSyncWechatInfoCall) DoAndReturn(f func(context.Context, domain.Payment) error) *ServiceSyncWechatInfoCall
DoAndReturn rewrite *gomock.Call.DoAndReturn
func (*ServiceSyncWechatInfoCall) Return ¶
func (c *ServiceSyncWechatInfoCall) Return(arg0 error) *ServiceSyncWechatInfoCall
Return rewrite *gomock.Call.Return