You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

162 lines
7.2 KiB
Go

// Code generated by goctl. DO NOT EDIT!
// Source: user_center.proto
package usercenter
import (
"context"
"live-service/app/user_center/rpc/pb"
"github.com/zeromicro/go-zero/zrpc"
"google.golang.org/grpc"
)
type (
ChangeIntegralReq = pb.ChangeIntegralReq
ChangeIntegralResp = pb.ChangeIntegralResp
DrawGiftPackReq = pb.DrawGiftPackReq
DrawGiftPackResp = pb.DrawGiftPackResp
Empty = pb.Empty
GiftPackItem = pb.GiftPackItem
PlatformUserReq = pb.PlatformUserReq
PlatformUserResp = pb.PlatformUserResp
RankPvpReq = pb.RankPvpReq
RankPvpResp = pb.RankPvpResp
RankPvpResp_Item = pb.RankPvpResp_Item
RankPvpSubmitReq = pb.RankPvpSubmitReq
RankPvpSubmitResp = pb.RankPvpSubmitResp
RankPvpSubmitResp_Item = pb.RankPvpSubmitResp_Item
RankPvpSubmitResp_Result = pb.RankPvpSubmitResp_Result
StatPvPFirstBloodReq = pb.StatPvPFirstBloodReq
StatPvPKillReq = pb.StatPvPKillReq
StatPvPReportReq = pb.StatPvPReportReq
StatPvPReportReq_General = pb.StatPvPReportReq_General
StatPvPReportReq_Item = pb.StatPvPReportReq_Item
StatPvPReportResp = pb.StatPvPReportResp
StatPvPReportResp_Item = pb.StatPvPReportResp_Item
User = pb.User
UserBuyNobilityReq = pb.UserBuyNobilityReq
UserBuyNobilityResp = pb.UserBuyNobilityResp
UserCheckInResp = pb.UserCheckInResp
UserIdReq = pb.UserIdReq
UserIdResp = pb.UserIdResp
UserIntegralResp = pb.UserIntegralResp
UserRankReq = pb.UserRankReq
UserRankResp = pb.UserRankResp
UserRankResp_Item = pb.UserRankResp_Item
UserSendGiftReq = pb.UserSendGiftReq
UserSendGiftResp = pb.UserSendGiftResp
UserCenter interface {
// retrievePlatformUser 新增或获取用户
RetrievePlatformUser(ctx context.Context, in *PlatformUserReq, opts ...grpc.CallOption) (*PlatformUserResp, error)
// getUserIdByPUid 通过平台用户id获取系统用户ID
GetUserIdByPUid(ctx context.Context, in *PlatformUserReq, opts ...grpc.CallOption) (*UserIdResp, error)
// ChangeIntegral 新增用户积分
ChangeIntegral(ctx context.Context, in *ChangeIntegralReq, opts ...grpc.CallOption) (*ChangeIntegralResp, error)
// GetUserIntegral 获取用户积分
GetUserIntegral(ctx context.Context, in *UserIdReq, opts ...grpc.CallOption) (*UserIntegralResp, error)
// UserCheckIn 用户签到|打卡
UserCheckIn(ctx context.Context, in *UserIdReq, opts ...grpc.CallOption) (*UserCheckInResp, error)
// UserSendGift 用户赠送礼物
UserSendGift(ctx context.Context, in *UserSendGiftReq, opts ...grpc.CallOption) (*UserSendGiftResp, error)
UserBuyNobility(ctx context.Context, in *UserBuyNobilityReq, opts ...grpc.CallOption) (*UserBuyNobilityResp, error)
StatPvpKill(ctx context.Context, in *StatPvPKillReq, opts ...grpc.CallOption) (*Empty, error)
StatPvpFirstBlood(ctx context.Context, in *StatPvPFirstBloodReq, opts ...grpc.CallOption) (*Empty, error)
StatPvpReport(ctx context.Context, in *StatPvPReportReq, opts ...grpc.CallOption) (*StatPvPReportResp, error)
DrawGiftPack(ctx context.Context, in *DrawGiftPackReq, opts ...grpc.CallOption) (*DrawGiftPackResp, error)
// rankPvp pvp排行
RankPvp(ctx context.Context, in *RankPvpReq, opts ...grpc.CallOption) (*RankPvpResp, error)
RankPvpSubmit(ctx context.Context, in *RankPvpSubmitReq, opts ...grpc.CallOption) (*RankPvpSubmitResp, error)
UserRankPvp(ctx context.Context, in *UserRankReq, opts ...grpc.CallOption) (*UserRankResp, error)
}
defaultUserCenter struct {
cli zrpc.Client
}
)
func NewUserCenter(cli zrpc.Client) UserCenter {
return &defaultUserCenter{
cli: cli,
}
}
// retrievePlatformUser 新增或获取用户
func (m *defaultUserCenter) RetrievePlatformUser(ctx context.Context, in *PlatformUserReq, opts ...grpc.CallOption) (*PlatformUserResp, error) {
client := pb.NewUserCenterClient(m.cli.Conn())
return client.RetrievePlatformUser(ctx, in, opts...)
}
// getUserIdByPUid 通过平台用户id获取系统用户ID
func (m *defaultUserCenter) GetUserIdByPUid(ctx context.Context, in *PlatformUserReq, opts ...grpc.CallOption) (*UserIdResp, error) {
client := pb.NewUserCenterClient(m.cli.Conn())
return client.GetUserIdByPUid(ctx, in, opts...)
}
// ChangeIntegral 新增用户积分
func (m *defaultUserCenter) ChangeIntegral(ctx context.Context, in *ChangeIntegralReq, opts ...grpc.CallOption) (*ChangeIntegralResp, error) {
client := pb.NewUserCenterClient(m.cli.Conn())
return client.ChangeIntegral(ctx, in, opts...)
}
// GetUserIntegral 获取用户积分
func (m *defaultUserCenter) GetUserIntegral(ctx context.Context, in *UserIdReq, opts ...grpc.CallOption) (*UserIntegralResp, error) {
client := pb.NewUserCenterClient(m.cli.Conn())
return client.GetUserIntegral(ctx, in, opts...)
}
// UserCheckIn 用户签到|打卡
func (m *defaultUserCenter) UserCheckIn(ctx context.Context, in *UserIdReq, opts ...grpc.CallOption) (*UserCheckInResp, error) {
client := pb.NewUserCenterClient(m.cli.Conn())
return client.UserCheckIn(ctx, in, opts...)
}
// UserSendGift 用户赠送礼物
func (m *defaultUserCenter) UserSendGift(ctx context.Context, in *UserSendGiftReq, opts ...grpc.CallOption) (*UserSendGiftResp, error) {
client := pb.NewUserCenterClient(m.cli.Conn())
return client.UserSendGift(ctx, in, opts...)
}
func (m *defaultUserCenter) UserBuyNobility(ctx context.Context, in *UserBuyNobilityReq, opts ...grpc.CallOption) (*UserBuyNobilityResp, error) {
client := pb.NewUserCenterClient(m.cli.Conn())
return client.UserBuyNobility(ctx, in, opts...)
}
func (m *defaultUserCenter) StatPvpKill(ctx context.Context, in *StatPvPKillReq, opts ...grpc.CallOption) (*Empty, error) {
client := pb.NewUserCenterClient(m.cli.Conn())
return client.StatPvpKill(ctx, in, opts...)
}
func (m *defaultUserCenter) StatPvpFirstBlood(ctx context.Context, in *StatPvPFirstBloodReq, opts ...grpc.CallOption) (*Empty, error) {
client := pb.NewUserCenterClient(m.cli.Conn())
return client.StatPvpFirstBlood(ctx, in, opts...)
}
func (m *defaultUserCenter) StatPvpReport(ctx context.Context, in *StatPvPReportReq, opts ...grpc.CallOption) (*StatPvPReportResp, error) {
client := pb.NewUserCenterClient(m.cli.Conn())
return client.StatPvpReport(ctx, in, opts...)
}
func (m *defaultUserCenter) DrawGiftPack(ctx context.Context, in *DrawGiftPackReq, opts ...grpc.CallOption) (*DrawGiftPackResp, error) {
client := pb.NewUserCenterClient(m.cli.Conn())
return client.DrawGiftPack(ctx, in, opts...)
}
// rankPvp pvp排行
func (m *defaultUserCenter) RankPvp(ctx context.Context, in *RankPvpReq, opts ...grpc.CallOption) (*RankPvpResp, error) {
client := pb.NewUserCenterClient(m.cli.Conn())
return client.RankPvp(ctx, in, opts...)
}
func (m *defaultUserCenter) RankPvpSubmit(ctx context.Context, in *RankPvpSubmitReq, opts ...grpc.CallOption) (*RankPvpSubmitResp, error) {
client := pb.NewUserCenterClient(m.cli.Conn())
return client.RankPvpSubmit(ctx, in, opts...)
}
func (m *defaultUserCenter) UserRankPvp(ctx context.Context, in *UserRankReq, opts ...grpc.CallOption) (*UserRankResp, error) {
client := pb.NewUserCenterClient(m.cli.Conn())
return client.UserRankPvp(ctx, in, opts...)
}