refactor: centralize protobuf and remove go-zero
This commit is contained in:
@@ -1,706 +0,0 @@
|
||||
// Code generated by protoc-gen-go. DO NOT EDIT.
|
||||
// versions:
|
||||
// protoc-gen-go v1.36.8
|
||||
// protoc (unknown)
|
||||
// source: blocks.proto
|
||||
|
||||
package feed
|
||||
|
||||
import (
|
||||
protoreflect "google.golang.org/protobuf/reflect/protoreflect"
|
||||
protoimpl "google.golang.org/protobuf/runtime/protoimpl"
|
||||
reflect "reflect"
|
||||
sync "sync"
|
||||
unsafe "unsafe"
|
||||
)
|
||||
|
||||
const (
|
||||
// Verify that this generated code is sufficiently up-to-date.
|
||||
_ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion)
|
||||
// Verify that runtime/protoimpl is sufficiently up-to-date.
|
||||
_ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20)
|
||||
)
|
||||
|
||||
type FetchRequest struct {
|
||||
state protoimpl.MessageState `protogen:"open.v1"`
|
||||
PageNo int64 `protobuf:"varint,1,opt,name=page_no,json=pageNo,proto3" json:"page_no,omitempty"` // 页数
|
||||
PageSize int64 `protobuf:"varint,2,opt,name=page_size,json=pageSize,proto3" json:"page_size,omitempty"` // 每页记录数
|
||||
Params map[string]string `protobuf:"bytes,3,rep,name=params,proto3" json:"params,omitempty" protobuf_key:"bytes,1,opt,name=key" protobuf_val:"bytes,2,opt,name=value"` // 条件参数,key=val,eg key:category_id=?,vlaue=11
|
||||
unknownFields protoimpl.UnknownFields
|
||||
sizeCache protoimpl.SizeCache
|
||||
}
|
||||
|
||||
func (x *FetchRequest) Reset() {
|
||||
*x = FetchRequest{}
|
||||
mi := &file_blocks_proto_msgTypes[0]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
|
||||
func (x *FetchRequest) String() string {
|
||||
return protoimpl.X.MessageStringOf(x)
|
||||
}
|
||||
|
||||
func (*FetchRequest) ProtoMessage() {}
|
||||
|
||||
func (x *FetchRequest) ProtoReflect() protoreflect.Message {
|
||||
mi := &file_blocks_proto_msgTypes[0]
|
||||
if x != nil {
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
if ms.LoadMessageInfo() == nil {
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
return ms
|
||||
}
|
||||
return mi.MessageOf(x)
|
||||
}
|
||||
|
||||
// Deprecated: Use FetchRequest.ProtoReflect.Descriptor instead.
|
||||
func (*FetchRequest) Descriptor() ([]byte, []int) {
|
||||
return file_blocks_proto_rawDescGZIP(), []int{0}
|
||||
}
|
||||
|
||||
func (x *FetchRequest) GetPageNo() int64 {
|
||||
if x != nil {
|
||||
return x.PageNo
|
||||
}
|
||||
return 0
|
||||
}
|
||||
|
||||
func (x *FetchRequest) GetPageSize() int64 {
|
||||
if x != nil {
|
||||
return x.PageSize
|
||||
}
|
||||
return 0
|
||||
}
|
||||
|
||||
func (x *FetchRequest) GetParams() map[string]string {
|
||||
if x != nil {
|
||||
return x.Params
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
type IdentRequest struct {
|
||||
state protoimpl.MessageState `protogen:"open.v1"`
|
||||
Id int64 `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"` // 唯一ID
|
||||
Identity string `protobuf:"bytes,2,opt,name=identity,proto3" json:"identity,omitempty"` // 唯一码
|
||||
unknownFields protoimpl.UnknownFields
|
||||
sizeCache protoimpl.SizeCache
|
||||
}
|
||||
|
||||
func (x *IdentRequest) Reset() {
|
||||
*x = IdentRequest{}
|
||||
mi := &file_blocks_proto_msgTypes[1]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
|
||||
func (x *IdentRequest) String() string {
|
||||
return protoimpl.X.MessageStringOf(x)
|
||||
}
|
||||
|
||||
func (*IdentRequest) ProtoMessage() {}
|
||||
|
||||
func (x *IdentRequest) ProtoReflect() protoreflect.Message {
|
||||
mi := &file_blocks_proto_msgTypes[1]
|
||||
if x != nil {
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
if ms.LoadMessageInfo() == nil {
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
return ms
|
||||
}
|
||||
return mi.MessageOf(x)
|
||||
}
|
||||
|
||||
// Deprecated: Use IdentRequest.ProtoReflect.Descriptor instead.
|
||||
func (*IdentRequest) Descriptor() ([]byte, []int) {
|
||||
return file_blocks_proto_rawDescGZIP(), []int{1}
|
||||
}
|
||||
|
||||
func (x *IdentRequest) GetId() int64 {
|
||||
if x != nil {
|
||||
return x.Id
|
||||
}
|
||||
return 0
|
||||
}
|
||||
|
||||
func (x *IdentRequest) GetIdentity() string {
|
||||
if x != nil {
|
||||
return x.Identity
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
type VersionRequest struct {
|
||||
state protoimpl.MessageState `protogen:"open.v1"`
|
||||
Version int64 `protobuf:"varint,1,opt,name=version,proto3" json:"version,omitempty"` // 时序版本号
|
||||
unknownFields protoimpl.UnknownFields
|
||||
sizeCache protoimpl.SizeCache
|
||||
}
|
||||
|
||||
func (x *VersionRequest) Reset() {
|
||||
*x = VersionRequest{}
|
||||
mi := &file_blocks_proto_msgTypes[2]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
|
||||
func (x *VersionRequest) String() string {
|
||||
return protoimpl.X.MessageStringOf(x)
|
||||
}
|
||||
|
||||
func (*VersionRequest) ProtoMessage() {}
|
||||
|
||||
func (x *VersionRequest) ProtoReflect() protoreflect.Message {
|
||||
mi := &file_blocks_proto_msgTypes[2]
|
||||
if x != nil {
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
if ms.LoadMessageInfo() == nil {
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
return ms
|
||||
}
|
||||
return mi.MessageOf(x)
|
||||
}
|
||||
|
||||
// Deprecated: Use VersionRequest.ProtoReflect.Descriptor instead.
|
||||
func (*VersionRequest) Descriptor() ([]byte, []int) {
|
||||
return file_blocks_proto_rawDescGZIP(), []int{2}
|
||||
}
|
||||
|
||||
func (x *VersionRequest) GetVersion() int64 {
|
||||
if x != nil {
|
||||
return x.Version
|
||||
}
|
||||
return 0
|
||||
}
|
||||
|
||||
type SearchRequest struct {
|
||||
state protoimpl.MessageState `protogen:"open.v1"`
|
||||
Keyword string `protobuf:"bytes,1,opt,name=keyword,proto3" json:"keyword,omitempty"` //关键词
|
||||
unknownFields protoimpl.UnknownFields
|
||||
sizeCache protoimpl.SizeCache
|
||||
}
|
||||
|
||||
func (x *SearchRequest) Reset() {
|
||||
*x = SearchRequest{}
|
||||
mi := &file_blocks_proto_msgTypes[3]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
|
||||
func (x *SearchRequest) String() string {
|
||||
return protoimpl.X.MessageStringOf(x)
|
||||
}
|
||||
|
||||
func (*SearchRequest) ProtoMessage() {}
|
||||
|
||||
func (x *SearchRequest) ProtoReflect() protoreflect.Message {
|
||||
mi := &file_blocks_proto_msgTypes[3]
|
||||
if x != nil {
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
if ms.LoadMessageInfo() == nil {
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
return ms
|
||||
}
|
||||
return mi.MessageOf(x)
|
||||
}
|
||||
|
||||
// Deprecated: Use SearchRequest.ProtoReflect.Descriptor instead.
|
||||
func (*SearchRequest) Descriptor() ([]byte, []int) {
|
||||
return file_blocks_proto_rawDescGZIP(), []int{3}
|
||||
}
|
||||
|
||||
func (x *SearchRequest) GetKeyword() string {
|
||||
if x != nil {
|
||||
return x.Keyword
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
type StatusReply struct {
|
||||
state protoimpl.MessageState `protogen:"open.v1"`
|
||||
Data string `protobuf:"bytes,1,opt,name=data,proto3" json:"data,omitempty"` // 数据
|
||||
Timeseq int64 `protobuf:"varint,2,opt,name=timeseq,proto3" json:"timeseq,omitempty"` // 响应时间序列
|
||||
unknownFields protoimpl.UnknownFields
|
||||
sizeCache protoimpl.SizeCache
|
||||
}
|
||||
|
||||
func (x *StatusReply) Reset() {
|
||||
*x = StatusReply{}
|
||||
mi := &file_blocks_proto_msgTypes[4]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
|
||||
func (x *StatusReply) String() string {
|
||||
return protoimpl.X.MessageStringOf(x)
|
||||
}
|
||||
|
||||
func (*StatusReply) ProtoMessage() {}
|
||||
|
||||
func (x *StatusReply) ProtoReflect() protoreflect.Message {
|
||||
mi := &file_blocks_proto_msgTypes[4]
|
||||
if x != nil {
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
if ms.LoadMessageInfo() == nil {
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
return ms
|
||||
}
|
||||
return mi.MessageOf(x)
|
||||
}
|
||||
|
||||
// Deprecated: Use StatusReply.ProtoReflect.Descriptor instead.
|
||||
func (*StatusReply) Descriptor() ([]byte, []int) {
|
||||
return file_blocks_proto_rawDescGZIP(), []int{4}
|
||||
}
|
||||
|
||||
func (x *StatusReply) GetData() string {
|
||||
if x != nil {
|
||||
return x.Data
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
func (x *StatusReply) GetTimeseq() int64 {
|
||||
if x != nil {
|
||||
return x.Timeseq
|
||||
}
|
||||
return 0
|
||||
}
|
||||
|
||||
type Empty struct {
|
||||
state protoimpl.MessageState `protogen:"open.v1"`
|
||||
unknownFields protoimpl.UnknownFields
|
||||
sizeCache protoimpl.SizeCache
|
||||
}
|
||||
|
||||
func (x *Empty) Reset() {
|
||||
*x = Empty{}
|
||||
mi := &file_blocks_proto_msgTypes[5]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
|
||||
func (x *Empty) String() string {
|
||||
return protoimpl.X.MessageStringOf(x)
|
||||
}
|
||||
|
||||
func (*Empty) ProtoMessage() {}
|
||||
|
||||
func (x *Empty) ProtoReflect() protoreflect.Message {
|
||||
mi := &file_blocks_proto_msgTypes[5]
|
||||
if x != nil {
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
if ms.LoadMessageInfo() == nil {
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
return ms
|
||||
}
|
||||
return mi.MessageOf(x)
|
||||
}
|
||||
|
||||
// Deprecated: Use Empty.ProtoReflect.Descriptor instead.
|
||||
func (*Empty) Descriptor() ([]byte, []int) {
|
||||
return file_blocks_proto_rawDescGZIP(), []int{5}
|
||||
}
|
||||
|
||||
// 推文列表
|
||||
type PostListReply struct {
|
||||
state protoimpl.MessageState `protogen:"open.v1"`
|
||||
List []*PostItem `protobuf:"bytes,1,rep,name=list,proto3" json:"list,omitempty"`
|
||||
Cnt int64 `protobuf:"varint,2,opt,name=cnt,proto3" json:"cnt,omitempty"`
|
||||
unknownFields protoimpl.UnknownFields
|
||||
sizeCache protoimpl.SizeCache
|
||||
}
|
||||
|
||||
func (x *PostListReply) Reset() {
|
||||
*x = PostListReply{}
|
||||
mi := &file_blocks_proto_msgTypes[6]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
|
||||
func (x *PostListReply) String() string {
|
||||
return protoimpl.X.MessageStringOf(x)
|
||||
}
|
||||
|
||||
func (*PostListReply) ProtoMessage() {}
|
||||
|
||||
func (x *PostListReply) ProtoReflect() protoreflect.Message {
|
||||
mi := &file_blocks_proto_msgTypes[6]
|
||||
if x != nil {
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
if ms.LoadMessageInfo() == nil {
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
return ms
|
||||
}
|
||||
return mi.MessageOf(x)
|
||||
}
|
||||
|
||||
// Deprecated: Use PostListReply.ProtoReflect.Descriptor instead.
|
||||
func (*PostListReply) Descriptor() ([]byte, []int) {
|
||||
return file_blocks_proto_rawDescGZIP(), []int{6}
|
||||
}
|
||||
|
||||
func (x *PostListReply) GetList() []*PostItem {
|
||||
if x != nil {
|
||||
return x.List
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
func (x *PostListReply) GetCnt() int64 {
|
||||
if x != nil {
|
||||
return x.Cnt
|
||||
}
|
||||
return 0
|
||||
}
|
||||
|
||||
// 推文
|
||||
type PostItem struct {
|
||||
state protoimpl.MessageState `protogen:"open.v1"`
|
||||
Identity string `protobuf:"bytes,1,opt,name=identity,proto3" json:"identity,omitempty"` // 唯一标识
|
||||
Content string `protobuf:"bytes,2,opt,name=content,proto3" json:"content,omitempty"` // 内容
|
||||
FeedId int64 `protobuf:"varint,3,opt,name=feed_id,json=feedId,proto3" json:"feed_id,omitempty"` // 通行证ID
|
||||
FeedIdentity string `protobuf:"bytes,4,opt,name=feed_identity,json=feedIdentity,proto3" json:"feed_identity,omitempty"` // 通行证Identity
|
||||
IsOpen bool `protobuf:"varint,5,opt,name=is_open,json=isOpen,proto3" json:"is_open,omitempty"` // 是否公开:默认为0-公开,1-不公开
|
||||
CntUnlike int64 `protobuf:"varint,6,opt,name=cnt_unlike,json=cntUnlike,proto3" json:"cnt_unlike,omitempty"` // 点踩数量
|
||||
CntComment int64 `protobuf:"varint,7,opt,name=cnt_comment,json=cntComment,proto3" json:"cnt_comment,omitempty"` // 评论数量
|
||||
CntLike int64 `protobuf:"varint,8,opt,name=cnt_like,json=cntLike,proto3" json:"cnt_like,omitempty"` // 点赞数量
|
||||
Attachs []*AttachItem `protobuf:"bytes,9,rep,name=attachs,proto3" json:"attachs,omitempty"` // 附件信息
|
||||
Tags []*TagItem `protobuf:"bytes,10,rep,name=tags,proto3" json:"tags,omitempty"` // 所属话题
|
||||
unknownFields protoimpl.UnknownFields
|
||||
sizeCache protoimpl.SizeCache
|
||||
}
|
||||
|
||||
func (x *PostItem) Reset() {
|
||||
*x = PostItem{}
|
||||
mi := &file_blocks_proto_msgTypes[7]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
|
||||
func (x *PostItem) String() string {
|
||||
return protoimpl.X.MessageStringOf(x)
|
||||
}
|
||||
|
||||
func (*PostItem) ProtoMessage() {}
|
||||
|
||||
func (x *PostItem) ProtoReflect() protoreflect.Message {
|
||||
mi := &file_blocks_proto_msgTypes[7]
|
||||
if x != nil {
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
if ms.LoadMessageInfo() == nil {
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
return ms
|
||||
}
|
||||
return mi.MessageOf(x)
|
||||
}
|
||||
|
||||
// Deprecated: Use PostItem.ProtoReflect.Descriptor instead.
|
||||
func (*PostItem) Descriptor() ([]byte, []int) {
|
||||
return file_blocks_proto_rawDescGZIP(), []int{7}
|
||||
}
|
||||
|
||||
func (x *PostItem) GetIdentity() string {
|
||||
if x != nil {
|
||||
return x.Identity
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
func (x *PostItem) GetContent() string {
|
||||
if x != nil {
|
||||
return x.Content
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
func (x *PostItem) GetFeedId() int64 {
|
||||
if x != nil {
|
||||
return x.FeedId
|
||||
}
|
||||
return 0
|
||||
}
|
||||
|
||||
func (x *PostItem) GetFeedIdentity() string {
|
||||
if x != nil {
|
||||
return x.FeedIdentity
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
func (x *PostItem) GetIsOpen() bool {
|
||||
if x != nil {
|
||||
return x.IsOpen
|
||||
}
|
||||
return false
|
||||
}
|
||||
|
||||
func (x *PostItem) GetCntUnlike() int64 {
|
||||
if x != nil {
|
||||
return x.CntUnlike
|
||||
}
|
||||
return 0
|
||||
}
|
||||
|
||||
func (x *PostItem) GetCntComment() int64 {
|
||||
if x != nil {
|
||||
return x.CntComment
|
||||
}
|
||||
return 0
|
||||
}
|
||||
|
||||
func (x *PostItem) GetCntLike() int64 {
|
||||
if x != nil {
|
||||
return x.CntLike
|
||||
}
|
||||
return 0
|
||||
}
|
||||
|
||||
func (x *PostItem) GetAttachs() []*AttachItem {
|
||||
if x != nil {
|
||||
return x.Attachs
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
func (x *PostItem) GetTags() []*TagItem {
|
||||
if x != nil {
|
||||
return x.Tags
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
// 附件
|
||||
type AttachItem struct {
|
||||
state protoimpl.MessageState `protogen:"open.v1"`
|
||||
Identity string `protobuf:"bytes,1,opt,name=identity,proto3" json:"identity,omitempty"` // 唯一标识
|
||||
AttachType string `protobuf:"bytes,2,opt,name=attach_type,json=attachType,proto3" json:"attach_type,omitempty"` // 文件类型
|
||||
Url string `protobuf:"bytes,3,opt,name=url,proto3" json:"url,omitempty"` // 文件路径
|
||||
unknownFields protoimpl.UnknownFields
|
||||
sizeCache protoimpl.SizeCache
|
||||
}
|
||||
|
||||
func (x *AttachItem) Reset() {
|
||||
*x = AttachItem{}
|
||||
mi := &file_blocks_proto_msgTypes[8]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
|
||||
func (x *AttachItem) String() string {
|
||||
return protoimpl.X.MessageStringOf(x)
|
||||
}
|
||||
|
||||
func (*AttachItem) ProtoMessage() {}
|
||||
|
||||
func (x *AttachItem) ProtoReflect() protoreflect.Message {
|
||||
mi := &file_blocks_proto_msgTypes[8]
|
||||
if x != nil {
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
if ms.LoadMessageInfo() == nil {
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
return ms
|
||||
}
|
||||
return mi.MessageOf(x)
|
||||
}
|
||||
|
||||
// Deprecated: Use AttachItem.ProtoReflect.Descriptor instead.
|
||||
func (*AttachItem) Descriptor() ([]byte, []int) {
|
||||
return file_blocks_proto_rawDescGZIP(), []int{8}
|
||||
}
|
||||
|
||||
func (x *AttachItem) GetIdentity() string {
|
||||
if x != nil {
|
||||
return x.Identity
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
func (x *AttachItem) GetAttachType() string {
|
||||
if x != nil {
|
||||
return x.AttachType
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
func (x *AttachItem) GetUrl() string {
|
||||
if x != nil {
|
||||
return x.Url
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
// 标签
|
||||
type TagItem struct {
|
||||
state protoimpl.MessageState `protogen:"open.v1"`
|
||||
Key string `protobuf:"bytes,1,opt,name=key,proto3" json:"key,omitempty"` // 标签唯一码
|
||||
Content string `protobuf:"bytes,2,opt,name=content,proto3" json:"content,omitempty"` // 标签内容
|
||||
unknownFields protoimpl.UnknownFields
|
||||
sizeCache protoimpl.SizeCache
|
||||
}
|
||||
|
||||
func (x *TagItem) Reset() {
|
||||
*x = TagItem{}
|
||||
mi := &file_blocks_proto_msgTypes[9]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
|
||||
func (x *TagItem) String() string {
|
||||
return protoimpl.X.MessageStringOf(x)
|
||||
}
|
||||
|
||||
func (*TagItem) ProtoMessage() {}
|
||||
|
||||
func (x *TagItem) ProtoReflect() protoreflect.Message {
|
||||
mi := &file_blocks_proto_msgTypes[9]
|
||||
if x != nil {
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
if ms.LoadMessageInfo() == nil {
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
return ms
|
||||
}
|
||||
return mi.MessageOf(x)
|
||||
}
|
||||
|
||||
// Deprecated: Use TagItem.ProtoReflect.Descriptor instead.
|
||||
func (*TagItem) Descriptor() ([]byte, []int) {
|
||||
return file_blocks_proto_rawDescGZIP(), []int{9}
|
||||
}
|
||||
|
||||
func (x *TagItem) GetKey() string {
|
||||
if x != nil {
|
||||
return x.Key
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
func (x *TagItem) GetContent() string {
|
||||
if x != nil {
|
||||
return x.Content
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
var File_blocks_proto protoreflect.FileDescriptor
|
||||
|
||||
const file_blocks_proto_rawDesc = "" +
|
||||
"\n" +
|
||||
"\x11feed/blocks.proto\x12\x04feed\"\xb7\x01\n" +
|
||||
"\fFetchRequest\x12\x17\n" +
|
||||
"\apage_no\x18\x01 \x01(\x03R\x06pageNo\x12\x1b\n" +
|
||||
"\tpage_size\x18\x02 \x01(\x03R\bpageSize\x126\n" +
|
||||
"\x06params\x18\x03 \x03(\v2\x1e.feed.FetchRequest.ParamsEntryR\x06params\x1a9\n" +
|
||||
"\vParamsEntry\x12\x10\n" +
|
||||
"\x03key\x18\x01 \x01(\tR\x03key\x12\x14\n" +
|
||||
"\x05value\x18\x02 \x01(\tR\x05value:\x028\x01\":\n" +
|
||||
"\fIdentRequest\x12\x0e\n" +
|
||||
"\x02id\x18\x01 \x01(\x03R\x02id\x12\x1a\n" +
|
||||
"\bidentity\x18\x02 \x01(\tR\bidentity\"*\n" +
|
||||
"\x0eVersionRequest\x12\x18\n" +
|
||||
"\aversion\x18\x01 \x01(\x03R\aversion\")\n" +
|
||||
"\rSearchRequest\x12\x18\n" +
|
||||
"\akeyword\x18\x01 \x01(\tR\akeyword\";\n" +
|
||||
"\vStatusReply\x12\x12\n" +
|
||||
"\x04data\x18\x01 \x01(\tR\x04data\x12\x18\n" +
|
||||
"\atimeseq\x18\x02 \x01(\x03R\atimeseq\"\a\n" +
|
||||
"\x05Empty\"E\n" +
|
||||
"\rPostListReply\x12\"\n" +
|
||||
"\x04list\x18\x01 \x03(\v2\x0e.feed.PostItemR\x04list\x12\x10\n" +
|
||||
"\x03cnt\x18\x02 \x01(\x03R\x03cnt\"\xc1\x02\n" +
|
||||
"\bPostItem\x12\x1a\n" +
|
||||
"\bidentity\x18\x01 \x01(\tR\bidentity\x12\x18\n" +
|
||||
"\acontent\x18\x02 \x01(\tR\acontent\x12\x17\n" +
|
||||
"\afeed_id\x18\x03 \x01(\x03R\x06feedId\x12#\n" +
|
||||
"\rfeed_identity\x18\x04 \x01(\tR\ffeedIdentity\x12\x17\n" +
|
||||
"\ais_open\x18\x05 \x01(\bR\x06isOpen\x12\x1d\n" +
|
||||
"\n" +
|
||||
"cnt_unlike\x18\x06 \x01(\x03R\tcntUnlike\x12\x1f\n" +
|
||||
"\vcnt_comment\x18\a \x01(\x03R\n" +
|
||||
"cntComment\x12\x19\n" +
|
||||
"\bcnt_like\x18\b \x01(\x03R\acntLike\x12*\n" +
|
||||
"\aattachs\x18\t \x03(\v2\x10.feed.AttachItemR\aattachs\x12!\n" +
|
||||
"\x04tags\x18\n" +
|
||||
" \x03(\v2\r.feed.TagItemR\x04tags\"[\n" +
|
||||
"\n" +
|
||||
"AttachItem\x12\x1a\n" +
|
||||
"\bidentity\x18\x01 \x01(\tR\bidentity\x12\x1f\n" +
|
||||
"\vattach_type\x18\x02 \x01(\tR\n" +
|
||||
"attachType\x12\x10\n" +
|
||||
"\x03url\x18\x03 \x01(\tR\x03url\"5\n" +
|
||||
"\aTagItem\x12\x10\n" +
|
||||
"\x03key\x18\x01 \x01(\tR\x03key\x12\x18\n" +
|
||||
"\acontent\x18\x02 \x01(\tR\acontentB\bZ\x06.;feedb\x06proto3"
|
||||
|
||||
var (
|
||||
file_blocks_proto_rawDescOnce sync.Once
|
||||
file_blocks_proto_rawDescData []byte
|
||||
)
|
||||
|
||||
func file_blocks_proto_rawDescGZIP() []byte {
|
||||
file_blocks_proto_rawDescOnce.Do(func() {
|
||||
file_blocks_proto_rawDescData = protoimpl.X.CompressGZIP(unsafe.Slice(unsafe.StringData(file_blocks_proto_rawDesc), len(file_blocks_proto_rawDesc)))
|
||||
})
|
||||
return file_blocks_proto_rawDescData
|
||||
}
|
||||
|
||||
var file_blocks_proto_msgTypes = make([]protoimpl.MessageInfo, 11)
|
||||
var file_blocks_proto_goTypes = []any{
|
||||
(*FetchRequest)(nil), // 0: feed.FetchRequest
|
||||
(*IdentRequest)(nil), // 1: feed.IdentRequest
|
||||
(*VersionRequest)(nil), // 2: feed.VersionRequest
|
||||
(*SearchRequest)(nil), // 3: feed.SearchRequest
|
||||
(*StatusReply)(nil), // 4: feed.StatusReply
|
||||
(*Empty)(nil), // 5: feed.Empty
|
||||
(*PostListReply)(nil), // 6: feed.PostListReply
|
||||
(*PostItem)(nil), // 7: feed.PostItem
|
||||
(*AttachItem)(nil), // 8: feed.AttachItem
|
||||
(*TagItem)(nil), // 9: feed.TagItem
|
||||
nil, // 10: feed.FetchRequest.ParamsEntry
|
||||
}
|
||||
var file_blocks_proto_depIdxs = []int32{
|
||||
10, // 0: feed.FetchRequest.params:type_name -> feed.FetchRequest.ParamsEntry
|
||||
7, // 1: feed.PostListReply.list:type_name -> feed.PostItem
|
||||
8, // 2: feed.PostItem.attachs:type_name -> feed.AttachItem
|
||||
9, // 3: feed.PostItem.tags:type_name -> feed.TagItem
|
||||
4, // [4:4] is the sub-list for method output_type
|
||||
4, // [4:4] is the sub-list for method input_type
|
||||
4, // [4:4] is the sub-list for extension type_name
|
||||
4, // [4:4] is the sub-list for extension extendee
|
||||
0, // [0:4] is the sub-list for field type_name
|
||||
}
|
||||
|
||||
func init() { file_blocks_proto_init() }
|
||||
func file_blocks_proto_init() {
|
||||
if File_blocks_proto != nil {
|
||||
return
|
||||
}
|
||||
type x struct{}
|
||||
out := protoimpl.TypeBuilder{
|
||||
File: protoimpl.DescBuilder{
|
||||
GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
|
||||
RawDescriptor: unsafe.Slice(unsafe.StringData(file_blocks_proto_rawDesc), len(file_blocks_proto_rawDesc)),
|
||||
NumEnums: 0,
|
||||
NumMessages: 11,
|
||||
NumExtensions: 0,
|
||||
NumServices: 0,
|
||||
},
|
||||
GoTypes: file_blocks_proto_goTypes,
|
||||
DependencyIndexes: file_blocks_proto_depIdxs,
|
||||
MessageInfos: file_blocks_proto_msgTypes,
|
||||
}.Build()
|
||||
File_blocks_proto = out.File
|
||||
file_blocks_proto_goTypes = nil
|
||||
file_blocks_proto_depIdxs = nil
|
||||
}
|
||||
14
module/social/feed/pb/blocks_compat.go
Normal file
14
module/social/feed/pb/blocks_compat.go
Normal file
@@ -0,0 +1,14 @@
|
||||
package feed
|
||||
|
||||
import blocks "bsm/full/protobuf"
|
||||
|
||||
type Empty = blocks.Empty
|
||||
type FetchRequest = blocks.FetchRequest
|
||||
type IdentRequest = blocks.IdentRequest
|
||||
type VersionRequest = blocks.VersionRequest
|
||||
type SearchRequest = blocks.SearchRequest
|
||||
type StatusReply = blocks.DataStatusReply
|
||||
type PostListReply = blocks.FeedPostListReply
|
||||
type PostItem = blocks.FeedPostItem
|
||||
type AttachItem = blocks.FeedAttachItem
|
||||
type TagItem = blocks.FeedTagItem
|
||||
@@ -1,12 +1,13 @@
|
||||
// Code generated by protoc-gen-go. DO NOT EDIT.
|
||||
// versions:
|
||||
// protoc-gen-go v1.36.8
|
||||
// protoc (unknown)
|
||||
// source: post.proto
|
||||
// protoc-gen-go v1.36.11
|
||||
// protoc v7.35.0
|
||||
// source: module/social/feed/proto/post.proto
|
||||
|
||||
package feed
|
||||
|
||||
import (
|
||||
protobuf "bsm/full/protobuf"
|
||||
protoreflect "google.golang.org/protobuf/reflect/protoreflect"
|
||||
protoimpl "google.golang.org/protobuf/runtime/protoimpl"
|
||||
reflect "reflect"
|
||||
@@ -32,7 +33,7 @@ type CommentListReply struct {
|
||||
|
||||
func (x *CommentListReply) Reset() {
|
||||
*x = CommentListReply{}
|
||||
mi := &file_post_proto_msgTypes[0]
|
||||
mi := &file_module_social_feed_proto_post_proto_msgTypes[0]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
@@ -44,7 +45,7 @@ func (x *CommentListReply) String() string {
|
||||
func (*CommentListReply) ProtoMessage() {}
|
||||
|
||||
func (x *CommentListReply) ProtoReflect() protoreflect.Message {
|
||||
mi := &file_post_proto_msgTypes[0]
|
||||
mi := &file_module_social_feed_proto_post_proto_msgTypes[0]
|
||||
if x != nil {
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
if ms.LoadMessageInfo() == nil {
|
||||
@@ -57,7 +58,7 @@ func (x *CommentListReply) ProtoReflect() protoreflect.Message {
|
||||
|
||||
// Deprecated: Use CommentListReply.ProtoReflect.Descriptor instead.
|
||||
func (*CommentListReply) Descriptor() ([]byte, []int) {
|
||||
return file_post_proto_rawDescGZIP(), []int{0}
|
||||
return file_module_social_feed_proto_post_proto_rawDescGZIP(), []int{0}
|
||||
}
|
||||
|
||||
func (x *CommentListReply) GetList() []*CommentItem {
|
||||
@@ -87,7 +88,7 @@ type CommentItem struct {
|
||||
|
||||
func (x *CommentItem) Reset() {
|
||||
*x = CommentItem{}
|
||||
mi := &file_post_proto_msgTypes[1]
|
||||
mi := &file_module_social_feed_proto_post_proto_msgTypes[1]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
@@ -99,7 +100,7 @@ func (x *CommentItem) String() string {
|
||||
func (*CommentItem) ProtoMessage() {}
|
||||
|
||||
func (x *CommentItem) ProtoReflect() protoreflect.Message {
|
||||
mi := &file_post_proto_msgTypes[1]
|
||||
mi := &file_module_social_feed_proto_post_proto_msgTypes[1]
|
||||
if x != nil {
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
if ms.LoadMessageInfo() == nil {
|
||||
@@ -112,7 +113,7 @@ func (x *CommentItem) ProtoReflect() protoreflect.Message {
|
||||
|
||||
// Deprecated: Use CommentItem.ProtoReflect.Descriptor instead.
|
||||
func (*CommentItem) Descriptor() ([]byte, []int) {
|
||||
return file_post_proto_rawDescGZIP(), []int{1}
|
||||
return file_module_social_feed_proto_post_proto_rawDescGZIP(), []int{1}
|
||||
}
|
||||
|
||||
func (x *CommentItem) GetIdentity() string {
|
||||
@@ -161,7 +162,7 @@ type PostActionRequest struct {
|
||||
|
||||
func (x *PostActionRequest) Reset() {
|
||||
*x = PostActionRequest{}
|
||||
mi := &file_post_proto_msgTypes[2]
|
||||
mi := &file_module_social_feed_proto_post_proto_msgTypes[2]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
@@ -173,7 +174,7 @@ func (x *PostActionRequest) String() string {
|
||||
func (*PostActionRequest) ProtoMessage() {}
|
||||
|
||||
func (x *PostActionRequest) ProtoReflect() protoreflect.Message {
|
||||
mi := &file_post_proto_msgTypes[2]
|
||||
mi := &file_module_social_feed_proto_post_proto_msgTypes[2]
|
||||
if x != nil {
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
if ms.LoadMessageInfo() == nil {
|
||||
@@ -186,7 +187,7 @@ func (x *PostActionRequest) ProtoReflect() protoreflect.Message {
|
||||
|
||||
// Deprecated: Use PostActionRequest.ProtoReflect.Descriptor instead.
|
||||
func (*PostActionRequest) Descriptor() ([]byte, []int) {
|
||||
return file_post_proto_rawDescGZIP(), []int{2}
|
||||
return file_module_social_feed_proto_post_proto_rawDescGZIP(), []int{2}
|
||||
}
|
||||
|
||||
func (x *PostActionRequest) GetActionOp() string {
|
||||
@@ -210,12 +211,11 @@ func (x *PostActionRequest) GetIdentity() string {
|
||||
return ""
|
||||
}
|
||||
|
||||
var File_post_proto protoreflect.FileDescriptor
|
||||
var File_module_social_feed_proto_post_proto protoreflect.FileDescriptor
|
||||
|
||||
const file_post_proto_rawDesc = "" +
|
||||
const file_module_social_feed_proto_post_proto_rawDesc = "" +
|
||||
"\n" +
|
||||
"\x16" +
|
||||
"social/feed/post.proto\x12\x04feed\x1a\x11feed/blocks.proto\"O\n" +
|
||||
"#module/social/feed/proto/post.proto\x12\x04feed\x1a\x15protobuf/blocks.proto\"O\n" +
|
||||
"\x10CommentListReply\x12%\n" +
|
||||
"\x04list\x18\x01 \x03(\v2\x11.feed.CommentItemR\x04list\x12\x14\n" +
|
||||
"\x05total\x18\x02 \x01(\x03R\x05total\"\xc1\x01\n" +
|
||||
@@ -230,60 +230,60 @@ const file_post_proto_rawDesc = "" +
|
||||
"\taction_op\x18\x01 \x01(\tR\bactionOp\x12\x1f\n" +
|
||||
"\vaction_type\x18\x02 \x01(\tR\n" +
|
||||
"actionType\x12\x1a\n" +
|
||||
"\bidentity\x18\x03 \x01(\tR\bidentity2\xb0\x03\n" +
|
||||
"\x04Post\x122\n" +
|
||||
"\x05Fetch\x12\x12.feed.FetchRequest\x1a\x13.feed.PostListReply\"\x00\x12-\n" +
|
||||
"\x06Create\x12\x0e.feed.PostItem\x1a\x11.feed.StatusReply\"\x00\x12-\n" +
|
||||
"\x06Change\x12\x0e.feed.PostItem\x1a\x11.feed.StatusReply\"\x00\x121\n" +
|
||||
"\x06Remove\x12\x12.feed.IdentRequest\x1a\x11.feed.StatusReply\"\x00\x12;\n" +
|
||||
"\vCommentList\x12\x12.feed.FetchRequest\x1a\x16.feed.CommentListReply\"\x00\x124\n" +
|
||||
"\bidentity\x18\x03 \x01(\tR\bidentity2\xee\x03\n" +
|
||||
"\x04Post\x12:\n" +
|
||||
"\x05Fetch\x12\x14.blocks.FetchRequest\x1a\x19.blocks.FeedPostListReply\"\x00\x129\n" +
|
||||
"\x06Create\x12\x14.blocks.FeedPostItem\x1a\x17.blocks.DataStatusReply\"\x00\x129\n" +
|
||||
"\x06Change\x12\x14.blocks.FeedPostItem\x1a\x17.blocks.DataStatusReply\"\x00\x129\n" +
|
||||
"\x06Remove\x12\x14.blocks.IdentRequest\x1a\x17.blocks.DataStatusReply\"\x00\x12=\n" +
|
||||
"\vCommentList\x12\x14.blocks.FetchRequest\x1a\x16.feed.CommentListReply\"\x00\x12:\n" +
|
||||
"\n" +
|
||||
"AddComment\x12\x11.feed.CommentItem\x1a\x11.feed.StatusReply\"\x00\x128\n" +
|
||||
"\rDeleteComment\x12\x12.feed.IdentRequest\x1a\x11.feed.StatusReply\"\x00\x126\n" +
|
||||
"\x06Action\x12\x17.feed.PostActionRequest\x1a\x11.feed.StatusReply\"\x00B\bZ\x06.;feedb\x06proto3"
|
||||
"AddComment\x12\x11.feed.CommentItem\x1a\x17.blocks.DataStatusReply\"\x00\x12@\n" +
|
||||
"\rDeleteComment\x12\x14.blocks.IdentRequest\x1a\x17.blocks.DataStatusReply\"\x00\x12<\n" +
|
||||
"\x06Action\x12\x17.feed.PostActionRequest\x1a\x17.blocks.DataStatusReply\"\x00B%Z#bsm/full/module/social/feed/pb;feedb\x06proto3"
|
||||
|
||||
var (
|
||||
file_post_proto_rawDescOnce sync.Once
|
||||
file_post_proto_rawDescData []byte
|
||||
file_module_social_feed_proto_post_proto_rawDescOnce sync.Once
|
||||
file_module_social_feed_proto_post_proto_rawDescData []byte
|
||||
)
|
||||
|
||||
func file_post_proto_rawDescGZIP() []byte {
|
||||
file_post_proto_rawDescOnce.Do(func() {
|
||||
file_post_proto_rawDescData = protoimpl.X.CompressGZIP(unsafe.Slice(unsafe.StringData(file_post_proto_rawDesc), len(file_post_proto_rawDesc)))
|
||||
func file_module_social_feed_proto_post_proto_rawDescGZIP() []byte {
|
||||
file_module_social_feed_proto_post_proto_rawDescOnce.Do(func() {
|
||||
file_module_social_feed_proto_post_proto_rawDescData = protoimpl.X.CompressGZIP(unsafe.Slice(unsafe.StringData(file_module_social_feed_proto_post_proto_rawDesc), len(file_module_social_feed_proto_post_proto_rawDesc)))
|
||||
})
|
||||
return file_post_proto_rawDescData
|
||||
return file_module_social_feed_proto_post_proto_rawDescData
|
||||
}
|
||||
|
||||
var file_post_proto_msgTypes = make([]protoimpl.MessageInfo, 3)
|
||||
var file_post_proto_goTypes = []any{
|
||||
(*CommentListReply)(nil), // 0: feed.CommentListReply
|
||||
(*CommentItem)(nil), // 1: feed.CommentItem
|
||||
(*PostActionRequest)(nil), // 2: feed.PostActionRequest
|
||||
(*FetchRequest)(nil), // 3: feed.FetchRequest
|
||||
(*PostItem)(nil), // 4: feed.PostItem
|
||||
(*IdentRequest)(nil), // 5: feed.IdentRequest
|
||||
(*PostListReply)(nil), // 6: feed.PostListReply
|
||||
(*StatusReply)(nil), // 7: feed.StatusReply
|
||||
var file_module_social_feed_proto_post_proto_msgTypes = make([]protoimpl.MessageInfo, 3)
|
||||
var file_module_social_feed_proto_post_proto_goTypes = []any{
|
||||
(*CommentListReply)(nil), // 0: feed.CommentListReply
|
||||
(*CommentItem)(nil), // 1: feed.CommentItem
|
||||
(*PostActionRequest)(nil), // 2: feed.PostActionRequest
|
||||
(*protobuf.FetchRequest)(nil), // 3: blocks.FetchRequest
|
||||
(*protobuf.FeedPostItem)(nil), // 4: blocks.FeedPostItem
|
||||
(*protobuf.IdentRequest)(nil), // 5: blocks.IdentRequest
|
||||
(*protobuf.FeedPostListReply)(nil), // 6: blocks.FeedPostListReply
|
||||
(*protobuf.DataStatusReply)(nil), // 7: blocks.DataStatusReply
|
||||
}
|
||||
var file_post_proto_depIdxs = []int32{
|
||||
var file_module_social_feed_proto_post_proto_depIdxs = []int32{
|
||||
1, // 0: feed.CommentListReply.list:type_name -> feed.CommentItem
|
||||
1, // 1: feed.CommentItem.sub_comment:type_name -> feed.CommentItem
|
||||
3, // 2: feed.Post.Fetch:input_type -> feed.FetchRequest
|
||||
4, // 3: feed.Post.Create:input_type -> feed.PostItem
|
||||
4, // 4: feed.Post.Change:input_type -> feed.PostItem
|
||||
5, // 5: feed.Post.Remove:input_type -> feed.IdentRequest
|
||||
3, // 6: feed.Post.CommentList:input_type -> feed.FetchRequest
|
||||
3, // 2: feed.Post.Fetch:input_type -> blocks.FetchRequest
|
||||
4, // 3: feed.Post.Create:input_type -> blocks.FeedPostItem
|
||||
4, // 4: feed.Post.Change:input_type -> blocks.FeedPostItem
|
||||
5, // 5: feed.Post.Remove:input_type -> blocks.IdentRequest
|
||||
3, // 6: feed.Post.CommentList:input_type -> blocks.FetchRequest
|
||||
1, // 7: feed.Post.AddComment:input_type -> feed.CommentItem
|
||||
5, // 8: feed.Post.DeleteComment:input_type -> feed.IdentRequest
|
||||
5, // 8: feed.Post.DeleteComment:input_type -> blocks.IdentRequest
|
||||
2, // 9: feed.Post.Action:input_type -> feed.PostActionRequest
|
||||
6, // 10: feed.Post.Fetch:output_type -> feed.PostListReply
|
||||
7, // 11: feed.Post.Create:output_type -> feed.StatusReply
|
||||
7, // 12: feed.Post.Change:output_type -> feed.StatusReply
|
||||
7, // 13: feed.Post.Remove:output_type -> feed.StatusReply
|
||||
6, // 10: feed.Post.Fetch:output_type -> blocks.FeedPostListReply
|
||||
7, // 11: feed.Post.Create:output_type -> blocks.DataStatusReply
|
||||
7, // 12: feed.Post.Change:output_type -> blocks.DataStatusReply
|
||||
7, // 13: feed.Post.Remove:output_type -> blocks.DataStatusReply
|
||||
0, // 14: feed.Post.CommentList:output_type -> feed.CommentListReply
|
||||
7, // 15: feed.Post.AddComment:output_type -> feed.StatusReply
|
||||
7, // 16: feed.Post.DeleteComment:output_type -> feed.StatusReply
|
||||
7, // 17: feed.Post.Action:output_type -> feed.StatusReply
|
||||
7, // 15: feed.Post.AddComment:output_type -> blocks.DataStatusReply
|
||||
7, // 16: feed.Post.DeleteComment:output_type -> blocks.DataStatusReply
|
||||
7, // 17: feed.Post.Action:output_type -> blocks.DataStatusReply
|
||||
10, // [10:18] is the sub-list for method output_type
|
||||
2, // [2:10] is the sub-list for method input_type
|
||||
2, // [2:2] is the sub-list for extension type_name
|
||||
@@ -291,27 +291,26 @@ var file_post_proto_depIdxs = []int32{
|
||||
0, // [0:2] is the sub-list for field type_name
|
||||
}
|
||||
|
||||
func init() { file_post_proto_init() }
|
||||
func file_post_proto_init() {
|
||||
if File_post_proto != nil {
|
||||
func init() { file_module_social_feed_proto_post_proto_init() }
|
||||
func file_module_social_feed_proto_post_proto_init() {
|
||||
if File_module_social_feed_proto_post_proto != nil {
|
||||
return
|
||||
}
|
||||
file_blocks_proto_init()
|
||||
type x struct{}
|
||||
out := protoimpl.TypeBuilder{
|
||||
File: protoimpl.DescBuilder{
|
||||
GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
|
||||
RawDescriptor: unsafe.Slice(unsafe.StringData(file_post_proto_rawDesc), len(file_post_proto_rawDesc)),
|
||||
RawDescriptor: unsafe.Slice(unsafe.StringData(file_module_social_feed_proto_post_proto_rawDesc), len(file_module_social_feed_proto_post_proto_rawDesc)),
|
||||
NumEnums: 0,
|
||||
NumMessages: 3,
|
||||
NumExtensions: 0,
|
||||
NumServices: 1,
|
||||
},
|
||||
GoTypes: file_post_proto_goTypes,
|
||||
DependencyIndexes: file_post_proto_depIdxs,
|
||||
MessageInfos: file_post_proto_msgTypes,
|
||||
GoTypes: file_module_social_feed_proto_post_proto_goTypes,
|
||||
DependencyIndexes: file_module_social_feed_proto_post_proto_depIdxs,
|
||||
MessageInfos: file_module_social_feed_proto_post_proto_msgTypes,
|
||||
}.Build()
|
||||
File_post_proto = out.File
|
||||
file_post_proto_goTypes = nil
|
||||
file_post_proto_depIdxs = nil
|
||||
File_module_social_feed_proto_post_proto = out.File
|
||||
file_module_social_feed_proto_post_proto_goTypes = nil
|
||||
file_module_social_feed_proto_post_proto_depIdxs = nil
|
||||
}
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
// Code generated by protoc-gen-grpc-gateway. DO NOT EDIT.
|
||||
// source: post.proto
|
||||
// source: module/social/feed/proto/post.proto
|
||||
|
||||
/*
|
||||
Package feed is a reverse proxy.
|
||||
@@ -9,6 +9,7 @@ It translates gRPC into RESTful JSON APIs.
|
||||
package feed
|
||||
|
||||
import (
|
||||
"bsm/full/protobuf"
|
||||
"context"
|
||||
"errors"
|
||||
"io"
|
||||
@@ -37,7 +38,7 @@ var (
|
||||
|
||||
func request_Post_Fetch_0(ctx context.Context, marshaler runtime.Marshaler, client PostClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
|
||||
var (
|
||||
protoReq FetchRequest
|
||||
protoReq blocks.FetchRequest
|
||||
metadata runtime.ServerMetadata
|
||||
)
|
||||
if err := marshaler.NewDecoder(req.Body).Decode(&protoReq); err != nil && !errors.Is(err, io.EOF) {
|
||||
@@ -52,7 +53,7 @@ func request_Post_Fetch_0(ctx context.Context, marshaler runtime.Marshaler, clie
|
||||
|
||||
func local_request_Post_Fetch_0(ctx context.Context, marshaler runtime.Marshaler, server PostServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
|
||||
var (
|
||||
protoReq FetchRequest
|
||||
protoReq blocks.FetchRequest
|
||||
metadata runtime.ServerMetadata
|
||||
)
|
||||
if err := marshaler.NewDecoder(req.Body).Decode(&protoReq); err != nil && !errors.Is(err, io.EOF) {
|
||||
@@ -64,7 +65,7 @@ func local_request_Post_Fetch_0(ctx context.Context, marshaler runtime.Marshaler
|
||||
|
||||
func request_Post_Create_0(ctx context.Context, marshaler runtime.Marshaler, client PostClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
|
||||
var (
|
||||
protoReq PostItem
|
||||
protoReq blocks.FeedPostItem
|
||||
metadata runtime.ServerMetadata
|
||||
)
|
||||
if err := marshaler.NewDecoder(req.Body).Decode(&protoReq); err != nil && !errors.Is(err, io.EOF) {
|
||||
@@ -79,7 +80,7 @@ func request_Post_Create_0(ctx context.Context, marshaler runtime.Marshaler, cli
|
||||
|
||||
func local_request_Post_Create_0(ctx context.Context, marshaler runtime.Marshaler, server PostServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
|
||||
var (
|
||||
protoReq PostItem
|
||||
protoReq blocks.FeedPostItem
|
||||
metadata runtime.ServerMetadata
|
||||
)
|
||||
if err := marshaler.NewDecoder(req.Body).Decode(&protoReq); err != nil && !errors.Is(err, io.EOF) {
|
||||
@@ -91,7 +92,7 @@ func local_request_Post_Create_0(ctx context.Context, marshaler runtime.Marshale
|
||||
|
||||
func request_Post_Change_0(ctx context.Context, marshaler runtime.Marshaler, client PostClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
|
||||
var (
|
||||
protoReq PostItem
|
||||
protoReq blocks.FeedPostItem
|
||||
metadata runtime.ServerMetadata
|
||||
)
|
||||
if err := marshaler.NewDecoder(req.Body).Decode(&protoReq); err != nil && !errors.Is(err, io.EOF) {
|
||||
@@ -106,7 +107,7 @@ func request_Post_Change_0(ctx context.Context, marshaler runtime.Marshaler, cli
|
||||
|
||||
func local_request_Post_Change_0(ctx context.Context, marshaler runtime.Marshaler, server PostServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
|
||||
var (
|
||||
protoReq PostItem
|
||||
protoReq blocks.FeedPostItem
|
||||
metadata runtime.ServerMetadata
|
||||
)
|
||||
if err := marshaler.NewDecoder(req.Body).Decode(&protoReq); err != nil && !errors.Is(err, io.EOF) {
|
||||
@@ -118,7 +119,7 @@ func local_request_Post_Change_0(ctx context.Context, marshaler runtime.Marshale
|
||||
|
||||
func request_Post_Remove_0(ctx context.Context, marshaler runtime.Marshaler, client PostClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
|
||||
var (
|
||||
protoReq IdentRequest
|
||||
protoReq blocks.IdentRequest
|
||||
metadata runtime.ServerMetadata
|
||||
)
|
||||
if err := marshaler.NewDecoder(req.Body).Decode(&protoReq); err != nil && !errors.Is(err, io.EOF) {
|
||||
@@ -133,7 +134,7 @@ func request_Post_Remove_0(ctx context.Context, marshaler runtime.Marshaler, cli
|
||||
|
||||
func local_request_Post_Remove_0(ctx context.Context, marshaler runtime.Marshaler, server PostServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
|
||||
var (
|
||||
protoReq IdentRequest
|
||||
protoReq blocks.IdentRequest
|
||||
metadata runtime.ServerMetadata
|
||||
)
|
||||
if err := marshaler.NewDecoder(req.Body).Decode(&protoReq); err != nil && !errors.Is(err, io.EOF) {
|
||||
@@ -145,7 +146,7 @@ func local_request_Post_Remove_0(ctx context.Context, marshaler runtime.Marshale
|
||||
|
||||
func request_Post_CommentList_0(ctx context.Context, marshaler runtime.Marshaler, client PostClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
|
||||
var (
|
||||
protoReq FetchRequest
|
||||
protoReq blocks.FetchRequest
|
||||
metadata runtime.ServerMetadata
|
||||
)
|
||||
if err := marshaler.NewDecoder(req.Body).Decode(&protoReq); err != nil && !errors.Is(err, io.EOF) {
|
||||
@@ -160,7 +161,7 @@ func request_Post_CommentList_0(ctx context.Context, marshaler runtime.Marshaler
|
||||
|
||||
func local_request_Post_CommentList_0(ctx context.Context, marshaler runtime.Marshaler, server PostServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
|
||||
var (
|
||||
protoReq FetchRequest
|
||||
protoReq blocks.FetchRequest
|
||||
metadata runtime.ServerMetadata
|
||||
)
|
||||
if err := marshaler.NewDecoder(req.Body).Decode(&protoReq); err != nil && !errors.Is(err, io.EOF) {
|
||||
@@ -199,7 +200,7 @@ func local_request_Post_AddComment_0(ctx context.Context, marshaler runtime.Mars
|
||||
|
||||
func request_Post_DeleteComment_0(ctx context.Context, marshaler runtime.Marshaler, client PostClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
|
||||
var (
|
||||
protoReq IdentRequest
|
||||
protoReq blocks.IdentRequest
|
||||
metadata runtime.ServerMetadata
|
||||
)
|
||||
if err := marshaler.NewDecoder(req.Body).Decode(&protoReq); err != nil && !errors.Is(err, io.EOF) {
|
||||
@@ -214,7 +215,7 @@ func request_Post_DeleteComment_0(ctx context.Context, marshaler runtime.Marshal
|
||||
|
||||
func local_request_Post_DeleteComment_0(ctx context.Context, marshaler runtime.Marshaler, server PostServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
|
||||
var (
|
||||
protoReq IdentRequest
|
||||
protoReq blocks.IdentRequest
|
||||
metadata runtime.ServerMetadata
|
||||
)
|
||||
if err := marshaler.NewDecoder(req.Body).Decode(&protoReq); err != nil && !errors.Is(err, io.EOF) {
|
||||
|
||||
@@ -1,12 +1,13 @@
|
||||
// Code generated by protoc-gen-go-grpc. DO NOT EDIT.
|
||||
// versions:
|
||||
// - protoc-gen-go-grpc v1.5.1
|
||||
// - protoc (unknown)
|
||||
// source: post.proto
|
||||
// - protoc-gen-go-grpc v1.6.2
|
||||
// - protoc v7.35.0
|
||||
// source: module/social/feed/proto/post.proto
|
||||
|
||||
package feed
|
||||
|
||||
import (
|
||||
protobuf "bsm/full/protobuf"
|
||||
context "context"
|
||||
grpc "google.golang.org/grpc"
|
||||
codes "google.golang.org/grpc/codes"
|
||||
@@ -36,21 +37,21 @@ const (
|
||||
// 推文相关操作
|
||||
type PostClient interface {
|
||||
// 推文列表
|
||||
Fetch(ctx context.Context, in *FetchRequest, opts ...grpc.CallOption) (*PostListReply, error)
|
||||
Fetch(ctx context.Context, in *protobuf.FetchRequest, opts ...grpc.CallOption) (*protobuf.FeedPostListReply, error)
|
||||
// 新建推文
|
||||
Create(ctx context.Context, in *PostItem, opts ...grpc.CallOption) (*StatusReply, error)
|
||||
Create(ctx context.Context, in *protobuf.FeedPostItem, opts ...grpc.CallOption) (*protobuf.DataStatusReply, error)
|
||||
// 修改推文
|
||||
Change(ctx context.Context, in *PostItem, opts ...grpc.CallOption) (*StatusReply, error)
|
||||
Change(ctx context.Context, in *protobuf.FeedPostItem, opts ...grpc.CallOption) (*protobuf.DataStatusReply, error)
|
||||
// 删除推文
|
||||
Remove(ctx context.Context, in *IdentRequest, opts ...grpc.CallOption) (*StatusReply, error)
|
||||
Remove(ctx context.Context, in *protobuf.IdentRequest, opts ...grpc.CallOption) (*protobuf.DataStatusReply, error)
|
||||
// 评论列表
|
||||
CommentList(ctx context.Context, in *FetchRequest, opts ...grpc.CallOption) (*CommentListReply, error)
|
||||
CommentList(ctx context.Context, in *protobuf.FetchRequest, opts ...grpc.CallOption) (*CommentListReply, error)
|
||||
// 新建评论
|
||||
AddComment(ctx context.Context, in *CommentItem, opts ...grpc.CallOption) (*StatusReply, error)
|
||||
AddComment(ctx context.Context, in *CommentItem, opts ...grpc.CallOption) (*protobuf.DataStatusReply, error)
|
||||
// 删除评论
|
||||
DeleteComment(ctx context.Context, in *IdentRequest, opts ...grpc.CallOption) (*StatusReply, error)
|
||||
DeleteComment(ctx context.Context, in *protobuf.IdentRequest, opts ...grpc.CallOption) (*protobuf.DataStatusReply, error)
|
||||
// 计数操作
|
||||
Action(ctx context.Context, in *PostActionRequest, opts ...grpc.CallOption) (*StatusReply, error)
|
||||
Action(ctx context.Context, in *PostActionRequest, opts ...grpc.CallOption) (*protobuf.DataStatusReply, error)
|
||||
}
|
||||
|
||||
type postClient struct {
|
||||
@@ -61,9 +62,9 @@ func NewPostClient(cc grpc.ClientConnInterface) PostClient {
|
||||
return &postClient{cc}
|
||||
}
|
||||
|
||||
func (c *postClient) Fetch(ctx context.Context, in *FetchRequest, opts ...grpc.CallOption) (*PostListReply, error) {
|
||||
func (c *postClient) Fetch(ctx context.Context, in *protobuf.FetchRequest, opts ...grpc.CallOption) (*protobuf.FeedPostListReply, error) {
|
||||
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
|
||||
out := new(PostListReply)
|
||||
out := new(protobuf.FeedPostListReply)
|
||||
err := c.cc.Invoke(ctx, Post_Fetch_FullMethodName, in, out, cOpts...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
@@ -71,9 +72,9 @@ func (c *postClient) Fetch(ctx context.Context, in *FetchRequest, opts ...grpc.C
|
||||
return out, nil
|
||||
}
|
||||
|
||||
func (c *postClient) Create(ctx context.Context, in *PostItem, opts ...grpc.CallOption) (*StatusReply, error) {
|
||||
func (c *postClient) Create(ctx context.Context, in *protobuf.FeedPostItem, opts ...grpc.CallOption) (*protobuf.DataStatusReply, error) {
|
||||
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
|
||||
out := new(StatusReply)
|
||||
out := new(protobuf.DataStatusReply)
|
||||
err := c.cc.Invoke(ctx, Post_Create_FullMethodName, in, out, cOpts...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
@@ -81,9 +82,9 @@ func (c *postClient) Create(ctx context.Context, in *PostItem, opts ...grpc.Call
|
||||
return out, nil
|
||||
}
|
||||
|
||||
func (c *postClient) Change(ctx context.Context, in *PostItem, opts ...grpc.CallOption) (*StatusReply, error) {
|
||||
func (c *postClient) Change(ctx context.Context, in *protobuf.FeedPostItem, opts ...grpc.CallOption) (*protobuf.DataStatusReply, error) {
|
||||
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
|
||||
out := new(StatusReply)
|
||||
out := new(protobuf.DataStatusReply)
|
||||
err := c.cc.Invoke(ctx, Post_Change_FullMethodName, in, out, cOpts...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
@@ -91,9 +92,9 @@ func (c *postClient) Change(ctx context.Context, in *PostItem, opts ...grpc.Call
|
||||
return out, nil
|
||||
}
|
||||
|
||||
func (c *postClient) Remove(ctx context.Context, in *IdentRequest, opts ...grpc.CallOption) (*StatusReply, error) {
|
||||
func (c *postClient) Remove(ctx context.Context, in *protobuf.IdentRequest, opts ...grpc.CallOption) (*protobuf.DataStatusReply, error) {
|
||||
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
|
||||
out := new(StatusReply)
|
||||
out := new(protobuf.DataStatusReply)
|
||||
err := c.cc.Invoke(ctx, Post_Remove_FullMethodName, in, out, cOpts...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
@@ -101,7 +102,7 @@ func (c *postClient) Remove(ctx context.Context, in *IdentRequest, opts ...grpc.
|
||||
return out, nil
|
||||
}
|
||||
|
||||
func (c *postClient) CommentList(ctx context.Context, in *FetchRequest, opts ...grpc.CallOption) (*CommentListReply, error) {
|
||||
func (c *postClient) CommentList(ctx context.Context, in *protobuf.FetchRequest, opts ...grpc.CallOption) (*CommentListReply, error) {
|
||||
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
|
||||
out := new(CommentListReply)
|
||||
err := c.cc.Invoke(ctx, Post_CommentList_FullMethodName, in, out, cOpts...)
|
||||
@@ -111,9 +112,9 @@ func (c *postClient) CommentList(ctx context.Context, in *FetchRequest, opts ...
|
||||
return out, nil
|
||||
}
|
||||
|
||||
func (c *postClient) AddComment(ctx context.Context, in *CommentItem, opts ...grpc.CallOption) (*StatusReply, error) {
|
||||
func (c *postClient) AddComment(ctx context.Context, in *CommentItem, opts ...grpc.CallOption) (*protobuf.DataStatusReply, error) {
|
||||
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
|
||||
out := new(StatusReply)
|
||||
out := new(protobuf.DataStatusReply)
|
||||
err := c.cc.Invoke(ctx, Post_AddComment_FullMethodName, in, out, cOpts...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
@@ -121,9 +122,9 @@ func (c *postClient) AddComment(ctx context.Context, in *CommentItem, opts ...gr
|
||||
return out, nil
|
||||
}
|
||||
|
||||
func (c *postClient) DeleteComment(ctx context.Context, in *IdentRequest, opts ...grpc.CallOption) (*StatusReply, error) {
|
||||
func (c *postClient) DeleteComment(ctx context.Context, in *protobuf.IdentRequest, opts ...grpc.CallOption) (*protobuf.DataStatusReply, error) {
|
||||
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
|
||||
out := new(StatusReply)
|
||||
out := new(protobuf.DataStatusReply)
|
||||
err := c.cc.Invoke(ctx, Post_DeleteComment_FullMethodName, in, out, cOpts...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
@@ -131,9 +132,9 @@ func (c *postClient) DeleteComment(ctx context.Context, in *IdentRequest, opts .
|
||||
return out, nil
|
||||
}
|
||||
|
||||
func (c *postClient) Action(ctx context.Context, in *PostActionRequest, opts ...grpc.CallOption) (*StatusReply, error) {
|
||||
func (c *postClient) Action(ctx context.Context, in *PostActionRequest, opts ...grpc.CallOption) (*protobuf.DataStatusReply, error) {
|
||||
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
|
||||
out := new(StatusReply)
|
||||
out := new(protobuf.DataStatusReply)
|
||||
err := c.cc.Invoke(ctx, Post_Action_FullMethodName, in, out, cOpts...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
@@ -142,63 +143,61 @@ func (c *postClient) Action(ctx context.Context, in *PostActionRequest, opts ...
|
||||
}
|
||||
|
||||
// PostServer is the server API for Post service.
|
||||
// All implementations must embed UnimplementedPostServer
|
||||
// All implementations should embed UnimplementedPostServer
|
||||
// for forward compatibility.
|
||||
//
|
||||
// 推文相关操作
|
||||
type PostServer interface {
|
||||
// 推文列表
|
||||
Fetch(context.Context, *FetchRequest) (*PostListReply, error)
|
||||
Fetch(context.Context, *protobuf.FetchRequest) (*protobuf.FeedPostListReply, error)
|
||||
// 新建推文
|
||||
Create(context.Context, *PostItem) (*StatusReply, error)
|
||||
Create(context.Context, *protobuf.FeedPostItem) (*protobuf.DataStatusReply, error)
|
||||
// 修改推文
|
||||
Change(context.Context, *PostItem) (*StatusReply, error)
|
||||
Change(context.Context, *protobuf.FeedPostItem) (*protobuf.DataStatusReply, error)
|
||||
// 删除推文
|
||||
Remove(context.Context, *IdentRequest) (*StatusReply, error)
|
||||
Remove(context.Context, *protobuf.IdentRequest) (*protobuf.DataStatusReply, error)
|
||||
// 评论列表
|
||||
CommentList(context.Context, *FetchRequest) (*CommentListReply, error)
|
||||
CommentList(context.Context, *protobuf.FetchRequest) (*CommentListReply, error)
|
||||
// 新建评论
|
||||
AddComment(context.Context, *CommentItem) (*StatusReply, error)
|
||||
AddComment(context.Context, *CommentItem) (*protobuf.DataStatusReply, error)
|
||||
// 删除评论
|
||||
DeleteComment(context.Context, *IdentRequest) (*StatusReply, error)
|
||||
DeleteComment(context.Context, *protobuf.IdentRequest) (*protobuf.DataStatusReply, error)
|
||||
// 计数操作
|
||||
Action(context.Context, *PostActionRequest) (*StatusReply, error)
|
||||
mustEmbedUnimplementedPostServer()
|
||||
Action(context.Context, *PostActionRequest) (*protobuf.DataStatusReply, error)
|
||||
}
|
||||
|
||||
// UnimplementedPostServer must be embedded to have
|
||||
// UnimplementedPostServer should be embedded to have
|
||||
// forward compatible implementations.
|
||||
//
|
||||
// NOTE: this should be embedded by value instead of pointer to avoid a nil
|
||||
// pointer dereference when methods are called.
|
||||
type UnimplementedPostServer struct{}
|
||||
|
||||
func (UnimplementedPostServer) Fetch(context.Context, *FetchRequest) (*PostListReply, error) {
|
||||
return nil, status.Errorf(codes.Unimplemented, "method Fetch not implemented")
|
||||
func (UnimplementedPostServer) Fetch(context.Context, *protobuf.FetchRequest) (*protobuf.FeedPostListReply, error) {
|
||||
return nil, status.Error(codes.Unimplemented, "method Fetch not implemented")
|
||||
}
|
||||
func (UnimplementedPostServer) Create(context.Context, *PostItem) (*StatusReply, error) {
|
||||
return nil, status.Errorf(codes.Unimplemented, "method Create not implemented")
|
||||
func (UnimplementedPostServer) Create(context.Context, *protobuf.FeedPostItem) (*protobuf.DataStatusReply, error) {
|
||||
return nil, status.Error(codes.Unimplemented, "method Create not implemented")
|
||||
}
|
||||
func (UnimplementedPostServer) Change(context.Context, *PostItem) (*StatusReply, error) {
|
||||
return nil, status.Errorf(codes.Unimplemented, "method Change not implemented")
|
||||
func (UnimplementedPostServer) Change(context.Context, *protobuf.FeedPostItem) (*protobuf.DataStatusReply, error) {
|
||||
return nil, status.Error(codes.Unimplemented, "method Change not implemented")
|
||||
}
|
||||
func (UnimplementedPostServer) Remove(context.Context, *IdentRequest) (*StatusReply, error) {
|
||||
return nil, status.Errorf(codes.Unimplemented, "method Remove not implemented")
|
||||
func (UnimplementedPostServer) Remove(context.Context, *protobuf.IdentRequest) (*protobuf.DataStatusReply, error) {
|
||||
return nil, status.Error(codes.Unimplemented, "method Remove not implemented")
|
||||
}
|
||||
func (UnimplementedPostServer) CommentList(context.Context, *FetchRequest) (*CommentListReply, error) {
|
||||
return nil, status.Errorf(codes.Unimplemented, "method CommentList not implemented")
|
||||
func (UnimplementedPostServer) CommentList(context.Context, *protobuf.FetchRequest) (*CommentListReply, error) {
|
||||
return nil, status.Error(codes.Unimplemented, "method CommentList not implemented")
|
||||
}
|
||||
func (UnimplementedPostServer) AddComment(context.Context, *CommentItem) (*StatusReply, error) {
|
||||
return nil, status.Errorf(codes.Unimplemented, "method AddComment not implemented")
|
||||
func (UnimplementedPostServer) AddComment(context.Context, *CommentItem) (*protobuf.DataStatusReply, error) {
|
||||
return nil, status.Error(codes.Unimplemented, "method AddComment not implemented")
|
||||
}
|
||||
func (UnimplementedPostServer) DeleteComment(context.Context, *IdentRequest) (*StatusReply, error) {
|
||||
return nil, status.Errorf(codes.Unimplemented, "method DeleteComment not implemented")
|
||||
func (UnimplementedPostServer) DeleteComment(context.Context, *protobuf.IdentRequest) (*protobuf.DataStatusReply, error) {
|
||||
return nil, status.Error(codes.Unimplemented, "method DeleteComment not implemented")
|
||||
}
|
||||
func (UnimplementedPostServer) Action(context.Context, *PostActionRequest) (*StatusReply, error) {
|
||||
return nil, status.Errorf(codes.Unimplemented, "method Action not implemented")
|
||||
func (UnimplementedPostServer) Action(context.Context, *PostActionRequest) (*protobuf.DataStatusReply, error) {
|
||||
return nil, status.Error(codes.Unimplemented, "method Action not implemented")
|
||||
}
|
||||
func (UnimplementedPostServer) mustEmbedUnimplementedPostServer() {}
|
||||
func (UnimplementedPostServer) testEmbeddedByValue() {}
|
||||
func (UnimplementedPostServer) testEmbeddedByValue() {}
|
||||
|
||||
// UnsafePostServer may be embedded to opt out of forward compatibility for this service.
|
||||
// Use of this interface is not recommended, as added methods to PostServer will
|
||||
@@ -208,7 +207,7 @@ type UnsafePostServer interface {
|
||||
}
|
||||
|
||||
func RegisterPostServer(s grpc.ServiceRegistrar, srv PostServer) {
|
||||
// If the following call pancis, it indicates UnimplementedPostServer was
|
||||
// If the following call panics, it indicates UnimplementedPostServer was
|
||||
// embedded by pointer and is nil. This will cause panics if an
|
||||
// unimplemented method is ever invoked, so we test this at initialization
|
||||
// time to prevent it from happening at runtime later due to I/O.
|
||||
@@ -219,7 +218,7 @@ func RegisterPostServer(s grpc.ServiceRegistrar, srv PostServer) {
|
||||
}
|
||||
|
||||
func _Post_Fetch_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
||||
in := new(FetchRequest)
|
||||
in := new(protobuf.FetchRequest)
|
||||
if err := dec(in); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
@@ -231,13 +230,13 @@ func _Post_Fetch_Handler(srv interface{}, ctx context.Context, dec func(interfac
|
||||
FullMethod: Post_Fetch_FullMethodName,
|
||||
}
|
||||
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||
return srv.(PostServer).Fetch(ctx, req.(*FetchRequest))
|
||||
return srv.(PostServer).Fetch(ctx, req.(*protobuf.FetchRequest))
|
||||
}
|
||||
return interceptor(ctx, in, info, handler)
|
||||
}
|
||||
|
||||
func _Post_Create_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
||||
in := new(PostItem)
|
||||
in := new(protobuf.FeedPostItem)
|
||||
if err := dec(in); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
@@ -249,13 +248,13 @@ func _Post_Create_Handler(srv interface{}, ctx context.Context, dec func(interfa
|
||||
FullMethod: Post_Create_FullMethodName,
|
||||
}
|
||||
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||
return srv.(PostServer).Create(ctx, req.(*PostItem))
|
||||
return srv.(PostServer).Create(ctx, req.(*protobuf.FeedPostItem))
|
||||
}
|
||||
return interceptor(ctx, in, info, handler)
|
||||
}
|
||||
|
||||
func _Post_Change_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
||||
in := new(PostItem)
|
||||
in := new(protobuf.FeedPostItem)
|
||||
if err := dec(in); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
@@ -267,13 +266,13 @@ func _Post_Change_Handler(srv interface{}, ctx context.Context, dec func(interfa
|
||||
FullMethod: Post_Change_FullMethodName,
|
||||
}
|
||||
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||
return srv.(PostServer).Change(ctx, req.(*PostItem))
|
||||
return srv.(PostServer).Change(ctx, req.(*protobuf.FeedPostItem))
|
||||
}
|
||||
return interceptor(ctx, in, info, handler)
|
||||
}
|
||||
|
||||
func _Post_Remove_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
||||
in := new(IdentRequest)
|
||||
in := new(protobuf.IdentRequest)
|
||||
if err := dec(in); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
@@ -285,13 +284,13 @@ func _Post_Remove_Handler(srv interface{}, ctx context.Context, dec func(interfa
|
||||
FullMethod: Post_Remove_FullMethodName,
|
||||
}
|
||||
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||
return srv.(PostServer).Remove(ctx, req.(*IdentRequest))
|
||||
return srv.(PostServer).Remove(ctx, req.(*protobuf.IdentRequest))
|
||||
}
|
||||
return interceptor(ctx, in, info, handler)
|
||||
}
|
||||
|
||||
func _Post_CommentList_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
||||
in := new(FetchRequest)
|
||||
in := new(protobuf.FetchRequest)
|
||||
if err := dec(in); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
@@ -303,7 +302,7 @@ func _Post_CommentList_Handler(srv interface{}, ctx context.Context, dec func(in
|
||||
FullMethod: Post_CommentList_FullMethodName,
|
||||
}
|
||||
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||
return srv.(PostServer).CommentList(ctx, req.(*FetchRequest))
|
||||
return srv.(PostServer).CommentList(ctx, req.(*protobuf.FetchRequest))
|
||||
}
|
||||
return interceptor(ctx, in, info, handler)
|
||||
}
|
||||
@@ -327,7 +326,7 @@ func _Post_AddComment_Handler(srv interface{}, ctx context.Context, dec func(int
|
||||
}
|
||||
|
||||
func _Post_DeleteComment_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
||||
in := new(IdentRequest)
|
||||
in := new(protobuf.IdentRequest)
|
||||
if err := dec(in); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
@@ -339,7 +338,7 @@ func _Post_DeleteComment_Handler(srv interface{}, ctx context.Context, dec func(
|
||||
FullMethod: Post_DeleteComment_FullMethodName,
|
||||
}
|
||||
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||
return srv.(PostServer).DeleteComment(ctx, req.(*IdentRequest))
|
||||
return srv.(PostServer).DeleteComment(ctx, req.(*protobuf.IdentRequest))
|
||||
}
|
||||
return interceptor(ctx, in, info, handler)
|
||||
}
|
||||
@@ -403,5 +402,5 @@ var Post_ServiceDesc = grpc.ServiceDesc{
|
||||
},
|
||||
},
|
||||
Streams: []grpc.StreamDesc{},
|
||||
Metadata: "post.proto",
|
||||
Metadata: "module/social/feed/proto/post.proto",
|
||||
}
|
||||
|
||||
@@ -1,12 +1,13 @@
|
||||
// Code generated by protoc-gen-go. DO NOT EDIT.
|
||||
// versions:
|
||||
// protoc-gen-go v1.36.8
|
||||
// protoc (unknown)
|
||||
// source: setting.proto
|
||||
// protoc-gen-go v1.36.11
|
||||
// protoc v7.35.0
|
||||
// source: module/social/feed/proto/setting.proto
|
||||
|
||||
package feed
|
||||
|
||||
import (
|
||||
protobuf "bsm/full/protobuf"
|
||||
protoreflect "google.golang.org/protobuf/reflect/protoreflect"
|
||||
protoimpl "google.golang.org/protobuf/runtime/protoimpl"
|
||||
reflect "reflect"
|
||||
@@ -20,23 +21,23 @@ const (
|
||||
_ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20)
|
||||
)
|
||||
|
||||
var File_setting_proto protoreflect.FileDescriptor
|
||||
var File_module_social_feed_proto_setting_proto protoreflect.FileDescriptor
|
||||
|
||||
const file_setting_proto_rawDesc = "" +
|
||||
const file_module_social_feed_proto_setting_proto_rawDesc = "" +
|
||||
"\n" +
|
||||
"\x19social/feed/setting.proto\x12\x04feed\x1a\x11feed/blocks.proto2S\n" +
|
||||
"\aSetting\x12\"\n" +
|
||||
"\x04Info\x12\v.feed.Empty\x1a\v.feed.Empty\"\x00\x12$\n" +
|
||||
"\x06Rights\x12\v.feed.Empty\x1a\v.feed.Empty\"\x00B\bZ\x06.;feedb\x06proto3"
|
||||
"&module/social/feed/proto/setting.proto\x12\x04feed\x1a\x15protobuf/blocks.proto2[\n" +
|
||||
"\aSetting\x12&\n" +
|
||||
"\x04Info\x12\r.blocks.Empty\x1a\r.blocks.Empty\"\x00\x12(\n" +
|
||||
"\x06Rights\x12\r.blocks.Empty\x1a\r.blocks.Empty\"\x00B%Z#bsm/full/module/social/feed/pb;feedb\x06proto3"
|
||||
|
||||
var file_setting_proto_goTypes = []any{
|
||||
(*Empty)(nil), // 0: feed.Empty
|
||||
var file_module_social_feed_proto_setting_proto_goTypes = []any{
|
||||
(*protobuf.Empty)(nil), // 0: blocks.Empty
|
||||
}
|
||||
var file_setting_proto_depIdxs = []int32{
|
||||
0, // 0: feed.Setting.Info:input_type -> feed.Empty
|
||||
0, // 1: feed.Setting.Rights:input_type -> feed.Empty
|
||||
0, // 2: feed.Setting.Info:output_type -> feed.Empty
|
||||
0, // 3: feed.Setting.Rights:output_type -> feed.Empty
|
||||
var file_module_social_feed_proto_setting_proto_depIdxs = []int32{
|
||||
0, // 0: feed.Setting.Info:input_type -> blocks.Empty
|
||||
0, // 1: feed.Setting.Rights:input_type -> blocks.Empty
|
||||
0, // 2: feed.Setting.Info:output_type -> blocks.Empty
|
||||
0, // 3: feed.Setting.Rights:output_type -> blocks.Empty
|
||||
2, // [2:4] is the sub-list for method output_type
|
||||
0, // [0:2] is the sub-list for method input_type
|
||||
0, // [0:0] is the sub-list for extension type_name
|
||||
@@ -44,26 +45,25 @@ var file_setting_proto_depIdxs = []int32{
|
||||
0, // [0:0] is the sub-list for field type_name
|
||||
}
|
||||
|
||||
func init() { file_setting_proto_init() }
|
||||
func file_setting_proto_init() {
|
||||
if File_setting_proto != nil {
|
||||
func init() { file_module_social_feed_proto_setting_proto_init() }
|
||||
func file_module_social_feed_proto_setting_proto_init() {
|
||||
if File_module_social_feed_proto_setting_proto != nil {
|
||||
return
|
||||
}
|
||||
file_blocks_proto_init()
|
||||
type x struct{}
|
||||
out := protoimpl.TypeBuilder{
|
||||
File: protoimpl.DescBuilder{
|
||||
GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
|
||||
RawDescriptor: unsafe.Slice(unsafe.StringData(file_setting_proto_rawDesc), len(file_setting_proto_rawDesc)),
|
||||
RawDescriptor: unsafe.Slice(unsafe.StringData(file_module_social_feed_proto_setting_proto_rawDesc), len(file_module_social_feed_proto_setting_proto_rawDesc)),
|
||||
NumEnums: 0,
|
||||
NumMessages: 0,
|
||||
NumExtensions: 0,
|
||||
NumServices: 1,
|
||||
},
|
||||
GoTypes: file_setting_proto_goTypes,
|
||||
DependencyIndexes: file_setting_proto_depIdxs,
|
||||
GoTypes: file_module_social_feed_proto_setting_proto_goTypes,
|
||||
DependencyIndexes: file_module_social_feed_proto_setting_proto_depIdxs,
|
||||
}.Build()
|
||||
File_setting_proto = out.File
|
||||
file_setting_proto_goTypes = nil
|
||||
file_setting_proto_depIdxs = nil
|
||||
File_module_social_feed_proto_setting_proto = out.File
|
||||
file_module_social_feed_proto_setting_proto_goTypes = nil
|
||||
file_module_social_feed_proto_setting_proto_depIdxs = nil
|
||||
}
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
// Code generated by protoc-gen-grpc-gateway. DO NOT EDIT.
|
||||
// source: setting.proto
|
||||
// source: module/social/feed/proto/setting.proto
|
||||
|
||||
/*
|
||||
Package feed is a reverse proxy.
|
||||
@@ -9,6 +9,7 @@ It translates gRPC into RESTful JSON APIs.
|
||||
package feed
|
||||
|
||||
import (
|
||||
"bsm/full/protobuf"
|
||||
"context"
|
||||
"errors"
|
||||
"io"
|
||||
@@ -37,7 +38,7 @@ var (
|
||||
|
||||
func request_Setting_Info_0(ctx context.Context, marshaler runtime.Marshaler, client SettingClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
|
||||
var (
|
||||
protoReq Empty
|
||||
protoReq blocks.Empty
|
||||
metadata runtime.ServerMetadata
|
||||
)
|
||||
if err := marshaler.NewDecoder(req.Body).Decode(&protoReq); err != nil && !errors.Is(err, io.EOF) {
|
||||
@@ -52,7 +53,7 @@ func request_Setting_Info_0(ctx context.Context, marshaler runtime.Marshaler, cl
|
||||
|
||||
func local_request_Setting_Info_0(ctx context.Context, marshaler runtime.Marshaler, server SettingServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
|
||||
var (
|
||||
protoReq Empty
|
||||
protoReq blocks.Empty
|
||||
metadata runtime.ServerMetadata
|
||||
)
|
||||
if err := marshaler.NewDecoder(req.Body).Decode(&protoReq); err != nil && !errors.Is(err, io.EOF) {
|
||||
@@ -64,7 +65,7 @@ func local_request_Setting_Info_0(ctx context.Context, marshaler runtime.Marshal
|
||||
|
||||
func request_Setting_Rights_0(ctx context.Context, marshaler runtime.Marshaler, client SettingClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
|
||||
var (
|
||||
protoReq Empty
|
||||
protoReq blocks.Empty
|
||||
metadata runtime.ServerMetadata
|
||||
)
|
||||
if err := marshaler.NewDecoder(req.Body).Decode(&protoReq); err != nil && !errors.Is(err, io.EOF) {
|
||||
@@ -79,7 +80,7 @@ func request_Setting_Rights_0(ctx context.Context, marshaler runtime.Marshaler,
|
||||
|
||||
func local_request_Setting_Rights_0(ctx context.Context, marshaler runtime.Marshaler, server SettingServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
|
||||
var (
|
||||
protoReq Empty
|
||||
protoReq blocks.Empty
|
||||
metadata runtime.ServerMetadata
|
||||
)
|
||||
if err := marshaler.NewDecoder(req.Body).Decode(&protoReq); err != nil && !errors.Is(err, io.EOF) {
|
||||
|
||||
@@ -1,12 +1,13 @@
|
||||
// Code generated by protoc-gen-go-grpc. DO NOT EDIT.
|
||||
// versions:
|
||||
// - protoc-gen-go-grpc v1.5.1
|
||||
// - protoc (unknown)
|
||||
// source: setting.proto
|
||||
// - protoc-gen-go-grpc v1.6.2
|
||||
// - protoc v7.35.0
|
||||
// source: module/social/feed/proto/setting.proto
|
||||
|
||||
package feed
|
||||
|
||||
import (
|
||||
protobuf "bsm/full/protobuf"
|
||||
context "context"
|
||||
grpc "google.golang.org/grpc"
|
||||
codes "google.golang.org/grpc/codes"
|
||||
@@ -28,9 +29,9 @@ const (
|
||||
// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream.
|
||||
type SettingClient interface {
|
||||
// 修改个人信息
|
||||
Info(ctx context.Context, in *Empty, opts ...grpc.CallOption) (*Empty, error)
|
||||
Info(ctx context.Context, in *protobuf.Empty, opts ...grpc.CallOption) (*protobuf.Empty, error)
|
||||
// 修改权限信息
|
||||
Rights(ctx context.Context, in *Empty, opts ...grpc.CallOption) (*Empty, error)
|
||||
Rights(ctx context.Context, in *protobuf.Empty, opts ...grpc.CallOption) (*protobuf.Empty, error)
|
||||
}
|
||||
|
||||
type settingClient struct {
|
||||
@@ -41,9 +42,9 @@ func NewSettingClient(cc grpc.ClientConnInterface) SettingClient {
|
||||
return &settingClient{cc}
|
||||
}
|
||||
|
||||
func (c *settingClient) Info(ctx context.Context, in *Empty, opts ...grpc.CallOption) (*Empty, error) {
|
||||
func (c *settingClient) Info(ctx context.Context, in *protobuf.Empty, opts ...grpc.CallOption) (*protobuf.Empty, error) {
|
||||
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
|
||||
out := new(Empty)
|
||||
out := new(protobuf.Empty)
|
||||
err := c.cc.Invoke(ctx, Setting_Info_FullMethodName, in, out, cOpts...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
@@ -51,9 +52,9 @@ func (c *settingClient) Info(ctx context.Context, in *Empty, opts ...grpc.CallOp
|
||||
return out, nil
|
||||
}
|
||||
|
||||
func (c *settingClient) Rights(ctx context.Context, in *Empty, opts ...grpc.CallOption) (*Empty, error) {
|
||||
func (c *settingClient) Rights(ctx context.Context, in *protobuf.Empty, opts ...grpc.CallOption) (*protobuf.Empty, error) {
|
||||
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
|
||||
out := new(Empty)
|
||||
out := new(protobuf.Empty)
|
||||
err := c.cc.Invoke(ctx, Setting_Rights_FullMethodName, in, out, cOpts...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
@@ -62,31 +63,29 @@ func (c *settingClient) Rights(ctx context.Context, in *Empty, opts ...grpc.Call
|
||||
}
|
||||
|
||||
// SettingServer is the server API for Setting service.
|
||||
// All implementations must embed UnimplementedSettingServer
|
||||
// All implementations should embed UnimplementedSettingServer
|
||||
// for forward compatibility.
|
||||
type SettingServer interface {
|
||||
// 修改个人信息
|
||||
Info(context.Context, *Empty) (*Empty, error)
|
||||
Info(context.Context, *protobuf.Empty) (*protobuf.Empty, error)
|
||||
// 修改权限信息
|
||||
Rights(context.Context, *Empty) (*Empty, error)
|
||||
mustEmbedUnimplementedSettingServer()
|
||||
Rights(context.Context, *protobuf.Empty) (*protobuf.Empty, error)
|
||||
}
|
||||
|
||||
// UnimplementedSettingServer must be embedded to have
|
||||
// UnimplementedSettingServer should be embedded to have
|
||||
// forward compatible implementations.
|
||||
//
|
||||
// NOTE: this should be embedded by value instead of pointer to avoid a nil
|
||||
// pointer dereference when methods are called.
|
||||
type UnimplementedSettingServer struct{}
|
||||
|
||||
func (UnimplementedSettingServer) Info(context.Context, *Empty) (*Empty, error) {
|
||||
return nil, status.Errorf(codes.Unimplemented, "method Info not implemented")
|
||||
func (UnimplementedSettingServer) Info(context.Context, *protobuf.Empty) (*protobuf.Empty, error) {
|
||||
return nil, status.Error(codes.Unimplemented, "method Info not implemented")
|
||||
}
|
||||
func (UnimplementedSettingServer) Rights(context.Context, *Empty) (*Empty, error) {
|
||||
return nil, status.Errorf(codes.Unimplemented, "method Rights not implemented")
|
||||
func (UnimplementedSettingServer) Rights(context.Context, *protobuf.Empty) (*protobuf.Empty, error) {
|
||||
return nil, status.Error(codes.Unimplemented, "method Rights not implemented")
|
||||
}
|
||||
func (UnimplementedSettingServer) mustEmbedUnimplementedSettingServer() {}
|
||||
func (UnimplementedSettingServer) testEmbeddedByValue() {}
|
||||
func (UnimplementedSettingServer) testEmbeddedByValue() {}
|
||||
|
||||
// UnsafeSettingServer may be embedded to opt out of forward compatibility for this service.
|
||||
// Use of this interface is not recommended, as added methods to SettingServer will
|
||||
@@ -96,7 +95,7 @@ type UnsafeSettingServer interface {
|
||||
}
|
||||
|
||||
func RegisterSettingServer(s grpc.ServiceRegistrar, srv SettingServer) {
|
||||
// If the following call pancis, it indicates UnimplementedSettingServer was
|
||||
// If the following call panics, it indicates UnimplementedSettingServer was
|
||||
// embedded by pointer and is nil. This will cause panics if an
|
||||
// unimplemented method is ever invoked, so we test this at initialization
|
||||
// time to prevent it from happening at runtime later due to I/O.
|
||||
@@ -107,7 +106,7 @@ func RegisterSettingServer(s grpc.ServiceRegistrar, srv SettingServer) {
|
||||
}
|
||||
|
||||
func _Setting_Info_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
||||
in := new(Empty)
|
||||
in := new(protobuf.Empty)
|
||||
if err := dec(in); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
@@ -119,13 +118,13 @@ func _Setting_Info_Handler(srv interface{}, ctx context.Context, dec func(interf
|
||||
FullMethod: Setting_Info_FullMethodName,
|
||||
}
|
||||
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||
return srv.(SettingServer).Info(ctx, req.(*Empty))
|
||||
return srv.(SettingServer).Info(ctx, req.(*protobuf.Empty))
|
||||
}
|
||||
return interceptor(ctx, in, info, handler)
|
||||
}
|
||||
|
||||
func _Setting_Rights_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
||||
in := new(Empty)
|
||||
in := new(protobuf.Empty)
|
||||
if err := dec(in); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
@@ -137,7 +136,7 @@ func _Setting_Rights_Handler(srv interface{}, ctx context.Context, dec func(inte
|
||||
FullMethod: Setting_Rights_FullMethodName,
|
||||
}
|
||||
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||
return srv.(SettingServer).Rights(ctx, req.(*Empty))
|
||||
return srv.(SettingServer).Rights(ctx, req.(*protobuf.Empty))
|
||||
}
|
||||
return interceptor(ctx, in, info, handler)
|
||||
}
|
||||
@@ -159,5 +158,5 @@ var Setting_ServiceDesc = grpc.ServiceDesc{
|
||||
},
|
||||
},
|
||||
Streams: []grpc.StreamDesc{},
|
||||
Metadata: "setting.proto",
|
||||
Metadata: "module/social/feed/proto/setting.proto",
|
||||
}
|
||||
|
||||
@@ -1,12 +1,13 @@
|
||||
// Code generated by protoc-gen-go. DO NOT EDIT.
|
||||
// versions:
|
||||
// protoc-gen-go v1.36.8
|
||||
// protoc (unknown)
|
||||
// source: tag.proto
|
||||
// protoc-gen-go v1.36.11
|
||||
// protoc v7.35.0
|
||||
// source: module/social/feed/proto/tag.proto
|
||||
|
||||
package feed
|
||||
|
||||
import (
|
||||
protobuf "bsm/full/protobuf"
|
||||
protoreflect "google.golang.org/protobuf/reflect/protoreflect"
|
||||
protoimpl "google.golang.org/protobuf/runtime/protoimpl"
|
||||
reflect "reflect"
|
||||
@@ -30,7 +31,7 @@ type AddTagRequest struct {
|
||||
|
||||
func (x *AddTagRequest) Reset() {
|
||||
*x = AddTagRequest{}
|
||||
mi := &file_tag_proto_msgTypes[0]
|
||||
mi := &file_module_social_feed_proto_tag_proto_msgTypes[0]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
@@ -42,7 +43,7 @@ func (x *AddTagRequest) String() string {
|
||||
func (*AddTagRequest) ProtoMessage() {}
|
||||
|
||||
func (x *AddTagRequest) ProtoReflect() protoreflect.Message {
|
||||
mi := &file_tag_proto_msgTypes[0]
|
||||
mi := &file_module_social_feed_proto_tag_proto_msgTypes[0]
|
||||
if x != nil {
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
if ms.LoadMessageInfo() == nil {
|
||||
@@ -55,7 +56,7 @@ func (x *AddTagRequest) ProtoReflect() protoreflect.Message {
|
||||
|
||||
// Deprecated: Use AddTagRequest.ProtoReflect.Descriptor instead.
|
||||
func (*AddTagRequest) Descriptor() ([]byte, []int) {
|
||||
return file_tag_proto_rawDescGZIP(), []int{0}
|
||||
return file_module_social_feed_proto_tag_proto_rawDescGZIP(), []int{0}
|
||||
}
|
||||
|
||||
func (x *AddTagRequest) GetTags() []string {
|
||||
@@ -66,16 +67,16 @@ func (x *AddTagRequest) GetTags() []string {
|
||||
}
|
||||
|
||||
type TagListReply struct {
|
||||
state protoimpl.MessageState `protogen:"open.v1"`
|
||||
Tags []*TagItem `protobuf:"bytes,1,rep,name=tags,proto3" json:"tags,omitempty"`
|
||||
Total int64 `protobuf:"varint,2,opt,name=total,proto3" json:"total,omitempty"`
|
||||
state protoimpl.MessageState `protogen:"open.v1"`
|
||||
Tags []*protobuf.FeedTagItem `protobuf:"bytes,1,rep,name=tags,proto3" json:"tags,omitempty"`
|
||||
Total int64 `protobuf:"varint,2,opt,name=total,proto3" json:"total,omitempty"`
|
||||
unknownFields protoimpl.UnknownFields
|
||||
sizeCache protoimpl.SizeCache
|
||||
}
|
||||
|
||||
func (x *TagListReply) Reset() {
|
||||
*x = TagListReply{}
|
||||
mi := &file_tag_proto_msgTypes[1]
|
||||
mi := &file_module_social_feed_proto_tag_proto_msgTypes[1]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
@@ -87,7 +88,7 @@ func (x *TagListReply) String() string {
|
||||
func (*TagListReply) ProtoMessage() {}
|
||||
|
||||
func (x *TagListReply) ProtoReflect() protoreflect.Message {
|
||||
mi := &file_tag_proto_msgTypes[1]
|
||||
mi := &file_module_social_feed_proto_tag_proto_msgTypes[1]
|
||||
if x != nil {
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
if ms.LoadMessageInfo() == nil {
|
||||
@@ -100,10 +101,10 @@ func (x *TagListReply) ProtoReflect() protoreflect.Message {
|
||||
|
||||
// Deprecated: Use TagListReply.ProtoReflect.Descriptor instead.
|
||||
func (*TagListReply) Descriptor() ([]byte, []int) {
|
||||
return file_tag_proto_rawDescGZIP(), []int{1}
|
||||
return file_module_social_feed_proto_tag_proto_rawDescGZIP(), []int{1}
|
||||
}
|
||||
|
||||
func (x *TagListReply) GetTags() []*TagItem {
|
||||
func (x *TagListReply) GetTags() []*protobuf.FeedTagItem {
|
||||
if x != nil {
|
||||
return x.Tags
|
||||
}
|
||||
@@ -117,50 +118,50 @@ func (x *TagListReply) GetTotal() int64 {
|
||||
return 0
|
||||
}
|
||||
|
||||
var File_tag_proto protoreflect.FileDescriptor
|
||||
var File_module_social_feed_proto_tag_proto protoreflect.FileDescriptor
|
||||
|
||||
const file_tag_proto_rawDesc = "" +
|
||||
const file_module_social_feed_proto_tag_proto_rawDesc = "" +
|
||||
"\n" +
|
||||
"\x15social/feed/tag.proto\x12\x04feed\x1a\x11feed/blocks.proto\"#\n" +
|
||||
"\"module/social/feed/proto/tag.proto\x12\x04feed\x1a\x15protobuf/blocks.proto\"#\n" +
|
||||
"\rAddTagRequest\x12\x12\n" +
|
||||
"\x04tags\x18\x01 \x03(\tR\x04tags\"G\n" +
|
||||
"\fTagListReply\x12!\n" +
|
||||
"\x04tags\x18\x01 \x03(\v2\r.feed.TagItemR\x04tags\x12\x14\n" +
|
||||
"\x05total\x18\x02 \x01(\x03R\x05total2\xa2\x01\n" +
|
||||
"\x03Tag\x120\n" +
|
||||
"\x04List\x12\x12.feed.FetchRequest\x1a\x12.feed.TagListReply\"\x00\x122\n" +
|
||||
"\x06Create\x12\x13.feed.AddTagRequest\x1a\x11.feed.StatusReply\"\x00\x125\n" +
|
||||
"\bPostList\x12\x12.feed.FetchRequest\x1a\x13.feed.PostListReply\"\x00B\bZ\x06.;feedb\x06proto3"
|
||||
"\x04tags\x18\x01 \x03(\tR\x04tags\"M\n" +
|
||||
"\fTagListReply\x12'\n" +
|
||||
"\x04tags\x18\x01 \x03(\v2\x13.blocks.FeedTagItemR\x04tags\x12\x14\n" +
|
||||
"\x05total\x18\x02 \x01(\x03R\x05total2\xb2\x01\n" +
|
||||
"\x03Tag\x122\n" +
|
||||
"\x04List\x12\x14.blocks.FetchRequest\x1a\x12.feed.TagListReply\"\x00\x128\n" +
|
||||
"\x06Create\x12\x13.feed.AddTagRequest\x1a\x17.blocks.DataStatusReply\"\x00\x12=\n" +
|
||||
"\bPostList\x12\x14.blocks.FetchRequest\x1a\x19.blocks.FeedPostListReply\"\x00B%Z#bsm/full/module/social/feed/pb;feedb\x06proto3"
|
||||
|
||||
var (
|
||||
file_tag_proto_rawDescOnce sync.Once
|
||||
file_tag_proto_rawDescData []byte
|
||||
file_module_social_feed_proto_tag_proto_rawDescOnce sync.Once
|
||||
file_module_social_feed_proto_tag_proto_rawDescData []byte
|
||||
)
|
||||
|
||||
func file_tag_proto_rawDescGZIP() []byte {
|
||||
file_tag_proto_rawDescOnce.Do(func() {
|
||||
file_tag_proto_rawDescData = protoimpl.X.CompressGZIP(unsafe.Slice(unsafe.StringData(file_tag_proto_rawDesc), len(file_tag_proto_rawDesc)))
|
||||
func file_module_social_feed_proto_tag_proto_rawDescGZIP() []byte {
|
||||
file_module_social_feed_proto_tag_proto_rawDescOnce.Do(func() {
|
||||
file_module_social_feed_proto_tag_proto_rawDescData = protoimpl.X.CompressGZIP(unsafe.Slice(unsafe.StringData(file_module_social_feed_proto_tag_proto_rawDesc), len(file_module_social_feed_proto_tag_proto_rawDesc)))
|
||||
})
|
||||
return file_tag_proto_rawDescData
|
||||
return file_module_social_feed_proto_tag_proto_rawDescData
|
||||
}
|
||||
|
||||
var file_tag_proto_msgTypes = make([]protoimpl.MessageInfo, 2)
|
||||
var file_tag_proto_goTypes = []any{
|
||||
(*AddTagRequest)(nil), // 0: feed.AddTagRequest
|
||||
(*TagListReply)(nil), // 1: feed.TagListReply
|
||||
(*TagItem)(nil), // 2: feed.TagItem
|
||||
(*FetchRequest)(nil), // 3: feed.FetchRequest
|
||||
(*StatusReply)(nil), // 4: feed.StatusReply
|
||||
(*PostListReply)(nil), // 5: feed.PostListReply
|
||||
var file_module_social_feed_proto_tag_proto_msgTypes = make([]protoimpl.MessageInfo, 2)
|
||||
var file_module_social_feed_proto_tag_proto_goTypes = []any{
|
||||
(*AddTagRequest)(nil), // 0: feed.AddTagRequest
|
||||
(*TagListReply)(nil), // 1: feed.TagListReply
|
||||
(*protobuf.FeedTagItem)(nil), // 2: blocks.FeedTagItem
|
||||
(*protobuf.FetchRequest)(nil), // 3: blocks.FetchRequest
|
||||
(*protobuf.DataStatusReply)(nil), // 4: blocks.DataStatusReply
|
||||
(*protobuf.FeedPostListReply)(nil), // 5: blocks.FeedPostListReply
|
||||
}
|
||||
var file_tag_proto_depIdxs = []int32{
|
||||
2, // 0: feed.TagListReply.tags:type_name -> feed.TagItem
|
||||
3, // 1: feed.Tag.List:input_type -> feed.FetchRequest
|
||||
var file_module_social_feed_proto_tag_proto_depIdxs = []int32{
|
||||
2, // 0: feed.TagListReply.tags:type_name -> blocks.FeedTagItem
|
||||
3, // 1: feed.Tag.List:input_type -> blocks.FetchRequest
|
||||
0, // 2: feed.Tag.Create:input_type -> feed.AddTagRequest
|
||||
3, // 3: feed.Tag.PostList:input_type -> feed.FetchRequest
|
||||
3, // 3: feed.Tag.PostList:input_type -> blocks.FetchRequest
|
||||
1, // 4: feed.Tag.List:output_type -> feed.TagListReply
|
||||
4, // 5: feed.Tag.Create:output_type -> feed.StatusReply
|
||||
5, // 6: feed.Tag.PostList:output_type -> feed.PostListReply
|
||||
4, // 5: feed.Tag.Create:output_type -> blocks.DataStatusReply
|
||||
5, // 6: feed.Tag.PostList:output_type -> blocks.FeedPostListReply
|
||||
4, // [4:7] is the sub-list for method output_type
|
||||
1, // [1:4] is the sub-list for method input_type
|
||||
1, // [1:1] is the sub-list for extension type_name
|
||||
@@ -168,27 +169,26 @@ var file_tag_proto_depIdxs = []int32{
|
||||
0, // [0:1] is the sub-list for field type_name
|
||||
}
|
||||
|
||||
func init() { file_tag_proto_init() }
|
||||
func file_tag_proto_init() {
|
||||
if File_tag_proto != nil {
|
||||
func init() { file_module_social_feed_proto_tag_proto_init() }
|
||||
func file_module_social_feed_proto_tag_proto_init() {
|
||||
if File_module_social_feed_proto_tag_proto != nil {
|
||||
return
|
||||
}
|
||||
file_blocks_proto_init()
|
||||
type x struct{}
|
||||
out := protoimpl.TypeBuilder{
|
||||
File: protoimpl.DescBuilder{
|
||||
GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
|
||||
RawDescriptor: unsafe.Slice(unsafe.StringData(file_tag_proto_rawDesc), len(file_tag_proto_rawDesc)),
|
||||
RawDescriptor: unsafe.Slice(unsafe.StringData(file_module_social_feed_proto_tag_proto_rawDesc), len(file_module_social_feed_proto_tag_proto_rawDesc)),
|
||||
NumEnums: 0,
|
||||
NumMessages: 2,
|
||||
NumExtensions: 0,
|
||||
NumServices: 1,
|
||||
},
|
||||
GoTypes: file_tag_proto_goTypes,
|
||||
DependencyIndexes: file_tag_proto_depIdxs,
|
||||
MessageInfos: file_tag_proto_msgTypes,
|
||||
GoTypes: file_module_social_feed_proto_tag_proto_goTypes,
|
||||
DependencyIndexes: file_module_social_feed_proto_tag_proto_depIdxs,
|
||||
MessageInfos: file_module_social_feed_proto_tag_proto_msgTypes,
|
||||
}.Build()
|
||||
File_tag_proto = out.File
|
||||
file_tag_proto_goTypes = nil
|
||||
file_tag_proto_depIdxs = nil
|
||||
File_module_social_feed_proto_tag_proto = out.File
|
||||
file_module_social_feed_proto_tag_proto_goTypes = nil
|
||||
file_module_social_feed_proto_tag_proto_depIdxs = nil
|
||||
}
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
// Code generated by protoc-gen-grpc-gateway. DO NOT EDIT.
|
||||
// source: tag.proto
|
||||
// source: module/social/feed/proto/tag.proto
|
||||
|
||||
/*
|
||||
Package feed is a reverse proxy.
|
||||
@@ -9,6 +9,7 @@ It translates gRPC into RESTful JSON APIs.
|
||||
package feed
|
||||
|
||||
import (
|
||||
"bsm/full/protobuf"
|
||||
"context"
|
||||
"errors"
|
||||
"io"
|
||||
@@ -37,7 +38,7 @@ var (
|
||||
|
||||
func request_Tag_List_0(ctx context.Context, marshaler runtime.Marshaler, client TagClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
|
||||
var (
|
||||
protoReq FetchRequest
|
||||
protoReq blocks.FetchRequest
|
||||
metadata runtime.ServerMetadata
|
||||
)
|
||||
if err := marshaler.NewDecoder(req.Body).Decode(&protoReq); err != nil && !errors.Is(err, io.EOF) {
|
||||
@@ -52,7 +53,7 @@ func request_Tag_List_0(ctx context.Context, marshaler runtime.Marshaler, client
|
||||
|
||||
func local_request_Tag_List_0(ctx context.Context, marshaler runtime.Marshaler, server TagServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
|
||||
var (
|
||||
protoReq FetchRequest
|
||||
protoReq blocks.FetchRequest
|
||||
metadata runtime.ServerMetadata
|
||||
)
|
||||
if err := marshaler.NewDecoder(req.Body).Decode(&protoReq); err != nil && !errors.Is(err, io.EOF) {
|
||||
@@ -91,7 +92,7 @@ func local_request_Tag_Create_0(ctx context.Context, marshaler runtime.Marshaler
|
||||
|
||||
func request_Tag_PostList_0(ctx context.Context, marshaler runtime.Marshaler, client TagClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
|
||||
var (
|
||||
protoReq FetchRequest
|
||||
protoReq blocks.FetchRequest
|
||||
metadata runtime.ServerMetadata
|
||||
)
|
||||
if err := marshaler.NewDecoder(req.Body).Decode(&protoReq); err != nil && !errors.Is(err, io.EOF) {
|
||||
@@ -106,7 +107,7 @@ func request_Tag_PostList_0(ctx context.Context, marshaler runtime.Marshaler, cl
|
||||
|
||||
func local_request_Tag_PostList_0(ctx context.Context, marshaler runtime.Marshaler, server TagServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
|
||||
var (
|
||||
protoReq FetchRequest
|
||||
protoReq blocks.FetchRequest
|
||||
metadata runtime.ServerMetadata
|
||||
)
|
||||
if err := marshaler.NewDecoder(req.Body).Decode(&protoReq); err != nil && !errors.Is(err, io.EOF) {
|
||||
|
||||
@@ -1,12 +1,13 @@
|
||||
// Code generated by protoc-gen-go-grpc. DO NOT EDIT.
|
||||
// versions:
|
||||
// - protoc-gen-go-grpc v1.5.1
|
||||
// - protoc (unknown)
|
||||
// source: tag.proto
|
||||
// - protoc-gen-go-grpc v1.6.2
|
||||
// - protoc v7.35.0
|
||||
// source: module/social/feed/proto/tag.proto
|
||||
|
||||
package feed
|
||||
|
||||
import (
|
||||
protobuf "bsm/full/protobuf"
|
||||
context "context"
|
||||
grpc "google.golang.org/grpc"
|
||||
codes "google.golang.org/grpc/codes"
|
||||
@@ -29,11 +30,11 @@ const (
|
||||
// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream.
|
||||
type TagClient interface {
|
||||
// 标签列表
|
||||
List(ctx context.Context, in *FetchRequest, opts ...grpc.CallOption) (*TagListReply, error)
|
||||
List(ctx context.Context, in *protobuf.FetchRequest, opts ...grpc.CallOption) (*TagListReply, error)
|
||||
// 新建标签
|
||||
Create(ctx context.Context, in *AddTagRequest, opts ...grpc.CallOption) (*StatusReply, error)
|
||||
Create(ctx context.Context, in *AddTagRequest, opts ...grpc.CallOption) (*protobuf.DataStatusReply, error)
|
||||
// 话题相关的文章
|
||||
PostList(ctx context.Context, in *FetchRequest, opts ...grpc.CallOption) (*PostListReply, error)
|
||||
PostList(ctx context.Context, in *protobuf.FetchRequest, opts ...grpc.CallOption) (*protobuf.FeedPostListReply, error)
|
||||
}
|
||||
|
||||
type tagClient struct {
|
||||
@@ -44,7 +45,7 @@ func NewTagClient(cc grpc.ClientConnInterface) TagClient {
|
||||
return &tagClient{cc}
|
||||
}
|
||||
|
||||
func (c *tagClient) List(ctx context.Context, in *FetchRequest, opts ...grpc.CallOption) (*TagListReply, error) {
|
||||
func (c *tagClient) List(ctx context.Context, in *protobuf.FetchRequest, opts ...grpc.CallOption) (*TagListReply, error) {
|
||||
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
|
||||
out := new(TagListReply)
|
||||
err := c.cc.Invoke(ctx, Tag_List_FullMethodName, in, out, cOpts...)
|
||||
@@ -54,9 +55,9 @@ func (c *tagClient) List(ctx context.Context, in *FetchRequest, opts ...grpc.Cal
|
||||
return out, nil
|
||||
}
|
||||
|
||||
func (c *tagClient) Create(ctx context.Context, in *AddTagRequest, opts ...grpc.CallOption) (*StatusReply, error) {
|
||||
func (c *tagClient) Create(ctx context.Context, in *AddTagRequest, opts ...grpc.CallOption) (*protobuf.DataStatusReply, error) {
|
||||
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
|
||||
out := new(StatusReply)
|
||||
out := new(protobuf.DataStatusReply)
|
||||
err := c.cc.Invoke(ctx, Tag_Create_FullMethodName, in, out, cOpts...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
@@ -64,9 +65,9 @@ func (c *tagClient) Create(ctx context.Context, in *AddTagRequest, opts ...grpc.
|
||||
return out, nil
|
||||
}
|
||||
|
||||
func (c *tagClient) PostList(ctx context.Context, in *FetchRequest, opts ...grpc.CallOption) (*PostListReply, error) {
|
||||
func (c *tagClient) PostList(ctx context.Context, in *protobuf.FetchRequest, opts ...grpc.CallOption) (*protobuf.FeedPostListReply, error) {
|
||||
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
|
||||
out := new(PostListReply)
|
||||
out := new(protobuf.FeedPostListReply)
|
||||
err := c.cc.Invoke(ctx, Tag_PostList_FullMethodName, in, out, cOpts...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
@@ -75,36 +76,34 @@ func (c *tagClient) PostList(ctx context.Context, in *FetchRequest, opts ...grpc
|
||||
}
|
||||
|
||||
// TagServer is the server API for Tag service.
|
||||
// All implementations must embed UnimplementedTagServer
|
||||
// All implementations should embed UnimplementedTagServer
|
||||
// for forward compatibility.
|
||||
type TagServer interface {
|
||||
// 标签列表
|
||||
List(context.Context, *FetchRequest) (*TagListReply, error)
|
||||
List(context.Context, *protobuf.FetchRequest) (*TagListReply, error)
|
||||
// 新建标签
|
||||
Create(context.Context, *AddTagRequest) (*StatusReply, error)
|
||||
Create(context.Context, *AddTagRequest) (*protobuf.DataStatusReply, error)
|
||||
// 话题相关的文章
|
||||
PostList(context.Context, *FetchRequest) (*PostListReply, error)
|
||||
mustEmbedUnimplementedTagServer()
|
||||
PostList(context.Context, *protobuf.FetchRequest) (*protobuf.FeedPostListReply, error)
|
||||
}
|
||||
|
||||
// UnimplementedTagServer must be embedded to have
|
||||
// UnimplementedTagServer should be embedded to have
|
||||
// forward compatible implementations.
|
||||
//
|
||||
// NOTE: this should be embedded by value instead of pointer to avoid a nil
|
||||
// pointer dereference when methods are called.
|
||||
type UnimplementedTagServer struct{}
|
||||
|
||||
func (UnimplementedTagServer) List(context.Context, *FetchRequest) (*TagListReply, error) {
|
||||
return nil, status.Errorf(codes.Unimplemented, "method List not implemented")
|
||||
func (UnimplementedTagServer) List(context.Context, *protobuf.FetchRequest) (*TagListReply, error) {
|
||||
return nil, status.Error(codes.Unimplemented, "method List not implemented")
|
||||
}
|
||||
func (UnimplementedTagServer) Create(context.Context, *AddTagRequest) (*StatusReply, error) {
|
||||
return nil, status.Errorf(codes.Unimplemented, "method Create not implemented")
|
||||
func (UnimplementedTagServer) Create(context.Context, *AddTagRequest) (*protobuf.DataStatusReply, error) {
|
||||
return nil, status.Error(codes.Unimplemented, "method Create not implemented")
|
||||
}
|
||||
func (UnimplementedTagServer) PostList(context.Context, *FetchRequest) (*PostListReply, error) {
|
||||
return nil, status.Errorf(codes.Unimplemented, "method PostList not implemented")
|
||||
func (UnimplementedTagServer) PostList(context.Context, *protobuf.FetchRequest) (*protobuf.FeedPostListReply, error) {
|
||||
return nil, status.Error(codes.Unimplemented, "method PostList not implemented")
|
||||
}
|
||||
func (UnimplementedTagServer) mustEmbedUnimplementedTagServer() {}
|
||||
func (UnimplementedTagServer) testEmbeddedByValue() {}
|
||||
func (UnimplementedTagServer) testEmbeddedByValue() {}
|
||||
|
||||
// UnsafeTagServer may be embedded to opt out of forward compatibility for this service.
|
||||
// Use of this interface is not recommended, as added methods to TagServer will
|
||||
@@ -114,7 +113,7 @@ type UnsafeTagServer interface {
|
||||
}
|
||||
|
||||
func RegisterTagServer(s grpc.ServiceRegistrar, srv TagServer) {
|
||||
// If the following call pancis, it indicates UnimplementedTagServer was
|
||||
// If the following call panics, it indicates UnimplementedTagServer was
|
||||
// embedded by pointer and is nil. This will cause panics if an
|
||||
// unimplemented method is ever invoked, so we test this at initialization
|
||||
// time to prevent it from happening at runtime later due to I/O.
|
||||
@@ -125,7 +124,7 @@ func RegisterTagServer(s grpc.ServiceRegistrar, srv TagServer) {
|
||||
}
|
||||
|
||||
func _Tag_List_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
||||
in := new(FetchRequest)
|
||||
in := new(protobuf.FetchRequest)
|
||||
if err := dec(in); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
@@ -137,7 +136,7 @@ func _Tag_List_Handler(srv interface{}, ctx context.Context, dec func(interface{
|
||||
FullMethod: Tag_List_FullMethodName,
|
||||
}
|
||||
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||
return srv.(TagServer).List(ctx, req.(*FetchRequest))
|
||||
return srv.(TagServer).List(ctx, req.(*protobuf.FetchRequest))
|
||||
}
|
||||
return interceptor(ctx, in, info, handler)
|
||||
}
|
||||
@@ -161,7 +160,7 @@ func _Tag_Create_Handler(srv interface{}, ctx context.Context, dec func(interfac
|
||||
}
|
||||
|
||||
func _Tag_PostList_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
||||
in := new(FetchRequest)
|
||||
in := new(protobuf.FetchRequest)
|
||||
if err := dec(in); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
@@ -173,7 +172,7 @@ func _Tag_PostList_Handler(srv interface{}, ctx context.Context, dec func(interf
|
||||
FullMethod: Tag_PostList_FullMethodName,
|
||||
}
|
||||
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||
return srv.(TagServer).PostList(ctx, req.(*FetchRequest))
|
||||
return srv.(TagServer).PostList(ctx, req.(*protobuf.FetchRequest))
|
||||
}
|
||||
return interceptor(ctx, in, info, handler)
|
||||
}
|
||||
@@ -199,5 +198,5 @@ var Tag_ServiceDesc = grpc.ServiceDesc{
|
||||
},
|
||||
},
|
||||
Streams: []grpc.StreamDesc{},
|
||||
Metadata: "tag.proto",
|
||||
Metadata: "module/social/feed/proto/tag.proto",
|
||||
}
|
||||
|
||||
@@ -1,12 +1,13 @@
|
||||
// Code generated by protoc-gen-go. DO NOT EDIT.
|
||||
// versions:
|
||||
// protoc-gen-go v1.36.8
|
||||
// protoc (unknown)
|
||||
// source: timeline.proto
|
||||
// protoc-gen-go v1.36.11
|
||||
// protoc v7.35.0
|
||||
// source: module/social/feed/proto/timeline.proto
|
||||
|
||||
package feed
|
||||
|
||||
import (
|
||||
protobuf "bsm/full/protobuf"
|
||||
protoreflect "google.golang.org/protobuf/reflect/protoreflect"
|
||||
protoimpl "google.golang.org/protobuf/runtime/protoimpl"
|
||||
reflect "reflect"
|
||||
@@ -20,30 +21,30 @@ const (
|
||||
_ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20)
|
||||
)
|
||||
|
||||
var File_timeline_proto protoreflect.FileDescriptor
|
||||
var File_module_social_feed_proto_timeline_proto protoreflect.FileDescriptor
|
||||
|
||||
const file_timeline_proto_rawDesc = "" +
|
||||
const file_module_social_feed_proto_timeline_proto_rawDesc = "" +
|
||||
"\n" +
|
||||
"\x1asocial/feed/timeline.proto\x12\x04feed\x1a\x11feed/blocks.proto2\xde\x01\n" +
|
||||
"\bTimeline\x126\n" +
|
||||
"\tRecommend\x12\x12.feed.FetchRequest\x1a\x13.feed.PostListReply\"\x00\x123\n" +
|
||||
"\x06Friend\x12\x12.feed.FetchRequest\x1a\x13.feed.PostListReply\"\x00\x123\n" +
|
||||
"\x06Follow\x12\x12.feed.FetchRequest\x1a\x13.feed.PostListReply\"\x00\x120\n" +
|
||||
"\x03Hot\x12\x12.feed.FetchRequest\x1a\x13.feed.PostListReply\"\x00B\bZ\x06.;feedb\x06proto3"
|
||||
"'module/social/feed/proto/timeline.proto\x12\x04feed\x1a\x15protobuf/blocks.proto2\xfe\x01\n" +
|
||||
"\bTimeline\x12>\n" +
|
||||
"\tRecommend\x12\x14.blocks.FetchRequest\x1a\x19.blocks.FeedPostListReply\"\x00\x12;\n" +
|
||||
"\x06Friend\x12\x14.blocks.FetchRequest\x1a\x19.blocks.FeedPostListReply\"\x00\x12;\n" +
|
||||
"\x06Follow\x12\x14.blocks.FetchRequest\x1a\x19.blocks.FeedPostListReply\"\x00\x128\n" +
|
||||
"\x03Hot\x12\x14.blocks.FetchRequest\x1a\x19.blocks.FeedPostListReply\"\x00B%Z#bsm/full/module/social/feed/pb;feedb\x06proto3"
|
||||
|
||||
var file_timeline_proto_goTypes = []any{
|
||||
(*FetchRequest)(nil), // 0: feed.FetchRequest
|
||||
(*PostListReply)(nil), // 1: feed.PostListReply
|
||||
var file_module_social_feed_proto_timeline_proto_goTypes = []any{
|
||||
(*protobuf.FetchRequest)(nil), // 0: blocks.FetchRequest
|
||||
(*protobuf.FeedPostListReply)(nil), // 1: blocks.FeedPostListReply
|
||||
}
|
||||
var file_timeline_proto_depIdxs = []int32{
|
||||
0, // 0: feed.Timeline.Recommend:input_type -> feed.FetchRequest
|
||||
0, // 1: feed.Timeline.Friend:input_type -> feed.FetchRequest
|
||||
0, // 2: feed.Timeline.Follow:input_type -> feed.FetchRequest
|
||||
0, // 3: feed.Timeline.Hot:input_type -> feed.FetchRequest
|
||||
1, // 4: feed.Timeline.Recommend:output_type -> feed.PostListReply
|
||||
1, // 5: feed.Timeline.Friend:output_type -> feed.PostListReply
|
||||
1, // 6: feed.Timeline.Follow:output_type -> feed.PostListReply
|
||||
1, // 7: feed.Timeline.Hot:output_type -> feed.PostListReply
|
||||
var file_module_social_feed_proto_timeline_proto_depIdxs = []int32{
|
||||
0, // 0: feed.Timeline.Recommend:input_type -> blocks.FetchRequest
|
||||
0, // 1: feed.Timeline.Friend:input_type -> blocks.FetchRequest
|
||||
0, // 2: feed.Timeline.Follow:input_type -> blocks.FetchRequest
|
||||
0, // 3: feed.Timeline.Hot:input_type -> blocks.FetchRequest
|
||||
1, // 4: feed.Timeline.Recommend:output_type -> blocks.FeedPostListReply
|
||||
1, // 5: feed.Timeline.Friend:output_type -> blocks.FeedPostListReply
|
||||
1, // 6: feed.Timeline.Follow:output_type -> blocks.FeedPostListReply
|
||||
1, // 7: feed.Timeline.Hot:output_type -> blocks.FeedPostListReply
|
||||
4, // [4:8] is the sub-list for method output_type
|
||||
0, // [0:4] is the sub-list for method input_type
|
||||
0, // [0:0] is the sub-list for extension type_name
|
||||
@@ -51,26 +52,25 @@ var file_timeline_proto_depIdxs = []int32{
|
||||
0, // [0:0] is the sub-list for field type_name
|
||||
}
|
||||
|
||||
func init() { file_timeline_proto_init() }
|
||||
func file_timeline_proto_init() {
|
||||
if File_timeline_proto != nil {
|
||||
func init() { file_module_social_feed_proto_timeline_proto_init() }
|
||||
func file_module_social_feed_proto_timeline_proto_init() {
|
||||
if File_module_social_feed_proto_timeline_proto != nil {
|
||||
return
|
||||
}
|
||||
file_blocks_proto_init()
|
||||
type x struct{}
|
||||
out := protoimpl.TypeBuilder{
|
||||
File: protoimpl.DescBuilder{
|
||||
GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
|
||||
RawDescriptor: unsafe.Slice(unsafe.StringData(file_timeline_proto_rawDesc), len(file_timeline_proto_rawDesc)),
|
||||
RawDescriptor: unsafe.Slice(unsafe.StringData(file_module_social_feed_proto_timeline_proto_rawDesc), len(file_module_social_feed_proto_timeline_proto_rawDesc)),
|
||||
NumEnums: 0,
|
||||
NumMessages: 0,
|
||||
NumExtensions: 0,
|
||||
NumServices: 1,
|
||||
},
|
||||
GoTypes: file_timeline_proto_goTypes,
|
||||
DependencyIndexes: file_timeline_proto_depIdxs,
|
||||
GoTypes: file_module_social_feed_proto_timeline_proto_goTypes,
|
||||
DependencyIndexes: file_module_social_feed_proto_timeline_proto_depIdxs,
|
||||
}.Build()
|
||||
File_timeline_proto = out.File
|
||||
file_timeline_proto_goTypes = nil
|
||||
file_timeline_proto_depIdxs = nil
|
||||
File_module_social_feed_proto_timeline_proto = out.File
|
||||
file_module_social_feed_proto_timeline_proto_goTypes = nil
|
||||
file_module_social_feed_proto_timeline_proto_depIdxs = nil
|
||||
}
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
// Code generated by protoc-gen-grpc-gateway. DO NOT EDIT.
|
||||
// source: timeline.proto
|
||||
// source: module/social/feed/proto/timeline.proto
|
||||
|
||||
/*
|
||||
Package feed is a reverse proxy.
|
||||
@@ -9,6 +9,7 @@ It translates gRPC into RESTful JSON APIs.
|
||||
package feed
|
||||
|
||||
import (
|
||||
"bsm/full/protobuf"
|
||||
"context"
|
||||
"errors"
|
||||
"io"
|
||||
@@ -37,7 +38,7 @@ var (
|
||||
|
||||
func request_Timeline_Recommend_0(ctx context.Context, marshaler runtime.Marshaler, client TimelineClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
|
||||
var (
|
||||
protoReq FetchRequest
|
||||
protoReq blocks.FetchRequest
|
||||
metadata runtime.ServerMetadata
|
||||
)
|
||||
if err := marshaler.NewDecoder(req.Body).Decode(&protoReq); err != nil && !errors.Is(err, io.EOF) {
|
||||
@@ -52,7 +53,7 @@ func request_Timeline_Recommend_0(ctx context.Context, marshaler runtime.Marshal
|
||||
|
||||
func local_request_Timeline_Recommend_0(ctx context.Context, marshaler runtime.Marshaler, server TimelineServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
|
||||
var (
|
||||
protoReq FetchRequest
|
||||
protoReq blocks.FetchRequest
|
||||
metadata runtime.ServerMetadata
|
||||
)
|
||||
if err := marshaler.NewDecoder(req.Body).Decode(&protoReq); err != nil && !errors.Is(err, io.EOF) {
|
||||
@@ -64,7 +65,7 @@ func local_request_Timeline_Recommend_0(ctx context.Context, marshaler runtime.M
|
||||
|
||||
func request_Timeline_Friend_0(ctx context.Context, marshaler runtime.Marshaler, client TimelineClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
|
||||
var (
|
||||
protoReq FetchRequest
|
||||
protoReq blocks.FetchRequest
|
||||
metadata runtime.ServerMetadata
|
||||
)
|
||||
if err := marshaler.NewDecoder(req.Body).Decode(&protoReq); err != nil && !errors.Is(err, io.EOF) {
|
||||
@@ -79,7 +80,7 @@ func request_Timeline_Friend_0(ctx context.Context, marshaler runtime.Marshaler,
|
||||
|
||||
func local_request_Timeline_Friend_0(ctx context.Context, marshaler runtime.Marshaler, server TimelineServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
|
||||
var (
|
||||
protoReq FetchRequest
|
||||
protoReq blocks.FetchRequest
|
||||
metadata runtime.ServerMetadata
|
||||
)
|
||||
if err := marshaler.NewDecoder(req.Body).Decode(&protoReq); err != nil && !errors.Is(err, io.EOF) {
|
||||
@@ -91,7 +92,7 @@ func local_request_Timeline_Friend_0(ctx context.Context, marshaler runtime.Mars
|
||||
|
||||
func request_Timeline_Follow_0(ctx context.Context, marshaler runtime.Marshaler, client TimelineClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
|
||||
var (
|
||||
protoReq FetchRequest
|
||||
protoReq blocks.FetchRequest
|
||||
metadata runtime.ServerMetadata
|
||||
)
|
||||
if err := marshaler.NewDecoder(req.Body).Decode(&protoReq); err != nil && !errors.Is(err, io.EOF) {
|
||||
@@ -106,7 +107,7 @@ func request_Timeline_Follow_0(ctx context.Context, marshaler runtime.Marshaler,
|
||||
|
||||
func local_request_Timeline_Follow_0(ctx context.Context, marshaler runtime.Marshaler, server TimelineServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
|
||||
var (
|
||||
protoReq FetchRequest
|
||||
protoReq blocks.FetchRequest
|
||||
metadata runtime.ServerMetadata
|
||||
)
|
||||
if err := marshaler.NewDecoder(req.Body).Decode(&protoReq); err != nil && !errors.Is(err, io.EOF) {
|
||||
@@ -118,7 +119,7 @@ func local_request_Timeline_Follow_0(ctx context.Context, marshaler runtime.Mars
|
||||
|
||||
func request_Timeline_Hot_0(ctx context.Context, marshaler runtime.Marshaler, client TimelineClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
|
||||
var (
|
||||
protoReq FetchRequest
|
||||
protoReq blocks.FetchRequest
|
||||
metadata runtime.ServerMetadata
|
||||
)
|
||||
if err := marshaler.NewDecoder(req.Body).Decode(&protoReq); err != nil && !errors.Is(err, io.EOF) {
|
||||
@@ -133,7 +134,7 @@ func request_Timeline_Hot_0(ctx context.Context, marshaler runtime.Marshaler, cl
|
||||
|
||||
func local_request_Timeline_Hot_0(ctx context.Context, marshaler runtime.Marshaler, server TimelineServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
|
||||
var (
|
||||
protoReq FetchRequest
|
||||
protoReq blocks.FetchRequest
|
||||
metadata runtime.ServerMetadata
|
||||
)
|
||||
if err := marshaler.NewDecoder(req.Body).Decode(&protoReq); err != nil && !errors.Is(err, io.EOF) {
|
||||
|
||||
@@ -1,12 +1,13 @@
|
||||
// Code generated by protoc-gen-go-grpc. DO NOT EDIT.
|
||||
// versions:
|
||||
// - protoc-gen-go-grpc v1.5.1
|
||||
// - protoc (unknown)
|
||||
// source: timeline.proto
|
||||
// - protoc-gen-go-grpc v1.6.2
|
||||
// - protoc v7.35.0
|
||||
// source: module/social/feed/proto/timeline.proto
|
||||
|
||||
package feed
|
||||
|
||||
import (
|
||||
protobuf "bsm/full/protobuf"
|
||||
context "context"
|
||||
grpc "google.golang.org/grpc"
|
||||
codes "google.golang.org/grpc/codes"
|
||||
@@ -32,13 +33,13 @@ const (
|
||||
// 实时动态
|
||||
type TimelineClient interface {
|
||||
// 推荐
|
||||
Recommend(ctx context.Context, in *FetchRequest, opts ...grpc.CallOption) (*PostListReply, error)
|
||||
Recommend(ctx context.Context, in *protobuf.FetchRequest, opts ...grpc.CallOption) (*protobuf.FeedPostListReply, error)
|
||||
// 好友动态
|
||||
Friend(ctx context.Context, in *FetchRequest, opts ...grpc.CallOption) (*PostListReply, error)
|
||||
Friend(ctx context.Context, in *protobuf.FetchRequest, opts ...grpc.CallOption) (*protobuf.FeedPostListReply, error)
|
||||
// 关注的动态
|
||||
Follow(ctx context.Context, in *FetchRequest, opts ...grpc.CallOption) (*PostListReply, error)
|
||||
Follow(ctx context.Context, in *protobuf.FetchRequest, opts ...grpc.CallOption) (*protobuf.FeedPostListReply, error)
|
||||
// 热门
|
||||
Hot(ctx context.Context, in *FetchRequest, opts ...grpc.CallOption) (*PostListReply, error)
|
||||
Hot(ctx context.Context, in *protobuf.FetchRequest, opts ...grpc.CallOption) (*protobuf.FeedPostListReply, error)
|
||||
}
|
||||
|
||||
type timelineClient struct {
|
||||
@@ -49,9 +50,9 @@ func NewTimelineClient(cc grpc.ClientConnInterface) TimelineClient {
|
||||
return &timelineClient{cc}
|
||||
}
|
||||
|
||||
func (c *timelineClient) Recommend(ctx context.Context, in *FetchRequest, opts ...grpc.CallOption) (*PostListReply, error) {
|
||||
func (c *timelineClient) Recommend(ctx context.Context, in *protobuf.FetchRequest, opts ...grpc.CallOption) (*protobuf.FeedPostListReply, error) {
|
||||
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
|
||||
out := new(PostListReply)
|
||||
out := new(protobuf.FeedPostListReply)
|
||||
err := c.cc.Invoke(ctx, Timeline_Recommend_FullMethodName, in, out, cOpts...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
@@ -59,9 +60,9 @@ func (c *timelineClient) Recommend(ctx context.Context, in *FetchRequest, opts .
|
||||
return out, nil
|
||||
}
|
||||
|
||||
func (c *timelineClient) Friend(ctx context.Context, in *FetchRequest, opts ...grpc.CallOption) (*PostListReply, error) {
|
||||
func (c *timelineClient) Friend(ctx context.Context, in *protobuf.FetchRequest, opts ...grpc.CallOption) (*protobuf.FeedPostListReply, error) {
|
||||
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
|
||||
out := new(PostListReply)
|
||||
out := new(protobuf.FeedPostListReply)
|
||||
err := c.cc.Invoke(ctx, Timeline_Friend_FullMethodName, in, out, cOpts...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
@@ -69,9 +70,9 @@ func (c *timelineClient) Friend(ctx context.Context, in *FetchRequest, opts ...g
|
||||
return out, nil
|
||||
}
|
||||
|
||||
func (c *timelineClient) Follow(ctx context.Context, in *FetchRequest, opts ...grpc.CallOption) (*PostListReply, error) {
|
||||
func (c *timelineClient) Follow(ctx context.Context, in *protobuf.FetchRequest, opts ...grpc.CallOption) (*protobuf.FeedPostListReply, error) {
|
||||
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
|
||||
out := new(PostListReply)
|
||||
out := new(protobuf.FeedPostListReply)
|
||||
err := c.cc.Invoke(ctx, Timeline_Follow_FullMethodName, in, out, cOpts...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
@@ -79,9 +80,9 @@ func (c *timelineClient) Follow(ctx context.Context, in *FetchRequest, opts ...g
|
||||
return out, nil
|
||||
}
|
||||
|
||||
func (c *timelineClient) Hot(ctx context.Context, in *FetchRequest, opts ...grpc.CallOption) (*PostListReply, error) {
|
||||
func (c *timelineClient) Hot(ctx context.Context, in *protobuf.FetchRequest, opts ...grpc.CallOption) (*protobuf.FeedPostListReply, error) {
|
||||
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
|
||||
out := new(PostListReply)
|
||||
out := new(protobuf.FeedPostListReply)
|
||||
err := c.cc.Invoke(ctx, Timeline_Hot_FullMethodName, in, out, cOpts...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
@@ -90,43 +91,41 @@ func (c *timelineClient) Hot(ctx context.Context, in *FetchRequest, opts ...grpc
|
||||
}
|
||||
|
||||
// TimelineServer is the server API for Timeline service.
|
||||
// All implementations must embed UnimplementedTimelineServer
|
||||
// All implementations should embed UnimplementedTimelineServer
|
||||
// for forward compatibility.
|
||||
//
|
||||
// 实时动态
|
||||
type TimelineServer interface {
|
||||
// 推荐
|
||||
Recommend(context.Context, *FetchRequest) (*PostListReply, error)
|
||||
Recommend(context.Context, *protobuf.FetchRequest) (*protobuf.FeedPostListReply, error)
|
||||
// 好友动态
|
||||
Friend(context.Context, *FetchRequest) (*PostListReply, error)
|
||||
Friend(context.Context, *protobuf.FetchRequest) (*protobuf.FeedPostListReply, error)
|
||||
// 关注的动态
|
||||
Follow(context.Context, *FetchRequest) (*PostListReply, error)
|
||||
Follow(context.Context, *protobuf.FetchRequest) (*protobuf.FeedPostListReply, error)
|
||||
// 热门
|
||||
Hot(context.Context, *FetchRequest) (*PostListReply, error)
|
||||
mustEmbedUnimplementedTimelineServer()
|
||||
Hot(context.Context, *protobuf.FetchRequest) (*protobuf.FeedPostListReply, error)
|
||||
}
|
||||
|
||||
// UnimplementedTimelineServer must be embedded to have
|
||||
// UnimplementedTimelineServer should be embedded to have
|
||||
// forward compatible implementations.
|
||||
//
|
||||
// NOTE: this should be embedded by value instead of pointer to avoid a nil
|
||||
// pointer dereference when methods are called.
|
||||
type UnimplementedTimelineServer struct{}
|
||||
|
||||
func (UnimplementedTimelineServer) Recommend(context.Context, *FetchRequest) (*PostListReply, error) {
|
||||
return nil, status.Errorf(codes.Unimplemented, "method Recommend not implemented")
|
||||
func (UnimplementedTimelineServer) Recommend(context.Context, *protobuf.FetchRequest) (*protobuf.FeedPostListReply, error) {
|
||||
return nil, status.Error(codes.Unimplemented, "method Recommend not implemented")
|
||||
}
|
||||
func (UnimplementedTimelineServer) Friend(context.Context, *FetchRequest) (*PostListReply, error) {
|
||||
return nil, status.Errorf(codes.Unimplemented, "method Friend not implemented")
|
||||
func (UnimplementedTimelineServer) Friend(context.Context, *protobuf.FetchRequest) (*protobuf.FeedPostListReply, error) {
|
||||
return nil, status.Error(codes.Unimplemented, "method Friend not implemented")
|
||||
}
|
||||
func (UnimplementedTimelineServer) Follow(context.Context, *FetchRequest) (*PostListReply, error) {
|
||||
return nil, status.Errorf(codes.Unimplemented, "method Follow not implemented")
|
||||
func (UnimplementedTimelineServer) Follow(context.Context, *protobuf.FetchRequest) (*protobuf.FeedPostListReply, error) {
|
||||
return nil, status.Error(codes.Unimplemented, "method Follow not implemented")
|
||||
}
|
||||
func (UnimplementedTimelineServer) Hot(context.Context, *FetchRequest) (*PostListReply, error) {
|
||||
return nil, status.Errorf(codes.Unimplemented, "method Hot not implemented")
|
||||
func (UnimplementedTimelineServer) Hot(context.Context, *protobuf.FetchRequest) (*protobuf.FeedPostListReply, error) {
|
||||
return nil, status.Error(codes.Unimplemented, "method Hot not implemented")
|
||||
}
|
||||
func (UnimplementedTimelineServer) mustEmbedUnimplementedTimelineServer() {}
|
||||
func (UnimplementedTimelineServer) testEmbeddedByValue() {}
|
||||
func (UnimplementedTimelineServer) testEmbeddedByValue() {}
|
||||
|
||||
// UnsafeTimelineServer may be embedded to opt out of forward compatibility for this service.
|
||||
// Use of this interface is not recommended, as added methods to TimelineServer will
|
||||
@@ -136,7 +135,7 @@ type UnsafeTimelineServer interface {
|
||||
}
|
||||
|
||||
func RegisterTimelineServer(s grpc.ServiceRegistrar, srv TimelineServer) {
|
||||
// If the following call pancis, it indicates UnimplementedTimelineServer was
|
||||
// If the following call panics, it indicates UnimplementedTimelineServer was
|
||||
// embedded by pointer and is nil. This will cause panics if an
|
||||
// unimplemented method is ever invoked, so we test this at initialization
|
||||
// time to prevent it from happening at runtime later due to I/O.
|
||||
@@ -147,7 +146,7 @@ func RegisterTimelineServer(s grpc.ServiceRegistrar, srv TimelineServer) {
|
||||
}
|
||||
|
||||
func _Timeline_Recommend_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
||||
in := new(FetchRequest)
|
||||
in := new(protobuf.FetchRequest)
|
||||
if err := dec(in); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
@@ -159,13 +158,13 @@ func _Timeline_Recommend_Handler(srv interface{}, ctx context.Context, dec func(
|
||||
FullMethod: Timeline_Recommend_FullMethodName,
|
||||
}
|
||||
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||
return srv.(TimelineServer).Recommend(ctx, req.(*FetchRequest))
|
||||
return srv.(TimelineServer).Recommend(ctx, req.(*protobuf.FetchRequest))
|
||||
}
|
||||
return interceptor(ctx, in, info, handler)
|
||||
}
|
||||
|
||||
func _Timeline_Friend_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
||||
in := new(FetchRequest)
|
||||
in := new(protobuf.FetchRequest)
|
||||
if err := dec(in); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
@@ -177,13 +176,13 @@ func _Timeline_Friend_Handler(srv interface{}, ctx context.Context, dec func(int
|
||||
FullMethod: Timeline_Friend_FullMethodName,
|
||||
}
|
||||
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||
return srv.(TimelineServer).Friend(ctx, req.(*FetchRequest))
|
||||
return srv.(TimelineServer).Friend(ctx, req.(*protobuf.FetchRequest))
|
||||
}
|
||||
return interceptor(ctx, in, info, handler)
|
||||
}
|
||||
|
||||
func _Timeline_Follow_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
||||
in := new(FetchRequest)
|
||||
in := new(protobuf.FetchRequest)
|
||||
if err := dec(in); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
@@ -195,13 +194,13 @@ func _Timeline_Follow_Handler(srv interface{}, ctx context.Context, dec func(int
|
||||
FullMethod: Timeline_Follow_FullMethodName,
|
||||
}
|
||||
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||
return srv.(TimelineServer).Follow(ctx, req.(*FetchRequest))
|
||||
return srv.(TimelineServer).Follow(ctx, req.(*protobuf.FetchRequest))
|
||||
}
|
||||
return interceptor(ctx, in, info, handler)
|
||||
}
|
||||
|
||||
func _Timeline_Hot_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
||||
in := new(FetchRequest)
|
||||
in := new(protobuf.FetchRequest)
|
||||
if err := dec(in); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
@@ -213,7 +212,7 @@ func _Timeline_Hot_Handler(srv interface{}, ctx context.Context, dec func(interf
|
||||
FullMethod: Timeline_Hot_FullMethodName,
|
||||
}
|
||||
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||
return srv.(TimelineServer).Hot(ctx, req.(*FetchRequest))
|
||||
return srv.(TimelineServer).Hot(ctx, req.(*protobuf.FetchRequest))
|
||||
}
|
||||
return interceptor(ctx, in, info, handler)
|
||||
}
|
||||
@@ -243,5 +242,5 @@ var Timeline_ServiceDesc = grpc.ServiceDesc{
|
||||
},
|
||||
},
|
||||
Streams: []grpc.StreamDesc{},
|
||||
Metadata: "timeline.proto",
|
||||
Metadata: "module/social/feed/proto/timeline.proto",
|
||||
}
|
||||
|
||||
@@ -1,66 +0,0 @@
|
||||
syntax = "proto3";
|
||||
package feed;
|
||||
option go_package = ".;feed";
|
||||
|
||||
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 PostListReply{
|
||||
repeated PostItem list = 1;
|
||||
int64 cnt = 2;
|
||||
}
|
||||
|
||||
// 推文
|
||||
message PostItem{
|
||||
string identity = 1; // 唯一标识
|
||||
string content = 2; // 内容
|
||||
int64 feed_id=3; // 通行证ID
|
||||
string feed_identity = 4; // 通行证Identity
|
||||
bool is_open =5; // 是否公开:默认为0-公开,1-不公开
|
||||
int64 cnt_unlike = 6; // 点踩数量
|
||||
int64 cnt_comment = 7; // 评论数量
|
||||
int64 cnt_like = 8; // 点赞数量
|
||||
repeated AttachItem attachs = 9; // 附件信息
|
||||
repeated TagItem tags = 10; // 所属话题
|
||||
}
|
||||
|
||||
// 附件
|
||||
message AttachItem{
|
||||
string identity = 1; // 唯一标识
|
||||
string attach_type = 2; // 文件类型
|
||||
string url = 3; // 文件路径
|
||||
}
|
||||
|
||||
// 标签
|
||||
message TagItem {
|
||||
string key = 1; // 标签唯一码
|
||||
string content = 2; // 标签内容
|
||||
}
|
||||
@@ -1,35 +1,35 @@
|
||||
syntax = "proto3";
|
||||
package feed;
|
||||
option go_package =".;feed";
|
||||
import "blocks.proto";
|
||||
option go_package = "bsm/full/module/social/feed/pb;feed";
|
||||
import "protobuf/blocks.proto";
|
||||
|
||||
// 推文相关操作
|
||||
service Post{
|
||||
|
||||
// 推文列表
|
||||
rpc Fetch(FetchRequest) returns (PostListReply){};
|
||||
rpc Fetch(blocks.FetchRequest) returns (blocks.FeedPostListReply){};
|
||||
// 新建推文
|
||||
rpc Create (PostItem) returns (StatusReply){};
|
||||
rpc Create (blocks.FeedPostItem) returns (blocks.DataStatusReply){};
|
||||
// 修改推文
|
||||
rpc Change (PostItem) returns (StatusReply){};
|
||||
rpc Change (blocks.FeedPostItem) returns (blocks.DataStatusReply){};
|
||||
// 删除推文
|
||||
rpc Remove (IdentRequest) returns (StatusReply){};
|
||||
rpc Remove (blocks.IdentRequest) returns (blocks.DataStatusReply){};
|
||||
|
||||
// 评论列表
|
||||
rpc CommentList (FetchRequest) returns (CommentListReply){};
|
||||
rpc CommentList (blocks.FetchRequest) returns (CommentListReply){};
|
||||
// 新建评论
|
||||
rpc AddComment (CommentItem) returns (StatusReply){};
|
||||
rpc AddComment (CommentItem) returns (blocks.DataStatusReply){};
|
||||
// 删除评论
|
||||
rpc DeleteComment (IdentRequest) returns (StatusReply){};
|
||||
rpc DeleteComment (blocks.IdentRequest) returns (blocks.DataStatusReply){};
|
||||
|
||||
// 计数操作
|
||||
rpc Action (PostActionRequest) returns (StatusReply){};
|
||||
rpc Action (PostActionRequest) returns (blocks.DataStatusReply){};
|
||||
}
|
||||
|
||||
// 推文评论列表
|
||||
message CommentListReply{
|
||||
repeated CommentItem list = 1; // 评论列表
|
||||
int64 total = 2;
|
||||
int64 total = 2;
|
||||
}
|
||||
|
||||
|
||||
@@ -37,15 +37,15 @@ message CommentItem{
|
||||
string identity = 1; // 评论identity
|
||||
string post_identity = 2; // 被评论唯一标识
|
||||
string feed_identity=3; // 评论人唯一标识
|
||||
string content = 4; // 评论内容
|
||||
repeated CommentItem sub_comment =5; // 子评论
|
||||
|
||||
string content = 4; // 评论内容
|
||||
repeated CommentItem sub_comment =5; // 子评论
|
||||
|
||||
}
|
||||
|
||||
message PostActionRequest{
|
||||
string action_op=1; //操作运作:ilike,unlike
|
||||
string action_type=2; //类别:推文,评论
|
||||
string identity = 3; // 唯一标识
|
||||
string identity = 3; // 唯一标识
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -1,12 +1,12 @@
|
||||
syntax = "proto3";
|
||||
package feed;
|
||||
option go_package =".;feed";
|
||||
import "blocks.proto";
|
||||
option go_package = "bsm/full/module/social/feed/pb;feed";
|
||||
import "protobuf/blocks.proto";
|
||||
|
||||
service Setting{
|
||||
// 修改个人信息
|
||||
rpc Info (Empty) returns (Empty){};
|
||||
rpc Info (blocks.Empty) returns (blocks.Empty){};
|
||||
// 修改权限信息
|
||||
rpc Rights (Empty) returns (Empty){};
|
||||
rpc Rights (blocks.Empty) returns (blocks.Empty){};
|
||||
}
|
||||
|
||||
|
||||
@@ -1,21 +1,21 @@
|
||||
syntax = "proto3";
|
||||
package feed;
|
||||
option go_package =".;feed";
|
||||
import "blocks.proto";
|
||||
option go_package = "bsm/full/module/social/feed/pb;feed";
|
||||
import "protobuf/blocks.proto";
|
||||
|
||||
service Tag{
|
||||
// 标签列表
|
||||
rpc List (FetchRequest) returns (TagListReply){};
|
||||
rpc List (blocks.FetchRequest) returns (TagListReply){};
|
||||
// 新建标签
|
||||
rpc Create (AddTagRequest) returns (StatusReply){};
|
||||
rpc Create (AddTagRequest) returns (blocks.DataStatusReply){};
|
||||
// 话题相关的文章
|
||||
rpc PostList (FetchRequest) returns (PostListReply){};
|
||||
rpc PostList (blocks.FetchRequest) returns (blocks.FeedPostListReply){};
|
||||
}
|
||||
|
||||
message AddTagRequest {
|
||||
repeated string tags = 1; // 标签名称
|
||||
}
|
||||
message TagListReply{
|
||||
repeated TagItem tags = 1;
|
||||
repeated blocks.FeedTagItem tags = 1;
|
||||
int64 total = 2;
|
||||
}
|
||||
|
||||
@@ -1,21 +1,21 @@
|
||||
syntax = "proto3";
|
||||
package feed;
|
||||
option go_package =".;feed";
|
||||
import "blocks.proto";
|
||||
option go_package = "bsm/full/module/social/feed/pb;feed";
|
||||
import "protobuf/blocks.proto";
|
||||
|
||||
|
||||
// 实时动态
|
||||
service Timeline{
|
||||
|
||||
// 推荐
|
||||
rpc Recommend (FetchRequest) returns (PostListReply){};
|
||||
rpc Recommend (blocks.FetchRequest) returns (blocks.FeedPostListReply){};
|
||||
|
||||
// 好友动态
|
||||
rpc Friend (FetchRequest) returns (PostListReply){};
|
||||
|
||||
rpc Friend (blocks.FetchRequest) returns (blocks.FeedPostListReply){};
|
||||
|
||||
// 关注的动态
|
||||
rpc Follow (FetchRequest) returns (PostListReply){};
|
||||
|
||||
rpc Follow (blocks.FetchRequest) returns (blocks.FeedPostListReply){};
|
||||
|
||||
// 热门
|
||||
rpc Hot (FetchRequest) returns (PostListReply){};
|
||||
rpc Hot (blocks.FetchRequest) returns (blocks.FeedPostListReply){};
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user