responses are modified

This commit is contained in:
병준 박 2022-08-03 06:47:15 +00:00
parent e5f4b3c8c2
commit 174ba470ed
6 changed files with 42 additions and 69 deletions

View File

@ -28,8 +28,6 @@ pub struct SigninRequest {
} }
#[derive(Clone, PartialEq, ::prost::Message)] #[derive(Clone, PartialEq, ::prost::Message)]
pub struct SigninResponse { pub struct SigninResponse {
#[prost(message, optional, tag = "1")] #[prost(string, tag = "1")]
pub error: ::core::option::Option<rpc::Error>, pub session_id: ::prost::alloc::string::String,
#[prost(string, optional, tag = "2")]
pub session_id: ::core::option::Option<::prost::alloc::string::String>,
} }

View File

@ -1,42 +1,35 @@
use crate::protobuf::rpc;
use crate::protobuf::pagination;
use crate::models::member; use crate::models::member;
use crate::protobuf::pagination;
const SUBJECT: &str = "bet.beteran.c2se.backend.member"; const SUBJECT: &str = "bet.beteran.c2se.backend.member";
pub const SUBJECT_LIST_MEMBERS: &str = pub const SUBJECT_LIST_MEMBERS: &str = const_format::concatcp!(SUBJECT, ".ListMembers");
const_format::concatcp!(SUBJECT, ".ListMembers");
/// subject = bet.beteran.c2se.backend.member.ListMembers /// subject = bet.beteran.c2se.backend.member.ListMembers
#[derive(Clone, PartialEq, ::prost::Message)] #[derive(Clone, PartialEq, ::prost::Message)]
pub struct ListMembersRequest { pub struct ListMembersRequest {
#[prost(message, optional, tag="1")] #[prost(message, optional, tag = "1")]
pub pagination: ::core::option::Option<pagination::Pagination>, pub pagination: ::core::option::Option<pagination::Pagination>,
#[prost(message, repeated, tag="2")] #[prost(message, repeated, tag = "2")]
pub searches: ::prost::alloc::vec::Vec<pagination::Search>, pub searches: ::prost::alloc::vec::Vec<pagination::Search>,
#[prost(message, repeated, tag="3")] #[prost(message, repeated, tag = "3")]
pub sorts: ::prost::alloc::vec::Vec<pagination::Sort>, pub sorts: ::prost::alloc::vec::Vec<pagination::Sort>,
} }
#[derive(Clone, PartialEq, ::prost::Message)] #[derive(Clone, PartialEq, ::prost::Message)]
pub struct ListMembersResponse { pub struct ListMembersResponse {
#[prost(message, optional, tag="1")] #[prost(message, repeated, tag = "1")]
pub error: ::core::option::Option<rpc::Error>,
#[prost(message, repeated, tag="2")]
pub members: ::prost::alloc::vec::Vec<member::Member>, pub members: ::prost::alloc::vec::Vec<member::Member>,
} }
pub const SUBJECT_GET_MEMBER: &str = pub const SUBJECT_GET_MEMBER: &str = const_format::concatcp!(SUBJECT, ".GetMember");
const_format::concatcp!(SUBJECT, ".GetMember");
/// subject = bet.beteran.c2se.backend.member.GetMember /// subject = bet.beteran.c2se.backend.member.GetMember
#[derive(Clone, PartialEq, ::prost::Message)] #[derive(Clone, PartialEq, ::prost::Message)]
pub struct GetMemberRequest { pub struct GetMemberRequest {
#[prost(string, tag="1")] #[prost(string, tag = "1")]
pub id: ::prost::alloc::string::String, pub id: ::prost::alloc::string::String,
} }
#[derive(Clone, PartialEq, ::prost::Message)] #[derive(Clone, PartialEq, ::prost::Message)]
pub struct GetMemberResponse { pub struct GetMemberResponse {
#[prost(message, optional, tag="1")] #[prost(message, optional, tag = "1")]
pub error: ::core::option::Option<rpc::Error>,
#[prost(message, optional, tag="2")]
pub member: ::core::option::Option<member::Member>, pub member: ::core::option::Option<member::Member>,
} }
@ -45,13 +38,11 @@ pub const SUBJECT_GET_MEMBER_BY_USERNAME: &str =
/// subject = bet.beteran.c2se.backend.member.GetMemberByUsername /// subject = bet.beteran.c2se.backend.member.GetMemberByUsername
#[derive(Clone, PartialEq, ::prost::Message)] #[derive(Clone, PartialEq, ::prost::Message)]
pub struct GetMemberByUsernameRequest { pub struct GetMemberByUsernameRequest {
#[prost(string, tag="1")] #[prost(string, tag = "1")]
pub username: ::prost::alloc::string::String, pub username: ::prost::alloc::string::String,
} }
#[derive(Clone, PartialEq, ::prost::Message)] #[derive(Clone, PartialEq, ::prost::Message)]
pub struct GetMemberByUsernameResponse { pub struct GetMemberByUsernameResponse {
#[prost(message, optional, tag="1")] #[prost(message, optional, tag = "1")]
pub error: ::core::option::Option<rpc::Error>,
#[prost(message, optional, tag="2")]
pub member: ::core::option::Option<member::Member>, pub member: ::core::option::Option<member::Member>,
} }

View File

