fix: 统一分页请求的 offset 语义

This commit is contained in:
zetaloop
2026-04-07 17:56:38 +08:00
parent 424b2b1cca
commit d153b5cf51
46 changed files with 334 additions and 346 deletions
@@ -43,7 +43,7 @@ func (l *CreateCommentLogic) CreateComment(req *types.CreateCommentReq) (resp *t
return nil, err return nil, err
} }
comments, err := l.svcCtx.CommunityRpc.SearchComments(l.ctx, &communitypb.SearchCommentsReq{ comments, err := l.svcCtx.CommunityRpc.SearchComments(l.ctx, &communitypb.SearchCommentsReq{
Page: 0, Offset: 0,
Limit: 1, Limit: 1,
PostId: req.PostId, PostId: req.PostId,
AuthorId: uid, AuthorId: uid,
@@ -52,7 +52,7 @@ func (l *CreatePostLogic) CreatePost(req *types.CreatePostReq) (resp *types.Post
return nil, err return nil, err
} }
posts, err := l.svcCtx.CommunityRpc.SearchPosts(l.ctx, &communitypb.SearchPostsReq{ posts, err := l.svcCtx.CommunityRpc.SearchPosts(l.ctx, &communitypb.SearchPostsReq{
Page: 0, Offset: 0,
Limit: 1, Limit: 1,
AuthorId: &uid, AuthorId: &uid,
}) })
@@ -36,7 +36,7 @@ func (l *GetPostLogic) GetPost(req *types.PathId) (resp *types.Post, err error)
uid := currentUserIDOrZero(l.ctx) uid := currentUserIDOrZero(l.ctx)
liked := false liked := false
if uid > 0 { if uid > 0 {
likes, e := l.svcCtx.CommunityRpc.SearchPostLikes(l.ctx, &communitypb.SearchPostLikesReq{Page: 0, Limit: 1, PostId: &req.Id, UserId: &uid}) likes, e := l.svcCtx.CommunityRpc.SearchPostLikes(l.ctx, &communitypb.SearchPostLikesReq{Offset: 0, Limit: 1, PostId: &req.Id, UserId: &uid})
liked = e == nil && len(likes.GetPostLikes()) > 0 liked = e == nil && len(likes.GetPostLikes()) > 0
} }
post := mapPost(l.ctx, l.svcCtx, out.GetPosts(), liked) post := mapPost(l.ctx, l.svcCtx, out.GetPosts(), liked)
@@ -33,7 +33,7 @@ func (l *ListCommentsLogic) ListComments(req *types.ListCommentsReq) (resp *type
req.Limit = 20 req.Limit = 20
} }
out, err := l.svcCtx.CommunityRpc.SearchComments(l.ctx, &communitypb.SearchCommentsReq{ out, err := l.svcCtx.CommunityRpc.SearchComments(l.ctx, &communitypb.SearchCommentsReq{
Page: req.Offset, Offset: req.Offset,
Limit: req.Limit, Limit: req.Limit,
PostId: req.Id, PostId: req.Id,
}) })
@@ -45,7 +45,7 @@ func (l *ListCommentsLogic) ListComments(req *types.ListCommentsReq) (resp *type
for _, c := range out.GetComments() { for _, c := range out.GetComments() {
liked := false liked := false
if uid > 0 { if uid > 0 {
likes, e := l.svcCtx.CommunityRpc.SearchCommentLikes(l.ctx, &communitypb.SearchCommentLikesReq{Page: 0, Limit: 1, CommentId: c.Id, UserId: uid}) likes, e := l.svcCtx.CommunityRpc.SearchCommentLikes(l.ctx, &communitypb.SearchCommentLikesReq{Offset: 0, Limit: 1, CommentId: c.Id, UserId: uid})
liked = e == nil && len(likes.GetCommentLikes()) > 0 liked = e == nil && len(likes.GetCommentLikes()) > 0
} }
items = append(items, mapComment(l.ctx, l.svcCtx, c, liked)) items = append(items, mapComment(l.ctx, l.svcCtx, c, liked))
@@ -33,7 +33,7 @@ func (l *ListPostsLogic) ListPosts(req *types.PostListReq) (resp *types.PostList
if req.Limit <= 0 { if req.Limit <= 0 {
req.Limit = 20 req.Limit = 20
} }
in := &communitypb.SearchPostsReq{Page: req.Offset, Limit: req.Limit} in := &communitypb.SearchPostsReq{Offset: req.Offset, Limit: req.Limit}
if req.Tags != "" { if req.Tags != "" {
in.Tags = strings.Split(req.Tags, ",") in.Tags = strings.Split(req.Tags, ",")
} }
@@ -46,7 +46,7 @@ func (l *ListPostsLogic) ListPosts(req *types.PostListReq) (resp *types.PostList
for _, p := range posts.GetPosts() { for _, p := range posts.GetPosts() {
liked := false liked := false
if uid > 0 { if uid > 0 {
likes, e := l.svcCtx.CommunityRpc.SearchPostLikes(l.ctx, &communitypb.SearchPostLikesReq{Page: 0, Limit: 1, PostId: &p.Id, UserId: &uid}) likes, e := l.svcCtx.CommunityRpc.SearchPostLikes(l.ctx, &communitypb.SearchPostLikesReq{Offset: 0, Limit: 1, PostId: &p.Id, UserId: &uid})
liked = e == nil && len(likes.GetPostLikes()) > 0 liked = e == nil && len(likes.GetPostLikes()) > 0
} }
items = append(items, mapPost(l.ctx, l.svcCtx, p, liked)) items = append(items, mapPost(l.ctx, l.svcCtx, p, liked))
@@ -33,7 +33,7 @@ func (l *ListUserPostsLogic) ListUserPosts(req *types.ListCommentsReq) (resp *ty
req.Limit = 20 req.Limit = 20
} }
authorID := req.Id authorID := req.Id
out, err := l.svcCtx.CommunityRpc.SearchPosts(l.ctx, &communitypb.SearchPostsReq{Page: req.Offset, Limit: req.Limit, AuthorId: &authorID}) out, err := l.svcCtx.CommunityRpc.SearchPosts(l.ctx, &communitypb.SearchPostsReq{Offset: req.Offset, Limit: req.Limit, AuthorId: &authorID})
if err != nil { if err != nil {
return nil, err return nil, err
} }
@@ -42,7 +42,7 @@ func (l *ListUserPostsLogic) ListUserPosts(req *types.ListCommentsReq) (resp *ty
for _, p := range out.GetPosts() { for _, p := range out.GetPosts() {
liked := false liked := false
if uid > 0 { if uid > 0 {
likes, e := l.svcCtx.CommunityRpc.SearchPostLikes(l.ctx, &communitypb.SearchPostLikesReq{Page: 0, Limit: 1, PostId: &p.Id, UserId: &uid}) likes, e := l.svcCtx.CommunityRpc.SearchPostLikes(l.ctx, &communitypb.SearchPostLikesReq{Offset: 0, Limit: 1, PostId: &p.Id, UserId: &uid})
liked = e == nil && len(likes.GetPostLikes()) > 0 liked = e == nil && len(likes.GetPostLikes()) > 0
} }
items = append(items, mapPost(l.ctx, l.svcCtx, p, liked)) items = append(items, mapPost(l.ctx, l.svcCtx, p, liked))
@@ -28,7 +28,7 @@ func (l *SearchCommentLikesLogic) SearchCommentLikes(in *pb.SearchCommentLikesRe
if limit <= 0 { if limit <= 0 {
limit = 20 limit = 20
} }
offset := in.GetPage() offset := in.GetOffset()
if offset < 0 { if offset < 0 {
offset = 0 offset = 0
} }
@@ -29,7 +29,7 @@ func (l *SearchCommentsLogic) SearchComments(in *pb.SearchCommentsReq) (*pb.Sear
if limit <= 0 { if limit <= 0 {
limit = 20 limit = 20
} }
offset := in.GetPage() offset := in.GetOffset()
if offset < 0 { if offset < 0 {
offset = 0 offset = 0
} }
@@ -28,7 +28,7 @@ func (l *SearchPostLikesLogic) SearchPostLikes(in *pb.SearchPostLikesReq) (*pb.S
if limit <= 0 { if limit <= 0 {
limit = 20 limit = 20
} }
offset := in.GetPage() offset := in.GetOffset()
if offset < 0 { if offset < 0 {
offset = 0 offset = 0
} }
@@ -29,7 +29,7 @@ func (l *SearchPostsLogic) SearchPosts(in *pb.SearchPostsReq) (*pb.SearchPostsRe
if limit <= 0 { if limit <= 0 {
limit = 20 limit = 20
} }
offset := in.GetPage() offset := in.GetOffset()
if offset < 0 { if offset < 0 {
offset = 0 offset = 0
} }
+25 -25
View File
@@ -1,7 +1,7 @@
// Code generated by protoc-gen-go. DO NOT EDIT. // Code generated by protoc-gen-go. DO NOT EDIT.
// versions: // versions:
// protoc-gen-go v1.36.11 // protoc-gen-go v1.36.11
// protoc v5.29.6 // protoc v7.34.1
// source: community.proto // source: community.proto
package pb package pb
@@ -452,7 +452,7 @@ func (x *GetCommentLikesByIdResp) GetCommentLikes() *CommentLikes {
type SearchCommentLikesReq struct { type SearchCommentLikesReq struct {
state protoimpl.MessageState `protogen:"open.v1"` state protoimpl.MessageState `protogen:"open.v1"`
Page int64 `protobuf:"varint,1,opt,name=page,proto3" json:"page,omitempty"` //page Offset int64 `protobuf:"varint,1,opt,name=offset,proto3" json:"offset,omitempty"` //offset
Limit int64 `protobuf:"varint,2,opt,name=limit,proto3" json:"limit,omitempty"` //limit Limit int64 `protobuf:"varint,2,opt,name=limit,proto3" json:"limit,omitempty"` //limit
CommentId int64 `protobuf:"varint,3,opt,name=commentId,proto3" json:"commentId,omitempty"` //commentId CommentId int64 `protobuf:"varint,3,opt,name=commentId,proto3" json:"commentId,omitempty"` //commentId
UserId int64 `protobuf:"varint,4,opt,name=userId,proto3" json:"userId,omitempty"` //userId UserId int64 `protobuf:"varint,4,opt,name=userId,proto3" json:"userId,omitempty"` //userId
@@ -491,9 +491,9 @@ func (*SearchCommentLikesReq) Descriptor() ([]byte, []int) {
return file_community_proto_rawDescGZIP(), []int{9} return file_community_proto_rawDescGZIP(), []int{9}
} }
func (x *SearchCommentLikesReq) GetPage() int64 { func (x *SearchCommentLikesReq) GetOffset() int64 {
if x != nil { if x != nil {
return x.Page return x.Offset
} }
return 0 return 0
} }
@@ -1081,7 +1081,7 @@ func (x *GetCommentsByIdResp) GetComments() *Comments {
type SearchCommentsReq struct { type SearchCommentsReq struct {
state protoimpl.MessageState `protogen:"open.v1"` state protoimpl.MessageState `protogen:"open.v1"`
Page int64 `protobuf:"varint,1,opt,name=page,proto3" json:"page,omitempty"` //page Offset int64 `protobuf:"varint,1,opt,name=offset,proto3" json:"offset,omitempty"` //offset
Limit int64 `protobuf:"varint,2,opt,name=limit,proto3" json:"limit,omitempty"` //limit Limit int64 `protobuf:"varint,2,opt,name=limit,proto3" json:"limit,omitempty"` //limit
Id int64 `protobuf:"varint,3,opt,name=id,proto3" json:"id,omitempty"` //id Id int64 `protobuf:"varint,3,opt,name=id,proto3" json:"id,omitempty"` //id
PostId int64 `protobuf:"varint,4,opt,name=postId,proto3" json:"postId,omitempty"` //postId PostId int64 `protobuf:"varint,4,opt,name=postId,proto3" json:"postId,omitempty"` //postId
@@ -1124,9 +1124,9 @@ func (*SearchCommentsReq) Descriptor() ([]byte, []int) {
return file_community_proto_rawDescGZIP(), []int{20} return file_community_proto_rawDescGZIP(), []int{20}
} }
func (x *SearchCommentsReq) GetPage() int64 { func (x *SearchCommentsReq) GetOffset() int64 {
if x != nil { if x != nil {
return x.Page return x.Offset
} }
return 0 return 0
} }
@@ -1662,7 +1662,7 @@ func (x *GetPostLikesByIdResp) GetPostLikes() *PostLikes {
type SearchPostLikesReq struct { type SearchPostLikesReq struct {
state protoimpl.MessageState `protogen:"open.v1"` state protoimpl.MessageState `protogen:"open.v1"`
Page int64 `protobuf:"varint,1,opt,name=page,proto3" json:"page,omitempty"` //page Offset int64 `protobuf:"varint,1,opt,name=offset,proto3" json:"offset,omitempty"` //offset
Limit int64 `protobuf:"varint,2,opt,name=limit,proto3" json:"limit,omitempty"` //limit Limit int64 `protobuf:"varint,2,opt,name=limit,proto3" json:"limit,omitempty"` //limit
PostId *int64 `protobuf:"varint,3,opt,name=postId,proto3,oneof" json:"postId,omitempty"` //postId PostId *int64 `protobuf:"varint,3,opt,name=postId,proto3,oneof" json:"postId,omitempty"` //postId
UserId *int64 `protobuf:"varint,4,opt,name=userId,proto3,oneof" json:"userId,omitempty"` //userId UserId *int64 `protobuf:"varint,4,opt,name=userId,proto3,oneof" json:"userId,omitempty"` //userId
@@ -1701,9 +1701,9 @@ func (*SearchPostLikesReq) Descriptor() ([]byte, []int) {
return file_community_proto_rawDescGZIP(), []int{31} return file_community_proto_rawDescGZIP(), []int{31}
} }
func (x *SearchPostLikesReq) GetPage() int64 { func (x *SearchPostLikesReq) GetOffset() int64 {
if x != nil { if x != nil {
return x.Page return x.Offset
} }
return 0 return 0
} }
@@ -2507,7 +2507,7 @@ func (x *GetPostsByIdResp) GetPosts() *Posts {
type SearchPostsReq struct { type SearchPostsReq struct {
state protoimpl.MessageState `protogen:"open.v1"` state protoimpl.MessageState `protogen:"open.v1"`
Page int64 `protobuf:"varint,1,opt,name=page,proto3" json:"page,omitempty"` //page Offset int64 `protobuf:"varint,1,opt,name=offset,proto3" json:"offset,omitempty"` //offset
Limit int64 `protobuf:"varint,2,opt,name=limit,proto3" json:"limit,omitempty"` //limit Limit int64 `protobuf:"varint,2,opt,name=limit,proto3" json:"limit,omitempty"` //limit
Id int64 `protobuf:"varint,3,opt,name=id,proto3" json:"id,omitempty"` //id Id int64 `protobuf:"varint,3,opt,name=id,proto3" json:"id,omitempty"` //id
AuthorId *int64 `protobuf:"varint,4,opt,name=authorId,proto3,oneof" json:"authorId,omitempty"` //authorId AuthorId *int64 `protobuf:"varint,4,opt,name=authorId,proto3,oneof" json:"authorId,omitempty"` //authorId
@@ -2559,9 +2559,9 @@ func (*SearchPostsReq) Descriptor() ([]byte, []int) {
return file_community_proto_rawDescGZIP(), []int{42} return file_community_proto_rawDescGZIP(), []int{42}
} }
func (x *SearchPostsReq) GetPage() int64 { func (x *SearchPostsReq) GetOffset() int64 {
if x != nil { if x != nil {
return x.Page return x.Offset
} }
return 0 return 0
} }
@@ -2756,9 +2756,9 @@ const file_community_proto_rawDesc = "" +
"\x16GetCommentLikesByIdReq\x12\x0e\n" + "\x16GetCommentLikesByIdReq\x12\x0e\n" +
"\x02id\x18\x01 \x01(\x03R\x02id\"O\n" + "\x02id\x18\x01 \x01(\x03R\x02id\"O\n" +
"\x17GetCommentLikesByIdResp\x124\n" + "\x17GetCommentLikesByIdResp\x124\n" +
"\fcommentLikes\x18\x01 \x01(\v2\x10.pb.CommentLikesR\fcommentLikes\"\x95\x01\n" + "\fcommentLikes\x18\x01 \x01(\v2\x10.pb.CommentLikesR\fcommentLikes\"\x99\x01\n" +
"\x15SearchCommentLikesReq\x12\x12\n" + "\x15SearchCommentLikesReq\x12\x16\n" +
"\x04page\x18\x01 \x01(\x03R\x04page\x12\x14\n" + "\x06offset\x18\x01 \x01(\x03R\x06offset\x12\x14\n" +
"\x05limit\x18\x02 \x01(\x03R\x05limit\x12\x1c\n" + "\x05limit\x18\x02 \x01(\x03R\x05limit\x12\x1c\n" +
"\tcommentId\x18\x03 \x01(\x03R\tcommentId\x12\x16\n" + "\tcommentId\x18\x03 \x01(\x03R\tcommentId\x12\x16\n" +
"\x06userId\x18\x04 \x01(\x03R\x06userId\x12\x1c\n" + "\x06userId\x18\x04 \x01(\x03R\x06userId\x12\x1c\n" +
@@ -2796,9 +2796,9 @@ const file_community_proto_rawDesc = "" +
"\x12GetCommentsByIdReq\x12\x0e\n" + "\x12GetCommentsByIdReq\x12\x0e\n" +
"\x02id\x18\x01 \x01(\x03R\x02id\"?\n" + "\x02id\x18\x01 \x01(\x03R\x02id\"?\n" +
"\x13GetCommentsByIdResp\x12(\n" + "\x13GetCommentsByIdResp\x12(\n" +
"\bcomments\x18\x01 \x01(\v2\f.pb.CommentsR\bcomments\"\x99\x02\n" + "\bcomments\x18\x01 \x01(\v2\f.pb.CommentsR\bcomments\"\x9d\x02\n" +
"\x11SearchCommentsReq\x12\x12\n" + "\x11SearchCommentsReq\x12\x16\n" +
"\x04page\x18\x01 \x01(\x03R\x04page\x12\x14\n" + "\x06offset\x18\x01 \x01(\x03R\x06offset\x12\x14\n" +
"\x05limit\x18\x02 \x01(\x03R\x05limit\x12\x0e\n" + "\x05limit\x18\x02 \x01(\x03R\x05limit\x12\x0e\n" +
"\x02id\x18\x03 \x01(\x03R\x02id\x12\x16\n" + "\x02id\x18\x03 \x01(\x03R\x02id\x12\x16\n" +
"\x06postId\x18\x04 \x01(\x03R\x06postId\x12\x1a\n" + "\x06postId\x18\x04 \x01(\x03R\x06postId\x12\x1a\n" +
@@ -2837,9 +2837,9 @@ const file_community_proto_rawDesc = "" +
"\x13GetPostLikesByIdReq\x12\x0e\n" + "\x13GetPostLikesByIdReq\x12\x0e\n" +
"\x02id\x18\x01 \x01(\x03R\x02id\"C\n" + "\x02id\x18\x01 \x01(\x03R\x02id\"C\n" +
"\x14GetPostLikesByIdResp\x12+\n" + "\x14GetPostLikesByIdResp\x12+\n" +
"\tpostLikes\x18\x01 \x01(\v2\r.pb.PostLikesR\tpostLikes\"\xac\x01\n" + "\tpostLikes\x18\x01 \x01(\v2\r.pb.PostLikesR\tpostLikes\"\xb0\x01\n" +
"\x12SearchPostLikesReq\x12\x12\n" + "\x12SearchPostLikesReq\x12\x16\n" +
"\x04page\x18\x01 \x01(\x03R\x04page\x12\x14\n" + "\x06offset\x18\x01 \x01(\x03R\x06offset\x12\x14\n" +
"\x05limit\x18\x02 \x01(\x03R\x05limit\x12\x1b\n" + "\x05limit\x18\x02 \x01(\x03R\x05limit\x12\x1b\n" +
"\x06postId\x18\x03 \x01(\x03H\x00R\x06postId\x88\x01\x01\x12\x1b\n" + "\x06postId\x18\x03 \x01(\x03H\x00R\x06postId\x88\x01\x01\x12\x1b\n" +
"\x06userId\x18\x04 \x01(\x03H\x01R\x06userId\x88\x01\x01\x12\x1c\n" + "\x06userId\x18\x04 \x01(\x03H\x01R\x06userId\x88\x01\x01\x12\x1c\n" +
@@ -2940,9 +2940,9 @@ const file_community_proto_rawDesc = "" +
"\x0fGetPostsByIdReq\x12\x0e\n" + "\x0fGetPostsByIdReq\x12\x0e\n" +
"\x02id\x18\x01 \x01(\x03R\x02id\"3\n" + "\x02id\x18\x01 \x01(\x03R\x02id\"3\n" +
"\x10GetPostsByIdResp\x12\x1f\n" + "\x10GetPostsByIdResp\x12\x1f\n" +
"\x05posts\x18\x01 \x01(\v2\t.pb.PostsR\x05posts\"\xf9\x05\n" + "\x05posts\x18\x01 \x01(\v2\t.pb.PostsR\x05posts\"\xfd\x05\n" +
"\x0eSearchPostsReq\x12\x12\n" + "\x0eSearchPostsReq\x12\x16\n" +
"\x04page\x18\x01 \x01(\x03R\x04page\x12\x14\n" + "\x06offset\x18\x01 \x01(\x03R\x06offset\x12\x14\n" +
"\x05limit\x18\x02 \x01(\x03R\x05limit\x12\x0e\n" + "\x05limit\x18\x02 \x01(\x03R\x05limit\x12\x0e\n" +
"\x02id\x18\x03 \x01(\x03R\x02id\x12\x1f\n" + "\x02id\x18\x03 \x01(\x03R\x02id\x12\x1f\n" +
"\bauthorId\x18\x04 \x01(\x03H\x00R\bauthorId\x88\x01\x01\x12#\n" + "\bauthorId\x18\x04 \x01(\x03H\x00R\bauthorId\x88\x01\x01\x12#\n" +
@@ -29,13 +29,12 @@ func NewListGamesLogic(ctx context.Context, svcCtx *svc.ServiceContext) *ListGam
} }
func (l *ListGamesLogic) ListGames(req *types.PageReq) (resp *types.GameListResp, err error) { func (l *ListGamesLogic) ListGames(req *types.PageReq) (resp *types.GameListResp, err error) {
page := req.Offset if req.Limit <= 0 {
if req.Limit > 0 { req.Limit = 20
page = req.Offset/req.Limit + 1
} }
all, err := l.svcCtx.GameRpc.SearchGames(l.ctx, &pb.SearchGamesReq{ all, err := l.svcCtx.GameRpc.SearchGames(l.ctx, &pb.SearchGamesReq{
Page: page, Offset: req.Offset,
Limit: req.Limit, Limit: req.Limit,
}) })
if err != nil { if err != nil {
@@ -56,8 +55,8 @@ func (l *ListGamesLogic) ListGames(req *types.PageReq) (resp *types.GameListResp
Items: list, Items: list,
Meta: types.PageMeta{ Meta: types.PageMeta{
Total: 0, Total: 0,
Offset: req.Offset + 1, Offset: req.Offset,
Limit: 20, Limit: req.Limit,
}, },
}, nil }, nil
@@ -27,10 +27,10 @@ func NewSearchGamesLogic(ctx context.Context, svcCtx *svc.ServiceContext) *Searc
func (l *SearchGamesLogic) SearchGames(in *pb.SearchGamesReq) (*pb.SearchGamesResp, error) { func (l *SearchGamesLogic) SearchGames(in *pb.SearchGamesReq) (*pb.SearchGamesResp, error) {
notFoundErr := entcache.ErrNotFound notFoundErr := entcache.ErrNotFound
if in.Page <= 0 || in.Limit <= 0 || in.Page > 1000 || in.Limit > 100 { if in.Offset < 0 || in.Limit <= 0 || in.Limit > 100 {
return nil, errors.New("invalid pagination parameters") return nil, errors.New("invalid pagination parameters")
} }
all, err := l.svcCtx.GameModelRO.Games.Query().Limit(int(in.Limit)).Offset(int(in.Limit * (in.Page - 1))).All(l.ctx) all, err := l.svcCtx.GameModelRO.Games.Query().Limit(int(in.Limit)).Offset(int(in.Offset)).All(l.ctx)
if err != nil && !errors.As(err, &notFoundErr) { if err != nil && !errors.As(err, &notFoundErr) {
logx.Errorf("failed to query games: %v", err) logx.Errorf("failed to query games: %v", err)
return nil, errors.New("failed to query games") return nil, errors.New("failed to query games")
+64 -63
View File
@@ -2,7 +2,7 @@
// versions: // versions:
// protoc-gen-go v1.36.11 // protoc-gen-go v1.36.11
// protoc v7.34.1 // protoc v7.34.1
// source: desc/rpc/game.proto // source: game.proto
package pb package pb
@@ -38,7 +38,7 @@ type Games struct {
func (x *Games) Reset() { func (x *Games) Reset() {
*x = Games{} *x = Games{}
mi := &file_desc_rpc_game_proto_msgTypes[0] mi := &file_game_proto_msgTypes[0]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi) ms.StoreMessageInfo(mi)
} }
@@ -50,7 +50,7 @@ func (x *Games) String() string {
func (*Games) ProtoMessage() {} func (*Games) ProtoMessage() {}
func (x *Games) ProtoReflect() protoreflect.Message { func (x *Games) ProtoReflect() protoreflect.Message {
mi := &file_desc_rpc_game_proto_msgTypes[0] mi := &file_game_proto_msgTypes[0]
if x != nil { if x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil { if ms.LoadMessageInfo() == nil {
@@ -63,7 +63,7 @@ func (x *Games) ProtoReflect() protoreflect.Message {
// Deprecated: Use Games.ProtoReflect.Descriptor instead. // Deprecated: Use Games.ProtoReflect.Descriptor instead.
func (*Games) Descriptor() ([]byte, []int) { func (*Games) Descriptor() ([]byte, []int) {
return file_desc_rpc_game_proto_rawDescGZIP(), []int{0} return file_game_proto_rawDescGZIP(), []int{0}
} }
func (x *Games) GetId() int64 { func (x *Games) GetId() int64 {
@@ -137,7 +137,7 @@ type AddGamesReq struct {
func (x *AddGamesReq) Reset() { func (x *AddGamesReq) Reset() {
*x = AddGamesReq{} *x = AddGamesReq{}
mi := &file_desc_rpc_game_proto_msgTypes[1] mi := &file_game_proto_msgTypes[1]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi) ms.StoreMessageInfo(mi)
} }
@@ -149,7 +149,7 @@ func (x *AddGamesReq) String() string {
func (*AddGamesReq) ProtoMessage() {} func (*AddGamesReq) ProtoMessage() {}
func (x *AddGamesReq) ProtoReflect() protoreflect.Message { func (x *AddGamesReq) ProtoReflect() protoreflect.Message {
mi := &file_desc_rpc_game_proto_msgTypes[1] mi := &file_game_proto_msgTypes[1]
if x != nil { if x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil { if ms.LoadMessageInfo() == nil {
@@ -162,7 +162,7 @@ func (x *AddGamesReq) ProtoReflect() protoreflect.Message {
// Deprecated: Use AddGamesReq.ProtoReflect.Descriptor instead. // Deprecated: Use AddGamesReq.ProtoReflect.Descriptor instead.
func (*AddGamesReq) Descriptor() ([]byte, []int) { func (*AddGamesReq) Descriptor() ([]byte, []int) {
return file_desc_rpc_game_proto_rawDescGZIP(), []int{1} return file_game_proto_rawDescGZIP(), []int{1}
} }
func (x *AddGamesReq) GetName() string { func (x *AddGamesReq) GetName() string {
@@ -223,7 +223,7 @@ type AddGamesResp struct {
func (x *AddGamesResp) Reset() { func (x *AddGamesResp) Reset() {
*x = AddGamesResp{} *x = AddGamesResp{}
mi := &file_desc_rpc_game_proto_msgTypes[2] mi := &file_game_proto_msgTypes[2]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi) ms.StoreMessageInfo(mi)
} }
@@ -235,7 +235,7 @@ func (x *AddGamesResp) String() string {
func (*AddGamesResp) ProtoMessage() {} func (*AddGamesResp) ProtoMessage() {}
func (x *AddGamesResp) ProtoReflect() protoreflect.Message { func (x *AddGamesResp) ProtoReflect() protoreflect.Message {
mi := &file_desc_rpc_game_proto_msgTypes[2] mi := &file_game_proto_msgTypes[2]
if x != nil { if x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil { if ms.LoadMessageInfo() == nil {
@@ -248,7 +248,7 @@ func (x *AddGamesResp) ProtoReflect() protoreflect.Message {
// Deprecated: Use AddGamesResp.ProtoReflect.Descriptor instead. // Deprecated: Use AddGamesResp.ProtoReflect.Descriptor instead.
func (*AddGamesResp) Descriptor() ([]byte, []int) { func (*AddGamesResp) Descriptor() ([]byte, []int) {
return file_desc_rpc_game_proto_rawDescGZIP(), []int{2} return file_game_proto_rawDescGZIP(), []int{2}
} }
func (x *AddGamesResp) GetGames() *Games { func (x *AddGamesResp) GetGames() *Games {
@@ -274,7 +274,7 @@ type UpdateGamesReq struct {
func (x *UpdateGamesReq) Reset() { func (x *UpdateGamesReq) Reset() {
*x = UpdateGamesReq{} *x = UpdateGamesReq{}
mi := &file_desc_rpc_game_proto_msgTypes[3] mi := &file_game_proto_msgTypes[3]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi) ms.StoreMessageInfo(mi)
} }
@@ -286,7 +286,7 @@ func (x *UpdateGamesReq) String() string {
func (*UpdateGamesReq) ProtoMessage() {} func (*UpdateGamesReq) ProtoMessage() {}
func (x *UpdateGamesReq) ProtoReflect() protoreflect.Message { func (x *UpdateGamesReq) ProtoReflect() protoreflect.Message {
mi := &file_desc_rpc_game_proto_msgTypes[3] mi := &file_game_proto_msgTypes[3]
if x != nil { if x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil { if ms.LoadMessageInfo() == nil {
@@ -299,7 +299,7 @@ func (x *UpdateGamesReq) ProtoReflect() protoreflect.Message {
// Deprecated: Use UpdateGamesReq.ProtoReflect.Descriptor instead. // Deprecated: Use UpdateGamesReq.ProtoReflect.Descriptor instead.
func (*UpdateGamesReq) Descriptor() ([]byte, []int) { func (*UpdateGamesReq) Descriptor() ([]byte, []int) {
return file_desc_rpc_game_proto_rawDescGZIP(), []int{3} return file_game_proto_rawDescGZIP(), []int{3}
} }
func (x *UpdateGamesReq) GetId() int64 { func (x *UpdateGamesReq) GetId() int64 {
@@ -366,7 +366,7 @@ type UpdateGamesResp struct {
func (x *UpdateGamesResp) Reset() { func (x *UpdateGamesResp) Reset() {
*x = UpdateGamesResp{} *x = UpdateGamesResp{}
mi := &file_desc_rpc_game_proto_msgTypes[4] mi := &file_game_proto_msgTypes[4]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi) ms.StoreMessageInfo(mi)
} }
@@ -378,7 +378,7 @@ func (x *UpdateGamesResp) String() string {
func (*UpdateGamesResp) ProtoMessage() {} func (*UpdateGamesResp) ProtoMessage() {}
func (x *UpdateGamesResp) ProtoReflect() protoreflect.Message { func (x *UpdateGamesResp) ProtoReflect() protoreflect.Message {
mi := &file_desc_rpc_game_proto_msgTypes[4] mi := &file_game_proto_msgTypes[4]
if x != nil { if x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil { if ms.LoadMessageInfo() == nil {
@@ -391,7 +391,7 @@ func (x *UpdateGamesResp) ProtoReflect() protoreflect.Message {
// Deprecated: Use UpdateGamesResp.ProtoReflect.Descriptor instead. // Deprecated: Use UpdateGamesResp.ProtoReflect.Descriptor instead.
func (*UpdateGamesResp) Descriptor() ([]byte, []int) { func (*UpdateGamesResp) Descriptor() ([]byte, []int) {
return file_desc_rpc_game_proto_rawDescGZIP(), []int{4} return file_game_proto_rawDescGZIP(), []int{4}
} }
type DelGamesReq struct { type DelGamesReq struct {
@@ -403,7 +403,7 @@ type DelGamesReq struct {
func (x *DelGamesReq) Reset() { func (x *DelGamesReq) Reset() {
*x = DelGamesReq{} *x = DelGamesReq{}
mi := &file_desc_rpc_game_proto_msgTypes[5] mi := &file_game_proto_msgTypes[5]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi) ms.StoreMessageInfo(mi)
} }
@@ -415,7 +415,7 @@ func (x *DelGamesReq) String() string {
func (*DelGamesReq) ProtoMessage() {} func (*DelGamesReq) ProtoMessage() {}
func (x *DelGamesReq) ProtoReflect() protoreflect.Message { func (x *DelGamesReq) ProtoReflect() protoreflect.Message {
mi := &file_desc_rpc_game_proto_msgTypes[5] mi := &file_game_proto_msgTypes[5]
if x != nil { if x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil { if ms.LoadMessageInfo() == nil {
@@ -428,7 +428,7 @@ func (x *DelGamesReq) ProtoReflect() protoreflect.Message {
// Deprecated: Use DelGamesReq.ProtoReflect.Descriptor instead. // Deprecated: Use DelGamesReq.ProtoReflect.Descriptor instead.
func (*DelGamesReq) Descriptor() ([]byte, []int) { func (*DelGamesReq) Descriptor() ([]byte, []int) {
return file_desc_rpc_game_proto_rawDescGZIP(), []int{5} return file_game_proto_rawDescGZIP(), []int{5}
} }
func (x *DelGamesReq) GetId() int64 { func (x *DelGamesReq) GetId() int64 {
@@ -446,7 +446,7 @@ type DelGamesResp struct {
func (x *DelGamesResp) Reset() { func (x *DelGamesResp) Reset() {
*x = DelGamesResp{} *x = DelGamesResp{}
mi := &file_desc_rpc_game_proto_msgTypes[6] mi := &file_game_proto_msgTypes[6]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi) ms.StoreMessageInfo(mi)
} }
@@ -458,7 +458,7 @@ func (x *DelGamesResp) String() string {
func (*DelGamesResp) ProtoMessage() {} func (*DelGamesResp) ProtoMessage() {}
func (x *DelGamesResp) ProtoReflect() protoreflect.Message { func (x *DelGamesResp) ProtoReflect() protoreflect.Message {
mi := &file_desc_rpc_game_proto_msgTypes[6] mi := &file_game_proto_msgTypes[6]
if x != nil { if x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil { if ms.LoadMessageInfo() == nil {
@@ -471,7 +471,7 @@ func (x *DelGamesResp) ProtoReflect() protoreflect.Message {
// Deprecated: Use DelGamesResp.ProtoReflect.Descriptor instead. // Deprecated: Use DelGamesResp.ProtoReflect.Descriptor instead.
func (*DelGamesResp) Descriptor() ([]byte, []int) { func (*DelGamesResp) Descriptor() ([]byte, []int) {
return file_desc_rpc_game_proto_rawDescGZIP(), []int{6} return file_game_proto_rawDescGZIP(), []int{6}
} }
type GetGamesByIdReq struct { type GetGamesByIdReq struct {
@@ -483,7 +483,7 @@ type GetGamesByIdReq struct {
func (x *GetGamesByIdReq) Reset() { func (x *GetGamesByIdReq) Reset() {
*x = GetGamesByIdReq{} *x = GetGamesByIdReq{}
mi := &file_desc_rpc_game_proto_msgTypes[7] mi := &file_game_proto_msgTypes[7]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi) ms.StoreMessageInfo(mi)
} }
@@ -495,7 +495,7 @@ func (x *GetGamesByIdReq) String() string {
func (*GetGamesByIdReq) ProtoMessage() {} func (*GetGamesByIdReq) ProtoMessage() {}
func (x *GetGamesByIdReq) ProtoReflect() protoreflect.Message { func (x *GetGamesByIdReq) ProtoReflect() protoreflect.Message {
mi := &file_desc_rpc_game_proto_msgTypes[7] mi := &file_game_proto_msgTypes[7]
if x != nil { if x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil { if ms.LoadMessageInfo() == nil {
@@ -508,7 +508,7 @@ func (x *GetGamesByIdReq) ProtoReflect() protoreflect.Message {
// Deprecated: Use GetGamesByIdReq.ProtoReflect.Descriptor instead. // Deprecated: Use GetGamesByIdReq.ProtoReflect.Descriptor instead.
func (*GetGamesByIdReq) Descriptor() ([]byte, []int) { func (*GetGamesByIdReq) Descriptor() ([]byte, []int) {
return file_desc_rpc_game_proto_rawDescGZIP(), []int{7} return file_game_proto_rawDescGZIP(), []int{7}
} }
func (x *GetGamesByIdReq) GetId() int64 { func (x *GetGamesByIdReq) GetId() int64 {
@@ -527,7 +527,7 @@ type GetGamesByIdResp struct {
func (x *GetGamesByIdResp) Reset() { func (x *GetGamesByIdResp) Reset() {
*x = GetGamesByIdResp{} *x = GetGamesByIdResp{}
mi := &file_desc_rpc_game_proto_msgTypes[8] mi := &file_game_proto_msgTypes[8]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi) ms.StoreMessageInfo(mi)
} }
@@ -539,7 +539,7 @@ func (x *GetGamesByIdResp) String() string {
func (*GetGamesByIdResp) ProtoMessage() {} func (*GetGamesByIdResp) ProtoMessage() {}
func (x *GetGamesByIdResp) ProtoReflect() protoreflect.Message { func (x *GetGamesByIdResp) ProtoReflect() protoreflect.Message {
mi := &file_desc_rpc_game_proto_msgTypes[8] mi := &file_game_proto_msgTypes[8]
if x != nil { if x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil { if ms.LoadMessageInfo() == nil {
@@ -552,7 +552,7 @@ func (x *GetGamesByIdResp) ProtoReflect() protoreflect.Message {
// Deprecated: Use GetGamesByIdResp.ProtoReflect.Descriptor instead. // Deprecated: Use GetGamesByIdResp.ProtoReflect.Descriptor instead.
func (*GetGamesByIdResp) Descriptor() ([]byte, []int) { func (*GetGamesByIdResp) Descriptor() ([]byte, []int) {
return file_desc_rpc_game_proto_rawDescGZIP(), []int{8} return file_game_proto_rawDescGZIP(), []int{8}
} }
func (x *GetGamesByIdResp) GetGames() *Games { func (x *GetGamesByIdResp) GetGames() *Games {
@@ -564,7 +564,7 @@ func (x *GetGamesByIdResp) GetGames() *Games {
type SearchGamesReq struct { type SearchGamesReq struct {
state protoimpl.MessageState `protogen:"open.v1"` state protoimpl.MessageState `protogen:"open.v1"`
Page int64 `protobuf:"varint,1,opt,name=page,proto3" json:"page,omitempty"` //page Offset int64 `protobuf:"varint,1,opt,name=offset,proto3" json:"offset,omitempty"` //offset
Limit int64 `protobuf:"varint,2,opt,name=limit,proto3" json:"limit,omitempty"` //limit Limit int64 `protobuf:"varint,2,opt,name=limit,proto3" json:"limit,omitempty"` //limit
Id int64 `protobuf:"varint,3,opt,name=id,proto3" json:"id,omitempty"` //id Id int64 `protobuf:"varint,3,opt,name=id,proto3" json:"id,omitempty"` //id
Name *string `protobuf:"bytes,4,opt,name=name,proto3,oneof" json:"name,omitempty"` //name Name *string `protobuf:"bytes,4,opt,name=name,proto3,oneof" json:"name,omitempty"` //name
@@ -580,7 +580,7 @@ type SearchGamesReq struct {
func (x *SearchGamesReq) Reset() { func (x *SearchGamesReq) Reset() {
*x = SearchGamesReq{} *x = SearchGamesReq{}
mi := &file_desc_rpc_game_proto_msgTypes[9] mi := &file_game_proto_msgTypes[9]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi) ms.StoreMessageInfo(mi)
} }
@@ -592,7 +592,7 @@ func (x *SearchGamesReq) String() string {
func (*SearchGamesReq) ProtoMessage() {} func (*SearchGamesReq) ProtoMessage() {}
func (x *SearchGamesReq) ProtoReflect() protoreflect.Message { func (x *SearchGamesReq) ProtoReflect() protoreflect.Message {
mi := &file_desc_rpc_game_proto_msgTypes[9] mi := &file_game_proto_msgTypes[9]
if x != nil { if x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil { if ms.LoadMessageInfo() == nil {
@@ -605,12 +605,12 @@ func (x *SearchGamesReq) ProtoReflect() protoreflect.Message {
// Deprecated: Use SearchGamesReq.ProtoReflect.Descriptor instead. // Deprecated: Use SearchGamesReq.ProtoReflect.Descriptor instead.
func (*SearchGamesReq) Descriptor() ([]byte, []int) { func (*SearchGamesReq) Descriptor() ([]byte, []int) {
return file_desc_rpc_game_proto_rawDescGZIP(), []int{9} return file_game_proto_rawDescGZIP(), []int{9}
} }
func (x *SearchGamesReq) GetPage() int64 { func (x *SearchGamesReq) GetOffset() int64 {
if x != nil { if x != nil {
return x.Page return x.Offset
} }
return 0 return 0
} }
@@ -687,7 +687,7 @@ type SearchGamesResp struct {
func (x *SearchGamesResp) Reset() { func (x *SearchGamesResp) Reset() {
*x = SearchGamesResp{} *x = SearchGamesResp{}
mi := &file_desc_rpc_game_proto_msgTypes[10] mi := &file_game_proto_msgTypes[10]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi) ms.StoreMessageInfo(mi)
} }
@@ -699,7 +699,7 @@ func (x *SearchGamesResp) String() string {
func (*SearchGamesResp) ProtoMessage() {} func (*SearchGamesResp) ProtoMessage() {}
func (x *SearchGamesResp) ProtoReflect() protoreflect.Message { func (x *SearchGamesResp) ProtoReflect() protoreflect.Message {
mi := &file_desc_rpc_game_proto_msgTypes[10] mi := &file_game_proto_msgTypes[10]
if x != nil { if x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil { if ms.LoadMessageInfo() == nil {
@@ -712,7 +712,7 @@ func (x *SearchGamesResp) ProtoReflect() protoreflect.Message {
// Deprecated: Use SearchGamesResp.ProtoReflect.Descriptor instead. // Deprecated: Use SearchGamesResp.ProtoReflect.Descriptor instead.
func (*SearchGamesResp) Descriptor() ([]byte, []int) { func (*SearchGamesResp) Descriptor() ([]byte, []int) {
return file_desc_rpc_game_proto_rawDescGZIP(), []int{10} return file_game_proto_rawDescGZIP(), []int{10}
} }
func (x *SearchGamesResp) GetGames() []*Games { func (x *SearchGamesResp) GetGames() []*Games {
@@ -722,11 +722,12 @@ func (x *SearchGamesResp) GetGames() []*Games {
return nil return nil
} }
var File_desc_rpc_game_proto protoreflect.FileDescriptor var File_game_proto protoreflect.FileDescriptor
const file_desc_rpc_game_proto_rawDesc = "" + const file_game_proto_rawDesc = "" +
"\n" + "\n" +
"\x13desc/rpc/game.proto\x12\x02pb\"\xd1\x01\n" + "\n" +
"game.proto\x12\x02pb\"\xd1\x01\n" +
"\x05Games\x12\x0e\n" + "\x05Games\x12\x0e\n" +
"\x02id\x18\x01 \x01(\x03R\x02id\x12\x12\n" + "\x02id\x18\x01 \x01(\x03R\x02id\x12\x12\n" +
"\x04name\x18\x02 \x01(\tR\x04name\x12\x12\n" + "\x04name\x18\x02 \x01(\tR\x04name\x12\x12\n" +
@@ -762,9 +763,9 @@ const file_desc_rpc_game_proto_rawDesc = "" +
"\x0fGetGamesByIdReq\x12\x0e\n" + "\x0fGetGamesByIdReq\x12\x0e\n" +
"\x02id\x18\x01 \x01(\x03R\x02id\"3\n" + "\x02id\x18\x01 \x01(\x03R\x02id\"3\n" +
"\x10GetGamesByIdResp\x12\x1f\n" + "\x10GetGamesByIdResp\x12\x1f\n" +
"\x05games\x18\x01 \x01(\v2\t.pb.GamesR\x05games\"\xfd\x02\n" + "\x05games\x18\x01 \x01(\v2\t.pb.GamesR\x05games\"\x81\x03\n" +
"\x0eSearchGamesReq\x12\x12\n" + "\x0eSearchGamesReq\x12\x16\n" +
"\x04page\x18\x01 \x01(\x03R\x04page\x12\x14\n" + "\x06offset\x18\x01 \x01(\x03R\x06offset\x12\x14\n" +
"\x05limit\x18\x02 \x01(\x03R\x05limit\x12\x0e\n" + "\x05limit\x18\x02 \x01(\x03R\x05limit\x12\x0e\n" +
"\x02id\x18\x03 \x01(\x03R\x02id\x12\x17\n" + "\x02id\x18\x03 \x01(\x03R\x02id\x12\x17\n" +
"\x04name\x18\x04 \x01(\tH\x00R\x04name\x88\x01\x01\x12\x17\n" + "\x04name\x18\x04 \x01(\tH\x00R\x04name\x88\x01\x01\x12\x17\n" +
@@ -795,19 +796,19 @@ const file_desc_rpc_game_proto_rawDesc = "" +
"\vSearchGames\x12\x12.pb.SearchGamesReq\x1a\x13.pb.SearchGamesRespB\x06Z\x04./pbb\x06proto3" "\vSearchGames\x12\x12.pb.SearchGamesReq\x1a\x13.pb.SearchGamesRespB\x06Z\x04./pbb\x06proto3"
var ( var (
file_desc_rpc_game_proto_rawDescOnce sync.Once file_game_proto_rawDescOnce sync.Once
file_desc_rpc_game_proto_rawDescData []byte file_game_proto_rawDescData []byte
) )
func file_desc_rpc_game_proto_rawDescGZIP() []byte { func file_game_proto_rawDescGZIP() []byte {
file_desc_rpc_game_proto_rawDescOnce.Do(func() { file_game_proto_rawDescOnce.Do(func() {
file_desc_rpc_game_proto_rawDescData = protoimpl.X.CompressGZIP(unsafe.Slice(unsafe.StringData(file_desc_rpc_game_proto_rawDesc), len(file_desc_rpc_game_proto_rawDesc))) file_game_proto_rawDescData = protoimpl.X.CompressGZIP(unsafe.Slice(unsafe.StringData(file_game_proto_rawDesc), len(file_game_proto_rawDesc)))
}) })
return file_desc_rpc_game_proto_rawDescData return file_game_proto_rawDescData
} }
var file_desc_rpc_game_proto_msgTypes = make([]protoimpl.MessageInfo, 11) var file_game_proto_msgTypes = make([]protoimpl.MessageInfo, 11)
var file_desc_rpc_game_proto_goTypes = []any{ var file_game_proto_goTypes = []any{
(*Games)(nil), // 0: pb.Games (*Games)(nil), // 0: pb.Games
(*AddGamesReq)(nil), // 1: pb.AddGamesReq (*AddGamesReq)(nil), // 1: pb.AddGamesReq
(*AddGamesResp)(nil), // 2: pb.AddGamesResp (*AddGamesResp)(nil), // 2: pb.AddGamesResp
@@ -820,7 +821,7 @@ var file_desc_rpc_game_proto_goTypes = []any{
(*SearchGamesReq)(nil), // 9: pb.SearchGamesReq (*SearchGamesReq)(nil), // 9: pb.SearchGamesReq
(*SearchGamesResp)(nil), // 10: pb.SearchGamesResp (*SearchGamesResp)(nil), // 10: pb.SearchGamesResp
} }
var file_desc_rpc_game_proto_depIdxs = []int32{ var file_game_proto_depIdxs = []int32{
0, // 0: pb.AddGamesResp.games:type_name -> pb.Games 0, // 0: pb.AddGamesResp.games:type_name -> pb.Games
0, // 1: pb.GetGamesByIdResp.games:type_name -> pb.Games 0, // 1: pb.GetGamesByIdResp.games:type_name -> pb.Games
0, // 2: pb.SearchGamesResp.games:type_name -> pb.Games 0, // 2: pb.SearchGamesResp.games:type_name -> pb.Games
@@ -841,27 +842,27 @@ var file_desc_rpc_game_proto_depIdxs = []int32{
0, // [0:3] is the sub-list for field type_name 0, // [0:3] is the sub-list for field type_name
} }
func init() { file_desc_rpc_game_proto_init() } func init() { file_game_proto_init() }
func file_desc_rpc_game_proto_init() { func file_game_proto_init() {
if File_desc_rpc_game_proto != nil { if File_game_proto != nil {
return return
} }
file_desc_rpc_game_proto_msgTypes[9].OneofWrappers = []any{} file_game_proto_msgTypes[9].OneofWrappers = []any{}
type x struct{} type x struct{}
out := protoimpl.TypeBuilder{ out := protoimpl.TypeBuilder{
File: protoimpl.DescBuilder{ File: protoimpl.DescBuilder{
GoPackagePath: reflect.TypeOf(x{}).PkgPath(), GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
RawDescriptor: unsafe.Slice(unsafe.StringData(file_desc_rpc_game_proto_rawDesc), len(file_desc_rpc_game_proto_rawDesc)), RawDescriptor: unsafe.Slice(unsafe.StringData(file_game_proto_rawDesc), len(file_game_proto_rawDesc)),
NumEnums: 0, NumEnums: 0,
NumMessages: 11, NumMessages: 11,
NumExtensions: 0, NumExtensions: 0,
NumServices: 1, NumServices: 1,
}, },
GoTypes: file_desc_rpc_game_proto_goTypes, GoTypes: file_game_proto_goTypes,
DependencyIndexes: file_desc_rpc_game_proto_depIdxs, DependencyIndexes: file_game_proto_depIdxs,
MessageInfos: file_desc_rpc_game_proto_msgTypes, MessageInfos: file_game_proto_msgTypes,
}.Build() }.Build()
File_desc_rpc_game_proto = out.File File_game_proto = out.File
file_desc_rpc_game_proto_goTypes = nil file_game_proto_goTypes = nil
file_desc_rpc_game_proto_depIdxs = nil file_game_proto_depIdxs = nil
} }
@@ -37,7 +37,7 @@ func NewListOrdersLogic(ctx context.Context, svcCtx *svc.ServiceContext) *ListOr
func (l *ListOrdersLogic) ListOrders(req *types.OrderListReq) (resp *types.OrderListResp, err error) { func (l *ListOrdersLogic) ListOrders(req *types.OrderListReq) (resp *types.OrderListResp, err error) {
searchReq := &orderservice.SearchOrdersReq{ searchReq := &orderservice.SearchOrdersReq{
Page: req.Offset, Offset: req.Offset,
Limit: req.Limit, Limit: req.Limit,
} }
if req.Status != "" { if req.Status != "" {
@@ -84,7 +84,7 @@ func (l *ListOrdersLogic) ListOrders(req *types.OrderListReq) (resp *types.Order
searchReq.PlayerId = &player.Id searchReq.PlayerId = &player.Id
case "owner": case "owner":
shops, shopErr := l.svcCtx.ShopRpc.SearchShops(l.ctx, &shopservice.SearchShopsReq{ shops, shopErr := l.svcCtx.ShopRpc.SearchShops(l.ctx, &shopservice.SearchShopsReq{
Page: 0, Offset: 0,
Limit: 100, Limit: 100,
OwnerId: uid, OwnerId: uid,
}) })
@@ -96,7 +96,7 @@ func (l *ListOrdersLogic) ListOrders(req *types.OrderListReq) (resp *types.Order
for _, shop := range shops.GetShops() { for _, shop := range shops.GetShops() {
shopID := shop.GetId() shopID := shop.GetId()
q := &orderservice.SearchOrdersReq{ q := &orderservice.SearchOrdersReq{
Page: req.Offset, Offset: req.Offset,
Limit: req.Limit, Limit: req.Limit,
ShopId: &shopID, ShopId: &shopID,
} }
@@ -66,7 +66,7 @@ func (l *SearchOrderStateLogsLogic) SearchOrderStateLogs(in *pb.SearchOrderState
query = query.Where(orderstatelogs.And(preds...)) query = query.Where(orderstatelogs.And(preds...))
} }
items, err := query.Offset(int(in.Page * in.Limit)).Limit(int(in.Limit)).All(l.ctx) items, err := query.Offset(int(in.Offset)).Limit(int(in.Limit)).All(l.ctx)
if err != nil { if err != nil {
return nil, err return nil, err
} }
@@ -94,7 +94,7 @@ func (l *SearchOrdersLogic) SearchOrders(in *pb.SearchOrdersReq) (*pb.SearchOrde
query = query.Where(orders.And(preds...)) query = query.Where(orders.And(preds...))
} }
items, err := query.Offset(int(in.Page * in.Limit)).Limit(int(in.Limit)).All(l.ctx) items, err := query.Offset(int(in.Offset)).Limit(int(in.Limit)).All(l.ctx)
if err != nil { if err != nil {
return nil, err return nil, err
} }
+13 -13
View File
@@ -1,7 +1,7 @@
// Code generated by protoc-gen-go. DO NOT EDIT. // Code generated by protoc-gen-go. DO NOT EDIT.
// versions: // versions:
// protoc-gen-go v1.36.11 // protoc-gen-go v1.36.11
// protoc v6.33.5 // protoc v7.34.1
// source: order.proto // source: order.proto
package pb package pb
@@ -788,7 +788,7 @@ func (x *GetOrdersByIdResp) GetOrders() *Orders {
type SearchOrdersReq struct { type SearchOrdersReq struct {
state protoimpl.MessageState `protogen:"open.v1"` state protoimpl.MessageState `protogen:"open.v1"`
Page int64 `protobuf:"varint,1,opt,name=page,proto3" json:"page,omitempty"` //page Offset int64 `protobuf:"varint,1,opt,name=offset,proto3" json:"offset,omitempty"` //offset
Limit int64 `protobuf:"varint,2,opt,name=limit,proto3" json:"limit,omitempty"` //limit Limit int64 `protobuf:"varint,2,opt,name=limit,proto3" json:"limit,omitempty"` //limit
Id *int64 `protobuf:"varint,3,opt,name=id,proto3,oneof" json:"id,omitempty"` //id Id *int64 `protobuf:"varint,3,opt,name=id,proto3,oneof" json:"id,omitempty"` //id
ConsumerId *int64 `protobuf:"varint,4,opt,name=consumerId,proto3,oneof" json:"consumerId,omitempty"` //consumerId ConsumerId *int64 `protobuf:"varint,4,opt,name=consumerId,proto3,oneof" json:"consumerId,omitempty"` //consumerId
@@ -841,9 +841,9 @@ func (*SearchOrdersReq) Descriptor() ([]byte, []int) {
return file_order_proto_rawDescGZIP(), []int{9} return file_order_proto_rawDescGZIP(), []int{9}
} }
func (x *SearchOrdersReq) GetPage() int64 { func (x *SearchOrdersReq) GetOffset() int64 {
if x != nil { if x != nil {
return x.Page return x.Offset
} }
return 0 return 0
} }
@@ -1585,7 +1585,7 @@ func (x *GetOrderStateLogsByIdResp) GetOrderStateLogs() *OrderStateLogs {
type SearchOrderStateLogsReq struct { type SearchOrderStateLogsReq struct {
state protoimpl.MessageState `protogen:"open.v1"` state protoimpl.MessageState `protogen:"open.v1"`
Page int64 `protobuf:"varint,1,opt,name=page,proto3" json:"page,omitempty"` //page Offset int64 `protobuf:"varint,1,opt,name=offset,proto3" json:"offset,omitempty"` //offset
Limit int64 `protobuf:"varint,2,opt,name=limit,proto3" json:"limit,omitempty"` //limit Limit int64 `protobuf:"varint,2,opt,name=limit,proto3" json:"limit,omitempty"` //limit
Id *int64 `protobuf:"varint,3,opt,name=id,proto3,oneof" json:"id,omitempty"` //id Id *int64 `protobuf:"varint,3,opt,name=id,proto3,oneof" json:"id,omitempty"` //id
OrderId *int64 `protobuf:"varint,4,opt,name=orderId,proto3,oneof" json:"orderId,omitempty"` //orderId OrderId *int64 `protobuf:"varint,4,opt,name=orderId,proto3,oneof" json:"orderId,omitempty"` //orderId
@@ -1630,9 +1630,9 @@ func (*SearchOrderStateLogsReq) Descriptor() ([]byte, []int) {
return file_order_proto_rawDescGZIP(), []int{20} return file_order_proto_rawDescGZIP(), []int{20}
} }
func (x *SearchOrderStateLogsReq) GetPage() int64 { func (x *SearchOrderStateLogsReq) GetOffset() int64 {
if x != nil { if x != nil {
return x.Page return x.Offset
} }
return 0 return 0
} }
@@ -1890,9 +1890,9 @@ const file_order_proto_rawDesc = "" +
"\x02id\x18\x01 \x01(\x03R\x02id\"7\n" + "\x02id\x18\x01 \x01(\x03R\x02id\"7\n" +
"\x11GetOrdersByIdResp\x12\"\n" + "\x11GetOrdersByIdResp\x12\"\n" +
"\x06orders\x18\x01 \x01(\v2\n" + "\x06orders\x18\x01 \x01(\v2\n" +
".pb.OrdersR\x06orders\"\xed\x06\n" + ".pb.OrdersR\x06orders\"\xf1\x06\n" +
"\x0fSearchOrdersReq\x12\x12\n" + "\x0fSearchOrdersReq\x12\x16\n" +
"\x04page\x18\x01 \x01(\x03R\x04page\x12\x14\n" + "\x06offset\x18\x01 \x01(\x03R\x06offset\x12\x14\n" +
"\x05limit\x18\x02 \x01(\x03R\x05limit\x12\x13\n" + "\x05limit\x18\x02 \x01(\x03R\x05limit\x12\x13\n" +
"\x02id\x18\x03 \x01(\x03H\x00R\x02id\x88\x01\x01\x12#\n" + "\x02id\x18\x03 \x01(\x03H\x00R\x02id\x88\x01\x01\x12#\n" +
"\n" + "\n" +
@@ -2006,9 +2006,9 @@ const file_order_proto_rawDesc = "" +
"\x18GetOrderStateLogsByIdReq\x12\x0e\n" + "\x18GetOrderStateLogsByIdReq\x12\x0e\n" +
"\x02id\x18\x01 \x01(\x03R\x02id\"W\n" + "\x02id\x18\x01 \x01(\x03R\x02id\"W\n" +
"\x19GetOrderStateLogsByIdResp\x12:\n" + "\x19GetOrderStateLogsByIdResp\x12:\n" +
"\x0eorderStateLogs\x18\x01 \x01(\v2\x12.pb.OrderStateLogsR\x0eorderStateLogs\"\xcf\x03\n" + "\x0eorderStateLogs\x18\x01 \x01(\v2\x12.pb.OrderStateLogsR\x0eorderStateLogs\"\xd3\x03\n" +
"\x17SearchOrderStateLogsReq\x12\x12\n" + "\x17SearchOrderStateLogsReq\x12\x16\n" +
"\x04page\x18\x01 \x01(\x03R\x04page\x12\x14\n" + "\x06offset\x18\x01 \x01(\x03R\x06offset\x12\x14\n" +
"\x05limit\x18\x02 \x01(\x03R\x05limit\x12\x13\n" + "\x05limit\x18\x02 \x01(\x03R\x05limit\x12\x13\n" +
"\x02id\x18\x03 \x01(\x03H\x00R\x02id\x88\x01\x01\x12\x1d\n" + "\x02id\x18\x03 \x01(\x03H\x00R\x02id\x88\x01\x01\x12\x1d\n" +
"\aorderId\x18\x04 \x01(\x03H\x01R\aorderId\x88\x01\x01\x12#\n" + "\aorderId\x18\x04 \x01(\x03H\x01R\aorderId\x88\x01\x01\x12#\n" +
@@ -31,12 +31,8 @@ func NewListPlayerServicesLogic(ctx context.Context, svcCtx *svc.ServiceContext)
func (l *ListPlayerServicesLogic) ListPlayerServices(req *types.ListPlayerServicesReq) (resp *types.PlayerServiceListResp, err error) { func (l *ListPlayerServicesLogic) ListPlayerServices(req *types.ListPlayerServicesReq) (resp *types.PlayerServiceListResp, err error) {
resp = &types.PlayerServiceListResp{} resp = &types.PlayerServiceListResp{}
page := int64(0)
if req.Limit > 0 {
page = req.Offset / req.Limit
}
s, err := l.svcCtx.PlayerRpc.SearchPlayerServices(l.ctx, &playerservice.SearchPlayerServicesReq{ s, err := l.svcCtx.PlayerRpc.SearchPlayerServices(l.ctx, &playerservice.SearchPlayerServicesReq{
Page: page, Offset: req.Offset,
Limit: req.Limit, Limit: req.Limit,
PlayerId: req.Id, PlayerId: req.Id,
}) })
@@ -30,12 +30,8 @@ func NewListPlayersLogic(ctx context.Context, svcCtx *svc.ServiceContext) *ListP
} }
func (l *ListPlayersLogic) ListPlayers(req *types.PlayerListReq) (resp *types.PlayerListResp, err error) { func (l *ListPlayersLogic) ListPlayers(req *types.PlayerListReq) (resp *types.PlayerListResp, err error) {
page := int64(0)
if req.Limit > 0 {
page = req.Offset / req.Limit
}
p, err := l.svcCtx.PlayerRpc.SearchPlayers(l.ctx, &pb.SearchPlayersReq{ p, err := l.svcCtx.PlayerRpc.SearchPlayers(l.ctx, &pb.SearchPlayersReq{
Page: &page, Offset: &req.Offset,
Limit: &req.Limit, Limit: &req.Limit,
Gender: &req.Gender, Gender: &req.Gender,
}) })
@@ -31,12 +31,8 @@ func NewListServicesLogic(ctx context.Context, svcCtx *svc.ServiceContext) *List
func (l *ListServicesLogic) ListServices(req *types.PageReq) (resp *types.PlayerServiceListResp, err error) { func (l *ListServicesLogic) ListServices(req *types.PageReq) (resp *types.PlayerServiceListResp, err error) {
resp = &types.PlayerServiceListResp{} resp = &types.PlayerServiceListResp{}
page := int64(0)
if req.Limit > 0 {
page = req.Offset / req.Limit
}
s, err := l.svcCtx.PlayerRpc.SearchPlayerServices(l.ctx, &playerservice.SearchPlayerServicesReq{ s, err := l.svcCtx.PlayerRpc.SearchPlayerServices(l.ctx, &playerservice.SearchPlayerServicesReq{
Page: page, Offset: req.Offset,
Limit: req.Limit, Limit: req.Limit,
PlayerId: 0, PlayerId: 0,
}) })
@@ -36,7 +36,7 @@ func (l *SearchPlayerServicesLogic) SearchPlayerServices(in *pb.SearchPlayerServ
all, err := update. all, err := update.
Limit(int(in.Limit)). Limit(int(in.Limit)).
Offset(int(in.Limit * in.Page)). Offset(int(in.Offset)).
All(l.ctx) All(l.ctx)
if err != nil { if err != nil {
return nil, errors.New("query all player services err") return nil, errors.New("query all player services err")
@@ -36,7 +36,7 @@ func (l *SearchPlayersLogic) SearchPlayers(in *pb.SearchPlayersReq) (*pb.SearchP
} }
searcher.Where(players.GenderEQ(gender)) searcher.Where(players.GenderEQ(gender))
} }
all, err := searcher.Limit(int(*in.Limit)).Offset(int(*in.Page * *in.Limit)).All(l.ctx) all, err := searcher.Limit(int(*in.Limit)).Offset(int(*in.Offset)).All(l.ctx)
if err != nil { if err != nil {
logx.Errorf("SearchPlayers err: %v", err) logx.Errorf("SearchPlayers err: %v", err)
return nil, errors.New("search players") return nil, errors.New("search players")
+107 -107
View File
@@ -2,7 +2,7 @@
// versions: // versions:
// protoc-gen-go v1.36.11 // protoc-gen-go v1.36.11
// protoc v7.34.1 // protoc v7.34.1
// source: desc/rpc/player.proto // source: player.proto
package pb package pb
@@ -43,7 +43,7 @@ type PlayerServices struct {
func (x *PlayerServices) Reset() { func (x *PlayerServices) Reset() {
*x = PlayerServices{} *x = PlayerServices{}
mi := &file_desc_rpc_player_proto_msgTypes[0] mi := &file_player_proto_msgTypes[0]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi) ms.StoreMessageInfo(mi)
} }
@@ -55,7 +55,7 @@ func (x *PlayerServices) String() string {
func (*PlayerServices) ProtoMessage() {} func (*PlayerServices) ProtoMessage() {}
func (x *PlayerServices) ProtoReflect() protoreflect.Message { func (x *PlayerServices) ProtoReflect() protoreflect.Message {
mi := &file_desc_rpc_player_proto_msgTypes[0] mi := &file_player_proto_msgTypes[0]
if x != nil { if x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil { if ms.LoadMessageInfo() == nil {
@@ -68,7 +68,7 @@ func (x *PlayerServices) ProtoReflect() protoreflect.Message {
// Deprecated: Use PlayerServices.ProtoReflect.Descriptor instead. // Deprecated: Use PlayerServices.ProtoReflect.Descriptor instead.
func (*PlayerServices) Descriptor() ([]byte, []int) { func (*PlayerServices) Descriptor() ([]byte, []int) {
return file_desc_rpc_player_proto_rawDescGZIP(), []int{0} return file_player_proto_rawDescGZIP(), []int{0}
} }
func (x *PlayerServices) GetId() int64 { func (x *PlayerServices) GetId() int64 {
@@ -182,7 +182,7 @@ type AddPlayerServicesReq struct {
func (x *AddPlayerServicesReq) Reset() { func (x *AddPlayerServicesReq) Reset() {
*x = AddPlayerServicesReq{} *x = AddPlayerServicesReq{}
mi := &file_desc_rpc_player_proto_msgTypes[1] mi := &file_player_proto_msgTypes[1]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi) ms.StoreMessageInfo(mi)
} }
@@ -194,7 +194,7 @@ func (x *AddPlayerServicesReq) String() string {
func (*AddPlayerServicesReq) ProtoMessage() {} func (*AddPlayerServicesReq) ProtoMessage() {}
func (x *AddPlayerServicesReq) ProtoReflect() protoreflect.Message { func (x *AddPlayerServicesReq) ProtoReflect() protoreflect.Message {
mi := &file_desc_rpc_player_proto_msgTypes[1] mi := &file_player_proto_msgTypes[1]
if x != nil { if x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil { if ms.LoadMessageInfo() == nil {
@@ -207,7 +207,7 @@ func (x *AddPlayerServicesReq) ProtoReflect() protoreflect.Message {
// Deprecated: Use AddPlayerServicesReq.ProtoReflect.Descriptor instead. // Deprecated: Use AddPlayerServicesReq.ProtoReflect.Descriptor instead.
func (*AddPlayerServicesReq) Descriptor() ([]byte, []int) { func (*AddPlayerServicesReq) Descriptor() ([]byte, []int) {
return file_desc_rpc_player_proto_rawDescGZIP(), []int{1} return file_player_proto_rawDescGZIP(), []int{1}
} }
func (x *AddPlayerServicesReq) GetPlayerId() int64 { func (x *AddPlayerServicesReq) GetPlayerId() int64 {
@@ -303,7 +303,7 @@ type AddPlayerServicesResp struct {
func (x *AddPlayerServicesResp) Reset() { func (x *AddPlayerServicesResp) Reset() {
*x = AddPlayerServicesResp{} *x = AddPlayerServicesResp{}
mi := &file_desc_rpc_player_proto_msgTypes[2] mi := &file_player_proto_msgTypes[2]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi) ms.StoreMessageInfo(mi)
} }
@@ -315,7 +315,7 @@ func (x *AddPlayerServicesResp) String() string {
func (*AddPlayerServicesResp) ProtoMessage() {} func (*AddPlayerServicesResp) ProtoMessage() {}
func (x *AddPlayerServicesResp) ProtoReflect() protoreflect.Message { func (x *AddPlayerServicesResp) ProtoReflect() protoreflect.Message {
mi := &file_desc_rpc_player_proto_msgTypes[2] mi := &file_player_proto_msgTypes[2]
if x != nil { if x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil { if ms.LoadMessageInfo() == nil {
@@ -328,7 +328,7 @@ func (x *AddPlayerServicesResp) ProtoReflect() protoreflect.Message {
// Deprecated: Use AddPlayerServicesResp.ProtoReflect.Descriptor instead. // Deprecated: Use AddPlayerServicesResp.ProtoReflect.Descriptor instead.
func (*AddPlayerServicesResp) Descriptor() ([]byte, []int) { func (*AddPlayerServicesResp) Descriptor() ([]byte, []int) {
return file_desc_rpc_player_proto_rawDescGZIP(), []int{2} return file_player_proto_rawDescGZIP(), []int{2}
} }
func (x *AddPlayerServicesResp) GetPlayerServices() *PlayerServices { func (x *AddPlayerServicesResp) GetPlayerServices() *PlayerServices {
@@ -359,7 +359,7 @@ type UpdatePlayerServicesReq struct {
func (x *UpdatePlayerServicesReq) Reset() { func (x *UpdatePlayerServicesReq) Reset() {
*x = UpdatePlayerServicesReq{} *x = UpdatePlayerServicesReq{}
mi := &file_desc_rpc_player_proto_msgTypes[3] mi := &file_player_proto_msgTypes[3]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi) ms.StoreMessageInfo(mi)
} }
@@ -371,7 +371,7 @@ func (x *UpdatePlayerServicesReq) String() string {
func (*UpdatePlayerServicesReq) ProtoMessage() {} func (*UpdatePlayerServicesReq) ProtoMessage() {}
func (x *UpdatePlayerServicesReq) ProtoReflect() protoreflect.Message { func (x *UpdatePlayerServicesReq) ProtoReflect() protoreflect.Message {
mi := &file_desc_rpc_player_proto_msgTypes[3] mi := &file_player_proto_msgTypes[3]
if x != nil { if x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil { if ms.LoadMessageInfo() == nil {
@@ -384,7 +384,7 @@ func (x *UpdatePlayerServicesReq) ProtoReflect() protoreflect.Message {
// Deprecated: Use UpdatePlayerServicesReq.ProtoReflect.Descriptor instead. // Deprecated: Use UpdatePlayerServicesReq.ProtoReflect.Descriptor instead.
func (*UpdatePlayerServicesReq) Descriptor() ([]byte, []int) { func (*UpdatePlayerServicesReq) Descriptor() ([]byte, []int) {
return file_desc_rpc_player_proto_rawDescGZIP(), []int{3} return file_player_proto_rawDescGZIP(), []int{3}
} }
func (x *UpdatePlayerServicesReq) GetId() int64 { func (x *UpdatePlayerServicesReq) GetId() int64 {
@@ -486,7 +486,7 @@ type UpdatePlayerServicesResp struct {
func (x *UpdatePlayerServicesResp) Reset() { func (x *UpdatePlayerServicesResp) Reset() {
*x = UpdatePlayerServicesResp{} *x = UpdatePlayerServicesResp{}
mi := &file_desc_rpc_player_proto_msgTypes[4] mi := &file_player_proto_msgTypes[4]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi) ms.StoreMessageInfo(mi)
} }
@@ -498,7 +498,7 @@ func (x *UpdatePlayerServicesResp) String() string {
func (*UpdatePlayerServicesResp) ProtoMessage() {} func (*UpdatePlayerServicesResp) ProtoMessage() {}
func (x *UpdatePlayerServicesResp) ProtoReflect() protoreflect.Message { func (x *UpdatePlayerServicesResp) ProtoReflect() protoreflect.Message {
mi := &file_desc_rpc_player_proto_msgTypes[4] mi := &file_player_proto_msgTypes[4]
if x != nil { if x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil { if ms.LoadMessageInfo() == nil {
@@ -511,7 +511,7 @@ func (x *UpdatePlayerServicesResp) ProtoReflect() protoreflect.Message {
// Deprecated: Use UpdatePlayerServicesResp.ProtoReflect.Descriptor instead. // Deprecated: Use UpdatePlayerServicesResp.ProtoReflect.Descriptor instead.
func (*UpdatePlayerServicesResp) Descriptor() ([]byte, []int) { func (*UpdatePlayerServicesResp) Descriptor() ([]byte, []int) {
return file_desc_rpc_player_proto_rawDescGZIP(), []int{4} return file_player_proto_rawDescGZIP(), []int{4}
} }
type DelPlayerServicesReq struct { type DelPlayerServicesReq struct {
@@ -523,7 +523,7 @@ type DelPlayerServicesReq struct {
func (x *DelPlayerServicesReq) Reset() { func (x *DelPlayerServicesReq) Reset() {
*x = DelPlayerServicesReq{} *x = DelPlayerServicesReq{}
mi := &file_desc_rpc_player_proto_msgTypes[5] mi := &file_player_proto_msgTypes[5]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi) ms.StoreMessageInfo(mi)
} }
@@ -535,7 +535,7 @@ func (x *DelPlayerServicesReq) String() string {
func (*DelPlayerServicesReq) ProtoMessage() {} func (*DelPlayerServicesReq) ProtoMessage() {}
func (x *DelPlayerServicesReq) ProtoReflect() protoreflect.Message { func (x *DelPlayerServicesReq) ProtoReflect() protoreflect.Message {
mi := &file_desc_rpc_player_proto_msgTypes[5] mi := &file_player_proto_msgTypes[5]
if x != nil { if x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil { if ms.LoadMessageInfo() == nil {
@@ -548,7 +548,7 @@ func (x *DelPlayerServicesReq) ProtoReflect() protoreflect.Message {
// Deprecated: Use DelPlayerServicesReq.ProtoReflect.Descriptor instead. // Deprecated: Use DelPlayerServicesReq.ProtoReflect.Descriptor instead.
func (*DelPlayerServicesReq) Descriptor() ([]byte, []int) { func (*DelPlayerServicesReq) Descriptor() ([]byte, []int) {
return file_desc_rpc_player_proto_rawDescGZIP(), []int{5} return file_player_proto_rawDescGZIP(), []int{5}
} }
func (x *DelPlayerServicesReq) GetId() int64 { func (x *DelPlayerServicesReq) GetId() int64 {
@@ -566,7 +566,7 @@ type DelPlayerServicesResp struct {
func (x *DelPlayerServicesResp) Reset() { func (x *DelPlayerServicesResp) Reset() {
*x = DelPlayerServicesResp{} *x = DelPlayerServicesResp{}
mi := &file_desc_rpc_player_proto_msgTypes[6] mi := &file_player_proto_msgTypes[6]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi) ms.StoreMessageInfo(mi)
} }
@@ -578,7 +578,7 @@ func (x *DelPlayerServicesResp) String() string {
func (*DelPlayerServicesResp) ProtoMessage() {} func (*DelPlayerServicesResp) ProtoMessage() {}
func (x *DelPlayerServicesResp) ProtoReflect() protoreflect.Message { func (x *DelPlayerServicesResp) ProtoReflect() protoreflect.Message {
mi := &file_desc_rpc_player_proto_msgTypes[6] mi := &file_player_proto_msgTypes[6]
if x != nil { if x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil { if ms.LoadMessageInfo() == nil {
@@ -591,7 +591,7 @@ func (x *DelPlayerServicesResp) ProtoReflect() protoreflect.Message {
// Deprecated: Use DelPlayerServicesResp.ProtoReflect.Descriptor instead. // Deprecated: Use DelPlayerServicesResp.ProtoReflect.Descriptor instead.
func (*DelPlayerServicesResp) Descriptor() ([]byte, []int) { func (*DelPlayerServicesResp) Descriptor() ([]byte, []int) {
return file_desc_rpc_player_proto_rawDescGZIP(), []int{6} return file_player_proto_rawDescGZIP(), []int{6}
} }
type GetPlayerServicesByIdReq struct { type GetPlayerServicesByIdReq struct {
@@ -603,7 +603,7 @@ type GetPlayerServicesByIdReq struct {
func (x *GetPlayerServicesByIdReq) Reset() { func (x *GetPlayerServicesByIdReq) Reset() {
*x = GetPlayerServicesByIdReq{} *x = GetPlayerServicesByIdReq{}
mi := &file_desc_rpc_player_proto_msgTypes[7] mi := &file_player_proto_msgTypes[7]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi) ms.StoreMessageInfo(mi)
} }
@@ -615,7 +615,7 @@ func (x *GetPlayerServicesByIdReq) String() string {
func (*GetPlayerServicesByIdReq) ProtoMessage() {} func (*GetPlayerServicesByIdReq) ProtoMessage() {}
func (x *GetPlayerServicesByIdReq) ProtoReflect() protoreflect.Message { func (x *GetPlayerServicesByIdReq) ProtoReflect() protoreflect.Message {
mi := &file_desc_rpc_player_proto_msgTypes[7] mi := &file_player_proto_msgTypes[7]
if x != nil { if x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil { if ms.LoadMessageInfo() == nil {
@@ -628,7 +628,7 @@ func (x *GetPlayerServicesByIdReq) ProtoReflect() protoreflect.Message {
// Deprecated: Use GetPlayerServicesByIdReq.ProtoReflect.Descriptor instead. // Deprecated: Use GetPlayerServicesByIdReq.ProtoReflect.Descriptor instead.
func (*GetPlayerServicesByIdReq) Descriptor() ([]byte, []int) { func (*GetPlayerServicesByIdReq) Descriptor() ([]byte, []int) {
return file_desc_rpc_player_proto_rawDescGZIP(), []int{7} return file_player_proto_rawDescGZIP(), []int{7}
} }
func (x *GetPlayerServicesByIdReq) GetId() int64 { func (x *GetPlayerServicesByIdReq) GetId() int64 {
@@ -647,7 +647,7 @@ type GetPlayerServicesByIdResp struct {
func (x *GetPlayerServicesByIdResp) Reset() { func (x *GetPlayerServicesByIdResp) Reset() {
*x = GetPlayerServicesByIdResp{} *x = GetPlayerServicesByIdResp{}
mi := &file_desc_rpc_player_proto_msgTypes[8] mi := &file_player_proto_msgTypes[8]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi) ms.StoreMessageInfo(mi)
} }
@@ -659,7 +659,7 @@ func (x *GetPlayerServicesByIdResp) String() string {
func (*GetPlayerServicesByIdResp) ProtoMessage() {} func (*GetPlayerServicesByIdResp) ProtoMessage() {}
func (x *GetPlayerServicesByIdResp) ProtoReflect() protoreflect.Message { func (x *GetPlayerServicesByIdResp) ProtoReflect() protoreflect.Message {
mi := &file_desc_rpc_player_proto_msgTypes[8] mi := &file_player_proto_msgTypes[8]
if x != nil { if x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil { if ms.LoadMessageInfo() == nil {
@@ -672,7 +672,7 @@ func (x *GetPlayerServicesByIdResp) ProtoReflect() protoreflect.Message {
// Deprecated: Use GetPlayerServicesByIdResp.ProtoReflect.Descriptor instead. // Deprecated: Use GetPlayerServicesByIdResp.ProtoReflect.Descriptor instead.
func (*GetPlayerServicesByIdResp) Descriptor() ([]byte, []int) { func (*GetPlayerServicesByIdResp) Descriptor() ([]byte, []int) {
return file_desc_rpc_player_proto_rawDescGZIP(), []int{8} return file_player_proto_rawDescGZIP(), []int{8}
} }
func (x *GetPlayerServicesByIdResp) GetPlayerServices() *PlayerServices { func (x *GetPlayerServicesByIdResp) GetPlayerServices() *PlayerServices {
@@ -684,7 +684,7 @@ func (x *GetPlayerServicesByIdResp) GetPlayerServices() *PlayerServices {
type SearchPlayerServicesReq struct { type SearchPlayerServicesReq struct {
state protoimpl.MessageState `protogen:"open.v1"` state protoimpl.MessageState `protogen:"open.v1"`
Page int64 `protobuf:"varint,1,opt,name=page,proto3" json:"page,omitempty"` //page Offset int64 `protobuf:"varint,1,opt,name=offset,proto3" json:"offset,omitempty"` //offset
Limit int64 `protobuf:"varint,2,opt,name=limit,proto3" json:"limit,omitempty"` //limit Limit int64 `protobuf:"varint,2,opt,name=limit,proto3" json:"limit,omitempty"` //limit
Id int64 `protobuf:"varint,3,opt,name=id,proto3" json:"id,omitempty"` //id Id int64 `protobuf:"varint,3,opt,name=id,proto3" json:"id,omitempty"` //id
PlayerId int64 `protobuf:"varint,4,opt,name=playerId,proto3" json:"playerId,omitempty"` //playerId PlayerId int64 `protobuf:"varint,4,opt,name=playerId,proto3" json:"playerId,omitempty"` //playerId
@@ -705,7 +705,7 @@ type SearchPlayerServicesReq struct {
func (x *SearchPlayerServicesReq) Reset() { func (x *SearchPlayerServicesReq) Reset() {
*x = SearchPlayerServicesReq{} *x = SearchPlayerServicesReq{}
mi := &file_desc_rpc_player_proto_msgTypes[9] mi := &file_player_proto_msgTypes[9]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi) ms.StoreMessageInfo(mi)
} }
@@ -717,7 +717,7 @@ func (x *SearchPlayerServicesReq) String() string {
func (*SearchPlayerServicesReq) ProtoMessage() {} func (*SearchPlayerServicesReq) ProtoMessage() {}
func (x *SearchPlayerServicesReq) ProtoReflect() protoreflect.Message { func (x *SearchPlayerServicesReq) ProtoReflect() protoreflect.Message {
mi := &file_desc_rpc_player_proto_msgTypes[9] mi := &file_player_proto_msgTypes[9]
if x != nil { if x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil { if ms.LoadMessageInfo() == nil {
@@ -730,12 +730,12 @@ func (x *SearchPlayerServicesReq) ProtoReflect() protoreflect.Message {
// Deprecated: Use SearchPlayerServicesReq.ProtoReflect.Descriptor instead. // Deprecated: Use SearchPlayerServicesReq.ProtoReflect.Descriptor instead.
func (*SearchPlayerServicesReq) Descriptor() ([]byte, []int) { func (*SearchPlayerServicesReq) Descriptor() ([]byte, []int) {
return file_desc_rpc_player_proto_rawDescGZIP(), []int{9} return file_player_proto_rawDescGZIP(), []int{9}
} }
func (x *SearchPlayerServicesReq) GetPage() int64 { func (x *SearchPlayerServicesReq) GetOffset() int64 {
if x != nil { if x != nil {
return x.Page return x.Offset
} }
return 0 return 0
} }
@@ -847,7 +847,7 @@ type SearchPlayerServicesResp struct {
func (x *SearchPlayerServicesResp) Reset() { func (x *SearchPlayerServicesResp) Reset() {
*x = SearchPlayerServicesResp{} *x = SearchPlayerServicesResp{}
mi := &file_desc_rpc_player_proto_msgTypes[10] mi := &file_player_proto_msgTypes[10]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi) ms.StoreMessageInfo(mi)
} }
@@ -859,7 +859,7 @@ func (x *SearchPlayerServicesResp) String() string {
func (*SearchPlayerServicesResp) ProtoMessage() {} func (*SearchPlayerServicesResp) ProtoMessage() {}
func (x *SearchPlayerServicesResp) ProtoReflect() protoreflect.Message { func (x *SearchPlayerServicesResp) ProtoReflect() protoreflect.Message {
mi := &file_desc_rpc_player_proto_msgTypes[10] mi := &file_player_proto_msgTypes[10]
if x != nil { if x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil { if ms.LoadMessageInfo() == nil {
@@ -872,7 +872,7 @@ func (x *SearchPlayerServicesResp) ProtoReflect() protoreflect.Message {
// Deprecated: Use SearchPlayerServicesResp.ProtoReflect.Descriptor instead. // Deprecated: Use SearchPlayerServicesResp.ProtoReflect.Descriptor instead.
func (*SearchPlayerServicesResp) Descriptor() ([]byte, []int) { func (*SearchPlayerServicesResp) Descriptor() ([]byte, []int) {
return file_desc_rpc_player_proto_rawDescGZIP(), []int{10} return file_player_proto_rawDescGZIP(), []int{10}
} }
func (x *SearchPlayerServicesResp) GetPlayerServices() []*PlayerServices { func (x *SearchPlayerServicesResp) GetPlayerServices() []*PlayerServices {
@@ -903,7 +903,7 @@ type Players struct {
func (x *Players) Reset() { func (x *Players) Reset() {
*x = Players{} *x = Players{}
mi := &file_desc_rpc_player_proto_msgTypes[11] mi := &file_player_proto_msgTypes[11]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi) ms.StoreMessageInfo(mi)
} }
@@ -915,7 +915,7 @@ func (x *Players) String() string {
func (*Players) ProtoMessage() {} func (*Players) ProtoMessage() {}
func (x *Players) ProtoReflect() protoreflect.Message { func (x *Players) ProtoReflect() protoreflect.Message {
mi := &file_desc_rpc_player_proto_msgTypes[11] mi := &file_player_proto_msgTypes[11]
if x != nil { if x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil { if ms.LoadMessageInfo() == nil {
@@ -928,7 +928,7 @@ func (x *Players) ProtoReflect() protoreflect.Message {
// Deprecated: Use Players.ProtoReflect.Descriptor instead. // Deprecated: Use Players.ProtoReflect.Descriptor instead.
func (*Players) Descriptor() ([]byte, []int) { func (*Players) Descriptor() ([]byte, []int) {
return file_desc_rpc_player_proto_rawDescGZIP(), []int{11} return file_player_proto_rawDescGZIP(), []int{11}
} }
func (x *Players) GetId() int64 { func (x *Players) GetId() int64 {
@@ -1034,7 +1034,7 @@ type AddPlayersReq struct {
func (x *AddPlayersReq) Reset() { func (x *AddPlayersReq) Reset() {
*x = AddPlayersReq{} *x = AddPlayersReq{}
mi := &file_desc_rpc_player_proto_msgTypes[12] mi := &file_player_proto_msgTypes[12]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi) ms.StoreMessageInfo(mi)
} }
@@ -1046,7 +1046,7 @@ func (x *AddPlayersReq) String() string {
func (*AddPlayersReq) ProtoMessage() {} func (*AddPlayersReq) ProtoMessage() {}
func (x *AddPlayersReq) ProtoReflect() protoreflect.Message { func (x *AddPlayersReq) ProtoReflect() protoreflect.Message {
mi := &file_desc_rpc_player_proto_msgTypes[12] mi := &file_player_proto_msgTypes[12]
if x != nil { if x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil { if ms.LoadMessageInfo() == nil {
@@ -1059,7 +1059,7 @@ func (x *AddPlayersReq) ProtoReflect() protoreflect.Message {
// Deprecated: Use AddPlayersReq.ProtoReflect.Descriptor instead. // Deprecated: Use AddPlayersReq.ProtoReflect.Descriptor instead.
func (*AddPlayersReq) Descriptor() ([]byte, []int) { func (*AddPlayersReq) Descriptor() ([]byte, []int) {
return file_desc_rpc_player_proto_rawDescGZIP(), []int{12} return file_player_proto_rawDescGZIP(), []int{12}
} }
func (x *AddPlayersReq) GetUserId() int64 { func (x *AddPlayersReq) GetUserId() int64 {
@@ -1147,7 +1147,7 @@ type AddPlayersResp struct {
func (x *AddPlayersResp) Reset() { func (x *AddPlayersResp) Reset() {
*x = AddPlayersResp{} *x = AddPlayersResp{}
mi := &file_desc_rpc_player_proto_msgTypes[13] mi := &file_player_proto_msgTypes[13]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi) ms.StoreMessageInfo(mi)
} }
@@ -1159,7 +1159,7 @@ func (x *AddPlayersResp) String() string {
func (*AddPlayersResp) ProtoMessage() {} func (*AddPlayersResp) ProtoMessage() {}
func (x *AddPlayersResp) ProtoReflect() protoreflect.Message { func (x *AddPlayersResp) ProtoReflect() protoreflect.Message {
mi := &file_desc_rpc_player_proto_msgTypes[13] mi := &file_player_proto_msgTypes[13]
if x != nil { if x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil { if ms.LoadMessageInfo() == nil {
@@ -1172,7 +1172,7 @@ func (x *AddPlayersResp) ProtoReflect() protoreflect.Message {
// Deprecated: Use AddPlayersResp.ProtoReflect.Descriptor instead. // Deprecated: Use AddPlayersResp.ProtoReflect.Descriptor instead.
func (*AddPlayersResp) Descriptor() ([]byte, []int) { func (*AddPlayersResp) Descriptor() ([]byte, []int) {
return file_desc_rpc_player_proto_rawDescGZIP(), []int{13} return file_player_proto_rawDescGZIP(), []int{13}
} }
type UpdatePlayersReq struct { type UpdatePlayersReq struct {
@@ -1195,7 +1195,7 @@ type UpdatePlayersReq struct {
func (x *UpdatePlayersReq) Reset() { func (x *UpdatePlayersReq) Reset() {
*x = UpdatePlayersReq{} *x = UpdatePlayersReq{}
mi := &file_desc_rpc_player_proto_msgTypes[14] mi := &file_player_proto_msgTypes[14]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi) ms.StoreMessageInfo(mi)
} }
@@ -1207,7 +1207,7 @@ func (x *UpdatePlayersReq) String() string {
func (*UpdatePlayersReq) ProtoMessage() {} func (*UpdatePlayersReq) ProtoMessage() {}
func (x *UpdatePlayersReq) ProtoReflect() protoreflect.Message { func (x *UpdatePlayersReq) ProtoReflect() protoreflect.Message {
mi := &file_desc_rpc_player_proto_msgTypes[14] mi := &file_player_proto_msgTypes[14]
if x != nil { if x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil { if ms.LoadMessageInfo() == nil {
@@ -1220,7 +1220,7 @@ func (x *UpdatePlayersReq) ProtoReflect() protoreflect.Message {
// Deprecated: Use UpdatePlayersReq.ProtoReflect.Descriptor instead. // Deprecated: Use UpdatePlayersReq.ProtoReflect.Descriptor instead.
func (*UpdatePlayersReq) Descriptor() ([]byte, []int) { func (*UpdatePlayersReq) Descriptor() ([]byte, []int) {
return file_desc_rpc_player_proto_rawDescGZIP(), []int{14} return file_player_proto_rawDescGZIP(), []int{14}
} }
func (x *UpdatePlayersReq) GetId() int64 { func (x *UpdatePlayersReq) GetId() int64 {
@@ -1315,7 +1315,7 @@ type UpdatePlayersResp struct {
func (x *UpdatePlayersResp) Reset() { func (x *UpdatePlayersResp) Reset() {
*x = UpdatePlayersResp{} *x = UpdatePlayersResp{}
mi := &file_desc_rpc_player_proto_msgTypes[15] mi := &file_player_proto_msgTypes[15]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi) ms.StoreMessageInfo(mi)
} }
@@ -1327,7 +1327,7 @@ func (x *UpdatePlayersResp) String() string {
func (*UpdatePlayersResp) ProtoMessage() {} func (*UpdatePlayersResp) ProtoMessage() {}
func (x *UpdatePlayersResp) ProtoReflect() protoreflect.Message { func (x *UpdatePlayersResp) ProtoReflect() protoreflect.Message {
mi := &file_desc_rpc_player_proto_msgTypes[15] mi := &file_player_proto_msgTypes[15]
if x != nil { if x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil { if ms.LoadMessageInfo() == nil {
@@ -1340,7 +1340,7 @@ func (x *UpdatePlayersResp) ProtoReflect() protoreflect.Message {
// Deprecated: Use UpdatePlayersResp.ProtoReflect.Descriptor instead. // Deprecated: Use UpdatePlayersResp.ProtoReflect.Descriptor instead.
func (*UpdatePlayersResp) Descriptor() ([]byte, []int) { func (*UpdatePlayersResp) Descriptor() ([]byte, []int) {
return file_desc_rpc_player_proto_rawDescGZIP(), []int{15} return file_player_proto_rawDescGZIP(), []int{15}
} }
type DelPlayersReq struct { type DelPlayersReq struct {
@@ -1352,7 +1352,7 @@ type DelPlayersReq struct {
func (x *DelPlayersReq) Reset() { func (x *DelPlayersReq) Reset() {
*x = DelPlayersReq{} *x = DelPlayersReq{}
mi := &file_desc_rpc_player_proto_msgTypes[16] mi := &file_player_proto_msgTypes[16]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi) ms.StoreMessageInfo(mi)
} }
@@ -1364,7 +1364,7 @@ func (x *DelPlayersReq) String() string {
func (*DelPlayersReq) ProtoMessage() {} func (*DelPlayersReq) ProtoMessage() {}
func (x *DelPlayersReq) ProtoReflect() protoreflect.Message { func (x *DelPlayersReq) ProtoReflect() protoreflect.Message {
mi := &file_desc_rpc_player_proto_msgTypes[16] mi := &file_player_proto_msgTypes[16]
if x != nil { if x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil { if ms.LoadMessageInfo() == nil {
@@ -1377,7 +1377,7 @@ func (x *DelPlayersReq) ProtoReflect() protoreflect.Message {
// Deprecated: Use DelPlayersReq.ProtoReflect.Descriptor instead. // Deprecated: Use DelPlayersReq.ProtoReflect.Descriptor instead.
func (*DelPlayersReq) Descriptor() ([]byte, []int) { func (*DelPlayersReq) Descriptor() ([]byte, []int) {
return file_desc_rpc_player_proto_rawDescGZIP(), []int{16} return file_player_proto_rawDescGZIP(), []int{16}
} }
func (x *DelPlayersReq) GetId() int64 { func (x *DelPlayersReq) GetId() int64 {
@@ -1395,7 +1395,7 @@ type DelPlayersResp struct {
func (x *DelPlayersResp) Reset() { func (x *DelPlayersResp) Reset() {
*x = DelPlayersResp{} *x = DelPlayersResp{}
mi := &file_desc_rpc_player_proto_msgTypes[17] mi := &file_player_proto_msgTypes[17]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi) ms.StoreMessageInfo(mi)
} }
@@ -1407,7 +1407,7 @@ func (x *DelPlayersResp) String() string {
func (*DelPlayersResp) ProtoMessage() {} func (*DelPlayersResp) ProtoMessage() {}
func (x *DelPlayersResp) ProtoReflect() protoreflect.Message { func (x *DelPlayersResp) ProtoReflect() protoreflect.Message {
mi := &file_desc_rpc_player_proto_msgTypes[17] mi := &file_player_proto_msgTypes[17]
if x != nil { if x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil { if ms.LoadMessageInfo() == nil {
@@ -1420,7 +1420,7 @@ func (x *DelPlayersResp) ProtoReflect() protoreflect.Message {
// Deprecated: Use DelPlayersResp.ProtoReflect.Descriptor instead. // Deprecated: Use DelPlayersResp.ProtoReflect.Descriptor instead.
func (*DelPlayersResp) Descriptor() ([]byte, []int) { func (*DelPlayersResp) Descriptor() ([]byte, []int) {
return file_desc_rpc_player_proto_rawDescGZIP(), []int{17} return file_player_proto_rawDescGZIP(), []int{17}
} }
type GetPlayersByIdReq struct { type GetPlayersByIdReq struct {
@@ -1432,7 +1432,7 @@ type GetPlayersByIdReq struct {
func (x *GetPlayersByIdReq) Reset() { func (x *GetPlayersByIdReq) Reset() {
*x = GetPlayersByIdReq{} *x = GetPlayersByIdReq{}
mi := &file_desc_rpc_player_proto_msgTypes[18] mi := &file_player_proto_msgTypes[18]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi) ms.StoreMessageInfo(mi)
} }
@@ -1444,7 +1444,7 @@ func (x *GetPlayersByIdReq) String() string {
func (*GetPlayersByIdReq) ProtoMessage() {} func (*GetPlayersByIdReq) ProtoMessage() {}
func (x *GetPlayersByIdReq) ProtoReflect() protoreflect.Message { func (x *GetPlayersByIdReq) ProtoReflect() protoreflect.Message {
mi := &file_desc_rpc_player_proto_msgTypes[18] mi := &file_player_proto_msgTypes[18]
if x != nil { if x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil { if ms.LoadMessageInfo() == nil {
@@ -1457,7 +1457,7 @@ func (x *GetPlayersByIdReq) ProtoReflect() protoreflect.Message {
// Deprecated: Use GetPlayersByIdReq.ProtoReflect.Descriptor instead. // Deprecated: Use GetPlayersByIdReq.ProtoReflect.Descriptor instead.
func (*GetPlayersByIdReq) Descriptor() ([]byte, []int) { func (*GetPlayersByIdReq) Descriptor() ([]byte, []int) {
return file_desc_rpc_player_proto_rawDescGZIP(), []int{18} return file_player_proto_rawDescGZIP(), []int{18}
} }
func (x *GetPlayersByIdReq) GetId() int64 { func (x *GetPlayersByIdReq) GetId() int64 {
@@ -1476,7 +1476,7 @@ type GetPlayersByIdResp struct {
func (x *GetPlayersByIdResp) Reset() { func (x *GetPlayersByIdResp) Reset() {
*x = GetPlayersByIdResp{} *x = GetPlayersByIdResp{}
mi := &file_desc_rpc_player_proto_msgTypes[19] mi := &file_player_proto_msgTypes[19]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi) ms.StoreMessageInfo(mi)
} }
@@ -1488,7 +1488,7 @@ func (x *GetPlayersByIdResp) String() string {
func (*GetPlayersByIdResp) ProtoMessage() {} func (*GetPlayersByIdResp) ProtoMessage() {}
func (x *GetPlayersByIdResp) ProtoReflect() protoreflect.Message { func (x *GetPlayersByIdResp) ProtoReflect() protoreflect.Message {
mi := &file_desc_rpc_player_proto_msgTypes[19] mi := &file_player_proto_msgTypes[19]
if x != nil { if x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil { if ms.LoadMessageInfo() == nil {
@@ -1501,7 +1501,7 @@ func (x *GetPlayersByIdResp) ProtoReflect() protoreflect.Message {
// Deprecated: Use GetPlayersByIdResp.ProtoReflect.Descriptor instead. // Deprecated: Use GetPlayersByIdResp.ProtoReflect.Descriptor instead.
func (*GetPlayersByIdResp) Descriptor() ([]byte, []int) { func (*GetPlayersByIdResp) Descriptor() ([]byte, []int) {
return file_desc_rpc_player_proto_rawDescGZIP(), []int{19} return file_player_proto_rawDescGZIP(), []int{19}
} }
func (x *GetPlayersByIdResp) GetPlayers() *Players { func (x *GetPlayersByIdResp) GetPlayers() *Players {
@@ -1513,7 +1513,7 @@ func (x *GetPlayersByIdResp) GetPlayers() *Players {
type SearchPlayersReq struct { type SearchPlayersReq struct {
state protoimpl.MessageState `protogen:"open.v1"` state protoimpl.MessageState `protogen:"open.v1"`
Page *int64 `protobuf:"varint,1,opt,name=page,proto3,oneof" json:"page,omitempty"` //page Offset *int64 `protobuf:"varint,1,opt,name=offset,proto3,oneof" json:"offset,omitempty"` //offset
Limit *int64 `protobuf:"varint,2,opt,name=limit,proto3,oneof" json:"limit,omitempty"` //limit Limit *int64 `protobuf:"varint,2,opt,name=limit,proto3,oneof" json:"limit,omitempty"` //limit
Id *int64 `protobuf:"varint,3,opt,name=id,proto3,oneof" json:"id,omitempty"` //id Id *int64 `protobuf:"varint,3,opt,name=id,proto3,oneof" json:"id,omitempty"` //id
UserId *int64 `protobuf:"varint,4,opt,name=userId,proto3,oneof" json:"userId,omitempty"` //userId UserId *int64 `protobuf:"varint,4,opt,name=userId,proto3,oneof" json:"userId,omitempty"` //userId
@@ -1533,7 +1533,7 @@ type SearchPlayersReq struct {
func (x *SearchPlayersReq) Reset() { func (x *SearchPlayersReq) Reset() {
*x = SearchPlayersReq{} *x = SearchPlayersReq{}
mi := &file_desc_rpc_player_proto_msgTypes[20] mi := &file_player_proto_msgTypes[20]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi) ms.StoreMessageInfo(mi)
} }
@@ -1545,7 +1545,7 @@ func (x *SearchPlayersReq) String() string {
func (*SearchPlayersReq) ProtoMessage() {} func (*SearchPlayersReq) ProtoMessage() {}
func (x *SearchPlayersReq) ProtoReflect() protoreflect.Message { func (x *SearchPlayersReq) ProtoReflect() protoreflect.Message {
mi := &file_desc_rpc_player_proto_msgTypes[20] mi := &file_player_proto_msgTypes[20]
if x != nil { if x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil { if ms.LoadMessageInfo() == nil {
@@ -1558,12 +1558,12 @@ func (x *SearchPlayersReq) ProtoReflect() protoreflect.Message {
// Deprecated: Use SearchPlayersReq.ProtoReflect.Descriptor instead. // Deprecated: Use SearchPlayersReq.ProtoReflect.Descriptor instead.
func (*SearchPlayersReq) Descriptor() ([]byte, []int) { func (*SearchPlayersReq) Descriptor() ([]byte, []int) {
return file_desc_rpc_player_proto_rawDescGZIP(), []int{20} return file_player_proto_rawDescGZIP(), []int{20}
} }
func (x *SearchPlayersReq) GetPage() int64 { func (x *SearchPlayersReq) GetOffset() int64 {
if x != nil && x.Page != nil { if x != nil && x.Offset != nil {
return *x.Page return *x.Offset
} }
return 0 return 0
} }
@@ -1668,7 +1668,7 @@ type SearchPlayersResp struct {
func (x *SearchPlayersResp) Reset() { func (x *SearchPlayersResp) Reset() {
*x = SearchPlayersResp{} *x = SearchPlayersResp{}
mi := &file_desc_rpc_player_proto_msgTypes[21] mi := &file_player_proto_msgTypes[21]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi) ms.StoreMessageInfo(mi)
} }
@@ -1680,7 +1680,7 @@ func (x *SearchPlayersResp) String() string {
func (*SearchPlayersResp) ProtoMessage() {} func (*SearchPlayersResp) ProtoMessage() {}
func (x *SearchPlayersResp) ProtoReflect() protoreflect.Message { func (x *SearchPlayersResp) ProtoReflect() protoreflect.Message {
mi := &file_desc_rpc_player_proto_msgTypes[21] mi := &file_player_proto_msgTypes[21]
if x != nil { if x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil { if ms.LoadMessageInfo() == nil {
@@ -1693,7 +1693,7 @@ func (x *SearchPlayersResp) ProtoReflect() protoreflect.Message {
// Deprecated: Use SearchPlayersResp.ProtoReflect.Descriptor instead. // Deprecated: Use SearchPlayersResp.ProtoReflect.Descriptor instead.
func (*SearchPlayersResp) Descriptor() ([]byte, []int) { func (*SearchPlayersResp) Descriptor() ([]byte, []int) {
return file_desc_rpc_player_proto_rawDescGZIP(), []int{21} return file_player_proto_rawDescGZIP(), []int{21}
} }
func (x *SearchPlayersResp) GetPlayers() []*Players { func (x *SearchPlayersResp) GetPlayers() []*Players {
@@ -1703,11 +1703,11 @@ func (x *SearchPlayersResp) GetPlayers() []*Players {
return nil return nil
} }
var File_desc_rpc_player_proto protoreflect.FileDescriptor var File_player_proto protoreflect.FileDescriptor
const file_desc_rpc_player_proto_rawDesc = "" + const file_player_proto_rawDesc = "" +
"\n" + "\n" +
"\x15desc/rpc/player.proto\x12\x02pb\"\xe8\x02\n" + "\fplayer.proto\x12\x02pb\"\xe8\x02\n" +
"\x0ePlayerServices\x12\x0e\n" + "\x0ePlayerServices\x12\x0e\n" +
"\x02id\x18\x01 \x01(\x03R\x02id\x12\x1a\n" + "\x02id\x18\x01 \x01(\x03R\x02id\x12\x1a\n" +
"\bplayerId\x18\x02 \x01(\x03R\bplayerId\x12\x16\n" + "\bplayerId\x18\x02 \x01(\x03R\bplayerId\x12\x16\n" +
@@ -1776,9 +1776,9 @@ const file_desc_rpc_player_proto_rawDesc = "" +
"\x18GetPlayerServicesByIdReq\x12\x0e\n" + "\x18GetPlayerServicesByIdReq\x12\x0e\n" +
"\x02id\x18\x01 \x01(\x03R\x02id\"W\n" + "\x02id\x18\x01 \x01(\x03R\x02id\"W\n" +
"\x19GetPlayerServicesByIdResp\x12:\n" + "\x19GetPlayerServicesByIdResp\x12:\n" +
"\x0eplayerServices\x18\x01 \x01(\v2\x12.pb.PlayerServicesR\x0eplayerServices\"\x9b\x03\n" + "\x0eplayerServices\x18\x01 \x01(\v2\x12.pb.PlayerServicesR\x0eplayerServices\"\x9f\x03\n" +
"\x17SearchPlayerServicesReq\x12\x12\n" + "\x17SearchPlayerServicesReq\x12\x16\n" +
"\x04page\x18\x01 \x01(\x03R\x04page\x12\x14\n" + "\x06offset\x18\x01 \x01(\x03R\x06offset\x12\x14\n" +
"\x05limit\x18\x02 \x01(\x03R\x05limit\x12\x0e\n" + "\x05limit\x18\x02 \x01(\x03R\x05limit\x12\x0e\n" +
"\x02id\x18\x03 \x01(\x03R\x02id\x12\x1a\n" + "\x02id\x18\x03 \x01(\x03R\x02id\x12\x1a\n" +
"\bplayerId\x18\x04 \x01(\x03R\bplayerId\x12\x16\n" + "\bplayerId\x18\x04 \x01(\x03R\bplayerId\x12\x16\n" +
@@ -1856,9 +1856,9 @@ const file_desc_rpc_player_proto_rawDesc = "" +
"\x11GetPlayersByIdReq\x12\x0e\n" + "\x11GetPlayersByIdReq\x12\x0e\n" +
"\x02id\x18\x01 \x01(\x03R\x02id\";\n" + "\x02id\x18\x01 \x01(\x03R\x02id\";\n" +
"\x12GetPlayersByIdResp\x12%\n" + "\x12GetPlayersByIdResp\x12%\n" +
"\aplayers\x18\x01 \x01(\v2\v.pb.PlayersR\aplayers\"\xc3\x04\n" + "\aplayers\x18\x01 \x01(\v2\v.pb.PlayersR\aplayers\"\xc9\x04\n" +
"\x10SearchPlayersReq\x12\x17\n" + "\x10SearchPlayersReq\x12\x1b\n" +
"\x04page\x18\x01 \x01(\x03H\x00R\x04page\x88\x01\x01\x12\x19\n" + "\x06offset\x18\x01 \x01(\x03H\x00R\x06offset\x88\x01\x01\x12\x19\n" +
"\x05limit\x18\x02 \x01(\x03H\x01R\x05limit\x88\x01\x01\x12\x13\n" + "\x05limit\x18\x02 \x01(\x03H\x01R\x05limit\x88\x01\x01\x12\x13\n" +
"\x02id\x18\x03 \x01(\x03H\x02R\x02id\x88\x01\x01\x12\x1b\n" + "\x02id\x18\x03 \x01(\x03H\x02R\x02id\x88\x01\x01\x12\x1b\n" +
"\x06userId\x18\x04 \x01(\x03H\x03R\x06userId\x88\x01\x01\x12\x1b\n" + "\x06userId\x18\x04 \x01(\x03H\x03R\x06userId\x88\x01\x01\x12\x1b\n" +
@@ -1873,8 +1873,8 @@ const file_desc_rpc_player_proto_rawDesc = "" +
"\tcreatedAt\x18\f \x01(\x03H\tR\tcreatedAt\x88\x01\x01\x12!\n" + "\tcreatedAt\x18\f \x01(\x03H\tR\tcreatedAt\x88\x01\x01\x12!\n" +
"\tupdatedAt\x18\r \x01(\x03H\n" + "\tupdatedAt\x18\r \x01(\x03H\n" +
"R\tupdatedAt\x88\x01\x01\x12\x1b\n" + "R\tupdatedAt\x88\x01\x01\x12\x1b\n" +
"\x06gender\x18\x0e \x01(\x03H\vR\x06gender\x88\x01\x01B\a\n" + "\x06gender\x18\x0e \x01(\x03H\vR\x06gender\x88\x01\x01B\t\n" +
"\x05_pageB\b\n" + "\a_offsetB\b\n" +
"\x06_limitB\x05\n" + "\x06_limitB\x05\n" +
"\x03_idB\t\n" + "\x03_idB\t\n" +
"\a_userIdB\t\n" + "\a_userIdB\t\n" +
@@ -1906,19 +1906,19 @@ const file_desc_rpc_player_proto_rawDesc = "" +
"\rSearchPlayers\x12\x14.pb.SearchPlayersReq\x1a\x15.pb.SearchPlayersRespB\x06Z\x04./pbb\x06proto3" "\rSearchPlayers\x12\x14.pb.SearchPlayersReq\x1a\x15.pb.SearchPlayersRespB\x06Z\x04./pbb\x06proto3"
var ( var (
file_desc_rpc_player_proto_rawDescOnce sync.Once file_player_proto_rawDescOnce sync.Once
file_desc_rpc_player_proto_rawDescData []byte file_player_proto_rawDescData []byte
) )
func file_desc_rpc_player_proto_rawDescGZIP() []byte { func file_player_proto_rawDescGZIP() []byte {
file_desc_rpc_player_proto_rawDescOnce.Do(func() { file_player_proto_rawDescOnce.Do(func() {
file_desc_rpc_player_proto_rawDescData = protoimpl.X.CompressGZIP(unsafe.Slice(unsafe.StringData(file_desc_rpc_player_proto_rawDesc), len(file_desc_rpc_player_proto_rawDesc))) file_player_proto_rawDescData = protoimpl.X.CompressGZIP(unsafe.Slice(unsafe.StringData(file_player_proto_rawDesc), len(file_player_proto_rawDesc)))
}) })
return file_desc_rpc_player_proto_rawDescData return file_player_proto_rawDescData
} }
var file_desc_rpc_player_proto_msgTypes = make([]protoimpl.MessageInfo, 22) var file_player_proto_msgTypes = make([]protoimpl.MessageInfo, 22)
var file_desc_rpc_player_proto_goTypes = []any{ var file_player_proto_goTypes = []any{
(*PlayerServices)(nil), // 0: pb.PlayerServices (*PlayerServices)(nil), // 0: pb.PlayerServices
(*AddPlayerServicesReq)(nil), // 1: pb.AddPlayerServicesReq (*AddPlayerServicesReq)(nil), // 1: pb.AddPlayerServicesReq
(*AddPlayerServicesResp)(nil), // 2: pb.AddPlayerServicesResp (*AddPlayerServicesResp)(nil), // 2: pb.AddPlayerServicesResp
@@ -1942,7 +1942,7 @@ var file_desc_rpc_player_proto_goTypes = []any{
(*SearchPlayersReq)(nil), // 20: pb.SearchPlayersReq (*SearchPlayersReq)(nil), // 20: pb.SearchPlayersReq
(*SearchPlayersResp)(nil), // 21: pb.SearchPlayersResp (*SearchPlayersResp)(nil), // 21: pb.SearchPlayersResp
} }
var file_desc_rpc_player_proto_depIdxs = []int32{ var file_player_proto_depIdxs = []int32{
0, // 0: pb.AddPlayerServicesResp.playerServices:type_name -> pb.PlayerServices 0, // 0: pb.AddPlayerServicesResp.playerServices:type_name -> pb.PlayerServices
0, // 1: pb.GetPlayerServicesByIdResp.playerServices:type_name -> pb.PlayerServices 0, // 1: pb.GetPlayerServicesByIdResp.playerServices:type_name -> pb.PlayerServices
0, // 2: pb.SearchPlayerServicesResp.playerServices:type_name -> pb.PlayerServices 0, // 2: pb.SearchPlayerServicesResp.playerServices:type_name -> pb.PlayerServices
@@ -1977,29 +1977,29 @@ var file_desc_rpc_player_proto_depIdxs = []int32{
0, // [0:5] is the sub-list for field type_name 0, // [0:5] is the sub-list for field type_name
} }
func init() { file_desc_rpc_player_proto_init() } func init() { file_player_proto_init() }
func file_desc_rpc_player_proto_init() { func file_player_proto_init() {
if File_desc_rpc_player_proto != nil { if File_player_proto != nil {
return return
} }
file_desc_rpc_player_proto_msgTypes[3].OneofWrappers = []any{} file_player_proto_msgTypes[3].OneofWrappers = []any{}
file_desc_rpc_player_proto_msgTypes[14].OneofWrappers = []any{} file_player_proto_msgTypes[14].OneofWrappers = []any{}
file_desc_rpc_player_proto_msgTypes[20].OneofWrappers = []any{} file_player_proto_msgTypes[20].OneofWrappers = []any{}
type x struct{} type x struct{}
out := protoimpl.TypeBuilder{ out := protoimpl.TypeBuilder{
File: protoimpl.DescBuilder{ File: protoimpl.DescBuilder{
GoPackagePath: reflect.TypeOf(x{}).PkgPath(), GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
RawDescriptor: unsafe.Slice(unsafe.StringData(file_desc_rpc_player_proto_rawDesc), len(file_desc_rpc_player_proto_rawDesc)), RawDescriptor: unsafe.Slice(unsafe.StringData(file_player_proto_rawDesc), len(file_player_proto_rawDesc)),
NumEnums: 0, NumEnums: 0,
NumMessages: 22, NumMessages: 22,
NumExtensions: 0, NumExtensions: 0,
NumServices: 1, NumServices: 1,
}, },
GoTypes: file_desc_rpc_player_proto_goTypes, GoTypes: file_player_proto_goTypes,
DependencyIndexes: file_desc_rpc_player_proto_depIdxs, DependencyIndexes: file_player_proto_depIdxs,
MessageInfos: file_desc_rpc_player_proto_msgTypes, MessageInfos: file_player_proto_msgTypes,
}.Build() }.Build()
File_desc_rpc_player_proto = out.File File_player_proto = out.File
file_desc_rpc_player_proto_goTypes = nil file_player_proto_goTypes = nil
file_desc_rpc_player_proto_depIdxs = nil file_player_proto_depIdxs = nil
} }
+1 -1
View File
@@ -51,7 +51,7 @@ func toShopProfile(in *pb.Shops) *types.ShopProfile {
func getShopByOwnerID(ctx context.Context, rpc shopservice.ShopService, ownerID int64) (*pb.Shops, error) { func getShopByOwnerID(ctx context.Context, rpc shopservice.ShopService, ownerID int64) (*pb.Shops, error) {
list, err := rpc.SearchShops(ctx, &pb.SearchShopsReq{ list, err := rpc.SearchShops(ctx, &pb.SearchShopsReq{
Page: 0, Offset: 0,
Limit: 1, Limit: 1,
OwnerId: ownerID, OwnerId: ownerID,
}) })
@@ -35,7 +35,7 @@ func (l *ListShopsLogic) ListShops(req *types.PageReq) (resp *types.ShopListResp
} }
result, err := l.svcCtx.ShopRpc.SearchShops(l.ctx, &pb.SearchShopsReq{ result, err := l.svcCtx.ShopRpc.SearchShops(l.ctx, &pb.SearchShopsReq{
Page: req.Offset / req.Limit, Offset: req.Offset,
Limit: req.Limit, Limit: req.Limit,
}) })
if err != nil { if err != nil {
@@ -63,7 +63,7 @@ func (l *SearchShopInvitationsLogic) SearchShopInvitations(in *pb.SearchShopInvi
} }
list, err := query. list, err := query.
Offset(int(in.Page * in.Limit)). Offset(int(in.Offset)).
Limit(int(in.Limit)). Limit(int(in.Limit)).
All(l.ctx) All(l.ctx)
if err != nil { if err != nil {
@@ -57,7 +57,7 @@ func (l *SearchShopPlayersLogic) SearchShopPlayers(in *pb.SearchShopPlayersReq)
} }
list, err := query. list, err := query.
Offset(int(in.Page * in.Limit)). Offset(int(in.Offset)).
Limit(int(in.Limit)). Limit(int(in.Limit)).
All(l.ctx) All(l.ctx)
if err != nil { if err != nil {
@@ -96,7 +96,7 @@ func (l *SearchShopsLogic) SearchShops(in *pb.SearchShopsReq) (*pb.SearchShopsRe
} }
list, err := query. list, err := query.
Offset(int(in.Page * in.Limit)). Offset(int(in.Offset)).
Limit(int(in.Limit)). Limit(int(in.Limit)).
All(l.ctx) All(l.ctx)
if err != nil { if err != nil {
+19 -19
View File
@@ -1,7 +1,7 @@
// Code generated by protoc-gen-go. DO NOT EDIT. // Code generated by protoc-gen-go. DO NOT EDIT.
// versions: // versions:
// protoc-gen-go v1.36.11 // protoc-gen-go v1.36.11
// protoc v3.19.4 // protoc v7.34.1
// source: shop.proto // source: shop.proto
package pb package pb
@@ -540,7 +540,7 @@ func (x *GetShopInvitationsByIdResp) GetShopInvitations() *ShopInvitations {
type SearchShopInvitationsReq struct { type SearchShopInvitationsReq struct {
state protoimpl.MessageState `protogen:"open.v1"` state protoimpl.MessageState `protogen:"open.v1"`
Page int64 `protobuf:"varint,1,opt,name=page,proto3" json:"page,omitempty"` //page Offset int64 `protobuf:"varint,1,opt,name=offset,proto3" json:"offset,omitempty"` //offset
Limit int64 `protobuf:"varint,2,opt,name=limit,proto3" json:"limit,omitempty"` //limit Limit int64 `protobuf:"varint,2,opt,name=limit,proto3" json:"limit,omitempty"` //limit
Id int64 `protobuf:"varint,3,opt,name=id,proto3" json:"id,omitempty"` //id Id int64 `protobuf:"varint,3,opt,name=id,proto3" json:"id,omitempty"` //id
ShopId int64 `protobuf:"varint,4,opt,name=shopId,proto3" json:"shopId,omitempty"` //shopId ShopId int64 `protobuf:"varint,4,opt,name=shopId,proto3" json:"shopId,omitempty"` //shopId
@@ -583,9 +583,9 @@ func (*SearchShopInvitationsReq) Descriptor() ([]byte, []int) {
return file_shop_proto_rawDescGZIP(), []int{9} return file_shop_proto_rawDescGZIP(), []int{9}
} }
func (x *SearchShopInvitationsReq) GetPage() int64 { func (x *SearchShopInvitationsReq) GetOffset() int64 {
if x != nil { if x != nil {
return x.Page return x.Offset
} }
return 0 return 0
} }
@@ -1177,7 +1177,7 @@ func (x *GetShopPlayersByIdResp) GetShopPlayers() *ShopPlayers {
type SearchShopPlayersReq struct { type SearchShopPlayersReq struct {
state protoimpl.MessageState `protogen:"open.v1"` state protoimpl.MessageState `protogen:"open.v1"`
Page int64 `protobuf:"varint,1,opt,name=page,proto3" json:"page,omitempty"` //page Offset int64 `protobuf:"varint,1,opt,name=offset,proto3" json:"offset,omitempty"` //offset
Limit int64 `protobuf:"varint,2,opt,name=limit,proto3" json:"limit,omitempty"` //limit Limit int64 `protobuf:"varint,2,opt,name=limit,proto3" json:"limit,omitempty"` //limit
ShopId int64 `protobuf:"varint,3,opt,name=shopId,proto3" json:"shopId,omitempty"` //shopId ShopId int64 `protobuf:"varint,3,opt,name=shopId,proto3" json:"shopId,omitempty"` //shopId
PlayerId int64 `protobuf:"varint,4,opt,name=playerId,proto3" json:"playerId,omitempty"` //playerId PlayerId int64 `protobuf:"varint,4,opt,name=playerId,proto3" json:"playerId,omitempty"` //playerId
@@ -1218,9 +1218,9 @@ func (*SearchShopPlayersReq) Descriptor() ([]byte, []int) {
return file_shop_proto_rawDescGZIP(), []int{20} return file_shop_proto_rawDescGZIP(), []int{20}
} }
func (x *SearchShopPlayersReq) GetPage() int64 { func (x *SearchShopPlayersReq) GetOffset() int64 {
if x != nil { if x != nil {
return x.Page return x.Offset
} }
return 0 return 0
} }
@@ -2062,7 +2062,7 @@ func (x *GetShopsByIdResp) GetShops() *Shops {
type SearchShopsReq struct { type SearchShopsReq struct {
state protoimpl.MessageState `protogen:"open.v1"` state protoimpl.MessageState `protogen:"open.v1"`
Page int64 `protobuf:"varint,1,opt,name=page,proto3" json:"page,omitempty"` //page Offset int64 `protobuf:"varint,1,opt,name=offset,proto3" json:"offset,omitempty"` //offset
Limit int64 `protobuf:"varint,2,opt,name=limit,proto3" json:"limit,omitempty"` //limit Limit int64 `protobuf:"varint,2,opt,name=limit,proto3" json:"limit,omitempty"` //limit
Id int64 `protobuf:"varint,3,opt,name=id,proto3" json:"id,omitempty"` //id Id int64 `protobuf:"varint,3,opt,name=id,proto3" json:"id,omitempty"` //id
OwnerId int64 `protobuf:"varint,4,opt,name=ownerId,proto3" json:"ownerId,omitempty"` //ownerId OwnerId int64 `protobuf:"varint,4,opt,name=ownerId,proto3" json:"ownerId,omitempty"` //ownerId
@@ -2115,9 +2115,9 @@ func (*SearchShopsReq) Descriptor() ([]byte, []int) {
return file_shop_proto_rawDescGZIP(), []int{31} return file_shop_proto_rawDescGZIP(), []int{31}
} }
func (x *SearchShopsReq) GetPage() int64 { func (x *SearchShopsReq) GetOffset() int64 {
if x != nil { if x != nil {
return x.Page return x.Offset
} }
return 0 return 0
} }
@@ -2330,9 +2330,9 @@ const file_shop_proto_rawDesc = "" +
"\x19GetShopInvitationsByIdReq\x12\x0e\n" + "\x19GetShopInvitationsByIdReq\x12\x0e\n" +
"\x02id\x18\x01 \x01(\x03R\x02id\"[\n" + "\x02id\x18\x01 \x01(\x03R\x02id\"[\n" +
"\x1aGetShopInvitationsByIdResp\x12=\n" + "\x1aGetShopInvitationsByIdResp\x12=\n" +
"\x0fshopInvitations\x18\x01 \x01(\v2\x13.pb.ShopInvitationsR\x0fshopInvitations\"\xfe\x01\n" + "\x0fshopInvitations\x18\x01 \x01(\v2\x13.pb.ShopInvitationsR\x0fshopInvitations\"\x82\x02\n" +
"\x18SearchShopInvitationsReq\x12\x12\n" + "\x18SearchShopInvitationsReq\x12\x16\n" +
"\x04page\x18\x01 \x01(\x03R\x04page\x12\x14\n" + "\x06offset\x18\x01 \x01(\x03R\x06offset\x12\x14\n" +
"\x05limit\x18\x02 \x01(\x03R\x05limit\x12\x0e\n" + "\x05limit\x18\x02 \x01(\x03R\x05limit\x12\x0e\n" +
"\x02id\x18\x03 \x01(\x03R\x02id\x12\x16\n" + "\x02id\x18\x03 \x01(\x03R\x02id\x12\x16\n" +
"\x06shopId\x18\x04 \x01(\x03R\x06shopId\x12\x1a\n" + "\x06shopId\x18\x04 \x01(\x03R\x06shopId\x12\x1a\n" +
@@ -2371,9 +2371,9 @@ const file_shop_proto_rawDesc = "" +
"\x06shopId\x18\x01 \x01(\x03R\x06shopId\x12\x1a\n" + "\x06shopId\x18\x01 \x01(\x03R\x06shopId\x12\x1a\n" +
"\bplayerId\x18\x02 \x01(\x03R\bplayerId\"K\n" + "\bplayerId\x18\x02 \x01(\x03R\bplayerId\"K\n" +
"\x16GetShopPlayersByIdResp\x121\n" + "\x16GetShopPlayersByIdResp\x121\n" +
"\vshopPlayers\x18\x01 \x01(\v2\x0f.pb.ShopPlayersR\vshopPlayers\"\xc6\x01\n" + "\vshopPlayers\x18\x01 \x01(\v2\x0f.pb.ShopPlayersR\vshopPlayers\"\xca\x01\n" +
"\x14SearchShopPlayersReq\x12\x12\n" + "\x14SearchShopPlayersReq\x12\x16\n" +
"\x04page\x18\x01 \x01(\x03R\x04page\x12\x14\n" + "\x06offset\x18\x01 \x01(\x03R\x06offset\x12\x14\n" +
"\x05limit\x18\x02 \x01(\x03R\x05limit\x12\x16\n" + "\x05limit\x18\x02 \x01(\x03R\x05limit\x12\x16\n" +
"\x06shopId\x18\x03 \x01(\x03R\x06shopId\x12\x1a\n" + "\x06shopId\x18\x03 \x01(\x03R\x06shopId\x12\x1a\n" +
"\bplayerId\x18\x04 \x01(\x03R\bplayerId\x12\x1c\n" + "\bplayerId\x18\x04 \x01(\x03R\bplayerId\x12\x1c\n" +
@@ -2446,9 +2446,9 @@ const file_shop_proto_rawDesc = "" +
"\x0fGetShopsByIdReq\x12\x0e\n" + "\x0fGetShopsByIdReq\x12\x0e\n" +
"\x02id\x18\x01 \x01(\x03R\x02id\"3\n" + "\x02id\x18\x01 \x01(\x03R\x02id\"3\n" +
"\x10GetShopsByIdResp\x12\x1f\n" + "\x10GetShopsByIdResp\x12\x1f\n" +
"\x05shops\x18\x01 \x01(\v2\t.pb.ShopsR\x05shops\"\xee\x04\n" + "\x05shops\x18\x01 \x01(\v2\t.pb.ShopsR\x05shops\"\xf2\x04\n" +
"\x0eSearchShopsReq\x12\x12\n" + "\x0eSearchShopsReq\x12\x16\n" +
"\x04page\x18\x01 \x01(\x03R\x04page\x12\x14\n" + "\x06offset\x18\x01 \x01(\x03R\x06offset\x12\x14\n" +
"\x05limit\x18\x02 \x01(\x03R\x05limit\x12\x0e\n" + "\x05limit\x18\x02 \x01(\x03R\x05limit\x12\x0e\n" +
"\x02id\x18\x03 \x01(\x03R\x02id\x12\x18\n" + "\x02id\x18\x03 \x01(\x03R\x02id\x12\x18\n" +
"\aownerId\x18\x04 \x01(\x03R\aownerId\x12\x12\n" + "\aownerId\x18\x04 \x01(\x03R\aownerId\x12\x12\n" +
@@ -44,7 +44,7 @@ func (l *SearchUserVerificationsLogic) SearchUserVerifications(in *pb.SearchUser
} }
verifications, err := l.svcCtx.UserVeriModelRO.Query().Where(predicates...). verifications, err := l.svcCtx.UserVeriModelRO.Query().Where(predicates...).
Offset(int(in.Page * in.Limit)). Offset(int(in.Offset)).
Limit(int(in.Limit)). Limit(int(in.Limit)).
All(l.ctx) All(l.ctx)
if err != nil { if err != nil {
@@ -1,7 +1,7 @@
// Code generated by protoc-gen-go. DO NOT EDIT. // Code generated by protoc-gen-go. DO NOT EDIT.
// versions: // versions:
// protoc-gen-go v1.36.11 // protoc-gen-go v1.36.11
// protoc v5.29.6 // protoc v7.34.1
// source: user_verifications.proto // source: user_verifications.proto
package pb package pb
@@ -604,7 +604,7 @@ func (x *GetUserVerificationsByIdResp) GetUserVerifications() *UserVerifications
type SearchUserVerificationsReq struct { type SearchUserVerificationsReq struct {
state protoimpl.MessageState `protogen:"open.v1"` state protoimpl.MessageState `protogen:"open.v1"`
Page int64 `protobuf:"varint,1,opt,name=page,proto3" json:"page,omitempty"` //page Offset int64 `protobuf:"varint,1,opt,name=offset,proto3" json:"offset,omitempty"` //offset
Limit int64 `protobuf:"varint,2,opt,name=limit,proto3" json:"limit,omitempty"` //limit Limit int64 `protobuf:"varint,2,opt,name=limit,proto3" json:"limit,omitempty"` //limit
Id int64 `protobuf:"varint,3,opt,name=id,proto3" json:"id,omitempty"` //id Id int64 `protobuf:"varint,3,opt,name=id,proto3" json:"id,omitempty"` //id
UserId int64 `protobuf:"varint,4,opt,name=userId,proto3" json:"userId,omitempty"` //userId UserId int64 `protobuf:"varint,4,opt,name=userId,proto3" json:"userId,omitempty"` //userId
@@ -650,9 +650,9 @@ func (*SearchUserVerificationsReq) Descriptor() ([]byte, []int) {
return file_user_verifications_proto_rawDescGZIP(), []int{9} return file_user_verifications_proto_rawDescGZIP(), []int{9}
} }
func (x *SearchUserVerificationsReq) GetPage() int64 { func (x *SearchUserVerificationsReq) GetOffset() int64 {
if x != nil { if x != nil {
return x.Page return x.Offset
} }
return 0 return 0
} }
@@ -1035,9 +1035,9 @@ const file_user_verifications_proto_rawDesc = "" +
"\x1bGetUserVerificationsByIdReq\x12\x0e\n" + "\x1bGetUserVerificationsByIdReq\x12\x0e\n" +
"\x02id\x18\x01 \x01(\x03R\x02id\"c\n" + "\x02id\x18\x01 \x01(\x03R\x02id\"c\n" +
"\x1cGetUserVerificationsByIdResp\x12C\n" + "\x1cGetUserVerificationsByIdResp\x12C\n" +
"\x11userVerifications\x18\x01 \x01(\v2\x15.pb.UserVerificationsR\x11userVerifications\"\xd8\x02\n" + "\x11userVerifications\x18\x01 \x01(\v2\x15.pb.UserVerificationsR\x11userVerifications\"\xdc\x02\n" +
"\x1aSearchUserVerificationsReq\x12\x12\n" + "\x1aSearchUserVerificationsReq\x12\x16\n" +
"\x04page\x18\x01 \x01(\x03R\x04page\x12\x14\n" + "\x06offset\x18\x01 \x01(\x03R\x06offset\x12\x14\n" +
"\x05limit\x18\x02 \x01(\x03R\x05limit\x12\x0e\n" + "\x05limit\x18\x02 \x01(\x03R\x05limit\x12\x0e\n" +
"\x02id\x18\x03 \x01(\x03R\x02id\x12\x16\n" + "\x02id\x18\x03 \x01(\x03R\x02id\x12\x16\n" +
"\x06userId\x18\x04 \x01(\x03R\x06userId\x12\x12\n" + "\x06userId\x18\x04 \x01(\x03R\x06userId\x12\x12\n" +
@@ -45,7 +45,7 @@ func (l *GetVerificationsLogic) GetVerifications(req *types.GetPendingListReq) (
limit = 20 limit = 20
} }
verifications, err := l.svcCtx.UserVerificationsRpc.SearchUserVerifications(l.ctx, &pb.SearchUserVerificationsReq{ verifications, err := l.svcCtx.UserVerificationsRpc.SearchUserVerifications(l.ctx, &pb.SearchUserVerificationsReq{
Page: offset / limit, Offset: offset,
Limit: limit, Limit: limit,
Role: req.Role, Role: req.Role,
Status: req.Status, Status: req.Status,
@@ -30,9 +30,9 @@ func NewSearchUsersLogic(ctx context.Context, svcCtx *svc.ServiceContext) *Searc
var SearUsersErr = errors.New("search users failed") var SearUsersErr = errors.New("search users failed")
func (l *SearchUsersLogic) SearchUsers(in *pb.SearchUsersReq) (out *pb.SearchUsersResp, err error) { func (l *SearchUsersLogic) SearchUsers(in *pb.SearchUsersReq) (out *pb.SearchUsersResp, err error) {
if in.Page == nil || *in.Page < 0 { if in.Offset == nil || *in.Offset < 0 {
logx.Errorf("Invalid page number: %v", in.Page) logx.Errorf("invalid offset: %v", in.Offset)
return nil, errors.New("invalid page number") return nil, errors.New("invalid offset")
} }
if *in.Limit > 1000 { if *in.Limit > 1000 {
logx.Errorf("Limit exceeds max limit: %d", in.Limit) logx.Errorf("Limit exceeds max limit: %d", in.Limit)
@@ -45,7 +45,7 @@ func (l *SearchUsersLogic) SearchUsers(in *pb.SearchUsersReq) (out *pb.SearchUse
users.EmailContainsFold(*in.Username), users.EmailContainsFold(*in.Username),
users.CurrentRole(*in.CurrentRole), users.CurrentRole(*in.CurrentRole),
)). )).
Offset(int(*in.Page * *in.Limit)). Offset(int(*in.Offset)).
Limit(int(*in.Limit)). Limit(int(*in.Limit)).
All(l.ctx) All(l.ctx)
if err != nil { if err != nil {
+22 -22
View File
@@ -1,7 +1,7 @@
// Code generated by protoc-gen-go. DO NOT EDIT. // Code generated by protoc-gen-go. DO NOT EDIT.
// versions: // versions:
// protoc-gen-go v1.36.11 // protoc-gen-go v1.36.11
// protoc v5.29.6 // protoc v7.34.1
// source: users.proto // source: users.proto
package pb package pb
@@ -725,7 +725,7 @@ func (x *GetUsersByIdResp) GetUsers() *Users {
type SearchUsersReq struct { type SearchUsersReq struct {
state protoimpl.MessageState `protogen:"open.v1"` state protoimpl.MessageState `protogen:"open.v1"`
Page *int64 `protobuf:"varint,1,opt,name=page,proto3,oneof" json:"page,omitempty"` //page Offset *int64 `protobuf:"varint,1,opt,name=offset,proto3,oneof" json:"offset,omitempty"` //offset
Limit *int64 `protobuf:"varint,2,opt,name=limit,proto3,oneof" json:"limit,omitempty"` //limit Limit *int64 `protobuf:"varint,2,opt,name=limit,proto3,oneof" json:"limit,omitempty"` //limit
Id *int64 `protobuf:"varint,3,opt,name=id,proto3,oneof" json:"id,omitempty"` //id Id *int64 `protobuf:"varint,3,opt,name=id,proto3,oneof" json:"id,omitempty"` //id
Username *string `protobuf:"bytes,4,opt,name=username,proto3,oneof" json:"username,omitempty"` //username Username *string `protobuf:"bytes,4,opt,name=username,proto3,oneof" json:"username,omitempty"` //username
@@ -776,9 +776,9 @@ func (*SearchUsersReq) Descriptor() ([]byte, []int) {
return file_users_proto_rawDescGZIP(), []int{9} return file_users_proto_rawDescGZIP(), []int{9}
} }
func (x *SearchUsersReq) GetPage() int64 { func (x *SearchUsersReq) GetOffset() int64 {
if x != nil && x.Page != nil { if x != nil && x.Offset != nil {
return *x.Page return *x.Offset
} }
return 0 return 0
} }
@@ -2234,7 +2234,7 @@ func (x *GetUserFollowsByIdResp) GetUserFollows() *UserFollows {
type SearchUserFollowsReq struct { type SearchUserFollowsReq struct {
state protoimpl.MessageState `protogen:"open.v1"` state protoimpl.MessageState `protogen:"open.v1"`
Page int64 `protobuf:"varint,1,opt,name=page,proto3" json:"page,omitempty"` //page Offset int64 `protobuf:"varint,1,opt,name=offset,proto3" json:"offset,omitempty"` //offset
Limit int64 `protobuf:"varint,2,opt,name=limit,proto3" json:"limit,omitempty"` //limit Limit int64 `protobuf:"varint,2,opt,name=limit,proto3" json:"limit,omitempty"` //limit
Id int64 `protobuf:"varint,3,opt,name=id,proto3" json:"id,omitempty"` //id Id int64 `protobuf:"varint,3,opt,name=id,proto3" json:"id,omitempty"` //id
FollowerId int64 `protobuf:"varint,4,opt,name=followerId,proto3" json:"followerId,omitempty"` //followerId FollowerId int64 `protobuf:"varint,4,opt,name=followerId,proto3" json:"followerId,omitempty"` //followerId
@@ -2274,9 +2274,9 @@ func (*SearchUserFollowsReq) Descriptor() ([]byte, []int) {
return file_users_proto_rawDescGZIP(), []int{36} return file_users_proto_rawDescGZIP(), []int{36}
} }
func (x *SearchUserFollowsReq) GetPage() int64 { func (x *SearchUserFollowsReq) GetOffset() int64 {
if x != nil { if x != nil {
return x.Page return x.Offset
} }
return 0 return 0
} }
@@ -2879,7 +2879,7 @@ func (x *GetUserPreferencesByIdResp) GetUserPreferences() *UserPreferences {
type SearchUserPreferencesReq struct { type SearchUserPreferencesReq struct {
state protoimpl.MessageState `protogen:"open.v1"` state protoimpl.MessageState `protogen:"open.v1"`
Page int64 `protobuf:"varint,1,opt,name=page,proto3" json:"page,omitempty"` //page Offset int64 `protobuf:"varint,1,opt,name=offset,proto3" json:"offset,omitempty"` //offset
Limit int64 `protobuf:"varint,2,opt,name=limit,proto3" json:"limit,omitempty"` //limit Limit int64 `protobuf:"varint,2,opt,name=limit,proto3" json:"limit,omitempty"` //limit
UserId int64 `protobuf:"varint,3,opt,name=userId,proto3" json:"userId,omitempty"` //userId UserId int64 `protobuf:"varint,3,opt,name=userId,proto3" json:"userId,omitempty"` //userId
NotificationOrder bool `protobuf:"varint,4,opt,name=notificationOrder,proto3" json:"notificationOrder,omitempty"` //notificationOrder NotificationOrder bool `protobuf:"varint,4,opt,name=notificationOrder,proto3" json:"notificationOrder,omitempty"` //notificationOrder
@@ -2922,9 +2922,9 @@ func (*SearchUserPreferencesReq) Descriptor() ([]byte, []int) {
return file_users_proto_rawDescGZIP(), []int{47} return file_users_proto_rawDescGZIP(), []int{47}
} }
func (x *SearchUserPreferencesReq) GetPage() int64 { func (x *SearchUserPreferencesReq) GetOffset() int64 {
if x != nil { if x != nil {
return x.Page return x.Offset
} }
return 0 return 0
} }
@@ -3110,9 +3110,9 @@ const file_users_proto_rawDesc = "" +
"\x0fGetUsersByIdReq\x12\x0e\n" + "\x0fGetUsersByIdReq\x12\x0e\n" +
"\x02id\x18\x01 \x01(\x03R\x02id\"3\n" + "\x02id\x18\x01 \x01(\x03R\x02id\"3\n" +
"\x10GetUsersByIdResp\x12\x1f\n" + "\x10GetUsersByIdResp\x12\x1f\n" +
"\x05users\x18\x01 \x01(\v2\t.pb.UsersR\x05users\"\x81\x06\n" + "\x05users\x18\x01 \x01(\v2\t.pb.UsersR\x05users\"\x87\x06\n" +
"\x0eSearchUsersReq\x12\x17\n" + "\x0eSearchUsersReq\x12\x1b\n" +
"\x04page\x18\x01 \x01(\x03H\x00R\x04page\x88\x01\x01\x12\x19\n" + "\x06offset\x18\x01 \x01(\x03H\x00R\x06offset\x88\x01\x01\x12\x19\n" +
"\x05limit\x18\x02 \x01(\x03H\x01R\x05limit\x88\x01\x01\x12\x13\n" + "\x05limit\x18\x02 \x01(\x03H\x01R\x05limit\x88\x01\x01\x12\x13\n" +
"\x02id\x18\x03 \x01(\x03H\x02R\x02id\x88\x01\x01\x12\x1f\n" + "\x02id\x18\x03 \x01(\x03H\x02R\x02id\x88\x01\x01\x12\x1f\n" +
"\busername\x18\x04 \x01(\tH\x03R\busername\x88\x01\x01\x12'\n" + "\busername\x18\x04 \x01(\tH\x03R\busername\x88\x01\x01\x12'\n" +
@@ -3130,8 +3130,8 @@ const file_users_proto_rawDesc = "" +
"\aisAdmin\x18\x0e \x01(\bH\fR\aisAdmin\x88\x01\x01\x12!\n" + "\aisAdmin\x18\x0e \x01(\bH\fR\aisAdmin\x88\x01\x01\x12!\n" +
"\tcreatedAt\x18\x0f \x01(\x03H\rR\tcreatedAt\x88\x01\x01\x12!\n" + "\tcreatedAt\x18\x0f \x01(\x03H\rR\tcreatedAt\x88\x01\x01\x12!\n" +
"\tupdatedAt\x18\x10 \x01(\x03H\x0eR\tupdatedAt\x88\x01\x01\x12!\n" + "\tupdatedAt\x18\x10 \x01(\x03H\x0eR\tupdatedAt\x88\x01\x01\x12!\n" +
"\tdeletedAt\x18\x11 \x01(\x03H\x0fR\tdeletedAt\x88\x01\x01B\a\n" + "\tdeletedAt\x18\x11 \x01(\x03H\x0fR\tdeletedAt\x88\x01\x01B\t\n" +
"\x05_pageB\b\n" + "\a_offsetB\b\n" +
"\x06_limitB\x05\n" + "\x06_limitB\x05\n" +
"\x03_idB\v\n" + "\x03_idB\v\n" +
"\t_usernameB\x0f\n" + "\t_usernameB\x0f\n" +
@@ -3239,9 +3239,9 @@ const file_users_proto_rawDesc = "" +
"\x15GetUserFollowsByIdReq\x12\x0e\n" + "\x15GetUserFollowsByIdReq\x12\x0e\n" +
"\x02id\x18\x01 \x01(\x03R\x02id\"K\n" + "\x02id\x18\x01 \x01(\x03R\x02id\"K\n" +
"\x16GetUserFollowsByIdResp\x121\n" + "\x16GetUserFollowsByIdResp\x121\n" +
"\vuserFollows\x18\x01 \x01(\v2\x0f.pb.UserFollowsR\vuserFollows\"\xae\x01\n" + "\vuserFollows\x18\x01 \x01(\v2\x0f.pb.UserFollowsR\vuserFollows\"\xb2\x01\n" +
"\x14SearchUserFollowsReq\x12\x12\n" + "\x14SearchUserFollowsReq\x12\x16\n" +
"\x04page\x18\x01 \x01(\x03R\x04page\x12\x14\n" + "\x06offset\x18\x01 \x01(\x03R\x06offset\x12\x14\n" +
"\x05limit\x18\x02 \x01(\x03R\x05limit\x12\x0e\n" + "\x05limit\x18\x02 \x01(\x03R\x05limit\x12\x0e\n" +
"\x02id\x18\x03 \x01(\x03R\x02id\x12\x1e\n" + "\x02id\x18\x03 \x01(\x03R\x02id\x12\x1e\n" +
"\n" + "\n" +
@@ -3285,9 +3285,9 @@ const file_users_proto_rawDesc = "" +
"\x19GetUserPreferencesByIdReq\x12\x0e\n" + "\x19GetUserPreferencesByIdReq\x12\x0e\n" +
"\x02id\x18\x01 \x01(\x03R\x02id\"[\n" + "\x02id\x18\x01 \x01(\x03R\x02id\"[\n" +
"\x1aGetUserPreferencesByIdResp\x12=\n" + "\x1aGetUserPreferencesByIdResp\x12=\n" +
"\x0fuserPreferences\x18\x01 \x01(\v2\x13.pb.UserPreferencesR\x0fuserPreferences\"\xc0\x02\n" + "\x0fuserPreferences\x18\x01 \x01(\v2\x13.pb.UserPreferencesR\x0fuserPreferences\"\xc4\x02\n" +
"\x18SearchUserPreferencesReq\x12\x12\n" + "\x18SearchUserPreferencesReq\x12\x16\n" +
"\x04page\x18\x01 \x01(\x03R\x04page\x12\x14\n" + "\x06offset\x18\x01 \x01(\x03R\x06offset\x12\x14\n" +
"\x05limit\x18\x02 \x01(\x03R\x05limit\x12\x16\n" + "\x05limit\x18\x02 \x01(\x03R\x05limit\x12\x16\n" +
"\x06userId\x18\x03 \x01(\x03R\x06userId\x12,\n" + "\x06userId\x18\x03 \x01(\x03R\x06userId\x12,\n" +
"\x11notificationOrder\x18\x04 \x01(\bR\x11notificationOrder\x124\n" + "\x11notificationOrder\x18\x04 \x01(\bR\x11notificationOrder\x124\n" +
@@ -43,7 +43,7 @@ func (l *ListTransactionsLogic) ListTransactions(req *types.PageReq) (resp *type
} }
out, err := l.svcCtx.WalletRpc.SearchWalletTransactions(l.ctx, &pb.SearchWalletTransactionsReq{ out, err := l.svcCtx.WalletRpc.SearchWalletTransactions(l.ctx, &pb.SearchWalletTransactionsReq{
Page: req.Offset / req.Limit, Offset: req.Offset,
Limit: req.Limit, Limit: req.Limit,
UserId: &userID, UserId: &userID,
}) })
@@ -75,7 +75,7 @@ func (l *SearchWalletTransactionsLogic) SearchWalletTransactions(in *pb.SearchWa
} }
list, err := query. list, err := query.
Offset(int(in.Page * in.Limit)). Offset(int(in.Offset)).
Limit(int(in.Limit)). Limit(int(in.Limit)).
All(l.ctx) All(l.ctx)
if err != nil { if err != nil {
+13 -13
View File
@@ -1,7 +1,7 @@
// Code generated by protoc-gen-go. DO NOT EDIT. // Code generated by protoc-gen-go. DO NOT EDIT.
// versions: // versions:
// protoc-gen-go v1.36.11 // protoc-gen-go v1.36.11
// protoc v5.29.6 // protoc v7.34.1
// source: wallet.proto // source: wallet.proto
package pb package pb
@@ -580,7 +580,7 @@ func (x *GetWalletTransactionsByIdResp) GetWalletTransactions() *WalletTransacti
type SearchWalletTransactionsReq struct { type SearchWalletTransactionsReq struct {
state protoimpl.MessageState `protogen:"open.v1"` state protoimpl.MessageState `protogen:"open.v1"`
Page int64 `protobuf:"varint,1,opt,name=page,proto3" json:"page,omitempty"` //page Offset int64 `protobuf:"varint,1,opt,name=offset,proto3" json:"offset,omitempty"` //offset
Limit int64 `protobuf:"varint,2,opt,name=limit,proto3" json:"limit,omitempty"` //limit Limit int64 `protobuf:"varint,2,opt,name=limit,proto3" json:"limit,omitempty"` //limit
Id int64 `protobuf:"varint,3,opt,name=id,proto3" json:"id,omitempty"` //id Id int64 `protobuf:"varint,3,opt,name=id,proto3" json:"id,omitempty"` //id
UserId *int64 `protobuf:"varint,4,opt,name=userId,proto3,oneof" json:"userId,omitempty"` //userId UserId *int64 `protobuf:"varint,4,opt,name=userId,proto3,oneof" json:"userId,omitempty"` //userId
@@ -625,9 +625,9 @@ func (*SearchWalletTransactionsReq) Descriptor() ([]byte, []int) {
return file_wallet_proto_rawDescGZIP(), []int{9} return file_wallet_proto_rawDescGZIP(), []int{9}
} }
func (x *SearchWalletTransactionsReq) GetPage() int64 { func (x *SearchWalletTransactionsReq) GetOffset() int64 {
if x != nil { if x != nil {
return x.Page return x.Offset
} }
return 0 return 0
} }
@@ -1209,7 +1209,7 @@ func (x *GetWalletsByIdResp) GetWallets() *Wallets {
type SearchWalletsReq struct { type SearchWalletsReq struct {
state protoimpl.MessageState `protogen:"open.v1"` state protoimpl.MessageState `protogen:"open.v1"`
Page int64 `protobuf:"varint,1,opt,name=page,proto3" json:"page,omitempty"` //page Offset int64 `protobuf:"varint,1,opt,name=offset,proto3" json:"offset,omitempty"` //offset
Limit int64 `protobuf:"varint,2,opt,name=limit,proto3" json:"limit,omitempty"` //limit Limit int64 `protobuf:"varint,2,opt,name=limit,proto3" json:"limit,omitempty"` //limit
UserId int64 `protobuf:"varint,3,opt,name=userId,proto3" json:"userId,omitempty"` //userId UserId int64 `protobuf:"varint,3,opt,name=userId,proto3" json:"userId,omitempty"` //userId
Balance *string `protobuf:"bytes,4,opt,name=balance,proto3,oneof" json:"balance,omitempty"` //balance Balance *string `protobuf:"bytes,4,opt,name=balance,proto3,oneof" json:"balance,omitempty"` //balance
@@ -1249,9 +1249,9 @@ func (*SearchWalletsReq) Descriptor() ([]byte, []int) {
return file_wallet_proto_rawDescGZIP(), []int{20} return file_wallet_proto_rawDescGZIP(), []int{20}
} }
func (x *SearchWalletsReq) GetPage() int64 { func (x *SearchWalletsReq) GetOffset() int64 {
if x != nil { if x != nil {
return x.Page return x.Offset
} }
return 0 return 0
} }
@@ -1393,9 +1393,9 @@ const file_wallet_proto_rawDesc = "" +
"\x1cGetWalletTransactionsByIdReq\x12\x0e\n" + "\x1cGetWalletTransactionsByIdReq\x12\x0e\n" +
"\x02id\x18\x01 \x01(\x03R\x02id\"g\n" + "\x02id\x18\x01 \x01(\x03R\x02id\"g\n" +
"\x1dGetWalletTransactionsByIdResp\x12F\n" + "\x1dGetWalletTransactionsByIdResp\x12F\n" +
"\x12walletTransactions\x18\x01 \x01(\v2\x16.pb.WalletTransactionsR\x12walletTransactions\"\xca\x03\n" + "\x12walletTransactions\x18\x01 \x01(\v2\x16.pb.WalletTransactionsR\x12walletTransactions\"\xce\x03\n" +
"\x1bSearchWalletTransactionsReq\x12\x12\n" + "\x1bSearchWalletTransactionsReq\x12\x16\n" +
"\x04page\x18\x01 \x01(\x03R\x04page\x12\x14\n" + "\x06offset\x18\x01 \x01(\x03R\x06offset\x12\x14\n" +
"\x05limit\x18\x02 \x01(\x03R\x05limit\x12\x0e\n" + "\x05limit\x18\x02 \x01(\x03R\x05limit\x12\x0e\n" +
"\x02id\x18\x03 \x01(\x03R\x02id\x12\x1b\n" + "\x02id\x18\x03 \x01(\x03R\x02id\x12\x1b\n" +
"\x06userId\x18\x04 \x01(\x03H\x00R\x06userId\x88\x01\x01\x12\x17\n" + "\x06userId\x18\x04 \x01(\x03H\x00R\x06userId\x88\x01\x01\x12\x17\n" +
@@ -1453,9 +1453,9 @@ const file_wallet_proto_rawDesc = "" +
"\x11GetWalletsByIdReq\x12\x0e\n" + "\x11GetWalletsByIdReq\x12\x0e\n" +
"\x02id\x18\x01 \x01(\x03R\x02id\";\n" + "\x02id\x18\x01 \x01(\x03R\x02id\";\n" +
"\x12GetWalletsByIdResp\x12%\n" + "\x12GetWalletsByIdResp\x12%\n" +
"\awallets\x18\x01 \x01(\v2\v.pb.WalletsR\awallets\"\xed\x01\n" + "\awallets\x18\x01 \x01(\v2\v.pb.WalletsR\awallets\"\xf1\x01\n" +
"\x10SearchWalletsReq\x12\x12\n" + "\x10SearchWalletsReq\x12\x16\n" +
"\x04page\x18\x01 \x01(\x03R\x04page\x12\x14\n" + "\x06offset\x18\x01 \x01(\x03R\x06offset\x12\x14\n" +
"\x05limit\x18\x02 \x01(\x03R\x05limit\x12\x16\n" + "\x05limit\x18\x02 \x01(\x03R\x05limit\x12\x16\n" +
"\x06userId\x18\x03 \x01(\x03R\x06userId\x12\x1d\n" + "\x06userId\x18\x03 \x01(\x03R\x06userId\x12\x1d\n" +
"\abalance\x18\x04 \x01(\tH\x00R\abalance\x88\x01\x01\x12)\n" + "\abalance\x18\x04 \x01(\tH\x00R\abalance\x88\x01\x01\x12)\n" +
+4 -4
View File
@@ -50,7 +50,7 @@ message GetCommentLikesByIdResp {
} }
message SearchCommentLikesReq { message SearchCommentLikesReq {
int64 page = 1; //page int64 offset = 1; //offset
int64 limit = 2; //limit int64 limit = 2; //limit
int64 commentId = 3; //commentId int64 commentId = 3; //commentId
int64 userId = 4; //userId int64 userId = 4; //userId
@@ -113,7 +113,7 @@ message GetCommentsByIdResp {
} }
message SearchCommentsReq { message SearchCommentsReq {
int64 page = 1; //page int64 offset = 1; //offset
int64 limit = 2; //limit int64 limit = 2; //limit
int64 id = 3; //id int64 id = 3; //id
int64 postId = 4; //postId int64 postId = 4; //postId
@@ -170,7 +170,7 @@ message GetPostLikesByIdResp {
} }
message SearchPostLikesReq { message SearchPostLikesReq {
int64 page = 1; //page int64 offset = 1; //offset
int64 limit = 2; //limit int64 limit = 2; //limit
optional int64 postId = 3; //postId optional int64 postId = 3; //postId
optional int64 userId = 4; //userId optional int64 userId = 4; //userId
@@ -260,7 +260,7 @@ message GetPostsByIdResp {
} }
message SearchPostsReq { message SearchPostsReq {
int64 page = 1; //page int64 offset = 1; //offset
int64 limit = 2; //limit int64 limit = 2; //limit
int64 id = 3; //id int64 id = 3; //id
optional int64 authorId = 4; //authorId optional int64 authorId = 4; //authorId
+1 -1
View File
@@ -64,7 +64,7 @@ message GetGamesByIdResp {
} }
message SearchGamesReq { message SearchGamesReq {
int64 page = 1; //page int64 offset = 1; //offset
int64 limit = 2; //limit int64 limit = 2; //limit
int64 id = 3; //id int64 id = 3; //id
optional string name = 4; //name optional string name = 4; //name
+2 -2
View File
@@ -92,7 +92,7 @@ message GetOrdersByIdResp {
} }
message SearchOrdersReq { message SearchOrdersReq {
int64 page = 1; //page int64 offset = 1; //offset
int64 limit = 2; //limit int64 limit = 2; //limit
optional int64 id = 3; //id optional int64 id = 3; //id
optional int64 consumerId = 4; //consumerId optional int64 consumerId = 4; //consumerId
@@ -176,7 +176,7 @@ message GetOrderStateLogsByIdResp {
} }
message SearchOrderStateLogsReq { message SearchOrderStateLogsReq {
int64 page = 1; //page int64 offset = 1; //offset
int64 limit = 2; //limit int64 limit = 2; //limit
optional int64 id = 3; //id optional int64 id = 3; //id
optional int64 orderId = 4; //orderId optional int64 orderId = 4; //orderId
+2 -2
View File
@@ -79,7 +79,7 @@ message GetPlayerServicesByIdResp {
} }
message SearchPlayerServicesReq { message SearchPlayerServicesReq {
int64 page = 1; //page int64 offset = 1; //offset
int64 limit = 2; //limit int64 limit = 2; //limit
int64 id = 3; //id int64 id = 3; //id
int64 playerId = 4; //playerId int64 playerId = 4; //playerId
@@ -167,7 +167,7 @@ message GetPlayersByIdResp {
} }
message SearchPlayersReq { message SearchPlayersReq {
optional int64 page = 1; //page optional int64 offset = 1; //offset
optional int64 limit = 2; //limit optional int64 limit = 2; //limit
optional int64 id = 3; //id optional int64 id = 3; //id
optional int64 userId = 4; //userId optional int64 userId = 4; //userId
+3 -3
View File
@@ -61,7 +61,7 @@ message GetShopInvitationsByIdResp {
} }
message SearchShopInvitationsReq { message SearchShopInvitationsReq {
int64 page = 1; //page int64 offset = 1; //offset
int64 limit = 2; //limit int64 limit = 2; //limit
int64 id = 3; //id int64 id = 3; //id
int64 shopId = 4; //shopId int64 shopId = 4; //shopId
@@ -125,7 +125,7 @@ message GetShopPlayersByIdResp {
} }
message SearchShopPlayersReq { message SearchShopPlayersReq {
int64 page = 1; //page int64 offset = 1; //offset
int64 limit = 2; //limit int64 limit = 2; //limit
int64 shopId = 3; //shopId int64 shopId = 3; //shopId
int64 playerId = 4; //playerId int64 playerId = 4; //playerId
@@ -220,7 +220,7 @@ message GetShopsByIdResp {
} }
message SearchShopsReq { message SearchShopsReq {
int64 page = 1; //page int64 offset = 1; //offset
int64 limit = 2; //limit int64 limit = 2; //limit
int64 id = 3; //id int64 id = 3; //id
int64 ownerId = 4; //ownerId int64 ownerId = 4; //ownerId
+1 -1
View File
@@ -69,7 +69,7 @@ message GetUserVerificationsByIdResp {
} }
message SearchUserVerificationsReq { message SearchUserVerificationsReq {
int64 page = 1; //page int64 offset = 1; //offset
int64 limit = 2; //limit int64 limit = 2; //limit
int64 id = 3; //id int64 id = 3; //id
int64 userId = 4; //userId int64 userId = 4; //userId
+3 -3
View File
@@ -85,7 +85,7 @@ message GetUsersByIdResp {
} }
message SearchUsersReq { message SearchUsersReq {
optional int64 page = 1; //page optional int64 offset = 1; //offset
optional int64 limit = 2; //limit optional int64 limit = 2; //limit
optional int64 id = 3; //id optional int64 id = 3; //id
optional string username = 4; //username optional string username = 4; //username
@@ -236,7 +236,7 @@ message GetUserFollowsByIdResp {
} }
message SearchUserFollowsReq { message SearchUserFollowsReq {
int64 page = 1; //page int64 offset = 1; //offset
int64 limit = 2; //limit int64 limit = 2; //limit
int64 id = 3; //id int64 id = 3; //id
int64 followerId = 4; //followerId int64 followerId = 4; //followerId
@@ -301,7 +301,7 @@ message GetUserPreferencesByIdResp {
} }
message SearchUserPreferencesReq { message SearchUserPreferencesReq {
int64 page = 1; //page int64 offset = 1; //offset
int64 limit = 2; //limit int64 limit = 2; //limit
int64 userId = 3; //userId int64 userId = 3; //userId
bool notificationOrder = 4; //notificationOrder bool notificationOrder = 4; //notificationOrder
+2 -2
View File
@@ -66,7 +66,7 @@ message GetWalletTransactionsByIdResp {
} }
message SearchWalletTransactionsReq { message SearchWalletTransactionsReq {
int64 page = 1; //page int64 offset = 1; //offset
int64 limit = 2; //limit int64 limit = 2; //limit
int64 id = 3; //id int64 id = 3; //id
optional int64 userId = 4; //userId optional int64 userId = 4; //userId
@@ -129,7 +129,7 @@ message GetWalletsByIdResp {
} }
message SearchWalletsReq { message SearchWalletsReq {
int64 page = 1; //page int64 offset = 1; //offset
int64 limit = 2; //limit int64 limit = 2; //limit
int64 userId = 3; //userId int64 userId = 3; //userId
optional string balance = 4; //balance optional string balance = 4; //balance