Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func FindDriver ¶
func FindDriver(driver driverInterface.DriverInterfacce, cityInterface cityInterface.CityInterfacce) http.Handler
func InsertDriver ¶
func InsertDriver(driver driverInterface.DriverInterfacce) http.Handler
func UpdateDriver ¶
func UpdateDriver(m *sync.Mutex, driver driverInterface.DriverInterfacce, cityInterface cityInterface.CityInterfacce) http.Handler
find specific driver with their ID or name. if the desired data didn't exist then insert new data
Types ¶
type DriverRequest ¶
type DriverRequest struct { Lat float64 `request:"latitude,required"` Lon float64 `request:"longitude,required"` City string `request:"city,required"` Distance int64 `request:"distance,required"` }
getting the value using the tag value
type DriverUpdateRequest ¶
type DriverUpdateRequest struct { Id string `request:"id,required"` Name string `request:"name,required"` Lat float64 `request:"latitude,required"` Lon float64 `request:"longitude,required"` Status bool `request:"status,required"` City string `request:"city,required"` }
type for the update driver request
Click to show internal directories.
Click to hide internal directories.