refactor: add unified all service gateway
This commit is contained in:
@@ -6,22 +6,22 @@ import "module/base/cms/proto/const.proto";
|
||||
// CMS - 分类
|
||||
service Category {
|
||||
// 分类列表
|
||||
rpc Fetch (blocks.IdentRequest) returns (CategoryListReply) {};
|
||||
rpc Fetch (base_cms_blocks.IdentRequest) returns (CategoryListReply) {};
|
||||
|
||||
// 添加分类
|
||||
rpc Create (blocks.CmsCategoryItem) returns (blocks.StatusReply) {};
|
||||
rpc Create (base_cms_blocks.CmsCategoryItem) returns (base_cms_blocks.StatusReply) {};
|
||||
|
||||
// 修改分类
|
||||
rpc Modify (ModifyCategoryRequest) returns (blocks.StatusReply) {};
|
||||
rpc Modify (ModifyCategoryRequest) returns (base_cms_blocks.StatusReply) {};
|
||||
|
||||
// 删除分类
|
||||
rpc Delete (DeleteCategoryRequest) returns (blocks.StatusReply) {};
|
||||
rpc Delete (DeleteCategoryRequest) returns (base_cms_blocks.StatusReply) {};
|
||||
}
|
||||
|
||||
// 分类列表
|
||||
message CategoryListReply {
|
||||
// 数据
|
||||
repeated blocks.CmsCategoryItem data = 1;
|
||||
repeated base_cms_blocks.CmsCategoryItem data = 1;
|
||||
// 总数
|
||||
int64 count = 2;
|
||||
}
|
||||
@@ -41,7 +41,7 @@ message AddCategoryRequest{
|
||||
string intro = 6; // 简介
|
||||
string created_at = 7 [json_name = "created_at"]; // 创建时间
|
||||
string updated_at = 8 [json_name = "updated_at"]; // 更新时间
|
||||
repeated blocks.CmsCategoryItem data = 9; // 子集
|
||||
repeated base_cms_blocks.CmsCategoryItem data = 9; // 子集
|
||||
}
|
||||
|
||||
// 修改分类请求
|
||||
@@ -54,7 +54,7 @@ message ModifyCategoryRequest{
|
||||
string intro = 6; // 简介
|
||||
string created_at = 7 [json_name = "created_at"]; // 创建时间
|
||||
string updated_at = 8 [json_name = "updated_at"]; // 更新时间
|
||||
repeated blocks.CmsCategoryItem data = 9; // 子集
|
||||
repeated base_cms_blocks.CmsCategoryItem data = 9; // 子集
|
||||
string category_key = 10[json_name = "category_key"]; // 分类标识
|
||||
|
||||
}
|
||||
@@ -68,4 +68,4 @@ message DeleteCategoryRequest{
|
||||
message KeywordRequest{
|
||||
string keyword = 1; // 关键字
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
syntax = "proto3";
|
||||
|
||||
package blocks;
|
||||
package base_cms_blocks;
|
||||
|
||||
option go_package = "bsm/full/module/base/cms/pb;cms";
|
||||
|
||||
|
||||
@@ -15,13 +15,13 @@ service Pages{
|
||||
rpc GetByKey (GetPagesByKeyRequest) returns (PagesItem) {};
|
||||
|
||||
//发布单页
|
||||
rpc Create(PagesItem) returns (blocks.StatusReply) {};
|
||||
rpc Create(PagesItem) returns (base_cms_blocks.StatusReply) {};
|
||||
|
||||
//修改单页
|
||||
rpc Modify(PagesItem) returns (blocks.StatusReply) {};
|
||||
rpc Modify(PagesItem) returns (base_cms_blocks.StatusReply) {};
|
||||
|
||||
//删除单页
|
||||
rpc Delete(blocks.IdentRequest) returns (blocks.StatusReply) {};
|
||||
rpc Delete(base_cms_blocks.IdentRequest) returns (base_cms_blocks.StatusReply) {};
|
||||
}
|
||||
|
||||
// 根据KEY获取内容请求
|
||||
@@ -45,8 +45,8 @@ message PagesItem{
|
||||
bool has_accessory = 12 [json_name = "has_accessory"]; //是否有附件,默认没有
|
||||
|
||||
repeated string accessory_identity_array = 13 [json_name = "accessory_identity_array"]; //附件Identity 列表
|
||||
repeated blocks.CmsAccessoryItem accessory_data = 14 [json_name = "accessory_data"]; //附件数据
|
||||
repeated blocks.CmsTagsItem tags_data = 15 [json_name = "tags_data"]; // 标签数据
|
||||
repeated base_cms_blocks.CmsAccessoryItem accessory_data = 14 [json_name = "accessory_data"]; //附件数据
|
||||
repeated base_cms_blocks.CmsTagsItem tags_data = 15 [json_name = "tags_data"]; // 标签数据
|
||||
repeated string tags_identity_array = 16 [json_name = "tags_identity_array"]; // 标签集Identity 列表
|
||||
int64 hits = 17; //点击量
|
||||
}
|
||||
|
||||
@@ -15,52 +15,52 @@ service Post{
|
||||
rpc GetByKey (GetPostByKeyRequest) returns (PostItem) {};
|
||||
|
||||
//搜索文章
|
||||
rpc Search (blocks.CmsSearchRequest) returns (PostListReply) {};
|
||||
rpc Search (base_cms_blocks.CmsSearchRequest) returns (PostListReply) {};
|
||||
|
||||
//发布文章
|
||||
rpc Create(PostItem) returns (blocks.StatusReply) {};
|
||||
rpc Create(PostItem) returns (base_cms_blocks.StatusReply) {};
|
||||
|
||||
//修改文章
|
||||
rpc Modify(PostItem) returns (blocks.StatusReply) {};
|
||||
rpc Modify(PostItem) returns (base_cms_blocks.StatusReply) {};
|
||||
|
||||
//删除文章
|
||||
rpc Delete(blocks.IdentRequest) returns (blocks.StatusReply) {};
|
||||
rpc Delete(base_cms_blocks.IdentRequest) returns (base_cms_blocks.StatusReply) {};
|
||||
|
||||
// 文章点赞处理
|
||||
rpc IncrPostLike(PostOpIdentityRequest) returns (blocks.StatusReply) {};
|
||||
rpc IncrPostLike(PostOpIdentityRequest) returns (base_cms_blocks.StatusReply) {};
|
||||
|
||||
// 文章点赞取消处理
|
||||
rpc DescPostLike(PostOpIdentityRequest) returns (blocks.StatusReply) {};
|
||||
rpc DescPostLike(PostOpIdentityRequest) returns (base_cms_blocks.StatusReply) {};
|
||||
|
||||
// 文章点踩处理
|
||||
rpc IncrPostUnlike(PostOpIdentityRequest) returns (blocks.StatusReply) {};
|
||||
rpc IncrPostUnlike(PostOpIdentityRequest) returns (base_cms_blocks.StatusReply) {};
|
||||
|
||||
// 文章点踩取消处理
|
||||
rpc DescPostUnlike(PostOpIdentityRequest) returns (blocks.StatusReply) {};
|
||||
rpc DescPostUnlike(PostOpIdentityRequest) returns (base_cms_blocks.StatusReply) {};
|
||||
|
||||
//评论列表
|
||||
rpc CommentList(CommentListRequest) returns (CommentListResponse) {};
|
||||
|
||||
//发布评论
|
||||
rpc AddComment(CommentItem) returns (blocks.StatusReply) {};
|
||||
rpc AddComment(CommentItem) returns (base_cms_blocks.StatusReply) {};
|
||||
|
||||
//修改评论
|
||||
rpc ModifyComment(CommentItem) returns (blocks.StatusReply) {};
|
||||
rpc ModifyComment(CommentItem) returns (base_cms_blocks.StatusReply) {};
|
||||
|
||||
//删除评论
|
||||
rpc DeleteComment(DeleteCommentRequest) returns (blocks.StatusReply) {};
|
||||
rpc DeleteComment(DeleteCommentRequest) returns (base_cms_blocks.StatusReply) {};
|
||||
|
||||
// 评论点赞处理
|
||||
rpc IncrCommentLike(CommentOpIdentityRequest) returns (blocks.StatusReply) {};
|
||||
rpc IncrCommentLike(CommentOpIdentityRequest) returns (base_cms_blocks.StatusReply) {};
|
||||
|
||||
// 评论点赞取消处理
|
||||
rpc DescCommentLike(CommentOpIdentityRequest) returns (blocks.StatusReply) {};
|
||||
rpc DescCommentLike(CommentOpIdentityRequest) returns (base_cms_blocks.StatusReply) {};
|
||||
|
||||
// 评论点踩处理
|
||||
rpc IncrCommentUnlike(CommentOpIdentityRequest) returns (blocks.StatusReply) {};
|
||||
rpc IncrCommentUnlike(CommentOpIdentityRequest) returns (base_cms_blocks.StatusReply) {};
|
||||
|
||||
// 评论点踩取消处理
|
||||
rpc DescCommentUnlike(CommentOpIdentityRequest) returns (blocks.StatusReply) {};
|
||||
rpc DescCommentUnlike(CommentOpIdentityRequest) returns (base_cms_blocks.StatusReply) {};
|
||||
}
|
||||
|
||||
// 删除评论
|
||||
@@ -103,9 +103,9 @@ message PostItem{
|
||||
string key = 25; // content key
|
||||
|
||||
|
||||
repeated blocks.CmsCategoryItem category_data = 26 [json_name = "category_data"]; // 分类数据
|
||||
repeated blocks.CmsTagsItem tags_data = 27 [json_name = "tags_data"]; // 标签数据
|
||||
repeated blocks.CmsAccessoryItem accessory_data = 28 [json_name = "accessory_data"]; //附件数据
|
||||
repeated base_cms_blocks.CmsCategoryItem category_data = 26 [json_name = "category_data"]; // 分类数据
|
||||
repeated base_cms_blocks.CmsTagsItem tags_data = 27 [json_name = "tags_data"]; // 标签数据
|
||||
repeated base_cms_blocks.CmsAccessoryItem accessory_data = 28 [json_name = "accessory_data"]; //附件数据
|
||||
|
||||
string lang = 29 [json_name = "lang"]; // 语言
|
||||
string source_origin = 30 [json_name = "source_origin"]; // 来源方简称
|
||||
@@ -184,4 +184,4 @@ message PostOpIdentityRequest{
|
||||
message CommentOpIdentityRequest{
|
||||
string comment_identity = 1 [json_name = "comment_identity"]; //必填 评论唯一标识
|
||||
string op_identity = 2 [json_name = "op_identity"]; //必填 操作者唯一标识
|
||||
}
|
||||
}
|
||||
|
||||
@@ -6,19 +6,19 @@ import "module/base/cms/proto/const.proto";
|
||||
// CMS - 站点
|
||||
service Site {
|
||||
// 站点列表
|
||||
rpc Fetch (blocks.Empty) returns (SiteListReply) {};
|
||||
rpc Fetch (base_cms_blocks.Empty) returns (SiteListReply) {};
|
||||
|
||||
// 站点详情
|
||||
rpc Get (blocks.IdentRequest) returns (SiteItem) {};
|
||||
rpc Get (base_cms_blocks.IdentRequest) returns (SiteItem) {};
|
||||
|
||||
// 添加站点
|
||||
rpc Create (SiteItem) returns (blocks.StatusReply) {};
|
||||
rpc Create (SiteItem) returns (base_cms_blocks.StatusReply) {};
|
||||
|
||||
// 修改站点
|
||||
rpc Modify (SiteItem) returns (blocks.StatusReply) {};
|
||||
rpc Modify (SiteItem) returns (base_cms_blocks.StatusReply) {};
|
||||
|
||||
// 删除站点
|
||||
rpc Delete (blocks.IdentRequest) returns (blocks.StatusReply) {};
|
||||
rpc Delete (base_cms_blocks.IdentRequest) returns (base_cms_blocks.StatusReply) {};
|
||||
}
|
||||
|
||||
// 站点列表
|
||||
@@ -41,4 +41,4 @@ message SiteItem{
|
||||
string seo = 8; // SEO
|
||||
string theme = 9; // 站点主题
|
||||
string configs = 10; // 站点配置
|
||||
}
|
||||
}
|
||||
|
||||
@@ -6,20 +6,20 @@ import "module/base/cms/proto/const.proto";
|
||||
// 标签
|
||||
service Tags {
|
||||
//标签列表
|
||||
rpc Fetch (blocks.IdentRequest) returns (TagsListReply) {};
|
||||
rpc Fetch (base_cms_blocks.IdentRequest) returns (TagsListReply) {};
|
||||
|
||||
//创建标签
|
||||
rpc Create(blocks.CmsTagsItem) returns (blocks.StatusReply) {};
|
||||
rpc Create(base_cms_blocks.CmsTagsItem) returns (base_cms_blocks.StatusReply) {};
|
||||
|
||||
//修改标签
|
||||
rpc Modify(blocks.CmsTagsItem) returns (blocks.StatusReply) {};
|
||||
rpc Modify(base_cms_blocks.CmsTagsItem) returns (base_cms_blocks.StatusReply) {};
|
||||
|
||||
//删除标签
|
||||
rpc Delete(blocks.IdentRequest) returns (blocks.StatusReply) {};
|
||||
rpc Delete(base_cms_blocks.IdentRequest) returns (base_cms_blocks.StatusReply) {};
|
||||
}
|
||||
|
||||
// 标签列表
|
||||
message TagsListReply {
|
||||
repeated blocks.CmsTagsItem data = 1; // 数据
|
||||
repeated base_cms_blocks.CmsTagsItem data = 1; // 数据
|
||||
int64 count = 2; // 总数
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user