fix: 统一分页请求的 offset 语义
This commit is contained in:
@@ -27,10 +27,10 @@ func NewSearchGamesLogic(ctx context.Context, svcCtx *svc.ServiceContext) *Searc
|
||||
|
||||
func (l *SearchGamesLogic) SearchGames(in *pb.SearchGamesReq) (*pb.SearchGamesResp, error) {
|
||||
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")
|
||||
}
|
||||
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, ¬FoundErr) {
|
||||
logx.Errorf("failed to query games: %v", err)
|
||||
return nil, errors.New("failed to query games")
|
||||
|
||||
+64
-63
@@ -2,7 +2,7 @@
|
||||
// versions:
|
||||
// protoc-gen-go v1.36.11
|
||||
// protoc v7.34.1
|
||||
// source: desc/rpc/game.proto
|
||||
// source: game.proto
|
||||
|
||||
package pb
|
||||
|
||||
@@ -38,7 +38,7 @@ type Games struct {
|
||||
|
||||
func (x *Games) Reset() {
|
||||
*x = Games{}
|
||||
mi := &file_desc_rpc_game_proto_msgTypes[0]
|
||||
mi := &file_game_proto_msgTypes[0]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
@@ -50,7 +50,7 @@ func (x *Games) String() string {
|
||||
func (*Games) ProtoMessage() {}
|
||||
|
||||
func (x *Games) ProtoReflect() protoreflect.Message {
|
||||
mi := &file_desc_rpc_game_proto_msgTypes[0]
|
||||
mi := &file_game_proto_msgTypes[0]
|
||||
if x != nil {
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
if ms.LoadMessageInfo() == nil {
|
||||
@@ -63,7 +63,7 @@ func (x *Games) ProtoReflect() protoreflect.Message {
|
||||
|
||||
// Deprecated: Use Games.ProtoReflect.Descriptor instead.
|
||||
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 {
|
||||
@@ -137,7 +137,7 @@ type AddGamesReq struct {
|
||||
|
||||
func (x *AddGamesReq) Reset() {
|
||||
*x = AddGamesReq{}
|
||||
mi := &file_desc_rpc_game_proto_msgTypes[1]
|
||||
mi := &file_game_proto_msgTypes[1]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
@@ -149,7 +149,7 @@ func (x *AddGamesReq) String() string {
|
||||
func (*AddGamesReq) ProtoMessage() {}
|
||||
|
||||
func (x *AddGamesReq) ProtoReflect() protoreflect.Message {
|
||||
mi := &file_desc_rpc_game_proto_msgTypes[1]
|
||||
mi := &file_game_proto_msgTypes[1]
|
||||
if x != nil {
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
if ms.LoadMessageInfo() == nil {
|
||||
@@ -162,7 +162,7 @@ func (x *AddGamesReq) ProtoReflect() protoreflect.Message {
|
||||
|
||||
// Deprecated: Use AddGamesReq.ProtoReflect.Descriptor instead.
|
||||
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 {
|
||||
@@ -223,7 +223,7 @@ type AddGamesResp struct {
|
||||
|
||||
func (x *AddGamesResp) Reset() {
|
||||
*x = AddGamesResp{}
|
||||
mi := &file_desc_rpc_game_proto_msgTypes[2]
|
||||
mi := &file_game_proto_msgTypes[2]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
@@ -235,7 +235,7 @@ func (x *AddGamesResp) String() string {
|
||||
func (*AddGamesResp) ProtoMessage() {}
|
||||
|
||||
func (x *AddGamesResp) ProtoReflect() protoreflect.Message {
|
||||
mi := &file_desc_rpc_game_proto_msgTypes[2]
|
||||
mi := &file_game_proto_msgTypes[2]
|
||||
if x != nil {
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
if ms.LoadMessageInfo() == nil {
|
||||
@@ -248,7 +248,7 @@ func (x *AddGamesResp) ProtoReflect() protoreflect.Message {
|
||||
|
||||
// Deprecated: Use AddGamesResp.ProtoReflect.Descriptor instead.
|
||||
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 {
|
||||
@@ -274,7 +274,7 @@ type UpdateGamesReq struct {
|
||||
|
||||
func (x *UpdateGamesReq) Reset() {
|
||||
*x = UpdateGamesReq{}
|
||||
mi := &file_desc_rpc_game_proto_msgTypes[3]
|
||||
mi := &file_game_proto_msgTypes[3]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
@@ -286,7 +286,7 @@ func (x *UpdateGamesReq) String() string {
|
||||
func (*UpdateGamesReq) ProtoMessage() {}
|
||||
|
||||
func (x *UpdateGamesReq) ProtoReflect() protoreflect.Message {
|
||||
mi := &file_desc_rpc_game_proto_msgTypes[3]
|
||||
mi := &file_game_proto_msgTypes[3]
|
||||
if x != nil {
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
if ms.LoadMessageInfo() == nil {
|
||||
@@ -299,7 +299,7 @@ func (x *UpdateGamesReq) ProtoReflect() protoreflect.Message {
|
||||
|
||||
// Deprecated: Use UpdateGamesReq.ProtoReflect.Descriptor instead.
|
||||
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 {
|
||||
@@ -366,7 +366,7 @@ type UpdateGamesResp struct {
|
||||
|
||||
func (x *UpdateGamesResp) Reset() {
|
||||
*x = UpdateGamesResp{}
|
||||
mi := &file_desc_rpc_game_proto_msgTypes[4]
|
||||
mi := &file_game_proto_msgTypes[4]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
@@ -378,7 +378,7 @@ func (x *UpdateGamesResp) String() string {
|
||||
func (*UpdateGamesResp) ProtoMessage() {}
|
||||
|
||||
func (x *UpdateGamesResp) ProtoReflect() protoreflect.Message {
|
||||
mi := &file_desc_rpc_game_proto_msgTypes[4]
|
||||
mi := &file_game_proto_msgTypes[4]
|
||||
if x != nil {
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
if ms.LoadMessageInfo() == nil {
|
||||
@@ -391,7 +391,7 @@ func (x *UpdateGamesResp) ProtoReflect() protoreflect.Message {
|
||||
|
||||
// Deprecated: Use UpdateGamesResp.ProtoReflect.Descriptor instead.
|
||||
func (*UpdateGamesResp) Descriptor() ([]byte, []int) {
|
||||
return file_desc_rpc_game_proto_rawDescGZIP(), []int{4}
|
||||
return file_game_proto_rawDescGZIP(), []int{4}
|
||||
}
|
||||
|
||||
type DelGamesReq struct {
|
||||
@@ -403,7 +403,7 @@ type DelGamesReq struct {
|
||||
|
||||
func (x *DelGamesReq) Reset() {
|
||||
*x = DelGamesReq{}
|
||||
mi := &file_desc_rpc_game_proto_msgTypes[5]
|
||||
mi := &file_game_proto_msgTypes[5]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
@@ -415,7 +415,7 @@ func (x *DelGamesReq) String() string {
|
||||
func (*DelGamesReq) ProtoMessage() {}
|
||||
|
||||
func (x *DelGamesReq) ProtoReflect() protoreflect.Message {
|
||||
mi := &file_desc_rpc_game_proto_msgTypes[5]
|
||||
mi := &file_game_proto_msgTypes[5]
|
||||
if x != nil {
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
if ms.LoadMessageInfo() == nil {
|
||||
@@ -428,7 +428,7 @@ func (x *DelGamesReq) ProtoReflect() protoreflect.Message {
|
||||
|
||||
// Deprecated: Use DelGamesReq.ProtoReflect.Descriptor instead.
|
||||
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 {
|
||||
@@ -446,7 +446,7 @@ type DelGamesResp struct {
|
||||
|
||||
func (x *DelGamesResp) Reset() {
|
||||
*x = DelGamesResp{}
|
||||
mi := &file_desc_rpc_game_proto_msgTypes[6]
|
||||
mi := &file_game_proto_msgTypes[6]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
@@ -458,7 +458,7 @@ func (x *DelGamesResp) String() string {
|
||||
func (*DelGamesResp) ProtoMessage() {}
|
||||
|
||||
func (x *DelGamesResp) ProtoReflect() protoreflect.Message {
|
||||
mi := &file_desc_rpc_game_proto_msgTypes[6]
|
||||
mi := &file_game_proto_msgTypes[6]
|
||||
if x != nil {
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
if ms.LoadMessageInfo() == nil {
|
||||
@@ -471,7 +471,7 @@ func (x *DelGamesResp) ProtoReflect() protoreflect.Message {
|
||||
|
||||
// Deprecated: Use DelGamesResp.ProtoReflect.Descriptor instead.
|
||||
func (*DelGamesResp) Descriptor() ([]byte, []int) {
|
||||
return file_desc_rpc_game_proto_rawDescGZIP(), []int{6}
|
||||
return file_game_proto_rawDescGZIP(), []int{6}
|
||||
}
|
||||
|
||||
type GetGamesByIdReq struct {
|
||||
@@ -483,7 +483,7 @@ type GetGamesByIdReq struct {
|
||||
|
||||
func (x *GetGamesByIdReq) Reset() {
|
||||
*x = GetGamesByIdReq{}
|
||||
mi := &file_desc_rpc_game_proto_msgTypes[7]
|
||||
mi := &file_game_proto_msgTypes[7]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
@@ -495,7 +495,7 @@ func (x *GetGamesByIdReq) String() string {
|
||||
func (*GetGamesByIdReq) ProtoMessage() {}
|
||||
|
||||
func (x *GetGamesByIdReq) ProtoReflect() protoreflect.Message {
|
||||
mi := &file_desc_rpc_game_proto_msgTypes[7]
|
||||
mi := &file_game_proto_msgTypes[7]
|
||||
if x != nil {
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
if ms.LoadMessageInfo() == nil {
|
||||
@@ -508,7 +508,7 @@ func (x *GetGamesByIdReq) ProtoReflect() protoreflect.Message {
|
||||
|
||||
// Deprecated: Use GetGamesByIdReq.ProtoReflect.Descriptor instead.
|
||||
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 {
|
||||
@@ -527,7 +527,7 @@ type GetGamesByIdResp struct {
|
||||
|
||||
func (x *GetGamesByIdResp) Reset() {
|
||||
*x = GetGamesByIdResp{}
|
||||
mi := &file_desc_rpc_game_proto_msgTypes[8]
|
||||
mi := &file_game_proto_msgTypes[8]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
@@ -539,7 +539,7 @@ func (x *GetGamesByIdResp) String() string {
|
||||
func (*GetGamesByIdResp) ProtoMessage() {}
|
||||
|
||||
func (x *GetGamesByIdResp) ProtoReflect() protoreflect.Message {
|
||||
mi := &file_desc_rpc_game_proto_msgTypes[8]
|
||||
mi := &file_game_proto_msgTypes[8]
|
||||
if x != nil {
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
if ms.LoadMessageInfo() == nil {
|
||||
@@ -552,7 +552,7 @@ func (x *GetGamesByIdResp) ProtoReflect() protoreflect.Message {
|
||||
|
||||
// Deprecated: Use GetGamesByIdResp.ProtoReflect.Descriptor instead.
|
||||
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 {
|
||||
@@ -564,7 +564,7 @@ func (x *GetGamesByIdResp) GetGames() *Games {
|
||||
|
||||
type SearchGamesReq struct {
|
||||
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
|
||||
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
|
||||
@@ -580,7 +580,7 @@ type SearchGamesReq struct {
|
||||
|
||||
func (x *SearchGamesReq) Reset() {
|
||||
*x = SearchGamesReq{}
|
||||
mi := &file_desc_rpc_game_proto_msgTypes[9]
|
||||
mi := &file_game_proto_msgTypes[9]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
@@ -592,7 +592,7 @@ func (x *SearchGamesReq) String() string {
|
||||
func (*SearchGamesReq) ProtoMessage() {}
|
||||
|
||||
func (x *SearchGamesReq) ProtoReflect() protoreflect.Message {
|
||||
mi := &file_desc_rpc_game_proto_msgTypes[9]
|
||||
mi := &file_game_proto_msgTypes[9]
|
||||
if x != nil {
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
if ms.LoadMessageInfo() == nil {
|
||||
@@ -605,12 +605,12 @@ func (x *SearchGamesReq) ProtoReflect() protoreflect.Message {
|
||||
|
||||
// Deprecated: Use SearchGamesReq.ProtoReflect.Descriptor instead.
|
||||
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 {
|
||||
return x.Page
|
||||
return x.Offset
|
||||
}
|
||||
return 0
|
||||
}
|
||||
@@ -687,7 +687,7 @@ type SearchGamesResp struct {
|
||||
|
||||
func (x *SearchGamesResp) Reset() {
|
||||
*x = SearchGamesResp{}
|
||||
mi := &file_desc_rpc_game_proto_msgTypes[10]
|
||||
mi := &file_game_proto_msgTypes[10]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
@@ -699,7 +699,7 @@ func (x *SearchGamesResp) String() string {
|
||||
func (*SearchGamesResp) ProtoMessage() {}
|
||||
|
||||
func (x *SearchGamesResp) ProtoReflect() protoreflect.Message {
|
||||
mi := &file_desc_rpc_game_proto_msgTypes[10]
|
||||
mi := &file_game_proto_msgTypes[10]
|
||||
if x != nil {
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
if ms.LoadMessageInfo() == nil {
|
||||
@@ -712,7 +712,7 @@ func (x *SearchGamesResp) ProtoReflect() protoreflect.Message {
|
||||
|
||||
// Deprecated: Use SearchGamesResp.ProtoReflect.Descriptor instead.
|
||||
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 {
|
||||
@@ -722,11 +722,12 @@ func (x *SearchGamesResp) GetGames() []*Games {
|
||||
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" +
|
||||
"\x13desc/rpc/game.proto\x12\x02pb\"\xd1\x01\n" +
|
||||
"\n" +
|
||||
"game.proto\x12\x02pb\"\xd1\x01\n" +
|
||||
"\x05Games\x12\x0e\n" +
|
||||
"\x02id\x18\x01 \x01(\x03R\x02id\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" +
|
||||
"\x02id\x18\x01 \x01(\x03R\x02id\"3\n" +
|
||||
"\x10GetGamesByIdResp\x12\x1f\n" +
|
||||
"\x05games\x18\x01 \x01(\v2\t.pb.GamesR\x05games\"\xfd\x02\n" +
|
||||
"\x0eSearchGamesReq\x12\x12\n" +
|
||||
"\x04page\x18\x01 \x01(\x03R\x04page\x12\x14\n" +
|
||||
"\x05games\x18\x01 \x01(\v2\t.pb.GamesR\x05games\"\x81\x03\n" +
|
||||
"\x0eSearchGamesReq\x12\x16\n" +
|
||||
"\x06offset\x18\x01 \x01(\x03R\x06offset\x12\x14\n" +
|
||||
"\x05limit\x18\x02 \x01(\x03R\x05limit\x12\x0e\n" +
|
||||
"\x02id\x18\x03 \x01(\x03R\x02id\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"
|
||||
|
||||
var (
|
||||
file_desc_rpc_game_proto_rawDescOnce sync.Once
|
||||
file_desc_rpc_game_proto_rawDescData []byte
|
||||
file_game_proto_rawDescOnce sync.Once
|
||||
file_game_proto_rawDescData []byte
|
||||
)
|
||||
|
||||
func file_desc_rpc_game_proto_rawDescGZIP() []byte {
|
||||
file_desc_rpc_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)))
|
||||
func file_game_proto_rawDescGZIP() []byte {
|
||||
file_game_proto_rawDescOnce.Do(func() {
|
||||
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_desc_rpc_game_proto_goTypes = []any{
|
||||
var file_game_proto_msgTypes = make([]protoimpl.MessageInfo, 11)
|
||||
var file_game_proto_goTypes = []any{
|
||||
(*Games)(nil), // 0: pb.Games
|
||||
(*AddGamesReq)(nil), // 1: pb.AddGamesReq
|
||||
(*AddGamesResp)(nil), // 2: pb.AddGamesResp
|
||||
@@ -820,7 +821,7 @@ var file_desc_rpc_game_proto_goTypes = []any{
|
||||
(*SearchGamesReq)(nil), // 9: pb.SearchGamesReq
|
||||
(*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, // 1: pb.GetGamesByIdResp.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
|
||||
}
|
||||
|
||||
func init() { file_desc_rpc_game_proto_init() }
|
||||
func file_desc_rpc_game_proto_init() {
|
||||
if File_desc_rpc_game_proto != nil {
|
||||
func init() { file_game_proto_init() }
|
||||
func file_game_proto_init() {
|
||||
if File_game_proto != nil {
|
||||
return
|
||||
}
|
||||
file_desc_rpc_game_proto_msgTypes[9].OneofWrappers = []any{}
|
||||
file_game_proto_msgTypes[9].OneofWrappers = []any{}
|
||||
type x struct{}
|
||||
out := protoimpl.TypeBuilder{
|
||||
File: protoimpl.DescBuilder{
|
||||
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,
|
||||
NumMessages: 11,
|
||||
NumExtensions: 0,
|
||||
NumServices: 1,
|
||||
},
|
||||
GoTypes: file_desc_rpc_game_proto_goTypes,
|
||||
DependencyIndexes: file_desc_rpc_game_proto_depIdxs,
|
||||
MessageInfos: file_desc_rpc_game_proto_msgTypes,
|
||||
GoTypes: file_game_proto_goTypes,
|
||||
DependencyIndexes: file_game_proto_depIdxs,
|
||||
MessageInfos: file_game_proto_msgTypes,
|
||||
}.Build()
|
||||
File_desc_rpc_game_proto = out.File
|
||||
file_desc_rpc_game_proto_goTypes = nil
|
||||
file_desc_rpc_game_proto_depIdxs = nil
|
||||
File_game_proto = out.File
|
||||
file_game_proto_goTypes = nil
|
||||
file_game_proto_depIdxs = nil
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user