sqs

package
v0.0.0-...-b76e94b Latest Latest
Warning

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

Go to latest
Published: Aug 9, 2024 License: MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Consumer

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

func NewConsumer

func NewConsumer(s *sqs.Service, h Handler, l *slog.Logger) *Consumer

func (*Consumer) Start

func (c *Consumer) Start(ctx context.Context, wg *sync.WaitGroup)

type Handler

type Handler interface {
	Handle(ctx context.Context, b []byte) error
}

type MessageBody

type MessageBody struct {
	Type      string
	MessageId string
	TopicArn  string
	Message   string
	Timestamp string
}

type OrderStatusUpdateHandler

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

func (*OrderStatusUpdateHandler) Handle

func (f *OrderStatusUpdateHandler) Handle(ctx context.Context, b []byte) error

type OrderStatusUpdateMessage

type OrderStatusUpdateMessage struct {
	OrderId int              `json:"order_id"`
	Status  enum.StatusOrder `json:"status"`
}

type PaymentStatusUpdateHandler

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

func (*PaymentStatusUpdateHandler) Handle

func (f *PaymentStatusUpdateHandler) Handle(ctx context.Context, b []byte) error

type PaymentStatusUpdateMessage

type PaymentStatusUpdateMessage struct {
	OrderId int                `json:"order_id"`
	Status  enum.PaymentStatus `json:"status"`
}

Jump to

Keyboard shortcuts

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