mirror of
https://github.com/kevin-DL/services.git
synced 2026-01-18 13:45:09 +00:00
add eta method to routing service
This commit is contained in:
@@ -18,12 +18,18 @@ var (
|
||||
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")
|
||||
)
|
||||
|
||||
type Google struct {
|
||||
Maps *maps.Client
|
||||
}
|
||||
|
||||
func (r *Google) ETA(ctx context.Context, req *pb.ETARequest, rsp *pb.ETAResponse) error {
|
||||
// TODO: implement eta
|
||||
return ErrUnimplemented
|
||||
}
|
||||
|
||||
func (r *Google) Route(ctx context.Context, req *pb.RouteRequest, rsp *pb.RouteResponse) error {
|
||||
// validate the request
|
||||
if req.Origin == nil {
|
||||
|
||||
Reference in New Issue
Block a user