fix: api descript
This commit is contained in:
@@ -0,0 +1,50 @@
|
||||
// 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 PublicServer struct {
|
||||
svcCtx *svc.ServiceContext
|
||||
pb.UnimplementedPublicServer
|
||||
}
|
||||
|
||||
func NewPublicServer(svcCtx *svc.ServiceContext) *PublicServer {
|
||||
return &PublicServer{
|
||||
svcCtx: svcCtx,
|
||||
}
|
||||
}
|
||||
|
||||
// -----------------------games-----------------------
|
||||
func (s *PublicServer) AddGames(ctx context.Context, in *pb.AddGamesReq) (*pb.AddGamesResp, error) {
|
||||
l := logic.NewAddGamesLogic(ctx, s.svcCtx)
|
||||
return l.AddGames(in)
|
||||
}
|
||||
|
||||
func (s *PublicServer) UpdateGames(ctx context.Context, in *pb.UpdateGamesReq) (*pb.UpdateGamesResp, error) {
|
||||
l := logic.NewUpdateGamesLogic(ctx, s.svcCtx)
|
||||
return l.UpdateGames(in)
|
||||
}
|
||||
|
||||
func (s *PublicServer) DelGames(ctx context.Context, in *pb.DelGamesReq) (*pb.DelGamesResp, error) {
|
||||
l := logic.NewDelGamesLogic(ctx, s.svcCtx)
|
||||
return l.DelGames(in)
|
||||
}
|
||||
|
||||
func (s *PublicServer) GetGamesById(ctx context.Context, in *pb.GetGamesByIdReq) (*pb.GetGamesByIdResp, error) {
|
||||
l := logic.NewGetGamesByIdLogic(ctx, s.svcCtx)
|
||||
return l.GetGamesById(in)
|
||||
}
|
||||
|
||||
func (s *PublicServer) SearchGames(ctx context.Context, in *pb.SearchGamesReq) (*pb.SearchGamesResp, error) {
|
||||
l := logic.NewSearchGamesLogic(ctx, s.svcCtx)
|
||||
return l.SearchGames(in)
|
||||
}
|
||||
Reference in New Issue
Block a user