56 lines
1.9 KiB
Go
56 lines
1.9 KiB
Go
// Code generated by goctl. DO NOT EDIT.
|
|
// goctl 1.7.6
|
|
// Source: ranking.proto
|
|
|
|
package ranking_client
|
|
|
|
import (
|
|
"context"
|
|
|
|
"gitea.youtukeji.com.cn/youtu/youtu_grpc/app/ranking/ranking"
|
|
|
|
"github.com/zeromicro/go-zero/zrpc"
|
|
"google.golang.org/grpc"
|
|
)
|
|
|
|
type (
|
|
BaseResult = ranking.BaseResult
|
|
GetRankingListRequest = ranking.GetRankingListRequest
|
|
GetRankingListResponse = ranking.GetRankingListResponse
|
|
RankingList = ranking.RankingList
|
|
Request = ranking.Request
|
|
Response = ranking.Response
|
|
SetUserGameScoreRequest = ranking.SetUserGameScoreRequest
|
|
|
|
RankingManagement interface {
|
|
Ping(ctx context.Context, in *Request, opts ...grpc.CallOption) (*Response, error)
|
|
SetUserGameScore(ctx context.Context, in *SetUserGameScoreRequest, opts ...grpc.CallOption) (*BaseResult, error)
|
|
GetRankingList(ctx context.Context, in *GetRankingListRequest, opts ...grpc.CallOption) (*GetRankingListResponse, error)
|
|
}
|
|
|
|
defaultRankingManagement struct {
|
|
cli zrpc.Client
|
|
}
|
|
)
|
|
|
|
func NewRankingManagement(cli zrpc.Client) RankingManagement {
|
|
return &defaultRankingManagement{
|
|
cli: cli,
|
|
}
|
|
}
|
|
|
|
func (m *defaultRankingManagement) Ping(ctx context.Context, in *Request, opts ...grpc.CallOption) (*Response, error) {
|
|
client := ranking.NewRankingManagementClient(m.cli.Conn())
|
|
return client.Ping(ctx, in, opts...)
|
|
}
|
|
|
|
func (m *defaultRankingManagement) SetUserGameScore(ctx context.Context, in *SetUserGameScoreRequest, opts ...grpc.CallOption) (*BaseResult, error) {
|
|
client := ranking.NewRankingManagementClient(m.cli.Conn())
|
|
return client.SetUserGameScore(ctx, in, opts...)
|
|
}
|
|
|
|
func (m *defaultRankingManagement) GetRankingList(ctx context.Context, in *GetRankingListRequest, opts ...grpc.CallOption) (*GetRankingListResponse, error) {
|
|
client := ranking.NewRankingManagementClient(m.cli.Conn())
|
|
return client.GetRankingList(ctx, in, opts...)
|
|
}
|