# Functions
AddAddress godoc @Summary Add a new address to the user @Description Add a new address to the user @ID AddAddress @Accept json @Produce json @Param id path string true "User ID" @Param body body models.Address true "Address Object" @Success 200 {object} models.Address @Failure 400,404 {object} models.Error @Router /add-address?id={id} [post].
DeleteAddress godoc @Summary Delete the address of the user @Description Delete the address of the user @ID DeleteAddress @Accept json @Produce json @Param id path string true "User ID" @Success 200 {object} string "Successfully Deleted" @Failure 400,404 {object} models.Error @Router /delete-address?id={id} [delete].
EditHomeAddress godoc @Summary Edit the home address of the user @Description Edit the home address of the user @ID EditHomeAddress @Accept json @Produce json @Param id path string true "User ID" @Param body body models.Address true "Address Object" @Success 200 {object} models.Address @Failure 400,404 {object} models.Error @Router /edit-home-address?id={id} [post].
EditWorkAddress godoc @Summary Edit the work address of the user @Description Edit the work address of the user @ID EditWorkAddress @Accept json @Produce json @Param id path string true "User ID" @Param body body models.Address true "Address Object" @Success 200 {object} models.Address @Failure 400,404 {object} models.Error @Router /edit-work-address?id={id} [post].
GetItemFromCart returns the items in the cart of a user.
HashPassword godoc @Summary Generate a hashed password @Description Generate a hashed password using the bcrypt algorithm @param password string true "password to be hashed" @return string @return error @example
password := "password" hashedPassword, err := HashPassword(password) if err != nil { log.Panic(err) } fmt.Println(hashedPassword).
Login godoc @Summary Login user @Description Login user @Tags Auth @Accept json @Produce json @Param user body models.User true "User object" @Success 200 {object} models.User @Failure 400 {object} models.Error @Failure 500 {object} models.Error @Router /auth/login [post].
NewApplication initializes the application.
ProductViewerAdmin godoc @Summary Add a new product to the database @Description Adds a new product to the database @Tags Products @Accept json @Produce json @Param product body models.Product true "Product object" @Success 200 {object} models.Product @Failure 400 {object} models.Error @Failure 500 {object} models.Error @Router /product/admin [post].
SearchProduct godoc @Summary Search for products @Description Search for products based on the search query @Tags Products @Accept json @Produce json @Param name query string true "Search query" @Success 200 {array} models.Product @Failure 404 {object} models.Error @Failure 500 {object} models.Error @Router /product/search [get].
SearchProductByQuery godoc @Summary Search for products @Description Search for products based on the search query @Tags Products @Accept json @Produce json @Param name query string true "Search query" @Success 200 {array} models.Product @Failure 404 {object} models.Error @Failure 500 {object} models.Error @Router /product/search [get].
Signup godoc @Summary Signup user @Description Signup user @Tags Auth @Accept json @Produce json @Param user body models.User true "User object" @Success 201 {object} models.User @Failure 400 {object} models.Error @Failure 500 {object} models.Error @Router /auth/signup [post].
VerifyPassword godoc @Summary Verify user password @Description Verify user password @Tags Auth @Accept json @Produce json @Param user_password path string true "User password" @Param typed_pass path string true "User typed password" @Success 200 {boolean} true @Failure 400 {object} models.Error @Failure 500 {object} models.Error @Router /auth/verify_password/{user_password}/{typed_pass} [get].
# Variables
No description provided by the author
No description provided by the author
No description provided by the author
# Structs
No description provided by the author