feat: import services and standardize Go 1.26.5
This commit is contained in:
707
apps/social/group/pb/blocks.pb.go
Normal file
707
apps/social/group/pb/blocks.pb.go
Normal file
@@ -0,0 +1,707 @@
|
||||
// Code generated by protoc-gen-go. DO NOT EDIT.
|
||||
// versions:
|
||||
// protoc-gen-go v1.36.8
|
||||
// protoc (unknown)
|
||||
// source: blocks.proto
|
||||
|
||||
package group
|
||||
|
||||
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"` // 内容
|
||||
PassportId int64 `protobuf:"varint,3,opt,name=passport_id,json=passportId,proto3" json:"passport_id,omitempty"` // 通行证ID
|
||||
PassportIdentity string `protobuf:"bytes,4,opt,name=passport_identity,json=passportIdentity,proto3" json:"passport_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) GetPassportId() int64 {
|
||||
if x != nil {
|
||||
return x.PassportId
|
||||
}
|
||||
return 0
|
||||
}
|
||||
|
||||
func (x *PostItem) GetPassportIdentity() string {
|
||||
if x != nil {
|
||||
return x.PassportIdentity
|
||||
}
|
||||
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" +
|
||||
"\x12group/blocks.proto\x12\x05group\"\xb8\x01\n" +
|
||||
"\fFetchRequest\x12\x17\n" +
|
||||
"\apage_no\x18\x01 \x01(\x03R\x06pageNo\x12\x1b\n" +
|
||||
"\tpage_size\x18\x02 \x01(\x03R\bpageSize\x127\n" +
|
||||
"\x06params\x18\x03 \x03(\v2\x1f.group.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\"F\n" +
|
||||
"\rPostListReply\x12#\n" +
|
||||
"\x04list\x18\x01 \x03(\v2\x0f.group.PostItemR\x04list\x12\x10\n" +
|
||||
"\x03cnt\x18\x02 \x01(\x03R\x03cnt\"\xd3\x02\n" +
|
||||
"\bPostItem\x12\x1a\n" +
|
||||
"\bidentity\x18\x01 \x01(\tR\bidentity\x12\x18\n" +
|
||||
"\acontent\x18\x02 \x01(\tR\acontent\x12\x1f\n" +
|
||||
"\vpassport_id\x18\x03 \x01(\x03R\n" +
|
||||
"passportId\x12+\n" +
|
||||
"\x11passport_identity\x18\x04 \x01(\tR\x10passportIdentity\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\x11.group.AttachItemR\aattachs\x12\"\n" +
|
||||
"\x04tags\x18\n" +
|
||||
" \x03(\v2\x0e.group.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\tZ\a.;groupb\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: group.FetchRequest
|
||||
(*IdentRequest)(nil), // 1: group.IdentRequest
|
||||
(*VersionRequest)(nil), // 2: group.VersionRequest
|
||||
(*SearchRequest)(nil), // 3: group.SearchRequest
|
||||
(*StatusReply)(nil), // 4: group.StatusReply
|
||||
(*Empty)(nil), // 5: group.Empty
|
||||
(*PostListReply)(nil), // 6: group.PostListReply
|
||||
(*PostItem)(nil), // 7: group.PostItem
|
||||
(*AttachItem)(nil), // 8: group.AttachItem
|
||||
(*TagItem)(nil), // 9: group.TagItem
|
||||
nil, // 10: group.FetchRequest.ParamsEntry
|
||||
}
|
||||
var file_blocks_proto_depIdxs = []int32{
|
||||
10, // 0: group.FetchRequest.params:type_name -> group.FetchRequest.ParamsEntry
|
||||
7, // 1: group.PostListReply.list:type_name -> group.PostItem
|
||||
8, // 2: group.PostItem.attachs:type_name -> group.AttachItem
|
||||
9, // 3: group.PostItem.tags:type_name -> group.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
|
||||
}
|
||||
361
apps/social/group/pb/group.pb.go
Normal file
361
apps/social/group/pb/group.pb.go
Normal file
@@ -0,0 +1,361 @@
|
||||
// Code generated by protoc-gen-go. DO NOT EDIT.
|
||||
// versions:
|
||||
// protoc-gen-go v1.36.8
|
||||
// protoc (unknown)
|
||||
// source: group.proto
|
||||
|
||||
package group
|
||||
|
||||
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 GroupItem struct {
|
||||
state protoimpl.MessageState `protogen:"open.v1"`
|
||||
Id int64 `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"` // 主键
|
||||
Identity string `protobuf:"bytes,2,opt,name=identity,proto3" json:"identity,omitempty"` // 唯一标识
|
||||
Number int64 `protobuf:"varint,3,opt,name=number,proto3" json:"number,omitempty"` // 群组编号
|
||||
Avatar string `protobuf:"bytes,4,opt,name=avatar,proto3" json:"avatar,omitempty"` // 群组头像
|
||||
Name string `protobuf:"bytes,5,opt,name=name,proto3" json:"name,omitempty"` // 群组名称
|
||||
Introduce string `protobuf:"bytes,6,opt,name=introduce,proto3" json:"introduce,omitempty"` // 群组简介
|
||||
CreatorId int64 `protobuf:"varint,7,opt,name=creator_id,json=creatorId,proto3" json:"creator_id,omitempty"` // 创建者ID
|
||||
CretorIdentity string `protobuf:"bytes,8,opt,name=cretor_identity,json=cretorIdentity,proto3" json:"cretor_identity,omitempty"` // 创建者Identity
|
||||
MemberLimit int32 `protobuf:"varint,9,opt,name=member_limit,json=memberLimit,proto3" json:"member_limit,omitempty"` //最大成员数,0代表不限制
|
||||
Master []string `protobuf:"bytes,10,rep,name=master,proto3" json:"master,omitempty"` // 管理员
|
||||
Notice string `protobuf:"bytes,11,opt,name=notice,proto3" json:"notice,omitempty"` // 群组公告
|
||||
Background string `protobuf:"bytes,12,opt,name=background,proto3" json:"background,omitempty"` // 群组背景
|
||||
Tags []string `protobuf:"bytes,13,rep,name=tags,proto3" json:"tags,omitempty"` // 群组标签
|
||||
MemberTotal int32 `protobuf:"varint,14,opt,name=member_total,json=memberTotal,proto3" json:"member_total,omitempty"` // 群组成员数
|
||||
EnableSearchByNumber bool `protobuf:"varint,15,opt,name=enable_search_by_number,json=enableSearchByNumber,proto3" json:"enable_search_by_number,omitempty"` //是否开启群号搜索
|
||||
EnableSearchByName bool `protobuf:"varint,16,opt,name=enable_search_by_name,json=enableSearchByName,proto3" json:"enable_search_by_name,omitempty"` //是否开启群名搜索
|
||||
CreatedAt string `protobuf:"bytes,17,opt,name=created_at,json=createdAt,proto3" json:"created_at,omitempty"` // 群组创建时间
|
||||
unknownFields protoimpl.UnknownFields
|
||||
sizeCache protoimpl.SizeCache
|
||||
}
|
||||
|
||||
func (x *GroupItem) Reset() {
|
||||
*x = GroupItem{}
|
||||
mi := &file_group_proto_msgTypes[0]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
|
||||
func (x *GroupItem) String() string {
|
||||
return protoimpl.X.MessageStringOf(x)
|
||||
}
|
||||
|
||||
func (*GroupItem) ProtoMessage() {}
|
||||
|
||||
func (x *GroupItem) ProtoReflect() protoreflect.Message {
|
||||
mi := &file_group_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 GroupItem.ProtoReflect.Descriptor instead.
|
||||
func (*GroupItem) Descriptor() ([]byte, []int) {
|
||||
return file_group_proto_rawDescGZIP(), []int{0}
|
||||
}
|
||||
|
||||
func (x *GroupItem) GetId() int64 {
|
||||
if x != nil {
|
||||
return x.Id
|
||||
}
|
||||
return 0
|
||||
}
|
||||
|
||||
func (x *GroupItem) GetIdentity() string {
|
||||
if x != nil {
|
||||
return x.Identity
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
func (x *GroupItem) GetNumber() int64 {
|
||||
if x != nil {
|
||||
return x.Number
|
||||
}
|
||||
return 0
|
||||
}
|
||||
|
||||
func (x *GroupItem) GetAvatar() string {
|
||||
if x != nil {
|
||||
return x.Avatar
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
func (x *GroupItem) GetName() string {
|
||||
if x != nil {
|
||||
return x.Name
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
func (x *GroupItem) GetIntroduce() string {
|
||||
if x != nil {
|
||||
return x.Introduce
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
func (x *GroupItem) GetCreatorId() int64 {
|
||||
if x != nil {
|
||||
return x.CreatorId
|
||||
}
|
||||
return 0
|
||||
}
|
||||
|
||||
func (x *GroupItem) GetCretorIdentity() string {
|
||||
if x != nil {
|
||||
return x.CretorIdentity
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
func (x *GroupItem) GetMemberLimit() int32 {
|
||||
if x != nil {
|
||||
return x.MemberLimit
|
||||
}
|
||||
return 0
|
||||
}
|
||||
|
||||
func (x *GroupItem) GetMaster() []string {
|
||||
if x != nil {
|
||||
return x.Master
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
func (x *GroupItem) GetNotice() string {
|
||||
if x != nil {
|
||||
return x.Notice
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
func (x *GroupItem) GetBackground() string {
|
||||
if x != nil {
|
||||
return x.Background
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
func (x *GroupItem) GetTags() []string {
|
||||
if x != nil {
|
||||
return x.Tags
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
func (x *GroupItem) GetMemberTotal() int32 {
|
||||
if x != nil {
|
||||
return x.MemberTotal
|
||||
}
|
||||
return 0
|
||||
}
|
||||
|
||||
func (x *GroupItem) GetEnableSearchByNumber() bool {
|
||||
if x != nil {
|
||||
return x.EnableSearchByNumber
|
||||
}
|
||||
return false
|
||||
}
|
||||
|
||||
func (x *GroupItem) GetEnableSearchByName() bool {
|
||||
if x != nil {
|
||||
return x.EnableSearchByName
|
||||
}
|
||||
return false
|
||||
}
|
||||
|
||||
func (x *GroupItem) GetCreatedAt() string {
|
||||
if x != nil {
|
||||
return x.CreatedAt
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
type GroupsReply struct {
|
||||
state protoimpl.MessageState `protogen:"open.v1"`
|
||||
Total int32 `protobuf:"varint,1,opt,name=total,proto3" json:"total,omitempty"` // 总记录数
|
||||
Version int64 `protobuf:"varint,2,opt,name=version,proto3" json:"version,omitempty"` //版本号
|
||||
Groups []*GroupItem `protobuf:"bytes,3,rep,name=groups,proto3" json:"groups,omitempty"` //群组信息
|
||||
unknownFields protoimpl.UnknownFields
|
||||
sizeCache protoimpl.SizeCache
|
||||
}
|
||||
|
||||
func (x *GroupsReply) Reset() {
|
||||
*x = GroupsReply{}
|
||||
mi := &file_group_proto_msgTypes[1]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
|
||||
func (x *GroupsReply) String() string {
|
||||
return protoimpl.X.MessageStringOf(x)
|
||||
}
|
||||
|
||||
func (*GroupsReply) ProtoMessage() {}
|
||||
|
||||
func (x *GroupsReply) ProtoReflect() protoreflect.Message {
|
||||
mi := &file_group_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 GroupsReply.ProtoReflect.Descriptor instead.
|
||||
func (*GroupsReply) Descriptor() ([]byte, []int) {
|
||||
return file_group_proto_rawDescGZIP(), []int{1}
|
||||
}
|
||||
|
||||
func (x *GroupsReply) GetTotal() int32 {
|
||||
if x != nil {
|
||||
return x.Total
|
||||
}
|
||||
return 0
|
||||
}
|
||||
|
||||
func (x *GroupsReply) GetVersion() int64 {
|
||||
if x != nil {
|
||||
return x.Version
|
||||
}
|
||||
return 0
|
||||
}
|
||||
|
||||
func (x *GroupsReply) GetGroups() []*GroupItem {
|
||||
if x != nil {
|
||||
return x.Groups
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
var File_group_proto protoreflect.FileDescriptor
|
||||
|
||||
const file_group_proto_rawDesc = "" +
|
||||
"\n" +
|
||||
"\x18social/group/group.proto\x12\x05group\x1a\x12group/blocks.proto\"\x94\x04\n" +
|
||||
"\tGroupItem\x12\x0e\n" +
|
||||
"\x02id\x18\x01 \x01(\x03R\x02id\x12\x1a\n" +
|
||||
"\bidentity\x18\x02 \x01(\tR\bidentity\x12\x16\n" +
|
||||
"\x06number\x18\x03 \x01(\x03R\x06number\x12\x16\n" +
|
||||
"\x06avatar\x18\x04 \x01(\tR\x06avatar\x12\x12\n" +
|
||||
"\x04name\x18\x05 \x01(\tR\x04name\x12\x1c\n" +
|
||||
"\tintroduce\x18\x06 \x01(\tR\tintroduce\x12\x1d\n" +
|
||||
"\n" +
|
||||
"creator_id\x18\a \x01(\x03R\tcreatorId\x12'\n" +
|
||||
"\x0fcretor_identity\x18\b \x01(\tR\x0ecretorIdentity\x12!\n" +
|
||||
"\fmember_limit\x18\t \x01(\x05R\vmemberLimit\x12\x16\n" +
|
||||
"\x06master\x18\n" +
|
||||
" \x03(\tR\x06master\x12\x16\n" +
|
||||
"\x06notice\x18\v \x01(\tR\x06notice\x12\x1e\n" +
|
||||
"\n" +
|
||||
"background\x18\f \x01(\tR\n" +
|
||||
"background\x12\x12\n" +
|
||||
"\x04tags\x18\r \x03(\tR\x04tags\x12!\n" +
|
||||
"\fmember_total\x18\x0e \x01(\x05R\vmemberTotal\x125\n" +
|
||||
"\x17enable_search_by_number\x18\x0f \x01(\bR\x14enableSearchByNumber\x121\n" +
|
||||
"\x15enable_search_by_name\x18\x10 \x01(\bR\x12enableSearchByName\x12\x1d\n" +
|
||||
"\n" +
|
||||
"created_at\x18\x11 \x01(\tR\tcreatedAt\"g\n" +
|
||||
"\vGroupsReply\x12\x14\n" +
|
||||
"\x05total\x18\x01 \x01(\x05R\x05total\x12\x18\n" +
|
||||
"\aversion\x18\x02 \x01(\x03R\aversion\x12(\n" +
|
||||
"\x06groups\x18\x03 \x03(\v2\x10.group.GroupItemR\x06groups2\xa8\x02\n" +
|
||||
"\x05Basic\x122\n" +
|
||||
"\x06Search\x12\x14.group.SearchRequest\x1a\x12.group.GroupsReply\x12)\n" +
|
||||
"\x05Fetch\x12\f.group.Empty\x1a\x12.group.GroupsReply\x12,\n" +
|
||||
"\x03Get\x12\x13.group.IdentRequest\x1a\x10.group.GroupItem\x12.\n" +
|
||||
"\x06Create\x12\x10.group.GroupItem\x1a\x12.group.StatusReply\x12.\n" +
|
||||
"\x06Modify\x12\x10.group.GroupItem\x1a\x12.group.StatusReply\x122\n" +
|
||||
"\aDisband\x12\x13.group.IdentRequest\x1a\x12.group.StatusReplyB\tZ\a.;groupb\x06proto3"
|
||||
|
||||
var (
|
||||
file_group_proto_rawDescOnce sync.Once
|
||||
file_group_proto_rawDescData []byte
|
||||
)
|
||||
|
||||
func file_group_proto_rawDescGZIP() []byte {
|
||||
file_group_proto_rawDescOnce.Do(func() {
|
||||
file_group_proto_rawDescData = protoimpl.X.CompressGZIP(unsafe.Slice(unsafe.StringData(file_group_proto_rawDesc), len(file_group_proto_rawDesc)))
|
||||
})
|
||||
return file_group_proto_rawDescData
|
||||
}
|
||||
|
||||
var file_group_proto_msgTypes = make([]protoimpl.MessageInfo, 2)
|
||||
var file_group_proto_goTypes = []any{
|
||||
(*GroupItem)(nil), // 0: group.GroupItem
|
||||
(*GroupsReply)(nil), // 1: group.GroupsReply
|
||||
(*SearchRequest)(nil), // 2: group.SearchRequest
|
||||
(*Empty)(nil), // 3: group.Empty
|
||||
(*IdentRequest)(nil), // 4: group.IdentRequest
|
||||
(*StatusReply)(nil), // 5: group.StatusReply
|
||||
}
|
||||
var file_group_proto_depIdxs = []int32{
|
||||
0, // 0: group.GroupsReply.groups:type_name -> group.GroupItem
|
||||
2, // 1: group.Basic.Search:input_type -> group.SearchRequest
|
||||
3, // 2: group.Basic.Fetch:input_type -> group.Empty
|
||||
4, // 3: group.Basic.Get:input_type -> group.IdentRequest
|
||||
0, // 4: group.Basic.Create:input_type -> group.GroupItem
|
||||
0, // 5: group.Basic.Modify:input_type -> group.GroupItem
|
||||
4, // 6: group.Basic.Disband:input_type -> group.IdentRequest
|
||||
1, // 7: group.Basic.Search:output_type -> group.GroupsReply
|
||||
1, // 8: group.Basic.Fetch:output_type -> group.GroupsReply
|
||||
0, // 9: group.Basic.Get:output_type -> group.GroupItem
|
||||
5, // 10: group.Basic.Create:output_type -> group.StatusReply
|
||||
5, // 11: group.Basic.Modify:output_type -> group.StatusReply
|
||||
5, // 12: group.Basic.Disband:output_type -> group.StatusReply
|
||||
7, // [7:13] is the sub-list for method output_type
|
||||
1, // [1:7] is the sub-list for method input_type
|
||||
1, // [1:1] is the sub-list for extension type_name
|
||||
1, // [1:1] is the sub-list for extension extendee
|
||||
0, // [0:1] is the sub-list for field type_name
|
||||
}
|
||||
|
||||
func init() { file_group_proto_init() }
|
||||
func file_group_proto_init() {
|
||||
if File_group_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_group_proto_rawDesc), len(file_group_proto_rawDesc)),
|
||||
NumEnums: 0,
|
||||
NumMessages: 2,
|
||||
NumExtensions: 0,
|
||||
NumServices: 1,
|
||||
},
|
||||
GoTypes: file_group_proto_goTypes,
|
||||
DependencyIndexes: file_group_proto_depIdxs,
|
||||
MessageInfos: file_group_proto_msgTypes,
|
||||
}.Build()
|
||||
File_group_proto = out.File
|
||||
file_group_proto_goTypes = nil
|
||||
file_group_proto_depIdxs = nil
|
||||
}
|
||||
487
apps/social/group/pb/group.pb.gw.go
Normal file
487
apps/social/group/pb/group.pb.gw.go
Normal file
@@ -0,0 +1,487 @@
|
||||
// Code generated by protoc-gen-grpc-gateway. DO NOT EDIT.
|
||||
// source: group.proto
|
||||
|
||||
/*
|
||||
Package group is a reverse proxy.
|
||||
|
||||
It translates gRPC into RESTful JSON APIs.
|
||||
*/
|
||||
package group
|
||||
|
||||
import (
|
||||
"context"
|
||||
"errors"
|
||||
"io"
|
||||
"net/http"
|
||||
|
||||
"github.com/grpc-ecosystem/grpc-gateway/v2/runtime"
|
||||
"github.com/grpc-ecosystem/grpc-gateway/v2/utilities"
|
||||
"google.golang.org/grpc"
|
||||
"google.golang.org/grpc/codes"
|
||||
"google.golang.org/grpc/grpclog"
|
||||
"google.golang.org/grpc/metadata"
|
||||
"google.golang.org/grpc/status"
|
||||
"google.golang.org/protobuf/proto"
|
||||
)
|
||||
|
||||
// Suppress "imported and not used" errors
|
||||
var (
|
||||
_ codes.Code
|
||||
_ io.Reader
|
||||
_ status.Status
|
||||
_ = errors.New
|
||||
_ = runtime.String
|
||||
_ = utilities.NewDoubleArray
|
||||
_ = metadata.Join
|
||||
)
|
||||
|
||||
func request_Basic_Search_0(ctx context.Context, marshaler runtime.Marshaler, client BasicClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
|
||||
var (
|
||||
protoReq SearchRequest
|
||||
metadata runtime.ServerMetadata
|
||||
)
|
||||
if err := marshaler.NewDecoder(req.Body).Decode(&protoReq); err != nil && !errors.Is(err, io.EOF) {
|
||||
return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err)
|
||||
}
|
||||
if req.Body != nil {
|
||||
_, _ = io.Copy(io.Discard, req.Body)
|
||||
}
|
||||
msg, err := client.Search(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD))
|
||||
return msg, metadata, err
|
||||
}
|
||||
|
||||
func local_request_Basic_Search_0(ctx context.Context, marshaler runtime.Marshaler, server BasicServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
|
||||
var (
|
||||
protoReq SearchRequest
|
||||
metadata runtime.ServerMetadata
|
||||
)
|
||||
if err := marshaler.NewDecoder(req.Body).Decode(&protoReq); err != nil && !errors.Is(err, io.EOF) {
|
||||
return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err)
|
||||
}
|
||||
msg, err := server.Search(ctx, &protoReq)
|
||||
return msg, metadata, err
|
||||
}
|
||||
|
||||
func request_Basic_Fetch_0(ctx context.Context, marshaler runtime.Marshaler, client BasicClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
|
||||
var (
|
||||
protoReq Empty
|
||||
metadata runtime.ServerMetadata
|
||||
)
|
||||
if err := marshaler.NewDecoder(req.Body).Decode(&protoReq); err != nil && !errors.Is(err, io.EOF) {
|
||||
return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err)
|
||||
}
|
||||
if req.Body != nil {
|
||||
_, _ = io.Copy(io.Discard, req.Body)
|
||||
}
|
||||
msg, err := client.Fetch(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD))
|
||||
return msg, metadata, err
|
||||
}
|
||||
|
||||
func local_request_Basic_Fetch_0(ctx context.Context, marshaler runtime.Marshaler, server BasicServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
|
||||
var (
|
||||
protoReq Empty
|
||||
metadata runtime.ServerMetadata
|
||||
)
|
||||
if err := marshaler.NewDecoder(req.Body).Decode(&protoReq); err != nil && !errors.Is(err, io.EOF) {
|
||||
return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err)
|
||||
}
|
||||
msg, err := server.Fetch(ctx, &protoReq)
|
||||
return msg, metadata, err
|
||||
}
|
||||
|
||||
func request_Basic_Get_0(ctx context.Context, marshaler runtime.Marshaler, client BasicClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
|
||||
var (
|
||||
protoReq IdentRequest
|
||||
metadata runtime.ServerMetadata
|
||||
)
|
||||
if err := marshaler.NewDecoder(req.Body).Decode(&protoReq); err != nil && !errors.Is(err, io.EOF) {
|
||||
return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err)
|
||||
}
|
||||
if req.Body != nil {
|
||||
_, _ = io.Copy(io.Discard, req.Body)
|
||||
}
|
||||
msg, err := client.Get(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD))
|
||||
return msg, metadata, err
|
||||
}
|
||||
|
||||
func local_request_Basic_Get_0(ctx context.Context, marshaler runtime.Marshaler, server BasicServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
|
||||
var (
|
||||
protoReq IdentRequest
|
||||
metadata runtime.ServerMetadata
|
||||
)
|
||||
if err := marshaler.NewDecoder(req.Body).Decode(&protoReq); err != nil && !errors.Is(err, io.EOF) {
|
||||
return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err)
|
||||
}
|
||||
msg, err := server.Get(ctx, &protoReq)
|
||||
return msg, metadata, err
|
||||
}
|
||||
|
||||
func request_Basic_Create_0(ctx context.Context, marshaler runtime.Marshaler, client BasicClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
|
||||
var (
|
||||
protoReq GroupItem
|
||||
metadata runtime.ServerMetadata
|
||||
)
|
||||
if err := marshaler.NewDecoder(req.Body).Decode(&protoReq); err != nil && !errors.Is(err, io.EOF) {
|
||||
return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err)
|
||||
}
|
||||
if req.Body != nil {
|
||||
_, _ = io.Copy(io.Discard, req.Body)
|
||||
}
|
||||
msg, err := client.Create(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD))
|
||||
return msg, metadata, err
|
||||
}
|
||||
|
||||
func local_request_Basic_Create_0(ctx context.Context, marshaler runtime.Marshaler, server BasicServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
|
||||
var (
|
||||
protoReq GroupItem
|
||||
metadata runtime.ServerMetadata
|
||||
)
|
||||
if err := marshaler.NewDecoder(req.Body).Decode(&protoReq); err != nil && !errors.Is(err, io.EOF) {
|
||||
return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err)
|
||||
}
|
||||
msg, err := server.Create(ctx, &protoReq)
|
||||
return msg, metadata, err
|
||||
}
|
||||
|
||||
func request_Basic_Modify_0(ctx context.Context, marshaler runtime.Marshaler, client BasicClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
|
||||
var (
|
||||
protoReq GroupItem
|
||||
metadata runtime.ServerMetadata
|
||||
)
|
||||
if err := marshaler.NewDecoder(req.Body).Decode(&protoReq); err != nil && !errors.Is(err, io.EOF) {
|
||||
return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err)
|
||||
}
|
||||
if req.Body != nil {
|
||||
_, _ = io.Copy(io.Discard, req.Body)
|
||||
}
|
||||
msg, err := client.Modify(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD))
|
||||
return msg, metadata, err
|
||||
}
|
||||
|
||||
func local_request_Basic_Modify_0(ctx context.Context, marshaler runtime.Marshaler, server BasicServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
|
||||
var (
|
||||
protoReq GroupItem
|
||||
metadata runtime.ServerMetadata
|
||||
)
|
||||
if err := marshaler.NewDecoder(req.Body).Decode(&protoReq); err != nil && !errors.Is(err, io.EOF) {
|
||||
return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err)
|
||||
}
|
||||
msg, err := server.Modify(ctx, &protoReq)
|
||||
return msg, metadata, err
|
||||
}
|
||||
|
||||
func request_Basic_Disband_0(ctx context.Context, marshaler runtime.Marshaler, client BasicClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
|
||||
var (
|
||||
protoReq IdentRequest
|
||||
metadata runtime.ServerMetadata
|
||||
)
|
||||
if err := marshaler.NewDecoder(req.Body).Decode(&protoReq); err != nil && !errors.Is(err, io.EOF) {
|
||||
return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err)
|
||||
}
|
||||
if req.Body != nil {
|
||||
_, _ = io.Copy(io.Discard, req.Body)
|
||||
}
|
||||
msg, err := client.Disband(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD))
|
||||
return msg, metadata, err
|
||||
}
|
||||
|
||||
func local_request_Basic_Disband_0(ctx context.Context, marshaler runtime.Marshaler, server BasicServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
|
||||
var (
|
||||
protoReq IdentRequest
|
||||
metadata runtime.ServerMetadata
|
||||
)
|
||||
if err := marshaler.NewDecoder(req.Body).Decode(&protoReq); err != nil && !errors.Is(err, io.EOF) {
|
||||
return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err)
|
||||
}
|
||||
msg, err := server.Disband(ctx, &protoReq)
|
||||
return msg, metadata, err
|
||||
}
|
||||
|
||||
// RegisterBasicHandlerServer registers the http handlers for service Basic to "mux".
|
||||
// UnaryRPC :call BasicServer directly.
|
||||
// StreamingRPC :currently unsupported pending https://github.com/grpc/grpc-go/issues/906.
|
||||
// Note that using this registration option will cause many gRPC library features to stop working. Consider using RegisterBasicHandlerFromEndpoint instead.
|
||||
// GRPC interceptors will not work for this type of registration. To use interceptors, you must use the "runtime.WithMiddlewares" option in the "runtime.NewServeMux" call.
|
||||
func RegisterBasicHandlerServer(ctx context.Context, mux *runtime.ServeMux, server BasicServer) error {
|
||||
mux.Handle(http.MethodPost, pattern_Basic_Search_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {
|
||||
ctx, cancel := context.WithCancel(req.Context())
|
||||
defer cancel()
|
||||
var stream runtime.ServerTransportStream
|
||||
ctx = grpc.NewContextWithServerTransportStream(ctx, &stream)
|
||||
inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
|
||||
annotatedContext, err := runtime.AnnotateIncomingContext(ctx, mux, req, "/group.Basic/Search", runtime.WithHTTPPathPattern("/group.Basic/Search"))
|
||||
if err != nil {
|
||||
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
|
||||
return
|
||||
}
|
||||
resp, md, err := local_request_Basic_Search_0(annotatedContext, inboundMarshaler, server, req, pathParams)
|
||||
md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer())
|
||||
annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md)
|
||||
if err != nil {
|
||||
runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err)
|
||||
return
|
||||
}
|
||||
forward_Basic_Search_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
|
||||
})
|
||||
mux.Handle(http.MethodPost, pattern_Basic_Fetch_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {
|
||||
ctx, cancel := context.WithCancel(req.Context())
|
||||
defer cancel()
|
||||
var stream runtime.ServerTransportStream
|
||||
ctx = grpc.NewContextWithServerTransportStream(ctx, &stream)
|
||||
inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
|
||||
annotatedContext, err := runtime.AnnotateIncomingContext(ctx, mux, req, "/group.Basic/Fetch", runtime.WithHTTPPathPattern("/group.Basic/Fetch"))
|
||||
if err != nil {
|
||||
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
|
||||
return
|
||||
}
|
||||
resp, md, err := local_request_Basic_Fetch_0(annotatedContext, inboundMarshaler, server, req, pathParams)
|
||||
md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer())
|
||||
annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md)
|
||||
if err != nil {
|
||||
runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err)
|
||||
return
|
||||
}
|
||||
forward_Basic_Fetch_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
|
||||
})
|
||||
mux.Handle(http.MethodPost, pattern_Basic_Get_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {
|
||||
ctx, cancel := context.WithCancel(req.Context())
|
||||
defer cancel()
|
||||
var stream runtime.ServerTransportStream
|
||||
ctx = grpc.NewContextWithServerTransportStream(ctx, &stream)
|
||||
inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
|
||||
annotatedContext, err := runtime.AnnotateIncomingContext(ctx, mux, req, "/group.Basic/Get", runtime.WithHTTPPathPattern("/group.Basic/Get"))
|
||||
if err != nil {
|
||||
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
|
||||
return
|
||||
}
|
||||
resp, md, err := local_request_Basic_Get_0(annotatedContext, inboundMarshaler, server, req, pathParams)
|
||||
md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer())
|
||||
annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md)
|
||||
if err != nil {
|
||||
runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err)
|
||||
return
|
||||
}
|
||||
forward_Basic_Get_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
|
||||
})
|
||||
mux.Handle(http.MethodPost, pattern_Basic_Create_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {
|
||||
ctx, cancel := context.WithCancel(req.Context())
|
||||
defer cancel()
|
||||
var stream runtime.ServerTransportStream
|
||||
ctx = grpc.NewContextWithServerTransportStream(ctx, &stream)
|
||||
inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
|
||||
annotatedContext, err := runtime.AnnotateIncomingContext(ctx, mux, req, "/group.Basic/Create", runtime.WithHTTPPathPattern("/group.Basic/Create"))
|
||||
if err != nil {
|
||||
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
|
||||
return
|
||||
}
|
||||
resp, md, err := local_request_Basic_Create_0(annotatedContext, inboundMarshaler, server, req, pathParams)
|
||||
md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer())
|
||||
annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md)
|
||||
if err != nil {
|
||||
runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err)
|
||||
return
|
||||
}
|
||||
forward_Basic_Create_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
|
||||
})
|
||||
mux.Handle(http.MethodPost, pattern_Basic_Modify_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {
|
||||
ctx, cancel := context.WithCancel(req.Context())
|
||||
defer cancel()
|
||||
var stream runtime.ServerTransportStream
|
||||
ctx = grpc.NewContextWithServerTransportStream(ctx, &stream)
|
||||
inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
|
||||
annotatedContext, err := runtime.AnnotateIncomingContext(ctx, mux, req, "/group.Basic/Modify", runtime.WithHTTPPathPattern("/group.Basic/Modify"))
|
||||
if err != nil {
|
||||
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
|
||||
return
|
||||
}
|
||||
resp, md, err := local_request_Basic_Modify_0(annotatedContext, inboundMarshaler, server, req, pathParams)
|
||||
md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer())
|
||||
annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md)
|
||||
if err != nil {
|
||||
runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err)
|
||||
return
|
||||
}
|
||||
forward_Basic_Modify_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
|
||||
})
|
||||
mux.Handle(http.MethodPost, pattern_Basic_Disband_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {
|
||||
ctx, cancel := context.WithCancel(req.Context())
|
||||
defer cancel()
|
||||
var stream runtime.ServerTransportStream
|
||||
ctx = grpc.NewContextWithServerTransportStream(ctx, &stream)
|
||||
inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
|
||||
annotatedContext, err := runtime.AnnotateIncomingContext(ctx, mux, req, "/group.Basic/Disband", runtime.WithHTTPPathPattern("/group.Basic/Disband"))
|
||||
if err != nil {
|
||||
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
|
||||
return
|
||||
}
|
||||
resp, md, err := local_request_Basic_Disband_0(annotatedContext, inboundMarshaler, server, req, pathParams)
|
||||
md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer())
|
||||
annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md)
|
||||
if err != nil {
|
||||
runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err)
|
||||
return
|
||||
}
|
||||
forward_Basic_Disband_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
|
||||
})
|
||||
|
||||
return nil
|
||||
}
|
||||
|
||||
// RegisterBasicHandlerFromEndpoint is same as RegisterBasicHandler but
|
||||
// automatically dials to "endpoint" and closes the connection when "ctx" gets done.
|
||||
func RegisterBasicHandlerFromEndpoint(ctx context.Context, mux *runtime.ServeMux, endpoint string, opts []grpc.DialOption) (err error) {
|
||||
conn, err := grpc.NewClient(endpoint, opts...)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
defer func() {
|
||||
if err != nil {
|
||||
if cerr := conn.Close(); cerr != nil {
|
||||
grpclog.Errorf("Failed to close conn to %s: %v", endpoint, cerr)
|
||||
}
|
||||
return
|
||||
}
|
||||
go func() {
|
||||
<-ctx.Done()
|
||||
if cerr := conn.Close(); cerr != nil {
|
||||
grpclog.Errorf("Failed to close conn to %s: %v", endpoint, cerr)
|
||||
}
|
||||
}()
|
||||
}()
|
||||
return RegisterBasicHandler(ctx, mux, conn)
|
||||
}
|
||||
|
||||
// RegisterBasicHandler registers the http handlers for service Basic to "mux".
|
||||
// The handlers forward requests to the grpc endpoint over "conn".
|
||||
func RegisterBasicHandler(ctx context.Context, mux *runtime.ServeMux, conn *grpc.ClientConn) error {
|
||||
return RegisterBasicHandlerClient(ctx, mux, NewBasicClient(conn))
|
||||
}
|
||||
|
||||
// RegisterBasicHandlerClient registers the http handlers for service Basic
|
||||
// to "mux". The handlers forward requests to the grpc endpoint over the given implementation of "BasicClient".
|
||||
// Note: the gRPC framework executes interceptors within the gRPC handler. If the passed in "BasicClient"
|
||||
// doesn't go through the normal gRPC flow (creating a gRPC client etc.) then it will be up to the passed in
|
||||
// "BasicClient" to call the correct interceptors. This client ignores the HTTP middlewares.
|
||||
func RegisterBasicHandlerClient(ctx context.Context, mux *runtime.ServeMux, client BasicClient) error {
|
||||
mux.Handle(http.MethodPost, pattern_Basic_Search_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {
|
||||
ctx, cancel := context.WithCancel(req.Context())
|
||||
defer cancel()
|
||||
inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
|
||||
annotatedContext, err := runtime.AnnotateContext(ctx, mux, req, "/group.Basic/Search", runtime.WithHTTPPathPattern("/group.Basic/Search"))
|
||||
if err != nil {
|
||||
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
|
||||
return
|
||||
}
|
||||
resp, md, err := request_Basic_Search_0(annotatedContext, inboundMarshaler, client, req, pathParams)
|
||||
annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md)
|
||||
if err != nil {
|
||||
runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err)
|
||||
return
|
||||
}
|
||||
forward_Basic_Search_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
|
||||
})
|
||||
mux.Handle(http.MethodPost, pattern_Basic_Fetch_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {
|
||||
ctx, cancel := context.WithCancel(req.Context())
|
||||
defer cancel()
|
||||
inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
|
||||
annotatedContext, err := runtime.AnnotateContext(ctx, mux, req, "/group.Basic/Fetch", runtime.WithHTTPPathPattern("/group.Basic/Fetch"))
|
||||
if err != nil {
|
||||
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
|
||||
return
|
||||
}
|
||||
resp, md, err := request_Basic_Fetch_0(annotatedContext, inboundMarshaler, client, req, pathParams)
|
||||
annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md)
|
||||
if err != nil {
|
||||
runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err)
|
||||
return
|
||||
}
|
||||
forward_Basic_Fetch_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
|
||||
})
|
||||
mux.Handle(http.MethodPost, pattern_Basic_Get_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {
|
||||
ctx, cancel := context.WithCancel(req.Context())
|
||||
defer cancel()
|
||||
inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
|
||||
annotatedContext, err := runtime.AnnotateContext(ctx, mux, req, "/group.Basic/Get", runtime.WithHTTPPathPattern("/group.Basic/Get"))
|
||||
if err != nil {
|
||||
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
|
||||
return
|
||||
}
|
||||
resp, md, err := request_Basic_Get_0(annotatedContext, inboundMarshaler, client, req, pathParams)
|
||||
annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md)
|
||||
if err != nil {
|
||||
runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err)
|
||||
return
|
||||
}
|
||||
forward_Basic_Get_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
|
||||
})
|
||||
mux.Handle(http.MethodPost, pattern_Basic_Create_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {
|
||||
ctx, cancel := context.WithCancel(req.Context())
|
||||
defer cancel()
|
||||
inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
|
||||
annotatedContext, err := runtime.AnnotateContext(ctx, mux, req, "/group.Basic/Create", runtime.WithHTTPPathPattern("/group.Basic/Create"))
|
||||
if err != nil {
|
||||
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
|
||||
return
|
||||
}
|
||||
resp, md, err := request_Basic_Create_0(annotatedContext, inboundMarshaler, client, req, pathParams)
|
||||
annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md)
|
||||
if err != nil {
|
||||
runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err)
|
||||
return
|
||||
}
|
||||
forward_Basic_Create_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
|
||||
})
|
||||
mux.Handle(http.MethodPost, pattern_Basic_Modify_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {
|
||||
ctx, cancel := context.WithCancel(req.Context())
|
||||
defer cancel()
|
||||
inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
|
||||
annotatedContext, err := runtime.AnnotateContext(ctx, mux, req, "/group.Basic/Modify", runtime.WithHTTPPathPattern("/group.Basic/Modify"))
|
||||
if err != nil {
|
||||
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
|
||||
return
|
||||
}
|
||||
resp, md, err := request_Basic_Modify_0(annotatedContext, inboundMarshaler, client, req, pathParams)
|
||||
annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md)
|
||||
if err != nil {
|
||||
runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err)
|
||||
return
|
||||
}
|
||||
forward_Basic_Modify_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
|
||||
})
|
||||
mux.Handle(http.MethodPost, pattern_Basic_Disband_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {
|
||||
ctx, cancel := context.WithCancel(req.Context())
|
||||
defer cancel()
|
||||
inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
|
||||
annotatedContext, err := runtime.AnnotateContext(ctx, mux, req, "/group.Basic/Disband", runtime.WithHTTPPathPattern("/group.Basic/Disband"))
|
||||
if err != nil {
|
||||
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
|
||||
return
|
||||
}
|
||||
resp, md, err := request_Basic_Disband_0(annotatedContext, inboundMarshaler, client, req, pathParams)
|
||||
annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md)
|
||||
if err != nil {
|
||||
runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err)
|
||||
return
|
||||
}
|
||||
forward_Basic_Disband_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
|
||||
})
|
||||
return nil
|
||||
}
|
||||
|
||||
var (
|
||||
pattern_Basic_Search_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1}, []string{"group.Basic", "Search"}, ""))
|
||||
pattern_Basic_Fetch_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1}, []string{"group.Basic", "Fetch"}, ""))
|
||||
pattern_Basic_Get_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1}, []string{"group.Basic", "Get"}, ""))
|
||||
pattern_Basic_Create_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1}, []string{"group.Basic", "Create"}, ""))
|
||||
pattern_Basic_Modify_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1}, []string{"group.Basic", "Modify"}, ""))
|
||||
pattern_Basic_Disband_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1}, []string{"group.Basic", "Disband"}, ""))
|
||||
)
|
||||
|
||||
var (
|
||||
forward_Basic_Search_0 = runtime.ForwardResponseMessage
|
||||
forward_Basic_Fetch_0 = runtime.ForwardResponseMessage
|
||||
forward_Basic_Get_0 = runtime.ForwardResponseMessage
|
||||
forward_Basic_Create_0 = runtime.ForwardResponseMessage
|
||||
forward_Basic_Modify_0 = runtime.ForwardResponseMessage
|
||||
forward_Basic_Disband_0 = runtime.ForwardResponseMessage
|
||||
)
|
||||
327
apps/social/group/pb/group_grpc.pb.go
Normal file
327
apps/social/group/pb/group_grpc.pb.go
Normal file
@@ -0,0 +1,327 @@
|
||||
// Code generated by protoc-gen-go-grpc. DO NOT EDIT.
|
||||
// versions:
|
||||
// - protoc-gen-go-grpc v1.5.1
|
||||
// - protoc (unknown)
|
||||
// source: group.proto
|
||||
|
||||
package group
|
||||
|
||||
import (
|
||||
context "context"
|
||||
grpc "google.golang.org/grpc"
|
||||
codes "google.golang.org/grpc/codes"
|
||||
status "google.golang.org/grpc/status"
|
||||
)
|
||||
|
||||
// This is a compile-time assertion to ensure that this generated file
|
||||
// is compatible with the grpc package it is being compiled against.
|
||||
// Requires gRPC-Go v1.64.0 or later.
|
||||
const _ = grpc.SupportPackageIsVersion9
|
||||
|
||||
const (
|
||||
Basic_Search_FullMethodName = "/group.Basic/Search"
|
||||
Basic_Fetch_FullMethodName = "/group.Basic/Fetch"
|
||||
Basic_Get_FullMethodName = "/group.Basic/Get"
|
||||
Basic_Create_FullMethodName = "/group.Basic/Create"
|
||||
Basic_Modify_FullMethodName = "/group.Basic/Modify"
|
||||
Basic_Disband_FullMethodName = "/group.Basic/Disband"
|
||||
)
|
||||
|
||||
// BasicClient is the client API for Basic service.
|
||||
//
|
||||
// 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 BasicClient interface {
|
||||
//搜索
|
||||
Search(ctx context.Context, in *SearchRequest, opts ...grpc.CallOption) (*GroupsReply, error)
|
||||
//获取群组列表
|
||||
Fetch(ctx context.Context, in *Empty, opts ...grpc.CallOption) (*GroupsReply, error)
|
||||
//获取群组信息
|
||||
Get(ctx context.Context, in *IdentRequest, opts ...grpc.CallOption) (*GroupItem, error)
|
||||
//创建群组
|
||||
Create(ctx context.Context, in *GroupItem, opts ...grpc.CallOption) (*StatusReply, error)
|
||||
//修改群组信息
|
||||
Modify(ctx context.Context, in *GroupItem, opts ...grpc.CallOption) (*StatusReply, error)
|
||||
//解散群组
|
||||
Disband(ctx context.Context, in *IdentRequest, opts ...grpc.CallOption) (*StatusReply, error)
|
||||
}
|
||||
|
||||
type basicClient struct {
|
||||
cc grpc.ClientConnInterface
|
||||
}
|
||||
|
||||
func NewBasicClient(cc grpc.ClientConnInterface) BasicClient {
|
||||
return &basicClient{cc}
|
||||
}
|
||||
|
||||
func (c *basicClient) Search(ctx context.Context, in *SearchRequest, opts ...grpc.CallOption) (*GroupsReply, error) {
|
||||
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
|
||||
out := new(GroupsReply)
|
||||
err := c.cc.Invoke(ctx, Basic_Search_FullMethodName, in, out, cOpts...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return out, nil
|
||||
}
|
||||
|
||||
func (c *basicClient) Fetch(ctx context.Context, in *Empty, opts ...grpc.CallOption) (*GroupsReply, error) {
|
||||
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
|
||||
out := new(GroupsReply)
|
||||
err := c.cc.Invoke(ctx, Basic_Fetch_FullMethodName, in, out, cOpts...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return out, nil
|
||||
}
|
||||
|
||||
func (c *basicClient) Get(ctx context.Context, in *IdentRequest, opts ...grpc.CallOption) (*GroupItem, error) {
|
||||
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
|
||||
out := new(GroupItem)
|
||||
err := c.cc.Invoke(ctx, Basic_Get_FullMethodName, in, out, cOpts...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return out, nil
|
||||
}
|
||||
|
||||
func (c *basicClient) Create(ctx context.Context, in *GroupItem, opts ...grpc.CallOption) (*StatusReply, error) {
|
||||
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
|
||||
out := new(StatusReply)
|
||||
err := c.cc.Invoke(ctx, Basic_Create_FullMethodName, in, out, cOpts...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return out, nil
|
||||
}
|
||||
|
||||
func (c *basicClient) Modify(ctx context.Context, in *GroupItem, opts ...grpc.CallOption) (*StatusReply, error) {
|
||||
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
|
||||
out := new(StatusReply)
|
||||
err := c.cc.Invoke(ctx, Basic_Modify_FullMethodName, in, out, cOpts...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return out, nil
|
||||
}
|
||||
|
||||
func (c *basicClient) Disband(ctx context.Context, in *IdentRequest, opts ...grpc.CallOption) (*StatusReply, error) {
|
||||
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
|
||||
out := new(StatusReply)
|
||||
err := c.cc.Invoke(ctx, Basic_Disband_FullMethodName, in, out, cOpts...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return out, nil
|
||||
}
|
||||
|
||||
// BasicServer is the server API for Basic service.
|
||||
// All implementations must embed UnimplementedBasicServer
|
||||
// for forward compatibility.
|
||||
//
|
||||
// 群组
|
||||
type BasicServer interface {
|
||||
//搜索
|
||||
Search(context.Context, *SearchRequest) (*GroupsReply, error)
|
||||
//获取群组列表
|
||||
Fetch(context.Context, *Empty) (*GroupsReply, error)
|
||||
//获取群组信息
|
||||
Get(context.Context, *IdentRequest) (*GroupItem, error)
|
||||
//创建群组
|
||||
Create(context.Context, *GroupItem) (*StatusReply, error)
|
||||
//修改群组信息
|
||||
Modify(context.Context, *GroupItem) (*StatusReply, error)
|
||||
//解散群组
|
||||
Disband(context.Context, *IdentRequest) (*StatusReply, error)
|
||||
mustEmbedUnimplementedBasicServer()
|
||||
}
|
||||
|
||||
// UnimplementedBasicServer must 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 UnimplementedBasicServer struct{}
|
||||
|
||||
func (UnimplementedBasicServer) Search(context.Context, *SearchRequest) (*GroupsReply, error) {
|
||||
return nil, status.Errorf(codes.Unimplemented, "method Search not implemented")
|
||||
}
|
||||
func (UnimplementedBasicServer) Fetch(context.Context, *Empty) (*GroupsReply, error) {
|
||||
return nil, status.Errorf(codes.Unimplemented, "method Fetch not implemented")
|
||||
}
|
||||
func (UnimplementedBasicServer) Get(context.Context, *IdentRequest) (*GroupItem, error) {
|
||||
return nil, status.Errorf(codes.Unimplemented, "method Get not implemented")
|
||||
}
|
||||
func (UnimplementedBasicServer) Create(context.Context, *GroupItem) (*StatusReply, error) {
|
||||
return nil, status.Errorf(codes.Unimplemented, "method Create not implemented")
|
||||
}
|
||||
func (UnimplementedBasicServer) Modify(context.Context, *GroupItem) (*StatusReply, error) {
|
||||
return nil, status.Errorf(codes.Unimplemented, "method Modify not implemented")
|
||||
}
|
||||
func (UnimplementedBasicServer) Disband(context.Context, *IdentRequest) (*StatusReply, error) {
|
||||
return nil, status.Errorf(codes.Unimplemented, "method Disband not implemented")
|
||||
}
|
||||
func (UnimplementedBasicServer) mustEmbedUnimplementedBasicServer() {}
|
||||
func (UnimplementedBasicServer) testEmbeddedByValue() {}
|
||||
|
||||
// UnsafeBasicServer may be embedded to opt out of forward compatibility for this service.
|
||||
// Use of this interface is not recommended, as added methods to BasicServer will
|
||||
// result in compilation errors.
|
||||
type UnsafeBasicServer interface {
|
||||
mustEmbedUnimplementedBasicServer()
|
||||
}
|
||||
|
||||
func RegisterBasicServer(s grpc.ServiceRegistrar, srv BasicServer) {
|
||||
// If the following call pancis, it indicates UnimplementedBasicServer 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.
|
||||
if t, ok := srv.(interface{ testEmbeddedByValue() }); ok {
|
||||
t.testEmbeddedByValue()
|
||||
}
|
||||
s.RegisterService(&Basic_ServiceDesc, srv)
|
||||
}
|
||||
|
||||
func _Basic_Search_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
||||
in := new(SearchRequest)
|
||||
if err := dec(in); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
if interceptor == nil {
|
||||
return srv.(BasicServer).Search(ctx, in)
|
||||
}
|
||||
info := &grpc.UnaryServerInfo{
|
||||
Server: srv,
|
||||
FullMethod: Basic_Search_FullMethodName,
|
||||
}
|
||||
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||
return srv.(BasicServer).Search(ctx, req.(*SearchRequest))
|
||||
}
|
||||
return interceptor(ctx, in, info, handler)
|
||||
}
|
||||
|
||||
func _Basic_Fetch_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
||||
in := new(Empty)
|
||||
if err := dec(in); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
if interceptor == nil {
|
||||
return srv.(BasicServer).Fetch(ctx, in)
|
||||
}
|
||||
info := &grpc.UnaryServerInfo{
|
||||
Server: srv,
|
||||
FullMethod: Basic_Fetch_FullMethodName,
|
||||
}
|
||||
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||
return srv.(BasicServer).Fetch(ctx, req.(*Empty))
|
||||
}
|
||||
return interceptor(ctx, in, info, handler)
|
||||
}
|
||||
|
||||
func _Basic_Get_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
||||
in := new(IdentRequest)
|
||||
if err := dec(in); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
if interceptor == nil {
|
||||
return srv.(BasicServer).Get(ctx, in)
|
||||
}
|
||||
info := &grpc.UnaryServerInfo{
|
||||
Server: srv,
|
||||
FullMethod: Basic_Get_FullMethodName,
|
||||
}
|
||||
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||
return srv.(BasicServer).Get(ctx, req.(*IdentRequest))
|
||||
}
|
||||
return interceptor(ctx, in, info, handler)
|
||||
}
|
||||
|
||||
func _Basic_Create_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
||||
in := new(GroupItem)
|
||||
if err := dec(in); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
if interceptor == nil {
|
||||
return srv.(BasicServer).Create(ctx, in)
|
||||
}
|
||||
info := &grpc.UnaryServerInfo{
|
||||
Server: srv,
|
||||
FullMethod: Basic_Create_FullMethodName,
|
||||
}
|
||||
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||
return srv.(BasicServer).Create(ctx, req.(*GroupItem))
|
||||
}
|
||||
return interceptor(ctx, in, info, handler)
|
||||
}
|
||||
|
||||
func _Basic_Modify_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
||||
in := new(GroupItem)
|
||||
if err := dec(in); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
if interceptor == nil {
|
||||
return srv.(BasicServer).Modify(ctx, in)
|
||||
}
|
||||
info := &grpc.UnaryServerInfo{
|
||||
Server: srv,
|
||||
FullMethod: Basic_Modify_FullMethodName,
|
||||
}
|
||||
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||
return srv.(BasicServer).Modify(ctx, req.(*GroupItem))
|
||||
}
|
||||
return interceptor(ctx, in, info, handler)
|
||||
}
|
||||
|
||||
func _Basic_Disband_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
||||
in := new(IdentRequest)
|
||||
if err := dec(in); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
if interceptor == nil {
|
||||
return srv.(BasicServer).Disband(ctx, in)
|
||||
}
|
||||
info := &grpc.UnaryServerInfo{
|
||||
Server: srv,
|
||||
FullMethod: Basic_Disband_FullMethodName,
|
||||
}
|
||||
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||
return srv.(BasicServer).Disband(ctx, req.(*IdentRequest))
|
||||
}
|
||||
return interceptor(ctx, in, info, handler)
|
||||
}
|
||||
|
||||
// Basic_ServiceDesc is the grpc.ServiceDesc for Basic service.
|
||||
// It's only intended for direct use with grpc.RegisterService,
|
||||
// and not to be introspected or modified (even as a copy)
|
||||
var Basic_ServiceDesc = grpc.ServiceDesc{
|
||||
ServiceName: "group.Basic",
|
||||
HandlerType: (*BasicServer)(nil),
|
||||
Methods: []grpc.MethodDesc{
|
||||
{
|
||||
MethodName: "Search",
|
||||
Handler: _Basic_Search_Handler,
|
||||
},
|
||||
{
|
||||
MethodName: "Fetch",
|
||||
Handler: _Basic_Fetch_Handler,
|
||||
},
|
||||
{
|
||||
MethodName: "Get",
|
||||
Handler: _Basic_Get_Handler,
|
||||
},
|
||||
{
|
||||
MethodName: "Create",
|
||||
Handler: _Basic_Create_Handler,
|
||||
},
|
||||
{
|
||||
MethodName: "Modify",
|
||||
Handler: _Basic_Modify_Handler,
|
||||
},
|
||||
{
|
||||
MethodName: "Disband",
|
||||
Handler: _Basic_Disband_Handler,
|
||||
},
|
||||
},
|
||||
Streams: []grpc.StreamDesc{},
|
||||
Metadata: "group.proto",
|
||||
}
|
||||
698
apps/social/group/pb/member.pb.go
Normal file
698
apps/social/group/pb/member.pb.go
Normal file
@@ -0,0 +1,698 @@
|
||||
// Code generated by protoc-gen-go. DO NOT EDIT.
|
||||
// versions:
|
||||
// protoc-gen-go v1.36.8
|
||||
// protoc (unknown)
|
||||
// source: member.proto
|
||||
|
||||
package group
|
||||
|
||||
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 PassportInfoSimpleCard struct {
|
||||
state protoimpl.MessageState `protogen:"open.v1"`
|
||||
Identity string `protobuf:"bytes,1,opt,name=identity,proto3" json:"identity,omitempty"`
|
||||
Nickname string `protobuf:"bytes,2,opt,name=nickname,proto3" json:"nickname,omitempty"` //昵称
|
||||
RemarkName string `protobuf:"bytes,3,opt,name=remark_name,json=remarkName,proto3" json:"remark_name,omitempty"` // 备注名称
|
||||
Avatar string `protobuf:"bytes,4,opt,name=avatar,proto3" json:"avatar,omitempty"`
|
||||
Sex int32 `protobuf:"varint,5,opt,name=sex,proto3" json:"sex,omitempty"` //性别,1为男性,2为女性
|
||||
Role int32 `protobuf:"varint,6,opt,name=role,proto3" json:"role,omitempty"` //角色,主要是群组内的角色使用
|
||||
unknownFields protoimpl.UnknownFields
|
||||
sizeCache protoimpl.SizeCache
|
||||
}
|
||||
|
||||
func (x *PassportInfoSimpleCard) Reset() {
|
||||
*x = PassportInfoSimpleCard{}
|
||||
mi := &file_member_proto_msgTypes[0]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
|
||||
func (x *PassportInfoSimpleCard) String() string {
|
||||
return protoimpl.X.MessageStringOf(x)
|
||||
}
|
||||
|
||||
func (*PassportInfoSimpleCard) ProtoMessage() {}
|
||||
|
||||
func (x *PassportInfoSimpleCard) ProtoReflect() protoreflect.Message {
|
||||
mi := &file_member_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 PassportInfoSimpleCard.ProtoReflect.Descriptor instead.
|
||||
func (*PassportInfoSimpleCard) Descriptor() ([]byte, []int) {
|
||||
return file_member_proto_rawDescGZIP(), []int{0}
|
||||
}
|
||||
|
||||
func (x *PassportInfoSimpleCard) GetIdentity() string {
|
||||
if x != nil {
|
||||
return x.Identity
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
func (x *PassportInfoSimpleCard) GetNickname() string {
|
||||
if x != nil {
|
||||
return x.Nickname
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
func (x *PassportInfoSimpleCard) GetRemarkName() string {
|
||||
if x != nil {
|
||||
return x.RemarkName
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
func (x *PassportInfoSimpleCard) GetAvatar() string {
|
||||
if x != nil {
|
||||
return x.Avatar
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
func (x *PassportInfoSimpleCard) GetSex() int32 {
|
||||
if x != nil {
|
||||
return x.Sex
|
||||
}
|
||||
return 0
|
||||
}
|
||||
|
||||
func (x *PassportInfoSimpleCard) GetRole() int32 {
|
||||
if x != nil {
|
||||
return x.Role
|
||||
}
|
||||
return 0
|
||||
}
|
||||
|
||||
type PassportInfoDetailCard struct {
|
||||
state protoimpl.MessageState `protogen:"open.v1"`
|
||||
Identity string `protobuf:"bytes,1,opt,name=identity,proto3" json:"identity,omitempty"`
|
||||
Nickname string `protobuf:"bytes,2,opt,name=nickname,proto3" json:"nickname,omitempty"` //昵称
|
||||
RemarkName string `protobuf:"bytes,3,opt,name=remark_name,json=remarkName,proto3" json:"remark_name,omitempty"` // 备注名称
|
||||
Popular int32 `protobuf:"varint,4,opt,name=popular,proto3" json:"popular,omitempty"` //是否置顶
|
||||
Avatar string `protobuf:"bytes,5,opt,name=avatar,proto3" json:"avatar,omitempty"`
|
||||
Birthday string `protobuf:"bytes,6,opt,name=birthday,proto3" json:"birthday,omitempty"` //生日
|
||||
Sex int32 `protobuf:"varint,7,opt,name=sex,proto3" json:"sex,omitempty"` //性别,1为男性,2为女性
|
||||
Province int32 `protobuf:"varint,8,opt,name=province,proto3" json:"province,omitempty"` //省
|
||||
City int32 `protobuf:"varint,9,opt,name=city,proto3" json:"city,omitempty"` //市
|
||||
Area int32 `protobuf:"varint,10,opt,name=area,proto3" json:"area,omitempty"` //区
|
||||
Sign string `protobuf:"bytes,11,opt,name=sign,proto3" json:"sign,omitempty"` //签名
|
||||
Tags []string `protobuf:"bytes,12,rep,name=tags,proto3" json:"tags,omitempty"` //所属标签组
|
||||
ForeignStatus int32 `protobuf:"varint,13,opt,name=foreign_status,json=foreignStatus,proto3" json:"foreign_status,omitempty"` //外表的状态值,根据表不同,值的作用不同
|
||||
unknownFields protoimpl.UnknownFields
|
||||
sizeCache protoimpl.SizeCache
|
||||
}
|
||||
|
||||
func (x *PassportInfoDetailCard) Reset() {
|
||||
*x = PassportInfoDetailCard{}
|
||||
mi := &file_member_proto_msgTypes[1]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
|
||||
func (x *PassportInfoDetailCard) String() string {
|
||||
return protoimpl.X.MessageStringOf(x)
|
||||
}
|
||||
|
||||
func (*PassportInfoDetailCard) ProtoMessage() {}
|
||||
|
||||
func (x *PassportInfoDetailCard) ProtoReflect() protoreflect.Message {
|
||||
mi := &file_member_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 PassportInfoDetailCard.ProtoReflect.Descriptor instead.
|
||||
func (*PassportInfoDetailCard) Descriptor() ([]byte, []int) {
|
||||
return file_member_proto_rawDescGZIP(), []int{1}
|
||||
}
|
||||
|
||||
func (x *PassportInfoDetailCard) GetIdentity() string {
|
||||
if x != nil {
|
||||
return x.Identity
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
func (x *PassportInfoDetailCard) GetNickname() string {
|
||||
if x != nil {
|
||||
return x.Nickname
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
func (x *PassportInfoDetailCard) GetRemarkName() string {
|
||||
if x != nil {
|
||||
return x.RemarkName
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
func (x *PassportInfoDetailCard) GetPopular() int32 {
|
||||
if x != nil {
|
||||
return x.Popular
|
||||
}
|
||||
return 0
|
||||
}
|
||||
|
||||
func (x *PassportInfoDetailCard) GetAvatar() string {
|
||||
if x != nil {
|
||||
return x.Avatar
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
func (x *PassportInfoDetailCard) GetBirthday() string {
|
||||
if x != nil {
|
||||
return x.Birthday
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
func (x *PassportInfoDetailCard) GetSex() int32 {
|
||||
if x != nil {
|
||||
return x.Sex
|
||||
}
|
||||
return 0
|
||||
}
|
||||
|
||||
func (x *PassportInfoDetailCard) GetProvince() int32 {
|
||||
if x != nil {
|
||||
return x.Province
|
||||
}
|
||||
return 0
|
||||
}
|
||||
|
||||
func (x *PassportInfoDetailCard) GetCity() int32 {
|
||||
if x != nil {
|
||||
return x.City
|
||||
}
|
||||
return 0
|
||||
}
|
||||
|
||||
func (x *PassportInfoDetailCard) GetArea() int32 {
|
||||
if x != nil {
|
||||
return x.Area
|
||||
}
|
||||
return 0
|
||||
}
|
||||
|
||||
func (x *PassportInfoDetailCard) GetSign() string {
|
||||
if x != nil {
|
||||
return x.Sign
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
func (x *PassportInfoDetailCard) GetTags() []string {
|
||||
if x != nil {
|
||||
return x.Tags
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
func (x *PassportInfoDetailCard) GetForeignStatus() int32 {
|
||||
if x != nil {
|
||||
return x.ForeignStatus
|
||||
}
|
||||
return 0
|
||||
}
|
||||
|
||||
type GroupMemberReply struct {
|
||||
state protoimpl.MessageState `protogen:"open.v1"`
|
||||
Total int32 `protobuf:"varint,1,opt,name=total,proto3" json:"total,omitempty"` // 总记录数
|
||||
Version int64 `protobuf:"varint,2,opt,name=version,proto3" json:"version,omitempty"` //版本号
|
||||
Members []*PassportInfoSimpleCard `protobuf:"bytes,3,rep,name=members,proto3" json:"members,omitempty"` //成员信息
|
||||
unknownFields protoimpl.UnknownFields
|
||||
sizeCache protoimpl.SizeCache
|
||||
}
|
||||
|
||||
func (x *GroupMemberReply) Reset() {
|
||||
*x = GroupMemberReply{}
|
||||
mi := &file_member_proto_msgTypes[2]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
|
||||
func (x *GroupMemberReply) String() string {
|
||||
return protoimpl.X.MessageStringOf(x)
|
||||
}
|
||||
|
||||
func (*GroupMemberReply) ProtoMessage() {}
|
||||
|
||||
func (x *GroupMemberReply) ProtoReflect() protoreflect.Message {
|
||||
mi := &file_member_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 GroupMemberReply.ProtoReflect.Descriptor instead.
|
||||
func (*GroupMemberReply) Descriptor() ([]byte, []int) {
|
||||
return file_member_proto_rawDescGZIP(), []int{2}
|
||||
}
|
||||
|
||||
func (x *GroupMemberReply) GetTotal() int32 {
|
||||
if x != nil {
|
||||
return x.Total
|
||||
}
|
||||
return 0
|
||||
}
|
||||
|
||||
func (x *GroupMemberReply) GetVersion() int64 {
|
||||
if x != nil {
|
||||
return x.Version
|
||||
}
|
||||
return 0
|
||||
}
|
||||
|
||||
func (x *GroupMemberReply) GetMembers() []*PassportInfoSimpleCard {
|
||||
if x != nil {
|
||||
return x.Members
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
type DoJoinRequest 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"` // 群组唯一码
|
||||
Message string `protobuf:"bytes,3,opt,name=message,proto3" json:"message,omitempty"` //加群留言
|
||||
unknownFields protoimpl.UnknownFields
|
||||
sizeCache protoimpl.SizeCache
|
||||
}
|
||||
|
||||
func (x *DoJoinRequest) Reset() {
|
||||
*x = DoJoinRequest{}
|
||||
mi := &file_member_proto_msgTypes[3]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
|
||||
func (x *DoJoinRequest) String() string {
|
||||
return protoimpl.X.MessageStringOf(x)
|
||||
}
|
||||
|
||||
func (*DoJoinRequest) ProtoMessage() {}
|
||||
|
||||
func (x *DoJoinRequest) ProtoReflect() protoreflect.Message {
|
||||
mi := &file_member_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 DoJoinRequest.ProtoReflect.Descriptor instead.
|
||||
func (*DoJoinRequest) Descriptor() ([]byte, []int) {
|
||||
return file_member_proto_rawDescGZIP(), []int{3}
|
||||
}
|
||||
|
||||
func (x *DoJoinRequest) GetId() int64 {
|
||||
if x != nil {
|
||||
return x.Id
|
||||
}
|
||||
return 0
|
||||
}
|
||||
|
||||
func (x *DoJoinRequest) GetIdentity() string {
|
||||
if x != nil {
|
||||
return x.Identity
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
func (x *DoJoinRequest) GetMessage() string {
|
||||
if x != nil {
|
||||
return x.Message
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
type JoinFetchReply struct {
|
||||
state protoimpl.MessageState `protogen:"open.v1"`
|
||||
Total int32 `protobuf:"varint,1,opt,name=total,proto3" json:"total,omitempty"` // 总记录数
|
||||
Applys []*ApplyJoinGroupItem `protobuf:"bytes,2,rep,name=applys,proto3" json:"applys,omitempty"` //群组信息
|
||||
unknownFields protoimpl.UnknownFields
|
||||
sizeCache protoimpl.SizeCache
|
||||
}
|
||||
|
||||
func (x *JoinFetchReply) Reset() {
|
||||
*x = JoinFetchReply{}
|
||||
mi := &file_member_proto_msgTypes[4]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
|
||||
func (x *JoinFetchReply) String() string {
|
||||
return protoimpl.X.MessageStringOf(x)
|
||||
}
|
||||
|
||||
func (*JoinFetchReply) ProtoMessage() {}
|
||||
|
||||
func (x *JoinFetchReply) ProtoReflect() protoreflect.Message {
|
||||
mi := &file_member_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 JoinFetchReply.ProtoReflect.Descriptor instead.
|
||||
func (*JoinFetchReply) Descriptor() ([]byte, []int) {
|
||||
return file_member_proto_rawDescGZIP(), []int{4}
|
||||
}
|
||||
|
||||
func (x *JoinFetchReply) GetTotal() int32 {
|
||||
if x != nil {
|
||||
return x.Total
|
||||
}
|
||||
return 0
|
||||
}
|
||||
|
||||
func (x *JoinFetchReply) GetApplys() []*ApplyJoinGroupItem {
|
||||
if x != nil {
|
||||
return x.Applys
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
type ApplyJoinGroupItem struct {
|
||||
state protoimpl.MessageState `protogen:"open.v1"`
|
||||
Identity string `protobuf:"bytes,1,opt,name=identity,proto3" json:"identity,omitempty"` // 唯一标识
|
||||
GroupId int64 `protobuf:"varint,2,opt,name=group_id,json=groupId,proto3" json:"group_id,omitempty"` // 主键
|
||||
From *PassportInfoDetailCard `protobuf:"bytes,3,opt,name=from,proto3" json:"from,omitempty"`
|
||||
Message string `protobuf:"bytes,4,opt,name=message,proto3" json:"message,omitempty"`
|
||||
CreatedAt string `protobuf:"bytes,5,opt,name=created_at,json=createdAt,proto3" json:"created_at,omitempty"` //时间
|
||||
Status int32 `protobuf:"varint,6,opt,name=status,proto3" json:"status,omitempty"` // 状态
|
||||
unknownFields protoimpl.UnknownFields
|
||||
sizeCache protoimpl.SizeCache
|
||||
}
|
||||
|
||||
func (x *ApplyJoinGroupItem) Reset() {
|
||||
*x = ApplyJoinGroupItem{}
|
||||
mi := &file_member_proto_msgTypes[5]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
|
||||
func (x *ApplyJoinGroupItem) String() string {
|
||||
return protoimpl.X.MessageStringOf(x)
|
||||
}
|
||||
|
||||
func (*ApplyJoinGroupItem) ProtoMessage() {}
|
||||
|
||||
func (x *ApplyJoinGroupItem) ProtoReflect() protoreflect.Message {
|
||||
mi := &file_member_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 ApplyJoinGroupItem.ProtoReflect.Descriptor instead.
|
||||
func (*ApplyJoinGroupItem) Descriptor() ([]byte, []int) {
|
||||
return file_member_proto_rawDescGZIP(), []int{5}
|
||||
}
|
||||
|
||||
func (x *ApplyJoinGroupItem) GetIdentity() string {
|
||||
if x != nil {
|
||||
return x.Identity
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
func (x *ApplyJoinGroupItem) GetGroupId() int64 {
|
||||
if x != nil {
|
||||
return x.GroupId
|
||||
}
|
||||
return 0
|
||||
}
|
||||
|
||||
func (x *ApplyJoinGroupItem) GetFrom() *PassportInfoDetailCard {
|
||||
if x != nil {
|
||||
return x.From
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
func (x *ApplyJoinGroupItem) GetMessage() string {
|
||||
if x != nil {
|
||||
return x.Message
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
func (x *ApplyJoinGroupItem) GetCreatedAt() string {
|
||||
if x != nil {
|
||||
return x.CreatedAt
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
func (x *ApplyJoinGroupItem) GetStatus() int32 {
|
||||
if x != nil {
|
||||
return x.Status
|
||||
}
|
||||
return 0
|
||||
}
|
||||
|
||||
type GroupOPRequest struct {
|
||||
state protoimpl.MessageState `protogen:"open.v1"`
|
||||
Identity string `protobuf:"bytes,1,opt,name=identity,proto3" json:"identity,omitempty"` // 唯一标识
|
||||
GroupIdentity string `protobuf:"bytes,2,opt,name=group_identity,json=groupIdentity,proto3" json:"group_identity,omitempty"` //群组identity
|
||||
Direction string `protobuf:"bytes,3,opt,name=direction,proto3" json:"direction,omitempty"` //操作方式:Pass通过,Reject拒绝,Set设置,cancel取消
|
||||
unknownFields protoimpl.UnknownFields
|
||||
sizeCache protoimpl.SizeCache
|
||||
}
|
||||
|
||||
func (x *GroupOPRequest) Reset() {
|
||||
*x = GroupOPRequest{}
|
||||
mi := &file_member_proto_msgTypes[6]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
|
||||
func (x *GroupOPRequest) String() string {
|
||||
return protoimpl.X.MessageStringOf(x)
|
||||
}
|
||||
|
||||
func (*GroupOPRequest) ProtoMessage() {}
|
||||
|
||||
func (x *GroupOPRequest) ProtoReflect() protoreflect.Message {
|
||||
mi := &file_member_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 GroupOPRequest.ProtoReflect.Descriptor instead.
|
||||
func (*GroupOPRequest) Descriptor() ([]byte, []int) {
|
||||
return file_member_proto_rawDescGZIP(), []int{6}
|
||||
}
|
||||
|
||||
func (x *GroupOPRequest) GetIdentity() string {
|
||||
if x != nil {
|
||||
return x.Identity
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
func (x *GroupOPRequest) GetGroupIdentity() string {
|
||||
if x != nil {
|
||||
return x.GroupIdentity
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
func (x *GroupOPRequest) GetDirection() string {
|
||||
if x != nil {
|
||||
return x.Direction
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
var File_member_proto protoreflect.FileDescriptor
|
||||
|
||||
const file_member_proto_rawDesc = "" +
|
||||
"\n" +
|
||||
"\x19social/group/member.proto\x12\x05group\x1a\x12group/blocks.proto\"\xaf\x01\n" +
|
||||
"\x16PassportInfoSimpleCard\x12\x1a\n" +
|
||||
"\bidentity\x18\x01 \x01(\tR\bidentity\x12\x1a\n" +
|
||||
"\bnickname\x18\x02 \x01(\tR\bnickname\x12\x1f\n" +
|
||||
"\vremark_name\x18\x03 \x01(\tR\n" +
|
||||
"remarkName\x12\x16\n" +
|
||||
"\x06avatar\x18\x04 \x01(\tR\x06avatar\x12\x10\n" +
|
||||
"\x03sex\x18\x05 \x01(\x05R\x03sex\x12\x12\n" +
|
||||
"\x04role\x18\x06 \x01(\x05R\x04role\"\xe4\x02\n" +
|
||||
"\x16PassportInfoDetailCard\x12\x1a\n" +
|
||||
"\bidentity\x18\x01 \x01(\tR\bidentity\x12\x1a\n" +
|
||||
"\bnickname\x18\x02 \x01(\tR\bnickname\x12\x1f\n" +
|
||||
"\vremark_name\x18\x03 \x01(\tR\n" +
|
||||
"remarkName\x12\x18\n" +
|
||||
"\apopular\x18\x04 \x01(\x05R\apopular\x12\x16\n" +
|
||||
"\x06avatar\x18\x05 \x01(\tR\x06avatar\x12\x1a\n" +
|
||||
"\bbirthday\x18\x06 \x01(\tR\bbirthday\x12\x10\n" +
|
||||
"\x03sex\x18\a \x01(\x05R\x03sex\x12\x1a\n" +
|
||||
"\bprovince\x18\b \x01(\x05R\bprovince\x12\x12\n" +
|
||||
"\x04city\x18\t \x01(\x05R\x04city\x12\x12\n" +
|
||||
"\x04area\x18\n" +
|
||||
" \x01(\x05R\x04area\x12\x12\n" +
|
||||
"\x04sign\x18\v \x01(\tR\x04sign\x12\x12\n" +
|
||||
"\x04tags\x18\f \x03(\tR\x04tags\x12%\n" +
|
||||
"\x0eforeign_status\x18\r \x01(\x05R\rforeignStatus\"{\n" +
|
||||
"\x10GroupMemberReply\x12\x14\n" +
|
||||
"\x05total\x18\x01 \x01(\x05R\x05total\x12\x18\n" +
|
||||
"\aversion\x18\x02 \x01(\x03R\aversion\x127\n" +
|
||||
"\amembers\x18\x03 \x03(\v2\x1d.group.PassportInfoSimpleCardR\amembers\"U\n" +
|
||||
"\rDoJoinRequest\x12\x0e\n" +
|
||||
"\x02id\x18\x01 \x01(\x03R\x02id\x12\x1a\n" +
|
||||
"\bidentity\x18\x02 \x01(\tR\bidentity\x12\x18\n" +
|
||||
"\amessage\x18\x03 \x01(\tR\amessage\"Y\n" +
|
||||
"\x0eJoinFetchReply\x12\x14\n" +
|
||||
"\x05total\x18\x01 \x01(\x05R\x05total\x121\n" +
|
||||
"\x06applys\x18\x02 \x03(\v2\x19.group.ApplyJoinGroupItemR\x06applys\"\xcf\x01\n" +
|
||||
"\x12ApplyJoinGroupItem\x12\x1a\n" +
|
||||
"\bidentity\x18\x01 \x01(\tR\bidentity\x12\x19\n" +
|
||||
"\bgroup_id\x18\x02 \x01(\x03R\agroupId\x121\n" +
|
||||
"\x04from\x18\x03 \x01(\v2\x1d.group.PassportInfoDetailCardR\x04from\x12\x18\n" +
|
||||
"\amessage\x18\x04 \x01(\tR\amessage\x12\x1d\n" +
|
||||
"\n" +
|
||||
"created_at\x18\x05 \x01(\tR\tcreatedAt\x12\x16\n" +
|
||||
"\x06status\x18\x06 \x01(\x05R\x06status\"q\n" +
|
||||
"\x0eGroupOPRequest\x12\x1a\n" +
|
||||
"\bidentity\x18\x01 \x01(\tR\bidentity\x12%\n" +
|
||||
"\x0egroup_identity\x18\x02 \x01(\tR\rgroupIdentity\x12\x1c\n" +
|
||||
"\tdirection\x18\x03 \x01(\tR\tdirection2\x85\x03\n" +
|
||||
"\x06Member\x125\n" +
|
||||
"\x05Fetch\x12\x13.group.IdentRequest\x1a\x17.group.GroupMemberReply\x122\n" +
|
||||
"\x06DoJoin\x12\x14.group.DoJoinRequest\x1a\x12.group.StatusReply\x120\n" +
|
||||
"\tJoinFetch\x12\f.group.Empty\x1a\x15.group.JoinFetchReply\x129\n" +
|
||||
"\fJoinDoHandle\x12\x15.group.GroupOPRequest\x1a\x12.group.StatusReply\x129\n" +
|
||||
"\fDoSetManager\x12\x15.group.GroupOPRequest\x1a\x12.group.StatusReply\x123\n" +
|
||||
"\x06DoKick\x12\x15.group.GroupOPRequest\x1a\x12.group.StatusReply\x123\n" +
|
||||
"\x06DoQuit\x12\x15.group.GroupOPRequest\x1a\x12.group.StatusReplyB\tZ\a.;groupb\x06proto3"
|
||||
|
||||
var (
|
||||
file_member_proto_rawDescOnce sync.Once
|
||||
file_member_proto_rawDescData []byte
|
||||
)
|
||||
|
||||
func file_member_proto_rawDescGZIP() []byte {
|
||||
file_member_proto_rawDescOnce.Do(func() {
|
||||
file_member_proto_rawDescData = protoimpl.X.CompressGZIP(unsafe.Slice(unsafe.StringData(file_member_proto_rawDesc), len(file_member_proto_rawDesc)))
|
||||
})
|
||||
return file_member_proto_rawDescData
|
||||
}
|
||||
|
||||
var file_member_proto_msgTypes = make([]protoimpl.MessageInfo, 7)
|
||||
var file_member_proto_goTypes = []any{
|
||||
(*PassportInfoSimpleCard)(nil), // 0: group.PassportInfoSimpleCard
|
||||
(*PassportInfoDetailCard)(nil), // 1: group.PassportInfoDetailCard
|
||||
(*GroupMemberReply)(nil), // 2: group.GroupMemberReply
|
||||
(*DoJoinRequest)(nil), // 3: group.DoJoinRequest
|
||||
(*JoinFetchReply)(nil), // 4: group.JoinFetchReply
|
||||
(*ApplyJoinGroupItem)(nil), // 5: group.ApplyJoinGroupItem
|
||||
(*GroupOPRequest)(nil), // 6: group.GroupOPRequest
|
||||
(*IdentRequest)(nil), // 7: group.IdentRequest
|
||||
(*Empty)(nil), // 8: group.Empty
|
||||
(*StatusReply)(nil), // 9: group.StatusReply
|
||||
}
|
||||
var file_member_proto_depIdxs = []int32{
|
||||
0, // 0: group.GroupMemberReply.members:type_name -> group.PassportInfoSimpleCard
|
||||
5, // 1: group.JoinFetchReply.applys:type_name -> group.ApplyJoinGroupItem
|
||||
1, // 2: group.ApplyJoinGroupItem.from:type_name -> group.PassportInfoDetailCard
|
||||
7, // 3: group.Member.Fetch:input_type -> group.IdentRequest
|
||||
3, // 4: group.Member.DoJoin:input_type -> group.DoJoinRequest
|
||||
8, // 5: group.Member.JoinFetch:input_type -> group.Empty
|
||||
6, // 6: group.Member.JoinDoHandle:input_type -> group.GroupOPRequest
|
||||
6, // 7: group.Member.DoSetManager:input_type -> group.GroupOPRequest
|
||||
6, // 8: group.Member.DoKick:input_type -> group.GroupOPRequest
|
||||
6, // 9: group.Member.DoQuit:input_type -> group.GroupOPRequest
|
||||
2, // 10: group.Member.Fetch:output_type -> group.GroupMemberReply
|
||||
9, // 11: group.Member.DoJoin:output_type -> group.StatusReply
|
||||
4, // 12: group.Member.JoinFetch:output_type -> group.JoinFetchReply
|
||||
9, // 13: group.Member.JoinDoHandle:output_type -> group.StatusReply
|
||||
9, // 14: group.Member.DoSetManager:output_type -> group.StatusReply
|
||||
9, // 15: group.Member.DoKick:output_type -> group.StatusReply
|
||||
9, // 16: group.Member.DoQuit:output_type -> group.StatusReply
|
||||
10, // [10:17] is the sub-list for method output_type
|
||||
3, // [3:10] is the sub-list for method input_type
|
||||
3, // [3:3] is the sub-list for extension type_name
|
||||
3, // [3:3] is the sub-list for extension extendee
|
||||
0, // [0:3] is the sub-list for field type_name
|
||||
}
|
||||
|
||||
func init() { file_member_proto_init() }
|
||||
func file_member_proto_init() {
|
||||
if File_member_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_member_proto_rawDesc), len(file_member_proto_rawDesc)),
|
||||
NumEnums: 0,
|
||||
NumMessages: 7,
|
||||
NumExtensions: 0,
|
||||
NumServices: 1,
|
||||
},
|
||||
GoTypes: file_member_proto_goTypes,
|
||||
DependencyIndexes: file_member_proto_depIdxs,
|
||||
MessageInfos: file_member_proto_msgTypes,
|
||||
}.Build()
|
||||
File_member_proto = out.File
|
||||
file_member_proto_goTypes = nil
|
||||
file_member_proto_depIdxs = nil
|
||||
}
|
||||
553
apps/social/group/pb/member.pb.gw.go
Normal file
553
apps/social/group/pb/member.pb.gw.go
Normal file
@@ -0,0 +1,553 @@
|
||||
// Code generated by protoc-gen-grpc-gateway. DO NOT EDIT.
|
||||
// source: member.proto
|
||||
|
||||
/*
|
||||
Package group is a reverse proxy.
|
||||
|
||||
It translates gRPC into RESTful JSON APIs.
|
||||
*/
|
||||
package group
|
||||
|
||||
import (
|
||||
"context"
|
||||
"errors"
|
||||
"io"
|
||||
"net/http"
|
||||
|
||||
"github.com/grpc-ecosystem/grpc-gateway/v2/runtime"
|
||||
"github.com/grpc-ecosystem/grpc-gateway/v2/utilities"
|
||||
"google.golang.org/grpc"
|
||||
"google.golang.org/grpc/codes"
|
||||
"google.golang.org/grpc/grpclog"
|
||||
"google.golang.org/grpc/metadata"
|
||||
"google.golang.org/grpc/status"
|
||||
"google.golang.org/protobuf/proto"
|
||||
)
|
||||
|
||||
// Suppress "imported and not used" errors
|
||||
var (
|
||||
_ codes.Code
|
||||
_ io.Reader
|
||||
_ status.Status
|
||||
_ = errors.New
|
||||
_ = runtime.String
|
||||
_ = utilities.NewDoubleArray
|
||||
_ = metadata.Join
|
||||
)
|
||||
|
||||
func request_Member_Fetch_0(ctx context.Context, marshaler runtime.Marshaler, client MemberClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
|
||||
var (
|
||||
protoReq IdentRequest
|
||||
metadata runtime.ServerMetadata
|
||||
)
|
||||
if err := marshaler.NewDecoder(req.Body).Decode(&protoReq); err != nil && !errors.Is(err, io.EOF) {
|
||||
return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err)
|
||||
}
|
||||
if req.Body != nil {
|
||||
_, _ = io.Copy(io.Discard, req.Body)
|
||||
}
|
||||
msg, err := client.Fetch(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD))
|
||||
return msg, metadata, err
|
||||
}
|
||||
|
||||
func local_request_Member_Fetch_0(ctx context.Context, marshaler runtime.Marshaler, server MemberServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
|
||||
var (
|
||||
protoReq IdentRequest
|
||||
metadata runtime.ServerMetadata
|
||||
)
|
||||
if err := marshaler.NewDecoder(req.Body).Decode(&protoReq); err != nil && !errors.Is(err, io.EOF) {
|
||||
return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err)
|
||||
}
|
||||
msg, err := server.Fetch(ctx, &protoReq)
|
||||
return msg, metadata, err
|
||||
}
|
||||
|
||||
func request_Member_DoJoin_0(ctx context.Context, marshaler runtime.Marshaler, client MemberClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
|
||||
var (
|
||||
protoReq DoJoinRequest
|
||||
metadata runtime.ServerMetadata
|
||||
)
|
||||
if err := marshaler.NewDecoder(req.Body).Decode(&protoReq); err != nil && !errors.Is(err, io.EOF) {
|
||||
return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err)
|
||||
}
|
||||
if req.Body != nil {
|
||||
_, _ = io.Copy(io.Discard, req.Body)
|
||||
}
|
||||
msg, err := client.DoJoin(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD))
|
||||
return msg, metadata, err
|
||||
}
|
||||
|
||||
func local_request_Member_DoJoin_0(ctx context.Context, marshaler runtime.Marshaler, server MemberServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
|
||||
var (
|
||||
protoReq DoJoinRequest
|
||||
metadata runtime.ServerMetadata
|
||||
)
|
||||
if err := marshaler.NewDecoder(req.Body).Decode(&protoReq); err != nil && !errors.Is(err, io.EOF) {
|
||||
return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err)
|
||||
}
|
||||
msg, err := server.DoJoin(ctx, &protoReq)
|
||||
return msg, metadata, err
|
||||
}
|
||||
|
||||
func request_Member_JoinFetch_0(ctx context.Context, marshaler runtime.Marshaler, client MemberClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
|
||||
var (
|
||||
protoReq Empty
|
||||
metadata runtime.ServerMetadata
|
||||
)
|
||||
if err := marshaler.NewDecoder(req.Body).Decode(&protoReq); err != nil && !errors.Is(err, io.EOF) {
|
||||
return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err)
|
||||
}
|
||||
if req.Body != nil {
|
||||
_, _ = io.Copy(io.Discard, req.Body)
|
||||
}
|
||||
msg, err := client.JoinFetch(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD))
|
||||
return msg, metadata, err
|
||||
}
|
||||
|
||||
func local_request_Member_JoinFetch_0(ctx context.Context, marshaler runtime.Marshaler, server MemberServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
|
||||
var (
|
||||
protoReq Empty
|
||||
metadata runtime.ServerMetadata
|
||||
)
|
||||
if err := marshaler.NewDecoder(req.Body).Decode(&protoReq); err != nil && !errors.Is(err, io.EOF) {
|
||||
return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err)
|
||||
}
|
||||
msg, err := server.JoinFetch(ctx, &protoReq)
|
||||
return msg, metadata, err
|
||||
}
|
||||
|
||||
func request_Member_JoinDoHandle_0(ctx context.Context, marshaler runtime.Marshaler, client MemberClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
|
||||
var (
|
||||
protoReq GroupOPRequest
|
||||
metadata runtime.ServerMetadata
|
||||
)
|
||||
if err := marshaler.NewDecoder(req.Body).Decode(&protoReq); err != nil && !errors.Is(err, io.EOF) {
|
||||
return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err)
|
||||
}
|
||||
if req.Body != nil {
|
||||
_, _ = io.Copy(io.Discard, req.Body)
|
||||
}
|
||||
msg, err := client.JoinDoHandle(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD))
|
||||
return msg, metadata, err
|
||||
}
|
||||
|
||||
func local_request_Member_JoinDoHandle_0(ctx context.Context, marshaler runtime.Marshaler, server MemberServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
|
||||
var (
|
||||
protoReq GroupOPRequest
|
||||
metadata runtime.ServerMetadata
|
||||
)
|
||||
if err := marshaler.NewDecoder(req.Body).Decode(&protoReq); err != nil && !errors.Is(err, io.EOF) {
|
||||
return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err)
|
||||
}
|
||||
msg, err := server.JoinDoHandle(ctx, &protoReq)
|
||||
return msg, metadata, err
|
||||
}
|
||||
|
||||
func request_Member_DoSetManager_0(ctx context.Context, marshaler runtime.Marshaler, client MemberClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
|
||||
var (
|
||||
protoReq GroupOPRequest
|
||||
metadata runtime.ServerMetadata
|
||||
)
|
||||
if err := marshaler.NewDecoder(req.Body).Decode(&protoReq); err != nil && !errors.Is(err, io.EOF) {
|
||||
return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err)
|
||||
}
|
||||
if req.Body != nil {
|
||||
_, _ = io.Copy(io.Discard, req.Body)
|
||||
}
|
||||
msg, err := client.DoSetManager(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD))
|
||||
return msg, metadata, err
|
||||
}
|
||||
|
||||
func local_request_Member_DoSetManager_0(ctx context.Context, marshaler runtime.Marshaler, server MemberServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
|
||||
var (
|
||||
protoReq GroupOPRequest
|
||||
metadata runtime.ServerMetadata
|
||||
)
|
||||
if err := marshaler.NewDecoder(req.Body).Decode(&protoReq); err != nil && !errors.Is(err, io.EOF) {
|
||||
return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err)
|
||||
}
|
||||
msg, err := server.DoSetManager(ctx, &protoReq)
|
||||
return msg, metadata, err
|
||||
}
|
||||
|
||||
func request_Member_DoKick_0(ctx context.Context, marshaler runtime.Marshaler, client MemberClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
|
||||
var (
|
||||
protoReq GroupOPRequest
|
||||
metadata runtime.ServerMetadata
|
||||
)
|
||||
if err := marshaler.NewDecoder(req.Body).Decode(&protoReq); err != nil && !errors.Is(err, io.EOF) {
|
||||
return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err)
|
||||
}
|
||||
if req.Body != nil {
|
||||
_, _ = io.Copy(io.Discard, req.Body)
|
||||
}
|
||||
msg, err := client.DoKick(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD))
|
||||
return msg, metadata, err
|
||||
}
|
||||
|
||||
func local_request_Member_DoKick_0(ctx context.Context, marshaler runtime.Marshaler, server MemberServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
|
||||
var (
|
||||
protoReq GroupOPRequest
|
||||
metadata runtime.ServerMetadata
|
||||
)
|
||||
if err := marshaler.NewDecoder(req.Body).Decode(&protoReq); err != nil && !errors.Is(err, io.EOF) {
|
||||
return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err)
|
||||
}
|
||||
msg, err := server.DoKick(ctx, &protoReq)
|
||||
return msg, metadata, err
|
||||
}
|
||||
|
||||
func request_Member_DoQuit_0(ctx context.Context, marshaler runtime.Marshaler, client MemberClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
|
||||
var (
|
||||
protoReq GroupOPRequest
|
||||
metadata runtime.ServerMetadata
|
||||
)
|
||||
if err := marshaler.NewDecoder(req.Body).Decode(&protoReq); err != nil && !errors.Is(err, io.EOF) {
|
||||
return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err)
|
||||
}
|
||||
if req.Body != nil {
|
||||
_, _ = io.Copy(io.Discard, req.Body)
|
||||
}
|
||||
msg, err := client.DoQuit(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD))
|
||||
return msg, metadata, err
|
||||
}
|
||||
|
||||
func local_request_Member_DoQuit_0(ctx context.Context, marshaler runtime.Marshaler, server MemberServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
|
||||
var (
|
||||
protoReq GroupOPRequest
|
||||
metadata runtime.ServerMetadata
|
||||
)
|
||||
if err := marshaler.NewDecoder(req.Body).Decode(&protoReq); err != nil && !errors.Is(err, io.EOF) {
|
||||
return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err)
|
||||
}
|
||||
msg, err := server.DoQuit(ctx, &protoReq)
|
||||
return msg, metadata, err
|
||||
}
|
||||
|
||||
// RegisterMemberHandlerServer registers the http handlers for service Member to "mux".
|
||||
// UnaryRPC :call MemberServer directly.
|
||||
// StreamingRPC :currently unsupported pending https://github.com/grpc/grpc-go/issues/906.
|
||||
// Note that using this registration option will cause many gRPC library features to stop working. Consider using RegisterMemberHandlerFromEndpoint instead.
|
||||
// GRPC interceptors will not work for this type of registration. To use interceptors, you must use the "runtime.WithMiddlewares" option in the "runtime.NewServeMux" call.
|
||||
func RegisterMemberHandlerServer(ctx context.Context, mux *runtime.ServeMux, server MemberServer) error {
|
||||
mux.Handle(http.MethodPost, pattern_Member_Fetch_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {
|
||||
ctx, cancel := context.WithCancel(req.Context())
|
||||
defer cancel()
|
||||
var stream runtime.ServerTransportStream
|
||||
ctx = grpc.NewContextWithServerTransportStream(ctx, &stream)
|
||||
inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
|
||||
annotatedContext, err := runtime.AnnotateIncomingContext(ctx, mux, req, "/group.Member/Fetch", runtime.WithHTTPPathPattern("/group.Member/Fetch"))
|
||||
if err != nil {
|
||||
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
|
||||
return
|
||||
}
|
||||
resp, md, err := local_request_Member_Fetch_0(annotatedContext, inboundMarshaler, server, req, pathParams)
|
||||
md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer())
|
||||
annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md)
|
||||
if err != nil {
|
||||
runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err)
|
||||
return
|
||||
}
|
||||
forward_Member_Fetch_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
|
||||
})
|
||||
mux.Handle(http.MethodPost, pattern_Member_DoJoin_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {
|
||||
ctx, cancel := context.WithCancel(req.Context())
|
||||
defer cancel()
|
||||
var stream runtime.ServerTransportStream
|
||||
ctx = grpc.NewContextWithServerTransportStream(ctx, &stream)
|
||||
inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
|
||||
annotatedContext, err := runtime.AnnotateIncomingContext(ctx, mux, req, "/group.Member/DoJoin", runtime.WithHTTPPathPattern("/group.Member/DoJoin"))
|
||||
if err != nil {
|
||||
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
|
||||
return
|
||||
}
|
||||
resp, md, err := local_request_Member_DoJoin_0(annotatedContext, inboundMarshaler, server, req, pathParams)
|
||||
md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer())
|
||||
annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md)
|
||||
if err != nil {
|
||||
runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err)
|
||||
return
|
||||
}
|
||||
forward_Member_DoJoin_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
|
||||
})
|
||||
mux.Handle(http.MethodPost, pattern_Member_JoinFetch_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {
|
||||
ctx, cancel := context.WithCancel(req.Context())
|
||||
defer cancel()
|
||||
var stream runtime.ServerTransportStream
|
||||
ctx = grpc.NewContextWithServerTransportStream(ctx, &stream)
|
||||
inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
|
||||
annotatedContext, err := runtime.AnnotateIncomingContext(ctx, mux, req, "/group.Member/JoinFetch", runtime.WithHTTPPathPattern("/group.Member/JoinFetch"))
|
||||
if err != nil {
|
||||
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
|
||||
return
|
||||
}
|
||||
resp, md, err := local_request_Member_JoinFetch_0(annotatedContext, inboundMarshaler, server, req, pathParams)
|
||||
md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer())
|
||||
annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md)
|
||||
if err != nil {
|
||||
runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err)
|
||||
return
|
||||
}
|
||||
forward_Member_JoinFetch_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
|
||||
})
|
||||
mux.Handle(http.MethodPost, pattern_Member_JoinDoHandle_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {
|
||||
ctx, cancel := context.WithCancel(req.Context())
|
||||
defer cancel()
|
||||
var stream runtime.ServerTransportStream
|
||||
ctx = grpc.NewContextWithServerTransportStream(ctx, &stream)
|
||||
inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
|
||||
annotatedContext, err := runtime.AnnotateIncomingContext(ctx, mux, req, "/group.Member/JoinDoHandle", runtime.WithHTTPPathPattern("/group.Member/JoinDoHandle"))
|
||||
if err != nil {
|
||||
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
|
||||
return
|
||||
}
|
||||
resp, md, err := local_request_Member_JoinDoHandle_0(annotatedContext, inboundMarshaler, server, req, pathParams)
|
||||
md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer())
|
||||
annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md)
|
||||
if err != nil {
|
||||
runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err)
|
||||
return
|
||||
}
|
||||
forward_Member_JoinDoHandle_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
|
||||
})
|
||||
mux.Handle(http.MethodPost, pattern_Member_DoSetManager_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {
|
||||
ctx, cancel := context.WithCancel(req.Context())
|
||||
defer cancel()
|
||||
var stream runtime.ServerTransportStream
|
||||
ctx = grpc.NewContextWithServerTransportStream(ctx, &stream)
|
||||
inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
|
||||
annotatedContext, err := runtime.AnnotateIncomingContext(ctx, mux, req, "/group.Member/DoSetManager", runtime.WithHTTPPathPattern("/group.Member/DoSetManager"))
|
||||
if err != nil {
|
||||
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
|
||||
return
|
||||
}
|
||||
resp, md, err := local_request_Member_DoSetManager_0(annotatedContext, inboundMarshaler, server, req, pathParams)
|
||||
md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer())
|
||||
annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md)
|
||||
if err != nil {
|
||||
runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err)
|
||||
return
|
||||
}
|
||||
forward_Member_DoSetManager_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
|
||||
})
|
||||
mux.Handle(http.MethodPost, pattern_Member_DoKick_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {
|
||||
ctx, cancel := context.WithCancel(req.Context())
|
||||
defer cancel()
|
||||
var stream runtime.ServerTransportStream
|
||||
ctx = grpc.NewContextWithServerTransportStream(ctx, &stream)
|
||||
inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
|
||||
annotatedContext, err := runtime.AnnotateIncomingContext(ctx, mux, req, "/group.Member/DoKick", runtime.WithHTTPPathPattern("/group.Member/DoKick"))
|
||||
if err != nil {
|
||||
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
|
||||
return
|
||||
}
|
||||
resp, md, err := local_request_Member_DoKick_0(annotatedContext, inboundMarshaler, server, req, pathParams)
|
||||
md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer())
|
||||
annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md)
|
||||
if err != nil {
|
||||
runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err)
|
||||
return
|
||||
}
|
||||
forward_Member_DoKick_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
|
||||
})
|
||||
mux.Handle(http.MethodPost, pattern_Member_DoQuit_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {
|
||||
ctx, cancel := context.WithCancel(req.Context())
|
||||
defer cancel()
|
||||
var stream runtime.ServerTransportStream
|
||||
ctx = grpc.NewContextWithServerTransportStream(ctx, &stream)
|
||||
inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
|
||||
annotatedContext, err := runtime.AnnotateIncomingContext(ctx, mux, req, "/group.Member/DoQuit", runtime.WithHTTPPathPattern("/group.Member/DoQuit"))
|
||||
if err != nil {
|
||||
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
|
||||
return
|
||||
}
|
||||
resp, md, err := local_request_Member_DoQuit_0(annotatedContext, inboundMarshaler, server, req, pathParams)
|
||||
md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer())
|
||||
annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md)
|
||||
if err != nil {
|
||||
runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err)
|
||||
return
|
||||
}
|
||||
forward_Member_DoQuit_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
|
||||
})
|
||||
|
||||
return nil
|
||||
}
|
||||
|
||||
// RegisterMemberHandlerFromEndpoint is same as RegisterMemberHandler but
|
||||
// automatically dials to "endpoint" and closes the connection when "ctx" gets done.
|
||||
func RegisterMemberHandlerFromEndpoint(ctx context.Context, mux *runtime.ServeMux, endpoint string, opts []grpc.DialOption) (err error) {
|
||||
conn, err := grpc.NewClient(endpoint, opts...)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
defer func() {
|
||||
if err != nil {
|
||||
if cerr := conn.Close(); cerr != nil {
|
||||
grpclog.Errorf("Failed to close conn to %s: %v", endpoint, cerr)
|
||||
}
|
||||
return
|
||||
}
|
||||
go func() {
|
||||
<-ctx.Done()
|
||||
if cerr := conn.Close(); cerr != nil {
|
||||
grpclog.Errorf("Failed to close conn to %s: %v", endpoint, cerr)
|
||||
}
|
||||
}()
|
||||
}()
|
||||
return RegisterMemberHandler(ctx, mux, conn)
|
||||
}
|
||||
|
||||
// RegisterMemberHandler registers the http handlers for service Member to "mux".
|
||||
// The handlers forward requests to the grpc endpoint over "conn".
|
||||
func RegisterMemberHandler(ctx context.Context, mux *runtime.ServeMux, conn *grpc.ClientConn) error {
|
||||
return RegisterMemberHandlerClient(ctx, mux, NewMemberClient(conn))
|
||||
}
|
||||
|
||||
// RegisterMemberHandlerClient registers the http handlers for service Member
|
||||
// to "mux". The handlers forward requests to the grpc endpoint over the given implementation of "MemberClient".
|
||||
// Note: the gRPC framework executes interceptors within the gRPC handler. If the passed in "MemberClient"
|
||||
// doesn't go through the normal gRPC flow (creating a gRPC client etc.) then it will be up to the passed in
|
||||
// "MemberClient" to call the correct interceptors. This client ignores the HTTP middlewares.
|
||||
func RegisterMemberHandlerClient(ctx context.Context, mux *runtime.ServeMux, client MemberClient) error {
|
||||
mux.Handle(http.MethodPost, pattern_Member_Fetch_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {
|
||||
ctx, cancel := context.WithCancel(req.Context())
|
||||
defer cancel()
|
||||
inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
|
||||
annotatedContext, err := runtime.AnnotateContext(ctx, mux, req, "/group.Member/Fetch", runtime.WithHTTPPathPattern("/group.Member/Fetch"))
|
||||
if err != nil {
|
||||
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
|
||||
return
|
||||
}
|
||||
resp, md, err := request_Member_Fetch_0(annotatedContext, inboundMarshaler, client, req, pathParams)
|
||||
annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md)
|
||||
if err != nil {
|
||||
runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err)
|
||||
return
|
||||
}
|
||||
forward_Member_Fetch_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
|
||||
})
|
||||
mux.Handle(http.MethodPost, pattern_Member_DoJoin_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {
|
||||
ctx, cancel := context.WithCancel(req.Context())
|
||||
defer cancel()
|
||||
inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
|
||||
annotatedContext, err := runtime.AnnotateContext(ctx, mux, req, "/group.Member/DoJoin", runtime.WithHTTPPathPattern("/group.Member/DoJoin"))
|
||||
if err != nil {
|
||||
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
|
||||
return
|
||||
}
|
||||
resp, md, err := request_Member_DoJoin_0(annotatedContext, inboundMarshaler, client, req, pathParams)
|
||||
annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md)
|
||||
if err != nil {
|
||||
runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err)
|
||||
return
|
||||
}
|
||||
forward_Member_DoJoin_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
|
||||
})
|
||||
mux.Handle(http.MethodPost, pattern_Member_JoinFetch_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {
|
||||
ctx, cancel := context.WithCancel(req.Context())
|
||||
defer cancel()
|
||||
inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
|
||||
annotatedContext, err := runtime.AnnotateContext(ctx, mux, req, "/group.Member/JoinFetch", runtime.WithHTTPPathPattern("/group.Member/JoinFetch"))
|
||||
if err != nil {
|
||||
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
|
||||
return
|
||||
}
|
||||
resp, md, err := request_Member_JoinFetch_0(annotatedContext, inboundMarshaler, client, req, pathParams)
|
||||
annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md)
|
||||
if err != nil {
|
||||
runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err)
|
||||
return
|
||||
}
|
||||
forward_Member_JoinFetch_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
|
||||
})
|
||||
mux.Handle(http.MethodPost, pattern_Member_JoinDoHandle_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {
|
||||
ctx, cancel := context.WithCancel(req.Context())
|
||||
defer cancel()
|
||||
inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
|
||||
annotatedContext, err := runtime.AnnotateContext(ctx, mux, req, "/group.Member/JoinDoHandle", runtime.WithHTTPPathPattern("/group.Member/JoinDoHandle"))
|
||||
if err != nil {
|
||||
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
|
||||
return
|
||||
}
|
||||
resp, md, err := request_Member_JoinDoHandle_0(annotatedContext, inboundMarshaler, client, req, pathParams)
|
||||
annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md)
|
||||
if err != nil {
|
||||
runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err)
|
||||
return
|
||||
}
|
||||
forward_Member_JoinDoHandle_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
|
||||
})
|
||||
mux.Handle(http.MethodPost, pattern_Member_DoSetManager_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {
|
||||
ctx, cancel := context.WithCancel(req.Context())
|
||||
defer cancel()
|
||||
inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
|
||||
annotatedContext, err := runtime.AnnotateContext(ctx, mux, req, "/group.Member/DoSetManager", runtime.WithHTTPPathPattern("/group.Member/DoSetManager"))
|
||||
if err != nil {
|
||||
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
|
||||
return
|
||||
}
|
||||
resp, md, err := request_Member_DoSetManager_0(annotatedContext, inboundMarshaler, client, req, pathParams)
|
||||
annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md)
|
||||
if err != nil {
|
||||
runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err)
|
||||
return
|
||||
}
|
||||
forward_Member_DoSetManager_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
|
||||
})
|
||||
mux.Handle(http.MethodPost, pattern_Member_DoKick_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {
|
||||
ctx, cancel := context.WithCancel(req.Context())
|
||||
defer cancel()
|
||||
inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
|
||||
annotatedContext, err := runtime.AnnotateContext(ctx, mux, req, "/group.Member/DoKick", runtime.WithHTTPPathPattern("/group.Member/DoKick"))
|
||||
if err != nil {
|
||||
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
|
||||
return
|
||||
}
|
||||
resp, md, err := request_Member_DoKick_0(annotatedContext, inboundMarshaler, client, req, pathParams)
|
||||
annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md)
|
||||
if err != nil {
|
||||
runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err)
|
||||
return
|
||||
}
|
||||
forward_Member_DoKick_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
|
||||
})
|
||||
mux.Handle(http.MethodPost, pattern_Member_DoQuit_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {
|
||||
ctx, cancel := context.WithCancel(req.Context())
|
||||
defer cancel()
|
||||
inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
|
||||
annotatedContext, err := runtime.AnnotateContext(ctx, mux, req, "/group.Member/DoQuit", runtime.WithHTTPPathPattern("/group.Member/DoQuit"))
|
||||
if err != nil {
|
||||
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
|
||||
return
|
||||
}
|
||||
resp, md, err := request_Member_DoQuit_0(annotatedContext, inboundMarshaler, client, req, pathParams)
|
||||
annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md)
|
||||
if err != nil {
|
||||
runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err)
|
||||
return
|
||||
}
|
||||
forward_Member_DoQuit_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
|
||||
})
|
||||
return nil
|
||||
}
|
||||
|
||||
var (
|
||||
pattern_Member_Fetch_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1}, []string{"group.Member", "Fetch"}, ""))
|
||||
pattern_Member_DoJoin_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1}, []string{"group.Member", "DoJoin"}, ""))
|
||||
pattern_Member_JoinFetch_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1}, []string{"group.Member", "JoinFetch"}, ""))
|
||||
pattern_Member_JoinDoHandle_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1}, []string{"group.Member", "JoinDoHandle"}, ""))
|
||||
pattern_Member_DoSetManager_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1}, []string{"group.Member", "DoSetManager"}, ""))
|
||||
pattern_Member_DoKick_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1}, []string{"group.Member", "DoKick"}, ""))
|
||||
pattern_Member_DoQuit_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1}, []string{"group.Member", "DoQuit"}, ""))
|
||||
)
|
||||
|
||||
var (
|
||||
forward_Member_Fetch_0 = runtime.ForwardResponseMessage
|
||||
forward_Member_DoJoin_0 = runtime.ForwardResponseMessage
|
||||
forward_Member_JoinFetch_0 = runtime.ForwardResponseMessage
|
||||
forward_Member_JoinDoHandle_0 = runtime.ForwardResponseMessage
|
||||
forward_Member_DoSetManager_0 = runtime.ForwardResponseMessage
|
||||
forward_Member_DoKick_0 = runtime.ForwardResponseMessage
|
||||
forward_Member_DoQuit_0 = runtime.ForwardResponseMessage
|
||||
)
|
||||
367
apps/social/group/pb/member_grpc.pb.go
Normal file
367
apps/social/group/pb/member_grpc.pb.go
Normal file
@@ -0,0 +1,367 @@
|
||||
// Code generated by protoc-gen-go-grpc. DO NOT EDIT.
|
||||
// versions:
|
||||
// - protoc-gen-go-grpc v1.5.1
|
||||
// - protoc (unknown)
|
||||
// source: member.proto
|
||||
|
||||
package group
|
||||
|
||||
import (
|
||||
context "context"
|
||||
grpc "google.golang.org/grpc"
|
||||
codes "google.golang.org/grpc/codes"
|
||||
status "google.golang.org/grpc/status"
|
||||
)
|
||||
|
||||
// This is a compile-time assertion to ensure that this generated file
|
||||
// is compatible with the grpc package it is being compiled against.
|
||||
// Requires gRPC-Go v1.64.0 or later.
|
||||
const _ = grpc.SupportPackageIsVersion9
|
||||
|
||||
const (
|
||||
Member_Fetch_FullMethodName = "/group.Member/Fetch"
|
||||
Member_DoJoin_FullMethodName = "/group.Member/DoJoin"
|
||||
Member_JoinFetch_FullMethodName = "/group.Member/JoinFetch"
|
||||
Member_JoinDoHandle_FullMethodName = "/group.Member/JoinDoHandle"
|
||||
Member_DoSetManager_FullMethodName = "/group.Member/DoSetManager"
|
||||
Member_DoKick_FullMethodName = "/group.Member/DoKick"
|
||||
Member_DoQuit_FullMethodName = "/group.Member/DoQuit"
|
||||
)
|
||||
|
||||
// MemberClient is the client API for Member service.
|
||||
//
|
||||
// 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.
|
||||
//
|
||||
// relation-关系管理:群组
|
||||
type MemberClient interface {
|
||||
//获取群组成员列表
|
||||
Fetch(ctx context.Context, in *IdentRequest, opts ...grpc.CallOption) (*GroupMemberReply, error)
|
||||
//申请加群
|
||||
DoJoin(ctx context.Context, in *DoJoinRequest, opts ...grpc.CallOption) (*StatusReply, error)
|
||||
//申请加群列表
|
||||
JoinFetch(ctx context.Context, in *Empty, opts ...grpc.CallOption) (*JoinFetchReply, error)
|
||||
//申请加群处理
|
||||
JoinDoHandle(ctx context.Context, in *GroupOPRequest, opts ...grpc.CallOption) (*StatusReply, error)
|
||||
//设置或取消管理员
|
||||
DoSetManager(ctx context.Context, in *GroupOPRequest, opts ...grpc.CallOption) (*StatusReply, error)
|
||||
//踢人
|
||||
DoKick(ctx context.Context, in *GroupOPRequest, opts ...grpc.CallOption) (*StatusReply, error)
|
||||
//退群
|
||||
DoQuit(ctx context.Context, in *GroupOPRequest, opts ...grpc.CallOption) (*StatusReply, error)
|
||||
}
|
||||
|
||||
type memberClient struct {
|
||||
cc grpc.ClientConnInterface
|
||||
}
|
||||
|
||||
func NewMemberClient(cc grpc.ClientConnInterface) MemberClient {
|
||||
return &memberClient{cc}
|
||||
}
|
||||
|
||||
func (c *memberClient) Fetch(ctx context.Context, in *IdentRequest, opts ...grpc.CallOption) (*GroupMemberReply, error) {
|
||||
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
|
||||
out := new(GroupMemberReply)
|
||||
err := c.cc.Invoke(ctx, Member_Fetch_FullMethodName, in, out, cOpts...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return out, nil
|
||||
}
|
||||
|
||||
func (c *memberClient) DoJoin(ctx context.Context, in *DoJoinRequest, opts ...grpc.CallOption) (*StatusReply, error) {
|
||||
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
|
||||
out := new(StatusReply)
|
||||
err := c.cc.Invoke(ctx, Member_DoJoin_FullMethodName, in, out, cOpts...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return out, nil
|
||||
}
|
||||
|
||||
func (c *memberClient) JoinFetch(ctx context.Context, in *Empty, opts ...grpc.CallOption) (*JoinFetchReply, error) {
|
||||
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
|
||||
out := new(JoinFetchReply)
|
||||
err := c.cc.Invoke(ctx, Member_JoinFetch_FullMethodName, in, out, cOpts...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return out, nil
|
||||
}
|
||||
|
||||
func (c *memberClient) JoinDoHandle(ctx context.Context, in *GroupOPRequest, opts ...grpc.CallOption) (*StatusReply, error) {
|
||||
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
|
||||
out := new(StatusReply)
|
||||
err := c.cc.Invoke(ctx, Member_JoinDoHandle_FullMethodName, in, out, cOpts...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return out, nil
|
||||
}
|
||||
|
||||
func (c *memberClient) DoSetManager(ctx context.Context, in *GroupOPRequest, opts ...grpc.CallOption) (*StatusReply, error) {
|
||||
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
|
||||
out := new(StatusReply)
|
||||
err := c.cc.Invoke(ctx, Member_DoSetManager_FullMethodName, in, out, cOpts...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return out, nil
|
||||
}
|
||||
|
||||
func (c *memberClient) DoKick(ctx context.Context, in *GroupOPRequest, opts ...grpc.CallOption) (*StatusReply, error) {
|
||||
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
|
||||
out := new(StatusReply)
|
||||
err := c.cc.Invoke(ctx, Member_DoKick_FullMethodName, in, out, cOpts...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return out, nil
|
||||
}
|
||||
|
||||
func (c *memberClient) DoQuit(ctx context.Context, in *GroupOPRequest, opts ...grpc.CallOption) (*StatusReply, error) {
|
||||
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
|
||||
out := new(StatusReply)
|
||||
err := c.cc.Invoke(ctx, Member_DoQuit_FullMethodName, in, out, cOpts...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return out, nil
|
||||
}
|
||||
|
||||
// MemberServer is the server API for Member service.
|
||||
// All implementations must embed UnimplementedMemberServer
|
||||
// for forward compatibility.
|
||||
//
|
||||
// relation-关系管理:群组
|
||||
type MemberServer interface {
|
||||
//获取群组成员列表
|
||||
Fetch(context.Context, *IdentRequest) (*GroupMemberReply, error)
|
||||
//申请加群
|
||||
DoJoin(context.Context, *DoJoinRequest) (*StatusReply, error)
|
||||
//申请加群列表
|
||||
JoinFetch(context.Context, *Empty) (*JoinFetchReply, error)
|
||||
//申请加群处理
|
||||
JoinDoHandle(context.Context, *GroupOPRequest) (*StatusReply, error)
|
||||
//设置或取消管理员
|
||||
DoSetManager(context.Context, *GroupOPRequest) (*StatusReply, error)
|
||||
//踢人
|
||||
DoKick(context.Context, *GroupOPRequest) (*StatusReply, error)
|
||||
//退群
|
||||
DoQuit(context.Context, *GroupOPRequest) (*StatusReply, error)
|
||||
mustEmbedUnimplementedMemberServer()
|
||||
}
|
||||
|
||||
// UnimplementedMemberServer must 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 UnimplementedMemberServer struct{}
|
||||
|
||||
func (UnimplementedMemberServer) Fetch(context.Context, *IdentRequest) (*GroupMemberReply, error) {
|
||||
return nil, status.Errorf(codes.Unimplemented, "method Fetch not implemented")
|
||||
}
|
||||
func (UnimplementedMemberServer) DoJoin(context.Context, *DoJoinRequest) (*StatusReply, error) {
|
||||
return nil, status.Errorf(codes.Unimplemented, "method DoJoin not implemented")
|
||||
}
|
||||
func (UnimplementedMemberServer) JoinFetch(context.Context, *Empty) (*JoinFetchReply, error) {
|
||||
return nil, status.Errorf(codes.Unimplemented, "method JoinFetch not implemented")
|
||||
}
|
||||
func (UnimplementedMemberServer) JoinDoHandle(context.Context, *GroupOPRequest) (*StatusReply, error) {
|
||||
return nil, status.Errorf(codes.Unimplemented, "method JoinDoHandle not implemented")
|
||||
}
|
||||
func (UnimplementedMemberServer) DoSetManager(context.Context, *GroupOPRequest) (*StatusReply, error) {
|
||||
return nil, status.Errorf(codes.Unimplemented, "method DoSetManager not implemented")
|
||||
}
|
||||
func (UnimplementedMemberServer) DoKick(context.Context, *GroupOPRequest) (*StatusReply, error) {
|
||||
return nil, status.Errorf(codes.Unimplemented, "method DoKick not implemented")
|
||||
}
|
||||
func (UnimplementedMemberServer) DoQuit(context.Context, *GroupOPRequest) (*StatusReply, error) {
|
||||
return nil, status.Errorf(codes.Unimplemented, "method DoQuit not implemented")
|
||||
}
|
||||
func (UnimplementedMemberServer) mustEmbedUnimplementedMemberServer() {}
|
||||
func (UnimplementedMemberServer) testEmbeddedByValue() {}
|
||||
|
||||
// UnsafeMemberServer may be embedded to opt out of forward compatibility for this service.
|
||||
// Use of this interface is not recommended, as added methods to MemberServer will
|
||||
// result in compilation errors.
|
||||
type UnsafeMemberServer interface {
|
||||
mustEmbedUnimplementedMemberServer()
|
||||
}
|
||||
|
||||
func RegisterMemberServer(s grpc.ServiceRegistrar, srv MemberServer) {
|
||||
// If the following call pancis, it indicates UnimplementedMemberServer 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.
|
||||
if t, ok := srv.(interface{ testEmbeddedByValue() }); ok {
|
||||
t.testEmbeddedByValue()
|
||||
}
|
||||
s.RegisterService(&Member_ServiceDesc, srv)
|
||||
}
|
||||
|
||||
func _Member_Fetch_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
||||
in := new(IdentRequest)
|
||||
if err := dec(in); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
if interceptor == nil {
|
||||
return srv.(MemberServer).Fetch(ctx, in)
|
||||
}
|
||||
info := &grpc.UnaryServerInfo{
|
||||
Server: srv,
|
||||
FullMethod: Member_Fetch_FullMethodName,
|
||||
}
|
||||
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||
return srv.(MemberServer).Fetch(ctx, req.(*IdentRequest))
|
||||
}
|
||||
return interceptor(ctx, in, info, handler)
|
||||
}
|
||||
|
||||
func _Member_DoJoin_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
||||
in := new(DoJoinRequest)
|
||||
if err := dec(in); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
if interceptor == nil {
|
||||
return srv.(MemberServer).DoJoin(ctx, in)
|
||||
}
|
||||
info := &grpc.UnaryServerInfo{
|
||||
Server: srv,
|
||||
FullMethod: Member_DoJoin_FullMethodName,
|
||||
}
|
||||
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||
return srv.(MemberServer).DoJoin(ctx, req.(*DoJoinRequest))
|
||||
}
|
||||
return interceptor(ctx, in, info, handler)
|
||||
}
|
||||
|
||||
func _Member_JoinFetch_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
||||
in := new(Empty)
|
||||
if err := dec(in); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
if interceptor == nil {
|
||||
return srv.(MemberServer).JoinFetch(ctx, in)
|
||||
}
|
||||
info := &grpc.UnaryServerInfo{
|
||||
Server: srv,
|
||||
FullMethod: Member_JoinFetch_FullMethodName,
|
||||
}
|
||||
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||
return srv.(MemberServer).JoinFetch(ctx, req.(*Empty))
|
||||
}
|
||||
return interceptor(ctx, in, info, handler)
|
||||
}
|
||||
|
||||
func _Member_JoinDoHandle_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
||||
in := new(GroupOPRequest)
|
||||
if err := dec(in); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
if interceptor == nil {
|
||||
return srv.(MemberServer).JoinDoHandle(ctx, in)
|
||||
}
|
||||
info := &grpc.UnaryServerInfo{
|
||||
Server: srv,
|
||||
FullMethod: Member_JoinDoHandle_FullMethodName,
|
||||
}
|
||||
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||
return srv.(MemberServer).JoinDoHandle(ctx, req.(*GroupOPRequest))
|
||||
}
|
||||
return interceptor(ctx, in, info, handler)
|
||||
}
|
||||
|
||||
func _Member_DoSetManager_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
||||
in := new(GroupOPRequest)
|
||||
if err := dec(in); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
if interceptor == nil {
|
||||
return srv.(MemberServer).DoSetManager(ctx, in)
|
||||
}
|
||||
info := &grpc.UnaryServerInfo{
|
||||
Server: srv,
|
||||
FullMethod: Member_DoSetManager_FullMethodName,
|
||||
}
|
||||
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||
return srv.(MemberServer).DoSetManager(ctx, req.(*GroupOPRequest))
|
||||
}
|
||||
return interceptor(ctx, in, info, handler)
|
||||
}
|
||||
|
||||
func _Member_DoKick_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
||||
in := new(GroupOPRequest)
|
||||
if err := dec(in); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
if interceptor == nil {
|
||||
return srv.(MemberServer).DoKick(ctx, in)
|
||||
}
|
||||
info := &grpc.UnaryServerInfo{
|
||||
Server: srv,
|
||||
FullMethod: Member_DoKick_FullMethodName,
|
||||
}
|
||||
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||
return srv.(MemberServer).DoKick(ctx, req.(*GroupOPRequest))
|
||||
}
|
||||
return interceptor(ctx, in, info, handler)
|
||||
}
|
||||
|
||||
func _Member_DoQuit_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
||||
in := new(GroupOPRequest)
|
||||
if err := dec(in); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
if interceptor == nil {
|
||||
return srv.(MemberServer).DoQuit(ctx, in)
|
||||
}
|
||||
info := &grpc.UnaryServerInfo{
|
||||
Server: srv,
|
||||
FullMethod: Member_DoQuit_FullMethodName,
|
||||
}
|
||||
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||
return srv.(MemberServer).DoQuit(ctx, req.(*GroupOPRequest))
|
||||
}
|
||||
return interceptor(ctx, in, info, handler)
|
||||
}
|
||||
|
||||
// Member_ServiceDesc is the grpc.ServiceDesc for Member service.
|
||||
// It's only intended for direct use with grpc.RegisterService,
|
||||
// and not to be introspected or modified (even as a copy)
|
||||
var Member_ServiceDesc = grpc.ServiceDesc{
|
||||
ServiceName: "group.Member",
|
||||
HandlerType: (*MemberServer)(nil),
|
||||
Methods: []grpc.MethodDesc{
|
||||
{
|
||||
MethodName: "Fetch",
|
||||
Handler: _Member_Fetch_Handler,
|
||||
},
|
||||
{
|
||||
MethodName: "DoJoin",
|
||||
Handler: _Member_DoJoin_Handler,
|
||||
},
|
||||
{
|
||||
MethodName: "JoinFetch",
|
||||
Handler: _Member_JoinFetch_Handler,
|
||||
},
|
||||
{
|
||||
MethodName: "JoinDoHandle",
|
||||
Handler: _Member_JoinDoHandle_Handler,
|
||||
},
|
||||
{
|
||||
MethodName: "DoSetManager",
|
||||
Handler: _Member_DoSetManager_Handler,
|
||||
},
|
||||
{
|
||||
MethodName: "DoKick",
|
||||
Handler: _Member_DoKick_Handler,
|
||||
},
|
||||
{
|
||||
MethodName: "DoQuit",
|
||||
Handler: _Member_DoQuit_Handler,
|
||||
},
|
||||
},
|
||||
Streams: []grpc.StreamDesc{},
|
||||
Metadata: "member.proto",
|
||||
}
|
||||
Reference in New Issue
Block a user