initial commit

This commit is contained in:
Arnaud Delcasse 2023-03-27 20:57:28 +02:00
commit fb30573934
29 changed files with 18303 additions and 0 deletions

7
README.md Normal file
View File

@ -0,0 +1,7 @@
# COOPGO Routing Service
COOPGO Routing Service a routing library implementing other routing providers APIs, such as Valhalla. It is part of the COOPGO Technical Platform.
## Licence
COOPGO Routing is release under the terms of the AGPL version 3 licence.

View File

@ -0,0 +1,63 @@
package polylines
import (
"math"
"github.com/paulmach/orb"
)
func Decode(encoded *string, precisionOptional ...int) orb.LineString {
// default to 6 digits of precision
precision := 6
if len(precisionOptional) > 0 {
precision = precisionOptional[0]
}
factor := math.Pow10(precision)
// Coordinates have variable length when encoded, so just keep
// track of whether we've hit the end of the string. In each
// loop iteration, a single coordinate is decoded.
lat, lng := 0, 0
var coordinates orb.LineString
index := 0
for index < len(*encoded) {
// Consume varint bits for lat until we run out
var byte int = 0x20
shift, result := 0, 0
for byte >= 0x20 {
byte = int((*encoded)[index]) - 63
result |= (byte & 0x1f) << shift
shift += 5
index++
}
// check if we need to go negative or not
if (result & 1) > 0 {
lat += ^(result >> 1)
} else {
lat += result >> 1
}
// Consume varint bits for lng until we run out
byte = 0x20
shift, result = 0, 0
for byte >= 0x20 {
byte = int((*encoded)[index]) - 63
result |= (byte & 0x1f) << shift
shift += 5
index++
}
// check if we need to go negative or not
if (result & 1) > 0 {
lng += ^(result >> 1)
} else {
lng += result >> 1
}
// scale the int back to floating point and storeLineString it
coordinates = append(coordinates, orb.Point{float64(lat) / factor, float64(lng) / factor})
}
return coordinates
}

View File

@ -0,0 +1,17 @@
package polylines
import (
"github.com/paulmach/orb"
"github.com/twpayne/go-polyline"
)
func Encode(line orb.LineString) string {
preparedLine := [][]float64{}
for _, point := range line {
preparedLine = append(preparedLine, []float64{point.Lon(), point.Lat()})
}
return string(polyline.EncodeCoords(preparedLine))
}

10
go.mod Normal file
View File

@ -0,0 +1,10 @@
module git.coopgo.io/coopgo-platform/routing-service
go 1.18
require (
github.com/paulmach/orb v0.9.0 // indirect
github.com/twpayne/go-polyline v1.1.1 // indirect
go.mongodb.org/mongo-driver v1.11.1 // indirect
google.golang.org/protobuf v1.30.0 // indirect
)

79
go.sum Normal file
View File

@ -0,0 +1,79 @@
github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
github.com/dvyukov/go-fuzz v0.0.0-20200318091601-be3528f3a813/go.mod h1:11Gm+ccJnvAhCNLlf5+cS9KjtbaD5I5zaZpFMsTHWTw=
github.com/gogo/protobuf v1.3.2/go.mod h1:P1XiOD3dCwIKUDQYPy72D8LYyHL2YPYrpS2s69NZV8Q=
github.com/golang/protobuf v1.5.0/go.mod h1:FsONVRAS9T7sI+LIUmWTfcYkHO4aIWwzhcaSAoJOfIk=
github.com/golang/snappy v0.0.1/go.mod h1:/XxbfmMg8lxefKM7IXC3fBNl/7bRcc72aCRzEWrmP2Q=
github.com/google/go-cmp v0.5.2/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE=
github.com/google/go-cmp v0.5.5/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE=
github.com/kisielk/errcheck v1.5.0/go.mod h1:pFxgyoBC7bSaBwPgfKdkLd5X25qrDl4LWUI2bnpBCr8=
github.com/kisielk/gotool v1.0.0/go.mod h1:XhKaO+MFFWcvkIS/tQcRk01m1F5IRFswLeQ+oQHNcck=
github.com/klauspost/compress v1.13.6/go.mod h1:/3/Vjq9QcHkK5uEr5lBEmyoZ1iFhe47etQ6QUkpK6sk=
github.com/kr/pretty v0.1.0/go.mod h1:dAy3ld7l9f0ibDNOQOHHMYYIIbhfbHSm3C4ZsoJORNo=
github.com/kr/pty v1.1.1/go.mod h1:pFQYn66WHrOpPYNljwOMqo10TkYh1fy3cYio2l3bCsQ=
github.com/kr/text v0.1.0/go.mod h1:4Jbv+DJW3UT/LiOwJeYQe1efqtUx/iVham/4vfdArNI=
github.com/montanaflynn/stats v0.0.0-20171201202039-1bf9dbcd8cbe/go.mod h1:wL8QJuTMNUDYhXwkmfOly8iTdp5TEcJFWZD2D7SIkUc=
github.com/paulmach/orb v0.9.0 h1:MwA1DqOKtvCgm7u9RZ/pnYejTeDJPnr0+0oFajBbJqk=
github.com/paulmach/orb v0.9.0/go.mod h1:SudmOk85SXtmXAB3sLGyJ6tZy/8pdfrV0o6ef98Xc30=
github.com/paulmach/protoscan v0.2.1/go.mod h1:SpcSwydNLrxUGSDvXvO0P7g7AuhJ7lcKfDlhJCDw2gY=
github.com/pkg/errors v0.9.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0=
github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4=
github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME=
github.com/stretchr/objx v0.3.0/go.mod h1:qt09Ya8vawLte6SNmTgCsAVtYtaKzEcn8ATUoHMkEqE=
github.com/stretchr/testify v1.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UVUgZn+9EI=
github.com/stretchr/testify v1.6.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg=
github.com/stretchr/testify v1.7.0/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg=
github.com/tidwall/pretty v1.0.0/go.mod h1:XNkn88O1ChpSDQmQeStsy+sBenx6DDtFZJxhVysOjyk=
github.com/twpayne/go-polyline v1.1.1 h1:/tSF1BR7rN4HWj4XKqvRUNrCiYVMCvywxTFVofvDV0w=
github.com/twpayne/go-polyline v1.1.1/go.mod h1:ybd9IWWivW/rlXPXuuckeKUyF3yrIim+iqA7kSl4NFY=
github.com/xdg-go/pbkdf2 v1.0.0/go.mod h1:jrpuAogTd400dnrH08LKmI/xc1MbPOebTwRqcT5RDeI=
github.com/xdg-go/scram v1.1.1/go.mod h1:RaEWvsqvNKKvBPvcKeFjrG2cJqOkHTiyTpzz23ni57g=
github.com/xdg-go/stringprep v1.0.3/go.mod h1:W3f5j4i+9rC0kuIEJL0ky1VpHXQU3ocBgklLGvcBnW8=
github.com/youmark/pkcs8 v0.0.0-20181117223130-1be2e3e5546d/go.mod h1:rHwXgn7JulP+udvsHwJoVG1YGAP6VLg4y9I5dyZdqmA=
github.com/yuin/goldmark v1.1.27/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74=
github.com/yuin/goldmark v1.2.1/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74=
go.mongodb.org/mongo-driver v1.11.1 h1:QP0znIRTuL0jf1oBQoAoM0C6ZJfBK4kx0Uumtv1A7w8=
go.mongodb.org/mongo-driver v1.11.1/go.mod h1:s7p5vEtfbeR1gYi6pnj3c3/urpbLv2T5Sfd6Rp2HBB8=
golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w=
golang.org/x/crypto v0.0.0-20191011191535-87dc89f01550/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI=
golang.org/x/crypto v0.0.0-20200622213623-75b288015ac9/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto=
golang.org/x/crypto v0.0.0-20220622213112-05595931fe9d/go.mod h1:IxCIyHEi3zRg3s0A5j5BB6A9Jmi73HwBIUl50j+osU4=
golang.org/x/mod v0.2.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA=
golang.org/x/mod v0.3.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA=
golang.org/x/net v0.0.0-20190404232315-eb5bcb51f2a3/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg=
golang.org/x/net v0.0.0-20190620200207-3b0461eec859/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s=
golang.org/x/net v0.0.0-20200226121028-0de0cce0169b/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s=
golang.org/x/net v0.0.0-20201021035429-f5854403a974/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU=
golang.org/x/net v0.0.0-20211112202133-69e39bad7dc2/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y=
golang.org/x/sync v0.0.0-20190423024810-112230192c58/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
golang.org/x/sync v0.0.0-20190911185100-cd5d95a43a6e/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
golang.org/x/sync v0.0.0-20201020160332-67f06af15bc9/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
golang.org/x/sync v0.0.0-20210220032951-036812b2e83c/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
golang.org/x/sys v0.0.0-20190412213103-97732733099d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
golang.org/x/sys v0.0.0-20200930185726-fdedc70b468f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
golang.org/x/sys v0.0.0-20201119102817-f84b799fce68/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
golang.org/x/sys v0.0.0-20210423082822-04245dca01da/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
golang.org/x/sys v0.0.0-20210615035016-665e8c7367d1/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo=
golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ=
golang.org/x/text v0.3.3/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ=
golang.org/x/text v0.3.6/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ=
golang.org/x/text v0.3.7/go.mod h1:u+2+/6zg+i71rQMx5EYifcz6MCKuco9NR6JIITiCfzQ=
golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ=
golang.org/x/tools v0.0.0-20191119224855-298f0cb1881e/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo=
golang.org/x/tools v0.0.0-20200619180055-7c47624df98f/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE=
golang.org/x/tools v0.0.0-20210106214847-113979e3529a/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA=
golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
golang.org/x/xerrors v0.0.0-20191011141410-1b5146add898/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
google.golang.org/protobuf v1.26.0-rc.1/go.mod h1:jlhhOSvTdKEhbULTjvd4ARK9grFBp09yW+WbY/TyQbw=
google.golang.org/protobuf v1.27.1/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQnmE0givc=
google.golang.org/protobuf v1.30.0 h1:kPPoIgf3TsEvrm0PFe15JQ+570QVxYzEvvHqChK+cng=
google.golang.org/protobuf v1.30.0/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I=
gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM=
gopkg.in/yaml.v3 v3.0.0-20210107192922-496545a6307b/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM=
gopkg.in/yaml.v3 v3.0.1/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM=

211
proto/valhalla/api.pb.go Normal file
View File

@ -0,0 +1,211 @@
// Code generated by protoc-gen-go. DO NOT EDIT.
// versions:
// protoc-gen-go v1.28.0
// protoc v3.19.4
// source: api.proto
package valhalla
import (
protoreflect "google.golang.org/protobuf/reflect/protoreflect"
protoimpl "google.golang.org/protobuf/runtime/protoimpl"
reflect "reflect"
sync "sync"
)
const (
// Verify that this generated code is sufficiently up-to-date.
_ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion)
// Verify that runtime/protoimpl is sufficiently up-to-date.
_ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20)
)
type Api struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
// this is the request to the api
Options *Options `protobuf:"bytes,1,opt,name=options,proto3" json:"options,omitempty"`
// these are different responses based on the type of request you make
Trip *Trip `protobuf:"bytes,2,opt,name=trip,proto3" json:"trip,omitempty"` // trace_attributes
Directions *Directions `protobuf:"bytes,3,opt,name=directions,proto3" json:"directions,omitempty"` // route, optimized_route, trace_route, centroid
Status *Status `protobuf:"bytes,4,opt,name=status,proto3" json:"status,omitempty"` // status
// here we store a bit of info about what happened during request processing (stats/errors/warnings)
Info *Info `protobuf:"bytes,20,opt,name=info,proto3" json:"info,omitempty"`
}
func (x *Api) Reset() {
*x = Api{}
if protoimpl.UnsafeEnabled {
mi := &file_api_proto_msgTypes[0]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *Api) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*Api) ProtoMessage() {}
func (x *Api) ProtoReflect() protoreflect.Message {
mi := &file_api_proto_msgTypes[0]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use Api.ProtoReflect.Descriptor instead.
func (*Api) Descriptor() ([]byte, []int) {
return file_api_proto_rawDescGZIP(), []int{0}
}
func (x *Api) GetOptions() *Options {
if x != nil {
return x.Options
}
return nil
}
func (x *Api) GetTrip() *Trip {
if x != nil {
return x.Trip
}
return nil
}
func (x *Api) GetDirections() *Directions {
if x != nil {
return x.Directions
}
return nil
}
func (x *Api) GetStatus() *Status {
if x != nil {
return x.Status
}
return nil
}
func (x *Api) GetInfo() *Info {
if x != nil {
return x.Info
}
return nil
}
var File_api_proto protoreflect.FileDescriptor
var file_api_proto_rawDesc = []byte{
0x0a, 0x09, 0x61, 0x70, 0x69, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x08, 0x76, 0x61, 0x6c,
0x68, 0x61, 0x6c, 0x6c, 0x61, 0x1a, 0x0d, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x70,
0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x0a, 0x74, 0x72, 0x69, 0x70, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f,
0x1a, 0x10, 0x64, 0x69, 0x72, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x70, 0x72, 0x6f,
0x74, 0x6f, 0x1a, 0x0a, 0x69, 0x6e, 0x66, 0x6f, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x0c,
0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0xda, 0x01, 0x0a,
0x03, 0x41, 0x70, 0x69, 0x12, 0x2b, 0x0a, 0x07, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18,
0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x11, 0x2e, 0x76, 0x61, 0x6c, 0x68, 0x61, 0x6c, 0x6c, 0x61,
0x2e, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x07, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e,
0x73, 0x12, 0x22, 0x0a, 0x04, 0x74, 0x72, 0x69, 0x70, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32,
0x0e, 0x2e, 0x76, 0x61, 0x6c, 0x68, 0x61, 0x6c, 0x6c, 0x61, 0x2e, 0x54, 0x72, 0x69, 0x70, 0x52,
0x04, 0x74, 0x72, 0x69, 0x70, 0x12, 0x34, 0x0a, 0x0a, 0x64, 0x69, 0x72, 0x65, 0x63, 0x74, 0x69,
0x6f, 0x6e, 0x73, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x14, 0x2e, 0x76, 0x61, 0x6c, 0x68,
0x61, 0x6c, 0x6c, 0x61, 0x2e, 0x44, 0x69, 0x72, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x52,
0x0a, 0x64, 0x69, 0x72, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x28, 0x0a, 0x06, 0x73,
0x74, 0x61, 0x74, 0x75, 0x73, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x10, 0x2e, 0x76, 0x61,
0x6c, 0x68, 0x61, 0x6c, 0x6c, 0x61, 0x2e, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, 0x06, 0x73,
0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x22, 0x0a, 0x04, 0x69, 0x6e, 0x66, 0x6f, 0x18, 0x14, 0x20,
0x01, 0x28, 0x0b, 0x32, 0x0e, 0x2e, 0x76, 0x61, 0x6c, 0x68, 0x61, 0x6c, 0x6c, 0x61, 0x2e, 0x49,
0x6e, 0x66, 0x6f, 0x52, 0x04, 0x69, 0x6e, 0x66, 0x6f, 0x42, 0x40, 0x48, 0x03, 0x5a, 0x3c, 0x67,
0x69, 0x74, 0x2e, 0x63, 0x6f, 0x6f, 0x70, 0x67, 0x6f, 0x2e, 0x69, 0x6f, 0x2f, 0x63, 0x6f, 0x6f,
0x70, 0x67, 0x6f, 0x2d, 0x70, 0x6c, 0x61, 0x74, 0x66, 0x6f, 0x72, 0x6d, 0x2f, 0x72, 0x6f, 0x75,
0x74, 0x69, 0x6e, 0x67, 0x2d, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2f, 0x70, 0x72, 0x6f,
0x74, 0x6f, 0x2f, 0x76, 0x61, 0x6c, 0x68, 0x61, 0x6c, 0x6c, 0x61, 0x50, 0x00, 0x50, 0x01, 0x50,
0x02, 0x50, 0x03, 0x50, 0x04, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
}
var (
file_api_proto_rawDescOnce sync.Once
file_api_proto_rawDescData = file_api_proto_rawDesc
)
func file_api_proto_rawDescGZIP() []byte {
file_api_proto_rawDescOnce.Do(func() {
file_api_proto_rawDescData = protoimpl.X.CompressGZIP(file_api_proto_rawDescData)
})
return file_api_proto_rawDescData
}
var file_api_proto_msgTypes = make([]protoimpl.MessageInfo, 1)
var file_api_proto_goTypes = []interface{}{
(*Api)(nil), // 0: valhalla.Api
(*Options)(nil), // 1: valhalla.Options
(*Trip)(nil), // 2: valhalla.Trip
(*Directions)(nil), // 3: valhalla.Directions
(*Status)(nil), // 4: valhalla.Status
(*Info)(nil), // 5: valhalla.Info
}
var file_api_proto_depIdxs = []int32{
1, // 0: valhalla.Api.options:type_name -> valhalla.Options
2, // 1: valhalla.Api.trip:type_name -> valhalla.Trip
3, // 2: valhalla.Api.directions:type_name -> valhalla.Directions
4, // 3: valhalla.Api.status:type_name -> valhalla.Status
5, // 4: valhalla.Api.info:type_name -> valhalla.Info
5, // [5:5] is the sub-list for method output_type
5, // [5:5] is the sub-list for method input_type
5, // [5:5] is the sub-list for extension type_name
5, // [5:5] is the sub-list for extension extendee
0, // [0:5] is the sub-list for field type_name
}
func init() { file_api_proto_init() }
func file_api_proto_init() {
if File_api_proto != nil {
return
}
file_options_proto_init()
file_trip_proto_init()
file_directions_proto_init()
file_info_proto_init()
file_status_proto_init()
if !protoimpl.UnsafeEnabled {
file_api_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*Api); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
}
type x struct{}
out := protoimpl.TypeBuilder{
File: protoimpl.DescBuilder{
GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
RawDescriptor: file_api_proto_rawDesc,
NumEnums: 0,
NumMessages: 1,
NumExtensions: 0,
NumServices: 0,
},
GoTypes: file_api_proto_goTypes,
DependencyIndexes: file_api_proto_depIdxs,
MessageInfos: file_api_proto_msgTypes,
}.Build()
File_api_proto = out.File
file_api_proto_rawDesc = nil
file_api_proto_goTypes = nil
file_api_proto_depIdxs = nil
}

28
proto/valhalla/api.proto Normal file
View File

@ -0,0 +1,28 @@
syntax = "proto3";
option optimize_for = LITE_RUNTIME;
package valhalla;
option go_package = "git.coopgo.io/coopgo-platform/routing-service/proto/valhalla";
import public "options.proto"; // the request, filled out by loki
import public "trip.proto"; // the paths, filled out by thor
import public "directions.proto"; // the directions, filled out by odin
import public "info.proto"; // statistics about the request, filled out by loki/thor/odin
import public "status.proto"; // info for status endpoint
message Api {
// this is the request to the api
Options options = 1;
// these are different responses based on the type of request you make
Trip trip = 2; // trace_attributes
Directions directions = 3; // route, optimized_route, trace_route, centroid
Status status = 4; // status
//TODO: isochrone
//TODO: matrix
//TODO: locate
//TODO: height
//TODO: expansion
// here we store a bit of info about what happened during request processing (stats/errors/warnings)
Info info = 20;
}

3040
proto/valhalla/common.pb.go Normal file

File diff suppressed because it is too large Load Diff

281
proto/valhalla/common.proto Normal file
View File

@ -0,0 +1,281 @@
syntax = "proto3";
option optimize_for = LITE_RUNTIME;
package valhalla;
option go_package = "git.coopgo.io/coopgo-platform/routing-service/proto/valhalla";
message LatLng {
oneof has_lat {
double lat = 1;
}
oneof has_lng {
double lng = 2;
}
}
message BoundingBox {
LatLng min_ll = 1;
LatLng max_ll = 2;
}
message SearchFilter {
// frc
oneof has_min_road_class {
RoadClass min_road_class = 1; // lowest road class to allow in loki results [default = kServiceOther]
}
oneof has_max_road_class {
RoadClass max_road_class = 2; // highest road class to allow in loki results [default = kMotorway]
}
// form of way
bool exclude_tunnel = 3; // whether to exclude tunnels from loki results [default = false]
bool exclude_bridge = 4; // whether to exclude bridges from loki results [default = false]
bool exclude_ramp = 5; // whether to exclude roads with ramp use from loki results [default = false]
oneof has_exclude_closures {
bool exclude_closures = 6;// whether to exclude roads marked as closed due to traffic [default = true]
}
}
message PathEdge {
uint64 graph_id = 1;
double percent_along = 2;
LatLng ll = 3;
Location.SideOfStreet side_of_street = 4;
double distance = 5;
bool begin_node = 7;
bool end_node = 8;
repeated string names = 10;
int32 outbound_reach = 11;
int32 inbound_reach = 12;
float heading = 13;
}
// Output information about how the location object below is correlated to the graph or to the route etc
message Correlation {
repeated PathEdge edges = 1;
repeated PathEdge filtered_edges = 2;
uint32 original_index = 3;
LatLng projected_ll = 4;
uint32 leg_shape_index = 5;
double distance_from_leg_origin = 6;
uint32 route_index = 7; // primarily for matchings index in osrm map matching
uint32 waypoint_index = 8; // primarily for matched point index in osrm map matching
}
message Location {
enum Type {
kBreak = 0;
kThrough = 1;
kVia = 2;
kBreakThrough = 3;
}
enum PreferredSide {
either = 0;
same = 1;
opposite = 2;
}
enum SideOfStreet {
kNone = 0;
kLeft = 1;
kRight = 2;
}
LatLng ll = 1;
Type type = 2; // [default = kBreak]
oneof has_heading {
uint32 heading = 3; // 0-359
}
string name = 4;
string street = 5;
string date_time = 12;
SideOfStreet side_of_street = 13;
oneof has_heading_tolerance {
uint32 heading_tolerance = 14;
}
oneof has_node_snap_tolerance {
uint32 node_snap_tolerance = 15;
}
oneof has_minimum_reachability {
uint32 minimum_reachability = 17;
}
oneof has_radius {
uint32 radius = 18;
}
oneof has_accuracy {
uint32 accuracy = 19;
}
oneof has_time {
double time = 20;
}
bool skip_ranking_candidates = 21;
PreferredSide preferred_side = 22;
LatLng display_ll = 23;
oneof has_search_cutoff {
uint32 search_cutoff = 24;
}
oneof has_street_side_tolerance {
uint32 street_side_tolerance = 25;
}
SearchFilter search_filter = 26;
oneof has_street_side_max_distance {
uint32 street_side_max_distance = 27;
}
oneof has_preferred_layer {
int32 preferred_layer = 28;
}
float waiting_secs = 29; // waiting period before a new leg starts, e.g. for servicing/loading goods
// This information will be ignored if provided in the request. Instead it will be filled in as the request is handled
Correlation correlation = 90;
}
message TransitEgressInfo {
string onestop_id = 1; // Unique transitland ID
string name = 2; // The name of the egress
LatLng ll = 3; // Latitude, longitude of the egress
}
message TransitStationInfo {
string onestop_id = 1; // Unique transitland ID
string name = 2; // The name of the station
LatLng ll = 3; // Latitude, longitude of the station
}
message BikeShareStationInfo {
string name = 1;
string ref = 2;
uint32 capacity = 3;
string network = 4;
string operator = 5;
float rent_cost = 6;
float return_cost = 7;
}
message TransitPlatformInfo {
enum Type {
kStop = 0;
kStation = 1;
}
Type type = 1; // The type of stop (station or simple stop)
string onestop_id = 2; // Unique transitland ID
string name = 3; // The name of the platform
string arrival_date_time = 4; // ISO 8601 arrival date/time YYYY-MM-DDThh:mm
string departure_date_time = 5; // ISO 8601 departure date/time YYYY-MM-DDThh:mm
bool assumed_schedule = 6; // true if the times are based on an assumed schedule
LatLng ll = 7; // Latitude, longitude of the transit stop
string station_onestop_id = 8; // Unique transitland station ID
string station_name = 9; // The station name of the platform
}
message TransitRouteInfo {
string onestop_id = 1;
uint32 block_id = 2;
uint32 trip_id = 3;
string short_name = 4;
string long_name = 5;
string headsign = 6;
uint32 color = 7;
uint32 text_color = 8;
string description = 9;
string operator_onestop_id = 10;
string operator_name = 11;
string operator_url = 12;
repeated TransitPlatformInfo transit_stops = 13;
}
message Pronunciation {
enum Alphabet {
kIpa = 0;
kXKatakana = 1;
kXJeita = 2;
kNtSampa = 3;
}
Alphabet alphabet = 1;
string value = 2;
}
message StreetName {
string value = 1; // The actual street name value, examples: I 95 North or Derry Street
bool is_route_number = 2; // true if the street name is a reference route number such as: I 81 South or US 322 West
Pronunciation pronunciation = 3; // The pronunciation associated with this street name
}
message TurnLane {
enum State {
kInvalid = 0;
kValid = 1;
kActive = 2;
}
uint32 directions_mask = 1;
State state = 2;
uint32 active_direction = 3;
}
enum RoadClass {
kMotorway = 0;
kTrunk = 1;
kPrimary = 2;
kSecondary = 3;
kTertiary = 4;
kUnclassified = 5;
kResidential = 6;
kServiceOther = 7;
}
message TaggedValue {
// dont renumber these they match the c++ definitions
enum Type {
kNone = 0;
kLayer = 1;
kPronunciation = 2;
kBssInfo = 3;
kLevel = 4;
kLevelRef = 5;
kTunnel = 49;
kBridge = 50;
}
bytes value = 1; // The actual tagged name value, examples: Ted Williams Tunnel
Type type = 2; // The type of tagged name (tunnel or bridge)
}
enum TravelMode {
kDrive = 0;
kPedestrian = 1;
kBicycle = 2;
kTransit = 3;
}
// TODO: review and update as needed
enum VehicleType {
kCar = 0;
kMotorcycle = 1;
kAutoBus = 2;
kTractorTrailer = 3;
kMotorScooter = 4;
}
// TODO: review and update as needed
enum PedestrianType {
kFoot = 0;
kWheelchair = 1;
kSegway = 2;
}
enum BicycleType {
kRoad = 0;
kCross = 1;
kHybrid = 2;
kMountain = 3;
}
enum TransitType {
kTram = 0;
kMetro = 1;
kRail = 2;
kBus = 3;
kFerry = 4;
kCableCar = 5;
kGondola = 6;
kFunicular = 7;
}

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,161 @@
syntax = "proto3";
option optimize_for = LITE_RUNTIME;
package valhalla;
option go_package = "git.coopgo.io/coopgo-platform/routing-service/proto/valhalla";
import public "common.proto";
import public "sign.proto";
message DirectionsLeg {
message Summary {
float length = 1; // kilometers or miles based on units
double time = 2; // seconds
BoundingBox bbox = 3; // Bounding box of the shape
bool has_time_restrictions = 4; // Does the route contain any time restrictions?
bool has_toll = 5;
bool has_ferry = 6;
bool has_highway = 7;
}
message GuidanceView {
enum Type{
kJunction = 0;
kSapa = 1;
kTollbranch = 2;
kAftertoll = 3;
kEnt = 4;
kExit = 5;
kCityreal = 6;
kDirectionboard = 7;
kSignboard = 8;
}
string data_id = 1; // TODO future enum as data id?
Type type = 2; // The type of guidance view
string base_id = 3; // Image base id
repeated string overlay_ids = 4; // List of overlay ids
}
message Maneuver {
enum CardinalDirection {
kNorth = 0;
kNorthEast = 1;
kEast = 2;
kSouthEast = 3;
kSouth = 4;
kSouthWest = 5;
kWest = 6;
kNorthWest = 7;
}
// TODO - add others later
enum Type {
kNone = 0;
kStart = 1;
kStartRight = 2;
kStartLeft = 3;
kDestination = 4;
kDestinationRight = 5;
kDestinationLeft = 6;
kBecomes = 7;
kContinue = 8;
kSlightRight = 9;
kRight = 10;
kSharpRight = 11;
kUturnRight = 12;
kUturnLeft = 13;
kSharpLeft = 14;
kLeft = 15;
kSlightLeft = 16;
kRampStraight = 17;
kRampRight = 18;
kRampLeft = 19;
kExitRight = 20;
kExitLeft = 21;
kStayStraight = 22;
kStayRight = 23;
kStayLeft = 24;
kMerge = 25;
kRoundaboutEnter = 26;
kRoundaboutExit = 27;
kFerryEnter = 28;
kFerryExit = 29;
kTransit = 30;
kTransitTransfer = 31;
kTransitRemainOn = 32;
kTransitConnectionStart = 33;
kTransitConnectionTransfer = 34;
kTransitConnectionDestination = 35;
kPostTransitConnectionDestination = 36;
kMergeRight = 37;
kMergeLeft = 38;
kElevatorEnter = 39;
kStepsEnter = 40;
kEscalatorEnter = 41;
kBuildingEnter = 42;
kBuildingExit = 43;
}
enum BssManeuverType{
kNoneAction = 0;
kRentBikeAtBikeShare = 1;
kReturnBikeAtBikeShare = 2;
}
Type type = 1; // Maneuver type
string text_instruction = 2; // text instruction
repeated StreetName street_name = 3; // street names
float length = 4; // kilometers or miles based on units
double time = 5; // seconds
CardinalDirection begin_cardinal_direction = 6; // CardinalDirection
uint32 begin_heading = 7; // 0-360
uint32 begin_shape_index = 8; // inclusive index
uint32 end_shape_index = 9; // inclusive index
bool portions_toll = 10; // has portions toll
bool portions_unpaved = 11; // has portions unpaved
string verbal_transition_alert_instruction = 12; // verbal transition alert instruction
string verbal_pre_transition_instruction = 13; // verbal pre-transition instruction
string verbal_post_transition_instruction = 14; // verbal post-transition instruction
repeated StreetName begin_street_name = 15; // begin street names
TripSign sign = 16; // associated sign information, for example: exit number
uint32 roundabout_exit_count = 17; // which spoke to exit roundabout after entering
string depart_instruction = 18; // depart instruction - used with transit
string verbal_depart_instruction = 19; // verbal depart instruction - used with transit
string arrive_instruction = 20; // arrive instruction - used with transit
string verbal_arrive_instruction = 21; // verbal arrive instruction - used with transit
TransitRouteInfo transit_info = 22; // transit attributes including a list of transit stops
bool verbal_multi_cue = 23; // verbal multi-cue flag
TravelMode travel_mode = 24; // travel mode
VehicleType vehicle_type = 25;
PedestrianType pedestrian_type = 26;
BicycleType bicycle_type = 27;
TransitType transit_type = 28;
uint32 begin_path_index = 29; // Index in TripPath for first node of maneuver
uint32 end_path_index = 30; // Index in TripPath for last node of maneuver
bool to_stay_on = 31; // True if same name as previous maneuver
repeated StreetName roundabout_exit_street_names = 32;// Outbound street names from roundabout
uint32 turn_degree = 33; // Turn degree of maneuver
bool has_time_restrictions = 34; // Whether edge has any time restrictions or not
repeated GuidanceView guidance_views = 35; // List of guidance views
BssManeuverType bss_maneuver_type = 36;
string verbal_succinct_transition_instruction = 37; // verbal succinct transition instruction
BikeShareStationInfo bss_info = 38; // Bike Share Station Info
bool portions_highway = 39; // has portions highway
bool portions_ferry = 40; // has portions ferry
}
uint64 trip_id = 1;
uint32 leg_id = 2;
uint32 leg_count = 3;
repeated Location location = 4;
Summary summary = 5;
repeated Maneuver maneuver = 6;
string shape = 7;
}
message DirectionsRoute {
repeated DirectionsLeg legs = 1;
}
message Directions {
repeated DirectionsRoute routes = 1;
}

