 Documentation
      ¶
      Documentation
      ¶
    
    
  
    
  
    Index ¶
- Constants
- func NewProcessor(messageConsumer messages.Consumer, eventsVisitor EventsVisitor, ...) *messages.Processor[EventsVisitor]
- func NewRabbitMQProcessor(eventsVisitor EventsVisitor, queueName string, opts ...RabbitMQProcessorOpt) (*messages.Processor[EventsVisitor], error)
- type BeneficiaryAccount
- type EventsDeserializer
- type EventsVisitor
- type RabbitMQProcessorOpt
- type WithdrawalBeneficiary
- type WithdrawalCreatedEvent
- func (w WithdrawalCreatedEvent) Accept(ctx context.Context, visitor EventsVisitor) errors.ProcessingError
- func (w WithdrawalCreatedEvent) CorrelationID() string
- func (w WithdrawalCreatedEvent) DataContentType() string
- func (w WithdrawalCreatedEvent) ID() string
- func (w WithdrawalCreatedEvent) Serialize() ([]byte, error)
- func (w WithdrawalCreatedEvent) Type() string
 
Constants ¶
      View Source
      
  
const ( RabbitMQExchangeName = "payments" RabbitMQExchangeType = "topic" RabbitMQRoutingKey = "payments.events" )
Variables ¶
This section is empty.
Functions ¶
func NewProcessor ¶
func NewProcessor(messageConsumer messages.Consumer, eventsVisitor EventsVisitor, opts ...messages.ProcessorOpt) *messages.Processor[EventsVisitor]
NewProcessor returns a messages.Processor which is specific to payments events
func NewRabbitMQProcessor ¶
func NewRabbitMQProcessor( eventsVisitor EventsVisitor, queueName string, opts ...RabbitMQProcessorOpt, ) (*messages.Processor[EventsVisitor], error)
Types ¶
type BeneficiaryAccount ¶
type EventsDeserializer ¶
type EventsDeserializer struct {
}
    func NewEventsDeserializer ¶
func NewEventsDeserializer() *EventsDeserializer
func (*EventsDeserializer) Deserialize ¶
func (d *EventsDeserializer) Deserialize(rawPayload []byte) (events.Event[EventsVisitor], error)
type EventsVisitor ¶
type EventsVisitor interface {
	VisitWithdrawalCreated(ctx context.Context, withdrawalCreated WithdrawalCreatedEvent) errors.ProcessingError
}
    type RabbitMQProcessorOpt ¶ added in v0.0.5
type RabbitMQProcessorOpt struct {
	ProcessorOpt        messages.ProcessorOpt
	RabbitmqConsumerOpt rabbitmq.ConsumerOpt
}
    type WithdrawalBeneficiary ¶
type WithdrawalBeneficiary struct {
	Id          string             `json:"id"`
	Description string             `json:"description"`
	Account     BeneficiaryAccount `json:"account"`
}
    type WithdrawalCreatedEvent ¶
type WithdrawalCreatedEvent struct {
	Id          string                `json:"id"`
	UserId      string                `json:"user_id"`
	PspId       string                `json:"psp_id"`
	ExternalId  string                `json:"external_id"`
	Amount      float64               `json:"amount"`
	Currency    string                `json:"currency"`
	Status      string                `json:"status"`
	Beneficiary WithdrawalBeneficiary `json:"beneficiary"`
	// contains filtered or unexported fields
}
    func (WithdrawalCreatedEvent) Accept ¶
func (w WithdrawalCreatedEvent) Accept(ctx context.Context, visitor EventsVisitor) errors.ProcessingError
func (WithdrawalCreatedEvent) CorrelationID ¶ added in v0.0.5
func (w WithdrawalCreatedEvent) CorrelationID() string
func (WithdrawalCreatedEvent) DataContentType ¶
func (w WithdrawalCreatedEvent) DataContentType() string
func (WithdrawalCreatedEvent) ID ¶
func (w WithdrawalCreatedEvent) ID() string
func (WithdrawalCreatedEvent) Serialize ¶
func (w WithdrawalCreatedEvent) Serialize() ([]byte, error)
func (WithdrawalCreatedEvent) Type ¶
func (w WithdrawalCreatedEvent) Type() string
 Click to show internal directories. 
   Click to hide internal directories.