Documentation ¶
Index ¶
- Variables
- func RegisterAlgorithmServiceServer(s *grpc.Server, srv AlgorithmServiceServer)
- type AlgorithmItem
- func (*AlgorithmItem) Descriptor() ([]byte, []int)deprecated
- func (x *AlgorithmItem) GetID() string
- func (x *AlgorithmItem) GetScore() float64
- func (*AlgorithmItem) ProtoMessage()
- func (x *AlgorithmItem) ProtoReflect() protoreflect.Message
- func (x *AlgorithmItem) Reset()
- func (x *AlgorithmItem) String() string
- type AlgorithmServiceClient
- type AlgorithmServiceServer
- type ItemCFReq
- type ItemCFRsp
- type UnimplementedAlgorithmServiceServer
- type UserCFReq
- type UserCFRsp
Constants ¶
This section is empty.
Variables ¶
View Source
var File_algorithm_proto protoreflect.FileDescriptor
Functions ¶
func RegisterAlgorithmServiceServer ¶
func RegisterAlgorithmServiceServer(s *grpc.Server, srv AlgorithmServiceServer)
Types ¶
type AlgorithmItem ¶
type AlgorithmItem struct { ID string `protobuf:"bytes,1,opt,name=ID,proto3" json:"ID,omitempty"` //item id Score float64 `protobuf:"fixed64,2,opt,name=Score,proto3" json:"Score,omitempty"` //打分值 // contains filtered or unexported fields }
func (*AlgorithmItem) Descriptor
deprecated
func (*AlgorithmItem) Descriptor() ([]byte, []int)
Deprecated: Use AlgorithmItem.ProtoReflect.Descriptor instead.
func (*AlgorithmItem) GetID ¶
func (x *AlgorithmItem) GetID() string
func (*AlgorithmItem) GetScore ¶
func (x *AlgorithmItem) GetScore() float64
func (*AlgorithmItem) ProtoMessage ¶
func (*AlgorithmItem) ProtoMessage()
func (*AlgorithmItem) ProtoReflect ¶
func (x *AlgorithmItem) ProtoReflect() protoreflect.Message
func (*AlgorithmItem) Reset ¶
func (x *AlgorithmItem) Reset()
func (*AlgorithmItem) String ¶
func (x *AlgorithmItem) String() string
type AlgorithmServiceClient ¶
type AlgorithmServiceClient interface { //基于用户的协同过滤,返回相似用户列表 UserCF(ctx context.Context, in *UserCFReq, opts ...grpc.CallOption) (*UserCFRsp, error) //基于Item的协同过滤,返回相似Item列表 ItemCF(ctx context.Context, in *ItemCFReq, opts ...grpc.CallOption) (*ItemCFRsp, error) }
AlgorithmServiceClient is the client API for AlgorithmService service.
For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream.
func NewAlgorithmServiceClient ¶
func NewAlgorithmServiceClient(cc grpc.ClientConnInterface) AlgorithmServiceClient
type AlgorithmServiceServer ¶
type AlgorithmServiceServer interface { //基于用户的协同过滤,返回相似用户列表 UserCF(context.Context, *UserCFReq) (*UserCFRsp, error) //基于Item的协同过滤,返回相似Item列表 ItemCF(context.Context, *ItemCFReq) (*ItemCFRsp, error) }
AlgorithmServiceServer is the server API for AlgorithmService service.
type ItemCFReq ¶
type ItemCFReq struct { Items []*AlgorithmItem `protobuf:"bytes,1,rep,name=items,proto3" json:"items,omitempty"` // contains filtered or unexported fields }
func (*ItemCFReq) Descriptor
deprecated
func (*ItemCFReq) GetItems ¶
func (x *ItemCFReq) GetItems() []*AlgorithmItem
func (*ItemCFReq) ProtoMessage ¶
func (*ItemCFReq) ProtoMessage()
func (*ItemCFReq) ProtoReflect ¶
func (x *ItemCFReq) ProtoReflect() protoreflect.Message
type ItemCFRsp ¶
type ItemCFRsp struct { RelatedItems []*AlgorithmItem `protobuf:"bytes,1,rep,name=relatedItems,proto3" json:"relatedItems,omitempty"` //相关item // contains filtered or unexported fields }
func (*ItemCFRsp) Descriptor
deprecated
func (*ItemCFRsp) GetRelatedItems ¶
func (x *ItemCFRsp) GetRelatedItems() []*AlgorithmItem
func (*ItemCFRsp) ProtoMessage ¶
func (*ItemCFRsp) ProtoMessage()
func (*ItemCFRsp) ProtoReflect ¶
func (x *ItemCFRsp) ProtoReflect() protoreflect.Message
type UnimplementedAlgorithmServiceServer ¶
type UnimplementedAlgorithmServiceServer struct { }
UnimplementedAlgorithmServiceServer can be embedded to have forward compatible implementations.
type UserCFReq ¶
type UserCFReq struct { UserId int32 `protobuf:"varint,1,opt,name=UserId,proto3" json:"UserId,omitempty"` //用户ID // contains filtered or unexported fields }
func (*UserCFReq) Descriptor
deprecated
func (*UserCFReq) ProtoMessage ¶
func (*UserCFReq) ProtoMessage()
func (*UserCFReq) ProtoReflect ¶
func (x *UserCFReq) ProtoReflect() protoreflect.Message
type UserCFRsp ¶
type UserCFRsp struct { RelatedUsers []string `protobuf:"bytes,1,rep,name=relatedUsers,proto3" json:"relatedUsers,omitempty"` // contains filtered or unexported fields }
func (*UserCFRsp) Descriptor
deprecated
func (*UserCFRsp) GetRelatedUsers ¶
func (*UserCFRsp) ProtoMessage ¶
func (*UserCFRsp) ProtoMessage()
func (*UserCFRsp) ProtoReflect ¶
func (x *UserCFRsp) ProtoReflect() protoreflect.Message
Click to show internal directories.
Click to hide internal directories.