stock

package
v1.4.5-alpha1 Latest Latest
Warning

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

Go to latest
Published: Apr 30, 2019 License: MPL-2.0 Imports: 2 Imported by: 0

Documentation

Overview

Package product represents abstraction of business layer product object

Index

Constants

View Source
const (
	ConstModelNameStock           = "Stock"
	ConstModelNameStockCollection = "StockCollection"

	ConstErrorModule = "stock"
	ConstErrorLevel  = env.ConstErrorLevelModel
)

Package global constants

Variables

This section is empty.

Functions

This section is empty.

Types

type InterfaceStock

type InterfaceStock interface {
	GetProductID() string
	GetOptions() string
	GetQty() int

	SetProductID(product_id string) error
	SetOptions(options string) error
	SetQty(qty int) error

	SetProductQty(productID string, options map[string]interface{}, qty int) error
	GetProductQty(productID string, options map[string]interface{}) int
	GetProductOptions(productID string) []map[string]interface{}

	RemoveProductQty(productID string, options map[string]interface{}) error
	UpdateProductQty(productID string, options map[string]interface{}, deltaQty int) error

	models.InterfaceModel
	models.InterfaceObject
	models.InterfaceStorable
	models.InterfaceListable
}

InterfaceStock represents interface to access business layer implementation of stock management

func GetStockModel

func GetStockModel() (InterfaceStock, error)

GetBlogPostModel retrieves current InterfaceBlogPost model implementation

type InterfaceStockCollection

type InterfaceStockCollection interface {
	ListStocks() []InterfaceStock

	models.InterfaceCollection
}

InterfaceStockCollection represents interface to access business layer implementation of stock collection

func GetStockCollectionModel

func GetStockCollectionModel() (InterfaceStockCollection, error)

GetProductCollectionModel retrieves current InterfaceProductCollection model implementation

Jump to

Keyboard shortcuts

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