fix: api descript

This commit is contained in:
wwweww
2026-02-28 05:33:16 +08:00
parent 5930fb0dde
commit d2f33b4b96
243 changed files with 37065 additions and 780 deletions
+847
View File
@@ -0,0 +1,847 @@
// Code generated by protoc-gen-go. DO NOT EDIT.
// versions:
// protoc-gen-go v1.36.11
// protoc v5.29.6
// source: game.proto
package pb
import (
protoreflect "google.golang.org/protobuf/reflect/protoreflect"
protoimpl "google.golang.org/protobuf/runtime/protoimpl"
reflect "reflect"
sync "sync"
unsafe "unsafe"
)
const (
// Verify that this generated code is sufficiently up-to-date.
_ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion)
// Verify that runtime/protoimpl is sufficiently up-to-date.
_ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20)
)
// --------------------------------games--------------------------------
type Games struct {
state protoimpl.MessageState `protogen:"open.v1"`
Id int64 `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"` //id
Name string `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty"` //name
Icon string `protobuf:"bytes,3,opt,name=icon,proto3" json:"icon,omitempty"` //icon
Category string `protobuf:"bytes,4,opt,name=category,proto3" json:"category,omitempty"` //category
SortOrder int64 `protobuf:"varint,5,opt,name=sortOrder,proto3" json:"sortOrder,omitempty"` //sortOrder
IsActive bool `protobuf:"varint,6,opt,name=isActive,proto3" json:"isActive,omitempty"` //isActive
CreatedAt int64 `protobuf:"varint,7,opt,name=createdAt,proto3" json:"createdAt,omitempty"` //createdAt
UpdatedAt int64 `protobuf:"varint,8,opt,name=updatedAt,proto3" json:"updatedAt,omitempty"` //updatedAt
unknownFields protoimpl.UnknownFields
sizeCache protoimpl.SizeCache
}
func (x *Games) Reset() {
*x = Games{}
mi := &file_game_proto_msgTypes[0]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
func (x *Games) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*Games) ProtoMessage() {}
func (x *Games) ProtoReflect() protoreflect.Message {
mi := &file_game_proto_msgTypes[0]
if x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use Games.ProtoReflect.Descriptor instead.
func (*Games) Descriptor() ([]byte, []int) {
return file_game_proto_rawDescGZIP(), []int{0}
}
func (x *Games) GetId() int64 {
if x != nil {
return x.Id
}
return 0
}
func (x *Games) GetName() string {
if x != nil {
return x.Name
}
return ""
}
func (x *Games) GetIcon() string {
if x != nil {
return x.Icon
}
return ""
}
func (x *Games) GetCategory() string {
if x != nil {
return x.Category
}
return ""
}
func (x *Games) GetSortOrder() int64 {
if x != nil {
return x.SortOrder
}
return 0
}
func (x *Games) GetIsActive() bool {
if x != nil {
return x.IsActive
}
return false
}
func (x *Games) GetCreatedAt() int64 {
if x != nil {
return x.CreatedAt
}
return 0
}
func (x *Games) GetUpdatedAt() int64 {
if x != nil {
return x.UpdatedAt
}
return 0
}
type AddGamesReq struct {
state protoimpl.MessageState `protogen:"open.v1"`
Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` //name
Icon string `protobuf:"bytes,2,opt,name=icon,proto3" json:"icon,omitempty"` //icon
Category string `protobuf:"bytes,3,opt,name=category,proto3" json:"category,omitempty"` //category
SortOrder int64 `protobuf:"varint,4,opt,name=sortOrder,proto3" json:"sortOrder,omitempty"` //sortOrder
IsActive bool `protobuf:"varint,5,opt,name=isActive,proto3" json:"isActive,omitempty"` //isActive
CreatedAt int64 `protobuf:"varint,6,opt,name=createdAt,proto3" json:"createdAt,omitempty"` //createdAt
UpdatedAt int64 `protobuf:"varint,7,opt,name=updatedAt,proto3" json:"updatedAt,omitempty"` //updatedAt
unknownFields protoimpl.UnknownFields
sizeCache protoimpl.SizeCache
}
func (x *AddGamesReq) Reset() {
*x = AddGamesReq{}
mi := &file_game_proto_msgTypes[1]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
func (x *AddGamesReq) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*AddGamesReq) ProtoMessage() {}
func (x *AddGamesReq) ProtoReflect() protoreflect.Message {
mi := &file_game_proto_msgTypes[1]
if x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use AddGamesReq.ProtoReflect.Descriptor instead.
func (*AddGamesReq) Descriptor() ([]byte, []int) {
return file_game_proto_rawDescGZIP(), []int{1}
}
func (x *AddGamesReq) GetName() string {
if x != nil {
return x.Name
}
return ""
}
func (x *AddGamesReq) GetIcon() string {
if x != nil {
return x.Icon
}
return ""
}
func (x *AddGamesReq) GetCategory() string {
if x != nil {
return x.Category
}
return ""
}
func (x *AddGamesReq) GetSortOrder() int64 {
if x != nil {
return x.SortOrder
}
return 0
}
func (x *AddGamesReq) GetIsActive() bool {
if x != nil {
return x.IsActive
}
return false
}
func (x *AddGamesReq) GetCreatedAt() int64 {
if x != nil {
return x.CreatedAt
}
return 0
}
func (x *AddGamesReq) GetUpdatedAt() int64 {
if x != nil {
return x.UpdatedAt
}
return 0
}
type AddGamesResp struct {
state protoimpl.MessageState `protogen:"open.v1"`
unknownFields protoimpl.UnknownFields
sizeCache protoimpl.SizeCache
}
func (x *AddGamesResp) Reset() {
*x = AddGamesResp{}
mi := &file_game_proto_msgTypes[2]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
func (x *AddGamesResp) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*AddGamesResp) ProtoMessage() {}
func (x *AddGamesResp) ProtoReflect() protoreflect.Message {
mi := &file_game_proto_msgTypes[2]
if x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use AddGamesResp.ProtoReflect.Descriptor instead.
func (*AddGamesResp) Descriptor() ([]byte, []int) {
return file_game_proto_rawDescGZIP(), []int{2}
}
type UpdateGamesReq struct {
state protoimpl.MessageState `protogen:"open.v1"`
Id int64 `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"` //id
Name string `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty"` //name
Icon string `protobuf:"bytes,3,opt,name=icon,proto3" json:"icon,omitempty"` //icon
Category string `protobuf:"bytes,4,opt,name=category,proto3" json:"category,omitempty"` //category
SortOrder int64 `protobuf:"varint,5,opt,name=sortOrder,proto3" json:"sortOrder,omitempty"` //sortOrder
IsActive bool `protobuf:"varint,6,opt,name=isActive,proto3" json:"isActive,omitempty"` //isActive
CreatedAt int64 `protobuf:"varint,7,opt,name=createdAt,proto3" json:"createdAt,omitempty"` //createdAt
UpdatedAt int64 `protobuf:"varint,8,opt,name=updatedAt,proto3" json:"updatedAt,omitempty"` //updatedAt
unknownFields protoimpl.UnknownFields
sizeCache protoimpl.SizeCache
}
func (x *UpdateGamesReq) Reset() {
*x = UpdateGamesReq{}
mi := &file_game_proto_msgTypes[3]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
func (x *UpdateGamesReq) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*UpdateGamesReq) ProtoMessage() {}
func (x *UpdateGamesReq) ProtoReflect() protoreflect.Message {
mi := &file_game_proto_msgTypes[3]
if x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use UpdateGamesReq.ProtoReflect.Descriptor instead.
func (*UpdateGamesReq) Descriptor() ([]byte, []int) {
return file_game_proto_rawDescGZIP(), []int{3}
}
func (x *UpdateGamesReq) GetId() int64 {
if x != nil {
return x.Id
}
return 0
}
func (x *UpdateGamesReq) GetName() string {
if x != nil {
return x.Name
}
return ""
}
func (x *UpdateGamesReq) GetIcon() string {
if x != nil {
return x.Icon
}
return ""
}
func (x *UpdateGamesReq) GetCategory() string {
if x != nil {
return x.Category
}
return ""
}
func (x *UpdateGamesReq) GetSortOrder() int64 {
if x != nil {
return x.SortOrder
}
return 0
}
func (x *UpdateGamesReq) GetIsActive() bool {
if x != nil {
return x.IsActive
}
return false
}
func (x *UpdateGamesReq) GetCreatedAt() int64 {
if x != nil {
return x.CreatedAt
}
return 0
}
func (x *UpdateGamesReq) GetUpdatedAt() int64 {
if x != nil {
return x.UpdatedAt
}
return 0
}
type UpdateGamesResp struct {
state protoimpl.MessageState `protogen:"open.v1"`
unknownFields protoimpl.UnknownFields
sizeCache protoimpl.SizeCache
}
func (x *UpdateGamesResp) Reset() {
*x = UpdateGamesResp{}
mi := &file_game_proto_msgTypes[4]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
func (x *UpdateGamesResp) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*UpdateGamesResp) ProtoMessage() {}
func (x *UpdateGamesResp) ProtoReflect() protoreflect.Message {
mi := &file_game_proto_msgTypes[4]
if x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use UpdateGamesResp.ProtoReflect.Descriptor instead.
func (*UpdateGamesResp) Descriptor() ([]byte, []int) {
return file_game_proto_rawDescGZIP(), []int{4}
}
type DelGamesReq struct {
state protoimpl.MessageState `protogen:"open.v1"`
Id int64 `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"` //id
unknownFields protoimpl.UnknownFields
sizeCache protoimpl.SizeCache
}
func (x *DelGamesReq) Reset() {
*x = DelGamesReq{}
mi := &file_game_proto_msgTypes[5]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
func (x *DelGamesReq) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*DelGamesReq) ProtoMessage() {}
func (x *DelGamesReq) ProtoReflect() protoreflect.Message {
mi := &file_game_proto_msgTypes[5]
if x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use DelGamesReq.ProtoReflect.Descriptor instead.
func (*DelGamesReq) Descriptor() ([]byte, []int) {
return file_game_proto_rawDescGZIP(), []int{5}
}
func (x *DelGamesReq) GetId() int64 {
if x != nil {
return x.Id
}
return 0
}
type DelGamesResp struct {
state protoimpl.MessageState `protogen:"open.v1"`
unknownFields protoimpl.UnknownFields
sizeCache protoimpl.SizeCache
}
func (x *DelGamesResp) Reset() {
*x = DelGamesResp{}
mi := &file_game_proto_msgTypes[6]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
func (x *DelGamesResp) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*DelGamesResp) ProtoMessage() {}
func (x *DelGamesResp) ProtoReflect() protoreflect.Message {
mi := &file_game_proto_msgTypes[6]
if x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use DelGamesResp.ProtoReflect.Descriptor instead.
func (*DelGamesResp) Descriptor() ([]byte, []int) {
return file_game_proto_rawDescGZIP(), []int{6}
}
type GetGamesByIdReq struct {
state protoimpl.MessageState `protogen:"open.v1"`
Id int64 `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"` //id
unknownFields protoimpl.UnknownFields
sizeCache protoimpl.SizeCache
}
func (x *GetGamesByIdReq) Reset() {
*x = GetGamesByIdReq{}
mi := &file_game_proto_msgTypes[7]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
func (x *GetGamesByIdReq) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*GetGamesByIdReq) ProtoMessage() {}
func (x *GetGamesByIdReq) ProtoReflect() protoreflect.Message {
mi := &file_game_proto_msgTypes[7]
if x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use GetGamesByIdReq.ProtoReflect.Descriptor instead.
func (*GetGamesByIdReq) Descriptor() ([]byte, []int) {
return file_game_proto_rawDescGZIP(), []int{7}
}
func (x *GetGamesByIdReq) GetId() int64 {
if x != nil {
return x.Id
}
return 0
}
type GetGamesByIdResp struct {
state protoimpl.MessageState `protogen:"open.v1"`
Games *Games `protobuf:"bytes,1,opt,name=games,proto3" json:"games,omitempty"` //games
unknownFields protoimpl.UnknownFields
sizeCache protoimpl.SizeCache
}
func (x *GetGamesByIdResp) Reset() {
*x = GetGamesByIdResp{}
mi := &file_game_proto_msgTypes[8]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
func (x *GetGamesByIdResp) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*GetGamesByIdResp) ProtoMessage() {}
func (x *GetGamesByIdResp) ProtoReflect() protoreflect.Message {
mi := &file_game_proto_msgTypes[8]
if x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use GetGamesByIdResp.ProtoReflect.Descriptor instead.
func (*GetGamesByIdResp) Descriptor() ([]byte, []int) {
return file_game_proto_rawDescGZIP(), []int{8}
}
func (x *GetGamesByIdResp) GetGames() *Games {
if x != nil {
return x.Games
}
return nil
}
type SearchGamesReq struct {
state protoimpl.MessageState `protogen:"open.v1"`
Page int64 `protobuf:"varint,1,opt,name=page,proto3" json:"page,omitempty"` //page
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" json:"name,omitempty"` //name
Icon string `protobuf:"bytes,5,opt,name=icon,proto3" json:"icon,omitempty"` //icon
Category string `protobuf:"bytes,6,opt,name=category,proto3" json:"category,omitempty"` //category
SortOrder int64 `protobuf:"varint,7,opt,name=sortOrder,proto3" json:"sortOrder,omitempty"` //sortOrder
IsActive bool `protobuf:"varint,8,opt,name=isActive,proto3" json:"isActive,omitempty"` //isActive
CreatedAt int64 `protobuf:"varint,9,opt,name=createdAt,proto3" json:"createdAt,omitempty"` //createdAt
UpdatedAt int64 `protobuf:"varint,10,opt,name=updatedAt,proto3" json:"updatedAt,omitempty"` //updatedAt
unknownFields protoimpl.UnknownFields
sizeCache protoimpl.SizeCache
}
func (x *SearchGamesReq) Reset() {
*x = SearchGamesReq{}
mi := &file_game_proto_msgTypes[9]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
func (x *SearchGamesReq) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*SearchGamesReq) ProtoMessage() {}
func (x *SearchGamesReq) ProtoReflect() protoreflect.Message {
mi := &file_game_proto_msgTypes[9]
if x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use SearchGamesReq.ProtoReflect.Descriptor instead.
func (*SearchGamesReq) Descriptor() ([]byte, []int) {
return file_game_proto_rawDescGZIP(), []int{9}
}
func (x *SearchGamesReq) GetPage() int64 {
if x != nil {
return x.Page
}
return 0
}
func (x *SearchGamesReq) GetLimit() int64 {
if x != nil {
return x.Limit
}
return 0
}
func (x *SearchGamesReq) GetId() int64 {
if x != nil {
return x.Id
}
return 0
}
func (x *SearchGamesReq) GetName() string {
if x != nil {
return x.Name
}
return ""
}
func (x *SearchGamesReq) GetIcon() string {
if x != nil {
return x.Icon
}
return ""
}
func (x *SearchGamesReq) GetCategory() string {
if x != nil {
return x.Category
}
return ""
}
func (x *SearchGamesReq) GetSortOrder() int64 {
if x != nil {
return x.SortOrder
}
return 0
}
func (x *SearchGamesReq) GetIsActive() bool {
if x != nil {
return x.IsActive
}
return false
}
func (x *SearchGamesReq) GetCreatedAt() int64 {
if x != nil {
return x.CreatedAt
}
return 0
}
func (x *SearchGamesReq) GetUpdatedAt() int64 {
if x != nil {
return x.UpdatedAt
}
return 0
}
type SearchGamesResp struct {
state protoimpl.MessageState `protogen:"open.v1"`
Games []*Games `protobuf:"bytes,1,rep,name=games,proto3" json:"games,omitempty"` //games
unknownFields protoimpl.UnknownFields
sizeCache protoimpl.SizeCache
}
func (x *SearchGamesResp) Reset() {
*x = SearchGamesResp{}
mi := &file_game_proto_msgTypes[10]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
func (x *SearchGamesResp) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*SearchGamesResp) ProtoMessage() {}
func (x *SearchGamesResp) ProtoReflect() protoreflect.Message {
mi := &file_game_proto_msgTypes[10]
if x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use SearchGamesResp.ProtoReflect.Descriptor instead.
func (*SearchGamesResp) Descriptor() ([]byte, []int) {
return file_game_proto_rawDescGZIP(), []int{10}
}
func (x *SearchGamesResp) GetGames() []*Games {
if x != nil {
return x.Games
}
return nil
}
var File_game_proto protoreflect.FileDescriptor
const file_game_proto_rawDesc = "" +
"\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" +
"\x04icon\x18\x03 \x01(\tR\x04icon\x12\x1a\n" +
"\bcategory\x18\x04 \x01(\tR\bcategory\x12\x1c\n" +
"\tsortOrder\x18\x05 \x01(\x03R\tsortOrder\x12\x1a\n" +
"\bisActive\x18\x06 \x01(\bR\bisActive\x12\x1c\n" +
"\tcreatedAt\x18\a \x01(\x03R\tcreatedAt\x12\x1c\n" +
"\tupdatedAt\x18\b \x01(\x03R\tupdatedAt\"\xc7\x01\n" +
"\vAddGamesReq\x12\x12\n" +
"\x04name\x18\x01 \x01(\tR\x04name\x12\x12\n" +
"\x04icon\x18\x02 \x01(\tR\x04icon\x12\x1a\n" +
"\bcategory\x18\x03 \x01(\tR\bcategory\x12\x1c\n" +
"\tsortOrder\x18\x04 \x01(\x03R\tsortOrder\x12\x1a\n" +
"\bisActive\x18\x05 \x01(\bR\bisActive\x12\x1c\n" +
"\tcreatedAt\x18\x06 \x01(\x03R\tcreatedAt\x12\x1c\n" +
"\tupdatedAt\x18\a \x01(\x03R\tupdatedAt\"\x0e\n" +
"\fAddGamesResp\"\xda\x01\n" +
"\x0eUpdateGamesReq\x12\x0e\n" +
"\x02id\x18\x01 \x01(\x03R\x02id\x12\x12\n" +
"\x04name\x18\x02 \x01(\tR\x04name\x12\x12\n" +
"\x04icon\x18\x03 \x01(\tR\x04icon\x12\x1a\n" +
"\bcategory\x18\x04 \x01(\tR\bcategory\x12\x1c\n" +
"\tsortOrder\x18\x05 \x01(\x03R\tsortOrder\x12\x1a\n" +
"\bisActive\x18\x06 \x01(\bR\bisActive\x12\x1c\n" +
"\tcreatedAt\x18\a \x01(\x03R\tcreatedAt\x12\x1c\n" +
"\tupdatedAt\x18\b \x01(\x03R\tupdatedAt\"\x11\n" +
"\x0fUpdateGamesResp\"\x1d\n" +
"\vDelGamesReq\x12\x0e\n" +
"\x02id\x18\x01 \x01(\x03R\x02id\"\x0e\n" +
"\fDelGamesResp\"!\n" +
"\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\"\x84\x02\n" +
"\x0eSearchGamesReq\x12\x12\n" +
"\x04page\x18\x01 \x01(\x03R\x04page\x12\x14\n" +
"\x05limit\x18\x02 \x01(\x03R\x05limit\x12\x0e\n" +
"\x02id\x18\x03 \x01(\x03R\x02id\x12\x12\n" +
"\x04name\x18\x04 \x01(\tR\x04name\x12\x12\n" +
"\x04icon\x18\x05 \x01(\tR\x04icon\x12\x1a\n" +
"\bcategory\x18\x06 \x01(\tR\bcategory\x12\x1c\n" +
"\tsortOrder\x18\a \x01(\x03R\tsortOrder\x12\x1a\n" +
"\bisActive\x18\b \x01(\bR\bisActive\x12\x1c\n" +
"\tcreatedAt\x18\t \x01(\x03R\tcreatedAt\x12\x1c\n" +
"\tupdatedAt\x18\n" +
" \x01(\x03R\tupdatedAt\"2\n" +
"\x0fSearchGamesResp\x12\x1f\n" +
"\x05games\x18\x01 \x03(\v2\t.pb.GamesR\x05games2\x91\x02\n" +
"\x06public\x12-\n" +
"\bAddGames\x12\x0f.pb.AddGamesReq\x1a\x10.pb.AddGamesResp\x126\n" +
"\vUpdateGames\x12\x12.pb.UpdateGamesReq\x1a\x13.pb.UpdateGamesResp\x12-\n" +
"\bDelGames\x12\x0f.pb.DelGamesReq\x1a\x10.pb.DelGamesResp\x129\n" +
"\fGetGamesById\x12\x13.pb.GetGamesByIdReq\x1a\x14.pb.GetGamesByIdResp\x126\n" +
"\vSearchGames\x12\x12.pb.SearchGamesReq\x1a\x13.pb.SearchGamesRespB\x06Z\x04./pbb\x06proto3"
var (
file_game_proto_rawDescOnce sync.Once
file_game_proto_rawDescData []byte
)
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_game_proto_rawDescData
}
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
(*UpdateGamesReq)(nil), // 3: pb.UpdateGamesReq
(*UpdateGamesResp)(nil), // 4: pb.UpdateGamesResp
(*DelGamesReq)(nil), // 5: pb.DelGamesReq
(*DelGamesResp)(nil), // 6: pb.DelGamesResp
(*GetGamesByIdReq)(nil), // 7: pb.GetGamesByIdReq
(*GetGamesByIdResp)(nil), // 8: pb.GetGamesByIdResp
(*SearchGamesReq)(nil), // 9: pb.SearchGamesReq
(*SearchGamesResp)(nil), // 10: pb.SearchGamesResp
}
var file_game_proto_depIdxs = []int32{
0, // 0: pb.GetGamesByIdResp.games:type_name -> pb.Games
0, // 1: pb.SearchGamesResp.games:type_name -> pb.Games
1, // 2: pb.public.AddGames:input_type -> pb.AddGamesReq
3, // 3: pb.public.UpdateGames:input_type -> pb.UpdateGamesReq
5, // 4: pb.public.DelGames:input_type -> pb.DelGamesReq
7, // 5: pb.public.GetGamesById:input_type -> pb.GetGamesByIdReq
9, // 6: pb.public.SearchGames:input_type -> pb.SearchGamesReq
2, // 7: pb.public.AddGames:output_type -> pb.AddGamesResp
4, // 8: pb.public.UpdateGames:output_type -> pb.UpdateGamesResp
6, // 9: pb.public.DelGames:output_type -> pb.DelGamesResp
8, // 10: pb.public.GetGamesById:output_type -> pb.GetGamesByIdResp
10, // 11: pb.public.SearchGames:output_type -> pb.SearchGamesResp
7, // [7:12] is the sub-list for method output_type
2, // [2:7] is the sub-list for method input_type
2, // [2:2] is the sub-list for extension type_name
2, // [2:2] is the sub-list for extension extendee
0, // [0:2] is the sub-list for field type_name
}
func init() { file_game_proto_init() }
func file_game_proto_init() {
if File_game_proto != nil {
return
}
type x struct{}
out := protoimpl.TypeBuilder{
File: protoimpl.DescBuilder{
GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
RawDescriptor: unsafe.Slice(unsafe.StringData(file_game_proto_rawDesc), len(file_game_proto_rawDesc)),
NumEnums: 0,
NumMessages: 11,
NumExtensions: 0,
NumServices: 1,
},
GoTypes: file_game_proto_goTypes,
DependencyIndexes: file_game_proto_depIdxs,
MessageInfos: file_game_proto_msgTypes,
}.Build()
File_game_proto = out.File
file_game_proto_goTypes = nil
file_game_proto_depIdxs = nil
}
+275
View File
@@ -0,0 +1,275 @@
// Code generated by protoc-gen-go-grpc. DO NOT EDIT.
// versions:
// - protoc-gen-go-grpc v1.6.1
// - protoc v5.29.6
// source: game.proto
package pb
import (
context "context"
grpc "google.golang.org/grpc"
codes "google.golang.org/grpc/codes"
status "google.golang.org/grpc/status"
)
// This is a compile-time assertion to ensure that this generated file
// is compatible with the grpc package it is being compiled against.
// Requires gRPC-Go v1.64.0 or later.
const _ = grpc.SupportPackageIsVersion9
const (
Public_AddGames_FullMethodName = "/pb.public/AddGames"
Public_UpdateGames_FullMethodName = "/pb.public/UpdateGames"
Public_DelGames_FullMethodName = "/pb.public/DelGames"
Public_GetGamesById_FullMethodName = "/pb.public/GetGamesById"
Public_SearchGames_FullMethodName = "/pb.public/SearchGames"
)
// PublicClient is the client API for Public service.
//
// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream.
type PublicClient interface {
// -----------------------games-----------------------
AddGames(ctx context.Context, in *AddGamesReq, opts ...grpc.CallOption) (*AddGamesResp, error)
UpdateGames(ctx context.Context, in *UpdateGamesReq, opts ...grpc.CallOption) (*UpdateGamesResp, error)
DelGames(ctx context.Context, in *DelGamesReq, opts ...grpc.CallOption) (*DelGamesResp, error)
GetGamesById(ctx context.Context, in *GetGamesByIdReq, opts ...grpc.CallOption) (*GetGamesByIdResp, error)
SearchGames(ctx context.Context, in *SearchGamesReq, opts ...grpc.CallOption) (*SearchGamesResp, error)
}
type publicClient struct {
cc grpc.ClientConnInterface
}
func NewPublicClient(cc grpc.ClientConnInterface) PublicClient {
return &publicClient{cc}
}
func (c *publicClient) AddGames(ctx context.Context, in *AddGamesReq, opts ...grpc.CallOption) (*AddGamesResp, error) {
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
out := new(AddGamesResp)
err := c.cc.Invoke(ctx, Public_AddGames_FullMethodName, in, out, cOpts...)
if err != nil {
return nil, err
}
return out, nil
}
func (c *publicClient) UpdateGames(ctx context.Context, in *UpdateGamesReq, opts ...grpc.CallOption) (*UpdateGamesResp, error) {
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
out := new(UpdateGamesResp)
err := c.cc.Invoke(ctx, Public_UpdateGames_FullMethodName, in, out, cOpts...)
if err != nil {
return nil, err
}
return out, nil
}
func (c *publicClient) DelGames(ctx context.Context, in *DelGamesReq, opts ...grpc.CallOption) (*DelGamesResp, error) {
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
out := new(DelGamesResp)
err := c.cc.Invoke(ctx, Public_DelGames_FullMethodName, in, out, cOpts...)
if err != nil {
return nil, err
}
return out, nil
}
func (c *publicClient) GetGamesById(ctx context.Context, in *GetGamesByIdReq, opts ...grpc.CallOption) (*GetGamesByIdResp, error) {
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
out := new(GetGamesByIdResp)
err := c.cc.Invoke(ctx, Public_GetGamesById_FullMethodName, in, out, cOpts...)
if err != nil {
return nil, err
}
return out, nil
}
func (c *publicClient) SearchGames(ctx context.Context, in *SearchGamesReq, opts ...grpc.CallOption) (*SearchGamesResp, error) {
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
out := new(SearchGamesResp)
err := c.cc.Invoke(ctx, Public_SearchGames_FullMethodName, in, out, cOpts...)
if err != nil {
return nil, err
}
return out, nil
}
// PublicServer is the server API for Public service.
// All implementations must embed UnimplementedPublicServer
// for forward compatibility.
type PublicServer interface {
// -----------------------games-----------------------
AddGames(context.Context, *AddGamesReq) (*AddGamesResp, error)
UpdateGames(context.Context, *UpdateGamesReq) (*UpdateGamesResp, error)
DelGames(context.Context, *DelGamesReq) (*DelGamesResp, error)
GetGamesById(context.Context, *GetGamesByIdReq) (*GetGamesByIdResp, error)
SearchGames(context.Context, *SearchGamesReq) (*SearchGamesResp, error)
mustEmbedUnimplementedPublicServer()
}
// UnimplementedPublicServer must be embedded to have
// forward compatible implementations.
//
// NOTE: this should be embedded by value instead of pointer to avoid a nil
// pointer dereference when methods are called.
type UnimplementedPublicServer struct{}
func (UnimplementedPublicServer) AddGames(context.Context, *AddGamesReq) (*AddGamesResp, error) {
return nil, status.Error(codes.Unimplemented, "method AddGames not implemented")
}
func (UnimplementedPublicServer) UpdateGames(context.Context, *UpdateGamesReq) (*UpdateGamesResp, error) {
return nil, status.Error(codes.Unimplemented, "method UpdateGames not implemented")
}
func (UnimplementedPublicServer) DelGames(context.Context, *DelGamesReq) (*DelGamesResp, error) {
return nil, status.Error(codes.Unimplemented, "method DelGames not implemented")
}
func (UnimplementedPublicServer) GetGamesById(context.Context, *GetGamesByIdReq) (*GetGamesByIdResp, error) {
return nil, status.Error(codes.Unimplemented, "method GetGamesById not implemented")
}
func (UnimplementedPublicServer) SearchGames(context.Context, *SearchGamesReq) (*SearchGamesResp, error) {
return nil, status.Error(codes.Unimplemented, "method SearchGames not implemented")
}
func (UnimplementedPublicServer) mustEmbedUnimplementedPublicServer() {}
func (UnimplementedPublicServer) testEmbeddedByValue() {}
// UnsafePublicServer may be embedded to opt out of forward compatibility for this service.
// Use of this interface is not recommended, as added methods to PublicServer will
// result in compilation errors.
type UnsafePublicServer interface {
mustEmbedUnimplementedPublicServer()
}
func RegisterPublicServer(s grpc.ServiceRegistrar, srv PublicServer) {
// If the following call panics, it indicates UnimplementedPublicServer was
// embedded by pointer and is nil. This will cause panics if an
// unimplemented method is ever invoked, so we test this at initialization
// time to prevent it from happening at runtime later due to I/O.
if t, ok := srv.(interface{ testEmbeddedByValue() }); ok {
t.testEmbeddedByValue()
}
s.RegisterService(&Public_ServiceDesc, srv)
}
func _Public_AddGames_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(AddGamesReq)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(PublicServer).AddGames(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: Public_AddGames_FullMethodName,
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(PublicServer).AddGames(ctx, req.(*AddGamesReq))
}
return interceptor(ctx, in, info, handler)
}
func _Public_UpdateGames_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(UpdateGamesReq)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(PublicServer).UpdateGames(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: Public_UpdateGames_FullMethodName,
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(PublicServer).UpdateGames(ctx, req.(*UpdateGamesReq))
}
return interceptor(ctx, in, info, handler)
}
func _Public_DelGames_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(DelGamesReq)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(PublicServer).DelGames(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: Public_DelGames_FullMethodName,
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(PublicServer).DelGames(ctx, req.(*DelGamesReq))
}
return interceptor(ctx, in, info, handler)
}
func _Public_GetGamesById_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(GetGamesByIdReq)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(PublicServer).GetGamesById(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: Public_GetGamesById_FullMethodName,
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(PublicServer).GetGamesById(ctx, req.(*GetGamesByIdReq))
}
return interceptor(ctx, in, info, handler)
}
func _Public_SearchGames_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(SearchGamesReq)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(PublicServer).SearchGames(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: Public_SearchGames_FullMethodName,
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(PublicServer).SearchGames(ctx, req.(*SearchGamesReq))
}
return interceptor(ctx, in, info, handler)
}
// Public_ServiceDesc is the grpc.ServiceDesc for Public service.
// It's only intended for direct use with grpc.RegisterService,
// and not to be introspected or modified (even as a copy)
var Public_ServiceDesc = grpc.ServiceDesc{
ServiceName: "pb.public",
HandlerType: (*PublicServer)(nil),
Methods: []grpc.MethodDesc{
{
MethodName: "AddGames",
Handler: _Public_AddGames_Handler,
},
{
MethodName: "UpdateGames",
Handler: _Public_UpdateGames_Handler,
},
{
MethodName: "DelGames",
Handler: _Public_DelGames_Handler,
},
{
MethodName: "GetGamesById",
Handler: _Public_GetGamesById_Handler,
},
{
MethodName: "SearchGames",
Handler: _Public_SearchGames_Handler,
},
},
Streams: []grpc.StreamDesc{},
Metadata: "game.proto",
}