View File

@ -0,0 +1,740 @@
// File contains definitions for side-loaded data-structures
//
// Because of the more distributed nature of this data
// compared to the previous protobuf structures used in Valhalla
// it is important to follow the protobuf schema evolution rules
// when modifying this file
// Code generated by protoc-gen-go. DO NOT EDIT.
// versions:
// protoc-gen-go v1.28.0
// protoc v3.19.4
// source: incidents.proto
package valhalla
import (
protoreflect "google.golang.org/protobuf/reflect/protoreflect"
protoimpl "google.golang.org/protobuf/runtime/protoimpl"
reflect "reflect"
sync "sync"
)
const (
// Verify that this generated code is sufficiently up-to-date.
_ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion)
// Verify that runtime/protoimpl is sufficiently up-to-date.
_ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20)
)
type IncidentsTile_Metadata_Type int32
const (
IncidentsTile_Metadata_ACCIDENT IncidentsTile_Metadata_Type = 0
IncidentsTile_Metadata_CONGESTION IncidentsTile_Metadata_Type = 1
IncidentsTile_Metadata_CONSTRUCTION IncidentsTile_Metadata_Type = 2
IncidentsTile_Metadata_DISABLED_VEHICLE IncidentsTile_Metadata_Type = 3
IncidentsTile_Metadata_LANE_RESTRICTION IncidentsTile_Metadata_Type = 4
IncidentsTile_Metadata_MASS_TRANSIT IncidentsTile_Metadata_Type = 5
IncidentsTile_Metadata_MISCELLANEOUS IncidentsTile_Metadata_Type = 6
IncidentsTile_Metadata_OTHER_NEWS IncidentsTile_Metadata_Type = 7
IncidentsTile_Metadata_PLANNED_EVENT IncidentsTile_Metadata_Type = 8
IncidentsTile_Metadata_ROAD_CLOSURE IncidentsTile_Metadata_Type = 9
IncidentsTile_Metadata_ROAD_HAZARD IncidentsTile_Metadata_Type = 10
IncidentsTile_Metadata_WEATHER IncidentsTile_Metadata_Type = 11
)
// Enum value maps for IncidentsTile_Metadata_Type.
var (
IncidentsTile_Metadata_Type_name = map[int32]string{
0: "ACCIDENT",
1: "CONGESTION",
2: "CONSTRUCTION",
3: "DISABLED_VEHICLE",
4: "LANE_RESTRICTION",
5: "MASS_TRANSIT",
6: "MISCELLANEOUS",
7: "OTHER_NEWS",
8: "PLANNED_EVENT",
9: "ROAD_CLOSURE",
10: "ROAD_HAZARD",
11: "WEATHER",
}
IncidentsTile_Metadata_Type_value = map[string]int32{
"ACCIDENT": 0,
"CONGESTION": 1,
"CONSTRUCTION": 2,
"DISABLED_VEHICLE": 3,
"LANE_RESTRICTION": 4,
"MASS_TRANSIT": 5,
"MISCELLANEOUS": 6,
"OTHER_NEWS": 7,
"PLANNED_EVENT": 8,
"ROAD_CLOSURE": 9,
"ROAD_HAZARD": 10,
"WEATHER": 11,
}
)
func (x IncidentsTile_Metadata_Type) Enum() *IncidentsTile_Metadata_Type {
p := new(IncidentsTile_Metadata_Type)
*p = x
return p
}
func (x IncidentsTile_Metadata_Type) String() string {
return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x))
}
func (IncidentsTile_Metadata_Type) Descriptor() protoreflect.EnumDescriptor {
return file_incidents_proto_enumTypes[0].Descriptor()
}
func (IncidentsTile_Metadata_Type) Type() protoreflect.EnumType {
return &file_incidents_proto_enumTypes[0]
}
func (x IncidentsTile_Metadata_Type) Number() protoreflect.EnumNumber {
return protoreflect.EnumNumber(x)
}
// Deprecated: Use IncidentsTile_Metadata_Type.Descriptor instead.
func (IncidentsTile_Metadata_Type) EnumDescriptor() ([]byte, []int) {
return file_incidents_proto_rawDescGZIP(), []int{0, 1, 0}
}
type IncidentsTile_Metadata_Impact int32
const (
IncidentsTile_Metadata_UNKNOWN IncidentsTile_Metadata_Impact = 0
IncidentsTile_Metadata_CRITICAL IncidentsTile_Metadata_Impact = 1
IncidentsTile_Metadata_MAJOR IncidentsTile_Metadata_Impact = 2
IncidentsTile_Metadata_MINOR IncidentsTile_Metadata_Impact = 3
IncidentsTile_Metadata_LOW IncidentsTile_Metadata_Impact = 4
)
// Enum value maps for IncidentsTile_Metadata_Impact.
var (
IncidentsTile_Metadata_Impact_name = map[int32]string{
0: "UNKNOWN",
1: "CRITICAL",
2: "MAJOR",
3: "MINOR",
4: "LOW",
}
IncidentsTile_Metadata_Impact_value = map[string]int32{
"UNKNOWN": 0,
"CRITICAL": 1,
"MAJOR": 2,
"MINOR": 3,
"LOW": 4,
}
)
func (x IncidentsTile_Metadata_Impact) Enum() *IncidentsTile_Metadata_Impact {
p := new(IncidentsTile_Metadata_Impact)
*p = x
return p
}
func (x IncidentsTile_Metadata_Impact) String() string {
return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x))
}
func (IncidentsTile_Metadata_Impact) Descriptor() protoreflect.EnumDescriptor {
return file_incidents_proto_enumTypes[1].Descriptor()
}
func (IncidentsTile_Metadata_Impact) Type() protoreflect.EnumType {
return &file_incidents_proto_enumTypes[1]
}
func (x IncidentsTile_Metadata_Impact) Number() protoreflect.EnumNumber {
return protoreflect.EnumNumber(x)
}
// Deprecated: Use IncidentsTile_Metadata_Impact.Descriptor instead.
func (IncidentsTile_Metadata_Impact) EnumDescriptor() ([]byte, []int) {
return file_incidents_proto_rawDescGZIP(), []int{0, 1, 1}
}
type IncidentsTile struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
// Sorted list of edge_ids describing what incidents are attached to an edge_id
Locations []*IncidentsTile_Location `protobuf:"bytes,1,rep,name=locations,proto3" json:"locations,omitempty"`
// Look at `incident_locations` to find how to index this array
Metadata []*IncidentsTile_Metadata `protobuf:"bytes,2,rep,name=metadata,proto3" json:"metadata,omitempty"`
}
func (x *IncidentsTile) Reset() {
*x = IncidentsTile{}
if protoimpl.UnsafeEnabled {
mi := &file_incidents_proto_msgTypes[0]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *IncidentsTile) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*IncidentsTile) ProtoMessage() {}
func (x *IncidentsTile) ProtoReflect() protoreflect.Message {
mi := &file_incidents_proto_msgTypes[0]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use IncidentsTile.ProtoReflect.Descriptor instead.
func (*IncidentsTile) Descriptor() ([]byte, []int) {
return file_incidents_proto_rawDescGZIP(), []int{0}
}
func (x *IncidentsTile) GetLocations() []*IncidentsTile_Location {
if x != nil {
return x.Locations
}
return nil
}
func (x *IncidentsTile) GetMetadata() []*IncidentsTile_Metadata {
if x != nil {
return x.Metadata
}
return nil
}
// Links a portion of an edge to incident metadata
type IncidentsTile_Location struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
EdgeIndex uint32 `protobuf:"varint,1,opt,name=edge_index,json=edgeIndex,proto3" json:"edge_index,omitempty"`
StartOffset float32 `protobuf:"fixed32,2,opt,name=start_offset,json=startOffset,proto3" json:"start_offset,omitempty"`
EndOffset float32 `protobuf:"fixed32,3,opt,name=end_offset,json=endOffset,proto3" json:"end_offset,omitempty"`
MetadataIndex uint32 `protobuf:"varint,4,opt,name=metadata_index,json=metadataIndex,proto3" json:"metadata_index,omitempty"`
}
func (x *IncidentsTile_Location) Reset() {
*x = IncidentsTile_Location{}
if protoimpl.UnsafeEnabled {
mi := &file_incidents_proto_msgTypes[1]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *IncidentsTile_Location) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*IncidentsTile_Location) ProtoMessage() {}
func (x *IncidentsTile_Location) ProtoReflect() protoreflect.Message {
mi := &file_incidents_proto_msgTypes[1]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use IncidentsTile_Location.ProtoReflect.Descriptor instead.
func (*IncidentsTile_Location) Descriptor() ([]byte, []int) {
return file_incidents_proto_rawDescGZIP(), []int{0, 0}
}
func (x *IncidentsTile_Location) GetEdgeIndex() uint32 {
if x != nil {
return x.EdgeIndex
}
return 0
}
func (x *IncidentsTile_Location) GetStartOffset() float32 {
if x != nil {
return x.StartOffset
}
return 0
}
func (x *IncidentsTile_Location) GetEndOffset() float32 {
if x != nil {
return x.EndOffset
}
return 0
}
func (x *IncidentsTile_Location) GetMetadataIndex() uint32 {
if x != nil {
return x.MetadataIndex
}
return 0
}
// A single incident is described by this
// TODO This is not yet finalized
type IncidentsTile_Metadata struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
Type IncidentsTile_Metadata_Type `protobuf:"varint,1,opt,name=type,proto3,enum=valhalla.IncidentsTile_Metadata_Type" json:"type,omitempty"`
AlertcCodes []uint32 `protobuf:"varint,2,rep,packed,name=alertc_codes,json=alertcCodes,proto3" json:"alertc_codes,omitempty"`
Description string `protobuf:"bytes,3,opt,name=description,proto3" json:"description,omitempty"`
SubType string `protobuf:"bytes,4,opt,name=sub_type,json=subType,proto3" json:"sub_type,omitempty"`
SubTypeDescription string `protobuf:"bytes,5,opt,name=sub_type_description,json=subTypeDescription,proto3" json:"sub_type_description,omitempty"`
StartTime uint64 `protobuf:"varint,6,opt,name=start_time,json=startTime,proto3" json:"start_time,omitempty"`
EndTime uint64 `protobuf:"varint,7,opt,name=end_time,json=endTime,proto3" json:"end_time,omitempty"`
Impact IncidentsTile_Metadata_Impact `protobuf:"varint,9,opt,name=impact,proto3,enum=valhalla.IncidentsTile_Metadata_Impact" json:"impact,omitempty"`
RoadClosed bool `protobuf:"varint,10,opt,name=road_closed,json=roadClosed,proto3" json:"road_closed,omitempty"`
Congestion *IncidentsTile_Metadata_Congestion `protobuf:"bytes,11,opt,name=congestion,proto3" json:"congestion,omitempty"`
LanesBlocked []string `protobuf:"bytes,12,rep,name=lanes_blocked,json=lanesBlocked,proto3" json:"lanes_blocked,omitempty"`
CreationTime uint64 `protobuf:"varint,13,opt,name=creation_time,json=creationTime,proto3" json:"creation_time,omitempty"`
LongDescription string `protobuf:"bytes,14,opt,name=long_description,json=longDescription,proto3" json:"long_description,omitempty"`
ClearLanes string `protobuf:"bytes,15,opt,name=clear_lanes,json=clearLanes,proto3" json:"clear_lanes,omitempty"`
NumLanesBlocked uint64 `protobuf:"varint,16,opt,name=num_lanes_blocked,json=numLanesBlocked,proto3" json:"num_lanes_blocked,omitempty"`
Length uint32 `protobuf:"varint,17,opt,name=length,proto3" json:"length,omitempty"` // Length of incident as matched to road graph
// IncidentMetadata id
Id uint64 `protobuf:"varint,128,opt,name=id,proto3" json:"id,omitempty"`
// Country code (2 & 3 char codes)
Iso_3166_1Alpha2 string `protobuf:"bytes,129,opt,name=iso_3166_1_alpha2,json=iso31661Alpha2,proto3" json:"iso_3166_1_alpha2,omitempty"`
Iso_3166_1Alpha3 string `protobuf:"bytes,130,opt,name=iso_3166_1_alpha3,json=iso31661Alpha3,proto3" json:"iso_3166_1_alpha3,omitempty"`
}
func (x *IncidentsTile_Metadata) Reset() {
*x = IncidentsTile_Metadata{}
if protoimpl.UnsafeEnabled {
mi := &file_incidents_proto_msgTypes[2]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *IncidentsTile_Metadata) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*IncidentsTile_Metadata) ProtoMessage() {}
func (x *IncidentsTile_Metadata) ProtoReflect() protoreflect.Message {
mi := &file_incidents_proto_msgTypes[2]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use IncidentsTile_Metadata.ProtoReflect.Descriptor instead.
func (*IncidentsTile_Metadata) Descriptor() ([]byte, []int) {
return file_incidents_proto_rawDescGZIP(), []int{0, 1}
}
func (x *IncidentsTile_Metadata) GetType() IncidentsTile_Metadata_Type {
if x != nil {
return x.Type
}
return IncidentsTile_Metadata_ACCIDENT
}
func (x *IncidentsTile_Metadata) GetAlertcCodes() []uint32 {
if x != nil {
return x.AlertcCodes
}
return nil
}
func (x *IncidentsTile_Metadata) GetDescription() string {
if x != nil {
return x.Description
}
return ""
}
func (x *IncidentsTile_Metadata) GetSubType() string {
if x != nil {
return x.SubType
}
return ""
}
func (x *IncidentsTile_Metadata) GetSubTypeDescription() string {
if x != nil {
return x.SubTypeDescription
}
return ""
}
func (x *IncidentsTile_Metadata) GetStartTime() uint64 {
if x != nil {
return x.StartTime
}
return 0
}
func (x *IncidentsTile_Metadata) GetEndTime() uint64 {
if x != nil {
return x.EndTime
}
return 0
}
func (x *IncidentsTile_Metadata) GetImpact() IncidentsTile_Metadata_Impact {
if x != nil {
return x.Impact
}
return IncidentsTile_Metadata_UNKNOWN
}
func (x *IncidentsTile_Metadata) GetRoadClosed() bool {
if x != nil {
return x.RoadClosed
}
return false
}
func (x *IncidentsTile_Metadata) GetCongestion() *IncidentsTile_Metadata_Congestion {
if x != nil {
return x.Congestion
}
return nil
}
func (x *IncidentsTile_Metadata) GetLanesBlocked() []string {
if x != nil {
return x.LanesBlocked
}
return nil
}
func (x *IncidentsTile_Metadata) GetCreationTime() uint64 {
if x != nil {
return x.CreationTime
}
return 0
}
func (x *IncidentsTile_Metadata) GetLongDescription() string {
if x != nil {
return x.LongDescription
}
return ""
}
func (x *IncidentsTile_Metadata) GetClearLanes() string {
if x != nil {
return x.ClearLanes
}
return ""
}
func (x *IncidentsTile_Metadata) GetNumLanesBlocked() uint64 {
if x != nil {
return x.NumLanesBlocked
}
return 0
}
func (x *IncidentsTile_Metadata) GetLength() uint32 {
if x != nil {
return x.Length
}
return 0
}
func (x *IncidentsTile_Metadata) GetId() uint64 {
if x != nil {
return x.Id
}
return 0
}
func (x *IncidentsTile_Metadata) GetIso_3166_1Alpha2() string {
if x != nil {
return x.Iso_3166_1Alpha2
}
return ""
}
func (x *IncidentsTile_Metadata) GetIso_3166_1Alpha3() string {
if x != nil {
return x.Iso_3166_1Alpha3
}
return ""
}
type IncidentsTile_Metadata_Congestion struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
Value uint32 `protobuf:"varint,1,opt,name=value,proto3" json:"value,omitempty"`
}
func (x *IncidentsTile_Metadata_Congestion) Reset() {
*x = IncidentsTile_Metadata_Congestion{}
if protoimpl.UnsafeEnabled {
mi := &file_incidents_proto_msgTypes[3]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *IncidentsTile_Metadata_Congestion) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*IncidentsTile_Metadata_Congestion) ProtoMessage() {}
func (x *IncidentsTile_Metadata_Congestion) ProtoReflect() protoreflect.Message {
mi := &file_incidents_proto_msgTypes[3]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use IncidentsTile_Metadata_Congestion.ProtoReflect.Descriptor instead.
func (*IncidentsTile_Metadata_Congestion) Descriptor() ([]byte, []int) {
return file_incidents_proto_rawDescGZIP(), []int{0, 1, 0}
}
func (x *IncidentsTile_Metadata_Congestion) GetValue() uint32 {
if x != nil {
return x.Value
}
return 0
}
var File_incidents_proto protoreflect.FileDescriptor
var file_incidents_proto_rawDesc = []byte{
0x0a, 0x0f, 0x69, 0x6e, 0x63, 0x69, 0x64, 0x65, 0x6e, 0x74, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74,
0x6f, 0x12, 0x08, 0x76, 0x61, 0x6c, 0x68, 0x61, 0x6c, 0x6c, 0x61, 0x22, 0xed, 0x0a, 0x0a, 0x0d,
0x49, 0x6e, 0x63, 0x69, 0x64, 0x65, 0x6e, 0x74, 0x73, 0x54, 0x69, 0x6c, 0x65, 0x12, 0x3e, 0x0a,
0x09, 0x6c, 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b,
0x32, 0x20, 0x2e, 0x76, 0x61, 0x6c, 0x68, 0x61, 0x6c, 0x6c, 0x61, 0x2e, 0x49, 0x6e, 0x63, 0x69,
0x64, 0x65, 0x6e, 0x74, 0x73, 0x54, 0x69, 0x6c, 0x65, 0x2e, 0x4c, 0x6f, 0x63, 0x61, 0x74, 0x69,
0x6f, 0x6e, 0x52, 0x09, 0x6c, 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x3c, 0x0a,
0x08, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32,
0x20, 0x2e, 0x76, 0x61, 0x6c, 0x68, 0x61, 0x6c, 0x6c, 0x61, 0x2e, 0x49, 0x6e, 0x63, 0x69, 0x64,
0x65, 0x6e, 0x74, 0x73, 0x54, 0x69, 0x6c, 0x65, 0x2e, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74,
0x61, 0x52, 0x08, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x1a, 0x92, 0x01, 0x0a, 0x08,
0x4c, 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x1d, 0x0a, 0x0a, 0x65, 0x64, 0x67, 0x65,
0x5f, 0x69, 0x6e, 0x64, 0x65, 0x78, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x09, 0x65, 0x64,
0x67, 0x65, 0x49, 0x6e, 0x64, 0x65, 0x78, 0x12, 0x21, 0x0a, 0x0c, 0x73, 0x74, 0x61, 0x72, 0x74,
0x5f, 0x6f, 0x66, 0x66, 0x73, 0x65, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x02, 0x52, 0x0b, 0x73,
0x74, 0x61, 0x72, 0x74, 0x4f, 0x66, 0x66, 0x73, 0x65, 0x74, 0x12, 0x1d, 0x0a, 0x0a, 0x65, 0x6e,
0x64, 0x5f, 0x6f, 0x66, 0x66, 0x73, 0x65, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x02, 0x52, 0x09,
0x65, 0x6e, 0x64, 0x4f, 0x66, 0x66, 0x73, 0x65, 0x74, 0x12, 0x25, 0x0a, 0x0e, 0x6d, 0x65, 0x74,
0x61, 0x64, 0x61, 0x74, 0x61, 0x5f, 0x69, 0x6e, 0x64, 0x65, 0x78, 0x18, 0x04, 0x20, 0x01, 0x28,
0x0d, 0x52, 0x0d, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x49, 0x6e, 0x64, 0x65, 0x78,
0x1a, 0xc8, 0x08, 0x0a, 0x08, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x12, 0x39, 0x0a,
0x04, 0x74, 0x79, 0x70, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x25, 0x2e, 0x76, 0x61,
0x6c, 0x68, 0x61, 0x6c, 0x6c, 0x61, 0x2e, 0x49, 0x6e, 0x63, 0x69, 0x64, 0x65, 0x6e, 0x74, 0x73,
0x54, 0x69, 0x6c, 0x65, 0x2e, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x54, 0x79,
0x70, 0x65, 0x52, 0x04, 0x74, 0x79, 0x70, 0x65, 0x12, 0x21, 0x0a, 0x0c, 0x61, 0x6c, 0x65, 0x72,
0x74, 0x63, 0x5f, 0x63, 0x6f, 0x64, 0x65, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0d, 0x52, 0x0b,
0x61, 0x6c, 0x65, 0x72, 0x74, 0x63, 0x43, 0x6f, 0x64, 0x65, 0x73, 0x12, 0x20, 0x0a, 0x0b, 0x64,
0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09,
0x52, 0x0b, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x19, 0x0a,
0x08, 0x73, 0x75, 0x62, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52,
0x07, 0x73, 0x75, 0x62, 0x54, 0x79, 0x70, 0x65, 0x12, 0x30, 0x0a, 0x14, 0x73, 0x75, 0x62, 0x5f,
0x74, 0x79, 0x70, 0x65, 0x5f, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e,
0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x12, 0x73, 0x75, 0x62, 0x54, 0x79, 0x70, 0x65, 0x44,
0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x1d, 0x0a, 0x0a, 0x73, 0x74,
0x61, 0x72, 0x74, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x18, 0x06, 0x20, 0x01, 0x28, 0x04, 0x52, 0x09,
0x73, 0x74, 0x61, 0x72, 0x74, 0x54, 0x69, 0x6d, 0x65, 0x12, 0x19, 0x0a, 0x08, 0x65, 0x6e, 0x64,
0x5f, 0x74, 0x69, 0x6d, 0x65, 0x18, 0x07, 0x20, 0x01, 0x28, 0x04, 0x52, 0x07, 0x65, 0x6e, 0x64,
0x54, 0x69, 0x6d, 0x65, 0x12, 0x3f, 0x0a, 0x06, 0x69, 0x6d, 0x70, 0x61, 0x63, 0x74, 0x18, 0x09,
0x20, 0x01, 0x28, 0x0e, 0x32, 0x27, 0x2e, 0x76, 0x61, 0x6c, 0x68, 0x61, 0x6c, 0x6c, 0x61, 0x2e,
0x49, 0x6e, 0x63, 0x69, 0x64, 0x65, 0x6e, 0x74, 0x73, 0x54, 0x69, 0x6c, 0x65, 0x2e, 0x4d, 0x65,
0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x49, 0x6d, 0x70, 0x61, 0x63, 0x74, 0x52, 0x06, 0x69,
0x6d, 0x70, 0x61, 0x63, 0x74, 0x12, 0x1f, 0x0a, 0x0b, 0x72, 0x6f, 0x61, 0x64, 0x5f, 0x63, 0x6c,
0x6f, 0x73, 0x65, 0x64, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0a, 0x72, 0x6f, 0x61, 0x64,
0x43, 0x6c, 0x6f, 0x73, 0x65, 0x64, 0x12, 0x4b, 0x0a, 0x0a, 0x63, 0x6f, 0x6e, 0x67, 0x65, 0x73,
0x74, 0x69, 0x6f, 0x6e, 0x18, 0x0b, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2b, 0x2e, 0x76, 0x61, 0x6c,
0x68, 0x61, 0x6c, 0x6c, 0x61, 0x2e, 0x49, 0x6e, 0x63, 0x69, 0x64, 0x65, 0x6e, 0x74, 0x73, 0x54,
0x69, 0x6c, 0x65, 0x2e, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x43, 0x6f, 0x6e,
0x67, 0x65, 0x73, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x0a, 0x63, 0x6f, 0x6e, 0x67, 0x65, 0x73, 0x74,
0x69, 0x6f, 0x6e, 0x12, 0x23, 0x0a, 0x0d, 0x6c, 0x61, 0x6e, 0x65, 0x73, 0x5f, 0x62, 0x6c, 0x6f,
0x63, 0x6b, 0x65, 0x64, 0x18, 0x0c, 0x20, 0x03, 0x28, 0x09, 0x52, 0x0c, 0x6c, 0x61, 0x6e, 0x65,
0x73, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x65, 0x64, 0x12, 0x23, 0x0a, 0x0d, 0x63, 0x72, 0x65, 0x61,
0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x18, 0x0d, 0x20, 0x01, 0x28, 0x04, 0x52,
0x0c, 0x63, 0x72, 0x65, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x54, 0x69, 0x6d, 0x65, 0x12, 0x29, 0x0a,
0x10, 0x6c, 0x6f, 0x6e, 0x67, 0x5f, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f,
0x6e, 0x18, 0x0e, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0f, 0x6c, 0x6f, 0x6e, 0x67, 0x44, 0x65, 0x73,
0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x1f, 0x0a, 0x0b, 0x63, 0x6c, 0x65, 0x61,
0x72, 0x5f, 0x6c, 0x61, 0x6e, 0x65, 0x73, 0x18, 0x0f, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x63,
0x6c, 0x65, 0x61, 0x72, 0x4c, 0x61, 0x6e, 0x65, 0x73, 0x12, 0x2a, 0x0a, 0x11, 0x6e, 0x75, 0x6d,
0x5f, 0x6c, 0x61, 0x6e, 0x65, 0x73, 0x5f, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x65, 0x64, 0x18, 0x10,
0x20, 0x01, 0x28, 0x04, 0x52, 0x0f, 0x6e, 0x75, 0x6d, 0x4c, 0x61, 0x6e, 0x65, 0x73, 0x42, 0x6c,
0x6f, 0x63, 0x6b, 0x65, 0x64, 0x12, 0x16, 0x0a, 0x06, 0x6c, 0x65, 0x6e, 0x67, 0x74, 0x68, 0x18,
0x11, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x06, 0x6c, 0x65, 0x6e, 0x67, 0x74, 0x68, 0x12, 0x0f, 0x0a,
0x02, 0x69, 0x64, 0x18, 0x80, 0x01, 0x20, 0x01, 0x28, 0x04, 0x52, 0x02, 0x69, 0x64, 0x12, 0x2a,
0x0a, 0x11, 0x69, 0x73, 0x6f, 0x5f, 0x33, 0x31, 0x36, 0x36, 0x5f, 0x31, 0x5f, 0x61, 0x6c, 0x70,
0x68, 0x61, 0x32, 0x18, 0x81, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0e, 0x69, 0x73, 0x6f, 0x33,
0x31, 0x36, 0x36, 0x31, 0x41, 0x6c, 0x70, 0x68, 0x61, 0x32, 0x12, 0x2a, 0x0a, 0x11, 0x69, 0x73,
0x6f, 0x5f, 0x33, 0x31, 0x36, 0x36, 0x5f, 0x31, 0x5f, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x33, 0x18,
0x82, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0e, 0x69, 0x73, 0x6f, 0x33, 0x31, 0x36, 0x36, 0x31,
0x41, 0x6c, 0x70, 0x68, 0x61, 0x33, 0x1a, 0x22, 0x0a, 0x0a, 0x43, 0x6f, 0x6e, 0x67, 0x65, 0x73,
0x74, 0x69, 0x6f, 0x6e, 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x01, 0x20,
0x01, 0x28, 0x0d, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x22, 0xda, 0x01, 0x0a, 0x04, 0x54,
0x79, 0x70, 0x65, 0x12, 0x0c, 0x0a, 0x08, 0x41, 0x43, 0x43, 0x49, 0x44, 0x45, 0x4e, 0x54, 0x10,
0x00, 0x12, 0x0e, 0x0a, 0x0a, 0x43, 0x4f, 0x4e, 0x47, 0x45, 0x53, 0x54, 0x49, 0x4f, 0x4e, 0x10,
0x01, 0x12, 0x10, 0x0a, 0x0c, 0x43, 0x4f, 0x4e, 0x53, 0x54, 0x52, 0x55, 0x43, 0x54, 0x49, 0x4f,
0x4e, 0x10, 0x02, 0x12, 0x14, 0x0a, 0x10, 0x44, 0x49, 0x53, 0x41, 0x42, 0x4c, 0x45, 0x44, 0x5f,
0x56, 0x45, 0x48, 0x49, 0x43, 0x4c, 0x45, 0x10, 0x03, 0x12, 0x14, 0x0a, 0x10, 0x4c, 0x41, 0x4e,
0x45, 0x5f, 0x52, 0x45, 0x53, 0x54, 0x52, 0x49, 0x43, 0x54, 0x49, 0x4f, 0x4e, 0x10, 0x04, 0x12,
0x10, 0x0a, 0x0c, 0x4d, 0x41, 0x53, 0x53, 0x5f, 0x54, 0x52, 0x41, 0x4e, 0x53, 0x49, 0x54, 0x10,
0x05, 0x12, 0x11, 0x0a, 0x0d, 0x4d, 0x49, 0x53, 0x43, 0x45, 0x4c, 0x4c, 0x41, 0x4e, 0x45, 0x4f,
0x55, 0x53, 0x10, 0x06, 0x12, 0x0e, 0x0a, 0x0a, 0x4f, 0x54, 0x48, 0x45, 0x52, 0x5f, 0x4e, 0x45,
0x57, 0x53, 0x10, 0x07, 0x12, 0x11, 0x0a, 0x0d, 0x50, 0x4c, 0x41, 0x4e, 0x4e, 0x45, 0x44, 0x5f,
0x45, 0x56, 0x45, 0x4e, 0x54, 0x10, 0x08, 0x12, 0x10, 0x0a, 0x0c, 0x52, 0x4f, 0x41, 0x44, 0x5f,
0x43, 0x4c, 0x4f, 0x53, 0x55, 0x52, 0x45, 0x10, 0x09, 0x12, 0x0f, 0x0a, 0x0b, 0x52, 0x4f, 0x41,
0x44, 0x5f, 0x48, 0x41, 0x5a, 0x41, 0x52, 0x44, 0x10, 0x0a, 0x12, 0x0b, 0x0a, 0x07, 0x57, 0x45,
0x41, 0x54, 0x48, 0x45, 0x52, 0x10, 0x0b, 0x22, 0x42, 0x0a, 0x06, 0x49, 0x6d, 0x70, 0x61, 0x63,
0x74, 0x12, 0x0b, 0x0a, 0x07, 0x55, 0x4e, 0x4b, 0x4e, 0x4f, 0x57, 0x4e, 0x10, 0x00, 0x12, 0x0c,
0x0a, 0x08, 0x43, 0x52, 0x49, 0x54, 0x49, 0x43, 0x41, 0x4c, 0x10, 0x01, 0x12, 0x09, 0x0a, 0x05,
0x4d, 0x41, 0x4a, 0x4f, 0x52, 0x10, 0x02, 0x12, 0x09, 0x0a, 0x05, 0x4d, 0x49, 0x4e, 0x4f, 0x52,
0x10, 0x03, 0x12, 0x07, 0x0a, 0x03, 0x4c, 0x4f, 0x57, 0x10, 0x04, 0x42, 0x40, 0x48, 0x03, 0x5a,
0x3c, 0x67, 0x69, 0x74, 0x2e, 0x63, 0x6f, 0x6f, 0x70, 0x67, 0x6f, 0x2e, 0x69, 0x6f, 0x2f, 0x63,
0x6f, 0x6f, 0x70, 0x67, 0x6f, 0x2d, 0x70, 0x6c, 0x61, 0x74, 0x66, 0x6f, 0x72, 0x6d, 0x2f, 0x72,
0x6f, 0x75, 0x74, 0x69, 0x6e, 0x67, 0x2d, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2f, 0x70,
0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x76, 0x61, 0x6c, 0x68, 0x61, 0x6c, 0x6c, 0x61, 0x62, 0x06, 0x70,
0x72, 0x6f, 0x74, 0x6f, 0x33,
}
var (
file_incidents_proto_rawDescOnce sync.Once
file_incidents_proto_rawDescData = file_incidents_proto_rawDesc
)
func file_incidents_proto_rawDescGZIP() []byte {
file_incidents_proto_rawDescOnce.Do(func() {
file_incidents_proto_rawDescData = protoimpl.X.CompressGZIP(file_incidents_proto_rawDescData)
})
return file_incidents_proto_rawDescData
}
var file_incidents_proto_enumTypes = make([]protoimpl.EnumInfo, 2)
var file_incidents_proto_msgTypes = make([]protoimpl.MessageInfo, 4)
var file_incidents_proto_goTypes = []interface{}{
(IncidentsTile_Metadata_Type)(0), // 0: valhalla.IncidentsTile.Metadata.Type
(IncidentsTile_Metadata_Impact)(0), // 1: valhalla.IncidentsTile.Metadata.Impact
(*IncidentsTile)(nil), // 2: valhalla.IncidentsTile
(*IncidentsTile_Location)(nil), // 3: valhalla.IncidentsTile.Location
(*IncidentsTile_Metadata)(nil), // 4: valhalla.IncidentsTile.Metadata
(*IncidentsTile_Metadata_Congestion)(nil), // 5: valhalla.IncidentsTile.Metadata.Congestion
}
var file_incidents_proto_depIdxs = []int32{
3, // 0: valhalla.IncidentsTile.locations:type_name -> valhalla.IncidentsTile.Location
4, // 1: valhalla.IncidentsTile.metadata:type_name -> valhalla.IncidentsTile.Metadata
0, // 2: valhalla.IncidentsTile.Metadata.type:type_name -> valhalla.IncidentsTile.Metadata.Type
1, // 3: valhalla.IncidentsTile.Metadata.impact:type_name -> valhalla.IncidentsTile.Metadata.Impact
5, // 4: valhalla.IncidentsTile.Metadata.congestion:type_name -> valhalla.IncidentsTile.Metadata.Congestion
5, // [5:5] is the sub-list for method output_type
5, // [5:5] is the sub-list for method input_type
5, // [5:5] is the sub-list for extension type_name
5, // [5:5] is the sub-list for extension extendee
0, // [0:5] is the sub-list for field type_name
}
func init() { file_incidents_proto_init() }
func file_incidents_proto_init() {
if File_incidents_proto != nil {
return
}
if !protoimpl.UnsafeEnabled {
file_incidents_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*IncidentsTile); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_incidents_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*IncidentsTile_Location); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_incidents_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*IncidentsTile_Metadata); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_incidents_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*IncidentsTile_Metadata_Congestion); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
}
type x struct{}
out := protoimpl.TypeBuilder{
File: protoimpl.DescBuilder{
GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
RawDescriptor: file_incidents_proto_rawDesc,
NumEnums: 2,
NumMessages: 4,
NumExtensions: 0,
NumServices: 0,
},
GoTypes: file_incidents_proto_goTypes,
DependencyIndexes: file_incidents_proto_depIdxs,
EnumInfos: file_incidents_proto_enumTypes,
MessageInfos: file_incidents_proto_msgTypes,
}.Build()
File_incidents_proto = out.File
file_incidents_proto_rawDesc = nil
file_incidents_proto_goTypes = nil
file_incidents_proto_depIdxs = nil
}

