dto

package
v0.0.3 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Mar 13, 2024 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Failed

type Failed struct {
	Name   string
	Reason process.FailedReason
}

Failed state

func (*Failed) MapFrom

func (s *Failed) MapFrom(pctx process.Context)

MapFrom the internal process state to the graphQL state fields

type FormParameter

type FormParameter struct {
	Key   string
	Value []string
}

FormParameter holds redirect related form data

type PaymentRequestAPI

type PaymentRequestAPI struct {
	MethodData            string
	Details               string
	Options               string
	MerchantValidationURL *string
	CompleteURL           string
}

PaymentRequestAPI holds all data needed to create a PaymentRequest

type PlaceOrderContext

type PlaceOrderContext struct {
	Cart       *dto.DecoratedCart
	OrderInfos *PlacedOrderInfos
	State      State
	UUID       string
}

PlaceOrderContext infos

type PlacedOrderInfos

type PlacedOrderInfos struct {
	PaymentInfos        []application.PlaceOrderPaymentInfo
	PlacedOrderInfos    []placeorder.PlacedOrderInfo
	Email               string
	PlacedDecoratedCart *dto.DecoratedCart
}

PlacedOrderInfos infos

type PostRedirect

type PostRedirect struct {
	Name       string
	URL        string
	Parameters []FormParameter
}

PostRedirect state

func (*PostRedirect) MapFrom

func (s *PostRedirect) MapFrom(pctx process.Context)

MapFrom the internal process state to the graphQL state fields

type Redirect

type Redirect struct {
	Name string
	URL  string
}

Redirect state

func (*Redirect) MapFrom

func (s *Redirect) MapFrom(pctx process.Context)

MapFrom the internal process state to the graphQL state fields

type ShowHTML

type ShowHTML struct {
	Name string
	HTML string
}

ShowHTML state

func (*ShowHTML) MapFrom

func (s *ShowHTML) MapFrom(pctx process.Context)

MapFrom the internal process state to the graphQL state fields

type ShowIframe

type ShowIframe struct {
	Name string
	URL  string
}

ShowIframe state

func (*ShowIframe) MapFrom

func (s *ShowIframe) MapFrom(pctx process.Context)

MapFrom the internal process state to the graphQL state fields

type ShowWalletPayment

type ShowWalletPayment struct {
	Name              string
	PaymentMethod     string
	PaymentRequestAPI PaymentRequestAPI
}

ShowWalletPayment state

func (*ShowWalletPayment) MapFrom

func (s *ShowWalletPayment) MapFrom(pctx process.Context)

MapFrom the internal process state to the graphQL state fields

type StartPlaceOrderResult

type StartPlaceOrderResult struct {
	UUID string
}

StartPlaceOrderResult result of start place order

type State

type State interface {
	MapFrom(process.Context)
}

State representation for graphql

type StateMapper

type StateMapper struct {
	// contains filtered or unexported fields
}

StateMapper to create dto states from context states

func (*StateMapper) Inject

func (sm *StateMapper) Inject(stateProvider StateProvider) *StateMapper

Inject dependencies

func (*StateMapper) Map

func (sm *StateMapper) Map(pctx process.Context) (State, error)

Map a context into a state

type StateProvider

type StateProvider func() map[string]State

StateProvider returns a state instance

type Success

type Success struct {
	Name string
}

Success state

func (*Success) MapFrom

func (s *Success) MapFrom(pctx process.Context)

MapFrom the internal process state to the graphQL state fields

type TriggerClientSDK

type TriggerClientSDK struct {
	Name string
	URL  string
	Data string
}

TriggerClientSDK state

func (*TriggerClientSDK) MapFrom

func (t *TriggerClientSDK) MapFrom(pctx process.Context)

MapFrom the internal process state to the graphQL state fields

type Wait

type Wait struct {
	Name string
}

Wait state

func (*Wait) MapFrom

func (s *Wait) MapFrom(pctx process.Context)

MapFrom the internal process state to the graphQL state fields

type WaitForCustomer

type WaitForCustomer struct {
	Name string
}

WaitForCustomer state

func (*WaitForCustomer) MapFrom

func (s *WaitForCustomer) MapFrom(pctx process.Context)

MapFrom the internal process state to the graphQL state fields

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL