controller

package
v0.0.0-...-5b3ac6b Latest Latest
Warning

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

Go to latest
Published: Dec 27, 2023 License: MIT Imports: 21 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var CancelReason = []string{"CANCEL_FROM_MERCHANT", "CANCEL_FROM_CUSTOMER", "CANCEL_FROM_ADMIN"}

Functions

func AccpetOrderByDriver

func AccpetOrderByDriver(c *gin.Context)

func AddMenuImages

func AddMenuImages(c *gin.Context)

func AssignOrderToDriver

func AssignOrderToDriver(c *gin.Context)

func CancelOrder

func CancelOrder(c *gin.Context)

func ChangeCustomerDevice

func ChangeCustomerDevice(c *gin.Context)

func ChangeCustomerEmail

func ChangeCustomerEmail(c *gin.Context)

func ChangeCustomerPassword

func ChangeCustomerPassword(c *gin.Context)

func ChangeCustomerProfile

func ChangeCustomerProfile(c *gin.Context)

func ChangeCustomerWebhooks

func ChangeCustomerWebhooks(c *gin.Context)

func ChangeDriverDevice

func ChangeDriverDevice(c *gin.Context)

func ChangeDriverEmail

func ChangeDriverEmail(c *gin.Context)

func ChangeDriverLocation

func ChangeDriverLocation(c *gin.Context)

func ChangeDriverPassword

func ChangeDriverPassword(c *gin.Context)

func ChangeDriverPhone

func ChangeDriverPhone(c *gin.Context)

func ChangeDriverProfile

func ChangeDriverProfile(c *gin.Context)

func ChangeDriverWebhooks

func ChangeDriverWebhooks(c *gin.Context)

func ChangeMerchantDevice

func ChangeMerchantDevice(c *gin.Context)

func ChangeMerchantPassword

func ChangeMerchantPassword(c *gin.Context)

func ChangeMerchantPhone

func ChangeMerchantPhone(c *gin.Context)

func ChangeMerchantProfile

func ChangeMerchantProfile(c *gin.Context)

func ChangeMerchantWebhooks

func ChangeMerchantWebhooks(c *gin.Context)

func ChangeOrderStatus

func ChangeOrderStatus(stage string) gin.HandlerFunc

func CompleteSignUp

func CompleteSignUp(c *gin.Context)

func CreateMenu

func CreateMenu(c *gin.Context)

func CreateReview

func CreateReview(c *gin.Context)

func CustomerEmailLogin

func CustomerEmailLogin(c *gin.Context)

func DeleteCustomer

func DeleteCustomer(c *gin.Context)

func DeleteDriver

func DeleteDriver(c *gin.Context)

func DeleteMenu

func DeleteMenu(c *gin.Context)

func DeleteMerchant

func DeleteMerchant(c *gin.Context)

func DeleteReview

func DeleteReview(c *gin.Context)

func DriverEmailLogin

func DriverEmailLogin(c *gin.Context)

func DropOrderByDriver

func DropOrderByDriver(c *gin.Context)

func FilterMerchants

func FilterMerchants(c *gin.Context)

func GetAllCustomers

func GetAllCustomers(c *gin.Context)

func GetAllDrivers

func GetAllDrivers(c *gin.Context)

func GetAllMerchants

func GetAllMerchants(c *gin.Context)

func GetAllOrders

func GetAllOrders(c *gin.Context)

func GetAllReview

func GetAllReview(c *gin.Context)

func GetCustomer

func GetCustomer(c *gin.Context)

func GetDriver

func GetDriver(c *gin.Context)

func GetDrivesByLocation

func GetDrivesByLocation(c *gin.Context)

func GetListDrivers

func GetListDrivers(c *gin.Context)

func GetMenu

func GetMenu(c *gin.Context)

func GetMenuFromMerchant

func GetMenuFromMerchant(c *gin.Context)

func GetMenus

func GetMenus(c *gin.Context)

func GetMerchant

func GetMerchant(c *gin.Context)

func GetMerchantByLocation

func GetMerchantByLocation(c *gin.Context)

func GetOrderByCustomer

func GetOrderByCustomer(c *gin.Context)

func GetOrderByDriver

func GetOrderByDriver(c *gin.Context)

func GetOrderByLocation

func GetOrderByLocation(c *gin.Context)

func GetOrderByMerchant

func GetOrderByMerchant(c *gin.Context)

func GetOrderByid

func GetOrderByid(c *gin.Context)

func GetReviewById

func GetReviewById(c *gin.Context)

func GetReviewToInstace

func GetReviewToInstace(Type string) gin.HandlerFunc

func GetUserReviews

func GetUserReviews(c *gin.Context)

func GoogleCallBack

func GoogleCallBack(c *gin.Context)

GoogleCallBack function after SiginWithGoogle or SiginUpWithGoogle

func MerchantOrderAccept

func MerchantOrderAccept(c *gin.Context)

func MerchantPhoneLogin

func MerchantPhoneLogin(c *gin.Context)

func MultiSearch

func MultiSearch(c *gin.Context)

func OrderIsDelivered

func OrderIsDelivered(c *gin.Context)

func PlaceOrder

func PlaceOrder(c *gin.Context)

func RejectOrderByMerchant

func RejectOrderByMerchant(c *gin.Context)
func Search(c *gin.Context)

func SetupConfig

func SetupConfig() *oauth2.Config

func SiginWithGoogle

func SiginWithGoogle(c *gin.Context)