View File

@ -0,0 +1,77 @@
// File contains definitions for side-loaded data-structures
//
// Because of the more distributed nature of this data
// compared to the previous protobuf structures used in Valhalla
// it is important to follow the protobuf schema evolution rules
// when modifying this file
syntax = "proto3";
option optimize_for = LITE_RUNTIME;
option go_package = "git.coopgo.io/coopgo-platform/routing-service/proto/valhalla";
package valhalla;
message IncidentsTile {
// Sorted list of edge_ids describing what incidents are attached to an edge_id
repeated Location locations = 1;
// Look at `incident_locations` to find how to index this array
repeated Metadata metadata = 2;
// Links a portion of an edge to incident metadata
message Location {
uint32 edge_index = 1;
float start_offset = 2;
float end_offset = 3;
uint32 metadata_index = 4;
}
// A single incident is described by this
// TODO This is not yet finalized
message Metadata {
enum Type {
ACCIDENT = 0;
CONGESTION = 1;
CONSTRUCTION = 2;
DISABLED_VEHICLE = 3;
LANE_RESTRICTION = 4;
MASS_TRANSIT = 5;
MISCELLANEOUS = 6;
OTHER_NEWS = 7;
PLANNED_EVENT = 8;
ROAD_CLOSURE = 9;
ROAD_HAZARD = 10;
WEATHER = 11;
}
Type type = 1;
repeated uint32 alertc_codes = 2;
string description = 3;
string sub_type = 4;
string sub_type_description = 5;
uint64 start_time = 6;
uint64 end_time = 7;
enum Impact {
UNKNOWN = 0;
CRITICAL = 1;
MAJOR = 2;
MINOR = 3;
LOW = 4;
}
Impact impact = 9;
bool road_closed = 10;
message Congestion {
uint32 value = 1;
}
Congestion congestion = 11;
repeated string lanes_blocked = 12;
uint64 creation_time = 13;
string long_description = 14;
string clear_lanes = 15;
uint64 num_lanes_blocked = 16;
uint32 length = 17; // Length of incident as matched to road graph
// IncidentMetadata id
uint64 id = 128;
// Country code (2 & 3 char codes)
string iso_3166_1_alpha2 = 129;
string iso_3166_1_alpha3 = 130;
}
}

407
proto/valhalla/info.pb.go Normal file
View File

@ -0,0 +1,407 @@
// Code generated by protoc-gen-go. DO NOT EDIT.
// versions:
// protoc-gen-go v1.28.0
// protoc v3.19.4
// source: info.proto
package valhalla
import (
protoreflect "google.golang.org/protobuf/reflect/protoreflect"
protoimpl "google.golang.org/protobuf/runtime/protoimpl"
reflect "reflect"
sync "sync"
)
const (
// Verify that this generated code is sufficiently up-to-date.
_ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion)
// Verify that runtime/protoimpl is sufficiently up-to-date.
_ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20)
)
// the type of statistic we are recording
type StatisticType int32
const (
StatisticType_count StatisticType = 0
StatisticType_gauge StatisticType = 1
StatisticType_timing StatisticType = 2
StatisticType_set StatisticType = 3
)
// Enum value maps for StatisticType.
var (
StatisticType_name = map[int32]string{
0: "count",
1: "gauge",
2: "timing",
3: "set",
}
StatisticType_value = map[string]int32{
"count": 0,
"gauge": 1,
"timing": 2,
"set": 3,
}
)
func (x StatisticType) Enum() *StatisticType {
p := new(StatisticType)
*p = x
return p
}
func (x StatisticType) String() string {
return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x))
}
func (StatisticType) Descriptor() protoreflect.EnumDescriptor {
return file_info_proto_enumTypes[0].Descriptor()
}
func (StatisticType) Type() protoreflect.EnumType {
return &file_info_proto_enumTypes[0]
}
func (x StatisticType) Number() protoreflect.EnumNumber {
return protoreflect.EnumNumber(x)
}
// Deprecated: Use StatisticType.Descriptor instead.
func (StatisticType) EnumDescriptor() ([]byte, []int) {
return file_info_proto_rawDescGZIP(), []int{0}
}
type Statistic struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
Key string `protobuf:"bytes,1,opt,name=key,proto3" json:"key,omitempty"` // the key/name of the statistic
Value float64 `protobuf:"fixed64,2,opt,name=value,proto3" json:"value,omitempty"` // the value of the statistic
Frequency float32 `protobuf:"fixed32,3,opt,name=frequency,proto3" json:"frequency,omitempty"` // how often to report the statistic [0-1]
Type StatisticType `protobuf:"varint,4,opt,name=type,proto3,enum=valhalla.StatisticType" json:"type,omitempty"` // what type is it
}
func (x *Statistic) Reset() {
*x = Statistic{}
if protoimpl.UnsafeEnabled {
mi := &file_info_proto_msgTypes[0]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *Statistic) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*Statistic) ProtoMessage() {}
func (x *Statistic) ProtoReflect() protoreflect.Message {
mi := &file_info_proto_msgTypes[0]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use Statistic.ProtoReflect.Descriptor instead.
func (*Statistic) Descriptor() ([]byte, []int) {
return file_info_proto_rawDescGZIP(), []int{0}
}
func (x *Statistic) GetKey() string {
if x != nil {
return x.Key
}
return ""
}
func (x *Statistic) GetValue() float64 {
if x != nil {
return x.Value
}
return 0
}
func (x *Statistic) GetFrequency() float32 {
if x != nil {
return x.Frequency
}
return 0
}
func (x *Statistic) GetType() StatisticType {
if x != nil {
return x.Type
}
return StatisticType_count
}
type CodedDescription struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
Description string `protobuf:"bytes,1,opt,name=description,proto3" json:"description,omitempty"`
Code uint64 `protobuf:"varint,2,opt,name=code,proto3" json:"code,omitempty"`
}
func (x *CodedDescription) Reset() {
*x = CodedDescription{}
if protoimpl.UnsafeEnabled {
mi := &file_info_proto_msgTypes[1]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *CodedDescription) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*CodedDescription) ProtoMessage() {}
func (x *CodedDescription) ProtoReflect() protoreflect.Message {
mi := &file_info_proto_msgTypes[1]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use CodedDescription.ProtoReflect.Descriptor instead.
func (*CodedDescription) Descriptor() ([]byte, []int) {
return file_info_proto_rawDescGZIP(), []int{1}
}
func (x *CodedDescription) GetDescription() string {
if x != nil {
return x.Description
}
return ""
}
func (x *CodedDescription) GetCode() uint64 {
if x != nil {
return x.Code
}
return 0
}
type Info struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
Statistics []*Statistic `protobuf:"bytes,1,rep,name=statistics,proto3" json:"statistics,omitempty"` // stats that we collect during request processing
Errors []*CodedDescription `protobuf:"bytes,2,rep,name=errors,proto3" json:"errors,omitempty"` // errors that occured during request processing
Warnings []*CodedDescription `protobuf:"bytes,3,rep,name=warnings,proto3" json:"warnings,omitempty"` // warnings that occured during request processing
IsService bool `protobuf:"varint,4,opt,name=is_service,json=isService,proto3" json:"is_service,omitempty"` // was this a service request/response rather than a direct call to the library
}
func (x *Info) Reset() {
*x = Info{}
if protoimpl.UnsafeEnabled {
mi := &file_info_proto_msgTypes[2]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *Info) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*Info) ProtoMessage() {}
func (x *Info) ProtoReflect() protoreflect.Message {
mi := &file_info_proto_msgTypes[2]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use Info.ProtoReflect.Descriptor instead.
func (*Info) Descriptor() ([]byte, []int) {
return file_info_proto_rawDescGZIP(), []int{2}
}
func (x *Info) GetStatistics() []*Statistic {
if x != nil {
return x.Statistics
}
return nil
}
func (x *Info) GetErrors() []*CodedDescription {
if x != nil {
return x.Errors
}
return nil
}
func (x *Info) GetWarnings() []*CodedDescription {
if x != nil {
return x.Warnings
}
return nil
}
func (x *Info) GetIsService() bool {
if x != nil {
return x.IsService
}
return false
}
var File_info_proto protoreflect.FileDescriptor
var file_info_proto_rawDesc = []byte{
0x0a, 0x0a, 0x69, 0x6e, 0x66, 0x6f, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x08, 0x76, 0x61,
0x6c, 0x68, 0x61, 0x6c, 0x6c, 0x61, 0x22, 0x7e, 0x0a, 0x09, 0x53, 0x74, 0x61, 0x74, 0x69, 0x73,
0x74, 0x69, 0x63, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09,
0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02,
0x20, 0x01, 0x28, 0x01, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x12, 0x1c, 0x0a, 0x09, 0x66,
0x72, 0x65, 0x71, 0x75, 0x65, 0x6e, 0x63, 0x79, 0x18, 0x03, 0x20, 0x01, 0x28, 0x02, 0x52, 0x09,
0x66, 0x72, 0x65, 0x71, 0x75, 0x65, 0x6e, 0x63, 0x79, 0x12, 0x2b, 0x0a, 0x04, 0x74, 0x79, 0x70,
0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x17, 0x2e, 0x76, 0x61, 0x6c, 0x68, 0x61, 0x6c,
0x6c, 0x61, 0x2e, 0x53, 0x74, 0x61, 0x74, 0x69, 0x73, 0x74, 0x69, 0x63, 0x54, 0x79, 0x70, 0x65,
0x52, 0x04, 0x74, 0x79, 0x70, 0x65, 0x22, 0x48, 0x0a, 0x10, 0x43, 0x6f, 0x64, 0x65, 0x64, 0x44,
0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x20, 0x0a, 0x0b, 0x64, 0x65,
0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52,
0x0b, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x12, 0x0a, 0x04,
0x63, 0x6f, 0x64, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x04, 0x52, 0x04, 0x63, 0x6f, 0x64, 0x65,
0x22, 0xc6, 0x01, 0x0a, 0x04, 0x49, 0x6e, 0x66, 0x6f, 0x12, 0x33, 0x0a, 0x0a, 0x73, 0x74, 0x61,
0x74, 0x69, 0x73, 0x74, 0x69, 0x63, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x13, 0x2e,
0x76, 0x61, 0x6c, 0x68, 0x61, 0x6c, 0x6c, 0x61, 0x2e, 0x53, 0x74, 0x61, 0x74, 0x69, 0x73, 0x74,
0x69, 0x63, 0x52, 0x0a, 0x73, 0x74, 0x61, 0x74, 0x69, 0x73, 0x74, 0x69, 0x63, 0x73, 0x12, 0x32,
0x0a, 0x06, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1a,
0x2e, 0x76, 0x61, 0x6c, 0x68, 0x61, 0x6c, 0x6c, 0x61, 0x2e, 0x43, 0x6f, 0x64, 0x65, 0x64, 0x44,
0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x06, 0x65, 0x72, 0x72, 0x6f,
0x72, 0x73, 0x12, 0x36, 0x0a, 0x08, 0x77, 0x61, 0x72, 0x6e, 0x69, 0x6e, 0x67, 0x73, 0x18, 0x03,
0x20, 0x03, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x76, 0x61, 0x6c, 0x68, 0x61, 0x6c, 0x6c, 0x61, 0x2e,
0x43, 0x6f, 0x64, 0x65, 0x64, 0x44, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e,
0x52, 0x08, 0x77, 0x61, 0x72, 0x6e, 0x69, 0x6e, 0x67, 0x73, 0x12, 0x1d, 0x0a, 0x0a, 0x69, 0x73,
0x5f, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x08, 0x52, 0x09,
0x69, 0x73, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2a, 0x3a, 0x0a, 0x0d, 0x53, 0x74, 0x61,
0x74, 0x69, 0x73, 0x74, 0x69, 0x63, 0x54, 0x79, 0x70, 0x65, 0x12, 0x09, 0x0a, 0x05, 0x63, 0x6f,
0x75, 0x6e, 0x74, 0x10, 0x00, 0x12, 0x09, 0x0a, 0x05, 0x67, 0x61, 0x75, 0x67, 0x65, 0x10, 0x01,
0x12, 0x0a, 0x0a, 0x06, 0x74, 0x69, 0x6d, 0x69, 0x6e, 0x67, 0x10, 0x02, 0x12, 0x07, 0x0a, 0x03,
0x73, 0x65, 0x74, 0x10, 0x03, 0x42, 0x40, 0x48, 0x03, 0x5a, 0x3c, 0x67, 0x69, 0x74, 0x2e, 0x63,
0x6f, 0x6f, 0x70, 0x67, 0x6f, 0x2e, 0x69, 0x6f, 0x2f, 0x63, 0x6f, 0x6f, 0x70, 0x67, 0x6f, 0x2d,
0x70, 0x6c, 0x61, 0x74, 0x66, 0x6f, 0x72, 0x6d, 0x2f, 0x72, 0x6f, 0x75, 0x74, 0x69, 0x6e, 0x67,
0x2d, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x76,
0x61, 0x6c, 0x68, 0x61, 0x6c, 0x6c, 0x61, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
}
var (
file_info_proto_rawDescOnce sync.Once
file_info_proto_rawDescData = file_info_proto_rawDesc
)
func file_info_proto_rawDescGZIP() []byte {
file_info_proto_rawDescOnce.Do(func() {
file_info_proto_rawDescData = protoimpl.X.CompressGZIP(file_info_proto_rawDescData)
})
return file_info_proto_rawDescData
}
var file_info_proto_enumTypes = make([]protoimpl.EnumInfo, 1)
var file_info_proto_msgTypes = make([]protoimpl.MessageInfo, 3)
var file_info_proto_goTypes = []interface{}{
(StatisticType)(0), // 0: valhalla.StatisticType
(*Statistic)(nil), // 1: valhalla.Statistic
(*CodedDescription)(nil), // 2: valhalla.CodedDescription
(*Info)(nil), // 3: valhalla.Info
}
var file_info_proto_depIdxs = []int32{
0, // 0: valhalla.Statistic.type:type_name -> valhalla.StatisticType
1, // 1: valhalla.Info.statistics:type_name -> valhalla.Statistic
2, // 2: valhalla.Info.errors:type_name -> valhalla.CodedDescription
2, // 3: valhalla.Info.warnings:type_name -> valhalla.CodedDescription
4, // [4:4] is the sub-list for method output_type
4, // [4:4] is the sub-list for method input_type
4, // [4:4] is the sub-list for extension type_name
4, // [4:4] is the sub-list for extension extendee
0, // [0:4] is the sub-list for field type_name
}
func init() { file_info_proto_init() }
func file_info_proto_init() {
if File_info_proto != nil {
return
}
if !protoimpl.UnsafeEnabled {
file_info_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*Statistic); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_info_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*CodedDescription); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_info_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*Info); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
}
type x struct{}
out := protoimpl.TypeBuilder{
File: protoimpl.DescBuilder{
GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
RawDescriptor: file_info_proto_rawDesc,
NumEnums: 1,
NumMessages: 3,
NumExtensions: 0,
NumServices: 0,
},
GoTypes: file_info_proto_goTypes,
DependencyIndexes: file_info_proto_depIdxs,
EnumInfos: file_info_proto_enumTypes,
MessageInfos: file_info_proto_msgTypes,
}.Build()
File_info_proto = out.File
file_info_proto_rawDesc = nil
file_info_proto_goTypes = nil
file_info_proto_depIdxs = nil
}

36
proto/valhalla/info.proto Normal file
View File

@ -0,0 +1,36 @@
syntax = "proto3";
option optimize_for = LITE_RUNTIME;
option go_package = "git.coopgo.io/coopgo-platform/routing-service/proto/valhalla";
package valhalla;
// Statistics are modelled off of the statsd API
// the type of statistic we are recording
enum StatisticType {
count = 0;
gauge = 1;
timing = 2;
set = 3;
}
// The key for a statistic regarding the running of the service should be of the form:
// action.worker_name.metric so that we can tell what type of request it was and where in the pipeline it happened
message Statistic {
string key = 1; // the key/name of the statistic
double value = 2; // the value of the statistic
float frequency = 3; // how often to report the statistic [0-1]
StatisticType type = 4; // what type is it
}
message CodedDescription {
string description = 1;
uint64 code = 2;
}
message Info {
repeated Statistic statistics = 1; // stats that we collect during request processing
repeated CodedDescription errors = 2; // errors that occured during request processing
repeated CodedDescription warnings = 3; // warnings that occured during request processing
bool is_service = 4; // was this a service request/response rather than a direct call to the library
}

4976
proto/valhalla/options.pb.go Normal file

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,485 @@
syntax = "proto3";
option optimize_for = LITE_RUNTIME;
option go_package = "git.coopgo.io/coopgo-platform/routing-service/proto/valhalla";
package valhalla;
import public "common.proto";
message Contour {
oneof has_time {
float time = 1; // minutes
}
oneof has_color {
string color = 2; // hex color with out # - for example: "ff0000" for red
}
oneof has_distance {
float distance = 3; // kilometers
}
}
message Ring {
repeated LatLng coords = 1;
}
enum ShapeMatch {
walk_or_snap = 0;
edge_walk = 1;
map_snap = 2;
}
enum FilterAction {
no_action = 0;
exclude = 1;
include = 2;
}
enum DirectionsType {
instructions = 0;
none = 1;
maneuvers = 2;
}
enum ShapeFormat {
polyline6 = 0;
polyline5 = 1;
geojson = 2;
}
// use this to select which top level fields should be present in the pbf output
// the actions below are marked for each field that would provide a minimal response
message PbfFieldSelector {
bool options = 1;
bool trip = 2; // /trace_attributes
bool directions = 3; // /route /trace_route /optimized_route /centroid
bool status = 4; // /status
// TODO: enable these once we have objects for them
// bool isochrone = 5;
// bool matrix = 6;
// bool locate = 7;
// bool height = 8;
// bool expansion = 9;
}
message AvoidEdge {
oneof has_id {
uint64 id = 1;
}
oneof has_percent_along {
float percent_along = 2;
}
}
message Costing {
enum Type {
none_ = 0;
bicycle = 1;
bus = 2;
motor_scooter = 3;
multimodal = 4; // turns into pedestrian + transit
pedestrian = 5;
transit = 6;
truck = 7;
motorcycle = 8;
taxi = 9;
auto_ = 10;
bikeshare = 11; // turns into pedestrian + bike
}
message Options {
oneof has_maneuver_penalty {
float maneuver_penalty = 1;
}
oneof has_destination_only_penalty {
float destination_only_penalty = 2;
}
oneof has_gate_cost {
float gate_cost = 3;
}
oneof has_gate_penalty {
float gate_penalty = 4;
}
oneof has_toll_booth_cost {
float toll_booth_cost = 5;
}
oneof has_toll_booth_penalty {
float toll_booth_penalty = 6;
}
oneof has_alley_penalty {
float alley_penalty = 7;
}
oneof has_country_crossing_cost {
float country_crossing_cost = 8;
}
oneof has_country_crossing_penalty {
float country_crossing_penalty = 9;
}
oneof has_ferry_cost {
float ferry_cost = 10;
}
oneof has_avoid_bad_surfaces {
float avoid_bad_surfaces = 11;
}
oneof has_use_ferry {
float use_ferry = 12;
}
oneof has_use_highways {
float use_highways = 13;
}
oneof has_use_tolls {
float use_tolls = 14;
}
oneof has_use_roads {
float use_roads = 15;
}
oneof has_max_distance {
uint32 max_distance = 16;
}
oneof has_walking_speed {
float walking_speed = 17;
}
oneof has_step_penalty {
float step_penalty = 18;
}
oneof has_max_grade {
uint32 max_grade = 19;
}
oneof has_max_hiking_difficulty {
uint32 max_hiking_difficulty = 20;
}
oneof has_mode_factor {
float mode_factor = 21;
}
oneof has_walkway_factor {
float walkway_factor = 22;
}
oneof has_sidewalk_factor {
float sidewalk_factor = 23;
}
oneof has_alley_factor {
float alley_factor = 24;
}
oneof has_driveway_factor {
float driveway_factor = 25;
}
oneof has_driveway_penalty {
float driveway_penalty = 26;
}
oneof has_transit_start_end_max_distance {
uint32 transit_start_end_max_distance = 27;
}
oneof has_transit_transfer_max_distance {
uint32 transit_transfer_max_distance = 28;
}
oneof has_transport_type {
string transport_type = 29;
}
oneof has_top_speed {
float top_speed = 30;
}
oneof has_use_hills {
float use_hills = 31;
}
oneof has_use_primary {
float use_primary = 32;
}
oneof has_use_trails {
float use_trails = 33;
}
oneof has_low_class_penalty {
float low_class_penalty = 34;
}
oneof has_hazmat {
bool hazmat = 35;
}
oneof has_weight {
float weight = 36;
}
oneof has_axle_load {
float axle_load = 37;
}
oneof has_height {
float height = 38;
}
oneof has_width {
float width = 39;
}
oneof has_length {
float length = 40;
}
oneof has_cycling_speed {
float cycling_speed = 41;
}
oneof has_wheelchair {
bool wheelchair = 42;
}
oneof has_bicycle {
bool bicycle = 43;
}
oneof has_use_bus {
float use_bus = 44;
}
oneof has_use_rail {
float use_rail = 45;
}
oneof has_use_transfers {
float use_transfers = 46;
}
oneof has_transfer_cost {
float transfer_cost = 47;
}
oneof has_transfer_penalty {
float transfer_penalty = 48;
}
FilterAction filter_stop_action = 49;
repeated string filter_stop_ids = 50;
FilterAction filter_operator_action = 51;
repeated string filter_operator_ids = 52;
FilterAction filter_route_action = 53;
repeated string filter_route_ids = 54;
oneof has_flow_mask {
uint32 flow_mask = 55;
}
oneof has_bike_share_cost {
float bike_share_cost = 56;
}
oneof has_bike_share_penalty {
float bike_share_penalty = 57;
}
oneof has_rail_ferry_cost {
float rail_ferry_cost = 58;
}
oneof has_use_rail_ferry {
float use_rail_ferry = 59;
}
oneof has_ignore_restrictions {
bool ignore_restrictions = 60;
}
oneof has_ignore_oneways {
bool ignore_oneways = 61;
}
oneof has_ignore_access {
bool ignore_access = 62;
}
oneof has_ignore_closures {
bool ignore_closures = 63;
}
oneof has_shortest {
bool shortest = 64;
}
oneof has_service_penalty {
float service_penalty = 65;
}
oneof has_use_tracks {
float use_tracks = 66;
}
oneof has_use_distance {
float use_distance = 67;
}
oneof has_use_living_streets {
float use_living_streets = 68;
}
oneof has_service_factor {
float service_factor = 69;
}
oneof has_closure_factor {
float closure_factor = 70;
}
oneof has_private_access_penalty {
float private_access_penalty = 71;
}
oneof has_exclude_unpaved {
bool exclude_unpaved = 72;
}
oneof has_include_hot {
bool include_hot = 73;
}
oneof has_include_hov2 {
bool include_hov2 = 74;
}
oneof has_include_hov3 {
bool include_hov3 = 75;
}
oneof has_exclude_cash_only_tolls {
bool exclude_cash_only_tolls = 76;
}
oneof has_restriction_probability {
uint32 restriction_probability = 77;
}
repeated AvoidEdge exclude_edges = 78;
oneof has_elevator_penalty {
float elevator_penalty = 79;
}
uint32 fixed_speed = 80;
uint32 axle_count = 81;
float use_lit = 82;
}
oneof has_options {
Options options = 1;
}
Type type = 2;
oneof has_name {
string name = 3;
}
// this is used internally only, setting it in your request will have no effect
oneof has_filter_closures {
bool filter_closures = 4;
}
}
message Options {
enum Units {
kilometers = 0;
miles = 1;
}
enum Format {
json = 0;
gpx = 1;
osrm = 2;
pbf = 3;
}
enum Action {
no_action = 0;
route = 1;
locate = 2;
sources_to_targets = 3;
optimized_route = 4;
isochrone = 5;
trace_route = 6;
trace_attributes = 7;
height = 8;
transit_available = 9;
expansion = 10;
centroid = 11;
status = 12;
}
enum DateTimeType {
no_time = 0;
current = 1;
depart_at = 2;
arrive_by = 3;
invariant = 4;
}
enum ExpansionProperties {
costs = 0;
durations = 1;
distances = 2;
statuses = 3;
edge_ids = 4;
}
Units units = 1; // kilometers or miles
oneof has_language {
string language = 2; // Based on IETF BCP 47 language tag string [default = "en-US"]
}
DirectionsType directions_type = 3; // Enable/disable narrative production [default = instructions]
Format format = 4; // What the response format should be [default = json]
oneof has_id {
string id = 5; // id for the request
}
oneof has_jsonp {
string jsonp = 6; // javascript callback for the request
}
oneof has_encoded_polyline {
string encoded_polyline = 7; // polyline 6 encoded shape used in /height /trace_*
}
Action action = 8; // Action signifying the request type
//deprecated = 9;
oneof has_range {
bool range = 10; // Used in /height if the range between points should be serialized [default = false]
}
// verbose needs to stay oneof, so that matrix serializer can default to true
oneof has_verbose {
bool verbose = 11; // Used in /locate & /status request to give back extensive information [default = false]
}
Costing.Type costing_type = 12; // The main costing to use with the action, in multimodal this is the first costing to use
map<int32, Costing> costings = 13; // A map of Costing.Type enum to its Costing object
repeated Location locations = 14; // Locations for /route /optimized /locate /isochrone
repeated Location exclude_locations = 15; // Avoids for any costing
repeated Location sources = 16; // Sources for /sources_to_targets
repeated Location targets = 17; // Targets for /sources_to_targets
DateTimeType date_time_type = 18; // Are you leaving now or then or arriving then
oneof has_date_time {
string date_time = 19; // And what day and time
}
repeated Location shape = 20; // Raw shape for map matching
oneof has_resample_distance {
double resample_distance = 21; // Resampling shape at regular intervals
}
repeated Contour contours = 22; // List of isochrone contours
oneof has_polygons {
bool polygons = 23; // Boolean value to determine whether to return geojson polygons or linestrings as the contours
}
oneof has_denoise {
float denoise = 24; // A floating point value from 0 to 1 which can be used to remove smaller contours (default 1.0)
}
oneof has_generalize {
float generalize = 25; // Meters used as the tolerance for Douglas-Peucker generalization
}
oneof has_show_locations {
bool show_locations = 26; // Add original locations to the isochrone geojson response
}
repeated Location trace = 27; // Trace points for map matching
ShapeMatch shape_match = 28; // The matching algorithm based on the type of input [default = walk_or_snap]
//deprecated = 29;
oneof has_gps_accuracy {
float gps_accuracy = 30; // The gps accuracy associated with the supplied trace points
}
oneof has_search_radius {
float search_radius = 31; // The search radius associated with the supplied trace points
}
oneof has_turn_penalty_factor {
float turn_penalty_factor = 32; // The turn penalty factor associated with the supplied trace points
}
FilterAction filter_action = 33; // The trace filter action - either exclude or include
repeated string filter_attributes = 34; // The filter list for trace attributes
oneof has_breakage_distance {
float breakage_distance = 36; // Map-matching breaking distance (distance between GPS trace points)
}
oneof has_use_timestamps {
bool use_timestamps = 37; // Use timestamps to compute elapsed time for trace_route and trace_attributes [default = false]
}
ShapeFormat shape_format = 38; // Shape format (defaults to polyline6 encoding)
oneof has_alternates {
uint32 alternates = 39; // Maximum number of alternate routes that can be returned
}
oneof has_interpolation_distance {
float interpolation_distance = 40; // Map-matching interpolation distance beyond which trace points are merged
}
oneof has_guidance_views {
bool guidance_views = 41; // Whether to return guidance_views in the response
}
// 42 is reserved
oneof has_height_precision {
uint32 height_precision = 43; // Number of digits precision for heights returned [default = 0]
}
oneof has_roundabout_exits {
bool roundabout_exits = 44; // Whether to announce roundabout exit maneuvers [default = true]
}
oneof has_linear_references {
bool linear_references = 45; // Include linear references for graph edges returned in certain responses.
}
repeated Costing recostings = 46; // CostingType options to use to recost a path after it has been found
repeated Ring exclude_polygons = 47; // Rings/polygons to exclude entire areas during path finding
oneof has_prioritize_bidirectional {
bool prioritize_bidirectional = 48; // Prioritize bidirectional a* when depart_at date_time.type is specified [default = false]
}
oneof has_expansion_action {
Action expansion_action = 49; // Meta action for /expansion endpoint
}
oneof has_skip_opposites {
bool skip_opposites = 50; // Whether to return opposite edges encountered during expansion
}
repeated ExpansionProperties expansion_properties = 51; // The array keys (ExpansionTypes enum) to return in the /expansions's GeoJSON "properties"
PbfFieldSelector pbf_field_selector = 52; // Which pbf fields to include in the pbf format response
bool reverse = 53; // should the isochrone expansion be done in the reverse direction, ignored for multimodal isochrones
oneof has_matrix_locations { // Number of matrix locations found that will trigger an early exit from
uint32 matrix_locations = 54; // a one to many or many to one time distance matrix. Does not affect
} // sources_to_targets when either sources or targets has more than 1 location
// or when CostMatrix is the selected matrix mode.
}

