libvalhalla-go/valhalla.go

53 lines
1.4 KiB
Go

package valhalla
type ValhallaHandler struct {
Actor *Actor
}
func NewValhallaHandler() (*ValhallaHandler, error) {
actor, err := NewActorFromConfig(DefaultConfig())
if err != nil {
return nil, err
}
return &ValhallaHandler{
Actor: actor,
}, nil
}
func (h *ValhallaHandler) Route(input ValhallaRouteInput) (*ValhallaRouteResponse, error) {
return nil, nil
}
type ValhallaRouteInput struct {
Locations []ValhallaLocation `json:"locations"`
Costing *string `json:"costing,omitempty"`
CostingOptions *ValhallaCostingOptions `json:"costing_options,omitempty"`
Language *string `json:"language,omitempty"`
}
type ValhallaRouteResponse struct{}
type ValhallaLocation struct {
Lat float64 `json:"lat"`
Lon float64 `json:"lon"`
Type *string `json:"type,omitempty"`
Heading *string `json:"heading,omitempty"`
HeadingTolerance *string `json:"heading_tolerance,omitempty"`
Street *string `json:"street,omitempty"`
Radius *int64 `json:"radius,omitempty"`
RankCandidates *bool `json:"rank_candidates,omitempty"`
PreferedSide *string `json:"prefered_side"`
// DisplayLat
// DisplayLon
// SearchCutoff
// NodeSnapTolerance
// StreetSideTolerance
// StreetSideMaxDistance
// StreetSideCutoff
// SearchFilters
// PreferredLayer
}
type ValhallaCostingOptions struct{}