@ -10,10 +10,8 @@ pub struct CheckUsernameForDuplicationRequest {
#[derive(Clone, PartialEq, ::prost::Message)] #[derive(Clone, PartialEq, ::prost::Message)]
pub struct CheckUsernameForDuplicationResponse { pub struct CheckUsernameForDuplicationResponse {
#[prost(message, optional, tag = "1")] #[prost(bool, tag = "1")]
pub error: ::core::option::Option<rpc::Error>, pub duplicated: bool,
#[prost(bool, optional, tag = "2")]
pub duplicated: ::core::option::Option<bool>,
} }
#[derive(Clone, PartialEq, ::prost::Message)] #[derive(Clone, PartialEq, ::prost::Message)]
@ -24,10 +22,8 @@ pub struct CheckNicknameForDuplicationRequest {
#[derive(Clone, PartialEq, ::prost::Message)] #[derive(Clone, PartialEq, ::prost::Message)]
pub struct CheckNicknameForDuplicationResponse { pub struct CheckNicknameForDuplicationResponse {
#[prost(message, optional, tag = "1")] #[prost(bool, tag = "1")]
pub error: ::core::option::Option<rpc::Error>, pub duplicated: bool,
#[prost(bool, optional, tag = "2")]
pub duplicated: ::core::option::Option<bool>,
} }
#[derive(Clone, PartialEq, ::prost::Message)] #[derive(Clone, PartialEq, ::prost::Message)]
@ -35,10 +31,8 @@ pub struct CaptchaRequest {}
#[derive(Clone, PartialEq, ::prost::Message)] #[derive(Clone, PartialEq, ::prost::Message)]
pub struct CaptchaResponse { pub struct CaptchaResponse {
#[prost(message, optional, tag = "1")] #[prost(string, tag = "1")]
pub error: ::core::option::Option<rpc::Error>, pub token: ::prost::alloc::string::String,
#[prost(string, optional, tag = "2")] #[prost(string, tag = "2")]
pub token: ::core::option::Option<::prost::alloc::string::String>, pub image: ::prost::alloc::string::String,
#[prost(string, optional, tag = "3")]
pub image: ::core::option::Option<::prost::alloc::string::String>,
} }

View File

@ -29,8 +29,6 @@ pub struct SigninRequest {
#[derive(Clone, PartialEq, ::prost::Message)] #[derive(Clone, PartialEq, ::prost::Message)]
pub struct SigninResponse { pub struct SigninResponse {
#[prost(message, optional, tag = "1")] #[prost(string, tag = "1")]
pub error: ::core::option::Option<rpc::Error>, pub session_id: ::prost::alloc::string::String,
#[prost(string, optional, tag = "2")]
pub session_id: ::core::option::Option<::prost::alloc::string::String>,
} }

View File

@ -15,6 +15,6 @@ impl fmt::Display for Error {
f, f,
"Error code: {}, message: {:?}, data: {:?}", "Error code: {}, message: {:?}, data: {:?}",
self.code, self.message, self.data self.code, self.message, self.data
) // user-facing output )
} }
} }

View File

@ -15,10 +15,8 @@ pub struct CheckUsernameForDuplicationRequest {
} }
#[derive(Clone, PartialEq, ::prost::Message)] #[derive(Clone, PartialEq, ::prost::Message)]
pub struct CheckUsernameForDuplicationResponse { pub struct CheckUsernameForDuplicationResponse {
#[prost(message, optional, tag = "1")] #[prost(bool, tag = "1")]
pub error: ::core::option::Option<rpc::Error>, pub duplicated: bool,
#[prost(bool, optional, tag = "2")]
pub duplicated: ::core::option::Option<bool>,
} }
pub const SUBJECT_CHECK_NICKNAME_FOR_DUPLICATION: &str = pub const SUBJECT_CHECK_NICKNAME_FOR_DUPLICATION: &str =
@ -33,10 +31,8 @@ pub struct CheckNicknameForDuplicationRequest {
} }
#[derive(Clone, PartialEq, ::prost::Message)] #[derive(Clone, PartialEq, ::prost::Message)]
pub struct CheckNicknameForDuplicationResponse { pub struct CheckNicknameForDuplicationResponse {
#[prost(message, optional, tag = "1")] #[prost(bool, tag = "1")]
pub error: ::core::option::Option<rpc::Error>, pub duplicated: bool,
#[prost(bool, optional, tag = "2")]
pub duplicated: ::core::option::Option<bool>,
} }
pub const SUBJECT_CAPTCHA: &str = const_format::concatcp!(SUBJECT, ".Captcha"); pub const SUBJECT_CAPTCHA: &str = const_format::concatcp!(SUBJECT, ".Captcha");
@ -48,12 +44,10 @@ pub struct CaptchaRequest {
} }
#[derive(Clone, PartialEq, ::prost::Message)] #[derive(Clone, PartialEq, ::prost::Message)]
pub struct CaptchaResponse { pub struct CaptchaResponse {
#[prost(message, optional, tag = "1")] #[prost(string, tag = "1")]
pub error: ::core::option::Option<rpc::Error>, pub token: ::prost::alloc::string::String,
#[prost(string, optional, tag = "2")] #[prost(string, tag = "2")]
pub token: ::core::option::Option<::prost::alloc::string::String>, pub image: ::prost::alloc::string::String,
#[prost(string, optional, tag = "3")]
pub image: ::core::option::Option<::prost::alloc::string::String>,
} }
pub const SUBJECT_SIGNIN: &str = const_format::concatcp!(SUBJECT, ".Signin"); pub const SUBJECT_SIGNIN: &str = const_format::concatcp!(SUBJECT, ".Signin");
@ -73,8 +67,6 @@ pub struct SigninRequest {
} }
#[derive(Clone, PartialEq, ::prost::Message)] #[derive(Clone, PartialEq, ::prost::Message)]
pub struct SigninResponse { pub struct SigninResponse {
#[prost(message, optional, tag = "1")] #[prost(string, tag = "1")]
pub error: ::core::option::Option<rpc::Error>, pub session_id: ::prost::alloc::string::String,
#[prost(string, optional, tag = "2")]
pub session_id: ::core::option::Option<::prost::alloc::string::String>,
} }