SYMBOL INDEX (214 symbols across 49 files) FILE: database/models/courier.go type Courier (line 3) | type Courier struct FILE: database/models/customer.go type Model (line 7) | type Model struct type Customer (line 14) | type Customer struct FILE: database/models/delivery.go type State (line 3) | type State constant Pending (line 7) | Pending State = "pending" constant PendingPickup (line 8) | PendingPickup = "pending_pickup" constant NearingPickup (line 9) | NearingPickup = "nearing_pickup" constant AtPickup (line 10) | AtPickup = "at_pickup" constant DeliveryOngoing (line 11) | DeliveryOngoing = "delivery_ongoing" constant NearingDropoff (line 12) | NearingDropoff = "nearing_dropoff" constant AtDropOff (line 13) | AtDropOff = "at_dropoff" constant Completed (line 14) | Completed = "completed" constant Cancelled (line 15) | Cancelled = "cancelled" constant AwaitingDispatch (line 18) | AwaitingDispatch = "awaiting_dispatch" constant Dispatched (line 19) | Dispatched = "dispatched" constant OnTrip (line 20) | OnTrip = "on_trip" constant Offline (line 21) | Offline = "offline" constant Inactive (line 24) | Inactive = "inactive" constant Searching (line 27) | Searching = "searching" constant AtRest (line 28) | AtRest = "atRest" type Delivery (line 31) | type Delivery struct FILE: database/models/order.go type Order (line 3) | type Order struct FILE: database/models/product.go type Product (line 3) | type Product struct FILE: database/models/tripPoint.go type TripPoint (line 3) | type TripPoint struct FILE: database/models/vehicle.go type VehicleType (line 3) | type VehicleType constant Motor (line 6) | Motor VehicleType = "motor" constant Car (line 7) | Car = "car" type Vehicle (line 10) | type Vehicle struct FILE: database/postgres/postgres.go type Config (line 12) | type Config struct function SetupDatabase (line 22) | func SetupDatabase(db *gorm.DB, models ...interface{}) error { function New (line 27) | func New(config *Config) (*gorm.DB, error) { FILE: database/redis/redis.go type Config (line 10) | type Config struct function New (line 17) | func New(config *Config) *redis.Client { FILE: database/seeds.go type SeedFn (line 15) | type SeedFn function RunSeeds (line 17) | func RunSeeds(db *gorm.DB, seeds []SeedFn) { function SeedProducts (line 28) | func SeedProducts(DB *gorm.DB, path string) { function SeedCouriers (line 54) | func SeedCouriers(DB *gorm.DB, path string) { function SeedCustomers (line 83) | func SeedCustomers(DB *gorm.DB, path string) { function SeedVehicles (line 112) | func SeedVehicles(DB *gorm.DB, path string) { FILE: demo/customer__closest_couriers.js function connect (line 3) | function connect(id) { function parseMessage (line 35) | function parseMessage(message) {} function main (line 37) | function main() { FILE: demo/customer__delivery_request.js function connect (line 3) | function connect(id) { function main (line 42) | function main() { FILE: demo/electrons.js class Courier (line 26) | class Courier { method constructor (line 27) | constructor(id, coord) { method _initialization (line 37) | _initialization() { method _handleNewDelivery (line 56) | _handleNewDelivery(parsed) { method _sendLocationUpdate (line 75) | _sendLocationUpdate() { method handleMessage (line 96) | handleMessage(message) { function main (line 106) | function main() { FILE: handler/auth.go method Refresh (line 10) | func (h *Handler) Refresh(c *gin.Context) { FILE: handler/base.go method handleCustomerRating (line 13) | func (h *Handler) handleCustomerRating(c *gin.Context) { method handleCourierRating (line 43) | func (h *Handler) handleCourierRating(c *gin.Context) { method GetDeliveryCost (line 73) | func (h *Handler) GetDeliveryCost(c *gin.Context) { FILE: handler/courier.go type closestCourierResponse (line 12) | type closestCourierResponse struct method GetClosestCouriers (line 16) | func (h *Handler) GetClosestCouriers(c *gin.Context) { FILE: handler/customer.go type CreateCustomerRequest (line 15) | type CreateCustomerRequest struct type LoginRequest (line 19) | type LoginRequest struct method ListCustomers (line 24) | func (h *Handler) ListCustomers(c *gin.Context) { method ViewCustomer (line 40) | func (h *Handler) ViewCustomer(c *gin.Context) { method sendSMS (line 64) | func (h *Handler) sendSMS(customer models.Customer, token string) { method SignupCustomer (line 78) | func (h *Handler) SignupCustomer(c *gin.Context) { method LoginCustomer (line 133) | func (h *Handler) LoginCustomer(c *gin.Context) { FILE: handler/delivery.go type CourierWithEta (line 12) | type CourierWithEta struct method acceptDelivery (line 17) | func (h *Handler) acceptDelivery(message []byte, ws *ws.WSConnection) { method processDeliveryRequest (line 35) | func (h *Handler) processDeliveryRequest(message []byte, ws *ws.WSConnec... method handleDeliveryCancellation (line 79) | func (h *Handler) handleDeliveryCancellation(message []byte, ws *ws.WSCo... FILE: handler/handler.go type Handler (line 19) | type Handler struct method Register (line 55) | func (h *Handler) Register(v1 *gin.RouterGroup) { function New (line 32) | func New(DB *gorm.DB, jwt jwt.Service, sec *secure.Service, redisDB *red... FILE: handler/order.go method GetOrder (line 10) | func (h *Handler) GetOrder(c *gin.Context) { FILE: handler/ws.go method handleConnection (line 27) | func (h *Handler) handleConnection(entity string) func(c *gin.Context) { method processIncomingMessage (line 58) | func (h *Handler) processIncomingMessage(message []byte, ws *ws.WSConnec... method getTypeOfMessage (line 73) | func (h *Handler) getTypeOfMessage(message []byte) []byte { method handleLocationUpdate (line 102) | func (h *Handler) handleLocationUpdate(message []byte, ws *ws.WSConnecti... FILE: lib/billing/billing.go constant BASE_PRICE (line 10) | BASE_PRICE = 5 type Billing (line 13) | type Billing struct method GetDeliveryCost (line 20) | func (b *Billing) GetDeliveryCost(distance float64) float64 { function New (line 16) | func New() *Billing { FILE: lib/eta/eta.go type Eta (line 13) | type Eta struct method GMAPS__distanceMatrixBase (line 38) | func (eta *Eta) GMAPS__distanceMatrixBase(origins []shared.Coord, dest... method GMAPS__getDistanceAndDuration1to1 (line 66) | func (eta *Eta) GMAPS__getDistanceAndDuration1to1(origin shared.Coord,... method GMAPS__getDistanceAndDurationManyTo1 (line 81) | func (eta *Eta) GMAPS__getDistanceAndDurationManyTo1(origins []shared.... type DistanceFromOrigin (line 18) | type DistanceFromOrigin type DurationFromOrigin (line 19) | type DurationFromOrigin function New (line 21) | func New(googleAPIKey string) *Eta { FILE: lib/sms/sms.go type SMS (line 12) | type SMS struct method SendTextMessage (line 42) | func (s *SMS) SendTextMessage(msg Message) (*Response, error) { type Message (line 17) | type Message struct type Response (line 26) | type Response struct constant API_ENDPOINT (line 33) | API_ENDPOINT = "https://termii.com/api/sms/send" function New (line 35) | func New(apiKey string) *SMS { FILE: lib/ws/connection.go constant writeWait (line 12) | writeWait = 10 * time.Second constant pongWait (line 13) | pongWait = 60 * time.Second constant pingPeriod (line 14) | pingPeriod = (pongWait * 9) / 10 constant maxMessageSize (line 15) | maxMessageSize = 1024 type WSConnection (line 18) | type WSConnection struct method Deactivate (line 30) | func (w *WSConnection) Deactivate() { method ReadPump (line 35) | func (w *WSConnection) ReadPump() { method WritePump (line 61) | func (w *WSConnection) WritePump() { method GetIdBasedOnType (line 92) | func (w *WSConnection) GetIdBasedOnType() string { method JoinRoom (line 100) | func (w *WSConnection) JoinRoom(name string) { method LeaveRoom (line 104) | func (w *WSConnection) LeaveRoom(name string) { method SendMessage (line 108) | func (w *WSConnection) SendMessage(message []byte) { method AckDeliveryAcceptance (line 116) | func (w *WSConnection) AckDeliveryAcceptance(status bool) { FILE: lib/ws/hub.go type Hub (line 8) | type Hub struct method GetSize (line 39) | func (h *Hub) GetSize(entities string) int { method GetCourier (line 50) | func (h *Hub) GetCourier(id string) *WSConnection { method GetCustomer (line 57) | func (h *Hub) GetCustomer(id uint) *WSConnection { method createRoom (line 64) | func (h *Hub) createRoom(name string) { method Run (line 72) | func (h *Hub) Run() { function NewHub (line 21) | func NewHub() *Hub { FILE: lib/ws/room.go type RoomRequest (line 3) | type RoomRequest struct type Room (line 8) | type Room struct method run (line 32) | func (room *Room) run() { method close (line 59) | func (room *Room) close() { function NewRoom (line 17) | func NewRoom(name string) *Room { FILE: main.go function main (line 20) | func main() { FILE: middleware/cors.go function CORS (line 5) | func CORS() gin.HandlerFunc { FILE: middleware/jwt.go type TokenParser (line 10) | type TokenParser interface function JWT (line 14) | func JWT(tokenParser TokenParser) gin.HandlerFunc { FILE: plg/handy.go function S (line 13) | func S(db *gorm.DB) { function C (line 57) | func C(db *gorm.DB) { FILE: repository/courier.go method FindCourier (line 13) | func (r *Repository) FindCourier(id uint) (*models.Courier, error) { method UpdateCourier (line 23) | func (r *Repository) UpdateCourier(id uint, data map[string]interface{})... method GetCourierFromRedis (line 33) | func (r *Repository) GetCourierFromRedis(id string) (*shared.User, error) { method InsertCourierIntoRedis (line 53) | func (r *Repository) InsertCourierIntoRedis(user *shared.User) error { method RemoveCourierFromIndex (line 69) | func (r *Repository) RemoveCourierFromIndex(index h3.H3Index, user *shar... method InsertCourierIntoIndex (line 79) | func (r *Repository) InsertCourierIntoIndex(index h3.H3Index, user *shar... method GetCouriersInIndex (line 89) | func (r *Repository) GetCouriersInIndex(index h3.H3Index) ([]string, err... method GetAllCouriers (line 99) | func (r *Repository) GetAllCouriers(ids []string) ([]*shared.User, error) { FILE: repository/customer.go method FindCustomerByQuery (line 7) | func (r *Repository) FindCustomerByQuery(query string) (*models.Customer... method FindCustomerByPhone (line 18) | func (r *Repository) FindCustomerByPhone(phone string) (*models.Customer... method CreateCustomerWithPhoneAndCode (line 30) | func (r *Repository) CreateCustomerWithPhoneAndCode(phone string, code i... method UpdateCustomer (line 41) | func (r *Repository) UpdateCustomer(id uint, data map[string]interface{}... FILE: repository/delivery.go method CreateDelivery (line 11) | func (r *Repository) CreateDelivery(data shared.DeliveryRequest) (*model... method FindDelivery (line 30) | func (r *Repository) FindDelivery(id uint, loadAssociations bool) (*mode... method UpdateDelivery (line 45) | func (r *Repository) UpdateDelivery(id uint, data map[string]interface{}... method DeliveryCount (line 55) | func (r *Repository) DeliveryCount(condition string) (int64, error) { method DeliverySum (line 63) | func (r *Repository) DeliverySum(condition string, field string) (int64,... FILE: repository/order.go type CreateOrderSchema (line 10) | type CreateOrderSchema struct method CreateOrder (line 14) | func (r *Repository) CreateOrder() (*models.Order, error) { method FindOrder (line 25) | func (r *Repository) FindOrder(id uint) (*models.Order, error) { method UpdateOrder (line 42) | func (r *Repository) UpdateOrder(id uint, data map[string]interface{}) (... FILE: repository/product.go method FindProduct (line 9) | func (r *Repository) FindProduct(id uint) (*models.Product, error) { method FindAllProducts (line 24) | func (r *Repository) FindAllProducts() ([]models.Product, error) { FILE: repository/repository.go type Repository (line 9) | type Repository struct function New (line 14) | func New(db *gorm.DB, redisDB *redis.Client) *Repository { FILE: repository/tripPoint.go method CreateTripPoint (line 8) | func (r *Repository) CreateTripPoint(data shared.UserLocationUpdate) (*m... FILE: server/server.go type Config (line 15) | type Config struct type Server (line 20) | type Server struct function healthCheck (line 24) | func healthCheck(c *gin.Context) { function New (line 30) | func New() Server { function Start (line 38) | func Start(e *Server, cfg *Config) { FILE: services/base.go type PricePerProduct (line 12) | type PricePerProduct struct type GetDeliveryCostResponse (line 17) | type GetDeliveryCostResponse struct method RateDelivery (line 23) | func (s *Services) RateDelivery(data shared.RatingRequest) (bool, error) { method GetDeliveryCost (line 108) | func (s *Services) GetDeliveryCost(data shared.GetDeliveryCostRequest) (... FILE: services/delivery.go method CreateDelivery (line 13) | func (s *Services) CreateDelivery(data shared.DeliveryRequest) (*models.... method AcceptDelivery (line 21) | func (s *Services) AcceptDelivery(data shared.AcceptDelivery, courierWS ... method CancelDelivery (line 101) | func (s *Services) CancelDelivery(data shared.CancelDeliveryRequest) bool { FILE: services/dispatch.go method HandleLocationUpdate (line 17) | func (s *Services) HandleLocationUpdate(params shared.UserLocationUpdate... method relayCoordsToCustomer (line 41) | func (s *Services) relayCoordsToCustomer(params shared.UserLocationUpdat... method indexCourierLocation (line 84) | func (s *Services) indexCourierLocation(param shared.UserLocationUpdate)... method GetClosestCouriers (line 126) | func (s *Services) GetClosestCouriers(destination shared.Coord, steps in... method DispatchDelivery (line 188) | func (s *Services) DispatchDelivery(data shared.DeliveryRequest, deliver... FILE: services/services.go type Services (line 10) | type Services struct function New (line 17) | func New(repo *repository.Repository, eta *eta.Eta, hub *ws.Hub, billing... FILE: shared/types.go type Meta (line 14) | type Meta struct type Coord (line 18) | type Coord struct type User (line 23) | type User struct type UserLocationUpdate (line 29) | type UserLocationUpdate struct type DeliveryRequest (line 36) | type DeliveryRequest struct type CancelDeliveryRequest (line 45) | type CancelDeliveryRequest struct type GetClosestCouriersRequest (line 50) | type GetClosestCouriersRequest struct type NewDelivery (line 54) | type NewDelivery struct type AcceptDelivery (line 61) | type AcceptDelivery struct type CourierWithEta (line 66) | type CourierWithEta struct type DeliveryAcceptedPayload (line 72) | type DeliveryAcceptedPayload struct type NoCourierAvailable (line 80) | type NoCourierAvailable struct type CourierLocation (line 85) | type CourierLocation struct type PricePerProduct (line 92) | type PricePerProduct struct type GetDeliveryCostRequest (line 97) | type GetDeliveryCostRequest struct type BaseRating (line 102) | type BaseRating struct type CustomerRatingRequest (line 108) | type CustomerRatingRequest struct type CourierRatingRequest (line 113) | type CourierRatingRequest struct type RatingRequest (line 118) | type RatingRequest struct FILE: utils/geo/geo.go function CoordToIndex (line 8) | func CoordToIndex(param shared.Coord) h3.H3Index { function GetRingsFromOrigin (line 15) | func GetRingsFromOrigin(coord shared.Coord, steps int) []h3.H3Index { function ConvertMetresToKM (line 19) | func ConvertMetresToKM(distance float64) float64 { FILE: utils/jwt/jwt.go function New (line 16) | func New(algo, secret string, ttlMinutes, minSecretLength int) (Service,... type Service (line 36) | type Service struct method ParseToken (line 48) | func (s Service) ParseToken(authHeader string) (*jwt.Token, error) { method GenerateToken (line 64) | func (s Service) GenerateToken(customer *models.Customer) (string, err... FILE: utils/secure/secure.go function New (line 14) | func New(minPWStr int, h hash.Hash) *Service { type Service (line 19) | type Service struct method Password (line 25) | func (s *Service) Password(pass string, inputs ...string) bool { method Hash (line 31) | func (*Service) Hash(password string) string { method HashMatchesPassword (line 37) | func (*Service) HashMatchesPassword(hash, password string) bool { method Token (line 42) | func (s *Service) Token(str string) string { FILE: utils/utils.go function GeneratePhoneNumber (line 16) | func GeneratePhoneNumber(phone string) string { function GenerateOTP (line 20) | func GenerateOTP() string { function StringifyLngLat (line 33) | func StringifyLngLat(props shared.Coord) string { function ConvertToUint64 (line 37) | func ConvertToUint64(num string) uint64 { function ConvertToInt (line 42) | func ConvertToInt(num string) int { function ConvertToVehicleType (line 47) | func ConvertToVehicleType(id string) models.VehicleType { FILE: utils/validator/validator.go type FieldError (line 13) | type FieldError struct method String (line 17) | func (q FieldError) String() string { type DefaultValidator (line 36) | type DefaultValidator struct method ValidateStruct (line 43) | func (v *DefaultValidator) ValidateStruct(obj interface{}) error { method Engine (line 57) | func (v *DefaultValidator) Engine() interface{} { method lazyinit (line 62) | func (v *DefaultValidator) lazyinit() { function kindOfData (line 71) | func kindOfData(data interface{}) reflect.Kind {