order

package
v0.0.0-...-0642f7a Latest Latest
Warning

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

Go to latest
Published: Jun 12, 2024 License: MIT Imports: 15 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Fn

type Fn func() error

type Handler

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

func NewHandler

func NewHandler(
	dbRepositoryDynamo *db.DBRepositoryDynamo,
	lockerDynamo *locker.LockerDynamo,
	repositoryPayment RepositoryPayment,
	repositorySku RepositorySku,
) *Handler

type RepositoryOrder

type RepositoryOrder interface {
	Get(ctx context.Context, order *order) error
	List(ctx context.Context, order *orderlist, pagination db.Pagination) (int32, string, error)
	Insert(ctx context.Context, order *order) error
	Update(ctx context.Context, order *order) error
}

type RepositoryOrderDynamo

type RepositoryOrderDynamo struct {
	*db.DBRepositoryDynamo
}

func (RepositoryOrderDynamo) Get

func (r RepositoryOrderDynamo) Get(ctx context.Context, order *order) error

func (RepositoryOrderDynamo) Insert

func (r RepositoryOrderDynamo) Insert(ctx context.Context, order *order) error

func (RepositoryOrderDynamo) List

func (r RepositoryOrderDynamo) List(ctx context.Context, order *orderlist, pagination db.Pagination) (int32, string, error)

func (RepositoryOrderDynamo) Update

func (r RepositoryOrderDynamo) Update(ctx context.Context, order *order) error

type RepositoryOrderLocker

type RepositoryOrderLocker interface {
	TryLock(context.Context, *order) (func() error, error)
}

type RepositoryOrderLockerDynamo

type RepositoryOrderLockerDynamo struct {
	*locker.LockerDynamo
}

func (RepositoryOrderLockerDynamo) TryLock

func (r RepositoryOrderLockerDynamo) TryLock(ctx context.Context, order *order) (func() error, error)

type RepositorySku

type RepositorySku interface {
	Get(context.Context, *skupb.GetRequest) (*skupb.GetResponse, error)
	GetWithLock(context.Context, *skupb.GetRequest) (*skupb.GetResponse, func() error, Fn, error)
}

Jump to

Keyboard shortcuts

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