service

package
v0.0.0-...-e1e387d Latest Latest
Warning

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

Go to latest
Published: Dec 18, 2024 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type InventoryService

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

func (*InventoryService) CheckAvailability

func (s *InventoryService) CheckAvailability(ctx context.Context, productID int, quantity uint) (bool, error)

func (*InventoryService) CreateInventoryItem

func (s *InventoryService) CreateInventoryItem(ctx context.Context, productID int, quantity int) (*model.InventoryItem, error)

func (*InventoryService) DecrementInventory

func (s *InventoryService) DecrementInventory(ctx context.Context, productID int, quantity uint) error

func (*InventoryService) GetInventoryByProductID

func (s *InventoryService) GetInventoryByProductID(ctx context.Context, productID int) (*model.InventoryItem, error)

func (*InventoryService) IncrementInventory

func (s *InventoryService) IncrementInventory(ctx context.Context, productID int, quantity uint) error

func (*InventoryService) Listen

func (s *InventoryService) Listen(ctx context.Context, topic events.Topic, key events.RoutingKey) error

func (*InventoryService) Publish

Jump to

Keyboard shortcuts

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