youtu_grpc/app/ranking_service/internal/server/ranking_service_server.go
2025-02-14 17:36:27 +08:00

40 lines
1.2 KiB
Go

// Code generated by goctl. DO NOT EDIT.
// goctl 1.7.6
// Source: ranking_service.proto
package server
import (
"context"
"gitea.youtukeji.com.cn/youtu/youtu_grpc/app/ranking_service/internal/logic"
"gitea.youtukeji.com.cn/youtu/youtu_grpc/app/ranking_service/internal/svc"
"gitea.youtukeji.com.cn/youtu/youtu_grpc/app/ranking_service/ranking"
)
type RankingServiceServer struct {
svcCtx *svc.ServiceContext
ranking.UnimplementedRankingServiceServer
}
func NewRankingServiceServer(svcCtx *svc.ServiceContext) *RankingServiceServer {
return &RankingServiceServer{
svcCtx: svcCtx,
}
}
func (s *RankingServiceServer) Ping(ctx context.Context, in *ranking.Request) (*ranking.Response, error) {
l := logic.NewPingLogic(ctx, s.svcCtx)
return l.Ping(in)
}
func (s *RankingServiceServer) SetUserGameScore(ctx context.Context, in *ranking.SetUserGameScoreRequest) (*ranking.BaseResult, error) {
l := logic.NewSetUserGameScoreLogic(ctx, s.svcCtx)
return l.SetUserGameScore(in)
}
func (s *RankingServiceServer) GetRankingList(ctx context.Context, in *ranking.GetRankingListRequest) (*ranking.GetRankingListResponse, error) {
l := logic.NewGetRankingListLogic(ctx, s.svcCtx)
return l.GetRankingList(in)
}