handler

package
Version: v0.0.0-...-4ba18c8 Latest Latest
Warning

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

Go to latest
Published: Dec 11, 2020 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var OpenDB *gorm.DB = db.Database()

OpenDB declare the database

Functions

func AddACustomer

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

AddACustomer adds a new customer POST /addcustomer

func AddAFoodItem

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

AddAFoodItem adds a new food Item POST /addfooditem

func AddAOrder

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

AddAOrder adds a new order POST /addorder

func AddARestaurant

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

AddARestaurant adds a new restaurant POST /addrestaurant

func DeleteACustomer

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

DeleteACustomer drop customer DELETE /dropcustomer/{id}

func DeleteAFoodItem

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

DeleteAFoodItem drop food Item DELETE /dropfooditem/{id}

func DeleteAOrder

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

DeleteAOrder drop order DELETE /droporder/{id}

func DeleteARestaurant

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

DeleteARestaurant drop restaurant DELETE /droprestaurant/{id}

func GetACustomer

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

GetACustomer returns customer GET /getcustomer/{id}

func GetAFoodItem

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

GetAFoodItem returns food Item GET /getfooditem/{id}

func GetAOrder

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

GetAOrder returns order GET /getorder/{id}

func GetARestaurant

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

GetARestaurant returns restaurant GET /getrestaurant/{id}

func GetCustomers

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

GetCustomers returns customers GET /getcustomers

func GetFoodItems

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

GetFoodItems returns food Item GET /getfooditems

func GetOrders

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

GetOrders returns orders GET /getorders

func GetRestaurants

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

GetRestaurants returns restaurants GET /getrestaurants

func UpdateACustomer

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

UpdateACustomer update customer PUT /updatecustomer/{id}

func UpdateAFoodItem

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

UpdateAFoodItem update food Item PUT /updatefooditem/{id}

func UpdateAOrder

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

UpdateAOrder update order PUT /updateorder/{id}

func UpdateARestaurant

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

UpdateARestaurant update restaurant PUT /updaterestaurant/{id}

Types

type Customers

type Customers struct {
	gorm.Model
	CusID string
	FName string
	LName string
	Phone string
	Mail  string
}

Customers defines the properties of a customers

type FoodItems

type FoodItems struct {
	gorm.Model
	ItmID   string
	ResID   string
	Name    string
	ItmKind string

	ImgURL string
	// contains filtered or unexported fields
}

FoodItems defines the properties of a fooditems

type Orders

type Orders struct {
	gorm.Model
	CusID   string
	OrdID   string
	ResID   string
	NoItems string
	// contains filtered or unexported fields
}

Orders defines the properties of a orders

type Restaurants

type Restaurants struct {
	gorm.Model
	ResID    string
	Name     string
	Phone    string
	Location string
	ImgURL   string
}

Restaurants defines the properties of a restaurants

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
t or T : Toggle theme light dark auto
y or Y : Canonical URL