mirror of
https://github.com/kevin-DL/services.git
synced 2026-01-11 19:04:35 +00:00
update all the makefiles (#111)
* update all the makefiles * add back openapi * update cache package * fix cache * update go mod
This commit is contained in:
@@ -5,14 +5,14 @@ init:
|
||||
go get -u github.com/golang/protobuf/proto
|
||||
go get -u github.com/golang/protobuf/protoc-gen-go
|
||||
go get github.com/micro/micro/v3/cmd/protoc-gen-micro
|
||||
go get github.com/micro/micro/v3/cmd/protoc-gen-openapi
|
||||
.PHONY: proto
|
||||
proto:
|
||||
protoc --openapi_out=. --proto_path=. --micro_out=. --go_out=:. proto/routing.proto
|
||||
protoc --proto_path=. --micro_out=. --go_out=:. proto/routing.proto
|
||||
|
||||
.PHONY: docs
|
||||
docs:
|
||||
protoc --openapi_out=. --proto_path=. --micro_out=. --go_out=:. proto/routing.proto
|
||||
@redoc-cli bundle api-routing.json
|
||||
.PHONY: api
|
||||
api:
|
||||
protoc --openapi_out=. --proto_path=. proto/routing.proto
|
||||
|
||||
.PHONY: build
|
||||
build:
|
||||
|
||||
@@ -25,7 +25,9 @@ type Point struct {
|
||||
sizeCache protoimpl.SizeCache
|
||||
unknownFields protoimpl.UnknownFields
|
||||
|
||||
Latitude float64 `protobuf:"fixed64,1,opt,name=latitude,proto3" json:"latitude,omitempty"`
|
||||
// Lat e.g 52.523219
|
||||
Latitude float64 `protobuf:"fixed64,1,opt,name=latitude,proto3" json:"latitude,omitempty"`
|
||||
// Long e.g 13.428555
|
||||
Longitude float64 `protobuf:"fixed64,2,opt,name=longitude,proto3" json:"longitude,omitempty"`
|
||||
}
|
||||
|
||||
@@ -368,12 +370,15 @@ func (x *Direction) GetIntersections() []*Intersection {
|
||||
return nil
|
||||
}
|
||||
|
||||
// Turn by turn directions from a starting and endpoint including maneuvers and bearings
|
||||
type DirectionsRequest struct {
|
||||
state protoimpl.MessageState
|
||||
sizeCache protoimpl.SizeCache
|
||||
unknownFields protoimpl.UnknownFields
|
||||
|
||||
Origin *Point `protobuf:"bytes,1,opt,name=origin,proto3" json:"origin,omitempty"`
|
||||
// The staring point for the journey
|
||||
Origin *Point `protobuf:"bytes,1,opt,name=origin,proto3" json:"origin,omitempty"`
|
||||
// The destinationg of the journey
|
||||
Destination *Point `protobuf:"bytes,2,opt,name=destination,proto3" json:"destination,omitempty"`
|
||||
}
|
||||
|
||||
@@ -498,12 +503,15 @@ func (x *DirectionsResponse) GetDuration() float64 {
|
||||
return 0
|
||||
}
|
||||
|
||||
// Get the eta for a route from origin to destination. The eta is an estimated time based on car routes
|
||||
type EtaRequest struct {
|
||||
state protoimpl.MessageState
|
||||
sizeCache protoimpl.SizeCache
|
||||
unknownFields protoimpl.UnknownFields
|
||||
|
||||
Origin *Point `protobuf:"bytes,1,opt,name=origin,proto3" json:"origin,omitempty"`
|
||||
// The starting point for the eta calculation
|
||||
Origin *Point `protobuf:"bytes,1,opt,name=origin,proto3" json:"origin,omitempty"`
|
||||
// The end point for the eta calculation
|
||||
Destination *Point `protobuf:"bytes,2,opt,name=destination,proto3" json:"destination,omitempty"`
|
||||
// type of transport e.g car, foot, bicycle
|
||||
Type string `protobuf:"bytes,3,opt,name=type,proto3" json:"type,omitempty"`
|
||||
@@ -619,6 +627,7 @@ func (x *EtaResponse) GetDuration() float64 {
|
||||
return 0
|
||||
}
|
||||
|
||||
// Retrieve a route as a simple list of gps points along with total distance and estimated duration
|
||||
type RouteRequest struct {
|
||||
state protoimpl.MessageState
|
||||
sizeCache protoimpl.SizeCache
|
||||
|
||||
Reference in New Issue
Block a user