-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
b05a46a
commit fd59688
Showing
20 changed files
with
2,548 additions
and
12 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
{ | ||
"protoc": { | ||
"options": [ | ||
"--proto_path=D:/Code/chabo-api" | ||
] | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
syntax = "proto3"; | ||
option go_package = "/internal/generate"; | ||
|
||
package grpc.v1; | ||
|
||
enum BoatManeuver { | ||
leaving = 0; | ||
entering = 1; | ||
} | ||
|
||
message Timestamp { | ||
int64 seconds = 1; | ||
int32 nanos = 2; | ||
} | ||
|
||
message Boat { | ||
string name = 1; | ||
BoatManeuver maneuver = 2; | ||
Timestamp approximativeCrossingDate = 3; | ||
} | ||
|
||
message BoatNameRequest { string name = 1; } | ||
|
||
message Boats { repeated Boat forecasts = 1; } | ||
|
||
service BoatService { | ||
rpc GetBoat(BoatNameRequest) returns (Boat) {} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,49 @@ | ||
syntax = "proto3"; | ||
option go_package = "/internal/generate"; | ||
|
||
package grpc.v1; | ||
|
||
import "grpc/v1/boat.proto"; | ||
import "google/protobuf/timestamp.proto"; | ||
import "google/protobuf/duration.proto"; | ||
import "google/protobuf/empty.proto"; | ||
|
||
enum ClosingType { | ||
twoWay = 0; | ||
oneWay = 1; | ||
} | ||
|
||
enum ClosingReason { | ||
boatCrossing = 0; | ||
maintenance = 1; | ||
} | ||
|
||
message ForecastIDQuery { string ID = 1; } | ||
|
||
message ForecastQuery { | ||
string timezone = 1; | ||
int32 offset = 2; | ||
int32 limit = 3; | ||
string from = 4; | ||
string boat = 5; | ||
string maneuver = 6; | ||
string reason = 7; | ||
} | ||
|
||
message Forecast { | ||
string ID = 1; | ||
ClosingType closingType = 2; | ||
ClosingReason closingReason = 3; | ||
google.protobuf.Duration closingDuration = 4; | ||
google.protobuf.Timestamp circulationClosingDate = 5; | ||
google.protobuf.Timestamp circulationReopeningDate = 6; | ||
repeated grpc.v1.Boats boats = 7; | ||
} | ||
|
||
message Forecasts { repeated Forecast forecasts = 1; } | ||
|
||
service ForecastService { | ||
rpc GetForcast(ForecastIDQuery) returns (Forecast); | ||
rpc GetForcasts(ForecastQuery) returns (Forecasts); | ||
rpc GetAllForcasts(google.protobuf.Empty) returns (Forecasts); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
syntax = "proto3"; | ||
option go_package = "/internal/generate"; | ||
|
||
package grpc.v1; | ||
|
||
message Empty {} | ||
|
||
message HealthCheckResponse { | ||
enum ServingStatus { | ||
UNKNOWN = 0; | ||
SERVING = 1; | ||
NOT_SERVING = 2; | ||
} | ||
ServingStatus status = 1; | ||
string info = 2; | ||
} | ||
|
||
service HealthCheckService { | ||
rpc CheckHealth(Empty) returns (HealthCheckResponse); | ||
rpc WatchHealth(Empty) returns (stream HealthCheckResponse); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
syntax = "proto3"; | ||
option go_package = "/internal/generate"; | ||
|
||
package grpc.v1; | ||
|
||
import "google/protobuf/empty.proto"; | ||
import "google/protobuf/duration.proto"; | ||
import "google/protobuf/timestamp.proto"; | ||
|
||
|
||
message RefreshResponse { | ||
string ID = 1; | ||
int32 itemCount = 2; | ||
google.protobuf.Duration duration = 3; | ||
google.protobuf.Timestamp timestamp = 4; | ||
|
||
} | ||
|
||
service RefreshResponseService { | ||
rpc GetLastRefresh(google.protobuf.Empty) returns (RefreshResponse); | ||
} |
Oops, something went wrong.