usecase

package
v0.0.0-...-d386c04 Latest Latest
Warning

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

Go to latest
Published: Feb 4, 2024 License: BSD-3-Clause Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ValidateWarehousePutInAttempt

func ValidateWarehousePutInAttempt(prefix string, attempt *entities.Attempt) error

func ValidateWarehousePutInMessage

func ValidateWarehousePutInMessage(prefix string, message *entities.Message) error

func ValidateWarehousePutInRequest

func ValidateWarehousePutInRequest(prefix string, request *entities.Request) error

func ValidateWarehousePutInResponse

func ValidateWarehousePutInResponse(prefix string, response *entities.Response) error

Types

type Storage

type Storage interface {
	Warehouse() Warehouse
}

func New

func New(
	conf *config.Config,
	logger logging.Logger,
	infra *infrastructure.Infrastructure,
	repositories repositories.Repositories,
) Storage

type Warehouse

type Warehouse interface {
	Put(ctx context.Context, in *WarehousePutIn) (*WarehousePutOut, error)
}

type WarehousePutIn

type WarehousePutIn struct {
	BatchSize int
	Messages  map[string]*entities.Message
	Requests  map[string]*entities.Request
	Responses map[string]*entities.Response
	Attempts  map[string]*entities.Attempt
}

func (*WarehousePutIn) Count

func (in *WarehousePutIn) Count() int

func (*WarehousePutIn) Validate

func (in *WarehousePutIn) Validate() error

type WarehousePutOut

type WarehousePutOut struct {
	Success []string
	Error   map[string]error
}

Jump to

Keyboard shortcuts

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