Versions in this module Expand all Collapse all v0 v0.1.0 Apr 12, 2019 Changes in this version + const ErrorCodeInvalidOptions + const ErrorCodeInvalidQuery + const ErrorCodeInvalidService + const ErrorCodeInvalidURL + const ErrorCodeInvalidValue + const ErrorCodeInvalidVersion + const ErrorCodeNoMatch + const ErrorCodeNoRoute + const ErrorCodeNoSegment + const ErrorCodeNoTable + const ErrorCodeTooBig + var ErrEmptyProfileName = errors.New("osrm5: the request should contain a profile name") + var ErrEmptyServiceName = errors.New("osrm5: the request should contain a service name") + var ErrNoCoordinates = errors.New("osrm5: the request should contain coordinates") + type Annotation struct + Distance []float32 + Duration []float32 + Nodes []uint64 + type Annotations string + const AnnotationsDatasources + const AnnotationsDistance + const AnnotationsDuration + const AnnotationsFalse + const AnnotationsNodes + const AnnotationsSpeed + const AnnotationsTrue + const AnnotationsWeight + func (a Annotations) String() string + type Bearing struct + Range uint16 + Value uint16 + func (b Bearing) String() string + type Config struct + Client HTTPClient + ServerURL string + type ContinueStraight string + const ContinueStraightDefault + const ContinueStraightFalse + const ContinueStraightTrue + func (c ContinueStraight) String() string + type Gaps string + const GapsIgnore + const GapsSplit + func (g Gaps) String() string + type Geometries string + const GeometriesGeojson + const GeometriesPolyline6 + func (g Geometries) String() string + type Geometry struct + func NewGeometryFromPath(path geo.Path) Geometry + func NewGeometryFromPointSet(ps geo.PointSet) Geometry + func (g *Geometry) Polyline() string + func (g *Geometry) UnmarshalJSON(b []byte) (err error) + type HTTPClient interface + Do func(*http.Request) (*http.Response, error) + type MatchRequest struct + Annotations Annotations + Bearings []Bearing + Coordinates Geometry + Gaps Gaps + Geometries Geometries + Hints []string + Overview Overview + Profile string + Radiuses []float64 + Steps Steps + Tidy Tidy + Timestamps []int64 + type MatchResponse struct + Matchings []Matching + Tracepoints []*Tracepoint + type Matching struct + Confidence float64 + Geometry Geometry + type NearestRequest struct + Bearings []Bearing + Coordinates Geometry + Number int + Profile string + type NearestResponse struct + Waypoints []NearestWaypoint + type NearestWaypoint struct + Distance float64 + Hint string + Location geo.Point + Name string + Nodes []uint64 + type OSRM struct + func New() *OSRM + func NewFromURL(serverURL string) *OSRM + func NewFromURLWithTimeout(serverURL string, timeout time.Duration) *OSRM + func NewWithConfig(cfg Config) *OSRM + func (o OSRM) Match(ctx context.Context, r MatchRequest) (*MatchResponse, error) + func (o OSRM) Nearest(ctx context.Context, r NearestRequest) (*NearestResponse, error) + func (o OSRM) Route(ctx context.Context, r RouteRequest) (*RouteResponse, error) + func (o OSRM) Table(ctx context.Context, r TableRequest) (*TableResponse, error) + type Overview string + const OverviewFalse + const OverviewFull + const OverviewSimplified + func (o Overview) String() string + type ResponseStatus struct + Code string + DataVersion string + Message string + func (r ResponseStatus) ErrCode() string + func (r ResponseStatus) Error() string + type Route struct + Distance float32 + Duration float32 + Legs []RouteLeg + type RouteLeg struct + Annotation Annotation + Distance float32 + Duration float32 + Steps []RouteStep + type RouteRequest struct + Annotations Annotations + Bearings []Bearing + ContinueStraight ContinueStraight + Coordinates Geometry + Geometries Geometries + Overview Overview + Profile string + Steps Steps + type RouteResponse struct + Routes []Route + type RouteStep struct + Distance float32 + Duration float32 + Geometry Geometry + Maneuver StepManeuver + Mode string + Name string + type StepManeuver struct + BearingAfter float32 + BearingBefore float32 + Location geo.Point + Modifier string + Type string + type Steps string + const StepsFalse + const StepsTrue + func (s Steps) String() string + type TableRequest struct + Coordinates Geometry + Destinations []int + Profile string + Sources []int + type TableResponse struct + Durations [][]float32 + type Tidy string + const TidyFalse + const TidyTrue + func (t Tidy) String() string + type Tracepoint struct + AlternativesCount int + Hint string + Index int + Location geo.Point + MatchingIndex int