Documentation
¶
Index ¶
- Variables
- func AchievementService_GetUserBadges_Handler(svr interface{}, ctx context.Context, f server.FilterFunc) (interface{}, error)
- func AchievementService_GetUserReputation_Handler(svr interface{}, ctx context.Context, f server.FilterFunc) (interface{}, error)
- func RegisterAchievementService(s server.Service, svr AchievementService)
- type AchievementClientProxy
- type AchievementClientProxyImpl
- func (c *AchievementClientProxyImpl) GetUserBadges(ctx context.Context, req *GetUserBadgesRequest, opts ...client.Option) (*GetUserBadgesResponse, error)
- func (c *AchievementClientProxyImpl) GetUserReputation(ctx context.Context, req *GetUserReputationRequest, opts ...client.Option) (*GetUserReputationResponse, error)
- type AchievementService
- type Badge
- func (*Badge) Descriptor() ([]byte, []int)deprecated
- func (x *Badge) GetCount() uint32
- func (x *Badge) GetFirstAcquireTsSec() int64
- func (x *Badge) GetName() string
- func (*Badge) ProtoMessage()
- func (x *Badge) ProtoReflect() protoreflect.Message
- func (x *Badge) Reset()
- func (x *Badge) String() string
- type GetUserBadgesRequest
- func (*GetUserBadgesRequest) Descriptor() ([]byte, []int)deprecated
- func (x *GetUserBadgesRequest) GetMetadata() *common.Metadata
- func (x *GetUserBadgesRequest) GetUserId() string
- func (*GetUserBadgesRequest) ProtoMessage()
- func (x *GetUserBadgesRequest) ProtoReflect() protoreflect.Message
- func (x *GetUserBadgesRequest) Reset()
- func (x *GetUserBadgesRequest) String() string
- type GetUserBadgesResponse
- func (*GetUserBadgesResponse) Descriptor() ([]byte, []int)deprecated
- func (x *GetUserBadgesResponse) GetData() *GetUserBadgesResponse_Data
- func (x *GetUserBadgesResponse) GetErrCode() int32
- func (x *GetUserBadgesResponse) GetErrMsg() string
- func (*GetUserBadgesResponse) ProtoMessage()
- func (x *GetUserBadgesResponse) ProtoReflect() protoreflect.Message
- func (x *GetUserBadgesResponse) Reset()
- func (x *GetUserBadgesResponse) String() string
- type GetUserBadgesResponse_Data
- func (*GetUserBadgesResponse_Data) Descriptor() ([]byte, []int)deprecated
- func (x *GetUserBadgesResponse_Data) GetBadges() []*Badge
- func (*GetUserBadgesResponse_Data) ProtoMessage()
- func (x *GetUserBadgesResponse_Data) ProtoReflect() protoreflect.Message
- func (x *GetUserBadgesResponse_Data) Reset()
- func (x *GetUserBadgesResponse_Data) String() string
- type GetUserReputationRequest
- func (*GetUserReputationRequest) Descriptor() ([]byte, []int)deprecated
- func (x *GetUserReputationRequest) GetMetadata() *common.Metadata
- func (x *GetUserReputationRequest) GetUserId() string
- func (*GetUserReputationRequest) ProtoMessage()
- func (x *GetUserReputationRequest) ProtoReflect() protoreflect.Message
- func (x *GetUserReputationRequest) Reset()
- func (x *GetUserReputationRequest) String() string
- type GetUserReputationResponse
- func (*GetUserReputationResponse) Descriptor() ([]byte, []int)deprecated
- func (x *GetUserReputationResponse) GetData() *GetUserReputationResponse_Data
- func (x *GetUserReputationResponse) GetErrCode() int32
- func (x *GetUserReputationResponse) GetErrMsg() string
- func (*GetUserReputationResponse) ProtoMessage()
- func (x *GetUserReputationResponse) ProtoReflect() protoreflect.Message
- func (x *GetUserReputationResponse) Reset()
- func (x *GetUserReputationResponse) String() string
- type GetUserReputationResponse_Data
- func (*GetUserReputationResponse_Data) Descriptor() ([]byte, []int)deprecated
- func (x *GetUserReputationResponse_Data) GetReputation() *Reputation
- func (*GetUserReputationResponse_Data) ProtoMessage()
- func (x *GetUserReputationResponse_Data) ProtoReflect() protoreflect.Message
- func (x *GetUserReputationResponse_Data) Reset()
- func (x *GetUserReputationResponse_Data) String() string
- type Reputation
- func (*Reputation) Descriptor() ([]byte, []int)deprecated
- func (x *Reputation) GetExpPoints() uint32
- func (x *Reputation) GetRank() uint32
- func (x *Reputation) GetRankName() string
- func (*Reputation) ProtoMessage()
- func (x *Reputation) ProtoReflect() protoreflect.Message
- func (x *Reputation) Reset()
- func (x *Reputation) String() string
- type UnimplementedAchievement
Constants ¶
This section is empty.
Variables ¶
var AchievementServer_ServiceDesc = server.ServiceDesc{ ServiceName: "trpc.demo.achieve.Achievement", HandlerType: ((*AchievementService)(nil)), Methods: []server.Method{ { Name: "/trpc.demo.achieve.Achievement/GetUserReputation", Func: AchievementService_GetUserReputation_Handler, }, { Name: "/trpc.demo.achieve.Achievement/GetUserBadges", Func: AchievementService_GetUserBadges_Handler, }, }, }
AchievementServer_ServiceDesc descriptor for server.RegisterService.
var File_achieve_proto protoreflect.FileDescriptor
var NewAchievementClientProxy = func(opts ...client.Option) AchievementClientProxy { return &AchievementClientProxyImpl{client: client.DefaultClient, opts: opts} }
Functions ¶
func AchievementService_GetUserBadges_Handler ¶
func AchievementService_GetUserBadges_Handler(svr interface{}, ctx context.Context, f server.FilterFunc) (interface{}, error)
func AchievementService_GetUserReputation_Handler ¶
func AchievementService_GetUserReputation_Handler(svr interface{}, ctx context.Context, f server.FilterFunc) (interface{}, error)
func RegisterAchievementService ¶
func RegisterAchievementService(s server.Service, svr AchievementService)
RegisterAchievementService registers service.
Types ¶
type AchievementClientProxy ¶
type AchievementClientProxy interface {
GetUserReputation(ctx context.Context, req *GetUserReputationRequest, opts ...client.Option) (rsp *GetUserReputationResponse, err error)
GetUserBadges(ctx context.Context, req *GetUserBadgesRequest, opts ...client.Option) (rsp *GetUserBadgesResponse, err error)
}
AchievementClientProxy defines service client proxy
type AchievementClientProxyImpl ¶
type AchievementClientProxyImpl struct {
// contains filtered or unexported fields
}
func (*AchievementClientProxyImpl) GetUserBadges ¶
func (c *AchievementClientProxyImpl) GetUserBadges(ctx context.Context, req *GetUserBadgesRequest, opts ...client.Option) (*GetUserBadgesResponse, error)
func (*AchievementClientProxyImpl) GetUserReputation ¶
func (c *AchievementClientProxyImpl) GetUserReputation(ctx context.Context, req *GetUserReputationRequest, opts ...client.Option) (*GetUserReputationResponse, error)
type AchievementService ¶
type AchievementService interface {
GetUserReputation(ctx context.Context, req *GetUserReputationRequest) (*GetUserReputationResponse, error)
GetUserBadges(ctx context.Context, req *GetUserBadgesRequest) (*GetUserBadgesResponse, error)
}
AchievementService defines service.
type Badge ¶
type Badge struct {
Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` // 徽章名称
Count uint32 `protobuf:"varint,2,opt,name=count,proto3" json:"count,omitempty"` // 徽章个数
FirstAcquireTsSec int64 `protobuf:"varint,3,opt,name=first_acquire_ts_sec,json=firstAcquireTsSec,proto3" json:"first_acquire_ts_sec,omitempty"` // 首次获得时间
// contains filtered or unexported fields
}
func (*Badge) Descriptor
deprecated
func (*Badge) GetFirstAcquireTsSec ¶
func (*Badge) ProtoMessage ¶
func (*Badge) ProtoMessage()
func (*Badge) ProtoReflect ¶
func (x *Badge) ProtoReflect() protoreflect.Message
type GetUserBadgesRequest ¶
type GetUserBadgesRequest struct {
Metadata *common.Metadata `protobuf:"bytes,1,opt,name=metadata,proto3" json:"metadata,omitempty"`
UserId string `protobuf:"bytes,2,opt,name=user_id,json=userId,proto3" json:"user_id,omitempty"`
// contains filtered or unexported fields
}
func (*GetUserBadgesRequest) Descriptor
deprecated
func (*GetUserBadgesRequest) Descriptor() ([]byte, []int)
Deprecated: Use GetUserBadgesRequest.ProtoReflect.Descriptor instead.
func (*GetUserBadgesRequest) GetMetadata ¶
func (x *GetUserBadgesRequest) GetMetadata() *common.Metadata
func (*GetUserBadgesRequest) GetUserId ¶
func (x *GetUserBadgesRequest) GetUserId() string
func (*GetUserBadgesRequest) ProtoMessage ¶
func (*GetUserBadgesRequest) ProtoMessage()
func (*GetUserBadgesRequest) ProtoReflect ¶
func (x *GetUserBadgesRequest) ProtoReflect() protoreflect.Message
func (*GetUserBadgesRequest) Reset ¶
func (x *GetUserBadgesRequest) Reset()
func (*GetUserBadgesRequest) String ¶
func (x *GetUserBadgesRequest) String() string
type GetUserBadgesResponse ¶
type GetUserBadgesResponse struct {
ErrCode int32 `protobuf:"varint,1,opt,name=err_code,json=errCode,proto3" json:"err_code"`
ErrMsg string `protobuf:"bytes,2,opt,name=err_msg,json=errMsg,proto3" json:"err_msg,omitempty"`
Data *GetUserBadgesResponse_Data `protobuf:"bytes,3,opt,name=data,proto3" json:"data,omitempty"`
// contains filtered or unexported fields
}
func (*GetUserBadgesResponse) Descriptor
deprecated
func (*GetUserBadgesResponse) Descriptor() ([]byte, []int)
Deprecated: Use GetUserBadgesResponse.ProtoReflect.Descriptor instead.
func (*GetUserBadgesResponse) GetData ¶
func (x *GetUserBadgesResponse) GetData() *GetUserBadgesResponse_Data
func (*GetUserBadgesResponse) GetErrCode ¶
func (x *GetUserBadgesResponse) GetErrCode() int32
func (*GetUserBadgesResponse) GetErrMsg ¶
func (x *GetUserBadgesResponse) GetErrMsg() string
func (*GetUserBadgesResponse) ProtoMessage ¶
func (*GetUserBadgesResponse) ProtoMessage()
func (*GetUserBadgesResponse) ProtoReflect ¶
func (x *GetUserBadgesResponse) ProtoReflect() protoreflect.Message
func (*GetUserBadgesResponse) Reset ¶
func (x *GetUserBadgesResponse) Reset()
func (*GetUserBadgesResponse) String ¶
func (x *GetUserBadgesResponse) String() string
type GetUserBadgesResponse_Data ¶
type GetUserBadgesResponse_Data struct {
Badges []*Badge `protobuf:"bytes,1,rep,name=badges,proto3" json:"badges,omitempty"`
// contains filtered or unexported fields
}
func (*GetUserBadgesResponse_Data) Descriptor
deprecated
func (*GetUserBadgesResponse_Data) Descriptor() ([]byte, []int)
Deprecated: Use GetUserBadgesResponse_Data.ProtoReflect.Descriptor instead.
func (*GetUserBadgesResponse_Data) GetBadges ¶
func (x *GetUserBadgesResponse_Data) GetBadges() []*Badge
func (*GetUserBadgesResponse_Data) ProtoMessage ¶
func (*GetUserBadgesResponse_Data) ProtoMessage()
func (*GetUserBadgesResponse_Data) ProtoReflect ¶
func (x *GetUserBadgesResponse_Data) ProtoReflect() protoreflect.Message
func (*GetUserBadgesResponse_Data) Reset ¶
func (x *GetUserBadgesResponse_Data) Reset()
func (*GetUserBadgesResponse_Data) String ¶
func (x *GetUserBadgesResponse_Data) String() string
type GetUserReputationRequest ¶
type GetUserReputationRequest struct {
Metadata *common.Metadata `protobuf:"bytes,1,opt,name=metadata,proto3" json:"metadata,omitempty"`
UserId string `protobuf:"bytes,2,opt,name=user_id,json=userId,proto3" json:"user_id,omitempty"`
// contains filtered or unexported fields
}
func (*GetUserReputationRequest) Descriptor
deprecated
func (*GetUserReputationRequest) Descriptor() ([]byte, []int)
Deprecated: Use GetUserReputationRequest.ProtoReflect.Descriptor instead.
func (*GetUserReputationRequest) GetMetadata ¶
func (x *GetUserReputationRequest) GetMetadata() *common.Metadata
func (*GetUserReputationRequest) GetUserId ¶
func (x *GetUserReputationRequest) GetUserId() string
func (*GetUserReputationRequest) ProtoMessage ¶
func (*GetUserReputationRequest) ProtoMessage()
func (*GetUserReputationRequest) ProtoReflect ¶
func (x *GetUserReputationRequest) ProtoReflect() protoreflect.Message
func (*GetUserReputationRequest) Reset ¶
func (x *GetUserReputationRequest) Reset()
func (*GetUserReputationRequest) String ¶
func (x *GetUserReputationRequest) String() string
type GetUserReputationResponse ¶
type GetUserReputationResponse struct {
ErrCode int32 `protobuf:"varint,1,opt,name=err_code,json=errCode,proto3" json:"err_code"`
ErrMsg string `protobuf:"bytes,2,opt,name=err_msg,json=errMsg,proto3" json:"err_msg,omitempty"`
Data *GetUserReputationResponse_Data `protobuf:"bytes,3,opt,name=data,proto3" json:"data,omitempty"`
// contains filtered or unexported fields
}
func (*GetUserReputationResponse) Descriptor
deprecated
func (*GetUserReputationResponse) Descriptor() ([]byte, []int)
Deprecated: Use GetUserReputationResponse.ProtoReflect.Descriptor instead.
func (*GetUserReputationResponse) GetData ¶
func (x *GetUserReputationResponse) GetData() *GetUserReputationResponse_Data
func (*GetUserReputationResponse) GetErrCode ¶
func (x *GetUserReputationResponse) GetErrCode() int32
func (*GetUserReputationResponse) GetErrMsg ¶
func (x *GetUserReputationResponse) GetErrMsg() string
func (*GetUserReputationResponse) ProtoMessage ¶
func (*GetUserReputationResponse) ProtoMessage()
func (*GetUserReputationResponse) ProtoReflect ¶
func (x *GetUserReputationResponse) ProtoReflect() protoreflect.Message
func (*GetUserReputationResponse) Reset ¶
func (x *GetUserReputationResponse) Reset()
func (*GetUserReputationResponse) String ¶
func (x *GetUserReputationResponse) String() string
type GetUserReputationResponse_Data ¶
type GetUserReputationResponse_Data struct {
Reputation *Reputation `protobuf:"bytes,1,opt,name=reputation,proto3" json:"reputation,omitempty"`
// contains filtered or unexported fields
}
func (*GetUserReputationResponse_Data) Descriptor
deprecated
func (*GetUserReputationResponse_Data) Descriptor() ([]byte, []int)
Deprecated: Use GetUserReputationResponse_Data.ProtoReflect.Descriptor instead.
func (*GetUserReputationResponse_Data) GetReputation ¶
func (x *GetUserReputationResponse_Data) GetReputation() *Reputation
func (*GetUserReputationResponse_Data) ProtoMessage ¶
func (*GetUserReputationResponse_Data) ProtoMessage()
func (*GetUserReputationResponse_Data) ProtoReflect ¶
func (x *GetUserReputationResponse_Data) ProtoReflect() protoreflect.Message
func (*GetUserReputationResponse_Data) Reset ¶
func (x *GetUserReputationResponse_Data) Reset()
func (*GetUserReputationResponse_Data) String ¶
func (x *GetUserReputationResponse_Data) String() string
type Reputation ¶
type Reputation struct {
ExpPoints uint32 `protobuf:"varint,1,opt,name=exp_points,json=expPoints,proto3" json:"exp_points,omitempty"` // 经验积分
Rank uint32 `protobuf:"varint,2,opt,name=rank,proto3" json:"rank,omitempty"` // 等级
RankName string `protobuf:"bytes,3,opt,name=rank_name,json=rankName,proto3" json:"rank_name,omitempty"` // 等级描述
// contains filtered or unexported fields
}
func (*Reputation) Descriptor
deprecated
func (*Reputation) Descriptor() ([]byte, []int)
Deprecated: Use Reputation.ProtoReflect.Descriptor instead.
func (*Reputation) GetExpPoints ¶
func (x *Reputation) GetExpPoints() uint32
func (*Reputation) GetRank ¶
func (x *Reputation) GetRank() uint32
func (*Reputation) GetRankName ¶
func (x *Reputation) GetRankName() string
func (*Reputation) ProtoMessage ¶
func (*Reputation) ProtoMessage()
func (*Reputation) ProtoReflect ¶
func (x *Reputation) ProtoReflect() protoreflect.Message
func (*Reputation) Reset ¶
func (x *Reputation) Reset()
func (*Reputation) String ¶
func (x *Reputation) String() string
type UnimplementedAchievement ¶
type UnimplementedAchievement struct{}
func (*UnimplementedAchievement) GetUserBadges ¶
func (s *UnimplementedAchievement) GetUserBadges(ctx context.Context, req *GetUserBadgesRequest) (*GetUserBadgesResponse, error)
func (*UnimplementedAchievement) GetUserReputation ¶
func (s *UnimplementedAchievement) GetUserReputation(ctx context.Context, req *GetUserReputationRequest) (*GetUserReputationResponse, error)