Documentation
¶
Index ¶
- Variables
- type AdminClient
- type AllPaymentService
- type GetPaymentService
- type ID
- type Link
- type NewPaymentService
- type Payment
- type PaymentManager
- func (pm *PaymentManager) CreatePayment(template PaymentTemplate, user User) (Link, error)
- func (pm *PaymentManager) GetAllPaymentsStatuses() (map[ID]Status, error)
- func (pm *PaymentManager) GetPaymentStatus(id ID) (Status, error)
- func (pm *PaymentManager) GetRedirectLink(id ID) (Link, error)
- func (pm *PaymentManager) UpdatePaymentStatus(id ID, newStatus Status) error
- type PaymentTemplate
- type Status
- type User
Constants ¶
This section is empty.
Variables ¶
View Source
var ErrCreatePayment = errors.New("create payment failed")
Functions ¶
This section is empty.
Types ¶
type AdminClient ¶
type AdminClient interface {
NewNewPaymentService() NewPaymentService
NewAllPaymentService() AllPaymentService
NewGetPaymentService() GetPaymentService
}
func NewAdminClient ¶
func NewAdminClient(serverURL string) (AdminClient, error)
type AllPaymentService ¶
type GetPaymentService ¶
type GetPaymentService interface {
ID(id ID) GetPaymentService
Do() (Status, error)
}
type NewPaymentService ¶
type NewPaymentService interface {
Currency(currency string) NewPaymentService
Amount(amount uint) NewPaymentService
Description(description string) NewPaymentService
ResourceLink(link Link) NewPaymentService
Do() (Link, error)
String() string
}
type PaymentManager ¶
type PaymentManager struct {
// contains filtered or unexported fields
}
func NewPaymentManager ¶
func NewPaymentManager( linkGenerator linkGenerator, paymentStorage paymentStorage, paymentService paymentService, ) *PaymentManager
func (*PaymentManager) CreatePayment ¶
func (pm *PaymentManager) CreatePayment(template PaymentTemplate, user User) (Link, error)
func (*PaymentManager) GetAllPaymentsStatuses ¶
func (pm *PaymentManager) GetAllPaymentsStatuses() (map[ID]Status, error)
func (*PaymentManager) GetPaymentStatus ¶
func (pm *PaymentManager) GetPaymentStatus(id ID) (Status, error)
func (*PaymentManager) GetRedirectLink ¶
func (pm *PaymentManager) GetRedirectLink(id ID) (Link, error)
func (*PaymentManager) UpdatePaymentStatus ¶
func (pm *PaymentManager) UpdatePaymentStatus(id ID, newStatus Status) error
type PaymentTemplate ¶
Click to show internal directories.
Click to hide internal directories.