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: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

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