Documentation ¶
Index ¶
- func NewPostRedirectStateData(url *url.URL, formParameter map[string]FormField) process.StateData
- func NewRedirectStateData(url *url.URL) process.StateData
- func NewShowHTMLStateData(html string) process.StateData
- func NewShowIframeStateData(url *url.URL) process.StateData
- func NewShowWalletPaymentStateData(walletDetails ShowWalletPaymentData) process.StateData
- type CompleteCart
- func (c *CompleteCart) Inject(cartService *application.CartService, ...) *CompleteCart
- func (c CompleteCart) IsFinal() bool
- func (CompleteCart) Name() string
- func (c CompleteCart) Rollback(ctx context.Context, data process.RollbackData) error
- func (c CompleteCart) Run(ctx context.Context, p *process.Process) process.RunResult
- type CompleteCartRollbackData
- type CompletePayment
- func (c *CompletePayment) Inject(paymentService *application.PaymentService) *CompletePayment
- func (c CompletePayment) IsFinal() bool
- func (CompletePayment) Name() string
- func (c CompletePayment) Rollback(ctx context.Context, _ process.RollbackData) error
- func (c CompletePayment) Run(ctx context.Context, p *process.Process) process.RunResult
- type CreatePayment
- func (c *CreatePayment) Inject(paymentService *application.PaymentService) *CreatePayment
- func (c CreatePayment) IsFinal() bool
- func (CreatePayment) Name() string
- func (c CreatePayment) Rollback(ctx context.Context, data process.RollbackData) error
- func (c CreatePayment) Run(ctx context.Context, p *process.Process) process.RunResult
- type CreatePaymentRollbackData
- type Failed
- type FormField
- type New
- type PlaceOrder
- func (po *PlaceOrder) Inject(orderService *application.OrderService, ...) *PlaceOrder
- func (po PlaceOrder) IsFinal() bool
- func (PlaceOrder) Name() string
- func (po PlaceOrder) Rollback(ctx context.Context, data process.RollbackData) error
- func (po PlaceOrder) Run(ctx context.Context, p *process.Process) process.RunResult
- type PlaceOrderRollbackData
- type PostRedirect
- func (pr *PostRedirect) Inject(paymentService *application.PaymentService, ...) *PostRedirect
- func (pr PostRedirect) IsFinal() bool
- func (PostRedirect) Name() string
- func (pr PostRedirect) Rollback(ctx context.Context, _ process.RollbackData) error
- func (pr PostRedirect) Run(ctx context.Context, p *process.Process) process.RunResult
- type PostRedirectData
- type PrepareCart
- func (v *PrepareCart) Inject(cartService *application.CartService) *PrepareCart
- func (v PrepareCart) IsFinal() bool
- func (PrepareCart) Name() string
- func (v PrepareCart) Rollback(context.Context, process.RollbackData) error
- func (v PrepareCart) Run(ctx context.Context, p *process.Process) process.RunResult
- type Redirect
- func (r *Redirect) Inject(paymentService *application.PaymentService, ...) *Redirect
- func (r Redirect) IsFinal() bool
- func (Redirect) Name() string
- func (r Redirect) Rollback(ctx context.Context, _ process.RollbackData) error
- func (r Redirect) Run(ctx context.Context, p *process.Process) process.RunResult
- type ShowHTML
- func (sh *ShowHTML) Inject(paymentService *application.PaymentService, ...) *ShowHTML
- func (sh ShowHTML) IsFinal() bool
- func (ShowHTML) Name() string
- func (sh ShowHTML) Rollback(ctx context.Context, _ process.RollbackData) error
- func (sh ShowHTML) Run(ctx context.Context, p *process.Process) process.RunResult
- type ShowIframe
- func (si *ShowIframe) Inject(paymentService *application.PaymentService, ...) *ShowIframe
- func (si ShowIframe) IsFinal() bool
- func (ShowIframe) Name() string
- func (si ShowIframe) Rollback(ctx context.Context, _ process.RollbackData) error
- func (si ShowIframe) Run(ctx context.Context, p *process.Process) process.RunResult
- type ShowWalletPayment
- func (pr *ShowWalletPayment) Inject(paymentService *application.PaymentService, ...) *ShowWalletPayment
- func (pr ShowWalletPayment) IsFinal() bool
- func (ShowWalletPayment) Name() string
- func (pr ShowWalletPayment) Rollback(ctx context.Context, _ process.RollbackData) error
- func (pr ShowWalletPayment) Run(ctx context.Context, p *process.Process) process.RunResult
- type ShowWalletPaymentData
- type Success
- type ValidateCart
- func (v *ValidateCart) Inject(cartService *application.CartService) *ValidateCart
- func (v ValidateCart) IsFinal() bool
- func (ValidateCart) Name() string
- func (v ValidateCart) Rollback(context.Context, process.RollbackData) error
- func (v ValidateCart) Run(ctx context.Context, p *process.Process) process.RunResult
- type ValidatePayment
- func (v *ValidatePayment) Inject(paymentService *application.PaymentService, ...) *ValidatePayment
- func (v ValidatePayment) IsFinal() bool
- func (ValidatePayment) Name() string
- func (v ValidatePayment) Rollback(ctx context.Context, _ process.RollbackData) error
- func (v ValidatePayment) Run(ctx context.Context, p *process.Process) process.RunResult
- type ValidatePaymentSelection
- func (v *ValidatePaymentSelection) Inject(cartDecoratorFactory *decorator.DecoratedCartFactory, opts ...) *ValidatePaymentSelection
- func (v ValidatePaymentSelection) IsFinal() bool
- func (ValidatePaymentSelection) Name() string
- func (v ValidatePaymentSelection) Rollback(context.Context, process.RollbackData) error
- func (v ValidatePaymentSelection) Run(ctx context.Context, p *process.Process) process.RunResult
- type WaitForCustomer
- func (wc *WaitForCustomer) Inject(paymentService *application.PaymentService, ...) *WaitForCustomer
- func (wc WaitForCustomer) IsFinal() bool
- func (WaitForCustomer) Name() string
- func (wc WaitForCustomer) Rollback(ctx context.Context, _ process.RollbackData) error
- func (wc WaitForCustomer) Run(ctx context.Context, p *process.Process) process.RunResult
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewPostRedirectStateData ¶
NewPostRedirectStateData creates new StateData with (persisted) Data required for this state
func NewRedirectStateData ¶
NewRedirectStateData creates data required for this state
func NewShowHTMLStateData ¶
NewShowHTMLStateData creates new StateData required for this ShowHTML state
func NewShowIframeStateData ¶
NewShowIframeStateData creates new state data for this state
func NewShowWalletPaymentStateData ¶
func NewShowWalletPaymentStateData(walletDetails ShowWalletPaymentData) process.StateData
NewShowWalletPaymentStateData creates new StateData with (persisted) Data required for this state
Types ¶
type CompleteCart ¶
type CompleteCart struct {
// contains filtered or unexported fields
}
CompleteCart state
func (*CompleteCart) Inject ¶
func (c *CompleteCart) Inject( cartService *application.CartService, cartReceiverService *application.CartReceiverService, ) *CompleteCart
Inject dependencies
func (CompleteCart) IsFinal ¶
func (c CompleteCart) IsFinal() bool
IsFinal if state is a final state
func (CompleteCart) Rollback ¶
func (c CompleteCart) Rollback(ctx context.Context, data process.RollbackData) error
Rollback the state operations
type CompleteCartRollbackData ¶
CompleteCartRollbackData for later rollbacks
type CompletePayment ¶
type CompletePayment struct {
// contains filtered or unexported fields
}
CompletePayment state
func (*CompletePayment) Inject ¶
func (c *CompletePayment) Inject( paymentService *application.PaymentService, ) *CompletePayment
Inject dependencies
func (CompletePayment) IsFinal ¶
func (c CompletePayment) IsFinal() bool
IsFinal if state is a final state
func (CompletePayment) Rollback ¶
func (c CompletePayment) Rollback(ctx context.Context, _ process.RollbackData) error
Rollback the state operations
type CreatePayment ¶
type CreatePayment struct {
// contains filtered or unexported fields
}
CreatePayment state
func (*CreatePayment) Inject ¶
func (c *CreatePayment) Inject( paymentService *application.PaymentService, ) *CreatePayment
Inject dependencies
func (CreatePayment) IsFinal ¶
func (c CreatePayment) IsFinal() bool
IsFinal if state is a final state
func (CreatePayment) Rollback ¶
func (c CreatePayment) Rollback(ctx context.Context, data process.RollbackData) error
Rollback the state operations
type CreatePaymentRollbackData ¶
CreatePaymentRollbackData needed for rollback
type Failed ¶
type Failed struct {
Reason process.FailedReason
}
Failed state
type FormField ¶
type FormField struct {
Value []string
}
FormField represents a form field to be displayed to the user
type PlaceOrder ¶
type PlaceOrder struct {
// contains filtered or unexported fields
}
PlaceOrder state
func (*PlaceOrder) Inject ¶
func (po *PlaceOrder) Inject( orderService *application.OrderService, cartService *cartApplication.CartService, cartDecoratorFactory *decorator.DecoratedCartFactory, paymentService *paymentApplication.PaymentService, ) *PlaceOrder
Inject dependencies
func (PlaceOrder) Rollback ¶
func (po PlaceOrder) Rollback(ctx context.Context, data process.RollbackData) error
Rollback the state operations
type PlaceOrderRollbackData ¶
type PlaceOrderRollbackData struct {
OrderInfos application.PlaceOrderInfo
}
PlaceOrderRollbackData needed for rollbacks
type PostRedirect ¶
type PostRedirect struct {
// contains filtered or unexported fields
}
PostRedirect state
func (*PostRedirect) Inject ¶
func (pr *PostRedirect) Inject( paymentService *application.PaymentService, validator process.PaymentValidatorFunc, ) *PostRedirect
Inject dependencies
func (PostRedirect) IsFinal ¶
func (pr PostRedirect) IsFinal() bool
IsFinal if state is a final state
func (PostRedirect) Rollback ¶
func (pr PostRedirect) Rollback(ctx context.Context, _ process.RollbackData) error
Rollback the state operations
type PostRedirectData ¶
PostRedirectData holds details regarding the redirect
type PrepareCart ¶
type PrepareCart struct {
// contains filtered or unexported fields
}
PrepareCart state
func (*PrepareCart) Inject ¶
func (v *PrepareCart) Inject( cartService *application.CartService, ) *PrepareCart
Inject dependencies
func (PrepareCart) Rollback ¶
func (v PrepareCart) Rollback(context.Context, process.RollbackData) error
Rollback the state operations
type Redirect ¶
type Redirect struct {
// contains filtered or unexported fields
}
Redirect state
func (*Redirect) Inject ¶
func (r *Redirect) Inject( paymentService *application.PaymentService, validator process.PaymentValidatorFunc, ) *Redirect
Inject dependencies
type ShowHTML ¶
type ShowHTML struct {
// contains filtered or unexported fields
}
ShowHTML state
func (*ShowHTML) Inject ¶
func (sh *ShowHTML) Inject( paymentService *application.PaymentService, validator process.PaymentValidatorFunc, ) *ShowHTML
Inject dependencies
type ShowIframe ¶
type ShowIframe struct {
// contains filtered or unexported fields
}
ShowIframe state
func (*ShowIframe) Inject ¶
func (si *ShowIframe) Inject( paymentService *application.PaymentService, validator process.PaymentValidatorFunc, ) *ShowIframe
Inject dependencies
func (ShowIframe) Rollback ¶
func (si ShowIframe) Rollback(ctx context.Context, _ process.RollbackData) error
Rollback the state operations
type ShowWalletPayment ¶
type ShowWalletPayment struct {
// contains filtered or unexported fields
}
ShowWalletPayment state
func (*ShowWalletPayment) Inject ¶
func (pr *ShowWalletPayment) Inject( paymentService *application.PaymentService, validator process.PaymentValidatorFunc, ) *ShowWalletPayment
Inject dependencies
func (ShowWalletPayment) IsFinal ¶
func (pr ShowWalletPayment) IsFinal() bool
IsFinal if state is a final state
func (ShowWalletPayment) Rollback ¶
func (pr ShowWalletPayment) Rollback(ctx context.Context, _ process.RollbackData) error
Rollback the state operations
type ShowWalletPaymentData ¶
type ShowWalletPaymentData domain.WalletDetails
ShowWalletPaymentData holds details regarding the wallet payment
type Success ¶
type Success struct{}
Success state
type ValidateCart ¶
type ValidateCart struct {
// contains filtered or unexported fields
}
ValidateCart state
func (*ValidateCart) Inject ¶
func (v *ValidateCart) Inject( cartService *application.CartService, ) *ValidateCart
Inject dependencies
func (ValidateCart) IsFinal ¶
func (v ValidateCart) IsFinal() bool
IsFinal if state is a final state
func (ValidateCart) Rollback ¶
func (v ValidateCart) Rollback(context.Context, process.RollbackData) error
Rollback the state operations
type ValidatePayment ¶
type ValidatePayment struct {
// contains filtered or unexported fields
}
ValidatePayment state
func (*ValidatePayment) Inject ¶
func (v *ValidatePayment) Inject( paymentService *application.PaymentService, validator process.PaymentValidatorFunc, ) *ValidatePayment
Inject dependencies
func (ValidatePayment) IsFinal ¶
func (v ValidatePayment) IsFinal() bool
IsFinal if state is a final state
func (ValidatePayment) Rollback ¶
func (v ValidatePayment) Rollback(ctx context.Context, _ process.RollbackData) error
Rollback the state operations
type ValidatePaymentSelection ¶
type ValidatePaymentSelection struct {
// contains filtered or unexported fields
}
ValidatePaymentSelection state
func (*ValidatePaymentSelection) Inject ¶
func (v *ValidatePaymentSelection) Inject( cartDecoratorFactory *decorator.DecoratedCartFactory, opts *struct { Validator validation.PaymentSelectionValidator `inject:",optional"` }, ) *ValidatePaymentSelection
Inject dependencies
func (ValidatePaymentSelection) IsFinal ¶
func (v ValidatePaymentSelection) IsFinal() bool
IsFinal if state is a final state
func (ValidatePaymentSelection) Name ¶
func (ValidatePaymentSelection) Name() string
Name get state name
func (ValidatePaymentSelection) Rollback ¶
func (v ValidatePaymentSelection) Rollback(context.Context, process.RollbackData) error
Rollback the state operations
type WaitForCustomer ¶
type WaitForCustomer struct {
// contains filtered or unexported fields
}
WaitForCustomer state
func (*WaitForCustomer) Inject ¶
func (wc *WaitForCustomer) Inject( paymentService *application.PaymentService, validator process.PaymentValidatorFunc, ) *WaitForCustomer
Inject dependencies
func (WaitForCustomer) IsFinal ¶
func (wc WaitForCustomer) IsFinal() bool
IsFinal if state is a final state
func (WaitForCustomer) Rollback ¶
func (wc WaitForCustomer) Rollback(ctx context.Context, _ process.RollbackData) error
Rollback the state operations