package routing import ( "fmt" "github.com/paulmach/orb" ) type RoutingService interface { Route(locations []orb.Point) (route *Route, err error) } func NewRoutingService(service_type string, baseUrl string) (RoutingService, error) { if service_type == "valhalla" { return NewValhallaRouting(baseUrl) } return nil, fmt.Errorf("%s routing service not supported", service_type) } type Route struct { Summary RouteSummary } type RouteSummary struct { Polyline string }