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)]
pub struct SigninResponse {
#[prost(message, optional, tag = "1")]
pub error: ::core::option::Option<rpc::Error>,
#[prost(string, optional, tag = "2")]
pub session_id: ::core::option::Option<::prost::alloc::string::String>,
#[prost(string, tag = "1")]
pub session_id: ::prost::alloc::string::String,
}

View File

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

View File

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

View File

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

View File

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

View File

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