357
proto/valhalla/sign.pb.go Normal file
View File

@ -0,0 +1,357 @@
// Code generated by protoc-gen-go. DO NOT EDIT.
// versions:
// protoc-gen-go v1.28.0
// protoc v3.19.4
// source: sign.proto
package valhalla
import (
protoreflect "google.golang.org/protobuf/reflect/protoreflect"
protoimpl "google.golang.org/protobuf/runtime/protoimpl"
reflect "reflect"
sync "sync"
)
const (
// Verify that this generated code is sufficiently up-to-date.
_ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion)
// Verify that runtime/protoimpl is sufficiently up-to-date.
_ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20)
)
type TripSignElement struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
Text string `protobuf:"bytes,1,opt,name=text,proto3" json:"text,omitempty"` // The actual sign element text, examples: I 95 North or Derry Street
IsRouteNumber bool `protobuf:"varint,2,opt,name=is_route_number,json=isRouteNumber,proto3" json:"is_route_number,omitempty"` // true if sign element is a reference route number such as: I 81 South or US 322 West
ConsecutiveCount uint32 `protobuf:"varint,3,opt,name=consecutive_count,json=consecutiveCount,proto3" json:"consecutive_count,omitempty"` // The frequency of this sign element within a set a consecutive signs
Pronunciation *Pronunciation `protobuf:"bytes,4,opt,name=pronunciation,proto3" json:"pronunciation,omitempty"` // The pronunciation associated with this sign element
}
func (x *TripSignElement) Reset() {
*x = TripSignElement{}
if protoimpl.UnsafeEnabled {
mi := &file_sign_proto_msgTypes[0]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *TripSignElement) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*TripSignElement) ProtoMessage() {}
func (x *TripSignElement) ProtoReflect() protoreflect.Message {
mi := &file_sign_proto_msgTypes[0]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use TripSignElement.ProtoReflect.Descriptor instead.
func (*TripSignElement) Descriptor() ([]byte, []int) {
return file_sign_proto_rawDescGZIP(), []int{0}
}
func (x *TripSignElement) GetText() string {
if x != nil {
return x.Text
}
return ""
}
func (x *TripSignElement) GetIsRouteNumber() bool {
if x != nil {
return x.IsRouteNumber
}
return false
}
func (x *TripSignElement) GetConsecutiveCount() uint32 {
if x != nil {
return x.ConsecutiveCount
}
return 0
}
func (x *TripSignElement) GetPronunciation() *Pronunciation {
if x != nil {
return x.Pronunciation
}
return nil
}
type TripSign struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
ExitNumbers []*TripSignElement `protobuf:"bytes,1,rep,name=exit_numbers,json=exitNumbers,proto3" json:"exit_numbers,omitempty"` // The list of exit numbers, example: 67B
ExitOntoStreets []*TripSignElement `protobuf:"bytes,2,rep,name=exit_onto_streets,json=exitOntoStreets,proto3" json:"exit_onto_streets,omitempty"` // The list of exit branch street names, examples: I 95 North or Baltimore-Washington Parkway
ExitTowardLocations []*TripSignElement `protobuf:"bytes,3,rep,name=exit_toward_locations,json=exitTowardLocations,proto3" json:"exit_toward_locations,omitempty"` // The list of exit toward locations, examples: New York or I 395 South
ExitNames []*TripSignElement `protobuf:"bytes,4,rep,name=exit_names,json=exitNames,proto3" json:"exit_names,omitempty"` // The list of exit names - not used much in US, example: Gettysburg Pike
GuideOntoStreets []*TripSignElement `protobuf:"bytes,5,rep,name=guide_onto_streets,json=guideOntoStreets,proto3" json:"guide_onto_streets,omitempty"` // The list of guide branch street names, examples: US 22 West or Baltimore-Washington Parkway
GuideTowardLocations []*TripSignElement `protobuf:"bytes,6,rep,name=guide_toward_locations,json=guideTowardLocations,proto3" json:"guide_toward_locations,omitempty"` // The list of guide toward locations, examples: Lewistown or US 15
JunctionNames []*TripSignElement `protobuf:"bytes,7,rep,name=junction_names,json=junctionNames,proto3" json:"junction_names,omitempty"` // The list of junction names, examples: 万年橋東 or Mannenbashi East
GuidanceViewJunctions []*TripSignElement `protobuf:"bytes,8,rep,name=guidance_view_junctions,json=guidanceViewJunctions,proto3" json:"guidance_view_junctions,omitempty"` // The list of guidance view junctions, examples: AB12345;1 or AB12345;E
GuidanceViewSignboards []*TripSignElement `protobuf:"bytes,9,rep,name=guidance_view_signboards,json=guidanceViewSignboards,proto3" json:"guidance_view_signboards,omitempty"` // The list of guidance view signboards, examples: SI_721701166;1 or SI_721701166;2
}
func (x *TripSign) Reset() {
*x = TripSign{}
if protoimpl.UnsafeEnabled {
mi := &file_sign_proto_msgTypes[1]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *TripSign) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*TripSign) ProtoMessage() {}
func (x *TripSign) ProtoReflect() protoreflect.Message {
mi := &file_sign_proto_msgTypes[1]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use TripSign.ProtoReflect.Descriptor instead.
func (*TripSign) Descriptor() ([]byte, []int) {
return file_sign_proto_rawDescGZIP(), []int{1}
}
func (x *TripSign) GetExitNumbers() []*TripSignElement {
if x != nil {
return x.ExitNumbers
}
return nil
}
func (x *TripSign) GetExitOntoStreets() []*TripSignElement {
if x != nil {
return x.ExitOntoStreets
}
return nil
}
func (x *TripSign) GetExitTowardLocations() []*TripSignElement {
if x != nil {
return x.ExitTowardLocations
}
return nil
}
func (x *TripSign) GetExitNames() []*TripSignElement {
if x != nil {
return x.ExitNames
}
return nil
}
func (x *TripSign) GetGuideOntoStreets() []*TripSignElement {
if x != nil {
return x.GuideOntoStreets
}
return nil
}
func (x *TripSign) GetGuideTowardLocations() []*TripSignElement {
if x != nil {
return x.GuideTowardLocations
}
return nil
}
func (x *TripSign) GetJunctionNames() []*TripSignElement {
if x != nil {
return x.JunctionNames
}
return nil
}
func (x *TripSign) GetGuidanceViewJunctions() []*TripSignElement {
if x != nil {
return x.GuidanceViewJunctions
}
return nil
}
func (x *TripSign) GetGuidanceViewSignboards() []*TripSignElement {
if x != nil {
return x.GuidanceViewSignboards
}
return nil
}
var File_sign_proto protoreflect.FileDescriptor
var file_sign_proto_rawDesc = []byte{
0x0a, 0x0a, 0x73, 0x69, 0x67, 0x6e, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x08, 0x76, 0x61,
0x6c, 0x68, 0x61, 0x6c, 0x6c, 0x61, 0x1a, 0x0c, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x70,
0x72, 0x6f, 0x74, 0x6f, 0x22, 0xb9, 0x01, 0x0a, 0x0f, 0x54, 0x72, 0x69, 0x70, 0x53, 0x69, 0x67,
0x6e, 0x45, 0x6c, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x12, 0x12, 0x0a, 0x04, 0x74, 0x65, 0x78, 0x74,
0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x74, 0x65, 0x78, 0x74, 0x12, 0x26, 0x0a, 0x0f,
0x69, 0x73, 0x5f, 0x72, 0x6f, 0x75, 0x74, 0x65, 0x5f, 0x6e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x18,
0x02, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0d, 0x69, 0x73, 0x52, 0x6f, 0x75, 0x74, 0x65, 0x4e, 0x75,
0x6d, 0x62, 0x65, 0x72, 0x12, 0x2b, 0x0a, 0x11, 0x63, 0x6f, 0x6e, 0x73, 0x65, 0x63, 0x75, 0x74,
0x69, 0x76, 0x65, 0x5f, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0d, 0x52,
0x10, 0x63, 0x6f, 0x6e, 0x73, 0x65, 0x63, 0x75, 0x74, 0x69, 0x76, 0x65, 0x43, 0x6f, 0x75, 0x6e,
0x74, 0x12, 0x3d, 0x0a, 0x0d, 0x70, 0x72, 0x6f, 0x6e, 0x75, 0x6e, 0x63, 0x69, 0x61, 0x74, 0x69,
0x6f, 0x6e, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x17, 0x2e, 0x76, 0x61, 0x6c, 0x68, 0x61,
0x6c, 0x6c, 0x61, 0x2e, 0x50, 0x72, 0x6f, 0x6e, 0x75, 0x6e, 0x63, 0x69, 0x61, 0x74, 0x69, 0x6f,
0x6e, 0x52, 0x0d, 0x70, 0x72, 0x6f, 0x6e, 0x75, 0x6e, 0x63, 0x69, 0x61, 0x74, 0x69, 0x6f, 0x6e,
0x22, 0x9c, 0x05, 0x0a, 0x08, 0x54, 0x72, 0x69, 0x70, 0x53, 0x69, 0x67, 0x6e, 0x12, 0x3c, 0x0a,
0x0c, 0x65, 0x78, 0x69, 0x74, 0x5f, 0x6e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x73, 0x18, 0x01, 0x20,
0x03, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x76, 0x61, 0x6c, 0x68, 0x61, 0x6c, 0x6c, 0x61, 0x2e, 0x54,
0x72, 0x69, 0x70, 0x53, 0x69, 0x67, 0x6e, 0x45, 0x6c, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x52, 0x0b,
0x65, 0x78, 0x69, 0x74, 0x4e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x73, 0x12, 0x45, 0x0a, 0x11, 0x65,
0x78, 0x69, 0x74, 0x5f, 0x6f, 0x6e, 0x74, 0x6f, 0x5f, 0x73, 0x74, 0x72, 0x65, 0x65, 0x74, 0x73,
0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x76, 0x61, 0x6c, 0x68, 0x61, 0x6c, 0x6c,
0x61, 0x2e, 0x54, 0x72, 0x69, 0x70, 0x53, 0x69, 0x67, 0x6e, 0x45, 0x6c, 0x65, 0x6d, 0x65, 0x6e,
0x74, 0x52, 0x0f, 0x65, 0x78, 0x69, 0x74, 0x4f, 0x6e, 0x74, 0x6f, 0x53, 0x74, 0x72, 0x65, 0x65,
0x74, 0x73, 0x12, 0x4d, 0x0a, 0x15, 0x65, 0x78, 0x69, 0x74, 0x5f, 0x74, 0x6f, 0x77, 0x61, 0x72,
0x64, 0x5f, 0x6c, 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28,
0x0b, 0x32, 0x19, 0x2e, 0x76, 0x61, 0x6c, 0x68, 0x61, 0x6c, 0x6c, 0x61, 0x2e, 0x54, 0x72, 0x69,
0x70, 0x53, 0x69, 0x67, 0x6e, 0x45, 0x6c, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x52, 0x13, 0x65, 0x78,
0x69, 0x74, 0x54, 0x6f, 0x77, 0x61, 0x72, 0x64, 0x4c, 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e,
0x73, 0x12, 0x38, 0x0a, 0x0a, 0x65, 0x78, 0x69, 0x74, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x18,
0x04, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x76, 0x61, 0x6c, 0x68, 0x61, 0x6c, 0x6c, 0x61,
0x2e, 0x54, 0x72, 0x69, 0x70, 0x53, 0x69, 0x67, 0x6e, 0x45, 0x6c, 0x65, 0x6d, 0x65, 0x6e, 0x74,
0x52, 0x09, 0x65, 0x78, 0x69, 0x74, 0x4e, 0x61, 0x6d, 0x65, 0x73, 0x12, 0x47, 0x0a, 0x12, 0x67,
0x75, 0x69, 0x64, 0x65, 0x5f, 0x6f, 0x6e, 0x74, 0x6f, 0x5f, 0x73, 0x74, 0x72, 0x65, 0x65, 0x74,
0x73, 0x18, 0x05, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x76, 0x61, 0x6c, 0x68, 0x61, 0x6c,
0x6c, 0x61, 0x2e, 0x54, 0x72, 0x69, 0x70, 0x53, 0x69, 0x67, 0x6e, 0x45, 0x6c, 0x65, 0x6d, 0x65,
0x6e, 0x74, 0x52, 0x10, 0x67, 0x75, 0x69, 0x64, 0x65, 0x4f, 0x6e, 0x74, 0x6f, 0x53, 0x74, 0x72,
0x65, 0x65, 0x74, 0x73, 0x12, 0x4f, 0x0a, 0x16, 0x67, 0x75, 0x69, 0x64, 0x65, 0x5f, 0x74, 0x6f,
0x77, 0x61, 0x72, 0x64, 0x5f, 0x6c, 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x06,
0x20, 0x03, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x76, 0x61, 0x6c, 0x68, 0x61, 0x6c, 0x6c, 0x61, 0x2e,
0x54, 0x72, 0x69, 0x70, 0x53, 0x69, 0x67, 0x6e, 0x45, 0x6c, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x52,
0x14, 0x67, 0x75, 0x69, 0x64, 0x65, 0x54, 0x6f, 0x77, 0x61, 0x72, 0x64, 0x4c, 0x6f, 0x63, 0x61,
0x74, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x40, 0x0a, 0x0e, 0x6a, 0x75, 0x6e, 0x63, 0x74, 0x69, 0x6f,
0x6e, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x18, 0x07, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x19, 0x2e,
0x76, 0x61, 0x6c, 0x68, 0x61, 0x6c, 0x6c, 0x61, 0x2e, 0x54, 0x72, 0x69, 0x70, 0x53, 0x69, 0x67,
0x6e, 0x45, 0x6c, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x52, 0x0d, 0x6a, 0x75, 0x6e, 0x63, 0x74, 0x69,
0x6f, 0x6e, 0x4e, 0x61, 0x6d, 0x65, 0x73, 0x12, 0x51, 0x0a, 0x17, 0x67, 0x75, 0x69, 0x64, 0x61,
0x6e, 0x63, 0x65, 0x5f, 0x76, 0x69, 0x65, 0x77, 0x5f, 0x6a, 0x75, 0x6e, 0x63, 0x74, 0x69, 0x6f,
0x6e, 0x73, 0x18, 0x08, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x76, 0x61, 0x6c, 0x68, 0x61,
0x6c, 0x6c, 0x61, 0x2e, 0x54, 0x72, 0x69, 0x70, 0x53, 0x69, 0x67, 0x6e, 0x45, 0x6c, 0x65, 0x6d,
0x65, 0x6e, 0x74, 0x52, 0x15, 0x67, 0x75, 0x69, 0x64, 0x61, 0x6e, 0x63, 0x65, 0x56, 0x69, 0x65,
0x77, 0x4a, 0x75, 0x6e, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x53, 0x0a, 0x18, 0x67, 0x75,
0x69, 0x64, 0x61, 0x6e, 0x63, 0x65, 0x5f, 0x76, 0x69, 0x65, 0x77, 0x5f, 0x73, 0x69, 0x67, 0x6e,
0x62, 0x6f, 0x61, 0x72, 0x64, 0x73, 0x18, 0x09, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x76,
0x61, 0x6c, 0x68, 0x61, 0x6c, 0x6c, 0x61, 0x2e, 0x54, 0x72, 0x69, 0x70, 0x53, 0x69, 0x67, 0x6e,
0x45, 0x6c, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x52, 0x16, 0x67, 0x75, 0x69, 0x64, 0x61, 0x6e, 0x63,
0x65, 0x56, 0x69, 0x65, 0x77, 0x53, 0x69, 0x67, 0x6e, 0x62, 0x6f, 0x61, 0x72, 0x64, 0x73, 0x42,
0x40, 0x48, 0x03, 0x5a, 0x3c, 0x67, 0x69, 0x74, 0x2e, 0x63, 0x6f, 0x6f, 0x70, 0x67, 0x6f, 0x2e,
0x69, 0x6f, 0x2f, 0x63, 0x6f, 0x6f, 0x70, 0x67, 0x6f, 0x2d, 0x70, 0x6c, 0x61, 0x74, 0x66, 0x6f,
0x72, 0x6d, 0x2f, 0x72, 0x6f, 0x75, 0x74, 0x69, 0x6e, 0x67, 0x2d, 0x73, 0x65, 0x72, 0x76, 0x69,
0x63, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x76, 0x61, 0x6c, 0x68, 0x61, 0x6c, 0x6c,
0x61, 0x50, 0x00, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
}
var (
file_sign_proto_rawDescOnce sync.Once
file_sign_proto_rawDescData = file_sign_proto_rawDesc
)
func file_sign_proto_rawDescGZIP() []byte {
file_sign_proto_rawDescOnce.Do(func() {
file_sign_proto_rawDescData = protoimpl.X.CompressGZIP(file_sign_proto_rawDescData)
})
return file_sign_proto_rawDescData
}
var file_sign_proto_msgTypes = make([]protoimpl.MessageInfo, 2)
var file_sign_proto_goTypes = []interface{}{
(*TripSignElement)(nil), // 0: valhalla.TripSignElement
(*TripSign)(nil), // 1: valhalla.TripSign
(*Pronunciation)(nil), // 2: valhalla.Pronunciation
}
var file_sign_proto_depIdxs = []int32{
2, // 0: valhalla.TripSignElement.pronunciation:type_name -> valhalla.Pronunciation
0, // 1: valhalla.TripSign.exit_numbers:type_name -> valhalla.TripSignElement
0, // 2: valhalla.TripSign.exit_onto_streets:type_name -> valhalla.TripSignElement
0, // 3: valhalla.TripSign.exit_toward_locations:type_name -> valhalla.TripSignElement
0, // 4: valhalla.TripSign.exit_names:type_name -> valhalla.TripSignElement
0, // 5: valhalla.TripSign.guide_onto_streets:type_name -> valhalla.TripSignElement
0, // 6: valhalla.TripSign.guide_toward_locations:type_name -> valhalla.TripSignElement
0, // 7: valhalla.TripSign.junction_names:type_name -> valhalla.TripSignElement
0, // 8: valhalla.TripSign.guidance_view_junctions:type_name -> valhalla.TripSignElement
0, // 9: valhalla.TripSign.guidance_view_signboards:type_name -> valhalla.TripSignElement
10, // [10:10] is the sub-list for method output_type
10, // [10:10] is the sub-list for method input_type
10, // [10:10] is the sub-list for extension type_name
10, // [10:10] is the sub-list for extension extendee
0, // [0:10] is the sub-list for field type_name
}
func init() { file_sign_proto_init() }
func file_sign_proto_init() {
if File_sign_proto != nil {
return
}
file_common_proto_init()
if !protoimpl.UnsafeEnabled {
file_sign_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*TripSignElement); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_sign_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*TripSign); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
}
type x struct{}
out := protoimpl.TypeBuilder{
File: protoimpl.DescBuilder{
GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
RawDescriptor: file_sign_proto_rawDesc,
NumEnums: 0,
NumMessages: 2,
NumExtensions: 0,
NumServices: 0,
},
GoTypes: file_sign_proto_goTypes,
DependencyIndexes: file_sign_proto_depIdxs,
MessageInfos: file_sign_proto_msgTypes,
}.Build()
File_sign_proto = out.File
file_sign_proto_rawDesc = nil
file_sign_proto_goTypes = nil
file_sign_proto_depIdxs = nil
}

24
proto/valhalla/sign.proto Normal file
View File

@ -0,0 +1,24 @@
syntax = "proto3";
option optimize_for = LITE_RUNTIME;
option go_package = "git.coopgo.io/coopgo-platform/routing-service/proto/valhalla";
package valhalla;
import public "common.proto";
message TripSignElement {
string text = 1; // The actual sign element text, examples: I 95 North or Derry Street
bool is_route_number = 2; // true if sign element is a reference route number such as: I 81 South or US 322 West
uint32 consecutive_count = 3; // The frequency of this sign element within a set a consecutive signs
Pronunciation pronunciation = 4; // The pronunciation associated with this sign element
}
message TripSign {
repeated TripSignElement exit_numbers = 1; // The list of exit numbers, example: 67B
repeated TripSignElement exit_onto_streets = 2; // The list of exit branch street names, examples: I 95 North or Baltimore-Washington Parkway
repeated TripSignElement exit_toward_locations = 3; // The list of exit toward locations, examples: New York or I 395 South
repeated TripSignElement exit_names = 4; // The list of exit names - not used much in US, example: Gettysburg Pike
repeated TripSignElement guide_onto_streets = 5; // The list of guide branch street names, examples: US 22 West or Baltimore-Washington Parkway
repeated TripSignElement guide_toward_locations = 6; // The list of guide toward locations, examples: Lewistown or US 15
repeated TripSignElement junction_names = 7; // The list of junction names, examples: or Mannenbashi East
repeated TripSignElement guidance_view_junctions = 8; // The list of guidance view junctions, examples: AB12345;1 or AB12345;E
repeated TripSignElement guidance_view_signboards = 9; // The list of guidance view signboards, examples: SI_721701166;1 or SI_721701166;2
}

368
proto/valhalla/status.pb.go Normal file
View File

@ -0,0 +1,368 @@
// Code generated by protoc-gen-go. DO NOT EDIT.
// versions:
// protoc-gen-go v1.28.0
// protoc v3.19.4
// source: status.proto
package valhalla
import (
protoreflect "google.golang.org/protobuf/reflect/protoreflect"
protoimpl "google.golang.org/protobuf/runtime/protoimpl"
reflect "reflect"
sync "sync"
)
const (
// Verify that this generated code is sufficiently up-to-date.
_ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion)
// Verify that runtime/protoimpl is sufficiently up-to-date.
_ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20)
)
type Status struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
// Types that are assignable to HasHasTiles:
// *Status_HasTiles
HasHasTiles isStatus_HasHasTiles `protobuf_oneof:"has_has_tiles"`
// Types that are assignable to HasHasAdmins:
// *Status_HasAdmins
HasHasAdmins isStatus_HasHasAdmins `protobuf_oneof:"has_has_admins"`
// Types that are assignable to HasHasTimezones:
// *Status_HasTimezones
HasHasTimezones isStatus_HasHasTimezones `protobuf_oneof:"has_has_timezones"`
// Types that are assignable to HasHasLiveTraffic:
// *Status_HasLiveTraffic
HasHasLiveTraffic isStatus_HasHasLiveTraffic `protobuf_oneof:"has_has_live_traffic"`
// Types that are assignable to HasBbox:
// *Status_Bbox
HasBbox isStatus_HasBbox `protobuf_oneof:"has_bbox"`
// Types that are assignable to HasVersion:
// *Status_Version
HasVersion isStatus_HasVersion `protobuf_oneof:"has_version"`
// Types that are assignable to HasTilesetLastModified:
// *Status_TilesetLastModified
HasTilesetLastModified isStatus_HasTilesetLastModified `protobuf_oneof:"has_tileset_last_modified"`
AvailableActions []string `protobuf:"bytes,8,rep,name=available_actions,json=availableActions,proto3" json:"available_actions,omitempty"`
}
func (x *Status) Reset() {
*x = Status{}
if protoimpl.UnsafeEnabled {
mi := &file_status_proto_msgTypes[0]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *Status) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*Status) ProtoMessage() {}
func (x *Status) ProtoReflect() protoreflect.Message {
mi := &file_status_proto_msgTypes[0]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use Status.ProtoReflect.Descriptor instead.
func (*Status) Descriptor() ([]byte, []int) {
return file_status_proto_rawDescGZIP(), []int{0}
}
func (m *Status) GetHasHasTiles() isStatus_HasHasTiles {
if m != nil {
return m.HasHasTiles
}
return nil
}
func (x *Status) GetHasTiles() bool {
if x, ok := x.GetHasHasTiles().(*Status_HasTiles); ok {
return x.HasTiles
}
return false
}
func (m *Status) GetHasHasAdmins() isStatus_HasHasAdmins {
if m != nil {
return m.HasHasAdmins
}
return nil
}
func (x *Status) GetHasAdmins() bool {
if x, ok := x.GetHasHasAdmins().(*Status_HasAdmins); ok {
return x.HasAdmins
}
return false
}
func (m *Status) GetHasHasTimezones() isStatus_HasHasTimezones {
if m != nil {
return m.HasHasTimezones
}
return nil
}
func (x *Status) GetHasTimezones() bool {
if x, ok := x.GetHasHasTimezones().(*Status_HasTimezones); ok {
return x.HasTimezones
}
return false
}
func (m *Status) GetHasHasLiveTraffic() isStatus_HasHasLiveTraffic {
if m != nil {
return m.HasHasLiveTraffic
}
return nil
}
func (x *Status) GetHasLiveTraffic() bool {
if x, ok := x.GetHasHasLiveTraffic().(*Status_HasLiveTraffic); ok {
return x.HasLiveTraffic
}
return false
}
func (m *Status) GetHasBbox() isStatus_HasBbox {
if m != nil {
return m.HasBbox
}
return nil
}
func (x *Status) GetBbox() string {
if x, ok := x.GetHasBbox().(*Status_Bbox); ok {
return x.Bbox
}
return ""
}
func (m *Status) GetHasVersion() isStatus_HasVersion {
if m != nil {
return m.HasVersion
}
return nil
}
func (x *Status) GetVersion() string {
if x, ok := x.GetHasVersion().(*Status_Version); ok {
return x.Version
}
return ""
}
func (m *Status) GetHasTilesetLastModified() isStatus_HasTilesetLastModified {
if m != nil {
return m.HasTilesetLastModified
}
return nil
}
func (x *Status) GetTilesetLastModified() uint32 {
if x, ok := x.GetHasTilesetLastModified().(*Status_TilesetLastModified); ok {
return x.TilesetLastModified
}
return 0
}
func (x *Status) GetAvailableActions() []string {
if x != nil {
return x.AvailableActions
}
return nil
}
type isStatus_HasHasTiles interface {
isStatus_HasHasTiles()
}
type Status_HasTiles struct {
HasTiles bool `protobuf:"varint,1,opt,name=has_tiles,json=hasTiles,proto3,oneof"`
}
func (*Status_HasTiles) isStatus_HasHasTiles() {}
type isStatus_HasHasAdmins interface {
isStatus_HasHasAdmins()
}
type Status_HasAdmins struct {
HasAdmins bool `protobuf:"varint,2,opt,name=has_admins,json=hasAdmins,proto3,oneof"`
}
func (*Status_HasAdmins) isStatus_HasHasAdmins() {}
type isStatus_HasHasTimezones interface {
isStatus_HasHasTimezones()
}
type Status_HasTimezones struct {
HasTimezones bool `protobuf:"varint,3,opt,name=has_timezones,json=hasTimezones,proto3,oneof"`
}
func (*Status_HasTimezones) isStatus_HasHasTimezones() {}
type isStatus_HasHasLiveTraffic interface {
isStatus_HasHasLiveTraffic()
}
type Status_HasLiveTraffic struct {
HasLiveTraffic bool `protobuf:"varint,4,opt,name=has_live_traffic,json=hasLiveTraffic,proto3,oneof"`
}
func (*Status_HasLiveTraffic) isStatus_HasHasLiveTraffic() {}
type isStatus_HasBbox interface {
isStatus_HasBbox()
}
type Status_Bbox struct {
Bbox string `protobuf:"bytes,5,opt,name=bbox,proto3,oneof"`
}
func (*Status_Bbox) isStatus_HasBbox() {}
type isStatus_HasVersion interface {
isStatus_HasVersion()
}
type Status_Version struct {
Version string `protobuf:"bytes,6,opt,name=version,proto3,oneof"`
}
func (*Status_Version) isStatus_HasVersion() {}
type isStatus_HasTilesetLastModified interface {
isStatus_HasTilesetLastModified()
}
type Status_TilesetLastModified struct {
TilesetLastModified uint32 `protobuf:"varint,7,opt,name=tileset_last_modified,json=tilesetLastModified,proto3,oneof"`
}
func (*Status_TilesetLastModified) isStatus_HasTilesetLastModified() {}
var File_status_proto protoreflect.FileDescriptor
var file_status_proto_rawDesc = []byte{
0x0a, 0x0c, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x08,
0x76, 0x61, 0x6c, 0x68, 0x61, 0x6c, 0x6c, 0x61, 0x22, 0xb8, 0x03, 0x0a, 0x06, 0x53, 0x74, 0x61,
0x74, 0x75, 0x73, 0x12, 0x1d, 0x0a, 0x09, 0x68, 0x61, 0x73, 0x5f, 0x74, 0x69, 0x6c, 0x65, 0x73,
0x18, 0x01, 0x20, 0x01, 0x28, 0x08, 0x48, 0x00, 0x52, 0x08, 0x68, 0x61, 0x73, 0x54, 0x69, 0x6c,
0x65, 0x73, 0x12, 0x1f, 0x0a, 0x0a, 0x68, 0x61, 0x73, 0x5f, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x73,
0x18, 0x02, 0x20, 0x01, 0x28, 0x08, 0x48, 0x01, 0x52, 0x09, 0x68, 0x61, 0x73, 0x41, 0x64, 0x6d,
0x69, 0x6e, 0x73, 0x12, 0x25, 0x0a, 0x0d, 0x68, 0x61, 0x73, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x7a,
0x6f, 0x6e, 0x65, 0x73, 0x18, 0x03, 0x20, 0x01, 0x28, 0x08, 0x48, 0x02, 0x52, 0x0c, 0x68, 0x61,
0x73, 0x54, 0x69, 0x6d, 0x65, 0x7a, 0x6f, 0x6e, 0x65, 0x73, 0x12, 0x2a, 0x0a, 0x10, 0x68, 0x61,
0x73, 0x5f, 0x6c, 0x69, 0x76, 0x65, 0x5f, 0x74, 0x72, 0x61, 0x66, 0x66, 0x69, 0x63, 0x18, 0x04,
0x20, 0x01, 0x28, 0x08, 0x48, 0x03, 0x52, 0x0e, 0x68, 0x61, 0x73, 0x4c, 0x69, 0x76, 0x65, 0x54,
0x72, 0x61, 0x66, 0x66, 0x69, 0x63, 0x12, 0x14, 0x0a, 0x04, 0x62, 0x62, 0x6f, 0x78, 0x18, 0x05,
0x20, 0x01, 0x28, 0x09, 0x48, 0x04, 0x52, 0x04, 0x62, 0x62, 0x6f, 0x78, 0x12, 0x1a, 0x0a, 0x07,
0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x06, 0x20, 0x01, 0x28, 0x09, 0x48, 0x05, 0x52,
0x07, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x34, 0x0a, 0x15, 0x74, 0x69, 0x6c, 0x65,
0x73, 0x65, 0x74, 0x5f, 0x6c, 0x61, 0x73, 0x74, 0x5f, 0x6d, 0x6f, 0x64, 0x69, 0x66, 0x69, 0x65,
0x64, 0x18, 0x07, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x06, 0x52, 0x13, 0x74, 0x69, 0x6c, 0x65, 0x73,
0x65, 0x74, 0x4c, 0x61, 0x73, 0x74, 0x4d, 0x6f, 0x64, 0x69, 0x66, 0x69, 0x65, 0x64, 0x12, 0x2b,
0x0a, 0x11, 0x61, 0x76, 0x61, 0x69, 0x6c, 0x61, 0x62, 0x6c, 0x65, 0x5f, 0x61, 0x63, 0x74, 0x69,
0x6f, 0x6e, 0x73, 0x18, 0x08, 0x20, 0x03, 0x28, 0x09, 0x52, 0x10, 0x61, 0x76, 0x61, 0x69, 0x6c,
0x61, 0x62, 0x6c, 0x65, 0x41, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x42, 0x0f, 0x0a, 0x0d, 0x68,
0x61, 0x73, 0x5f, 0x68, 0x61, 0x73, 0x5f, 0x74, 0x69, 0x6c, 0x65, 0x73, 0x42, 0x10, 0x0a, 0x0e,
0x68, 0x61, 0x73, 0x5f, 0x68, 0x61, 0x73, 0x5f, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x73, 0x42, 0x13,
0x0a, 0x11, 0x68, 0x61, 0x73, 0x5f, 0x68, 0x61, 0x73, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x7a, 0x6f,
0x6e, 0x65, 0x73, 0x42, 0x16, 0x0a, 0x14, 0x68, 0x61, 0x73, 0x5f, 0x68, 0x61, 0x73, 0x5f, 0x6c,
0x69, 0x76, 0x65, 0x5f, 0x74, 0x72, 0x61, 0x66, 0x66, 0x69, 0x63, 0x42, 0x0a, 0x0a, 0x08, 0x68,
0x61, 0x73, 0x5f, 0x62, 0x62, 0x6f, 0x78, 0x42, 0x0d, 0x0a, 0x0b, 0x68, 0x61, 0x73, 0x5f, 0x76,
0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x42, 0x1b, 0x0a, 0x19, 0x68, 0x61, 0x73, 0x5f, 0x74, 0x69,
0x6c, 0x65, 0x73, 0x65, 0x74, 0x5f, 0x6c, 0x61, 0x73, 0x74, 0x5f, 0x6d, 0x6f, 0x64, 0x69, 0x66,
0x69, 0x65, 0x64, 0x42, 0x40, 0x48, 0x03, 0x5a, 0x3c, 0x67, 0x69, 0x74, 0x2e, 0x63, 0x6f, 0x6f,
0x70, 0x67, 0x6f, 0x2e, 0x69, 0x6f, 0x2f, 0x63, 0x6f, 0x6f, 0x70, 0x67, 0x6f, 0x2d, 0x70, 0x6c,
0x61, 0x74, 0x66, 0x6f, 0x72, 0x6d, 0x2f, 0x72, 0x6f, 0x75, 0x74, 0x69, 0x6e, 0x67, 0x2d, 0x73,
0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x76, 0x61, 0x6c,
0x68, 0x61, 0x6c, 0x6c, 0x61, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
}
var (
file_status_proto_rawDescOnce sync.Once
file_status_proto_rawDescData = file_status_proto_rawDesc
)
func file_status_proto_rawDescGZIP() []byte {
file_status_proto_rawDescOnce.Do(func() {
file_status_proto_rawDescData = protoimpl.X.CompressGZIP(file_status_proto_rawDescData)
})
return file_status_proto_rawDescData
}
var file_status_proto_msgTypes = make([]protoimpl.MessageInfo, 1)
var file_status_proto_goTypes = []interface{}{
(*Status)(nil), // 0: valhalla.Status
}
var file_status_proto_depIdxs = []int32{
0, // [0:0] is the sub-list for method output_type
0, // [0:0] is the sub-list for method input_type
0, // [0:0] is the sub-list for extension type_name
0, // [0:0] is the sub-list for extension extendee
0, // [0:0] is the sub-list for field type_name
}
func init() { file_status_proto_init() }
func file_status_proto_init() {
if File_status_proto != nil {
return
}
if !protoimpl.UnsafeEnabled {
file_status_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*Status); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
}
file_status_proto_msgTypes[0].OneofWrappers = []interface{}{
(*Status_HasTiles)(nil),
(*Status_HasAdmins)(nil),
(*Status_HasTimezones)(nil),
(*Status_HasLiveTraffic)(nil),
(*Status_Bbox)(nil),
(*Status_Version)(nil),
(*Status_TilesetLastModified)(nil),
}
type x struct{}
out := protoimpl.TypeBuilder{
File: protoimpl.DescBuilder{
GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
RawDescriptor: file_status_proto_rawDesc,
NumEnums: 0,
NumMessages: 1,
NumExtensions: 0,
NumServices: 0,
},
GoTypes: file_status_proto_goTypes,
DependencyIndexes: file_status_proto_depIdxs,
MessageInfos: file_status_proto_msgTypes,
}.Build()
File_status_proto = out.File
file_status_proto_rawDesc = nil
file_status_proto_goTypes = nil
file_status_proto_depIdxs = nil
}

