forked from Project-OSRM/osrm-backend
-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Showing
1 changed file
with
32 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,33 @@ | ||
package table | ||
|
||
import "github.com/Telenav/osrm-backend/integration/pkg/api/osrm/route" | ||
|
||
// Response represents OSRM api v1 table response. | ||
type Response struct { | ||
Code string `json:"code"` | ||
Message string `json:"message,omitempty"` | ||
Sources []*Source `json:"sources"` | ||
Destinations []*Destination `json:"destinations"` | ||
Durations []*Duration `json:"durations"` | ||
Distances []*Distance `json:"distances"` | ||
} | ||
|
||
// Source represents as way point object. All sources will be listed in order. | ||
type Source struct { | ||
route.Waypoint | ||
} | ||
|
||
// Destination represents as way point object. All destination will be listed in order. | ||
type Destination struct { | ||
route.Waypoint | ||
} | ||
|
||
// Duration gives the travel time from specific source to all other destinations | ||
type Duration struct { | ||
Value []*float64 | ||
} | ||
|
||
// Distance gives the travel distance from specific source to all other destinations | ||
type Distance struct { | ||
Value []*float64 | ||
} |