Add go-kit example proto definitions

This commit is contained in:
Manfred Touron 2016-12-13 10:27:52 +01:00
parent 09a9873bad
commit 218f25ab56
No known key found for this signature in database
GPG Key ID: 9CCF47DF1FD978A1
2 changed files with 64 additions and 0 deletions

View File

@ -0,0 +1,26 @@
syntax "proto3";
package session;
service SessionService {
rpc Login(LoginRequest) returns (LoginResponse) {}
rpc Logout(LogoutRequest) returns (LogoutResponse) {}
}
message LoginRequest {
string username = 1;
string password = 2;
}
message LoginResponse {
string token = 1;
string err_msg = 2;
}
message LogoutRequest {
string token = 1;
}
message LogoutResponse {
string err_msg = 1;
}

View File

@ -0,0 +1,38 @@
syntax "proto3";
package sprint;
service SprintService {
rpc AddSprint(AddSprintRequest) returns AddSprintResponse {}
rpc CloseSprint(CloseSprintRequest) returns CloseSprintResponse {}
rpc GetSprint(GetSprintRequest) returns GetSprintResponse {}
}
message AddSprintRequest {
string name = 1;
}
message AddSprintResponse {
Sprint sprint = 1;
string err_msg = 2;
}
message CloseSprintRequest {
string id = 1;
}
message CloseSprintResponse {
string err_msg = 1;
}
message GetSprintRequest {
string id = 1;
}
message GetSprintResponse {
Sprint sprint = 1;
string err_msg = 2;
}
message Sprint {
string id = 1;
uint32 created_at = 2;
string name = 3;
}