controllers

package
v0.0.0-...-27146e7 Latest Latest
Warning

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

Go to latest
Published: May 21, 2023 License: BSL-1.0 Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AddCommentHandler

func AddCommentHandler(w http.ResponseWriter, r *http.Request)

func AddProductHandler

func AddProductHandler(w http.ResponseWriter, r *http.Request)

--------Publishing---------------------------

func BuyHandler

func BuyHandler(w http.ResponseWriter, r *http.Request)

func CommentHandler

func CommentHandler(w http.ResponseWriter, r *http.Request)

func Data_info

func Data_info(w http.ResponseWriter, r *http.Request)

func EditProfile

func EditProfile(w http.ResponseWriter, r *http.Request)

func HandlerRequest

func HandlerRequest()

--------HandlerRequest-------------------

func Home_page

func Home_page(w http.ResponseWriter, r *http.Request)

func InsertProductHandler

func InsertProductHandler(w http.ResponseWriter, r *http.Request)

func Login

func Login(w http.ResponseWriter, r *http.Request)

---------------Login----------------------------------

func LoginAuth

func LoginAuth(w http.ResponseWriter, r *http.Request)

--------------Loginaut----------------------------

func Logout

func Logout(w http.ResponseWriter, r *http.Request)

-------------Logout-------------------------

func Profile

func Profile(w http.ResponseWriter, r *http.Request)

func Register

func Register(w http.ResponseWriter, r *http.Request)

func RegisterAuth

func RegisterAuth(w http.ResponseWriter, r *http.Request)

------------RegisterAuth------------------------

func SuccessHandler

func SuccessHandler(w http.ResponseWriter, r *http.Request)

func UpdateProfile

func UpdateProfile(w http.ResponseWriter, r *http.Request)

func ValidateEditProfileForm

func ValidateEditProfileForm(fname, lname, email, password string) error

func ValidateRegistrationForm

func ValidateRegistrationForm(fname, lname, email, password string) error

func Welcome

func Welcome(w http.ResponseWriter, r *http.Request)

Types

type Commenting

type Commenting struct {
	ID        int
	Comment   string
	ProductID int
}

--------Comment---------------------------

type DataInfo

type DataInfo struct {
	Users      []User
	Products   []Product
	Commenting []Commenting
}

--------DataInfo-------------------

type HomePageData

type HomePageData struct {
	User     User
	Products []Product
}

type Product

type Product struct {
	ID          int
	Name        string
	Description string
	Price       float64
	Rating      float64
	Comments    []Commenting
	Quantity    int
}

type Rating

type Rating struct {
	ID        int
	ProductID int
	Rating    float64
}

type User

type User struct {
	ID        int
	FirstName string
	LastName  string
	Email     string
}

type UserInfo

type UserInfo struct {
	FirstName string
	LastName  string
	Email     string
}

--------Profile---------------------------

Jump to

Keyboard shortcuts

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