brand

package
v1.3.0 Latest Latest
Warning

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

Go to latest
Published: Oct 16, 2022 License: GPL-3.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DeleteBrand added in v1.0.0

func DeleteBrand(id primitive.ObjectID) error

Delete brand from DB

func ModifyBrand added in v1.0.0

func ModifyBrand(id primitive.ObjectID, nb Brand) error

modify brand in DB

func SaveBrand added in v1.0.0

func SaveBrand(b Brand) (primitive.ObjectID, error)

Add brand to db

Types

type Brand

type Brand struct {
	Id   primitive.ObjectID `bson:"_id,omitempty" json:"Id"`
	Name string             `bson:"Name" json:"Name"`
}

An item may or may not be * assigned to a brand * * brands can be used to group products * to perform certain actions

func GetBrands added in v0.0.2

func GetBrands(filter bson.M) ([]Brand, error)

GetBrands queries the database and * returns brands based on the given filter * if filter is nil every brand is returned

Jump to

Keyboard shortcuts

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