Documentation
¶
Index ¶
- type CostingOptions
- type DirectionRequest
- type DirectionResponse
- type LegResponse
- type Location
- type LocationResponse
- type ManeuverResponse
- type SummaryResponse
- type TripResponse
- type ValhallaClient
- func (o *ValhallaClient) DirectionsGeoJSON(ctx context.Context, reqBody *DirectionRequest) (*entities.GeoJSON, error)
- func (o *ValhallaClient) DirectionsJSON(ctx context.Context, reqBody *DirectionRequest) (*DirectionResponse, error)
- func (o *ValhallaClient) DirectionsRawGpx(ctx context.Context, reqBody *DirectionRequest) (io.ReadCloser, error)
- type ValhallaClientConfig
- type ValhallaClientOption
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type CostingOptions ¶
type DirectionRequest ¶
type DirectionResponse ¶
type DirectionResponse struct {
Trip TripResponse `json:"trip"`
}
type LegResponse ¶
type LegResponse struct {
Maneuvers []ManeuverResponse `json:"maneuvers"`
Summary SummaryResponse `json:"summary"`
Shape string `json:"shape"`
}
type LocationResponse ¶
type ManeuverResponse ¶
type ManeuverResponse struct {
Type int `json:"type"`
Instruction string `json:"instruction"`
VerbalSuccinctTransitionInstruction string `json:"verbal_succinct_transition_instruction"`
VerbalPreTransitionInstruction string `json:"verbal_pre_transition_instruction"`
VerbalPostTransitionInstruction string `json:"verbal_post_transition_instruction"`
StreetNames []string `json:"street_names"`
BeginStreetNames []string `json:"begin_street_names,omitempty"`
Time float64 `json:"time"`
Length float64 `json:"length"`
Cost float64 `json:"cost"`
BeginShapeIndex int `json:"begin_shape_index"`
EndShapeIndex int `json:"end_shape_index"`
VerbalMultiCue bool `json:"verbal_multi_cue,omitempty"`
TravelMode string `json:"travel_mode"`
TravelType string `json:"travel_type"`
}
type SummaryResponse ¶
type SummaryResponse struct {
HasTimeRestrictions bool `json:"has_time_restrictions"`
HasToll bool `json:"has_toll"`
HasHighway bool `json:"has_highway"`
HasFerry bool `json:"has_ferry"`
MinLat float64 `json:"min_lat"`
MinLon float64 `json:"min_lon"`
MaxLat float64 `json:"max_lat"`
MaxLon float64 `json:"max_lon"`
Time float64 `json:"time"`
Length float64 `json:"length"`
Cost float64 `json:"cost"`
}
type TripResponse ¶
type TripResponse struct {
Locations []LocationResponse `json:"locations"`
Legs []LegResponse `json:"legs"`
Summary SummaryResponse `json:"summary"`
StatusMessage string `json:"status_message"`
Status int `json:"status"`
Units string `json:"units"`
Language string `json:"language"`
}
type ValhallaClient ¶
type ValhallaClient struct {
// contains filtered or unexported fields
}
func NewValhallaClient ¶
func NewValhallaClient(opts ...ValhallaClientOption) ValhallaClient
func (*ValhallaClient) DirectionsGeoJSON ¶
func (o *ValhallaClient) DirectionsGeoJSON(ctx context.Context, reqBody *DirectionRequest) (*entities.GeoJSON, error)
func (*ValhallaClient) DirectionsJSON ¶
func (o *ValhallaClient) DirectionsJSON(ctx context.Context, reqBody *DirectionRequest) (*DirectionResponse, error)
func (*ValhallaClient) DirectionsRawGpx ¶
func (o *ValhallaClient) DirectionsRawGpx(ctx context.Context, reqBody *DirectionRequest) (io.ReadCloser, error)
type ValhallaClientConfig ¶
type ValhallaClientConfig struct {
// contains filtered or unexported fields
}
type ValhallaClientOption ¶
type ValhallaClientOption func(*ValhallaClientConfig)
func WithClient ¶
func WithClient(client *http.Client) ValhallaClientOption
func WithHostURL ¶
func WithHostURL(hostURL *url.URL) ValhallaClientOption
Click to show internal directories.
Click to hide internal directories.