server

package
v0.0.0-...-876f98b Latest Latest
Warning

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

Go to latest
Published: May 22, 2021 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CreateEchoServer

func CreateEchoServer() (*echo.Echo, error)

CreateEchoServer creates an echo server with inventory api implementation

Types

type InventoryAPI

type InventoryAPI struct {
	Store store.Store
}

InventoryAPI implements api.ServerInterface and holds a store

func NewInventoryAPI

func NewInventoryAPI() *InventoryAPI

func (*InventoryAPI) GetInventory

func (ia *InventoryAPI) GetInventory(ctx echo.Context) error

GetInventory converts echo context to params and calls store get inventory

func (*InventoryAPI) ListProductStocks

func (ia *InventoryAPI) ListProductStocks(ctx echo.Context) error

ListProductStocks converts echo context to params and calls Store List Product Stocks

func (*InventoryAPI) ListProducts

func (ia *InventoryAPI) ListProducts(ctx echo.Context) error

ListProducts converts echo context to params and calls store list products

func (*InventoryAPI) SellFromInventory

func (ia *InventoryAPI) SellFromInventory(ctx echo.Context) error

SellFromInventory converts echo context to params and calls Store Sell Products

func (*InventoryAPI) UpsertInventory

func (ia *InventoryAPI) UpsertInventory(ctx echo.Context) error

UpsertInventory converts echo context to params and calls store upsert inventory

func (*InventoryAPI) UpsertProducts

func (ia *InventoryAPI) UpsertProducts(ctx echo.Context) error

UpsertProducts converts echo context to params and calls store upsert products

Jump to

Keyboard shortcuts

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