Documentation
¶
Overview ¶
Package category represents abstraction of business layer category object
Index ¶
Constants ¶
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