Documentation
¶
Index ¶
- type Consensus
- type Distributed
- func (m *Distributed) CancelPayment(ctx context.Context, id, userID int64) (err error)
- func (m *Distributed) CreateInvoice(ctx context.Context, id string, userID int64, total int64, metadata []byte, ...) (err error)
- func (m *Distributed) GetInvoice(ctx context.Context, id string, userID int64) (invoice *api.Invoice, err error)
- func (m *Distributed) GetPayment(ctx context.Context, id, userID int64) (payment *model.Payment, err error)
- func (m *Distributed) GetServers(ctx context.Context) ([]*api.Server, error)
- func (m *Distributed) ProceedPayment(ctx context.Context, id, userID int64) (err error)
- func (m *Distributed) RefundPayment(ctx context.Context, id, userID int64) (err error)
- func (m *Distributed) StartPayment(ctx context.Context, id, userID int64, invoiceID string, currency string, ...) (err error)
- type InvoicesRepository
- type PaymentsRepository
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Distributed ¶
type Distributed struct {
// contains filtered or unexported fields
}
func New ¶
func New(consensus Consensus, publisher ddd.EventPublisher[ddd.Event], paymentsRepo PaymentsRepository, invoicesRepo InvoicesRepository, log *logger.Logger) *Distributed
func (*Distributed) CancelPayment ¶
func (m *Distributed) CancelPayment(ctx context.Context, id, userID int64) (err error)
func (*Distributed) CreateInvoice ¶
func (*Distributed) GetInvoice ¶
func (*Distributed) GetPayment ¶
func (*Distributed) GetServers ¶
func (*Distributed) ProceedPayment ¶
func (m *Distributed) ProceedPayment(ctx context.Context, id, userID int64) (err error)
func (*Distributed) RefundPayment ¶
func (m *Distributed) RefundPayment(ctx context.Context, id, userID int64) (err error)
type InvoicesRepository ¶
Click to show internal directories.
Click to hide internal directories.