Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Index your code
hub
/
github.com/douglasmakey/tracking
/ functions
Functions
18 in github.com/douglasmakey/tracking
⨍
Functions
18
◇
Types & classes
2
↓ 3 callers
Method
AddDriverLocation
(lng, lat float64, id string)
storages/redis.go:36
↓ 3 callers
Method
RemoveDriverLocation
(id string)
storages/redis.go:43
↓ 2 callers
Method
SearchDrivers
(limit int, lat, lng, r float64)
storages/redis.go:47
↓ 2 callers
Function
sendInfo
sendInfo this func is only example, you can use another services, websocket or push notification for send data to user.
tasks/search.go:110
↓ 1 callers
Method
Run
Run is the function for executing the task, this task validating the request and launches another goroutine called 'doSearch' which does the search.
tasks/search.go:38
↓ 1 callers
Method
doSearch
doSearch do search of driver and close to the channel.
tasks/search.go:95
↓ 1 callers
Function
search
search receives lat and lng of the picking point and searches drivers about this point.
handler/handler.go:41
↓ 1 callers
Function
tracking
tracking receive the driver coord and saves the coord in redis
handler/handler.go:12
↓ 1 callers
Method
validateRequest
validateRequest validates if the request is valid and return an error like a reason in case not.
tasks/search.go:77
Function
CancelRequest
(w http.ResponseWriter, r *http.Request)
handler/v2/search.go:52
Function
GetRedisClient
()
storages/redis.go:18
Function
NewHandler
()
handler/base.go:8
Function
NewRequestDriverTask
NewRequestDriverTask create and return a pointer to RequestDriverTask
tasks/search.go:28
Function
SearchV2
(w http.ResponseWriter, r *http.Request)
handler/v2/search.go:15
Function
TestHandlerSearch
(t *testing.T)
handler/handler_test.go:29
Function
TestHandlerTracking
(t *testing.T)
handler/handler_test.go:12
Function
health
(w http.ResponseWriter, r *http.Request)
handler/healthcheck.go:9
Function
main
()
main.go:10