Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ( ErrDownstream = errors.InternalServerError("ROUTING_ERROR", "Unable to connect to routing provider") ErrMissingOrigin = errors.BadRequest("MISSING_ORIGIN", "Missing origin") ErrMissingDestination = errors.BadRequest("MISSING_DESTINATION", "Missing destination") ErrMissingLatitude = errors.BadRequest("MISSING_LATITUDE", "Missing latitude") ErrMissingLongitude = errors.BadRequest("MISSING_LONGITUDE", "Missing longitude") ErrNoRoutes = errors.BadRequest("NO_ROUTES", "No routes found") ErrUnimplemented = errors.InternalServerError("UNIMPLEMENTED", "endpoint is unimplemented") )
Functions ¶
This section is empty.
Types ¶
type Google ¶
func (*Google) Directions ¶
func (r *Google) Directions(ctx context.Context, req *pb.DirectionsRequest, rsp *pb.DirectionsResponse) error
func (*Google) Eta ¶
func (r *Google) Eta(ctx context.Context, req *pb.EtaRequest, rsp *pb.EtaResponse) error
Calculate the ETAs for a route
func (*Google) Route ¶
func (r *Google) Route(ctx context.Context, req *pb.RouteRequest, rsp *pb.RouteResponse) error
type OSRM ¶
type OSRM struct { // api address Address string // osrm client Client *osrm.OSRM }
func (*OSRM) Directions ¶
func (o *OSRM) Directions(ctx context.Context, req *pb.DirectionsRequest, rsp *pb.DirectionsResponse) error
func (*OSRM) Eta ¶
func (o *OSRM) Eta(ctx context.Context, req *pb.EtaRequest, rsp *pb.EtaResponse) error
func (*OSRM) Route ¶
func (o *OSRM) Route(ctx context.Context, req *pb.RouteRequest, rsp *pb.RouteResponse) error
Click to show internal directories.
Click to hide internal directories.