Documentation
¶
Index ¶
- type AdjustInvoice
- type App
- type Application
- func (a Application) AdjustInvoice(ctx context.Context, adjust AdjustInvoice) error
- func (a Application) AuthorizePayment(ctx context.Context, authorize AuthorizePayment) error
- func (a Application) CancelInvoice(ctx context.Context, cancel CancelInvoice) error
- func (a Application) ConfirmPayment(ctx context.Context, confirm ConfirmPayment) error
- func (a Application) CreateInvoice(ctx context.Context, create CreateInvoice) error
- func (a Application) PayInvoice(ctx context.Context, pay PayInvoice) error
- type AuthorizePayment
- type CancelInvoice
- type ConfirmPayment
- type CreateInvoice
- type InvoiceRepository
- type MockApp
- func (_m *MockApp) AdjustInvoice(ctx context.Context, adjust AdjustInvoice) error
- func (_m *MockApp) AuthorizePayment(ctx context.Context, authorize AuthorizePayment) error
- func (_m *MockApp) CancelInvoice(ctx context.Context, cancel CancelInvoice) error
- func (_m *MockApp) ConfirmPayment(ctx context.Context, confirm ConfirmPayment) error
- func (_m *MockApp) CreateInvoice(ctx context.Context, create CreateInvoice) error
- func (_m *MockApp) PayInvoice(ctx context.Context, pay PayInvoice) error
- type MockInvoiceRepository
- type MockPaymentRepository
- type PayInvoice
- type PaymentRepository
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AdjustInvoice ¶
type App ¶
type App interface { AuthorizePayment(ctx context.Context, authorize AuthorizePayment) error ConfirmPayment(ctx context.Context, confirm ConfirmPayment) error CreateInvoice(ctx context.Context, create CreateInvoice) error AdjustInvoice(ctx context.Context, adjust AdjustInvoice) error PayInvoice(ctx context.Context, pay PayInvoice) error CancelInvoice(ctx context.Context, cancel CancelInvoice) error }
type Application ¶
type Application struct {
// contains filtered or unexported fields
}
func New ¶
func New(invoices InvoiceRepository, payments PaymentRepository, publisher ddd.EventPublisher[ddd.Event]) *Application
func (Application) AdjustInvoice ¶
func (a Application) AdjustInvoice(ctx context.Context, adjust AdjustInvoice) error
func (Application) AuthorizePayment ¶
func (a Application) AuthorizePayment(ctx context.Context, authorize AuthorizePayment) error
func (Application) CancelInvoice ¶
func (a Application) CancelInvoice(ctx context.Context, cancel CancelInvoice) error
func (Application) ConfirmPayment ¶
func (a Application) ConfirmPayment(ctx context.Context, confirm ConfirmPayment) error
func (Application) CreateInvoice ¶
func (a Application) CreateInvoice(ctx context.Context, create CreateInvoice) error
func (Application) PayInvoice ¶
func (a Application) PayInvoice(ctx context.Context, pay PayInvoice) error
type AuthorizePayment ¶
type CancelInvoice ¶
type CancelInvoice struct {
ID string
}
type ConfirmPayment ¶
type ConfirmPayment struct {
ID string
}
type CreateInvoice ¶
type InvoiceRepository ¶
type MockApp ¶
MockApp is an autogenerated mock type for the App type
func NewMockApp ¶
func NewMockApp(t mockConstructorTestingTNewMockApp) *MockApp
NewMockApp creates a new instance of MockApp. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations.
func (*MockApp) AdjustInvoice ¶
func (_m *MockApp) AdjustInvoice(ctx context.Context, adjust AdjustInvoice) error
AdjustInvoice provides a mock function with given fields: ctx, adjust
func (*MockApp) AuthorizePayment ¶
func (_m *MockApp) AuthorizePayment(ctx context.Context, authorize AuthorizePayment) error
AuthorizePayment provides a mock function with given fields: ctx, authorize
func (*MockApp) CancelInvoice ¶
func (_m *MockApp) CancelInvoice(ctx context.Context, cancel CancelInvoice) error
CancelInvoice provides a mock function with given fields: ctx, cancel
func (*MockApp) ConfirmPayment ¶
func (_m *MockApp) ConfirmPayment(ctx context.Context, confirm ConfirmPayment) error
ConfirmPayment provides a mock function with given fields: ctx, confirm
func (*MockApp) CreateInvoice ¶
func (_m *MockApp) CreateInvoice(ctx context.Context, create CreateInvoice) error
CreateInvoice provides a mock function with given fields: ctx, create
func (*MockApp) PayInvoice ¶
func (_m *MockApp) PayInvoice(ctx context.Context, pay PayInvoice) error
PayInvoice provides a mock function with given fields: ctx, pay
type MockInvoiceRepository ¶
MockInvoiceRepository is an autogenerated mock type for the InvoiceRepository type
func NewMockInvoiceRepository ¶
func NewMockInvoiceRepository(t mockConstructorTestingTNewMockInvoiceRepository) *MockInvoiceRepository
NewMockInvoiceRepository creates a new instance of MockInvoiceRepository. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations.
func (*MockInvoiceRepository) Find ¶
func (_m *MockInvoiceRepository) Find(ctx context.Context, invoiceID string) (*models.Invoice, error)
Find provides a mock function with given fields: ctx, invoiceID
type MockPaymentRepository ¶
MockPaymentRepository is an autogenerated mock type for the PaymentRepository type
func NewMockPaymentRepository ¶
func NewMockPaymentRepository(t mockConstructorTestingTNewMockPaymentRepository) *MockPaymentRepository
NewMockPaymentRepository creates a new instance of MockPaymentRepository. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations.
type PayInvoice ¶
type PayInvoice struct {
ID string
}