db

package
v0.0.0-...-595e988 Latest Latest
Warning

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

Go to latest
Published: Jul 2, 2023 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AddNewUserToDB

func AddNewUserToDB(username, password, email string) bool

func CheckIfUserIsAdmin

func CheckIfUserIsAdmin(id int) bool

func CreateGoodsInDB

func CreateGoodsInDB(label string, price int, desc string, image_link string, idcat int, arrtag []int) bool

func DeleteGoodsFromCartById

func DeleteGoodsFromCartById(userId int, goodsId int) bool

func FetchUsernameAndLoginFromDB

func FetchUsernameAndLoginFromDB(username, password string) (bool, int)

func GetAllGoodsFromDB

func GetAllGoodsFromDB() []model.Goods

func GetEmailByUsername

func GetEmailByUsername(username string) string

func GetGoodsByCategoryFromDB

func GetGoodsByCategoryFromDB(idcat int) []model.Goods

func GetGoodsByIdFromDB

func GetGoodsByIdFromDB(id int, idcat int) model.Goods

func GetGoodsFromCartByUserId

func GetGoodsFromCartByUserId(userId int) []int

func InsertGoodsByIdIntoUsersCartById

func InsertGoodsByIdIntoUsersCartById(goodsId, userId int) bool

Types

This section is empty.

Jump to

Keyboard shortcuts

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