View File

@ -0,0 +1,29 @@
syntax = "proto3";
option optimize_for = LITE_RUNTIME;
option go_package = "git.coopgo.io/coopgo-platform/routing-service/proto/valhalla";
package valhalla;
message Status {
oneof has_has_tiles {
bool has_tiles = 1;
}
oneof has_has_admins {
bool has_admins = 2;
}
oneof has_has_timezones {
bool has_timezones = 3;
}
oneof has_has_live_traffic {
bool has_live_traffic = 4;
}
oneof has_bbox {
string bbox = 5;
}
oneof has_version {
string version = 6;
}
oneof has_tileset_last_modified {
uint32 tileset_last_modified = 7;
}
repeated string available_actions = 8;
}

View File

@ -0,0 +1,998 @@
// Code generated by protoc-gen-go. DO NOT EDIT.
// versions:
// protoc-gen-go v1.28.0
// protoc v3.19.4
// source: transit.proto
package valhalla
import (
protoreflect "google.golang.org/protobuf/reflect/protoreflect"
protoimpl "google.golang.org/protobuf/runtime/protoimpl"
reflect "reflect"
sync "sync"
)
const (
// Verify that this generated code is sufficiently up-to-date.
_ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion)
// Verify that runtime/protoimpl is sufficiently up-to-date.
_ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20)
)
type Transit_VehicleType int32
const (
Transit_kTram Transit_VehicleType = 0
Transit_kMetro Transit_VehicleType = 1
Transit_kRail Transit_VehicleType = 2
Transit_kBus Transit_VehicleType = 3
Transit_kFerry Transit_VehicleType = 4
Transit_kCableCar Transit_VehicleType = 5
Transit_kGondola Transit_VehicleType = 6
Transit_kFunicular Transit_VehicleType = 7
)
// Enum value maps for Transit_VehicleType.
var (
Transit_VehicleType_name = map[int32]string{
0: "kTram",
1: "kMetro",
2: "kRail",
3: "kBus",
4: "kFerry",
5: "kCableCar",
6: "kGondola",
7: "kFunicular",
}
Transit_VehicleType_value = map[string]int32{
"kTram": 0,
"kMetro": 1,
"kRail": 2,
"kBus": 3,
"kFerry": 4,
"kCableCar": 5,
"kGondola": 6,
"kFunicular": 7,
}
)
func (x Transit_VehicleType) Enum() *Transit_VehicleType {
p := new(Transit_VehicleType)
*p = x
return p
}
func (x Transit_VehicleType) String() string {
return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x))
}
func (Transit_VehicleType) Descriptor() protoreflect.EnumDescriptor {
return file_transit_proto_enumTypes[0].Descriptor()
}
func (Transit_VehicleType) Type() protoreflect.EnumType {
return &file_transit_proto_enumTypes[0]
}
func (x Transit_VehicleType) Number() protoreflect.EnumNumber {
return protoreflect.EnumNumber(x)
}
// Deprecated: Do not use.
func (x *Transit_VehicleType) UnmarshalJSON(b []byte) error {
num, err := protoimpl.X.UnmarshalJSONEnum(x.Descriptor(), b)
if err != nil {
return err
}
*x = Transit_VehicleType(num)
return nil
}
// Deprecated: Use Transit_VehicleType.Descriptor instead.
func (Transit_VehicleType) EnumDescriptor() ([]byte, []int) {
return file_transit_proto_rawDescGZIP(), []int{0, 0}
}
type Transit struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
Nodes []*Transit_Node `protobuf:"bytes,1,rep,name=nodes" json:"nodes,omitempty"`
StopPairs []*Transit_StopPair `protobuf:"bytes,2,rep,name=stop_pairs,json=stopPairs" json:"stop_pairs,omitempty"`
Routes []*Transit_Route `protobuf:"bytes,3,rep,name=routes" json:"routes,omitempty"`
Shapes []*Transit_Shape `protobuf:"bytes,4,rep,name=shapes" json:"shapes,omitempty"`
}
func (x *Transit) Reset() {
*x = Transit{}
if protoimpl.UnsafeEnabled {
mi := &file_transit_proto_msgTypes[0]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *Transit) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*Transit) ProtoMessage() {}
func (x *Transit) ProtoReflect() protoreflect.Message {
mi := &file_transit_proto_msgTypes[0]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use Transit.ProtoReflect.Descriptor instead.
func (*Transit) Descriptor() ([]byte, []int) {
return file_transit_proto_rawDescGZIP(), []int{0}
}
func (x *Transit) GetNodes() []*Transit_Node {
if x != nil {
return x.Nodes
}
return nil
}
func (x *Transit) GetStopPairs() []*Transit_StopPair {
if x != nil {
return x.StopPairs
}
return nil
}
func (x *Transit) GetRoutes() []*Transit_Route {
if x != nil {
return x.Routes
}
return nil
}
func (x *Transit) GetShapes() []*Transit_Shape {
if x != nil {
return x.Shapes
}
return nil
}
type Transit_Node struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
Lon *float64 `protobuf:"fixed64,1,opt,name=lon" json:"lon,omitempty"`
Lat *float64 `protobuf:"fixed64,2,opt,name=lat" json:"lat,omitempty"`
Type *uint32 `protobuf:"varint,3,opt,name=type" json:"type,omitempty"` // comes from baldr::NodeType
Graphid *uint64 `protobuf:"varint,4,opt,name=graphid" json:"graphid,omitempty"`
PrevTypeGraphid *uint64 `protobuf:"varint,5,opt,name=prev_type_graphid,json=prevTypeGraphid" json:"prev_type_graphid,omitempty"`
Name *string `protobuf:"bytes,6,opt,name=name" json:"name,omitempty"`
OnestopId *string `protobuf:"bytes,7,opt,name=onestop_id,json=onestopId" json:"onestop_id,omitempty"`
OsmConnectingWayId *uint64 `protobuf:"varint,8,opt,name=osm_connecting_way_id,json=osmConnectingWayId" json:"osm_connecting_way_id,omitempty"` // use as a hint to connect to osm
Timezone *string `protobuf:"bytes,9,opt,name=timezone" json:"timezone,omitempty"`
WheelchairBoarding *bool `protobuf:"varint,10,opt,name=wheelchair_boarding,json=wheelchairBoarding" json:"wheelchair_boarding,omitempty"`
Generated *bool `protobuf:"varint,11,opt,name=generated" json:"generated,omitempty"`
Traversability *uint32 `protobuf:"varint,12,opt,name=traversability" json:"traversability,omitempty"`
OsmConnectingLon *float64 `protobuf:"fixed64,13,opt,name=osm_connecting_lon,json=osmConnectingLon" json:"osm_connecting_lon,omitempty"` // use as a hint to connect to osm
OsmConnectingLat *float64 `protobuf:"fixed64,14,opt,name=osm_connecting_lat,json=osmConnectingLat" json:"osm_connecting_lat,omitempty"` // use as a hint to connect to osm
}
func (x *Transit_Node) Reset() {
*x = Transit_Node{}
if protoimpl.UnsafeEnabled {
mi := &file_transit_proto_msgTypes[1]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *Transit_Node) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*Transit_Node) ProtoMessage() {}
func (x *Transit_Node) ProtoReflect() protoreflect.Message {
mi := &file_transit_proto_msgTypes[1]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use Transit_Node.ProtoReflect.Descriptor instead.
func (*Transit_Node) Descriptor() ([]byte, []int) {
return file_transit_proto_rawDescGZIP(), []int{0, 0}
}
func (x *Transit_Node) GetLon() float64 {
if x != nil && x.Lon != nil {
return *x.Lon
}
return 0
}
func (x *Transit_Node) GetLat() float64 {
if x != nil && x.Lat != nil {
return *x.Lat
}
return 0
}
func (x *Transit_Node) GetType() uint32 {
if x != nil && x.Type != nil {
return *x.Type
}
return 0
}
func (x *Transit_Node) GetGraphid() uint64 {
if x != nil && x.Graphid != nil {
return *x.Graphid
}
return 0
}
func (x *Transit_Node) GetPrevTypeGraphid() uint64 {
if x != nil && x.PrevTypeGraphid != nil {
return *x.PrevTypeGraphid
}
return 0
}
func (x *Transit_Node) GetName() string {
if x != nil && x.Name != nil {
return *x.Name
}
return ""
}
func (x *Transit_Node) GetOnestopId() string {
if x != nil && x.OnestopId != nil {
return *x.OnestopId
}
return ""
}
func (x *Transit_Node) GetOsmConnectingWayId() uint64 {
if x != nil && x.OsmConnectingWayId != nil {
return *x.OsmConnectingWayId
}
return 0
}
func (x *Transit_Node) GetTimezone() string {
if x != nil && x.Timezone != nil {
return *x.Timezone
}
return ""
}
func (x *Transit_Node) GetWheelchairBoarding() bool {
if x != nil && x.WheelchairBoarding != nil {
return *x.WheelchairBoarding
}
return false
}
func (x *Transit_Node) GetGenerated() bool {
if x != nil && x.Generated != nil {
return *x.Generated
}
return false
}
func (x *Transit_Node) GetTraversability() uint32 {
if x != nil && x.Traversability != nil {
return *x.Traversability
}
return 0
}
func (x *Transit_Node) GetOsmConnectingLon() float64 {
if x != nil && x.OsmConnectingLon != nil {
return *x.OsmConnectingLon
}
return 0
}
func (x *Transit_Node) GetOsmConnectingLat() float64 {
if x != nil && x.OsmConnectingLat != nil {
return *x.OsmConnectingLat
}
return 0
}
type Transit_StopPair struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
BikesAllowed *bool `protobuf:"varint,1,opt,name=bikes_allowed,json=bikesAllowed" json:"bikes_allowed,omitempty"`
BlockId *uint32 `protobuf:"varint,2,opt,name=block_id,json=blockId" json:"block_id,omitempty"`
DestinationArrivalTime *uint32 `protobuf:"varint,3,opt,name=destination_arrival_time,json=destinationArrivalTime" json:"destination_arrival_time,omitempty"`
DestinationGraphid *uint64 `protobuf:"varint,4,opt,name=destination_graphid,json=destinationGraphid" json:"destination_graphid,omitempty"`
DestinationOnestopId *string `protobuf:"bytes,5,opt,name=destination_onestop_id,json=destinationOnestopId" json:"destination_onestop_id,omitempty"`
OperatedByOnestopId *string `protobuf:"bytes,6,opt,name=operated_by_onestop_id,json=operatedByOnestopId" json:"operated_by_onestop_id,omitempty"`
OriginDepartureTime *uint32 `protobuf:"varint,7,opt,name=origin_departure_time,json=originDepartureTime" json:"origin_departure_time,omitempty"`
OriginGraphid *uint64 `protobuf:"varint,8,opt,name=origin_graphid,json=originGraphid" json:"origin_graphid,omitempty"`
OriginOnestopId *string `protobuf:"bytes,9,opt,name=origin_onestop_id,json=originOnestopId" json:"origin_onestop_id,omitempty"`
RouteIndex *uint32 `protobuf:"varint,10,opt,name=route_index,json=routeIndex" json:"route_index,omitempty"`
ServiceAddedDates []uint32 `protobuf:"varint,11,rep,name=service_added_dates,json=serviceAddedDates" json:"service_added_dates,omitempty"`
ServiceDaysOfWeek []bool `protobuf:"varint,12,rep,name=service_days_of_week,json=serviceDaysOfWeek" json:"service_days_of_week,omitempty"`
ServiceEndDate *uint32 `protobuf:"varint,13,opt,name=service_end_date,json=serviceEndDate" json:"service_end_date,omitempty"`
ServiceExceptDates []uint32 `protobuf:"varint,14,rep,name=service_except_dates,json=serviceExceptDates" json:"service_except_dates,omitempty"`
ServiceStartDate *uint32 `protobuf:"varint,15,opt,name=service_start_date,json=serviceStartDate" json:"service_start_date,omitempty"`
TripHeadsign *string `protobuf:"bytes,16,opt,name=trip_headsign,json=tripHeadsign" json:"trip_headsign,omitempty"`
TripId *uint32 `protobuf:"varint,17,opt,name=trip_id,json=tripId" json:"trip_id,omitempty"`
WheelchairAccessible *bool `protobuf:"varint,18,opt,name=wheelchair_accessible,json=wheelchairAccessible" json:"wheelchair_accessible,omitempty"`
ShapeId *uint32 `protobuf:"varint,20,opt,name=shape_id,json=shapeId" json:"shape_id,omitempty"`
OriginDistTraveled *float32 `protobuf:"fixed32,21,opt,name=origin_dist_traveled,json=originDistTraveled" json:"origin_dist_traveled,omitempty"`
DestinationDistTraveled *float32 `protobuf:"fixed32,22,opt,name=destination_dist_traveled,json=destinationDistTraveled" json:"destination_dist_traveled,omitempty"`
FrequencyEndTime *uint32 `protobuf:"varint,23,opt,name=frequency_end_time,json=frequencyEndTime" json:"frequency_end_time,omitempty"`
FrequencyHeadwaySeconds *uint32 `protobuf:"varint,24,opt,name=frequency_headway_seconds,json=frequencyHeadwaySeconds" json:"frequency_headway_seconds,omitempty"`
}
func (x *Transit_StopPair) Reset() {
*x = Transit_StopPair{}
if protoimpl.UnsafeEnabled {
mi := &file_transit_proto_msgTypes[2]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *Transit_StopPair) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*Transit_StopPair) ProtoMessage() {}
func (x *Transit_StopPair) ProtoReflect() protoreflect.Message {
mi := &file_transit_proto_msgTypes[2]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use Transit_StopPair.ProtoReflect.Descriptor instead.
func (*Transit_StopPair) Descriptor() ([]byte, []int) {
return file_transit_proto_rawDescGZIP(), []int{0, 1}
}
func (x *Transit_StopPair) GetBikesAllowed() bool {
if x != nil && x.BikesAllowed != nil {
return *x.BikesAllowed
}
return false
}
func (x *Transit_StopPair) GetBlockId() uint32 {
if x != nil && x.BlockId != nil {
return *x.BlockId
}
return 0
}
func (x *Transit_StopPair) GetDestinationArrivalTime() uint32 {
if x != nil && x.DestinationArrivalTime != nil {
return *x.DestinationArrivalTime
}
return 0
}
func (x *Transit_StopPair) GetDestinationGraphid() uint64 {
if x != nil && x.DestinationGraphid != nil {
return *x.DestinationGraphid
}
return 0
}
func (x *Transit_StopPair) GetDestinationOnestopId() string {
if x != nil && x.DestinationOnestopId != nil {
return *x.DestinationOnestopId
}
return ""
}
func (x *Transit_StopPair) GetOperatedByOnestopId() string {
if x != nil && x.OperatedByOnestopId != nil {
return *x.OperatedByOnestopId
}
return ""
}
func (x *Transit_StopPair) GetOriginDepartureTime() uint32 {
if x != nil && x.OriginDepartureTime != nil {
return *x.OriginDepartureTime
}
return 0
}
func (x *Transit_StopPair) GetOriginGraphid() uint64 {
if x != nil && x.OriginGraphid != nil {
return *x.OriginGraphid
}
return 0
}
func (x *Transit_StopPair) GetOriginOnestopId() string {
if x != nil && x.OriginOnestopId != nil {
return *x.OriginOnestopId
}
return ""
}
func (x *Transit_StopPair) GetRouteIndex() uint32 {
if x != nil && x.RouteIndex != nil {
return *x.RouteIndex
}
return 0
}
func (x *Transit_StopPair) GetServiceAddedDates() []uint32 {
if x != nil {
return x.ServiceAddedDates
}
return nil
}
func (x *Transit_StopPair) GetServiceDaysOfWeek() []bool {
if x != nil {
return x.ServiceDaysOfWeek
}
return nil
}
func (x *Transit_StopPair) GetServiceEndDate() uint32 {
if x != nil && x.ServiceEndDate != nil {
return *x.ServiceEndDate
}
return 0
}
func (x *Transit_StopPair) GetServiceExceptDates() []uint32 {
if x != nil {
return x.ServiceExceptDates
}
return nil
}
func (x *Transit_StopPair) GetServiceStartDate() uint32 {
if x != nil && x.ServiceStartDate != nil {
return *x.ServiceStartDate
}
return 0
}
func (x *Transit_StopPair) GetTripHeadsign() string {
if x != nil && x.TripHeadsign != nil {
return *x.TripHeadsign
}
return ""
}
func (x *Transit_StopPair) GetTripId() uint32 {
if x != nil && x.TripId != nil {
return *x.TripId
}
return 0
}
func (x *Transit_StopPair) GetWheelchairAccessible() bool {
if x != nil && x.WheelchairAccessible != nil {
return *x.WheelchairAccessible
}
return false
}
func (x *Transit_StopPair) GetShapeId() uint32 {
if x != nil && x.ShapeId != nil {
return *x.ShapeId
}
return 0
}
func (x *Transit_StopPair) GetOriginDistTraveled() float32 {
if x != nil && x.OriginDistTraveled != nil {
return *x.OriginDistTraveled
}
return 0
}
func (x *Transit_StopPair) GetDestinationDistTraveled() float32 {
if x != nil && x.DestinationDistTraveled != nil {
return *x.DestinationDistTraveled
}
return 0
}
func (x *Transit_StopPair) GetFrequencyEndTime() uint32 {
if x != nil && x.FrequencyEndTime != nil {
return *x.FrequencyEndTime
}
return 0
}
func (x *Transit_StopPair) GetFrequencyHeadwaySeconds() uint32 {
if x != nil && x.FrequencyHeadwaySeconds != nil {
return *x.FrequencyHeadwaySeconds
}
return 0
}
type Transit_Route struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
Name *string `protobuf:"bytes,1,opt,name=name" json:"name,omitempty"`
OnestopId *string `protobuf:"bytes,2,opt,name=onestop_id,json=onestopId" json:"onestop_id,omitempty"`
OperatedByName *string `protobuf:"bytes,3,opt,name=operated_by_name,json=operatedByName" json:"operated_by_name,omitempty"`
OperatedByOnestopId *string `protobuf:"bytes,4,opt,name=operated_by_onestop_id,json=operatedByOnestopId" json:"operated_by_onestop_id,omitempty"`
OperatedByWebsite *string `protobuf:"bytes,5,opt,name=operated_by_website,json=operatedByWebsite" json:"operated_by_website,omitempty"`
RouteColor *uint32 `protobuf:"varint,6,opt,name=route_color,json=routeColor" json:"route_color,omitempty"`
RouteDesc *string `protobuf:"bytes,7,opt,name=route_desc,json=routeDesc" json:"route_desc,omitempty"`
RouteLongName *string `protobuf:"bytes,8,opt,name=route_long_name,json=routeLongName" json:"route_long_name,omitempty"`
RouteTextColor *uint32 `protobuf:"varint,9,opt,name=route_text_color,json=routeTextColor" json:"route_text_color,omitempty"`
VehicleType *Transit_VehicleType `protobuf:"varint,10,opt,name=vehicle_type,json=vehicleType,enum=valhalla.mjolnir.Transit_VehicleType" json:"vehicle_type,omitempty"`
}
func (x *Transit_Route) Reset() {
*x = Transit_Route{}
if protoimpl.UnsafeEnabled {
mi := &file_transit_proto_msgTypes[3]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *Transit_Route) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*Transit_Route) ProtoMessage() {}
func (x *Transit_Route) ProtoReflect() protoreflect.Message {
mi := &file_transit_proto_msgTypes[3]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use Transit_Route.ProtoReflect.Descriptor instead.
func (*Transit_Route) Descriptor() ([]byte, []int) {
return file_transit_proto_rawDescGZIP(), []int{0, 2}
}
func (x *Transit_Route) GetName() string {
if x != nil && x.Name != nil {
return *x.Name
}
return ""
}
func (x *Transit_Route) GetOnestopId() string {
if x != nil && x.OnestopId != nil {
return *x.OnestopId
}
return ""
}
func (x *Transit_Route) GetOperatedByName() string {
if x != nil && x.OperatedByName != nil {
return *x.OperatedByName
}
return ""
}
func (x *Transit_Route) GetOperatedByOnestopId() string {
if x != nil && x.OperatedByOnestopId != nil {
return *x.OperatedByOnestopId
}
return ""
}
func (x *Transit_Route) GetOperatedByWebsite() string {
if x != nil && x.OperatedByWebsite != nil {
return *x.OperatedByWebsite
}
return ""
}
func (x *Transit_Route) GetRouteColor() uint32 {
if x != nil && x.RouteColor != nil {
return *x.RouteColor
}
return 0
}
func (x *Transit_Route) GetRouteDesc() string {
if x != nil && x.RouteDesc != nil {
return *x.RouteDesc
}
return ""
}
func (x *Transit_Route) GetRouteLongName() string {
if x != nil && x.RouteLongName != nil {
return *x.RouteLongName
}
return ""
}
func (x *Transit_Route) GetRouteTextColor() uint32 {
if x != nil && x.RouteTextColor != nil {
return *x.RouteTextColor
}
return 0
}
func (x *Transit_Route) GetVehicleType() Transit_VehicleType {
if x != nil && x.VehicleType != nil {
return *x.VehicleType
}
return Transit_kTram
}
type Transit_Shape struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
ShapeId *uint32 `protobuf:"varint,1,opt,name=shape_id,json=shapeId" json:"shape_id,omitempty"`
EncodedShape []byte `protobuf:"bytes,2,opt,name=encoded_shape,json=encodedShape" json:"encoded_shape,omitempty"`
}
func (x *Transit_Shape) Reset() {
*x = Transit_Shape{}
if protoimpl.UnsafeEnabled {
mi := &file_transit_proto_msgTypes[4]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *Transit_Shape) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*Transit_Shape) ProtoMessage() {}
func (x *Transit_Shape) ProtoReflect() protoreflect.Message {
mi := &file_transit_proto_msgTypes[4]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use Transit_Shape.ProtoReflect.Descriptor instead.
func (*Transit_Shape) Descriptor() ([]byte, []int) {
return file_transit_proto_rawDescGZIP(), []int{0, 3}
}
func (x *Transit_Shape) GetShapeId() uint32 {
if x != nil && x.ShapeId != nil {
return *x.ShapeId
}
return 0
}
func (x *Transit_Shape) GetEncodedShape() []byte {
if x != nil {
return x.EncodedShape
}
return nil
}
var File_transit_proto protoreflect.FileDescriptor
var file_transit_proto_rawDesc = []byte{
0x0a, 0x0d, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x69, 0x74, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12,
0x10, 0x76, 0x61, 0x6c, 0x68, 0x61, 0x6c, 0x6c, 0x61, 0x2e, 0x6d, 0x6a, 0x6f, 0x6c, 0x6e, 0x69,
0x72, 0x22, 0xd1, 0x12, 0x0a, 0x07, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x69, 0x74, 0x12, 0x34, 0x0a,
0x05, 0x6e, 0x6f, 0x64, 0x65, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1e, 0x2e, 0x76,
0x61, 0x6c, 0x68, 0x61, 0x6c, 0x6c, 0x61, 0x2e, 0x6d, 0x6a, 0x6f, 0x6c, 0x6e, 0x69, 0x72, 0x2e,
0x54, 0x72, 0x61, 0x6e, 0x73, 0x69, 0x74, 0x2e, 0x4e, 0x6f, 0x64, 0x65, 0x52, 0x05, 0x6e, 0x6f,
0x64, 0x65, 0x73, 0x12, 0x41, 0x0a, 0x0a, 0x73, 0x74, 0x6f, 0x70, 0x5f, 0x70, 0x61, 0x69, 0x72,
0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x22, 0x2e, 0x76, 0x61, 0x6c, 0x68, 0x61, 0x6c,
0x6c, 0x61, 0x2e, 0x6d, 0x6a, 0x6f, 0x6c, 0x6e, 0x69, 0x72, 0x2e, 0x54, 0x72, 0x61, 0x6e, 0x73,
0x69, 0x74, 0x2e, 0x53, 0x74, 0x6f, 0x70, 0x50, 0x61, 0x69, 0x72, 0x52, 0x09, 0x73, 0x74, 0x6f,
0x70, 0x50, 0x61, 0x69, 0x72, 0x73, 0x12, 0x37, 0x0a, 0x06, 0x72, 0x6f, 0x75, 0x74, 0x65, 0x73,
0x18, 0x03, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1f, 0x2e, 0x76, 0x61, 0x6c, 0x68, 0x61, 0x6c, 0x6c,
0x61, 0x2e, 0x6d, 0x6a, 0x6f, 0x6c, 0x6e, 0x69, 0x72, 0x2e, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x69,
0x74, 0x2e, 0x52, 0x6f, 0x75, 0x74, 0x65, 0x52, 0x06, 0x72, 0x6f, 0x75, 0x74, 0x65, 0x73, 0x12,
0x37, 0x0a, 0x06, 0x73, 0x68, 0x61, 0x70, 0x65, 0x73, 0x18, 0x04, 0x20, 0x03, 0x28, 0x0b, 0x32,
0x1f, 0x2e, 0x76, 0x61, 0x6c, 0x68, 0x61, 0x6c, 0x6c, 0x61, 0x2e, 0x6d, 0x6a, 0x6f, 0x6c, 0x6e,
0x69, 0x72, 0x2e, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x69, 0x74, 0x2e, 0x53, 0x68, 0x61, 0x70, 0x65,
0x52, 0x06, 0x73, 0x68, 0x61, 0x70, 0x65, 0x73, 0x1a, 0xd9, 0x03, 0x0a, 0x04, 0x4e, 0x6f, 0x64,
0x65, 0x12, 0x10, 0x0a, 0x03, 0x6c, 0x6f, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x01, 0x52, 0x03,
0x6c, 0x6f, 0x6e, 0x12, 0x10, 0x0a, 0x03, 0x6c, 0x61, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x01,
0x52, 0x03, 0x6c, 0x61, 0x74, 0x12, 0x12, 0x0a, 0x04, 0x74, 0x79, 0x70, 0x65, 0x18, 0x03, 0x20,
0x01, 0x28, 0x0d, 0x52, 0x04, 0x74, 0x79, 0x70, 0x65, 0x12, 0x18, 0x0a, 0x07, 0x67, 0x72, 0x61,
0x70, 0x68, 0x69, 0x64, 0x18, 0x04, 0x20, 0x01, 0x28, 0x04, 0x52, 0x07, 0x67, 0x72, 0x61, 0x70,
0x68, 0x69, 0x64, 0x12, 0x2a, 0x0a, 0x11, 0x70, 0x72, 0x65, 0x76, 0x5f, 0x74, 0x79, 0x70, 0x65,
0x5f, 0x67, 0x72, 0x61, 0x70, 0x68, 0x69, 0x64, 0x18, 0x05, 0x20, 0x01, 0x28, 0x04, 0x52, 0x0f,
0x70, 0x72, 0x65, 0x76, 0x54, 0x79, 0x70, 0x65, 0x47, 0x72, 0x61, 0x70, 0x68, 0x69, 0x64, 0x12,
0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x06, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e,
0x61, 0x6d, 0x65, 0x12, 0x1d, 0x0a, 0x0a, 0x6f, 0x6e, 0x65, 0x73, 0x74, 0x6f, 0x70, 0x5f, 0x69,
0x64, 0x18, 0x07, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x6f, 0x6e, 0x65, 0x73, 0x74, 0x6f, 0x70,
0x49, 0x64, 0x12, 0x31, 0x0a, 0x15, 0x6f, 0x73, 0x6d, 0x5f, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63,
0x74, 0x69, 0x6e, 0x67, 0x5f, 0x77, 0x61, 0x79, 0x5f, 0x69, 0x64, 0x18, 0x08, 0x20, 0x01, 0x28,
0x04, 0x52, 0x12, 0x6f, 0x73, 0x6d, 0x43, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x69, 0x6e, 0x67,
0x57, 0x61, 0x79, 0x49, 0x64, 0x12, 0x1a, 0x0a, 0x08, 0x74, 0x69, 0x6d, 0x65, 0x7a, 0x6f, 0x6e,
0x65, 0x18, 0x09, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x74, 0x69, 0x6d, 0x65, 0x7a, 0x6f, 0x6e,
0x65, 0x12, 0x2f, 0x0a, 0x13, 0x77, 0x68, 0x65, 0x65, 0x6c, 0x63, 0x68, 0x61, 0x69, 0x72, 0x5f,
0x62, 0x6f, 0x61, 0x72, 0x64, 0x69, 0x6e, 0x67, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x08, 0x52, 0x12,
0x77, 0x68, 0x65, 0x65, 0x6c, 0x63, 0x68, 0x61, 0x69, 0x72, 0x42, 0x6f, 0x61, 0x72, 0x64, 0x69,
0x6e, 0x67, 0x12, 0x1c, 0x0a, 0x09, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, 0x64, 0x18,
0x0b, 0x20, 0x01, 0x28, 0x08, 0x52, 0x09, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, 0x64,
0x12, 0x26, 0x0a, 0x0e, 0x74, 0x72, 0x61, 0x76, 0x65, 0x72, 0x73, 0x61, 0x62, 0x69, 0x6c, 0x69,
0x74, 0x79, 0x18, 0x0c, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x0e, 0x74, 0x72, 0x61, 0x76, 0x65, 0x72,
0x73, 0x61, 0x62, 0x69, 0x6c, 0x69, 0x74, 0x79, 0x12, 0x2c, 0x0a, 0x12, 0x6f, 0x73, 0x6d, 0x5f,
0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x69, 0x6e, 0x67, 0x5f, 0x6c, 0x6f, 0x6e, 0x18, 0x0d,
0x20, 0x01, 0x28, 0x01, 0x52, 0x10, 0x6f, 0x73, 0x6d, 0x43, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74,
0x69, 0x6e, 0x67, 0x4c, 0x6f, 0x6e, 0x12, 0x2c, 0x0a, 0x12, 0x6f, 0x73, 0x6d, 0x5f, 0x63, 0x6f,
0x6e, 0x6e, 0x65, 0x63, 0x74, 0x69, 0x6e, 0x67, 0x5f, 0x6c, 0x61, 0x74, 0x18, 0x0e, 0x20, 0x01,
0x28, 0x01, 0x52, 0x10, 0x6f, 0x73, 0x6d, 0x43, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x69, 0x6e,
0x67, 0x4c, 0x61, 0x74, 0x1a, 0x99, 0x08, 0x0a, 0x08, 0x53, 0x74, 0x6f, 0x70, 0x50, 0x61, 0x69,
0x72, 0x12, 0x23, 0x0a, 0x0d, 0x62, 0x69, 0x6b, 0x65, 0x73, 0x5f, 0x61, 0x6c, 0x6c, 0x6f, 0x77,
0x65, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0c, 0x62, 0x69, 0x6b, 0x65, 0x73, 0x41,
0x6c, 0x6c, 0x6f, 0x77, 0x65, 0x64, 0x12, 0x19, 0x0a, 0x08, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x5f,
0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x07, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x49,
0x64, 0x12, 0x38, 0x0a, 0x18, 0x64, 0x65, 0x73, 0x74, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e,
0x5f, 0x61, 0x72, 0x72, 0x69, 0x76, 0x61, 0x6c, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x18, 0x03, 0x20,
0x01, 0x28, 0x0d, 0x52, 0x16, 0x64, 0x65, 0x73, 0x74, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e,
0x41, 0x72, 0x72, 0x69, 0x76, 0x61, 0x6c, 0x54, 0x69, 0x6d, 0x65, 0x12, 0x2f, 0x0a, 0x13, 0x64,
0x65, 0x73, 0x74, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x67, 0x72, 0x61, 0x70, 0x68,
0x69, 0x64, 0x18, 0x04, 0x20, 0x01, 0x28, 0x04, 0x52, 0x12, 0x64, 0x65, 0x73, 0x74, 0x69, 0x6e,
0x61, 0x74, 0x69, 0x6f, 0x6e, 0x47, 0x72, 0x61, 0x70, 0x68, 0x69, 0x64, 0x12, 0x34, 0x0a, 0x16,
0x64, 0x65, 0x73, 0x74, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x6f, 0x6e, 0x65, 0x73,
0x74, 0x6f, 0x70, 0x5f, 0x69, 0x64, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x14, 0x64, 0x65,
0x73, 0x74, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x4f, 0x6e, 0x65, 0x73, 0x74, 0x6f, 0x70,
0x49, 0x64, 0x12, 0x33, 0x0a, 0x16, 0x6f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x65, 0x64, 0x5f, 0x62,
0x79, 0x5f, 0x6f, 0x6e, 0x65, 0x73, 0x74, 0x6f, 0x70, 0x5f, 0x69, 0x64, 0x18, 0x06, 0x20, 0x01,
0x28, 0x09, 0x52, 0x13, 0x6f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x65, 0x64, 0x42, 0x79, 0x4f, 0x6e,
0x65, 0x73, 0x74, 0x6f, 0x70, 0x49, 0x64, 0x12, 0x32, 0x0a, 0x15, 0x6f, 0x72, 0x69, 0x67, 0x69,
0x6e, 0x5f, 0x64, 0x65, 0x70, 0x61, 0x72, 0x74, 0x75, 0x72, 0x65, 0x5f, 0x74, 0x69, 0x6d, 0x65,
0x18, 0x07, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x13, 0x6f, 0x72, 0x69, 0x67, 0x69, 0x6e, 0x44, 0x65,
0x70, 0x61, 0x72, 0x74, 0x75, 0x72, 0x65, 0x54, 0x69, 0x6d, 0x65, 0x12, 0x25, 0x0a, 0x0e, 0x6f,
0x72, 0x69, 0x67, 0x69, 0x6e, 0x5f, 0x67, 0x72, 0x61, 0x70, 0x68, 0x69, 0x64, 0x18, 0x08, 0x20,
0x01, 0x28, 0x04, 0x52, 0x0d, 0x6f, 0x72, 0x69, 0x67, 0x69, 0x6e, 0x47, 0x72, 0x61, 0x70, 0x68,
0x69, 0x64, 0x12, 0x2a, 0x0a, 0x11, 0x6f, 0x72, 0x69, 0x67, 0x69, 0x6e, 0x5f, 0x6f, 0x6e, 0x65,
0x73, 0x74, 0x6f, 0x70, 0x5f, 0x69, 0x64, 0x18, 0x09, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0f, 0x6f,
0x72, 0x69, 0x67, 0x69, 0x6e, 0x4f, 0x6e, 0x65, 0x73, 0x74, 0x6f, 0x70, 0x49, 0x64, 0x12, 0x1f,
0x0a, 0x0b, 0x72, 0x6f, 0x75, 0x74, 0x65, 0x5f, 0x69, 0x6e, 0x64, 0x65, 0x78, 0x18, 0x0a, 0x20,
0x01, 0x28, 0x0d, 0x52, 0x0a, 0x72, 0x6f, 0x75, 0x74, 0x65, 0x49, 0x6e, 0x64, 0x65, 0x78, 0x12,
0x2e, 0x0a, 0x13, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x5f, 0x61, 0x64, 0x64, 0x65, 0x64,
0x5f, 0x64, 0x61, 0x74, 0x65, 0x73, 0x18, 0x0b, 0x20, 0x03, 0x28, 0x0d, 0x52, 0x11, 0x73, 0x65,
0x72, 0x76, 0x69, 0x63, 0x65, 0x41, 0x64, 0x64, 0x65, 0x64, 0x44, 0x61, 0x74, 0x65, 0x73, 0x12,
0x2f, 0x0a, 0x14, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x5f, 0x64, 0x61, 0x79, 0x73, 0x5f,
0x6f, 0x66, 0x5f, 0x77, 0x65, 0x65, 0x6b, 0x18, 0x0c, 0x20, 0x03, 0x28, 0x08, 0x52, 0x11, 0x73,
0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x44, 0x61, 0x79, 0x73, 0x4f, 0x66, 0x57, 0x65, 0x65, 0x6b,
0x12, 0x28, 0x0a, 0x10, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x5f, 0x65, 0x6e, 0x64, 0x5f,
0x64, 0x61, 0x74, 0x65, 0x18, 0x0d, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x0e, 0x73, 0x65, 0x72, 0x76,
0x69, 0x63, 0x65, 0x45, 0x6e, 0x64, 0x44, 0x61, 0x74, 0x65, 0x12, 0x30, 0x0a, 0x14, 0x73, 0x65,
0x72, 0x76, 0x69, 0x63, 0x65, 0x5f, 0x65, 0x78, 0x63, 0x65, 0x70, 0x74, 0x5f, 0x64, 0x61, 0x74,
0x65, 0x73, 0x18, 0x0e, 0x20, 0x03, 0x28, 0x0d, 0x52, 0x12, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63,
0x65, 0x45, 0x78, 0x63, 0x65, 0x70, 0x74, 0x44, 0x61, 0x74, 0x65, 0x73, 0x12, 0x2c, 0x0a, 0x12,
0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x5f, 0x73, 0x74, 0x61, 0x72, 0x74, 0x5f, 0x64, 0x61,
0x74, 0x65, 0x18, 0x0f, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x10, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63,
0x65, 0x53, 0x74, 0x61, 0x72, 0x74, 0x44, 0x61, 0x74, 0x65, 0x12, 0x23, 0x0a, 0x0d, 0x74, 0x72,
0x69, 0x70, 0x5f, 0x68, 0x65, 0x61, 0x64, 0x73, 0x69, 0x67, 0x6e, 0x18, 0x10, 0x20, 0x01, 0x28,
0x09, 0x52, 0x0c, 0x74, 0x72, 0x69, 0x70, 0x48, 0x65, 0x61, 0x64, 0x73, 0x69, 0x67, 0x6e, 0x12,
0x17, 0x0a, 0x07, 0x74, 0x72, 0x69, 0x70, 0x5f, 0x69, 0x64, 0x18, 0x11, 0x20, 0x01, 0x28, 0x0d,
0x52, 0x06, 0x74, 0x72, 0x69, 0x70, 0x49, 0x64, 0x12, 0x33, 0x0a, 0x15, 0x77, 0x68, 0x65, 0x65,
0x6c, 0x63, 0x68, 0x61, 0x69, 0x72, 0x5f, 0x61, 0x63, 0x63, 0x65, 0x73, 0x73, 0x69, 0x62, 0x6c,
0x65, 0x18, 0x12, 0x20, 0x01, 0x28, 0x08, 0x52, 0x14, 0x77, 0x68, 0x65, 0x65, 0x6c, 0x63, 0x68,
0x61, 0x69, 0x72, 0x41, 0x63, 0x63, 0x65, 0x73, 0x73, 0x69, 0x62, 0x6c, 0x65, 0x12, 0x19, 0x0a,
0x08, 0x73, 0x68, 0x61, 0x70, 0x65, 0x5f, 0x69, 0x64, 0x18, 0x14, 0x20, 0x01, 0x28, 0x0d, 0x52,
0x07, 0x73, 0x68, 0x61, 0x70, 0x65, 0x49, 0x64, 0x12, 0x30, 0x0a, 0x14, 0x6f, 0x72, 0x69, 0x67,
0x69, 0x6e, 0x5f, 0x64, 0x69, 0x73, 0x74, 0x5f, 0x74, 0x72, 0x61, 0x76, 0x65, 0x6c, 0x65, 0x64,
0x18, 0x15, 0x20, 0x01, 0x28, 0x02, 0x52, 0x12, 0x6f, 0x72, 0x69, 0x67, 0x69, 0x6e, 0x44, 0x69,
0x73, 0x74, 0x54, 0x72, 0x61, 0x76, 0x65, 0x6c, 0x65, 0x64, 0x12, 0x3a, 0x0a, 0x19, 0x64, 0x65,
0x73, 0x74, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x64, 0x69, 0x73, 0x74, 0x5f, 0x74,
0x72, 0x61, 0x76, 0x65, 0x6c, 0x65, 0x64, 0x18, 0x16, 0x20, 0x01, 0x28, 0x02, 0x52, 0x17, 0x64,
0x65, 0x73, 0x74, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x44, 0x69, 0x73, 0x74, 0x54, 0x72,
0x61, 0x76, 0x65, 0x6c, 0x65, 0x64, 0x12, 0x2c, 0x0a, 0x12, 0x66, 0x72, 0x65, 0x71, 0x75, 0x65,
0x6e, 0x63, 0x79, 0x5f, 0x65, 0x6e, 0x64, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x18, 0x17, 0x20, 0x01,
0x28, 0x0d, 0x52, 0x10, 0x66, 0x72, 0x65, 0x71, 0x75, 0x65, 0x6e, 0x63, 0x79, 0x45, 0x6e, 0x64,
0x54, 0x69, 0x6d, 0x65, 0x12, 0x3a, 0x0a, 0x19, 0x66, 0x72, 0x65, 0x71, 0x75, 0x65, 0x6e, 0x63,
0x79, 0x5f, 0x68, 0x65, 0x61, 0x64, 0x77, 0x61, 0x79, 0x5f, 0x73, 0x65, 0x63, 0x6f, 0x6e, 0x64,
0x73, 0x18, 0x18, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x17, 0x66, 0x72, 0x65, 0x71, 0x75, 0x65, 0x6e,
0x63, 0x79, 0x48, 0x65, 0x61, 0x64, 0x77, 0x61, 0x79, 0x53, 0x65, 0x63, 0x6f, 0x6e, 0x64, 0x73,
0x1a, 0xa5, 0x03, 0x0a, 0x05, 0x52, 0x6f, 0x75, 0x74, 0x65, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61,
0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x1d,
0x0a, 0x0a, 0x6f, 0x6e, 0x65, 0x73, 0x74, 0x6f, 0x70, 0x5f, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01,
0x28, 0x09, 0x52, 0x09, 0x6f, 0x6e, 0x65, 0x73, 0x74, 0x6f, 0x70, 0x49, 0x64, 0x12, 0x28, 0x0a,
0x10, 0x6f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x65, 0x64, 0x5f, 0x62, 0x79, 0x5f, 0x6e, 0x61, 0x6d,
0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0e, 0x6f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x65,
0x64, 0x42, 0x79, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x33, 0x0a, 0x16, 0x6f, 0x70, 0x65, 0x72, 0x61,
0x74, 0x65, 0x64, 0x5f, 0x62, 0x79, 0x5f, 0x6f, 0x6e, 0x65, 0x73, 0x74, 0x6f, 0x70, 0x5f, 0x69,
0x64, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x13, 0x6f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x65,
0x64, 0x42, 0x79, 0x4f, 0x6e, 0x65, 0x73, 0x74, 0x6f, 0x70, 0x49, 0x64, 0x12, 0x2e, 0x0a, 0x13,
0x6f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x65, 0x64, 0x5f, 0x62, 0x79, 0x5f, 0x77, 0x65, 0x62, 0x73,
0x69, 0x74, 0x65, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x11, 0x6f, 0x70, 0x65, 0x72, 0x61,
0x74, 0x65, 0x64, 0x42, 0x79, 0x57, 0x65, 0x62, 0x73, 0x69, 0x74, 0x65, 0x12, 0x1f, 0x0a, 0x0b,
0x72, 0x6f, 0x75, 0x74, 0x65, 0x5f, 0x63, 0x6f, 0x6c, 0x6f, 0x72, 0x18, 0x06, 0x20, 0x01, 0x28,
0x0d, 0x52, 0x0a, 0x72, 0x6f, 0x75, 0x74, 0x65, 0x43, 0x6f, 0x6c, 0x6f, 0x72, 0x12, 0x1d, 0x0a,
0x0a, 0x72, 0x6f, 0x75, 0x74, 0x65, 0x5f, 0x64, 0x65, 0x73, 0x63, 0x18, 0x07, 0x20, 0x01, 0x28,
0x09, 0x52, 0x09, 0x72, 0x6f, 0x75, 0x74, 0x65, 0x44, 0x65, 0x73, 0x63, 0x12, 0x26, 0x0a, 0x0f,
0x72, 0x6f, 0x75, 0x74, 0x65, 0x5f, 0x6c, 0x6f, 0x6e, 0x67, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18,
0x08, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0d, 0x72, 0x6f, 0x75, 0x74, 0x65, 0x4c, 0x6f, 0x6e, 0x67,
0x4e, 0x61, 0x6d, 0x65, 0x12, 0x28, 0x0a, 0x10, 0x72, 0x6f, 0x75, 0x74, 0x65, 0x5f, 0x74, 0x65,
0x78, 0x74, 0x5f, 0x63, 0x6f, 0x6c, 0x6f, 0x72, 0x18, 0x09, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x0e,
0x72, 0x6f, 0x75, 0x74, 0x65, 0x54, 0x65, 0x78, 0x74, 0x43, 0x6f, 0x6c, 0x6f, 0x72, 0x12, 0x48,
0x0a, 0x0c, 0x76, 0x65, 0x68, 0x69, 0x63, 0x6c, 0x65, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x18, 0x0a,
0x20, 0x01, 0x28, 0x0e, 0x32, 0x25, 0x2e, 0x76, 0x61, 0x6c, 0x68, 0x61, 0x6c, 0x6c, 0x61, 0x2e,
0x6d, 0x6a, 0x6f, 0x6c, 0x6e, 0x69, 0x72, 0x2e, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x69, 0x74, 0x2e,
0x56, 0x65, 0x68, 0x69, 0x63, 0x6c, 0x65, 0x54, 0x79, 0x70, 0x65, 0x52, 0x0b, 0x76, 0x65, 0x68,
0x69, 0x63, 0x6c, 0x65, 0x54, 0x79, 0x70, 0x65, 0x1a, 0x47, 0x0a, 0x05, 0x53, 0x68, 0x61, 0x70,
0x65, 0x12, 0x19, 0x0a, 0x08, 0x73, 0x68, 0x61, 0x70, 0x65, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20,
0x01, 0x28, 0x0d, 0x52, 0x07, 0x73, 0x68, 0x61, 0x70, 0x65, 0x49, 0x64, 0x12, 0x23, 0x0a, 0x0d,
0x65, 0x6e, 0x63, 0x6f, 0x64, 0x65, 0x64, 0x5f, 0x73, 0x68, 0x61, 0x70, 0x65, 0x18, 0x02, 0x20,
0x01, 0x28, 0x0c, 0x52, 0x0c, 0x65, 0x6e, 0x63, 0x6f, 0x64, 0x65, 0x64, 0x53, 0x68, 0x61, 0x70,
0x65, 0x22, 0x72, 0x0a, 0x0b, 0x56, 0x65, 0x68, 0x69, 0x63, 0x6c, 0x65, 0x54, 0x79, 0x70, 0x65,
0x12, 0x09, 0x0a, 0x05, 0x6b, 0x54, 0x72, 0x61, 0x6d, 0x10, 0x00, 0x12, 0x0a, 0x0a, 0x06, 0x6b,
0x4d, 0x65, 0x74, 0x72, 0x6f, 0x10, 0x01, 0x12, 0x09, 0x0a, 0x05, 0x6b, 0x52, 0x61, 0x69, 0x6c,
0x10, 0x02, 0x12, 0x08, 0x0a, 0x04, 0x6b, 0x42, 0x75, 0x73, 0x10, 0x03, 0x12, 0x0a, 0x0a, 0x06,
0x6b, 0x46, 0x65, 0x72, 0x72, 0x79, 0x10, 0x04, 0x12, 0x0d, 0x0a, 0x09, 0x6b, 0x43, 0x61, 0x62,
0x6c, 0x65, 0x43, 0x61, 0x72, 0x10, 0x05, 0x12, 0x0c, 0x0a, 0x08, 0x6b, 0x47, 0x6f, 0x6e, 0x64,
0x6f, 0x6c, 0x61, 0x10, 0x06, 0x12, 0x0e, 0x0a, 0x0a, 0x6b, 0x46, 0x75, 0x6e, 0x69, 0x63, 0x75,
0x6c, 0x61, 0x72, 0x10, 0x07, 0x42, 0x40, 0x48, 0x03, 0x5a, 0x3c, 0x67, 0x69, 0x74, 0x2e, 0x63,
0x6f, 0x6f, 0x70, 0x67, 0x6f, 0x2e, 0x69, 0x6f, 0x2f, 0x63, 0x6f, 0x6f, 0x70, 0x67, 0x6f, 0x2d,
0x70, 0x6c, 0x61, 0x74, 0x66, 0x6f, 0x72, 0x6d, 0x2f, 0x72, 0x6f, 0x75, 0x74, 0x69, 0x6e, 0x67,
0x2d, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x76,
0x61, 0x6c, 0x68, 0x61, 0x6c, 0x6c, 0x61,
}
var (
file_transit_proto_rawDescOnce sync.Once
file_transit_proto_rawDescData = file_transit_proto_rawDesc
)
func file_transit_proto_rawDescGZIP() []byte {
file_transit_proto_rawDescOnce.Do(func() {
file_transit_proto_rawDescData = protoimpl.X.CompressGZIP(file_transit_proto_rawDescData)
})
return file_transit_proto_rawDescData
}
var file_transit_proto_enumTypes = make([]protoimpl.EnumInfo, 1)
var file_transit_proto_msgTypes = make([]protoimpl.MessageInfo, 5)
var file_transit_proto_goTypes = []interface{}{
(Transit_VehicleType)(0), // 0: valhalla.mjolnir.Transit.VehicleType
(*Transit)(nil), // 1: valhalla.mjolnir.Transit
(*Transit_Node)(nil), // 2: valhalla.mjolnir.Transit.Node
(*Transit_StopPair)(nil), // 3: valhalla.mjolnir.Transit.StopPair
(*Transit_Route)(nil), // 4: valhalla.mjolnir.Transit.Route
(*Transit_Shape)(nil), // 5: valhalla.mjolnir.Transit.Shape
}
var file_transit_proto_depIdxs = []int32{
2, // 0: valhalla.mjolnir.Transit.nodes:type_name -> valhalla.mjolnir.Transit.Node
3, // 1: valhalla.mjolnir.Transit.stop_pairs:type_name -> valhalla.mjolnir.Transit.StopPair
4, // 2: valhalla.mjolnir.Transit.routes:type_name -> valhalla.mjolnir.Transit.Route
5, // 3: valhalla.mjolnir.Transit.shapes:type_name -> valhalla.mjolnir.Transit.Shape
0, // 4: valhalla.mjolnir.Transit.Route.vehicle_type:type_name -> valhalla.mjolnir.Transit.VehicleType
5, // [5:5] is the sub-list for method output_type
5, // [5:5] is the sub-list for method input_type
5, // [5:5] is the sub-list for extension type_name
5, // [5:5] is the sub-list for extension extendee
0, // [0:5] is the sub-list for field type_name
}
func init() { file_transit_proto_init() }
func file_transit_proto_init() {
if File_transit_proto != nil {
return
}
if !protoimpl.UnsafeEnabled {
file_transit_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*Transit); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_transit_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*Transit_Node); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_transit_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*Transit_StopPair); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_transit_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*Transit_Route); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_transit_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*Transit_Shape); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
}
type x struct{}
out := protoimpl.TypeBuilder{
File: protoimpl.DescBuilder{
GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
RawDescriptor: file_transit_proto_rawDesc,
NumEnums: 1,
NumMessages: 5,
NumExtensions: 0,
NumServices: 0,
},
GoTypes: file_transit_proto_goTypes,
DependencyIndexes: file_transit_proto_depIdxs,
EnumInfos: file_transit_proto_enumTypes,
MessageInfos: file_transit_proto_msgTypes,
}.Build()
File_transit_proto = out.File
file_transit_proto_rawDesc = nil
file_transit_proto_goTypes = nil
file_transit_proto_depIdxs = nil
}

