Documentation ¶
Index ¶
- Variables
- func CreateCategory(name string) (string, error)
- func CreateProduct(sku string, name string, price string, description string, categoryId string) error
- func DeleteCategory(id string) error
- func DeleteProduct(sku string) error
- func GetAllCategories() (categories []categories, err error)
- func GetAllProducts() (products []products, err error)
- func GetCategory(id string) (category categories, err error)
- func GetProduct(sku string) (name string, price string, description string, categoryId string, err error)
- func Initialize()
- func SetCategoriesStorageType(database string) categoryTable
- func SetProductsStorageType(database string) productTable
- func UpdateCategory(id string, name string) error
- func UpdateProduct(sku string, name string, price string, description string, categoryId string) error
Constants ¶
This section is empty.
Variables ¶
View Source
var ( MaxOpenConns int MaxIdleConns int ConnMaxLifetimeInMinutes int )
View Source
var (
Dsn string
)
Functions ¶
func CreateCategory ¶
func CreateProduct ¶
func DeleteCategory ¶
func DeleteProduct ¶
func GetAllCategories ¶
func GetAllCategories() (categories []categories, err error)
func GetAllProducts ¶
func GetAllProducts() (products []products, err error)
func GetCategory ¶
func GetProduct ¶
func Initialize ¶
func Initialize()
func SetCategoriesStorageType ¶
func SetCategoriesStorageType(database string) categoryTable
func SetProductsStorageType ¶
func SetProductsStorageType(database string) productTable
func UpdateCategory ¶
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.