上传编码指针代码内存重叠问题
This commit is contained in:
parent
fa554438c9
commit
fb419359d0
@ -481,7 +481,3 @@ func EvalSha(ctx context.Context, sha1 string, keys []string, args ...interface{
|
||||
func ScriptExists(ctx context.Context, hashes ...string) *redis.BoolSliceCmd {
|
||||
return defsys.ScriptExists(ctx, hashes...)
|
||||
}
|
||||
|
||||
// func ScriptLoad(ctx context.Context, script string) *redis.StringCmd {
|
||||
// return defsys.ScriptLoad(ctx, script)
|
||||
// }
|
||||
|
@ -154,7 +154,7 @@ func (this *sortKeysMapEncoder) EncodeToMapJson(ptr unsafe.Pointer, w codecore.I
|
||||
err = keystream.Error()
|
||||
return
|
||||
}
|
||||
k = BytesToString(keystream.Buffer())
|
||||
k = string(keystream.Buffer())
|
||||
} else {
|
||||
k = *((*string)(key))
|
||||
}
|
||||
@ -164,7 +164,7 @@ func (this *sortKeysMapEncoder) EncodeToMapJson(ptr unsafe.Pointer, w codecore.I
|
||||
err = elemstream.Error()
|
||||
return
|
||||
}
|
||||
v = BytesToString(elemstream.Buffer())
|
||||
v = string(elemstream.Buffer())
|
||||
} else {
|
||||
v = *((*string)(elem))
|
||||
}
|
||||
@ -228,7 +228,7 @@ func (this *mapEncoder) EncodeToMapJson(ptr unsafe.Pointer, w codecore.IWriter)
|
||||
err = keystream.Error()
|
||||
return
|
||||
}
|
||||
k = BytesToString(keystream.Buffer())
|
||||
k = string(keystream.Buffer())
|
||||
} else {
|
||||
k = *((*string)(key))
|
||||
}
|
||||
@ -238,7 +238,7 @@ func (this *mapEncoder) EncodeToMapJson(ptr unsafe.Pointer, w codecore.IWriter)
|
||||
err = elemstream.Error()
|
||||
return
|
||||
}
|
||||
v = BytesToString(elemstream.Buffer())
|
||||
v = string(elemstream.Buffer())
|
||||
} else {
|
||||
v = *((*string)(elem))
|
||||
}
|
||||
|
@ -40,7 +40,7 @@ func (this *apiComp) Send(session comm.IUserSession, req *pb.ChatSendReq) (code
|
||||
Id: primitive.NewObjectID().Hex(),
|
||||
Channel: req.Channel,
|
||||
Suid: session.GetUserId(),
|
||||
Headid: user.Avatar,
|
||||
AreaId: user.Avatar,
|
||||
Content: req.Content,
|
||||
Ctime: time.Now().Unix(),
|
||||
}
|
||||
|
@ -35,7 +35,7 @@ func (this *apiComp) SpanSend(session comm.IUserSession, req *pb.ChatSpanSendReq
|
||||
Channel: req.Channel,
|
||||
Suid: session.GetUserId(),
|
||||
AreaId: userexpand.Chatchannel,
|
||||
Headid: user.Avatar,
|
||||
Avatar: user.Avatar,
|
||||
Content: req.Content,
|
||||
Ctime: time.Now().Unix(),
|
||||
}
|
||||
|
@ -303,6 +303,7 @@ func (this *MCompModel) AddLists(uid string, data interface{}, opt ...DBOption)
|
||||
keydata := k.Interface().(string)
|
||||
valuedata := value.Interface()
|
||||
key := this.ukeylist(uid, keydata)
|
||||
|
||||
if err = this.Redis.HMSet(key, valuedata); err != nil {
|
||||
return
|
||||
}
|
||||
|
33
modules/forum/api_getlist.go
Normal file
33
modules/forum/api_getlist.go
Normal file
@ -0,0 +1,33 @@
|
||||
package forum
|
||||
|
||||
import (
|
||||
"go_dreamfactory/comm"
|
||||
"go_dreamfactory/pb"
|
||||
|
||||
"google.golang.org/protobuf/proto"
|
||||
)
|
||||
|
||||
//参数校验
|
||||
func (this *apiComp) GetListCheck(session comm.IUserSession, req *pb.ForumGetListReq) (code pb.ErrorCode) {
|
||||
if req.Herocid == "" {
|
||||
code = pb.ErrorCode_ReqParameterError
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
///获取本服聊天消息记录
|
||||
func (this *apiComp) GetList(session comm.IUserSession, req *pb.ForumGetListReq) (code pb.ErrorCode, data proto.Message) {
|
||||
var (
|
||||
err error
|
||||
list []*pb.DBComment
|
||||
)
|
||||
if code = this.GetListCheck(session, req); code != pb.ErrorCode_Success {
|
||||
return
|
||||
}
|
||||
if list, err = this.module.modelForum.GetComment(req.Herocid); err != nil {
|
||||
code = pb.ErrorCode_DBError
|
||||
return
|
||||
}
|
||||
session.SendMsg(string(this.module.GetType()), "getlist", &pb.ForumGetListResp{Comment: list})
|
||||
return
|
||||
}
|
44
modules/forum/api_releasecomment.go
Normal file
44
modules/forum/api_releasecomment.go
Normal file
@ -0,0 +1,44 @@
|
||||
package forum
|
||||
|
||||
import (
|
||||
"go_dreamfactory/comm"
|
||||
"go_dreamfactory/pb"
|
||||
"time"
|
||||
|
||||
"go.mongodb.org/mongo-driver/bson/primitive"
|
||||
"google.golang.org/protobuf/proto"
|
||||
)
|
||||
|
||||
//参数校验
|
||||
func (this *apiComp) ReleaseCommentCheck(session comm.IUserSession, req *pb.ForumReleaseCommentReq) (code pb.ErrorCode) {
|
||||
if req.Herocid == "" || req.Herooid == "" || req.Content == "" {
|
||||
code = pb.ErrorCode_ReqParameterError
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
///发布评论
|
||||
func (this *apiComp) ReleaseComment(session comm.IUserSession, req *pb.ForumReleaseCommentReq) (code pb.ErrorCode, data proto.Message) {
|
||||
var (
|
||||
err error
|
||||
comment *pb.DBComment
|
||||
)
|
||||
if code = this.ReleaseCommentCheck(session, req); code != pb.ErrorCode_Success {
|
||||
return
|
||||
}
|
||||
comment = &pb.DBComment{
|
||||
Id: primitive.NewObjectID().Hex(),
|
||||
Heroid: req.Herocid,
|
||||
Heroobjid: req.Herooid,
|
||||
Uid: session.GetUserId(),
|
||||
Avatar: req.Avatar,
|
||||
Uname: req.Uname,
|
||||
Ctime: time.Now().Unix(),
|
||||
}
|
||||
if err = this.module.modelForum.releaseComment(comment); err != nil {
|
||||
code = pb.ErrorCode_DBError
|
||||
return
|
||||
}
|
||||
session.SendMsg(string(this.module.GetType()), "releasecomment", &pb.ForumReleaseCommentResp{Comment: comment})
|
||||
return
|
||||
}
|
@ -2,7 +2,10 @@ package forum
|
||||
|
||||
import (
|
||||
"go_dreamfactory/lego/core"
|
||||
"go_dreamfactory/lego/sys/redis"
|
||||
"go_dreamfactory/lego/utils/codec/json"
|
||||
"go_dreamfactory/modules"
|
||||
"go_dreamfactory/pb"
|
||||
|
||||
"go.mongodb.org/mongo-driver/mongo"
|
||||
"go.mongodb.org/mongo-driver/x/bsonx"
|
||||
@ -21,7 +24,39 @@ func (this *modelForumComp) Init(service core.IService, module core.IModule, com
|
||||
this.TableName = "forum"
|
||||
//创建uid索引
|
||||
this.DB.CreateIndex(core.SqlTable(this.TableName), mongo.IndexModel{
|
||||
Keys: bsonx.Doc{{Key: "uid", Value: bsonx.Int32(1)}},
|
||||
Keys: bsonx.Doc{{Key: "heroid", Value: bsonx.Int32(1)}},
|
||||
})
|
||||
return
|
||||
}
|
||||
|
||||
//查询用户未读消息
|
||||
func (this *modelForumComp) GetComment(herocId string) (result []*pb.DBComment, err error) {
|
||||
var (
|
||||
key string
|
||||
cdata []map[string]string
|
||||
readmax_chat int32
|
||||
)
|
||||
|
||||
if cdata, err = this.Batchgetqueues(key, readmax_chat); err == nil {
|
||||
result = make([]*pb.DBComment, len(cdata))
|
||||
for i, v := range cdata {
|
||||
comment := &pb.DBComment{}
|
||||
if err = json.UnmarshalMap(v, comment); err != nil {
|
||||
return
|
||||
}
|
||||
result[i] = comment
|
||||
}
|
||||
}
|
||||
if err == redis.RedisNil {
|
||||
err = nil
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
///发布评论
|
||||
func (this *modelForumComp) releaseComment(comment *pb.DBComment) (err error) {
|
||||
if _, err = this.DB.InsertOne(core.SqlTable(this.TableName), comment); err != nil {
|
||||
this.module.Errorln(err)
|
||||
}
|
||||
return
|
||||
}
|
||||
|
@ -87,7 +87,7 @@ type DBChat struct {
|
||||
Groud int32 `protobuf:"varint,5,opt,name=groud,proto3" json:"groud"` //跨服频道 分组id
|
||||
AreaId int32 `protobuf:"varint,6,opt,name=areaId,proto3" json:"areaId"` //跨服频道 频道Id
|
||||
UnionId string `protobuf:"bytes,7,opt,name=unionId,proto3" json:"unionId"` //工会id
|
||||
Headid int32 `protobuf:"varint,8,opt,name=headid,proto3" json:"headid"` //用户头像
|
||||
Avatar int32 `protobuf:"varint,8,opt,name=avatar,proto3" json:"avatar"` //用户头像
|
||||
Uname string `protobuf:"bytes,9,opt,name=uname,proto3" json:"uname"` //用户名
|
||||
Content string `protobuf:"bytes,10,opt,name=content,proto3" json:"content"` //内容
|
||||
Ctime int64 `protobuf:"varint,11,opt,name=ctime,proto3" json:"ctime"` //创建时间
|
||||
@ -174,9 +174,9 @@ func (x *DBChat) GetUnionId() string {
|
||||
return ""
|
||||
}
|
||||
|
||||
func (x *DBChat) GetHeadid() int32 {
|
||||
func (x *DBChat) GetAvatar() int32 {
|
||||
if x != nil {
|
||||
return x.Headid
|
||||
return x.Avatar
|
||||
}
|
||||
return 0
|
||||
}
|
||||
@ -217,8 +217,8 @@ var file_chat_chat_db_proto_rawDesc = []byte{
|
||||
0x67, 0x72, 0x6f, 0x75, 0x64, 0x12, 0x16, 0x0a, 0x06, 0x61, 0x72, 0x65, 0x61, 0x49, 0x64, 0x18,
|
||||
0x06, 0x20, 0x01, 0x28, 0x05, 0x52, 0x06, 0x61, 0x72, 0x65, 0x61, 0x49, 0x64, 0x12, 0x18, 0x0a,
|
||||
0x07, 0x75, 0x6e, 0x69, 0x6f, 0x6e, 0x49, 0x64, 0x18, 0x07, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07,
|
||||
0x75, 0x6e, 0x69, 0x6f, 0x6e, 0x49, 0x64, 0x12, 0x16, 0x0a, 0x06, 0x68, 0x65, 0x61, 0x64, 0x69,
|
||||
0x64, 0x18, 0x08, 0x20, 0x01, 0x28, 0x05, 0x52, 0x06, 0x68, 0x65, 0x61, 0x64, 0x69, 0x64, 0x12,
|
||||
0x75, 0x6e, 0x69, 0x6f, 0x6e, 0x49, 0x64, 0x12, 0x16, 0x0a, 0x06, 0x61, 0x76, 0x61, 0x74, 0x61,
|
||||
0x72, 0x18, 0x08, 0x20, 0x01, 0x28, 0x05, 0x52, 0x06, 0x61, 0x76, 0x61, 0x74, 0x61, 0x72, 0x12,
|
||||
0x14, 0x0a, 0x05, 0x75, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x09, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05,
|
||||
0x75, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x18, 0x0a, 0x07, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74,
|
||||
0x18, 0x0a, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x12,
|
||||
|
@ -10,6 +10,7 @@ import (
|
||||
protoreflect "google.golang.org/protobuf/reflect/protoreflect"
|
||||
protoimpl "google.golang.org/protobuf/runtime/protoimpl"
|
||||
reflect "reflect"
|
||||
sync "sync"
|
||||
)
|
||||
|
||||
const (
|
||||
@ -19,21 +20,224 @@ const (
|
||||
_ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20)
|
||||
)
|
||||
|
||||
type CommentState int32
|
||||
|
||||
const (
|
||||
CommentState_Release CommentState = 0 //发布
|
||||
CommentState_Offline CommentState = 1 //下架
|
||||
)
|
||||
|
||||
// Enum value maps for CommentState.
|
||||
var (
|
||||
CommentState_name = map[int32]string{
|
||||
0: "Release",
|
||||
1: "Offline",
|
||||
}
|
||||
CommentState_value = map[string]int32{
|
||||
"Release": 0,
|
||||
"Offline": 1,
|
||||
}
|
||||
)
|
||||
|
||||
func (x CommentState) Enum() *CommentState {
|
||||
p := new(CommentState)
|
||||
*p = x
|
||||
return p
|
||||
}
|
||||
|
||||
func (x CommentState) String() string {
|
||||
return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x))
|
||||
}
|
||||
|
||||
func (CommentState) Descriptor() protoreflect.EnumDescriptor {
|
||||
return file_forum_forum_db_proto_enumTypes[0].Descriptor()
|
||||
}
|
||||
|
||||
func (CommentState) Type() protoreflect.EnumType {
|
||||
return &file_forum_forum_db_proto_enumTypes[0]
|
||||
}
|
||||
|
||||
func (x CommentState) Number() protoreflect.EnumNumber {
|
||||
return protoreflect.EnumNumber(x)
|
||||
}
|
||||
|
||||
// Deprecated: Use CommentState.Descriptor instead.
|
||||
func (CommentState) EnumDescriptor() ([]byte, []int) {
|
||||
return file_forum_forum_db_proto_rawDescGZIP(), []int{0}
|
||||
}
|
||||
|
||||
//评论数据
|
||||
type DBComment struct {
|
||||
state protoimpl.MessageState
|
||||
sizeCache protoimpl.SizeCache
|
||||
unknownFields protoimpl.UnknownFields
|
||||
|
||||
Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id"` //主键id
|
||||
Heroid string `protobuf:"bytes,2,opt,name=heroid,proto3" json:"heroid"` //英雄id
|
||||
Heroobjid string `protobuf:"bytes,3,opt,name=heroobjid,proto3" json:"heroobjid"` //目标英雄的实例id
|
||||
Uid string `protobuf:"bytes,4,opt,name=uid,proto3" json:"uid"` //发送用户id
|
||||
Avatar int32 `protobuf:"varint,5,opt,name=avatar,proto3" json:"avatar"` //用户头像
|
||||
Uname string `protobuf:"bytes,6,opt,name=uname,proto3" json:"uname"` //用户名
|
||||
State CommentState `protobuf:"varint,7,opt,name=state,proto3,enum=CommentState" json:"state"` //状态
|
||||
Ctime int64 `protobuf:"varint,8,opt,name=ctime,proto3" json:"ctime"` //发布时间
|
||||
Content string `protobuf:"bytes,9,opt,name=content,proto3" json:"content"` //内容
|
||||
Starlist int32 `protobuf:"varint,10,opt,name=starlist,proto3" json:"starlist"` //点赞数
|
||||
}
|
||||
|
||||
func (x *DBComment) Reset() {
|
||||
*x = DBComment{}
|
||||
if protoimpl.UnsafeEnabled {
|
||||
mi := &file_forum_forum_db_proto_msgTypes[0]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
}
|
||||
|
||||
func (x *DBComment) String() string {
|
||||
return protoimpl.X.MessageStringOf(x)
|
||||
}
|
||||
|
||||
func (*DBComment) ProtoMessage() {}
|
||||
|
||||
func (x *DBComment) ProtoReflect() protoreflect.Message {
|
||||
mi := &file_forum_forum_db_proto_msgTypes[0]
|
||||
if protoimpl.UnsafeEnabled && x != nil {
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
if ms.LoadMessageInfo() == nil {
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
return ms
|
||||
}
|
||||
return mi.MessageOf(x)
|
||||
}
|
||||
|
||||
// Deprecated: Use DBComment.ProtoReflect.Descriptor instead.
|
||||
func (*DBComment) Descriptor() ([]byte, []int) {
|
||||
return file_forum_forum_db_proto_rawDescGZIP(), []int{0}
|
||||
}
|
||||
|
||||
func (x *DBComment) GetId() string {
|
||||
if x != nil {
|
||||
return x.Id
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
func (x *DBComment) GetHeroid() string {
|
||||
if x != nil {
|
||||
return x.Heroid
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
func (x *DBComment) GetHeroobjid() string {
|
||||
if x != nil {
|
||||
return x.Heroobjid
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
func (x *DBComment) GetUid() string {
|
||||
if x != nil {
|
||||
return x.Uid
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
func (x *DBComment) GetAvatar() int32 {
|
||||
if x != nil {
|
||||
return x.Avatar
|
||||
}
|
||||
return 0
|
||||
}
|
||||
|
||||
func (x *DBComment) GetUname() string {
|
||||
if x != nil {
|
||||
return x.Uname
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
func (x *DBComment) GetState() CommentState {
|
||||
if x != nil {
|
||||
return x.State
|
||||
}
|
||||
return CommentState_Release
|
||||
}
|
||||
|
||||
func (x *DBComment) GetCtime() int64 {
|
||||
if x != nil {
|
||||
return x.Ctime
|
||||
}
|
||||
return 0
|
||||
}
|
||||
|
||||
func (x *DBComment) GetContent() string {
|
||||
if x != nil {
|
||||
return x.Content
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
func (x *DBComment) GetStarlist() int32 {
|
||||
if x != nil {
|
||||
return x.Starlist
|
||||
}
|
||||
return 0
|
||||
}
|
||||
|
||||
var File_forum_forum_db_proto protoreflect.FileDescriptor
|
||||
|
||||
var file_forum_forum_db_proto_rawDesc = []byte{
|
||||
0x0a, 0x14, 0x66, 0x6f, 0x72, 0x75, 0x6d, 0x2f, 0x66, 0x6f, 0x72, 0x75, 0x6d, 0x5f, 0x64, 0x62,
|
||||
0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x42, 0x06, 0x5a, 0x04, 0x2e, 0x3b, 0x70, 0x62, 0x62, 0x06,
|
||||
0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
|
||||
0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x82, 0x02, 0x0a, 0x09, 0x44, 0x42, 0x43, 0x6f, 0x6d,
|
||||
0x6d, 0x65, 0x6e, 0x74, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09,
|
||||
0x52, 0x02, 0x69, 0x64, 0x12, 0x16, 0x0a, 0x06, 0x68, 0x65, 0x72, 0x6f, 0x69, 0x64, 0x18, 0x02,
|
||||
0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x68, 0x65, 0x72, 0x6f, 0x69, 0x64, 0x12, 0x1c, 0x0a, 0x09,
|
||||
0x68, 0x65, 0x72, 0x6f, 0x6f, 0x62, 0x6a, 0x69, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52,
|
||||
0x09, 0x68, 0x65, 0x72, 0x6f, 0x6f, 0x62, 0x6a, 0x69, 0x64, 0x12, 0x10, 0x0a, 0x03, 0x75, 0x69,
|
||||
0x64, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x75, 0x69, 0x64, 0x12, 0x16, 0x0a, 0x06,
|
||||
0x61, 0x76, 0x61, 0x74, 0x61, 0x72, 0x18, 0x05, 0x20, 0x01, 0x28, 0x05, 0x52, 0x06, 0x61, 0x76,
|
||||
0x61, 0x74, 0x61, 0x72, 0x12, 0x14, 0x0a, 0x05, 0x75, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x06, 0x20,
|
||||
0x01, 0x28, 0x09, 0x52, 0x05, 0x75, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x23, 0x0a, 0x05, 0x73, 0x74,
|
||||
0x61, 0x74, 0x65, 0x18, 0x07, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x0d, 0x2e, 0x43, 0x6f, 0x6d, 0x6d,
|
||||
0x65, 0x6e, 0x74, 0x53, 0x74, 0x61, 0x74, 0x65, 0x52, 0x05, 0x73, 0x74, 0x61, 0x74, 0x65, 0x12,
|
||||
0x14, 0x0a, 0x05, 0x63, 0x74, 0x69, 0x6d, 0x65, 0x18, 0x08, 0x20, 0x01, 0x28, 0x03, 0x52, 0x05,
|
||||
0x63, 0x74, 0x69, 0x6d, 0x65, 0x12, 0x18, 0x0a, 0x07, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74,
|
||||
0x18, 0x09, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x12,
|
||||
0x1a, 0x0a, 0x08, 0x73, 0x74, 0x61, 0x72, 0x6c, 0x69, 0x73, 0x74, 0x18, 0x0a, 0x20, 0x01, 0x28,
|
||||
0x05, 0x52, 0x08, 0x73, 0x74, 0x61, 0x72, 0x6c, 0x69, 0x73, 0x74, 0x2a, 0x28, 0x0a, 0x0c, 0x43,
|
||||
0x6f, 0x6d, 0x6d, 0x65, 0x6e, 0x74, 0x53, 0x74, 0x61, 0x74, 0x65, 0x12, 0x0b, 0x0a, 0x07, 0x52,
|
||||
0x65, 0x6c, 0x65, 0x61, 0x73, 0x65, 0x10, 0x00, 0x12, 0x0b, 0x0a, 0x07, 0x4f, 0x66, 0x66, 0x6c,
|
||||
0x69, 0x6e, 0x65, 0x10, 0x01, 0x42, 0x06, 0x5a, 0x04, 0x2e, 0x3b, 0x70, 0x62, 0x62, 0x06, 0x70,
|
||||
0x72, 0x6f, 0x74, 0x6f, 0x33,
|
||||
}
|
||||
|
||||
var file_forum_forum_db_proto_goTypes = []interface{}{}
|
||||
var (
|
||||
file_forum_forum_db_proto_rawDescOnce sync.Once
|
||||
file_forum_forum_db_proto_rawDescData = file_forum_forum_db_proto_rawDesc
|
||||
)
|
||||
|
||||
func file_forum_forum_db_proto_rawDescGZIP() []byte {
|
||||
file_forum_forum_db_proto_rawDescOnce.Do(func() {
|
||||
file_forum_forum_db_proto_rawDescData = protoimpl.X.CompressGZIP(file_forum_forum_db_proto_rawDescData)
|
||||
})
|
||||
return file_forum_forum_db_proto_rawDescData
|
||||
}
|
||||
|
||||
var file_forum_forum_db_proto_enumTypes = make([]protoimpl.EnumInfo, 1)
|
||||
var file_forum_forum_db_proto_msgTypes = make([]protoimpl.MessageInfo, 1)
|
||||
var file_forum_forum_db_proto_goTypes = []interface{}{
|
||||
(CommentState)(0), // 0: CommentState
|
||||
(*DBComment)(nil), // 1: DBComment
|
||||
}
|
||||
var file_forum_forum_db_proto_depIdxs = []int32{
|
||||
0, // [0:0] is the sub-list for method output_type
|
||||
0, // [0:0] is the sub-list for method input_type
|
||||
0, // [0:0] is the sub-list for extension type_name
|
||||
0, // [0:0] is the sub-list for extension extendee
|
||||
0, // [0:0] is the sub-list for field type_name
|
||||
0, // 0: DBComment.state:type_name -> CommentState
|
||||
1, // [1:1] is the sub-list for method output_type
|
||||
1, // [1:1] 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_forum_forum_db_proto_init() }
|
||||
@ -41,18 +245,34 @@ func file_forum_forum_db_proto_init() {
|
||||
if File_forum_forum_db_proto != nil {
|
||||
return
|
||||
}
|
||||
if !protoimpl.UnsafeEnabled {
|
||||
file_forum_forum_db_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} {
|
||||
switch v := v.(*DBComment); i {
|
||||
case 0:
|
||||
return &v.state
|
||||
case 1:
|
||||
return &v.sizeCache
|
||||
case 2:
|
||||
return &v.unknownFields
|
||||
default:
|
||||
return nil
|
||||
}
|
||||
}
|
||||
}
|
||||
type x struct{}
|
||||
out := protoimpl.TypeBuilder{
|
||||
File: protoimpl.DescBuilder{
|
||||
GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
|
||||
RawDescriptor: file_forum_forum_db_proto_rawDesc,
|
||||
NumEnums: 0,
|
||||
NumMessages: 0,
|
||||
NumEnums: 1,
|
||||
NumMessages: 1,
|
||||
NumExtensions: 0,
|
||||
NumServices: 0,
|
||||
},
|
||||
GoTypes: file_forum_forum_db_proto_goTypes,
|
||||
DependencyIndexes: file_forum_forum_db_proto_depIdxs,
|
||||
EnumInfos: file_forum_forum_db_proto_enumTypes,
|
||||
MessageInfos: file_forum_forum_db_proto_msgTypes,
|
||||
}.Build()
|
||||
File_forum_forum_db_proto = out.File
|
||||
file_forum_forum_db_proto_rawDesc = nil
|
||||
|
@ -10,6 +10,7 @@ import (
|
||||
protoreflect "google.golang.org/protobuf/reflect/protoreflect"
|
||||
protoimpl "google.golang.org/protobuf/runtime/protoimpl"
|
||||
reflect "reflect"
|
||||
sync "sync"
|
||||
)
|
||||
|
||||
const (
|
||||
@ -19,21 +20,287 @@ const (
|
||||
_ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20)
|
||||
)
|
||||
|
||||
//获取评论列表
|
||||
type ForumGetListReq struct {
|
||||
state protoimpl.MessageState
|
||||
sizeCache protoimpl.SizeCache
|
||||
unknownFields protoimpl.UnknownFields
|
||||
|
||||
Herocid string `protobuf:"bytes,1,opt,name=herocid,proto3" json:"herocid"` //英雄配置id
|
||||
}
|
||||
|
||||
func (x *ForumGetListReq) Reset() {
|
||||
*x = ForumGetListReq{}
|
||||
if protoimpl.UnsafeEnabled {
|
||||
mi := &file_forum_forum_msg_proto_msgTypes[0]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
}
|
||||
|
||||
func (x *ForumGetListReq) String() string {
|
||||
return protoimpl.X.MessageStringOf(x)
|
||||
}
|
||||
|
||||
func (*ForumGetListReq) ProtoMessage() {}
|
||||
|
||||
func (x *ForumGetListReq) ProtoReflect() protoreflect.Message {
|
||||
mi := &file_forum_forum_msg_proto_msgTypes[0]
|
||||
if protoimpl.UnsafeEnabled && x != nil {
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
if ms.LoadMessageInfo() == nil {
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
return ms
|
||||
}
|
||||
return mi.MessageOf(x)
|
||||
}
|
||||
|
||||
// Deprecated: Use ForumGetListReq.ProtoReflect.Descriptor instead.
|
||||
func (*ForumGetListReq) Descriptor() ([]byte, []int) {
|
||||
return file_forum_forum_msg_proto_rawDescGZIP(), []int{0}
|
||||
}
|
||||
|
||||
func (x *ForumGetListReq) GetHerocid() string {
|
||||
if x != nil {
|
||||
return x.Herocid
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
//获取评论回应
|
||||
type ForumGetListResp struct {
|
||||
state protoimpl.MessageState
|
||||
sizeCache protoimpl.SizeCache
|
||||
unknownFields protoimpl.UnknownFields
|
||||
|
||||
Comment []*DBComment `protobuf:"bytes,1,rep,name=comment,proto3" json:"comment"`
|
||||
}
|
||||
|
||||
func (x *ForumGetListResp) Reset() {
|
||||
*x = ForumGetListResp{}
|
||||
if protoimpl.UnsafeEnabled {
|
||||
mi := &file_forum_forum_msg_proto_msgTypes[1]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
}
|
||||
|
||||
func (x *ForumGetListResp) String() string {
|
||||
return protoimpl.X.MessageStringOf(x)
|
||||
}
|
||||
|
||||
func (*ForumGetListResp) ProtoMessage() {}
|
||||
|
||||
func (x *ForumGetListResp) ProtoReflect() protoreflect.Message {
|
||||
mi := &file_forum_forum_msg_proto_msgTypes[1]
|
||||
if protoimpl.UnsafeEnabled && x != nil {
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
if ms.LoadMessageInfo() == nil {
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
return ms
|
||||
}
|
||||
return mi.MessageOf(x)
|
||||
}
|
||||
|
||||
// Deprecated: Use ForumGetListResp.ProtoReflect.Descriptor instead.
|
||||
func (*ForumGetListResp) Descriptor() ([]byte, []int) {
|
||||
return file_forum_forum_msg_proto_rawDescGZIP(), []int{1}
|
||||
}
|
||||
|
||||
func (x *ForumGetListResp) GetComment() []*DBComment {
|
||||
if x != nil {
|
||||
return x.Comment
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
//发布评论请求
|
||||
type ForumReleaseCommentReq struct {
|
||||
state protoimpl.MessageState
|
||||
sizeCache protoimpl.SizeCache
|
||||
unknownFields protoimpl.UnknownFields
|
||||
|
||||
Avatar int32 `protobuf:"varint,1,opt,name=avatar,proto3" json:"avatar"` //用户头像
|
||||
Uname string `protobuf:"bytes,2,opt,name=uname,proto3" json:"uname"` //用户名
|
||||
Herocid string `protobuf:"bytes,3,opt,name=herocid,proto3" json:"herocid"` //英雄的配置id
|
||||
Herooid string `protobuf:"bytes,4,opt,name=herooid,proto3" json:"herooid"` //英雄的实例id
|
||||
Content string `protobuf:"bytes,5,opt,name=content,proto3" json:"content"` //评论内容
|
||||
}
|
||||
|
||||
func (x *ForumReleaseCommentReq) Reset() {
|
||||
*x = ForumReleaseCommentReq{}
|
||||
if protoimpl.UnsafeEnabled {
|
||||
mi := &file_forum_forum_msg_proto_msgTypes[2]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
}
|
||||
|
||||
func (x *ForumReleaseCommentReq) String() string {
|
||||
return protoimpl.X.MessageStringOf(x)
|
||||
}
|
||||
|
||||
func (*ForumReleaseCommentReq) ProtoMessage() {}
|
||||
|
||||
func (x *ForumReleaseCommentReq) ProtoReflect() protoreflect.Message {
|
||||
mi := &file_forum_forum_msg_proto_msgTypes[2]
|
||||
if protoimpl.UnsafeEnabled && x != nil {
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
if ms.LoadMessageInfo() == nil {
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
return ms
|
||||
}
|
||||
return mi.MessageOf(x)
|
||||
}
|
||||
|
||||
// Deprecated: Use ForumReleaseCommentReq.ProtoReflect.Descriptor instead.
|
||||
func (*ForumReleaseCommentReq) Descriptor() ([]byte, []int) {
|
||||
return file_forum_forum_msg_proto_rawDescGZIP(), []int{2}
|
||||
}
|
||||
|
||||
func (x *ForumReleaseCommentReq) GetAvatar() int32 {
|
||||
if x != nil {
|
||||
return x.Avatar
|
||||
}
|
||||
return 0
|
||||
}
|
||||
|
||||
func (x *ForumReleaseCommentReq) GetUname() string {
|
||||
if x != nil {
|
||||
return x.Uname
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
func (x *ForumReleaseCommentReq) GetHerocid() string {
|
||||
if x != nil {
|
||||
return x.Herocid
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
func (x *ForumReleaseCommentReq) GetHerooid() string {
|
||||
if x != nil {
|
||||
return x.Herooid
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
func (x *ForumReleaseCommentReq) GetContent() string {
|
||||
if x != nil {
|
||||
return x.Content
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
//发布评论回应
|
||||
type ForumReleaseCommentResp struct {
|
||||
state protoimpl.MessageState
|
||||
sizeCache protoimpl.SizeCache
|
||||
unknownFields protoimpl.UnknownFields
|
||||
|
||||
Comment *DBComment `protobuf:"bytes,1,opt,name=comment,proto3" json:"comment"`
|
||||
}
|
||||
|
||||
func (x *ForumReleaseCommentResp) Reset() {
|
||||
*x = ForumReleaseCommentResp{}
|
||||
if protoimpl.UnsafeEnabled {
|
||||
mi := &file_forum_forum_msg_proto_msgTypes[3]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
}
|
||||
|
||||
func (x *ForumReleaseCommentResp) String() string {
|
||||
return protoimpl.X.MessageStringOf(x)
|
||||
}
|
||||
|
||||
func (*ForumReleaseCommentResp) ProtoMessage() {}
|
||||
|
||||
func (x *ForumReleaseCommentResp) ProtoReflect() protoreflect.Message {
|
||||
mi := &file_forum_forum_msg_proto_msgTypes[3]
|
||||
if protoimpl.UnsafeEnabled && x != nil {
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
if ms.LoadMessageInfo() == nil {
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
return ms
|
||||
}
|
||||
return mi.MessageOf(x)
|
||||
}
|
||||
|
||||
// Deprecated: Use ForumReleaseCommentResp.ProtoReflect.Descriptor instead.
|
||||
func (*ForumReleaseCommentResp) Descriptor() ([]byte, []int) {
|
||||
return file_forum_forum_msg_proto_rawDescGZIP(), []int{3}
|
||||
}
|
||||
|
||||
func (x *ForumReleaseCommentResp) GetComment() *DBComment {
|
||||
if x != nil {
|
||||
return x.Comment
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
var File_forum_forum_msg_proto protoreflect.FileDescriptor
|
||||
|
||||
var file_forum_forum_msg_proto_rawDesc = []byte{
|
||||
0x0a, 0x15, 0x66, 0x6f, 0x72, 0x75, 0x6d, 0x2f, 0x66, 0x6f, 0x72, 0x75, 0x6d, 0x5f, 0x6d, 0x73,
|
||||
0x67, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x42, 0x06, 0x5a, 0x04, 0x2e, 0x3b, 0x70, 0x62, 0x62,
|
||||
0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
|
||||
0x67, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x14, 0x66, 0x6f, 0x72, 0x75, 0x6d, 0x2f, 0x66,
|
||||
0x6f, 0x72, 0x75, 0x6d, 0x5f, 0x64, 0x62, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x2b, 0x0a,
|
||||
0x0f, 0x46, 0x6f, 0x72, 0x75, 0x6d, 0x47, 0x65, 0x74, 0x4c, 0x69, 0x73, 0x74, 0x52, 0x65, 0x71,
|
||||
0x12, 0x18, 0x0a, 0x07, 0x68, 0x65, 0x72, 0x6f, 0x63, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28,
|
||||
0x09, 0x52, 0x07, 0x68, 0x65, 0x72, 0x6f, 0x63, 0x69, 0x64, 0x22, 0x38, 0x0a, 0x10, 0x46, 0x6f,
|
||||
0x72, 0x75, 0x6d, 0x47, 0x65, 0x74, 0x4c, 0x69, 0x73, 0x74, 0x52, 0x65, 0x73, 0x70, 0x12, 0x24,
|
||||
0x0a, 0x07, 0x63, 0x6f, 0x6d, 0x6d, 0x65, 0x6e, 0x74, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32,
|
||||
0x0a, 0x2e, 0x44, 0x42, 0x43, 0x6f, 0x6d, 0x6d, 0x65, 0x6e, 0x74, 0x52, 0x07, 0x63, 0x6f, 0x6d,
|
||||
0x6d, 0x65, 0x6e, 0x74, 0x22, 0x94, 0x01, 0x0a, 0x16, 0x46, 0x6f, 0x72, 0x75, 0x6d, 0x52, 0x65,
|
||||
0x6c, 0x65, 0x61, 0x73, 0x65, 0x43, 0x6f, 0x6d, 0x6d, 0x65, 0x6e, 0x74, 0x52, 0x65, 0x71, 0x12,
|
||||
0x16, 0x0a, 0x06, 0x61, 0x76, 0x61, 0x74, 0x61, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52,
|
||||
0x06, 0x61, 0x76, 0x61, 0x74, 0x61, 0x72, 0x12, 0x14, 0x0a, 0x05, 0x75, 0x6e, 0x61, 0x6d, 0x65,
|
||||
0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x75, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x18, 0x0a,
|
||||
0x07, 0x68, 0x65, 0x72, 0x6f, 0x63, 0x69, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07,
|
||||
0x68, 0x65, 0x72, 0x6f, 0x63, 0x69, 0x64, 0x12, 0x18, 0x0a, 0x07, 0x68, 0x65, 0x72, 0x6f, 0x6f,
|
||||
0x69, 0x64, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x68, 0x65, 0x72, 0x6f, 0x6f, 0x69,
|
||||
0x64, 0x12, 0x18, 0x0a, 0x07, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x18, 0x05, 0x20, 0x01,
|
||||
0x28, 0x09, 0x52, 0x07, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x22, 0x3f, 0x0a, 0x17, 0x46,
|
||||
0x6f, 0x72, 0x75, 0x6d, 0x52, 0x65, 0x6c, 0x65, 0x61, 0x73, 0x65, 0x43, 0x6f, 0x6d, 0x6d, 0x65,
|
||||
0x6e, 0x74, 0x52, 0x65, 0x73, 0x70, 0x12, 0x24, 0x0a, 0x07, 0x63, 0x6f, 0x6d, 0x6d, 0x65, 0x6e,
|
||||
0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0a, 0x2e, 0x44, 0x42, 0x43, 0x6f, 0x6d, 0x6d,
|
||||
0x65, 0x6e, 0x74, 0x52, 0x07, 0x63, 0x6f, 0x6d, 0x6d, 0x65, 0x6e, 0x74, 0x42, 0x06, 0x5a, 0x04,
|
||||
0x2e, 0x3b, 0x70, 0x62, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
|
||||
}
|
||||
|
||||
var file_forum_forum_msg_proto_goTypes = []interface{}{}
|
||||
var (
|
||||
file_forum_forum_msg_proto_rawDescOnce sync.Once
|
||||
file_forum_forum_msg_proto_rawDescData = file_forum_forum_msg_proto_rawDesc
|
||||
)
|
||||
|
||||
func file_forum_forum_msg_proto_rawDescGZIP() []byte {
|
||||
file_forum_forum_msg_proto_rawDescOnce.Do(func() {
|
||||
file_forum_forum_msg_proto_rawDescData = protoimpl.X.CompressGZIP(file_forum_forum_msg_proto_rawDescData)
|
||||
})
|
||||
return file_forum_forum_msg_proto_rawDescData
|
||||
}
|
||||
|
||||
var file_forum_forum_msg_proto_msgTypes = make([]protoimpl.MessageInfo, 4)
|
||||
var file_forum_forum_msg_proto_goTypes = []interface{}{
|
||||
(*ForumGetListReq)(nil), // 0: ForumGetListReq
|
||||
(*ForumGetListResp)(nil), // 1: ForumGetListResp
|
||||
(*ForumReleaseCommentReq)(nil), // 2: ForumReleaseCommentReq
|
||||
(*ForumReleaseCommentResp)(nil), // 3: ForumReleaseCommentResp
|
||||
(*DBComment)(nil), // 4: DBComment
|
||||
}
|
||||
var file_forum_forum_msg_proto_depIdxs = []int32{
|
||||
0, // [0:0] is the sub-list for method output_type
|
||||
0, // [0:0] is the sub-list for method input_type
|
||||
0, // [0:0] is the sub-list for extension type_name
|
||||
0, // [0:0] is the sub-list for extension extendee
|
||||
0, // [0:0] is the sub-list for field type_name
|
||||
4, // 0: ForumGetListResp.comment:type_name -> DBComment
|
||||
4, // 1: ForumReleaseCommentResp.comment:type_name -> DBComment
|
||||
2, // [2:2] is the sub-list for method output_type
|
||||
2, // [2:2] is the sub-list for method input_type
|
||||
2, // [2:2] is the sub-list for extension type_name
|
||||
2, // [2:2] is the sub-list for extension extendee
|
||||
0, // [0:2] is the sub-list for field type_name
|
||||
}
|
||||
|
||||
func init() { file_forum_forum_msg_proto_init() }
|
||||
@ -41,18 +308,70 @@ func file_forum_forum_msg_proto_init() {
|
||||
if File_forum_forum_msg_proto != nil {
|
||||
return
|
||||
}
|
||||
file_forum_forum_db_proto_init()
|
||||
if !protoimpl.UnsafeEnabled {
|
||||
file_forum_forum_msg_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} {
|
||||
switch v := v.(*ForumGetListReq); i {
|
||||
case 0:
|
||||
return &v.state
|
||||
case 1:
|
||||
return &v.sizeCache
|
||||
case 2:
|
||||
return &v.unknownFields
|
||||
default:
|
||||
return nil
|
||||
}
|
||||
}
|
||||
file_forum_forum_msg_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} {
|
||||
switch v := v.(*ForumGetListResp); i {
|
||||
case 0:
|
||||
return &v.state
|
||||
case 1:
|
||||
return &v.sizeCache
|
||||
case 2:
|
||||
return &v.unknownFields
|
||||
default:
|
||||
return nil
|
||||
}
|
||||
}
|
||||
file_forum_forum_msg_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} {
|
||||
switch v := v.(*ForumReleaseCommentReq); i {
|
||||
case 0:
|
||||
return &v.state
|
||||
case 1:
|
||||
return &v.sizeCache
|
||||
case 2:
|
||||
return &v.unknownFields
|
||||
default:
|
||||
return nil
|
||||
}
|
||||
}
|
||||
file_forum_forum_msg_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} {
|
||||
switch v := v.(*ForumReleaseCommentResp); i {
|
||||
case 0:
|
||||
return &v.state
|
||||
case 1:
|
||||
return &v.sizeCache
|
||||
case 2:
|
||||
return &v.unknownFields
|
||||
default:
|
||||
return nil
|
||||
}
|
||||
}
|
||||
}
|
||||
type x struct{}
|
||||
out := protoimpl.TypeBuilder{
|
||||
File: protoimpl.DescBuilder{
|
||||
GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
|
||||
RawDescriptor: file_forum_forum_msg_proto_rawDesc,
|
||||
NumEnums: 0,
|
||||
NumMessages: 0,
|
||||
NumMessages: 4,
|
||||
NumExtensions: 0,
|
||||
NumServices: 0,
|
||||
},
|
||||
GoTypes: file_forum_forum_msg_proto_goTypes,
|
||||
DependencyIndexes: file_forum_forum_msg_proto_depIdxs,
|
||||
MessageInfos: file_forum_forum_msg_proto_msgTypes,
|
||||
}.Build()
|
||||
File_forum_forum_msg_proto = out.File
|
||||
file_forum_forum_msg_proto_rawDesc = nil
|
||||
|
101
pb/hero_db.pb.go
101
pb/hero_db.pb.go
@ -82,27 +82,28 @@ type DBHero struct {
|
||||
|
||||
Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id" bson:"_id"` //ID
|
||||
Uid string `protobuf:"bytes,2,opt,name=uid,proto3" json:"uid"`
|
||||
HeroID string `protobuf:"bytes,3,opt,name=heroID,proto3" json:"heroID" bson:"heroID"` // 英雄的配置表ID
|
||||
Star int32 `protobuf:"varint,4,opt,name=star,proto3" json:"star"` // 英雄星级
|
||||
Lv int32 `protobuf:"varint,5,opt,name=lv,proto3" json:"lv"` // 英雄等级
|
||||
Exp int32 `protobuf:"varint,6,opt,name=exp,proto3" json:"exp"` // 英雄经验
|
||||
JuexingLv int32 `protobuf:"varint,7,opt,name=juexingLv,proto3" json:"juexingLv" bson:"juexingLv"` //觉醒等级
|
||||
CaptainSkill int32 `protobuf:"varint,8,opt,name=captainSkill,proto3" json:"captainSkill" bson:"captainSkill"` //队长技能
|
||||
NormalSkill []*SkillData `protobuf:"bytes,9,rep,name=normalSkill,proto3" json:"normalSkill" bson:"normalSkill"` //普通技能
|
||||
Property map[string]int32 `protobuf:"bytes,10,rep,name=property,proto3" json:"property" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"varint,2,opt,name=value,proto3"` // 属性相关
|
||||
AddProperty map[string]int32 `protobuf:"bytes,11,rep,name=addProperty,proto3" json:"addProperty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"varint,2,opt,name=value,proto3" bson:"addProperty"` //附加属性相关
|
||||
CardType int32 `protobuf:"varint,12,opt,name=cardType,proto3" json:"cardType" bson:"cardType"` //卡片类型(升星卡、经验卡、技能升级卡)
|
||||
CurSkin int32 `protobuf:"varint,13,opt,name=curSkin,proto3" json:"curSkin" bson:"curSkin"` //当前装备的皮肤ID
|
||||
Skins []int32 `protobuf:"varint,14,rep,packed,name=skins,proto3" json:"skins"` // 所有皮肤ID
|
||||
Block bool `protobuf:"varint,15,opt,name=block,proto3" json:"block"` // 锁定
|
||||
EquipID []string `protobuf:"bytes,16,rep,name=equipID,proto3" json:"equipID" bson:"equipID"` //装备 objID
|
||||
ResonateNum int32 `protobuf:"varint,17,opt,name=resonateNum,proto3" json:"resonateNum" bson:"resonateNum"` //共鸣次数
|
||||
DistributionResonate int32 `protobuf:"varint,18,opt,name=distributionResonate,proto3" json:"distributionResonate" bson:"distributionResonate"` //分配的共鸣能量
|
||||
Energy map[int32]int32 `protobuf:"bytes,19,rep,name=energy,proto3" json:"energy" protobuf_key:"varint,1,opt,name=key,proto3" protobuf_val:"varint,2,opt,name=value,proto3"` // @go_tags(`bson:"energy"`)能量分配到哪里[1,0]
|
||||
SameCount int32 `protobuf:"varint,20,opt,name=sameCount,proto3" json:"sameCount" bson:"sameCount"` // 卡片叠加数量
|
||||
SuiteId int32 `protobuf:"varint,21,opt,name=suiteId,proto3" json:"suiteId" bson:"suiteId"` // 套装Id
|
||||
SuiteExtId int32 `protobuf:"varint,22,opt,name=suiteExtId,proto3" json:"suiteExtId"` // go_tags(`bson:"suiteExtId"`) 扩展套装Id
|
||||
IsOverlying bool `protobuf:"varint,23,opt,name=isOverlying,proto3" json:"isOverlying"` // go_tags(`bson:"isOverlying"`) 是否允许叠加 默认true
|
||||
HeroID string `protobuf:"bytes,3,opt,name=heroID,proto3" json:"heroID" bson:"heroID"` // 英雄的配置表ID
|
||||
Star int32 `protobuf:"varint,4,opt,name=star,proto3" json:"star"` // 英雄星级
|
||||
Lv int32 `protobuf:"varint,5,opt,name=lv,proto3" json:"lv"` // 英雄等级
|
||||
Exp int32 `protobuf:"varint,6,opt,name=exp,proto3" json:"exp"` // 英雄经验
|
||||
JuexingLv int32 `protobuf:"varint,7,opt,name=juexingLv,proto3" json:"juexingLv" bson:"juexingLv"` //觉醒等级
|
||||
CaptainSkill int32 `protobuf:"varint,8,opt,name=captainSkill,proto3" json:"captainSkill" bson:"captainSkill"` //队长技能
|
||||
NormalSkill []*SkillData `protobuf:"bytes,9,rep,name=normalSkill,proto3" json:"normalSkill" bson:"normalSkill"` //普通技能
|
||||
Property map[string]int32 `protobuf:"bytes,10,rep,name=property,proto3" json:"property" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"varint,2,opt,name=value,proto3"` // 属性相关
|
||||
AddProperty map[string]int32 `protobuf:"bytes,11,rep,name=addProperty,proto3" json:"addProperty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"varint,2,opt,name=value,proto3" bson:"addProperty"` //附加属性相关
|
||||
CardType int32 `protobuf:"varint,12,opt,name=cardType,proto3" json:"cardType" bson:"cardType"` //卡片类型(升星卡、经验卡、技能升级卡)
|
||||
CurSkin int32 `protobuf:"varint,13,opt,name=curSkin,proto3" json:"curSkin" bson:"curSkin"` //当前装备的皮肤ID
|
||||
Skins []int32 `protobuf:"varint,14,rep,packed,name=skins,proto3" json:"skins"` // 所有皮肤ID
|
||||
Block bool `protobuf:"varint,15,opt,name=block,proto3" json:"block"` // 锁定
|
||||
EquipID []string `protobuf:"bytes,16,rep,name=equipID,proto3" json:"equipID" bson:"equipID"` //装备 objID
|
||||
ResonateNum int32 `protobuf:"varint,17,opt,name=resonateNum,proto3" json:"resonateNum" bson:"resonateNum"` //共鸣次数
|
||||
DistributionResonate int32 `protobuf:"varint,18,opt,name=distributionResonate,proto3" json:"distributionResonate" bson:"distributionResonate"` //分配的共鸣能量
|
||||
Energy map[int32]int32 `protobuf:"bytes,19,rep,name=energy,proto3" json:"energy" protobuf_key:"varint,1,opt,name=key,proto3" protobuf_val:"varint,2,opt,name=value,proto3"` // @go_tags(`bson:"energy"`)能量分配到哪里[1,0]
|
||||
SameCount int32 `protobuf:"varint,20,opt,name=sameCount,proto3" json:"sameCount" bson:"sameCount"` // 卡片叠加数量
|
||||
SuiteId int32 `protobuf:"varint,21,opt,name=suiteId,proto3" json:"suiteId" bson:"suiteId"` // 套装Id
|
||||
SuiteExtId int32 `protobuf:"varint,22,opt,name=suiteExtId,proto3" json:"suiteExtId"` // go_tags(`bson:"suiteExtId"`) 扩展套装Id
|
||||
IsOverlying bool `protobuf:"varint,23,opt,name=isOverlying,proto3" json:"isOverlying"` // go_tags(`bson:"isOverlying"`) 是否允许叠加 默认true
|
||||
EnergyProperty map[string]int32 `protobuf:"bytes,24,rep,name=energyProperty,proto3" json:"energyProperty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"varint,2,opt,name=value,proto3" bson:"energyProperty"` //
|
||||
}
|
||||
|
||||
func (x *DBHero) Reset() {
|
||||
@ -298,6 +299,13 @@ func (x *DBHero) GetIsOverlying() bool {
|
||||
return false
|
||||
}
|
||||
|
||||
func (x *DBHero) GetEnergyProperty() map[string]int32 {
|
||||
if x != nil {
|
||||
return x.EnergyProperty
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
var File_hero_hero_db_proto protoreflect.FileDescriptor
|
||||
|
||||
var file_hero_hero_db_proto_rawDesc = []byte{
|
||||
@ -306,7 +314,7 @@ var file_hero_hero_db_proto_rawDesc = []byte{
|
||||
0x61, 0x12, 0x18, 0x0a, 0x07, 0x73, 0x6b, 0x69, 0x6c, 0x6c, 0x49, 0x44, 0x18, 0x01, 0x20, 0x01,
|
||||
0x28, 0x05, 0x52, 0x07, 0x73, 0x6b, 0x69, 0x6c, 0x6c, 0x49, 0x44, 0x12, 0x18, 0x0a, 0x07, 0x73,
|
||||
0x6b, 0x69, 0x6c, 0x6c, 0x4c, 0x76, 0x18, 0x02, 0x20, 0x01, 0x28, 0x05, 0x52, 0x07, 0x73, 0x6b,
|
||||
0x69, 0x6c, 0x6c, 0x4c, 0x76, 0x22, 0x88, 0x07, 0x0a, 0x06, 0x44, 0x42, 0x48, 0x65, 0x72, 0x6f,
|
||||
0x69, 0x6c, 0x6c, 0x4c, 0x76, 0x22, 0x90, 0x08, 0x0a, 0x06, 0x44, 0x42, 0x48, 0x65, 0x72, 0x6f,
|
||||
0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64,
|
||||
0x12, 0x10, 0x0a, 0x03, 0x75, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x75,
|
||||
0x69, 0x64, 0x12, 0x16, 0x0a, 0x06, 0x68, 0x65, 0x72, 0x6f, 0x49, 0x44, 0x18, 0x03, 0x20, 0x01,
|
||||
@ -351,19 +359,28 @@ var file_hero_hero_db_proto_rawDesc = []byte{
|
||||
0x78, 0x74, 0x49, 0x64, 0x18, 0x16, 0x20, 0x01, 0x28, 0x05, 0x52, 0x0a, 0x73, 0x75, 0x69, 0x74,
|
||||
0x65, 0x45, 0x78, 0x74, 0x49, 0x64, 0x12, 0x20, 0x0a, 0x0b, 0x69, 0x73, 0x4f, 0x76, 0x65, 0x72,
|
||||
0x6c, 0x79, 0x69, 0x6e, 0x67, 0x18, 0x17, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0b, 0x69, 0x73, 0x4f,
|
||||
0x76, 0x65, 0x72, 0x6c, 0x79, 0x69, 0x6e, 0x67, 0x1a, 0x3b, 0x0a, 0x0d, 0x50, 0x72, 0x6f, 0x70,
|
||||
0x65, 0x72, 0x74, 0x79, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79,
|
||||
0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x14, 0x0a, 0x05, 0x76,
|
||||
0x76, 0x65, 0x72, 0x6c, 0x79, 0x69, 0x6e, 0x67, 0x12, 0x43, 0x0a, 0x0e, 0x65, 0x6e, 0x65, 0x72,
|
||||
0x67, 0x79, 0x50, 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74, 0x79, 0x18, 0x18, 0x20, 0x03, 0x28, 0x0b,
|
||||
0x32, 0x1b, 0x2e, 0x44, 0x42, 0x48, 0x65, 0x72, 0x6f, 0x2e, 0x45, 0x6e, 0x65, 0x72, 0x67, 0x79,
|
||||
0x50, 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74, 0x79, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x0e, 0x65,
|
||||
0x6e, 0x65, 0x72, 0x67, 0x79, 0x50, 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74, 0x79, 0x1a, 0x3b, 0x0a,
|
||||
0x0d, 0x50, 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74, 0x79, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10,
|
||||
0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79,
|
||||
0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x05, 0x52,
|
||||
0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x1a, 0x3e, 0x0a, 0x10, 0x41, 0x64,
|
||||
0x64, 0x50, 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74, 0x79, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10,
|
||||
0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79,
|
||||
0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x05, 0x52,
|
||||
0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x1a, 0x39, 0x0a, 0x0b, 0x45, 0x6e,
|
||||
0x65, 0x72, 0x67, 0x79, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79,
|
||||
0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x14, 0x0a, 0x05, 0x76,
|
||||
0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x05, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75,
|
||||
0x65, 0x3a, 0x02, 0x38, 0x01, 0x1a, 0x3e, 0x0a, 0x10, 0x41, 0x64, 0x64, 0x50, 0x72, 0x6f, 0x70,
|
||||
0x65, 0x72, 0x74, 0x79, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79,
|
||||
0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x14, 0x0a, 0x05, 0x76,
|
||||
0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x05, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75,
|
||||
0x65, 0x3a, 0x02, 0x38, 0x01, 0x1a, 0x39, 0x0a, 0x0b, 0x45, 0x6e, 0x65, 0x72, 0x67, 0x79, 0x45,
|
||||
0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28,
|
||||
0x05, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18,
|
||||
0x02, 0x20, 0x01, 0x28, 0x05, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01,
|
||||
0x42, 0x06, 0x5a, 0x04, 0x2e, 0x3b, 0x70, 0x62, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
|
||||
0x65, 0x3a, 0x02, 0x38, 0x01, 0x1a, 0x41, 0x0a, 0x13, 0x45, 0x6e, 0x65, 0x72, 0x67, 0x79, 0x50,
|
||||
0x72, 0x6f, 0x70, 0x65, 0x72, 0x74, 0x79, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03,
|
||||
0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x14,
|
||||
0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x05, 0x52, 0x05, 0x76,
|
||||
0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x42, 0x06, 0x5a, 0x04, 0x2e, 0x3b, 0x70, 0x62,
|
||||
0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
|
||||
}
|
||||
|
||||
var (
|
||||
@ -378,24 +395,26 @@ func file_hero_hero_db_proto_rawDescGZIP() []byte {
|
||||
return file_hero_hero_db_proto_rawDescData
|
||||
}
|
||||
|
||||
var file_hero_hero_db_proto_msgTypes = make([]protoimpl.MessageInfo, 5)
|
||||
var file_hero_hero_db_proto_msgTypes = make([]protoimpl.MessageInfo, 6)
|
||||
var file_hero_hero_db_proto_goTypes = []interface{}{
|
||||
(*SkillData)(nil), // 0: SkillData
|
||||
(*DBHero)(nil), // 1: DBHero
|
||||
nil, // 2: DBHero.PropertyEntry
|
||||
nil, // 3: DBHero.AddPropertyEntry
|
||||
nil, // 4: DBHero.EnergyEntry
|
||||
nil, // 5: DBHero.EnergyPropertyEntry
|
||||
}
|
||||
var file_hero_hero_db_proto_depIdxs = []int32{
|
||||
0, // 0: DBHero.normalSkill:type_name -> SkillData
|
||||
2, // 1: DBHero.property:type_name -> DBHero.PropertyEntry
|
||||
3, // 2: DBHero.addProperty:type_name -> DBHero.AddPropertyEntry
|
||||
4, // 3: DBHero.energy:type_name -> DBHero.EnergyEntry
|
||||
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
|
||||
5, // 4: DBHero.energyProperty:type_name -> DBHero.EnergyPropertyEntry
|
||||
5, // [5:5] is the sub-list for method output_type
|
||||
5, // [5:5] is the sub-list for method input_type
|
||||
5, // [5:5] is the sub-list for extension type_name
|
||||
5, // [5:5] is the sub-list for extension extendee
|
||||
0, // [0:5] is the sub-list for field type_name
|
||||
}
|
||||
|
||||
func init() { file_hero_hero_db_proto_init() }
|
||||
@ -435,7 +454,7 @@ func file_hero_hero_db_proto_init() {
|
||||
GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
|
||||
RawDescriptor: file_hero_hero_db_proto_rawDesc,
|
||||
NumEnums: 0,
|
||||
NumMessages: 5,
|
||||
NumMessages: 6,
|
||||
NumExtensions: 0,
|
||||
NumServices: 0,
|
||||
},
|
||||
|
Loading…
Reference in New Issue
Block a user