View File

@ -0,0 +1,84 @@
syntax = "proto2";
option optimize_for = LITE_RUNTIME;
option go_package = "git.coopgo.io/coopgo-platform/routing-service/proto/valhalla";
package valhalla.mjolnir;
message Transit {
message Node { // stations
optional double lon = 1;
optional double lat = 2;
optional uint32 type = 3; // comes from baldr::NodeType
optional uint64 graphid = 4;
optional uint64 prev_type_graphid = 5;
optional string name = 6;
optional string onestop_id = 7;
optional uint64 osm_connecting_way_id = 8; // use as a hint to connect to osm
optional string timezone = 9;
optional bool wheelchair_boarding = 10;
optional bool generated = 11;
optional uint32 traversability = 12;
optional double osm_connecting_lon = 13; // use as a hint to connect to osm
optional double osm_connecting_lat = 14; // use as a hint to connect to osm
}
message StopPair {
optional bool bikes_allowed = 1;
optional uint32 block_id = 2;
optional uint32 destination_arrival_time = 3;
optional uint64 destination_graphid = 4;
optional string destination_onestop_id = 5;
optional string operated_by_onestop_id = 6;
optional uint32 origin_departure_time = 7;
optional uint64 origin_graphid = 8;
optional string origin_onestop_id = 9;
optional uint32 route_index = 10;
repeated uint32 service_added_dates = 11;
repeated bool service_days_of_week = 12;
optional uint32 service_end_date = 13;
repeated uint32 service_except_dates = 14;
optional uint32 service_start_date = 15;
optional string trip_headsign = 16;
optional uint32 trip_id = 17;
optional bool wheelchair_accessible = 18;
optional uint32 shape_id = 20;
optional float origin_dist_traveled = 21;
optional float destination_dist_traveled = 22;
optional uint32 frequency_end_time = 23;
optional uint32 frequency_headway_seconds = 24;
}
enum VehicleType {
kTram = 0;
kMetro = 1;
kRail = 2;
kBus = 3;
kFerry = 4;
kCableCar = 5;
kGondola = 6;
kFunicular = 7;
}
message Route {
optional string name = 1;
optional string onestop_id = 2;
optional string operated_by_name = 3;
optional string operated_by_onestop_id = 4;
optional string operated_by_website = 5;
optional uint32 route_color = 6;
optional string route_desc = 7;
optional string route_long_name = 8;
optional uint32 route_text_color = 9;
optional VehicleType vehicle_type = 10;
}
message Shape {
optional uint32 shape_id = 1;
optional bytes encoded_shape = 2;
}
repeated Node nodes = 1;
repeated StopPair stop_pairs = 2;
repeated Route routes = 3;
repeated Shape shapes = 4;
}

View File

