storage

package
v0.0.0-...-b25ac0e Latest Latest
Warning

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

Go to latest
Published: Nov 16, 2023 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	MaxOpenConns             int
	MaxIdleConns             int
	ConnMaxLifetimeInMinutes int
)
View Source
var (
	Dsn string
)

Functions

func CreateCategory

func CreateCategory(name string) (string, error)

func CreateProduct

func CreateProduct(sku string, name string, price string, description string, categoryId string) error

func DeleteCategory

func DeleteCategory(id string) error

func DeleteProduct

func DeleteProduct(sku string) error

func GetAllCategories

func GetAllCategories() (categories []categories, err error)

func GetAllProducts

func GetAllProducts() (products []products, err error)

func GetCategory

func GetCategory(id string) (category categories, err error)

func GetProduct

func GetProduct(sku string) (name string, price string, description string, categoryId string, err error)

func Initialize

func Initialize()

func SetCategoriesStorageType

func SetCategoriesStorageType(database string) categoryTable

func SetProductsStorageType

func SetProductsStorageType(database string) productTable

func UpdateCategory

func UpdateCategory(id string, name string) error

func UpdateProduct

func UpdateProduct(sku string, name string, price string, description string, categoryId string) error

Types

This section is empty.

Jump to

Keyboard shortcuts

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