repository

package
v0.0.0-...-ffaedda Latest Latest
Warning

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

Go to latest
Published: Sep 2, 2022 License: Apache-2.0, MIT Imports: 15 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrInfrastructure = errors.New(`infrastructure`)

	ErrNoEvents = errors.New(`no new event into log`)
)

Functions

func Ack

func Ack(ctx context.Context, id int) error

func Close

func Close(ctx context.Context) error

func GetEvent

func GetEvent(ctx context.Context) (offset int, event schema.OrderEvent, err error)

func Init

func Init(cfg *config.Config) func(context.Context) error

func PersistOrder

func PersistOrder(ctx context.Context, orderID uuid.UUID, event domain.Event) (domain.Order, error)

Types

type Order

type Order struct {
	OrderID    pgtype.UUID
	CustomerID pgtype.UUID
	Items      pgtype.JSONB
	Price      *decimal.Decimal
	PaymentID  pgtype.UUID
	Kind       string
}

Jump to

Keyboard shortcuts

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