func SignUpCustomerWithEmail

func SignUpCustomerWithEmail(c *gin.Context)

func SignUpDriverWithEmail

func SignUpDriverWithEmail(c *gin.Context)

func SignUpMerchant

func SignUpMerchant(c *gin.Context)

func UpdateCustomer

func UpdateCustomer(c *gin.Context)

func UpdateDriver

func UpdateDriver(c *gin.Context)

func UpdateMenu

func UpdateMenu(c *gin.Context)

func UpdateMerchant

func UpdateMerchant(c *gin.Context)

func UpdateReview

func UpdateReview(c *gin.Context)

func UploadFile

func UploadFile(c *gin.Context)

func VerifyOtpEmail

func VerifyOtpEmail(c *gin.Context)

func VerifyOtpPhone

func VerifyOtpPhone(c *gin.Context)

Types

type AccOrderMerchantBody

type AccOrderMerchantBody struct {
	OrderId    string `json:"order_id"`
	MerchantId string `json:"merchant_id"`
}

type ChangeEmaildBody

type ChangeEmaildBody struct {
	OldEmail string `json:"old_email"`
	NewEmail string `json:"new_email"`
}

type ChangePasswordBody

type ChangePasswordBody struct {
	NewPassword string `json:"new_password"`
	OldPassword string `json:"old_password"`
}

type ChangePhonedBody

type ChangePhonedBody struct {
	NewPhone string `json:"new_phone"`
	OldPhone string `json:"old_phone"`
}

type CustomerBody

type CustomerBody struct {
	GivenName  string `json:"given_name"`
	FamilyName string `json:"family_name"`
	Address    string `json:"address"`
	Phone      string `json:"phone"`
}

type DriverBody

type DriverBody struct {
	Age       string `json:"age"`
	GivenName string `json:"given_name"`
	Address   string `json:"address"`
}

type EmailLoginBody

type EmailLoginBody struct {
	Email    string `json:"email"`
	Password string `json:"password"`
	DeviceId string `json:"device_id"`
	Kind     string `json:"kind"`
}

type Filter

type Filter struct {
	On bool `json:"on"`
}

type FilterMerchantsBody

type FilterMerchantsBody struct {
	Location [2]float64 `json:"location"`
	Near     int        `json:"near"`
	Popular  bool       `json:"popular"`
	Rate     float32    `json:"rate"`
}

type Item

type Item struct {
	ItemExternalId string `json:"item_external_id"`
	Quantity       uint   `json:"quantity"`
}
type MenuBody struct {
	Title        string        `json:"title" bson:"title"`             // Burger
	Description  string        `json:"description" bson:"description"` // Chicken fries contains
	Status       string        `json:"status" bson:"status"`           // available , unavailable , banned
	Category     string        `json:"category" bson:"category"`       // fast food , drink ,                     // Images of the product urls
	Price        uint          `json:"price" bson:"price"`             // the price of the product is represented as cents 99 = $0.99
	Attributes   db.Attributes `json:"attributes" bson:"attributes"`
	Reciepe      []string      `json:"reciepe" bson:"reciepe"`
	EstimateTime int           `json:"estimate_time"`
	Images       []string      `json:"images"`
}

type MerchantBody

type MerchantBody struct {
	Location           []float64       `json:"location"`
	Address            string          `json:"address"`
	BusinessEmail      string          `json:"business_email"`
	TimeOperationStart float32         `json:"time_operation_start"`
	TimeOperationEnd   float32         `json:"time_operation_end"`
	BusinessName       string          `json:"business_name"`
	ActiveDays         []db.ActiveDays `json:"active_days"`
}

type PhoneLoginBody

type PhoneLoginBody struct {
	Email    string `json:"email"`
	Password string `json:"password"`
}

type PlaceOrderBody

type PlaceOrderBody struct {
	Items              []Item    `json:"items"`
	DropOffPhone       string    `json:"dropoff_phone" `
	DropOffExteranlId  string    `json:"dropoff_external_id"`
	DropOffContactName string    `json:"dropoff_contact_name"`
	DropOffAddress     string    `json:"dropoff_address"`  // address 901 Market Street 6th Floor San Francisco, CA 94103
	DroOffLocation     []float64 `json:"dropoff_location"` // location cordinates. float([123.1312343,-37.2144343])
	DropOffInstruction string    `json:"dropoff_instructions"`
	PickUpExternalId   string    `json:"pickup_external_id"`
	Type               string    `json:"type"`
}

type ReviewBody

type ReviewBody struct {
	OrderId    string   `json:"order_id"`
	Rate       uint     `json:"rate"`
	Message    string   `json:"message"`
	ExternalId string   `json:"external_id"`
	From       string   `json:"from"`
	Options    []string `json:"options"`
}

type ReviewExternalBody

type ReviewExternalBody struct {
}

type SignUpMerchantBody

type SignUpMerchantBody struct {
	BusinessEmail string    `json:"business_email" binding:"required"`
	BusinessName  string    `json:"business_name" binding:"required"`
	Password      string    `json:"password" binding:"required"`
	Location      []float64 `json:"location" binding:"required"`
}

type SignUpWithDriverBody

type SignUpWithDriverBody struct {
	Name     string `json:"name"`
	Email    string `json:"email"`
	Password string `json:"password"`
}

type SignUpWithEmailBody

type SignUpWithEmailBody struct {
	Email    string `json:"email" `
	Password string `json:"password"`
}

Jump to

Keyboard shortcuts

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