2025-02-14 17:36:17 +08:00
|
|
|
// 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)
|
|
|
|
}
|
2025-02-17 16:44:44 +08:00
|
|
|
|
|
|
|
func (s *RankingServiceServer) AddUserGameScore(ctx context.Context, in *ranking.AddUserGameScoreRequest) (*ranking.BaseResult, error) {
|
|
|
|
l := logic.NewAddUserGameScoreLogic(ctx, s.svcCtx)
|
|
|
|
return l.AddUserGameScore(in)
|
|
|
|
}
|
|
|
|
|
|
|
|
func (s *RankingServiceServer) RemoveRanking(ctx context.Context, in *ranking.RemoveRankingRequest) (*ranking.BaseResult, error) {
|
|
|
|
l := logic.NewRemoveRankingLogic(ctx, s.svcCtx)
|
|
|
|
return l.RemoveRanking(in)
|
|
|
|
}
|