Files
juwan-backend/desc/rpc/game.proto
T
wwweww 19cc7a778c Refactor: Remove deprecated gRPC service files and implement new API structure
- Deleted old gRPC service definitions in `game_grpc.pb.go` and `public.go`.
- Added new API server implementations for objectstory, player, and shop services.
- Introduced configuration files for new APIs in `etc/*.yaml`.
- Created main entry points for each service in `objectstory.go`, `player.go`, and `shop.go`.
- Removed unused user update handler and user API files.
- Added utility functions for context management and HTTP header parsing.
- Introduced PostgreSQL backup configuration in `backup/postgreSql.yaml`.
2026-02-28 18:35:56 +08:00

98 lines
2.1 KiB
Protocol Buffer

syntax = "proto3";
option go_package ="./pb";
package pb;
// ------------------------------------
// Messages
// ------------------------------------
//--------------------------------games--------------------------------
message Games {
int64 id = 1; //id
string name = 2; //name
string icon = 3; //icon
string category = 4; //category
int64 sortOrder = 5; //sortOrder
bool isActive = 6; //isActive
int64 createdAt = 7; //createdAt
int64 updatedAt = 8; //updatedAt
}
message AddGamesReq {
string name = 1; //name
string icon = 2; //icon
string category = 3; //category
int64 sortOrder = 4; //sortOrder
bool isActive = 5; //isActive
int64 createdAt = 6; //createdAt
int64 updatedAt = 7; //updatedAt
}
message AddGamesResp {
}
message UpdateGamesReq {
int64 id = 1; //id
string name = 2; //name
string icon = 3; //icon
string category = 4; //category
int64 sortOrder = 5; //sortOrder
bool isActive = 6; //isActive
int64 createdAt = 7; //createdAt
int64 updatedAt = 8; //updatedAt
}
message UpdateGamesResp {
}
message DelGamesReq {
int64 id = 1; //id
}
message DelGamesResp {
}
message GetGamesByIdReq {
int64 id = 1; //id
}
message GetGamesByIdResp {
Games games = 1; //games
}
message SearchGamesReq {
int64 page = 1; //page
int64 limit = 2; //limit
int64 id = 3; //id
optional string name = 4; //name
optional string icon = 5; //icon
optional string category = 6; //category
optional int64 sortOrder = 7; //sortOrder
optional bool isActive = 8; //isActive
optional int64 createdAt = 9; //createdAt
optional int64 updatedAt = 10; //updatedAt
}
message SearchGamesResp {
repeated Games games = 1; //games
}
// ------------------------------------
// Rpc Func
// ------------------------------------
service GameService {
//-----------------------games-----------------------
rpc AddGames(AddGamesReq) returns (AddGamesResp);
rpc UpdateGames(UpdateGamesReq) returns (UpdateGamesResp);
rpc DelGames(DelGamesReq) returns (DelGamesResp);
rpc GetGamesById(GetGamesByIdReq) returns (GetGamesByIdResp);
rpc SearchGames(SearchGamesReq) returns (SearchGamesResp);
}