achieve

package
v0.0.0-...-dd7b778 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 18, 2025 License: MIT Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
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.

View Source
var File_achieve_proto protoreflect.FileDescriptor
View Source
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 (*AchievementClientProxyImpl) GetUserReputation

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) Descriptor() ([]byte, []int)

Deprecated: Use Badge.ProtoReflect.Descriptor instead.

func (*Badge) GetCount

func (x *Badge) GetCount() uint32

func (*Badge) GetFirstAcquireTsSec

func (x *Badge) GetFirstAcquireTsSec() int64

func (*Badge) GetName

func (x *Badge) GetName() string

func (*Badge) ProtoMessage

func (*Badge) ProtoMessage()

func (*Badge) ProtoReflect

func (x *Badge) ProtoReflect() protoreflect.Message

func (*Badge) Reset

func (x *Badge) Reset()

func (*Badge) String

func (x *Badge) String() string

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 (*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 (*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 (*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 (*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 (*GetUserReputationResponse_Data) Reset

func (x *GetUserReputationResponse_Data) Reset()

func (*GetUserReputationResponse_Data) 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 (*UnimplementedAchievement) GetUserReputation

Directories

Path Synopsis
Package mock is a generated GoMock package.
Package mock is a generated GoMock package.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL