From 3e2df9d4a75320ad1a90e6a0b7978796408f34b7 Mon Sep 17 00:00:00 2001 From: PARK BYUNG JUN Date: Mon, 8 Aug 2022 08:24:08 +0000 Subject: [PATCH] site is added --- src/c2se/backend/mod.rs | 1 + src/c2se/backend/site.rs | 114 +++++++++++++++++++++++++++++++++++++++ 2 files changed, 115 insertions(+) create mode 100644 src/c2se/backend/site.rs diff --git a/src/c2se/backend/mod.rs b/src/c2se/backend/mod.rs index f764bbb..d1df18e 100644 --- a/src/c2se/backend/mod.rs +++ b/src/c2se/backend/mod.rs @@ -1,2 +1,3 @@ pub mod identity; pub mod member; +pub mod site; diff --git a/src/c2se/backend/site.rs b/src/c2se/backend/site.rs new file mode 100644 index 0000000..564cfa6 --- /dev/null +++ b/src/c2se/backend/site.rs @@ -0,0 +1,114 @@ +use crate::protobuf::pagination; +use crate::protobuf::rpc; + +const SUBJECT: &str = "bet.beteran.c2se.backend.site"; + +pub const SUBJECT_LIST_SITES: &str = const_format::concatcp!(SUBJECT, ".ListSites"); +/// subject = bet.beteran.c2se.backend.site.ListSites +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct ListSitesRequest { + #[prost(message, optional, tag = "1")] + pub pagination: ::core::option::Option, + #[prost(message, repeated, tag = "2")] + pub searches: ::prost::alloc::vec::Vec, + #[prost(message, repeated, tag = "3")] + pub sorts: ::prost::alloc::vec::Vec, +} +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct ListSitesResponse { + #[prost(message, optional, tag = "1")] + pub error: ::core::option::Option, + #[prost(message, optional, tag = "2")] + pub result: ::core::option::Option, +} + +/// Nested message and enum types in `ListSitesResponse`. +pub mod list_sites_response { + use crate::models::domain; + + #[derive(Clone, PartialEq, ::prost::Message)] + pub struct Result { + #[prost(message, repeated, tag = "1")] + pub sites: ::prost::alloc::vec::Vec, + } +} + +pub const SUBJECT_CREATE_SITE: &str = const_format::concatcp!(SUBJECT, ".CreateSite"); +/// subject = bet.beteran.c2se.backend.site.CreateSite +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct CreateSiteRequest { + #[prost(string, tag = "1")] + pub url: ::prost::alloc::string::String, + #[prost(bool, tag = "2")] + pub show: bool, + #[prost(bool, tag = "3")] + pub can_use: bool, +} +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct CreateSiteResponse { + #[prost(message, optional, tag = "1")] + pub error: ::core::option::Option, + #[prost(message, optional, tag = "2")] + pub result: ::core::option::Option, +} +/// Nested message and enum types in `CreateSiteResponse`. +pub mod create_site_response { + use crate::models::domain; + + #[derive(Clone, PartialEq, ::prost::Message)] + pub struct Result { + #[prost(message, optional, tag = "1")] + pub site: ::core::option::Option, + } +} + +pub const SUBJECT_UPDATE_SITE: &str = const_format::concatcp!(SUBJECT, ".UpdateSite"); +/// subject = bet.beteran.c2se.backend.site.UpdateSite +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct UpdateSiteRequest { + #[prost(string, tag = "1")] + pub id: ::prost::alloc::string::String, + #[prost(string, tag = "2")] + pub url: ::prost::alloc::string::String, + #[prost(bool, tag = "3")] + pub show: bool, + #[prost(bool, tag = "4")] + pub can_use: bool, +} +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct UpdateSiteResponse { + #[prost(message, optional, tag = "1")] + pub error: ::core::option::Option, + #[prost(message, optional, tag = "2")] + pub result: ::core::option::Option, +} +/// Nested message and enum types in `UpdateSiteResponse`. +pub mod update_site_response { + use crate::models::domain; + + #[derive(Clone, PartialEq, ::prost::Message)] + pub struct Result { + #[prost(message, optional, tag = "1")] + pub site: ::core::option::Option, + } +} + +pub const SUBJECT_DELETE_SITE: &str = const_format::concatcp!(SUBJECT, ".DeleteSite"); +/// subject = bet.beteran.c2se.backend.site.DeleteSite +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct DeleteSiteRequest { + #[prost(string, tag = "1")] + pub id: ::prost::alloc::string::String, +} +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct DeleteSiteResponse { + #[prost(message, optional, tag = "1")] + pub error: ::core::option::Option, + #[prost(message, optional, tag = "2")] + pub result: ::core::option::Option, +} +/// Nested message and enum types in `DeleteSiteResponse`. +pub mod delete_site_response { + #[derive(Clone, PartialEq, ::prost::Message)] + pub struct Result {} +}