From 218f25ab567c0f71703630f49c900d18b6414eea Mon Sep 17 00:00:00 2001 From: Manfred Touron Date: Tue, 13 Dec 2016 10:27:52 +0100 Subject: [PATCH] Add go-kit example proto definitions --- .../go-kit/services/session/session.proto | 26 +++++++++++++ examples/go-kit/services/sprint/sprint.proto | 38 +++++++++++++++++++ 2 files changed, 64 insertions(+) create mode 100644 examples/go-kit/services/session/session.proto create mode 100644 examples/go-kit/services/sprint/sprint.proto diff --git a/examples/go-kit/services/session/session.proto b/examples/go-kit/services/session/session.proto new file mode 100644 index 0000000..7935967 --- /dev/null +++ b/examples/go-kit/services/session/session.proto @@ -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; +} \ No newline at end of file diff --git a/examples/go-kit/services/sprint/sprint.proto b/examples/go-kit/services/sprint/sprint.proto new file mode 100644 index 0000000..001daad --- /dev/null +++ b/examples/go-kit/services/sprint/sprint.proto @@ -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; +} \ No newline at end of file