@ -0,0 +1,937 @@
// Code generated by protoc-gen-go. DO NOT EDIT.
// versions:
// protoc-gen-go v1.28.0
// protoc v3.19.4
// source: transit_fetch.proto
package valhalla
import (
protoreflect "google.golang.org/protobuf/reflect/protoreflect"
protoimpl "google.golang.org/protobuf/runtime/protoimpl"
reflect "reflect"
sync "sync"
)
const (
// Verify that this generated code is sufficiently up-to-date.
_ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion)
// Verify that runtime/protoimpl is sufficiently up-to-date.
_ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20)
)
type Transit_Fetch_VehicleType int32
const (
Transit_Fetch_kTram Transit_Fetch_VehicleType = 0
Transit_Fetch_kMetro Transit_Fetch_VehicleType = 1
Transit_Fetch_kRail Transit_Fetch_VehicleType = 2
Transit_Fetch_kBus Transit_Fetch_VehicleType = 3
Transit_Fetch_kFerry Transit_Fetch_VehicleType = 4
Transit_Fetch_kCableCar Transit_Fetch_VehicleType = 5
Transit_Fetch_kGondola Transit_Fetch_VehicleType = 6
Transit_Fetch_kFunicular Transit_Fetch_VehicleType = 7
)
// Enum value maps for Transit_Fetch_VehicleType.
var (
Transit_Fetch_VehicleType_name = map[int32]string{
0: "kTram",
1: "kMetro",
2: "kRail",
3: "kBus",
4: "kFerry",
5: "kCableCar",
6: "kGondola",
7: "kFunicular",
}
Transit_Fetch_VehicleType_value = map[string]int32{
"kTram": 0,
"kMetro": 1,
"kRail": 2,
"kBus": 3,
"kFerry": 4,
"kCableCar": 5,
"kGondola": 6,
"kFunicular": 7,
}
)
func (x Transit_Fetch_VehicleType) Enum() *Transit_Fetch_VehicleType {
p := new(Transit_Fetch_VehicleType)
*p = x
return p
}
func (x Transit_Fetch_VehicleType) String() string {
return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x))
}
func (Transit_Fetch_VehicleType) Descriptor() protoreflect.EnumDescriptor {
return file_transit_fetch_proto_enumTypes[0].Descriptor()
}
func (Transit_Fetch_VehicleType) Type() protoreflect.EnumType {
return &file_transit_fetch_proto_enumTypes[0]
}
func (x Transit_Fetch_VehicleType) Number() protoreflect.EnumNumber {
return protoreflect.EnumNumber(x)
}
// Deprecated: Do not use.
func (x *Transit_Fetch_VehicleType) UnmarshalJSON(b []byte) error {
num, err := protoimpl.X.UnmarshalJSONEnum(x.Descriptor(), b)
if err != nil {
return err
}
*x = Transit_Fetch_VehicleType(num)
return nil
}
// Deprecated: Use Transit_Fetch_VehicleType.Descriptor instead.
func (Transit_Fetch_VehicleType) EnumDescriptor() ([]byte, []int) {
return file_transit_fetch_proto_rawDescGZIP(), []int{0, 0}
}
type Transit_Fetch struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
Stops []*Transit_Fetch_Stop `protobuf:"bytes,1,rep,name=stops" json:"stops,omitempty"`
StopPairs []*Transit_Fetch_StopPair `protobuf:"bytes,2,rep,name=stop_pairs,json=stopPairs" json:"stop_pairs,omitempty"`
Routes []*Transit_Fetch_Route `protobuf:"bytes,3,rep,name=routes" json:"routes,omitempty"`
Shapes []*Transit_Fetch_Shape `protobuf:"bytes,4,rep,name=shapes" json:"shapes,omitempty"`
}
func (x *Transit_Fetch) Reset() {
*x = Transit_Fetch{}
if protoimpl.UnsafeEnabled {
mi := &file_transit_fetch_proto_msgTypes[0]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *Transit_Fetch) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*Transit_Fetch) ProtoMessage() {}
func (x *Transit_Fetch) ProtoReflect() protoreflect.Message {
mi := &file_transit_fetch_proto_msgTypes[0]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use Transit_Fetch.ProtoReflect.Descriptor instead.
func (*Transit_Fetch) Descriptor() ([]byte, []int) {
return file_transit_fetch_proto_rawDescGZIP(), []int{0}
}
func (x *Transit_Fetch) GetStops() []*Transit_Fetch_Stop {
if x != nil {
return x.Stops
}
return nil
}
func (x *Transit_Fetch) GetStopPairs() []*Transit_Fetch_StopPair {
if x != nil {
return x.StopPairs
}
return nil
}
func (x *Transit_Fetch) GetRoutes() []*Transit_Fetch_Route {
if x != nil {
return x.Routes
}
return nil
}
func (x *Transit_Fetch) GetShapes() []*Transit_Fetch_Shape {
if x != nil {
return x.Shapes
}
return nil
}
type Transit_Fetch_Stop struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
Lon *float32 `protobuf:"fixed32,1,opt,name=lon" json:"lon,omitempty"`
Lat *float32 `protobuf:"fixed32,2,opt,name=lat" json:"lat,omitempty"`
Graphid *uint64 `protobuf:"varint,3,opt,name=graphid" json:"graphid,omitempty"`
Name *string `protobuf:"bytes,4,opt,name=name" json:"name,omitempty"`
OnestopId *string `protobuf:"bytes,5,opt,name=onestop_id,json=onestopId" json:"onestop_id,omitempty"`
OsmWayId *uint64 `protobuf:"varint,6,opt,name=osm_way_id,json=osmWayId" json:"osm_way_id,omitempty"`
Timezone *string `protobuf:"bytes,8,opt,name=timezone" json:"timezone,omitempty"`
WheelchairBoarding *bool `protobuf:"varint,9,opt,name=wheelchair_boarding,json=wheelchairBoarding" json:"wheelchair_boarding,omitempty"`
}
func (x *Transit_Fetch_Stop) Reset() {
*x = Transit_Fetch_Stop{}
if protoimpl.UnsafeEnabled {
mi := &file_transit_fetch_proto_msgTypes[1]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *Transit_Fetch_Stop) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*Transit_Fetch_Stop) ProtoMessage() {}
func (x *Transit_Fetch_Stop) ProtoReflect() protoreflect.Message {
mi := &file_transit_fetch_proto_msgTypes[1]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use Transit_Fetch_Stop.ProtoReflect.Descriptor instead.
func (*Transit_Fetch_Stop) Descriptor() ([]byte, []int) {
return file_transit_fetch_proto_rawDescGZIP(), []int{0, 0}
}
func (x *Transit_Fetch_Stop) GetLon() float32 {
if x != nil && x.Lon != nil {
return *x.Lon
}
return 0
}
func (x *Transit_Fetch_Stop) GetLat() float32 {
if x != nil && x.Lat != nil {
return *x.Lat
}
return 0
}
func (x *Transit_Fetch_Stop) GetGraphid() uint64 {
if x != nil && x.Graphid != nil {
return *x.Graphid
}
return 0
}
func (x *Transit_Fetch_Stop) GetName() string {
if x != nil && x.Name != nil {
return *x.Name
}
return ""
}
func (x *Transit_Fetch_Stop) GetOnestopId() string {
if x != nil && x.OnestopId != nil {
return *x.OnestopId
}
return ""
}
func (x *Transit_Fetch_Stop) GetOsmWayId() uint64 {
if x != nil && x.OsmWayId != nil {
return *x.OsmWayId
}
return 0
}
func (x *Transit_Fetch_Stop) GetTimezone() string {
if x != nil && x.Timezone != nil {
return *x.Timezone
}
return ""
}
func (x *Transit_Fetch_Stop) GetWheelchairBoarding() bool {
if x != nil && x.WheelchairBoarding != nil {
return *x.WheelchairBoarding
}
return false
}
type Transit_Fetch_StopPair struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
BikesAllowed *bool `protobuf:"varint,1,opt,name=bikes_allowed,json=bikesAllowed" json:"bikes_allowed,omitempty"`
BlockId *uint32 `protobuf:"varint,2,opt,name=block_id,json=blockId" json:"block_id,omitempty"`
DestinationArrivalTime *uint32 `protobuf:"varint,3,opt,name=destination_arrival_time,json=destinationArrivalTime" json:"destination_arrival_time,omitempty"`
DestinationGraphid *uint64 `protobuf:"varint,4,opt,name=destination_graphid,json=destinationGraphid" json:"destination_graphid,omitempty"`
DestinationOnestopId *string `protobuf:"bytes,5,opt,name=destination_onestop_id,json=destinationOnestopId" json:"destination_onestop_id,omitempty"`
OperatedByOnestopId *string `protobuf:"bytes,6,opt,name=operated_by_onestop_id,json=operatedByOnestopId" json:"operated_by_onestop_id,omitempty"`
OriginDepartureTime *uint32 `protobuf:"varint,7,opt,name=origin_departure_time,json=originDepartureTime" json:"origin_departure_time,omitempty"`
OriginGraphid *uint64 `protobuf:"varint,8,opt,name=origin_graphid,json=originGraphid" json:"origin_graphid,omitempty"`
OriginOnestopId *string `protobuf:"bytes,9,opt,name=origin_onestop_id,json=originOnestopId" json:"origin_onestop_id,omitempty"`
RouteIndex *uint32 `protobuf:"varint,10,opt,name=route_index,json=routeIndex" json:"route_index,omitempty"`
ServiceAddedDates []uint32 `protobuf:"varint,11,rep,name=service_added_dates,json=serviceAddedDates" json:"service_added_dates,omitempty"`
ServiceDaysOfWeek []bool `protobuf:"varint,12,rep,name=service_days_of_week,json=serviceDaysOfWeek" json:"service_days_of_week,omitempty"`
ServiceEndDate *uint32 `protobuf:"varint,13,opt,name=service_end_date,json=serviceEndDate" json:"service_end_date,omitempty"`
ServiceExceptDates []uint32 `protobuf:"varint,14,rep,name=service_except_dates,json=serviceExceptDates" json:"service_except_dates,omitempty"`
ServiceStartDate *uint32 `protobuf:"varint,15,opt,name=service_start_date,json=serviceStartDate" json:"service_start_date,omitempty"`
TripHeadsign *string `protobuf:"bytes,16,opt,name=trip_headsign,json=tripHeadsign" json:"trip_headsign,omitempty"`
TripId *uint32 `protobuf:"varint,17,opt,name=trip_id,json=tripId" json:"trip_id,omitempty"`
WheelchairAccessible *bool `protobuf:"varint,18,opt,name=wheelchair_accessible,json=wheelchairAccessible" json:"wheelchair_accessible,omitempty"`
ShapeId *uint32 `protobuf:"varint,20,opt,name=shape_id,json=shapeId" json:"shape_id,omitempty"`
OriginDistTraveled *float32 `protobuf:"fixed32,21,opt,name=origin_dist_traveled,json=originDistTraveled" json:"origin_dist_traveled,omitempty"`
DestinationDistTraveled *float32 `protobuf:"fixed32,22,opt,name=destination_dist_traveled,json=destinationDistTraveled" json:"destination_dist_traveled,omitempty"`
FrequencyEndTime *uint32 `protobuf:"varint,23,opt,name=frequency_end_time,json=frequencyEndTime" json:"frequency_end_time,omitempty"`
FrequencyHeadwaySeconds *uint32 `protobuf:"varint,24,opt,name=frequency_headway_seconds,json=frequencyHeadwaySeconds" json:"frequency_headway_seconds,omitempty"`
}
func (x *Transit_Fetch_StopPair) Reset() {
*x = Transit_Fetch_StopPair{}
if protoimpl.UnsafeEnabled {
mi := &file_transit_fetch_proto_msgTypes[2]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *Transit_Fetch_StopPair) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*Transit_Fetch_StopPair) ProtoMessage() {}
func (x *Transit_Fetch_StopPair) ProtoReflect() protoreflect.Message {
mi := &file_transit_fetch_proto_msgTypes[2]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use Transit_Fetch_StopPair.ProtoReflect.Descriptor instead.
func (*Transit_Fetch_StopPair) Descriptor() ([]byte, []int) {
return file_transit_fetch_proto_rawDescGZIP(), []int{0, 1}
}
func (x *Transit_Fetch_StopPair) GetBikesAllowed() bool {
if x != nil && x.BikesAllowed != nil {
return *x.BikesAllowed
}
return false
}
func (x *Transit_Fetch_StopPair) GetBlockId() uint32 {
if x != nil && x.BlockId != nil {
return *x.BlockId
}
return 0
}
func (x *Transit_Fetch_StopPair) GetDestinationArrivalTime() uint32 {
if x != nil && x.DestinationArrivalTime != nil {
return *x.DestinationArrivalTime
}
return 0
}
func (x *Transit_Fetch_StopPair) GetDestinationGraphid() uint64 {
if x != nil && x.DestinationGraphid != nil {
return *x.DestinationGraphid
}
return 0
}
func (x *Transit_Fetch_StopPair) GetDestinationOnestopId() string {
if x != nil && x.DestinationOnestopId != nil {
return *x.DestinationOnestopId
}
return ""
}
func (x *Transit_Fetch_StopPair) GetOperatedByOnestopId() string {
if x != nil && x.OperatedByOnestopId != nil {
return *x.OperatedByOnestopId
}
return ""
}
func (x *Transit_Fetch_StopPair) GetOriginDepartureTime() uint32 {
if x != nil && x.OriginDepartureTime != nil {
return *x.OriginDepartureTime
}
return 0
}
func (x *Transit_Fetch_StopPair) GetOriginGraphid() uint64 {
if x != nil && x.OriginGraphid != nil {
return *x.OriginGraphid
}
return 0
}
func (x *Transit_Fetch_StopPair) GetOriginOnestopId() string {
if x != nil && x.OriginOnestopId != nil {
return *x.OriginOnestopId
}
return ""
}
func (x *Transit_Fetch_StopPair) GetRouteIndex() uint32 {
if x != nil && x.RouteIndex != nil {
return *x.RouteIndex
}
return 0
}
func (x *Transit_Fetch_StopPair) GetServiceAddedDates() []uint32 {
if x != nil {
return x.ServiceAddedDates
}
return nil
}
func (x *Transit_Fetch_StopPair) GetServiceDaysOfWeek() []bool {
if x != nil {
return x.ServiceDaysOfWeek
}
return nil
}
func (x *Transit_Fetch_StopPair) GetServiceEndDate() uint32 {
if x != nil && x.ServiceEndDate != nil {
return *x.ServiceEndDate
}
return 0
}
func (x *Transit_Fetch_StopPair) GetServiceExceptDates() []uint32 {
if x != nil {
return x.ServiceExceptDates
}
return nil
}
func (x *Transit_Fetch_StopPair) GetServiceStartDate() uint32 {
if x != nil && x.ServiceStartDate != nil {
return *x.ServiceStartDate
}
return 0
}
func (x *Transit_Fetch_StopPair) GetTripHeadsign() string {
if x != nil && x.TripHeadsign != nil {
return *x.TripHeadsign
}
return ""
}
func (x *Transit_Fetch_StopPair) GetTripId() uint32 {
if x != nil && x.TripId != nil {
return *x.TripId
}
return 0
}
func (x *Transit_Fetch_StopPair) GetWheelchairAccessible() bool {
if x != nil && x.WheelchairAccessible != nil {
return *x.WheelchairAccessible
}
return false
}
func (x *Transit_Fetch_StopPair) GetShapeId() uint32 {
if x != nil && x.ShapeId != nil {
return *x.ShapeId
}
return 0
}
func (x *Transit_Fetch_StopPair) GetOriginDistTraveled() float32 {
if x != nil && x.OriginDistTraveled != nil {
return *x.OriginDistTraveled
}
return 0
}
func (x *Transit_Fetch_StopPair) GetDestinationDistTraveled() float32 {
if x != nil && x.DestinationDistTraveled != nil {
return *x.DestinationDistTraveled
}
return 0
}
func (x *Transit_Fetch_StopPair) GetFrequencyEndTime() uint32 {
if x != nil && x.FrequencyEndTime != nil {
return *x.FrequencyEndTime
}
return 0
}
func (x *Transit_Fetch_StopPair) GetFrequencyHeadwaySeconds() uint32 {
if x != nil && x.FrequencyHeadwaySeconds != nil {
return *x.FrequencyHeadwaySeconds
}
return 0
}
type Transit_Fetch_Route struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
Name *string `protobuf:"bytes,1,opt,name=name" json:"name,omitempty"`
OnestopId *string `protobuf:"bytes,2,opt,name=onestop_id,json=onestopId" json:"onestop_id,omitempty"`
OperatedByName *string `protobuf:"bytes,3,opt,name=operated_by_name,json=operatedByName" json:"operated_by_name,omitempty"`
OperatedByOnestopId *string `protobuf:"bytes,4,opt,name=operated_by_onestop_id,json=operatedByOnestopId" json:"operated_by_onestop_id,omitempty"`
OperatedByWebsite *string `protobuf:"bytes,5,opt,name=operated_by_website,json=operatedByWebsite" json:"operated_by_website,omitempty"`
RouteColor *uint32 `protobuf:"varint,6,opt,name=route_color,json=routeColor" json:"route_color,omitempty"`
RouteDesc *string `protobuf:"bytes,7,opt,name=route_desc,json=routeDesc" json:"route_desc,omitempty"`
RouteLongName *string `protobuf:"bytes,8,opt,name=route_long_name,json=routeLongName" json:"route_long_name,omitempty"`
RouteTextColor *uint32 `protobuf:"varint,9,opt,name=route_text_color,json=routeTextColor" json:"route_text_color,omitempty"`
VehicleType *Transit_Fetch_VehicleType `protobuf:"varint,10,opt,name=vehicle_type,json=vehicleType,enum=valhalla.mjolnir.Transit_Fetch_VehicleType" json:"vehicle_type,omitempty"`
}
func (x *Transit_Fetch_Route) Reset() {
*x = Transit_Fetch_Route{}
if protoimpl.UnsafeEnabled {
mi := &file_transit_fetch_proto_msgTypes[3]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *Transit_Fetch_Route) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*Transit_Fetch_Route) ProtoMessage() {}
func (x *Transit_Fetch_Route) ProtoReflect() protoreflect.Message {
mi := &file_transit_fetch_proto_msgTypes[3]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use Transit_Fetch_Route.ProtoReflect.Descriptor instead.
func (*Transit_Fetch_Route) Descriptor() ([]byte, []int) {
return file_transit_fetch_proto_rawDescGZIP(), []int{0, 2}
}
func (x *Transit_Fetch_Route) GetName() string {
if x != nil && x.Name != nil {
return *x.Name
}
return ""
}
func (x *Transit_Fetch_Route) GetOnestopId() string {
if x != nil && x.OnestopId != nil {
return *x.OnestopId
}
return ""
}
func (x *Transit_Fetch_Route) GetOperatedByName() string {
if x != nil && x.OperatedByName != nil {
return *x.OperatedByName
}
return ""
}
func (x *Transit_Fetch_Route) GetOperatedByOnestopId() string {
if x != nil && x.OperatedByOnestopId != nil {
return *x.OperatedByOnestopId
}
return ""
}
func (x *Transit_Fetch_Route) GetOperatedByWebsite() string {
if x != nil && x.OperatedByWebsite != nil {
return *x.OperatedByWebsite
}
return ""
}
func (x *Transit_Fetch_Route) GetRouteColor() uint32 {
if x != nil && x.RouteColor != nil {
return *x.RouteColor
}
return 0
}
func (x *Transit_Fetch_Route) GetRouteDesc() string {
if x != nil && x.RouteDesc != nil {
return *x.RouteDesc
}
return ""
}
func (x *Transit_Fetch_Route) GetRouteLongName() string {
if x != nil && x.RouteLongName != nil {
return *x.RouteLongName
}
return ""
}
func (x *Transit_Fetch_Route) GetRouteTextColor() uint32 {
if x != nil && x.RouteTextColor != nil {
return *x.RouteTextColor
}
return 0
}
func (x *Transit_Fetch_Route) GetVehicleType() Transit_Fetch_VehicleType {
if x != nil && x.VehicleType != nil {
return *x.VehicleType
}
return Transit_Fetch_kTram
}
type Transit_Fetch_Shape struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
ShapeId *uint32 `protobuf:"varint,1,opt,name=shape_id,json=shapeId" json:"shape_id,omitempty"`
EncodedShape []byte `protobuf:"bytes,2,opt,name=encoded_shape,json=encodedShape" json:"encoded_shape,omitempty"`
}
func (x *Transit_Fetch_Shape) Reset() {
*x = Transit_Fetch_Shape{}
if protoimpl.UnsafeEnabled {
mi := &file_transit_fetch_proto_msgTypes[4]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *Transit_Fetch_Shape) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*Transit_Fetch_Shape) ProtoMessage() {}
func (x *Transit_Fetch_Shape) ProtoReflect() protoreflect.Message {
mi := &file_transit_fetch_proto_msgTypes[4]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use Transit_Fetch_Shape.ProtoReflect.Descriptor instead.
func (*Transit_Fetch_Shape) Descriptor() ([]byte, []int) {
return file_transit_fetch_proto_rawDescGZIP(), []int{0, 3}
}
func (x *Transit_Fetch_Shape) GetShapeId() uint32 {
if x != nil && x.ShapeId != nil {
return *x.ShapeId
}
return 0
}
func (x *Transit_Fetch_Shape) GetEncodedShape() []byte {
if x != nil {
return x.EncodedShape
}
return nil
}
var File_transit_fetch_proto protoreflect.FileDescriptor
var file_transit_fetch_proto_rawDesc = []byte{
0x0a, 0x13, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x69, 0x74, 0x5f, 0x66, 0x65, 0x74, 0x63, 0x68, 0x2e,
0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x10, 0x76, 0x61, 0x6c, 0x68, 0x61, 0x6c, 0x6c, 0x61, 0x2e,
0x6d, 0x6a, 0x6f, 0x6c, 0x6e, 0x69, 0x72, 0x22, 0xfe, 0x10, 0x0a, 0x0d, 0x54, 0x72, 0x61, 0x6e,
0x73, 0x69, 0x74, 0x5f, 0x46, 0x65, 0x74, 0x63, 0x68, 0x12, 0x3a, 0x0a, 0x05, 0x73, 0x74, 0x6f,
0x70, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x24, 0x2e, 0x76, 0x61, 0x6c, 0x68, 0x61,
0x6c, 0x6c, 0x61, 0x2e, 0x6d, 0x6a, 0x6f, 0x6c, 0x6e, 0x69, 0x72, 0x2e, 0x54, 0x72, 0x61, 0x6e,
0x73, 0x69, 0x74, 0x5f, 0x46, 0x65, 0x74, 0x63, 0x68, 0x2e, 0x53, 0x74, 0x6f, 0x70, 0x52, 0x05,
0x73, 0x74, 0x6f, 0x70, 0x73, 0x12, 0x47, 0x0a, 0x0a, 0x73, 0x74, 0x6f, 0x70, 0x5f, 0x70, 0x61,
0x69, 0x72, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x28, 0x2e, 0x76, 0x61, 0x6c, 0x68,
0x61, 0x6c, 0x6c, 0x61, 0x2e, 0x6d, 0x6a, 0x6f, 0x6c, 0x6e, 0x69, 0x72, 0x2e, 0x54, 0x72, 0x61,
0x6e, 0x73, 0x69, 0x74, 0x5f, 0x46, 0x65, 0x74, 0x63, 0x68, 0x2e, 0x53, 0x74, 0x6f, 0x70, 0x50,
0x61, 0x69, 0x72, 0x52, 0x09, 0x73, 0x74, 0x6f, 0x70, 0x50, 0x61, 0x69, 0x72, 0x73, 0x12, 0x3d,
0x0a, 0x06, 0x72, 0x6f, 0x75, 0x74, 0x65, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x25,
0x2e, 0x76, 0x61, 0x6c, 0x68, 0x61, 0x6c, 0x6c, 0x61, 0x2e, 0x6d, 0x6a, 0x6f, 0x6c, 0x6e, 0x69,
0x72, 0x2e, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x69, 0x74, 0x5f, 0x46, 0x65, 0x74, 0x63, 0x68, 0x2e,
0x52, 0x6f, 0x75, 0x74, 0x65, 0x52, 0x06, 0x72, 0x6f, 0x75, 0x74, 0x65, 0x73, 0x12, 0x3d, 0x0a,
0x06, 0x73, 0x68, 0x61, 0x70, 0x65, 0x73, 0x18, 0x04, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x25, 0x2e,
0x76, 0x61, 0x6c, 0x68, 0x61, 0x6c, 0x6c, 0x61, 0x2e, 0x6d, 0x6a, 0x6f, 0x6c, 0x6e, 0x69, 0x72,
0x2e, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x69, 0x74, 0x5f, 0x46, 0x65, 0x74, 0x63, 0x68, 0x2e, 0x53,
0x68, 0x61, 0x70, 0x65, 0x52, 0x06, 0x73, 0x68, 0x61, 0x70, 0x65, 0x73, 0x1a, 0xe2, 0x01, 0x0a,
0x04, 0x53, 0x74, 0x6f, 0x70, 0x12, 0x10, 0x0a, 0x03, 0x6c, 0x6f, 0x6e, 0x18, 0x01, 0x20, 0x01,
0x28, 0x02, 0x52, 0x03, 0x6c, 0x6f, 0x6e, 0x12, 0x10, 0x0a, 0x03, 0x6c, 0x61, 0x74, 0x18, 0x02,
0x20, 0x01, 0x28, 0x02, 0x52, 0x03, 0x6c, 0x61, 0x74, 0x12, 0x18, 0x0a, 0x07, 0x67, 0x72, 0x61,
0x70, 0x68, 0x69, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x04, 0x52, 0x07, 0x67, 0x72, 0x61, 0x70,
0x68, 0x69, 0x64, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28,
0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x1d, 0x0a, 0x0a, 0x6f, 0x6e, 0x65, 0x73, 0x74,
0x6f, 0x70, 0x5f, 0x69, 0x64, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x6f, 0x6e, 0x65,
0x73, 0x74, 0x6f, 0x70, 0x49, 0x64, 0x12, 0x1c, 0x0a, 0x0a, 0x6f, 0x73, 0x6d, 0x5f, 0x77, 0x61,
0x79, 0x5f, 0x69, 0x64, 0x18, 0x06, 0x20, 0x01, 0x28, 0x04, 0x52, 0x08, 0x6f, 0x73, 0x6d, 0x57,
0x61, 0x79, 0x49, 0x64, 0x12, 0x1a, 0x0a, 0x08, 0x74, 0x69, 0x6d, 0x65, 0x7a, 0x6f, 0x6e, 0x65,
0x18, 0x08, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x74, 0x69, 0x6d, 0x65, 0x7a, 0x6f, 0x6e, 0x65,
0x12, 0x2f, 0x0a, 0x13, 0x77, 0x68, 0x65, 0x65, 0x6c, 0x63, 0x68, 0x61, 0x69, 0x72, 0x5f, 0x62,
0x6f, 0x61, 0x72, 0x64, 0x69, 0x6e, 0x67, 0x18, 0x09, 0x20, 0x01, 0x28, 0x08, 0x52, 0x12, 0x77,
0x68, 0x65, 0x65, 0x6c, 0x63, 0x68, 0x61, 0x69, 0x72, 0x42, 0x6f, 0x61, 0x72, 0x64, 0x69, 0x6e,
0x67, 0x1a, 0x99, 0x08, 0x0a, 0x08, 0x53, 0x74, 0x6f, 0x70, 0x50, 0x61, 0x69, 0x72, 0x12, 0x23,
0x0a, 0x0d, 0x62, 0x69, 0x6b, 0x65, 0x73, 0x5f, 0x61, 0x6c, 0x6c, 0x6f, 0x77, 0x65, 0x64, 0x18,
0x01, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0c, 0x62, 0x69, 0x6b, 0x65, 0x73, 0x41, 0x6c, 0x6c, 0x6f,
0x77, 0x65, 0x64, 0x12, 0x19, 0x0a, 0x08, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x5f, 0x69, 0x64, 0x18,
0x02, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x07, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x49, 0x64, 0x12, 0x38,
0x0a, 0x18, 0x64, 0x65, 0x73, 0x74, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x61, 0x72,
0x72, 0x69, 0x76, 0x61, 0x6c, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0d,
0x52, 0x16, 0x64, 0x65, 0x73, 0x74, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x41, 0x72, 0x72,
0x69, 0x76, 0x61, 0x6c, 0x54, 0x69, 0x6d, 0x65, 0x12, 0x2f, 0x0a, 0x13, 0x64, 0x65, 0x73, 0x74,
0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x67, 0x72, 0x61, 0x70, 0x68, 0x69, 0x64, 0x18,
0x04, 0x20, 0x01, 0x28, 0x04, 0x52, 0x12, 0x64, 0x65, 0x73, 0x74, 0x69, 0x6e, 0x61, 0x74, 0x69,
0x6f, 0x6e, 0x47, 0x72, 0x61, 0x70, 0x68, 0x69, 0x64, 0x12, 0x34, 0x0a, 0x16, 0x64, 0x65, 0x73,
0x74, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x6f, 0x6e, 0x65, 0x73, 0x74, 0x6f, 0x70,
0x5f, 0x69, 0x64, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x14, 0x64, 0x65, 0x73, 0x74, 0x69,
0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x4f, 0x6e, 0x65, 0x73, 0x74, 0x6f, 0x70, 0x49, 0x64, 0x12,
0x33, 0x0a, 0x16, 0x6f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x65, 0x64, 0x5f, 0x62, 0x79, 0x5f, 0x6f,
0x6e, 0x65, 0x73, 0x74, 0x6f, 0x70, 0x5f, 0x69, 0x64, 0x18, 0x06, 0x20, 0x01, 0x28, 0x09, 0x52,
0x13, 0x6f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x65, 0x64, 0x42, 0x79, 0x4f, 0x6e, 0x65, 0x73, 0x74,
0x6f, 0x70, 0x49, 0x64, 0x12, 0x32, 0x0a, 0x15, 0x6f, 0x72, 0x69, 0x67, 0x69, 0x6e, 0x5f, 0x64,
0x65, 0x70, 0x61, 0x72, 0x74, 0x75, 0x72, 0x65, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x18, 0x07, 0x20,
0x01, 0x28, 0x0d, 0x52, 0x13, 0x6f, 0x72, 0x69, 0x67, 0x69, 0x6e, 0x44, 0x65, 0x70, 0x61, 0x72,
0x74, 0x75, 0x72, 0x65, 0x54, 0x69, 0x6d, 0x65, 0x12, 0x25, 0x0a, 0x0e, 0x6f, 0x72, 0x69, 0x67,
0x69, 0x6e, 0x5f, 0x67, 0x72, 0x61, 0x70, 0x68, 0x69, 0x64, 0x18, 0x08, 0x20, 0x01, 0x28, 0x04,
0x52, 0x0d, 0x6f, 0x72, 0x69, 0x67, 0x69, 0x6e, 0x47, 0x72, 0x61, 0x70, 0x68, 0x69, 0x64, 0x12,
0x2a, 0x0a, 0x11, 0x6f, 0x72, 0x69, 0x67, 0x69, 0x6e, 0x5f, 0x6f, 0x6e, 0x65, 0x73, 0x74, 0x6f,
0x70, 0x5f, 0x69, 0x64, 0x18, 0x09, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0f, 0x6f, 0x72, 0x69, 0x67,
0x69, 0x6e, 0x4f, 0x6e, 0x65, 0x73, 0x74, 0x6f, 0x70, 0x49, 0x64, 0x12, 0x1f, 0x0a, 0x0b, 0x72,
0x6f, 0x75, 0x74, 0x65, 0x5f, 0x69, 0x6e, 0x64, 0x65, 0x78, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x0d,
0x52, 0x0a, 0x72, 0x6f, 0x75, 0x74, 0x65, 0x49, 0x6e, 0x64, 0x65, 0x78, 0x12, 0x2e, 0x0a, 0x13,
0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x5f, 0x61, 0x64, 0x64, 0x65, 0x64, 0x5f, 0x64, 0x61,
0x74, 0x65, 0x73, 0x18, 0x0b, 0x20, 0x03, 0x28, 0x0d, 0x52, 0x11, 0x73, 0x65, 0x72, 0x76, 0x69,
0x63, 0x65, 0x41, 0x64, 0x64, 0x65, 0x64, 0x44, 0x61, 0x74, 0x65, 0x73, 0x12, 0x2f, 0x0a, 0x14,
0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x5f, 0x64, 0x61, 0x79, 0x73, 0x5f, 0x6f, 0x66, 0x5f,
0x77, 0x65, 0x65, 0x6b, 0x18, 0x0c, 0x20, 0x03, 0x28, 0x08, 0x52, 0x11, 0x73, 0x65, 0x72, 0x76,
0x69, 0x63, 0x65, 0x44, 0x61, 0x79, 0x73, 0x4f, 0x66, 0x57, 0x65, 0x65, 0x6b, 0x12, 0x28, 0x0a,
0x10, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x5f, 0x65, 0x6e, 0x64, 0x5f, 0x64, 0x61, 0x74,
0x65, 0x18, 0x0d, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x0e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65,
0x45, 0x6e, 0x64, 0x44, 0x61, 0x74, 0x65, 0x12, 0x30, 0x0a, 0x14, 0x73, 0x65, 0x72, 0x76, 0x69,
0x63, 0x65, 0x5f, 0x65, 0x78, 0x63, 0x65, 0x70, 0x74, 0x5f, 0x64, 0x61, 0x74, 0x65, 0x73, 0x18,
0x0e, 0x20, 0x03, 0x28, 0x0d, 0x52, 0x12, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x45, 0x78,
0x63, 0x65, 0x70, 0x74, 0x44, 0x61, 0x74, 0x65, 0x73, 0x12, 0x2c, 0x0a, 0x12, 0x73, 0x65, 0x72,
0x76, 0x69, 0x63, 0x65, 0x5f, 0x73, 0x74, 0x61, 0x72, 0x74, 0x5f, 0x64, 0x61, 0x74, 0x65, 0x18,
0x0f, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x10, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x53, 0x74,
0x61, 0x72, 0x74, 0x44, 0x61, 0x74, 0x65, 0x12, 0x23, 0x0a, 0x0d, 0x74, 0x72, 0x69, 0x70, 0x5f,
0x68, 0x65, 0x61, 0x64, 0x73, 0x69, 0x67, 0x6e, 0x18, 0x10, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0c,
0x74, 0x72, 0x69, 0x70, 0x48, 0x65, 0x61, 0x64, 0x73, 0x69, 0x67, 0x6e, 0x12, 0x17, 0x0a, 0x07,
0x74, 0x72, 0x69, 0x70, 0x5f, 0x69, 0x64, 0x18, 0x11, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x06, 0x74,
0x72, 0x69, 0x70, 0x49, 0x64, 0x12, 0x33, 0x0a, 0x15, 0x77, 0x68, 0x65, 0x65, 0x6c, 0x63, 0x68,
0x61, 0x69, 0x72, 0x5f, 0x61, 0x63, 0x63, 0x65, 0x73, 0x73, 0x69, 0x62, 0x6c, 0x65, 0x18, 0x12,
0x20, 0x01, 0x28, 0x08, 0x52, 0x14, 0x77, 0x68, 0x65, 0x65, 0x6c, 0x63, 0x68, 0x61, 0x69, 0x72,
0x41, 0x63, 0x63, 0x65, 0x73, 0x73, 0x69, 0x62, 0x6c, 0x65, 0x12, 0x19, 0x0a, 0x08, 0x73, 0x68,
0x61, 0x70, 0x65, 0x5f, 0x69, 0x64, 0x18, 0x14, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x07, 0x73, 0x68,
0x61, 0x70, 0x65, 0x49, 0x64, 0x12, 0x30, 0x0a, 0x14, 0x6f, 0x72, 0x69, 0x67, 0x69, 0x6e, 0x5f,
0x64, 0x69, 0x73, 0x74, 0x5f, 0x74, 0x72, 0x61, 0x76, 0x65, 0x6c, 0x65, 0x64, 0x18, 0x15, 0x20,
0x01, 0x28, 0x02, 0x52, 0x12, 0x6f, 0x72, 0x69, 0x67, 0x69, 0x6e, 0x44, 0x69, 0x73, 0x74, 0x54,
0x72, 0x61, 0x76, 0x65, 0x6c, 0x65, 0x64, 0x12, 0x3a, 0x0a, 0x19, 0x64, 0x65, 0x73, 0x74, 0x69,
0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x64, 0x69, 0x73, 0x74, 0x5f, 0x74, 0x72, 0x61, 0x76,
0x65, 0x6c, 0x65, 0x64, 0x18, 0x16, 0x20, 0x01, 0x28, 0x02, 0x52, 0x17, 0x64, 0x65, 0x73, 0x74,
0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x44, 0x69, 0x73, 0x74, 0x54, 0x72, 0x61, 0x76, 0x65,
0x6c, 0x65, 0x64, 0x12, 0x2c, 0x0a, 0x12, 0x66, 0x72, 0x65, 0x71, 0x75, 0x65, 0x6e, 0x63, 0x79,
0x5f, 0x65, 0x6e, 0x64, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x18, 0x17, 0x20, 0x01, 0x28, 0x0d, 0x52,
0x10, 0x66, 0x72, 0x65, 0x71, 0x75, 0x65, 0x6e, 0x63, 0x79, 0x45, 0x6e, 0x64, 0x54, 0x69, 0x6d,
0x65, 0x12, 0x3a, 0x0a, 0x19, 0x66, 0x72, 0x65, 0x71, 0x75, 0x65, 0x6e, 0x63, 0x79, 0x5f, 0x68,
0x65, 0x61, 0x64, 0x77, 0x61, 0x79, 0x5f, 0x73, 0x65, 0x63, 0x6f, 0x6e, 0x64, 0x73, 0x18, 0x18,
0x20, 0x01, 0x28, 0x0d, 0x52, 0x17, 0x66, 0x72, 0x65, 0x71, 0x75, 0x65, 0x6e, 0x63, 0x79, 0x48,
0x65, 0x61, 0x64, 0x77, 0x61, 0x79, 0x53, 0x65, 0x63, 0x6f, 0x6e, 0x64, 0x73, 0x1a, 0xab, 0x03,
0x0a, 0x05, 0x52, 0x6f, 0x75, 0x74, 0x65, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18,
0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x1d, 0x0a, 0x0a, 0x6f,
0x6e, 0x65, 0x73, 0x74, 0x6f, 0x70, 0x5f, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52,
0x09, 0x6f, 0x6e, 0x65, 0x73, 0x74, 0x6f, 0x70, 0x49, 0x64, 0x12, 0x28, 0x0a, 0x10, 0x6f, 0x70,
0x65, 0x72, 0x61, 0x74, 0x65, 0x64, 0x5f, 0x62, 0x79, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x03,
0x20, 0x01, 0x28, 0x09, 0x52, 0x0e, 0x6f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x65, 0x64, 0x42, 0x79,
0x4e, 0x61, 0x6d, 0x65, 0x12, 0x33, 0x0a, 0x16, 0x6f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x65, 0x64,
0x5f, 0x62, 0x79, 0x5f, 0x6f, 0x6e, 0x65, 0x73, 0x74, 0x6f, 0x70, 0x5f, 0x69, 0x64, 0x18, 0x04,
0x20, 0x01, 0x28, 0x09, 0x52, 0x13, 0x6f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x65, 0x64, 0x42, 0x79,
0x4f, 0x6e, 0x65, 0x73, 0x74, 0x6f, 0x70, 0x49, 0x64, 0x12, 0x2e, 0x0a, 0x13, 0x6f, 0x70, 0x65,
0x72, 0x61, 0x74, 0x65, 0x64, 0x5f, 0x62, 0x79, 0x5f, 0x77, 0x65, 0x62, 0x73, 0x69, 0x74, 0x65,
0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x11, 0x6f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x65, 0x64,
0x42, 0x79, 0x57, 0x65, 0x62, 0x73, 0x69, 0x74, 0x65, 0x12, 0x1f, 0x0a, 0x0b, 0x72, 0x6f, 0x75,
0x74, 0x65, 0x5f, 0x63, 0x6f, 0x6c, 0x6f, 0x72, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x0a,
0x72, 0x6f, 0x75, 0x74, 0x65, 0x43, 0x6f, 0x6c, 0x6f, 0x72, 0x12, 0x1d, 0x0a, 0x0a, 0x72, 0x6f,
0x75, 0x74, 0x65, 0x5f, 0x64, 0x65, 0x73, 0x63, 0x18, 0x07, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09,
0x72, 0x6f, 0x75, 0x74, 0x65, 0x44, 0x65, 0x73, 0x63, 0x12, 0x26, 0x0a, 0x0f, 0x72, 0x6f, 0x75,
0x74, 0x65, 0x5f, 0x6c, 0x6f, 0x6e, 0x67, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x08, 0x20, 0x01,
0x28, 0x09, 0x52, 0x0d, 0x72, 0x6f, 0x75, 0x74, 0x65, 0x4c, 0x6f, 0x6e, 0x67, 0x4e, 0x61, 0x6d,
0x65, 0x12, 0x28, 0x0a, 0x10, 0x72, 0x6f, 0x75, 0x74, 0x65, 0x5f, 0x74, 0x65, 0x78, 0x74, 0x5f,
0x63, 0x6f, 0x6c, 0x6f, 0x72, 0x18, 0x09, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x0e, 0x72, 0x6f, 0x75,
0x74, 0x65, 0x54, 0x65, 0x78, 0x74, 0x43, 0x6f, 0x6c, 0x6f, 0x72, 0x12, 0x4e, 0x0a, 0x0c, 0x76,
0x65, 0x68, 0x69, 0x63, 0x6c, 0x65, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x18, 0x0a, 0x20, 0x01, 0x28,
0x0e, 0x32, 0x2b, 0x2e, 0x76, 0x61, 0x6c, 0x68, 0x61, 0x6c, 0x6c, 0x61, 0x2e, 0x6d, 0x6a, 0x6f,
0x6c, 0x6e, 0x69, 0x72, 0x2e, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x69, 0x74, 0x5f, 0x46, 0x65, 0x74,
0x63, 0x68, 0x2e, 0x56, 0x65, 0x68, 0x69, 0x63, 0x6c, 0x65, 0x54, 0x79, 0x70, 0x65, 0x52, 0x0b,
0x76, 0x65, 0x68, 0x69, 0x63, 0x6c, 0x65, 0x54, 0x79, 0x70, 0x65, 0x1a, 0x47, 0x0a, 0x05, 0x53,
0x68, 0x61, 0x70, 0x65, 0x12, 0x19, 0x0a, 0x08, 0x73, 0x68, 0x61, 0x70, 0x65, 0x5f, 0x69, 0x64,
0x18, 0x01, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x07, 0x73, 0x68, 0x61, 0x70, 0x65, 0x49, 0x64, 0x12,
0x23, 0x0a, 0x0d, 0x65, 0x6e, 0x63, 0x6f, 0x64, 0x65, 0x64, 0x5f, 0x73, 0x68, 0x61, 0x70, 0x65,
0x18, 0x02, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x0c, 0x65, 0x6e, 0x63, 0x6f, 0x64, 0x65, 0x64, 0x53,
0x68, 0x61, 0x70, 0x65, 0x22, 0x72, 0x0a, 0x0b, 0x56, 0x65, 0x68, 0x69, 0x63, 0x6c, 0x65, 0x54,
0x79, 0x70, 0x65, 0x12, 0x09, 0x0a, 0x05, 0x6b, 0x54, 0x72, 0x61, 0x6d, 0x10, 0x00, 0x12, 0x0a,
0x0a, 0x06, 0x6b, 0x4d, 0x65, 0x74, 0x72, 0x6f, 0x10, 0x01, 0x12, 0x09, 0x0a, 0x05, 0x6b, 0x52,
0x61, 0x69, 0x6c, 0x10, 0x02, 0x12, 0x08, 0x0a, 0x04, 0x6b, 0x42, 0x75, 0x73, 0x10, 0x03, 0x12,
0x0a, 0x0a, 0x06, 0x6b, 0x46, 0x65, 0x72, 0x72, 0x79, 0x10, 0x04, 0x12, 0x0d, 0x0a, 0x09, 0x6b,
0x43, 0x61, 0x62, 0x6c, 0x65, 0x43, 0x61, 0x72, 0x10, 0x05, 0x12, 0x0c, 0x0a, 0x08, 0x6b, 0x47,
0x6f, 0x6e, 0x64, 0x6f, 0x6c, 0x61, 0x10, 0x06, 0x12, 0x0e, 0x0a, 0x0a, 0x6b, 0x46, 0x75, 0x6e,
0x69, 0x63, 0x75, 0x6c, 0x61, 0x72, 0x10, 0x07, 0x42, 0x40, 0x48, 0x03, 0x5a, 0x3c, 0x67, 0x69,
0x74, 0x2e, 0x63, 0x6f, 0x6f, 0x70, 0x67, 0x6f, 0x2e, 0x69, 0x6f, 0x2f, 0x63, 0x6f, 0x6f, 0x70,
0x67, 0x6f, 0x2d, 0x70, 0x6c, 0x61, 0x74, 0x66, 0x6f, 0x72, 0x6d, 0x2f, 0x72, 0x6f, 0x75, 0x74,
0x69, 0x6e, 0x67, 0x2d, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74,
0x6f, 0x2f, 0x76, 0x61, 0x6c, 0x68, 0x61, 0x6c, 0x6c, 0x61,
}
var (
file_transit_fetch_proto_rawDescOnce sync.Once
file_transit_fetch_proto_rawDescData = file_transit_fetch_proto_rawDesc
)
func file_transit_fetch_proto_rawDescGZIP() []byte {
file_transit_fetch_proto_rawDescOnce.Do(func() {
file_transit_fetch_proto_rawDescData = protoimpl.X.CompressGZIP(file_transit_fetch_proto_rawDescData)
})
return file_transit_fetch_proto_rawDescData
}
var file_transit_fetch_proto_enumTypes = make([]protoimpl.EnumInfo, 1)
var file_transit_fetch_proto_msgTypes = make([]protoimpl.MessageInfo, 5)
var file_transit_fetch_proto_goTypes = []interface{}{
(Transit_Fetch_VehicleType)(0), // 0: valhalla.mjolnir.Transit_Fetch.VehicleType
(*Transit_Fetch)(nil), // 1: valhalla.mjolnir.Transit_Fetch
(*Transit_Fetch_Stop)(nil), // 2: valhalla.mjolnir.Transit_Fetch.Stop
(*Transit_Fetch_StopPair)(nil), // 3: valhalla.mjolnir.Transit_Fetch.StopPair
(*Transit_Fetch_Route)(nil), // 4: valhalla.mjolnir.Transit_Fetch.Route
(*Transit_Fetch_Shape)(nil), // 5: valhalla.mjolnir.Transit_Fetch.Shape
}
var file_transit_fetch_proto_depIdxs = []int32{
2, // 0: valhalla.mjolnir.Transit_Fetch.stops:type_name -> valhalla.mjolnir.Transit_Fetch.Stop
3, // 1: valhalla.mjolnir.Transit_Fetch.stop_pairs:type_name -> valhalla.mjolnir.Transit_Fetch.StopPair
4, // 2: valhalla.mjolnir.Transit_Fetch.routes:type_name -> valhalla.mjolnir.Transit_Fetch.Route
5, // 3: valhalla.mjolnir.Transit_Fetch.shapes:type_name -> valhalla.mjolnir.Transit_Fetch.Shape
0, // 4: valhalla.mjolnir.Transit_Fetch.Route.vehicle_type:type_name -> valhalla.mjolnir.Transit_Fetch.VehicleType
5, // [5:5] is the sub-list for method output_type
5, // [5:5] is the sub-list for method input_type
5, // [5:5] is the sub-list for extension type_name
5, // [5:5] is the sub-list for extension extendee
0, // [0:5] is the sub-list for field type_name
}
func init() { file_transit_fetch_proto_init() }
func file_transit_fetch_proto_init() {
if File_transit_fetch_proto != nil {
return
}
if !protoimpl.UnsafeEnabled {
file_transit_fetch_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*Transit_Fetch); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_transit_fetch_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*Transit_Fetch_Stop); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_transit_fetch_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*Transit_Fetch_StopPair); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_transit_fetch_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*Transit_Fetch_Route); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_transit_fetch_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*Transit_Fetch_Shape); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
}
type x struct{}
out := protoimpl.TypeBuilder{
File: protoimpl.DescBuilder{
GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
RawDescriptor: file_transit_fetch_proto_rawDesc,
NumEnums: 1,
NumMessages: 5,
NumExtensions: 0,
NumServices: 0,
},
GoTypes: file_transit_fetch_proto_goTypes,
DependencyIndexes: file_transit_fetch_proto_depIdxs,
EnumInfos: file_transit_fetch_proto_enumTypes,
MessageInfos: file_transit_fetch_proto_msgTypes,
}.Build()
File_transit_fetch_proto = out.File
file_transit_fetch_proto_rawDesc = nil
file_transit_fetch_proto_goTypes = nil
file_transit_fetch_proto_depIdxs = nil
}

