diff --git a/proto/c2se/backend/identity.proto b/proto/c2se/backend/identity.proto index 164e87a..7e51efd 100644 --- a/proto/c2se/backend/identity.proto +++ b/proto/c2se/backend/identity.proto @@ -2,6 +2,8 @@ syntax = "proto3"; package bet.beteran.c2se.backend.identity; +import "protobuf/rpc/error.proto"; + // subject = bet.beteran.c2se.backend.identity.Signin message SigninRequest { string token = 1; @@ -11,6 +13,10 @@ message SigninRequest { } message SigninResponse { - string session_id = 1; + message Result { + string session_id = 1; + } + optional bet.protobuf.rpc.Error error = 1; + optional Result result = 2; } diff --git a/proto/c2se/backend/member.proto b/proto/c2se/backend/member.proto index 6b738e7..7a94e1b 100644 --- a/proto/c2se/backend/member.proto +++ b/proto/c2se/backend/member.proto @@ -2,6 +2,7 @@ syntax = "proto3"; package bet.beteran.c2se.backend.member; +import "protobuf/rpc/error.proto"; import "protobuf/pagination/pagination.proto"; import "protobuf/pagination/search.proto"; import "protobuf/pagination/sort.proto"; @@ -17,7 +18,11 @@ message ListMembersRequest { } message ListMembersResponse { - repeated bet.beteran.member.Member members = 1; + message Result { + repeated bet.beteran.member.Member members = 1; + } + optional bet.protobuf.rpc.Error error = 1; + optional Result result = 2; } // subject = bet.beteran.c2se.backend.member.GetMember @@ -26,7 +31,11 @@ message GetMemberRequest { } message GetMemberResponse { - bet.beteran.member.Member member = 1; + message Result { + bet.beteran.member.Member member = 1; + } + optional bet.protobuf.rpc.Error error = 1; + optional Result result = 2; } // subject = bet.beteran.c2se.backend.member.GetMemberByUsername @@ -35,5 +44,9 @@ message GetMemberByUsernameRequest { } message GetMemberByUsernameResponse { - bet.beteran.member.Member member = 1; + message Result { + bet.beteran.member.Member member = 1; + } + optional bet.protobuf.rpc.Error error = 1; + optional Result result = 2; } diff --git a/proto/c2se/common/identity.proto b/proto/c2se/common/identity.proto index 6f4684a..0456b3e 100644 --- a/proto/c2se/common/identity.proto +++ b/proto/c2se/common/identity.proto @@ -2,13 +2,19 @@ syntax = "proto3"; package bet.beteran.c2se.common.identity; +import "protobuf/rpc/error.proto"; + // subject = bet.beteran.c2se.common.identity.CheckUsernameForDuplication; message CheckUsernameForDuplicationRequest { string username = 1; } message CheckUsernameForDuplicationResponse { - bool duplicated = 1; + message Result { + bool duplicated = 1; + } + optional bet.protobuf.rpc.Error error = 1; + optional Result result = 2; } // subject = bet.beteran.c2se.common.identity.CheckNicknameForDuplication; @@ -17,7 +23,11 @@ message CheckNicknameForDuplicationRequest { } message CheckNicknameForDuplicationResponse { - bool duplicated = 1; + message Result { + bool duplicated = 1; + } + optional bet.protobuf.rpc.Error error = 1; + optional Result result = 2; } @@ -26,6 +36,10 @@ message CaptchaRequest { } message CaptchaResponse { - string token = 1; - string image = 2; + message Result { + string token = 1; + string image = 2; + } + optional bet.protobuf.rpc.Error error = 1; + optional Result result = 2; } diff --git a/proto/c2se/core/network.proto b/proto/c2se/core/network.proto index c6146c2..d84db8e 100644 --- a/proto/c2se/core/network.proto +++ b/proto/c2se/core/network.proto @@ -1 +1,5 @@ +syntax = "proto3"; + +package bet.beteran.c2se.core.network; + // header = bet.beteran.c2se.core.network.Client diff --git a/proto/c2se/frontend/identity.proto b/proto/c2se/frontend/identity.proto index 2b1127a..27da9fe 100644 --- a/proto/c2se/frontend/identity.proto +++ b/proto/c2se/frontend/identity.proto @@ -2,6 +2,8 @@ syntax = "proto3"; package bet.beteran.c2se.frontend.identity; +import "protobuf/rpc/error.proto"; + // subject = bet.beteran.c2se.frontend.identity.Signin message SigninRequest { string token = 1; @@ -11,5 +13,9 @@ message SigninRequest { } message SigninResponse { - string session_id = 1; + message Result { + string session_id = 1; + } + optional bet.protobuf.rpc.Error error = 1; + optional Result result = 2; } diff --git a/proto/ss/member/identity.proto b/proto/ss/member/identity.proto index 49177d4..b86be42 100644 --- a/proto/ss/member/identity.proto +++ b/proto/ss/member/identity.proto @@ -2,6 +2,7 @@ syntax = "proto3"; package bet.beteran.ss.member.identity; +import "protobuf/rpc/error.proto"; import "models/core/network.proto"; @@ -12,7 +13,11 @@ message CheckUsernameForDuplicationRequest { } message CheckUsernameForDuplicationResponse { - bool duplicated = 1; + message Result { + bool duplicated = 1; + } + optional bet.protobuf.rpc.Error error = 1; + optional Result result = 2; } // subject = bet.beteran.ss.member.identity.CheckNicknameForDuplication; @@ -22,7 +27,11 @@ message CheckNicknameForDuplicationRequest { } message CheckNicknameForDuplicationResponse { - bool duplicated = 1; + message Result { + bool duplicated = 1; + } + optional bet.protobuf.rpc.Error error = 1; + optional Result result = 2; } // subject = bet.beteran.ss.member.identity.Captcha @@ -31,8 +40,12 @@ message CaptchaRequest { } message CaptchaResponse { - string token = 1; - string image = 2; + message Result { + string token = 1; + string image = 2; + } + optional bet.protobuf.rpc.Error error = 1; + optional Result result = 2; } @@ -46,5 +59,9 @@ message SigninRequest { } message SigninResponse { - string session_id = 1; + message Result { + string session_id = 1; + } + optional bet.protobuf.rpc.Error error = 1; + optional Result result = 2; }