Files
juwan-backend/app/game/rpc/internal/server/gameServiceServer.go
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

51 lines
1.4 KiB
Go

// Code generated by goctl. DO NOT EDIT.
// goctl 1.9.2
// Source: game.proto
package server
import (
"context"
"juwan-backend/app/game/rpc/internal/logic"
"juwan-backend/app/game/rpc/internal/svc"
"juwan-backend/app/game/rpc/pb"
)
type GameServiceServer struct {
svcCtx *svc.ServiceContext
pb.UnimplementedGameServiceServer
}
func NewGameServiceServer(svcCtx *svc.ServiceContext) *GameServiceServer {
return &GameServiceServer{
svcCtx: svcCtx,
}
}
// -----------------------games-----------------------
func (s *GameServiceServer) AddGames(ctx context.Context, in *pb.AddGamesReq) (*pb.AddGamesResp, error) {
l := logic.NewAddGamesLogic(ctx, s.svcCtx)
return l.AddGames(in)
}
func (s *GameServiceServer) UpdateGames(ctx context.Context, in *pb.UpdateGamesReq) (*pb.UpdateGamesResp, error) {
l := logic.NewUpdateGamesLogic(ctx, s.svcCtx)
return l.UpdateGames(in)
}
func (s *GameServiceServer) DelGames(ctx context.Context, in *pb.DelGamesReq) (*pb.DelGamesResp, error) {
l := logic.NewDelGamesLogic(ctx, s.svcCtx)
return l.DelGames(in)
}
func (s *GameServiceServer) GetGamesById(ctx context.Context, in *pb.GetGamesByIdReq) (*pb.GetGamesByIdResp, error) {
l := logic.NewGetGamesByIdLogic(ctx, s.svcCtx)
return l.GetGamesById(in)
}
func (s *GameServiceServer) SearchGames(ctx context.Context, in *pb.SearchGamesReq) (*pb.SearchGamesResp, error) {
l := logic.NewSearchGamesLogic(ctx, s.svcCtx)
return l.SearchGames(in)
}