feat: import services and standardize Go 1.26.5
This commit is contained in:
53
apps/social/relation/proto/blocks.proto
Normal file
53
apps/social/relation/proto/blocks.proto
Normal file
@@ -0,0 +1,53 @@
|
||||
syntax = "proto3";
|
||||
package relation;
|
||||
option go_package = ".;relation";
|
||||
|
||||
message FetchRequest {
|
||||
int64 page_no=1; // 页数
|
||||
int64 page_size=2; // 每页记录数
|
||||
map<string,string> params=3; // 条件参数,key=val,eg key:category_id=?,vlaue=11
|
||||
}
|
||||
|
||||
message IdentRequest{
|
||||
int64 id = 1; // 唯一ID
|
||||
string identity = 2; // 唯一码
|
||||
}
|
||||
|
||||
message VersionRequest {
|
||||
int64 version=1; // 时序版本号
|
||||
}
|
||||
|
||||
|
||||
message SearchRequest {
|
||||
string keyword=1; //关键词
|
||||
}
|
||||
|
||||
|
||||
message StatusReply{
|
||||
string data=1; // 数据
|
||||
int64 timeseq=2; // 响应时间序列
|
||||
}
|
||||
|
||||
message Empty{
|
||||
}
|
||||
|
||||
|
||||
message RelationItem{
|
||||
string identity=1;
|
||||
string nickname=2; //昵称
|
||||
string remark_name=3; // 备注名称
|
||||
int32 popular=4; //是否置顶
|
||||
string avatar=5;
|
||||
string birthday = 6; //生日
|
||||
int32 sex = 7; //性别,1为男性,2为女性
|
||||
int32 province = 8; //省
|
||||
int32 city = 9; //市
|
||||
int32 area = 10; //区
|
||||
string sign = 11; //签名
|
||||
repeated string tags=12; //所属标签组
|
||||
int32 foreign_status=13; //外表的状态值,根据表不同,值的作用不同
|
||||
}
|
||||
message FetchRelationItemReply {
|
||||
int64 total=1; // 总记录数
|
||||
repeated RelationItem data=2;
|
||||
}
|
||||
22
apps/social/relation/proto/follow.proto
Normal file
22
apps/social/relation/proto/follow.proto
Normal file
@@ -0,0 +1,22 @@
|
||||
syntax = "proto3";
|
||||
package relation;
|
||||
option go_package = ".;relation";
|
||||
import "blocks.proto";
|
||||
|
||||
// relation-关系管理:关注
|
||||
service Follow{
|
||||
// 执行关注
|
||||
rpc Doing(IdentRequest) returns (StatusReply) {}
|
||||
|
||||
// 撤销关注
|
||||
rpc Undo(IdentRequest) returns (StatusReply) {}
|
||||
|
||||
// 关注状态
|
||||
rpc State(IdentRequest) returns (StatusReply) {}
|
||||
|
||||
// 获取关注列表
|
||||
rpc Fetch(FetchRequest) returns (FetchRelationItemReply) {}
|
||||
}
|
||||
|
||||
|
||||
|
||||
150
apps/social/relation/proto/friend.proto
Normal file
150
apps/social/relation/proto/friend.proto
Normal file
@@ -0,0 +1,150 @@
|
||||
syntax = "proto3";
|
||||
package relation;
|
||||
option go_package = ".;relation";
|
||||
import "blocks.proto";
|
||||
|
||||
// relation-关系管理:好友
|
||||
service Friend{
|
||||
/** 基础操作 **/
|
||||
|
||||
//搜索
|
||||
rpc Search(SearchRequest) returns (PartFriendReply);
|
||||
|
||||
//获取好友列表
|
||||
rpc Fetch(VersionRequest) returns (FriendsReply);
|
||||
|
||||
//获取用户信息卡片
|
||||
rpc Get(IdentRequest) returns (RelationItem);
|
||||
|
||||
//修改好友备注名称,如果要清除备注,直接nickname传空值
|
||||
rpc ModifyNickname(ModifyNicknameRequest) returns (StatusReply);
|
||||
|
||||
//受你欢迎的,置顶
|
||||
rpc DoPopular(IdentRequest) returns (StatusReply);
|
||||
|
||||
//取消受欢迎的,取消置顶
|
||||
rpc UndoPopular(IdentRequest) returns (StatusReply);
|
||||
|
||||
//删除好友
|
||||
rpc Delete(IdentRequest) returns (StatusReply);
|
||||
|
||||
/** 好友申请管理 **/
|
||||
|
||||
//好友申请列表
|
||||
rpc ApplyFetch(VersionRequest) returns (ApplyFetchReply);
|
||||
|
||||
//好友申请详情
|
||||
rpc ApplyGet(IdentRequest) returns (FriendApplyGetReply);
|
||||
|
||||
//好友申请
|
||||
rpc ApplyDo(ApplyDoRequest) returns (StatusReply);
|
||||
|
||||
//好友申请Do:留言
|
||||
rpc ApplyDoMessage(ApplyMessageRequest) returns (StatusReply);
|
||||
|
||||
//好友申请Do:确认
|
||||
rpc ApplyDoPass(ApplyDoPassRequest) returns (StatusReply);
|
||||
|
||||
//好友申请Do:拒绝
|
||||
rpc ApplyDoReject(IdentRequest) returns (StatusReply);
|
||||
|
||||
/** 好友标签管理 **/
|
||||
|
||||
//获取标签列表
|
||||
rpc TagFetch(Empty) returns (FriendTagsReply);
|
||||
|
||||
//获取标签成员
|
||||
rpc TagMemberFetch(IdentRequest) returns (PartFriendReply);
|
||||
|
||||
//创建标签
|
||||
rpc TagDoCreate(TagDoCreateRequest) returns (StatusReply);
|
||||
|
||||
//更新标签成员
|
||||
rpc TagDoUpdate(TagDoUpdateRequest) returns (StatusReply);
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
message ApplyFetchReply {
|
||||
int32 total=1; // 总记录数
|
||||
int64 version=2; //版本号
|
||||
repeated ApplyItem applys=3;
|
||||
}
|
||||
|
||||
message ApplyItem {
|
||||
string identity=1; // 唯一标识
|
||||
RelationItem from=2;
|
||||
MessageItem message=3;
|
||||
string created_at=4; //时间
|
||||
int32 status =5; // 状态
|
||||
}
|
||||
|
||||
message ApplyDoRequest {
|
||||
int64 to_id = 1; // 目标人的唯一ID
|
||||
string to_identity=2; //目标人的唯一标识
|
||||
string body=3; //留言正文
|
||||
}
|
||||
|
||||
message ApplyDoPassRequest{
|
||||
int64 friend_relation_id = 1; // 为将要通过的好友会员通行证唯一ID
|
||||
string friend_relation_identity = 2; // 为将要通过的好友会员通行证唯一Identity
|
||||
string apply_identity = 3; // 申请的唯一标识
|
||||
}
|
||||
|
||||
message ApplyMessageRequest {
|
||||
int64 apply_id = 1; // 申请ID
|
||||
string body=2; //留言正文
|
||||
}
|
||||
|
||||
message PartFriendReply {
|
||||
int32 total=1; // 总记录数
|
||||
int64 version=2; //版本号
|
||||
repeated RelationItem friends=4; //好友信息
|
||||
}
|
||||
|
||||
message FriendsReply {
|
||||
int32 total=1; // 总记录数
|
||||
int64 version=2; //版本号
|
||||
repeated TagItem tags=3; //分组标签信息
|
||||
repeated RelationItem friends=4; //好友信息
|
||||
}
|
||||
|
||||
message FriendApplyGetReply{
|
||||
RelationItem data=1; // 会员信息卡片
|
||||
repeated MessageItem message=2; //聊天记录
|
||||
}
|
||||
|
||||
message MessageItem {
|
||||
string relation_identity=1; //发送者
|
||||
string body=2; //正文
|
||||
string created_at=3; //时间
|
||||
}
|
||||
|
||||
message ModifyNicknameRequest{
|
||||
string identity=1; // 会员唯一标识
|
||||
string nickname=2; // 新的备注名称
|
||||
}
|
||||
|
||||
message FriendTagsReply {
|
||||
int64 total=1; // 总记录数
|
||||
repeated TagItem data=2;
|
||||
}
|
||||
|
||||
message TagItem {
|
||||
int64 id=1;//好友标签ID
|
||||
string identity=2; // 标签唯一标识
|
||||
int64 friend_total=3; // 标签成员统计
|
||||
string tag_name=4; // 标签名称
|
||||
}
|
||||
|
||||
message TagDoCreateRequest{
|
||||
string tag_name=1; // 标签名称
|
||||
repeated string friend_identity=2; //成员identity
|
||||
}
|
||||
|
||||
message TagDoUpdateRequest{
|
||||
string tag_identity=1; // 标签唯一标识
|
||||
string friend_identity=2; //成员identity
|
||||
string direction=3; //操作方式:ADD增加成员,DEL删除成员
|
||||
}
|
||||
22
apps/social/relation/proto/match.proto
Normal file
22
apps/social/relation/proto/match.proto
Normal file
@@ -0,0 +1,22 @@
|
||||
syntax = "proto3";
|
||||
package relation;
|
||||
option go_package = ".;relation";
|
||||
import "blocks.proto";
|
||||
|
||||
// relation-关系管理:匹配
|
||||
service Match{
|
||||
// 获取匹配列表
|
||||
rpc Fetch(FetchRequest) returns (FetchRelationItemReply) {}
|
||||
|
||||
// 获取匹配详情
|
||||
rpc Get(IdentRequest) returns (RelationItem) {}
|
||||
|
||||
// 执行通过,加为好友
|
||||
rpc DoJoin(IdentRequest) returns (StatusReply) {}
|
||||
|
||||
// 执行忽略
|
||||
rpc DoIgnore(IdentRequest) returns (StatusReply) {}
|
||||
}
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user