site is added

This commit is contained in:
병준 박 2022-08-08 10:10:57 +00:00
parent 4e4b1f2eb1
commit 3fe0a644be
3 changed files with 149 additions and 1 deletions

View File

@ -51,13 +51,20 @@ static TARGETS: Lazy<HashMap<&str, Vec<&str>>> = Lazy::new(|| {
vec![ vec![
"./proto/c2se/core/network.proto", "./proto/c2se/core/network.proto",
"./proto/c2se/common/identity.proto", "./proto/c2se/common/identity.proto",
"./proto/c2se/backend/site.proto",
"./proto/c2se/backend/identity.proto", "./proto/c2se/backend/identity.proto",
"./proto/c2se/backend/member.proto", "./proto/c2se/backend/member.proto",
"./proto/c2se/frontend/identity.proto", "./proto/c2se/frontend/identity.proto",
], ],
); );
m.insert("ss", vec!["./proto/ss/member/identity.proto"]); m.insert(
"ss",
vec![
"./proto/ss/domain/site.proto",
"./proto/ss/member/identity.proto",
],
);
m m
}); });

View File

@ -0,0 +1,68 @@
syntax = "proto3";
package bet.beteran.c2se.backend.site;
import "protobuf/rpc/error.proto";
import "protobuf/pagination/pagination.proto";
import "protobuf/pagination/search.proto";
import "protobuf/pagination/sort.proto";
import "models/domain/site.proto";
// subject = bet.beteran.c2se.backend.site.ListSites
message ListSitesRequest {
optional bet.protobuf.pagination.Pagination pagination = 1;
repeated bet.protobuf.pagination.Search searches = 2;
repeated bet.protobuf.pagination.Sort sorts = 3;
}
message ListSitesResponse {
message Result {
repeated bet.beteran.domain.Site sites = 1;
}
optional bet.protobuf.rpc.Error error = 1;
optional Result result = 2;
}
// subject = bet.beteran.c2se.backend.site.CreateSite
message CreateSiteRequest {
string url = 1;
bool show = 2;
bool can_use = 3;
}
message CreateSiteResponse {
message Result {
bet.beteran.domain.Site site = 1;
}
optional bet.protobuf.rpc.Error error = 1;
optional Result result = 2;
}
// subject = bet.beteran.c2se.backend.site.UpdateSite
message UpdateSiteRequest {
string id = 1;
string url = 2;
bool show = 3;
bool can_use = 4;
}
message UpdateSiteResponse {
message Result {
bet.beteran.domain.Site site = 1;
}
optional bet.protobuf.rpc.Error error = 1;
optional Result result = 2;
}
// subject = bet.beteran.c2se.backend.site.DeleteSite
message DeleteSiteRequest {
string id = 1;
}
message DeleteSiteResponse {
message Result {
}
optional bet.protobuf.rpc.Error error = 1;
optional Result result = 2;
}

View File

@ -0,0 +1,73 @@
syntax = "proto3";
package bet.beteran.ss.domain.site;
import "protobuf/rpc/error.proto";
import "protobuf/pagination/pagination.proto";
import "protobuf/pagination/search.proto";
import "protobuf/pagination/sort.proto";
import "models/core/network.proto";
import "models/domain/site.proto";
// subject = bet.beteran.ss.domain.site.ListSites;
message ListSitesRequest {
bet.beteran.core.network.Client client = 1;
optional bet.protobuf.pagination.Pagination pagination = 2;
repeated bet.protobuf.pagination.Search searches = 3;
repeated bet.protobuf.pagination.Sort sorts = 4;
}
message ListSitesResponse {
message Result {
repeated bet.beteran.domain.Site sites = 1;
}
optional bet.protobuf.rpc.Error error = 1;
optional Result result = 2;
}
// subject = bet.beteran.ss.domain.site.CreateSite;
message CreateSiteRequest {
bet.beteran.core.network.Client client = 1;
string url = 2;
bool show = 3;
bool can_use = 4;
}
message CreateSiteResponse {
message Result {
bet.beteran.domain.Site site = 1;
}
optional bet.protobuf.rpc.Error error = 1;
optional Result result = 2;
}
// subject = bet.beteran.ss.domain.site.UpdateSite
message UpdateSiteRequest {
bet.beteran.core.network.Client client = 1;
string id = 2;
string url = 3;
bool show = 4;
bool can_use = 5;
}
message UpdateSiteResponse {
message Result {
bet.beteran.domain.Site site = 1;
}
optional bet.protobuf.rpc.Error error = 1;
optional Result result = 2;
}
// subject = bet.beteran.ss.domain.site.DeleteSite
message DeleteSiteRequest {
bet.beteran.core.network.Client client = 1;
string id = 2;
}
message DeleteSiteResponse {
message Result {
}
optional bet.protobuf.rpc.Error error = 1;
optional Result result = 2;
}