View File

@ -0,0 +1,78 @@
syntax = "proto2";
option optimize_for = LITE_RUNTIME;
option go_package = "git.coopgo.io/coopgo-platform/routing-service/proto/valhalla";
package valhalla.mjolnir;
message Transit_Fetch {
message Stop {
optional float lon = 1;
optional float lat = 2;
optional uint64 graphid = 3;
optional string name = 4;
optional string onestop_id = 5;
optional uint64 osm_way_id = 6;
optional string timezone = 8;
optional bool wheelchair_boarding = 9;
}
message StopPair {
optional bool bikes_allowed = 1;
optional uint32 block_id = 2;
optional uint32 destination_arrival_time = 3;
optional uint64 destination_graphid = 4;
optional string destination_onestop_id = 5;
optional string operated_by_onestop_id = 6;
optional uint32 origin_departure_time = 7;
optional uint64 origin_graphid = 8;
optional string origin_onestop_id = 9;
optional uint32 route_index = 10;
repeated uint32 service_added_dates = 11;
repeated bool service_days_of_week = 12;
optional uint32 service_end_date = 13;
repeated uint32 service_except_dates = 14;
optional uint32 service_start_date = 15;
optional string trip_headsign = 16;
optional uint32 trip_id = 17;
optional bool wheelchair_accessible = 18;
optional uint32 shape_id = 20;
optional float origin_dist_traveled = 21;
optional float destination_dist_traveled = 22;
optional uint32 frequency_end_time = 23;
optional uint32 frequency_headway_seconds = 24;
}
enum VehicleType {
kTram = 0;
kMetro = 1;
kRail = 2;
kBus = 3;
kFerry = 4;
kCableCar = 5;
kGondola = 6;
kFunicular = 7;
}
message Route {
optional string name = 1;
optional string onestop_id = 2;
optional string operated_by_name = 3;
optional string operated_by_onestop_id = 4;
optional string operated_by_website = 5;
optional uint32 route_color = 6;
optional string route_desc = 7;
optional string route_long_name = 8;
optional uint32 route_text_color = 9;
optional VehicleType vehicle_type = 10;
}
message Shape {
optional uint32 shape_id = 1;
optional bytes encoded_shape = 2;
}
repeated Stop stops = 1;
repeated StopPair stop_pairs = 2;
repeated Route routes = 3;
repeated Shape shapes = 4;
}

2855
proto/valhalla/trip.pb.go Normal file

File diff suppressed because it is too large Load Diff

292
proto/valhalla/trip.proto Normal file
View File

@ -0,0 +1,292 @@
syntax = "proto3";
option optimize_for = LITE_RUNTIME;
option go_package = "git.coopgo.io/coopgo-platform/routing-service/proto/valhalla";
package valhalla;
import public "common.proto";
import public "sign.proto";
import "incidents.proto";
message TripLeg {
enum Traversability {
kNone = 0;
kForward = 1;
kBackward = 2;
kBoth = 3;
}
enum Use {
kRoadUse = 0;
kRampUse = 1; // Link - exits/entrance ramps.
kTurnChannelUse = 2; // Link - turn lane.
kTrackUse = 3; // Agricultural use; forest tracks
kDrivewayUse = 4; // Driveway/private service
kAlleyUse = 5; // Service road - limited route use
kParkingAisleUse = 6; // Access roads in parking areas
kEmergencyAccessUse = 7; // Emergency vehicles only
kDriveThruUse = 8; // Commercial drive-thru (banks/fast-food)
kCuldesacUse = 9; // Cul-de-sac (edge that forms a loop and is only
// connected at one node to another edge.
kLivingStreetUse = 10; // Shared space for cars, bikes, pedestrians
kServiceRoadUse = 11; // Generic service road (not driveway, alley, parking aisle, etc.)
// Bicycle specific uses
kCyclewayUse = 20; // Dedicated bicycle path
kMountainBikeUse = 21; // Mountain bike trail
kSidewalkUse = 24;
// Pedestrian specific uses
kFootwayUse = 25;
kStepsUse = 26; // Stairs
kPathUse = 27;
kPedestrianUse = 28;
kBridlewayUse = 29;
kPedestrianCrossingUse = 32;
kElevatorUse = 33;
kEscalatorUse = 34;
//Rest/Service Areas
kRestAreaUse = 30;
kServiceAreaUse = 31;
// Other...
kOtherUse = 40;
// Ferry and rail ferry
kFerryUse = 41;
kRailFerryUse = 42;
kConstructionUse = 43; // Road under construction
// Transit specific uses. Must be last in the list
kRailUse = 50; // Rail line
kBusUse = 51; // Bus line
kEgressConnectionUse = 52; // Connection between transit station and transit egress
kPlatformConnectionUse = 53; // Connection between transit station and transit platform
kTransitConnectionUse = 54; // Connection between road network and transit egress
}
enum Surface {
kPavedSmooth = 0;
kPaved = 1;
kPavedRough = 2;
kCompacted = 3;
kDirt = 4;
kGravel = 5;
kPath = 6;
kImpassable = 7;
}
enum CycleLane {
kNoCycleLane = 0;
kShared = 1; // Shared use lane (could be shared with pedestrians)
kDedicated = 2; // Dedicated cycle lane
kSeparated = 3; // A separate cycle lane (physical separation from the main carriageway
}
enum SacScale {
kNoSacScale = 0;
kHiking = 1;
kMountainHiking = 2;
kDemandingMountainHiking = 3;
kAlpineHiking = 4;
kDemandingAlpineHiking = 5;
kDifficultAlpineHiking = 6;
}
enum Sidewalk {
kNoSidewalk = 0;
kLeft = 1;
kRight = 2;
kBothSides = 3;
}
message LaneConnectivity {
uint64 from_way_id = 1;
string from_lanes = 2;
string to_lanes = 3;
}
message TrafficSegment {
uint64 segment_id = 1;
float begin_percent = 2;
float end_percent = 3;
bool starts_segment = 4;
bool ends_segment = 5;
}
message Restriction{
uint32 type = 1;
}
message Edge {
repeated StreetName name = 1; // street names
float length_km = 2; // km
float speed = 3; // km/h
RoadClass road_class = 4;
uint32 begin_heading = 5; // 0-359
uint32 end_heading = 6; // 0-359
uint32 begin_shape_index = 7; // inclusive
uint32 end_shape_index = 8; // inclusive
Traversability traversability = 9;
Use use = 10;
bool toll = 11;
bool unpaved = 12;
bool tunnel = 13;
bool bridge = 14;
bool roundabout = 15;
bool internal_intersection = 16;
bool drive_on_left = 17; // [default = false]
Surface surface = 18;
TripSign sign = 19;
TravelMode travel_mode = 20;
VehicleType vehicle_type = 21;
PedestrianType pedestrian_type = 22;
BicycleType bicycle_type = 23;
TransitType transit_type = 24;
TransitRouteInfo transit_route_info = 25;
uint64 id = 26;
uint64 way_id = 27;
float weighted_grade = 28;
int32 max_upward_grade = 29; // set to 32768 if no elevation data
int32 max_downward_grade = 30; // set to 32768 if no elevation data
uint32 lane_count = 31;
CycleLane cycle_lane = 32;
bool bicycle_network = 33; // true if the edge is part of a bike network
Sidewalk sidewalk = 34;
uint32 density = 35;
uint32 speed_limit = 36; // 0 if unavailable, 255 if unlimited
float truck_speed = 37; // km/h, 0 if unavailable
bool truck_route = 38;
repeated LaneConnectivity lane_connectivity = 39;
int32 mean_elevation = 40; // set to 32768 if no elevation data
repeated TrafficSegment traffic_segment = 41;
repeated TurnLane turn_lanes = 42;
bool has_time_restrictions = 43;
float default_speed = 44; // km/h
Restriction restriction = 45;
bool destination_only = 46;
bool is_urban = 47; // uses edge density to decide if edge is in an urban area
repeated TaggedValue tagged_value = 48;
// for the part of the edge that is used in the path we must know where
// it starts and ends along the length of the edge as a percentage
float source_along_edge = 49;
float target_along_edge = 50;
SacScale sac_scale = 51;
bool shoulder = 52;
bool indoor = 53;
}
message IntersectingEdge {
uint32 begin_heading = 1; // 0-359
bool prev_name_consistency = 2;
bool curr_name_consistency = 3;
Traversability driveability = 4;
Traversability cyclability = 5;
Traversability walkability = 6;
Use use = 7;
RoadClass road_class = 8;
uint32 lane_count = 9;
TripSign sign = 10;
}
message Cost {
double seconds = 1;
double cost = 2;
}
message PathCost {
Cost elapsed_cost = 1;
Cost transition_cost = 2;
}
message Node {
enum Type {
kStreetIntersection = 0; // Regular intersection of 2+ roads
kGate = 1; // Gate or rising bollard
kBollard = 2; // Bollard (fixed obstruction)
kTollBooth = 3; // Toll booth / fare collection
// TODO - for now there is no differentiation between bus and rail stops...
kTransitEgress = 4; // Transit egress
kTransitStation = 5; // Transit station
kTransitPlatform = 6; // Transit platform (rail and bus)
kBikeShare = 7; // Bike share location
kParking = 8; // Parking location
kMotorwayJunction = 9; // Highway = motorway_junction
kBorderControl = 10; // Border control
kTollGantry = 11; // Toll gantry
kSumpBuster = 12; // Sump Buster
kBuildingEntrance = 13; // Building Entrance
kElevator = 14; // Elevator
}
Edge edge = 1;
repeated IntersectingEdge intersecting_edge = 2;
uint32 admin_index = 3; // index into the admin list, 0 if unknown
Type type = 4; // The type of node
bool fork = 5; // Fork
TransitPlatformInfo transit_platform_info = 6;
TransitStationInfo transit_station_info = 7;
TransitEgressInfo transit_egress_info = 10;
string time_zone = 11;
PathCost cost = 12; // how much cost did it take at this node in the path
repeated PathCost recosts = 13; // how much cost did it take at this node in the path for recostings
BikeShareStationInfo bss_info = 14;
}
message Admin {
string country_code = 1;
string country_text = 2;
string state_code = 3;
string state_text = 4;
}
message ShapeAttributes {
repeated uint32 time = 1 [packed=true]; // milliseconds
repeated uint32 length = 2 [packed=true]; // decimeters
repeated uint32 speed = 3 [packed=true]; // decimeters per sec
// 4 is reserved
repeated uint32 speed_limit = 5 [packed=true]; // speed limit in kph
}
// we encapsulate the real incident object here so we can add information
// about where it is along the route, ie once its referenced to the route
message Incident {
valhalla.IncidentsTile.Metadata metadata = 1;
// Valhalla additions to incident metadata goes here
uint32 begin_shape_index = 3;
uint32 end_shape_index = 4;
};
message Closure {
oneof has_begin_shape_index {
uint32 begin_shape_index = 1;
}
oneof has_end_shape_index {
uint32 end_shape_index = 2;
}
};
uint64 osm_changeset = 1;
uint64 trip_id = 2;
uint32 leg_id = 3;
uint32 leg_count = 4;
repeated Location location = 5;
repeated Node node = 6;
repeated Admin admin = 7;
string shape = 8;
BoundingBox bbox = 9;
ShapeAttributes shape_attributes = 10;
repeated Incident incidents = 11;
repeated string algorithms = 12;
repeated Closure closures = 13;
}
message TripRoute {
repeated TripLeg legs = 1;
}
message Trip {
repeated TripRoute routes = 1;
}

27
routing.go Normal file
View File

@ -0,0 +1,27 @@
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
}

102
valhalla.go Normal file
View File

@ -0,0 +1,102 @@
package routing
import (
"bytes"
"errors"
"io/ioutil"
"net/http"
"git.coopgo.io/coopgo-platform/routing-service/encoding/polylines"
"git.coopgo.io/coopgo-platform/routing-service/proto/valhalla"
"github.com/paulmach/orb"
"google.golang.org/protobuf/proto"
)
type ValhallaRouting struct {
BaseURL string
}
func NewValhallaRouting(baseURL string) (*ValhallaRouting, error) {
return &ValhallaRouting{
BaseURL: baseURL,
}, nil
}
func (v *ValhallaRouting) Route(locations []orb.Point) (route *Route, err error) {
valhalla_locations := []*valhalla.Location{}
for _, loc := range locations {
valhalla_locations = append(valhalla_locations, &valhalla.Location{
Ll: &valhalla.LatLng{
HasLat: &valhalla.LatLng_Lat{Lat: loc.Lat()},
HasLng: &valhalla.LatLng_Lng{Lng: loc.Lon()},
},
})
}
request := &valhalla.Api{
Options: &valhalla.Options{
Action: valhalla.Options_route,
Locations: valhalla_locations,
CostingType: valhalla.Costing_auto_,
Format: valhalla.Options_pbf,
},
}
resp, err := v.protocolBufferRequest(request, "route")
if err != nil {
return nil, err
}
if len(resp.Directions.Routes) < 1 {
return nil, errors.New("no routes returnes by valhalla")
}
decodedLinestring := orb.LineString{}
for _, leg := range resp.Directions.Routes[0].Legs {
shape := leg.Shape
decodedShape := polylines.Decode(&shape, 6)
decodedLinestring = append(decodedLinestring, decodedShape...)
}
return &Route{
Summary: RouteSummary{
Polyline: polylines.Encode(decodedLinestring),
},
}, nil
}
func (v *ValhallaRouting) protocolBufferRequest(api *valhalla.Api, path string) (*valhalla.Api, error) {
data, err := proto.Marshal(api)
if err != nil {
return nil, err
}
req, err := http.NewRequest(http.MethodGet, v.BaseURL+path, bytes.NewBuffer(data))
if err != nil {
return nil, err
}
req.Header.Set("Content-Type", "application/x-protobuf")
client := http.Client{}
resp, err := client.Do(req)
//resp, err := http.Post(v.BaseURL+path, "application/x-protobuf", bytes.NewBuffer(data))
if err != nil {
return nil, err
}
body, err := ioutil.ReadAll(resp.Body)
if err != nil {
return nil, err
}
response := valhalla.Api{}
err = proto.Unmarshal(body, &response)
if err != nil {
return nil, err
}
return &response, nil
}