diff --git a/src/c2se/backend/identity.rs b/src/c2se/backend/identity.rs index f8cd7d5..5febeeb 100644 --- a/src/c2se/backend/identity.rs +++ b/src/c2se/backend/identity.rs @@ -2,20 +2,6 @@ use crate::protobuf::rpc; const SUBJECT: &str = "bet.beteran.c2se.backend.identity"; -pub const SUBJECT_CAPTCHA: &str = const_format::concatcp!(SUBJECT, ".Captcha"); -/// subject = bet.beteran.c2se.backend.identity.Captcha -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct CaptchaRequest {} -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct CaptchaResponse { - #[prost(message, optional, tag = "1")] - pub error: ::core::option::Option, - #[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>, -} - pub const SUBJECT_SIGNIN: &str = const_format::concatcp!(SUBJECT, ".Signin"); /// subject = bet.beteran.c2se.backend.identity.Signin #[derive(Clone, PartialEq, ::prost::Message)] diff --git a/src/c2se/backend/mod.rs b/src/c2se/backend/mod.rs index cf7a71d..f764bbb 100644 --- a/src/c2se/backend/mod.rs +++ b/src/c2se/backend/mod.rs @@ -1 +1,2 @@ -pub mod identity; \ No newline at end of file +pub mod identity; +pub mod member; diff --git a/src/c2se/common/identity.rs b/src/c2se/common/identity.rs new file mode 100644 index 0000000..a858973 --- /dev/null +++ b/src/c2se/common/identity.rs @@ -0,0 +1,52 @@ +use crate::protobuf::rpc; + +const SUBJECT: &str = "bet.beteran.c2se.common.identity"; + +pub const SUBJECT_CHECK_USERNAME_FOR_DUPLICATION: &str = + const_format::concatcp!(SUBJECT, ".CheckUsernameForDuplication"); +/// subject = bet.beteran.c2se.common.identity.CheckUsernameForDuplication; +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct CheckUsernameForDuplicationRequest { + #[prost(string, tag = "1")] + pub username: ::prost::alloc::string::String, +} + +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct CheckUsernameForDuplicationResponse { + #[prost(message, optional, tag = "1")] + pub error: ::core::option::Option, + #[prost(bool, optional, tag = "2")] + pub duplicated: ::core::option::Option, +} + +pub const SUBJECT_CHECK_NICKNAME_FOR_DUPLICATION: &str = + const_format::concatcp!(SUBJECT, ".CheckNicknameForDuplication"); +/// subject = bet.beteran.c2se.common.identity.CheckNicknameForDuplication; +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct CheckNicknameForDuplicationRequest { + #[prost(string, tag = "1")] + pub nickname: ::prost::alloc::string::String, +} + +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct CheckNicknameForDuplicationResponse { + #[prost(message, optional, tag = "1")] + pub error: ::core::option::Option, + #[prost(bool, optional, tag = "2")] + pub duplicated: ::core::option::Option, +} + +pub const SUBJECT_CAPTCHA: &str = const_format::concatcp!(SUBJECT, ".Captcha"); +/// subject = bet.beteran.c2se.common.identity.Captcha +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct CaptchaRequest {} + +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct CaptchaResponse { + #[prost(message, optional, tag = "1")] + pub error: ::core::option::Option, + #[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>, +} diff --git a/src/c2se/common/mod.rs b/src/c2se/common/mod.rs new file mode 100644 index 0000000..db53a0c --- /dev/null +++ b/src/c2se/common/mod.rs @@ -0,0 +1 @@ +pub mod identity; diff --git a/src/c2se/frontend/identity.rs b/src/c2se/frontend/identity.rs index f80faed..35372f5 100644 --- a/src/c2se/frontend/identity.rs +++ b/src/c2se/frontend/identity.rs @@ -2,20 +2,6 @@ use crate::protobuf::rpc; const SUBJECT: &str = "bet.beteran.c2se.frontend.identity"; -pub const SUBJECT_CAPTCHA: &str = const_format::concatcp!(SUBJECT, ".Captcha"); -/// subject = bet.beteran.c2se.frontend.identity.Captcha -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct CaptchaRequest {} -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct CaptchaResponse { - #[prost(message, optional, tag = "1")] - pub error: ::core::option::Option, - #[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>, -} - pub const SUBJECT_SIGNIN: &str = const_format::concatcp!(SUBJECT, ".Signin"); /// subject = bet.beteran.c2se.frontend.identity.Signin #[derive(Clone, PartialEq, ::prost::Message)] @@ -29,6 +15,7 @@ pub struct SigninRequest { #[prost(string, tag = "4")] pub password: ::prost::alloc::string::String, } + #[derive(Clone, PartialEq, ::prost::Message)] pub struct SigninResponse { #[prost(message, optional, tag = "1")] diff --git a/src/c2se/mod.rs b/src/c2se/mod.rs index 5290bd1..9ad44dc 100644 --- a/src/c2se/mod.rs +++ b/src/c2se/mod.rs @@ -4,6 +4,7 @@ /// pub mod backend; /// +pub mod common; /// pub mod core; /// diff --git a/src/ss/member/identity.rs b/src/ss/member/identity.rs index e8385a4..1375ca6 100644 --- a/src/ss/member/identity.rs +++ b/src/ss/member/identity.rs @@ -3,6 +3,42 @@ use crate::protobuf::rpc; const SUBJECT: &str = "bet.beteran.ss.member.identity"; +pub const SUBJECT_CHECK_USERNAME_FOR_DUPLICATION: &str = + const_format::concatcp!(SUBJECT, ".CheckUsernameForDuplication"); +/// subject = bet.beteran.ss.member.identity.CheckUsernameForDuplication; +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct CheckUsernameForDuplicationRequest { + #[prost(message, optional, tag = "1")] + pub client: ::core::option::Option, + #[prost(string, tag = "2")] + pub username: ::prost::alloc::string::String, +} +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct CheckUsernameForDuplicationResponse { + #[prost(message, optional, tag = "1")] + pub error: ::core::option::Option, + #[prost(bool, optional, tag = "2")] + pub duplicated: ::core::option::Option, +} + +pub const SUBJECT_CHECK_NICKNAME_FOR_DUPLICATION: &str = + const_format::concatcp!(SUBJECT, ".CheckNicknameForDuplication"); +/// subject = bet.beteran.ss.member.identity.CheckNicknameForDuplication; +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct CheckNicknameForDuplicationRequest { + #[prost(message, optional, tag = "1")] + pub client: ::core::option::Option, + #[prost(string, tag = "2")] + pub nickname: ::prost::alloc::string::String, +} +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct CheckNicknameForDuplicationResponse { + #[prost(message, optional, tag = "1")] + pub error: ::core::option::Option, + #[prost(bool, optional, tag = "2")] + pub duplicated: ::core::option::Option, +} + pub const SUBJECT_CAPTCHA: &str = const_format::concatcp!(SUBJECT, ".Captcha"); /// subject = bet.beteran.ss.member.identity.Captcha #[derive(Clone, PartialEq, ::prost::Message)]