category

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: 3 Imported by: 0

Documentation

Overview

Package category represents abstraction of business layer category object

Index

Constants

View Source
const (
	ConstModelNameCategory           = "Category"
	ConstModelNameCategoryCollection = "CategoryCollection"

	ConstErrorModule = "category"
	ConstErrorLevel  = env.ConstErrorLevelModel
)

Package global constants

Variables

This section is empty.

Functions

This section is empty.

Types

type InterfaceCategory

type InterfaceCategory interface {
	GetEnabled() bool

	GetName() string

	GetParent() InterfaceCategory

	GetDescription() string

	GetImage() string

	GetProductIds() []string
	GetProductsCollection() product.InterfaceProductCollection
	GetProducts() []product.InterfaceProduct

	AddProduct(productID string) error
	RemoveProduct(productID string) error

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

InterfaceCategory represents interface to access business layer implementation of category object

func GetCategoryModel

func GetCategoryModel() (InterfaceCategory, error)

GetCategoryModel retrieves current InterfaceCategory model implementation

func GetCategoryModelAndSetID

func GetCategoryModelAndSetID(categoryID string) (InterfaceCategory, error)

GetCategoryModelAndSetID retrieves current InterfaceCategory model implementation and sets its ID to some value

func LoadCategoryByID

func LoadCategoryByID(categoryID string) (InterfaceCategory, error)

LoadCategoryByID loads category data into current InterfaceCategory model implementation

type InterfaceCategoryCollection

type InterfaceCategoryCollection interface {
	ListCategories() []InterfaceCategory

	models.InterfaceCollection
}

InterfaceCategoryCollection represents interface to access business layer implementation of category collection

func GetCategoryCollectionModel

func GetCategoryCollectionModel() (InterfaceCategoryCollection, error)

GetCategoryCollectionModel retrieves current InterfaceCategoryCollection model implementation

Jump to

Keyboard shortcuts

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