Documentation ¶
Index ¶
- Constants
- Variables
- func RegisterRankServer(s grpc.ServiceRegistrar, srv RankServer)
- type RankClient
- type RankServer
- type Record
- type Request
- func (*Request) Descriptor() ([]byte, []int)deprecated
- func (x *Request) GetExtras() map[string]string
- func (x *Request) GetModelId() string
- func (x *Request) GetRecords() []*Record
- func (x *Request) GetRequestId() string
- func (x *Request) GetUserFeatures() string
- func (x *Request) GetUserId() string
- func (*Request) ProtoMessage()
- func (x *Request) ProtoReflect() protoreflect.Message
- func (x *Request) Reset()
- func (x *Request) String() string
- type Response
- func (*Response) Descriptor() ([]byte, []int)deprecated
- func (x *Response) GetExtras() map[string]string
- func (x *Response) GetRecords() []*Record
- func (x *Response) GetRequestId() string
- func (x *Response) GetStatus() int32
- func (x *Response) GetUserId() string
- func (*Response) ProtoMessage()
- func (x *Response) ProtoReflect() protoreflect.Message
- func (x *Response) Reset()
- func (x *Response) String() string
- type UnimplementedRankServer
- type UnsafeRankServer
Constants ¶
const (
Rank_Rank_FullMethodName = "/longmenapi.Rank/Rank"
)
Variables ¶
var File_longmenapi_proto protoreflect.FileDescriptor
var Rank_ServiceDesc = grpc.ServiceDesc{ ServiceName: "longmenapi.Rank", HandlerType: (*RankServer)(nil), Methods: []grpc.MethodDesc{ { MethodName: "Rank", Handler: _Rank_Rank_Handler, }, }, Streams: []grpc.StreamDesc{}, Metadata: "longmenapi.proto", }
Rank_ServiceDesc is the grpc.ServiceDesc for Rank service. It's only intended for direct use with grpc.RegisterService, and not to be introspected or modified (even as a copy)
Functions ¶
func RegisterRankServer ¶
func RegisterRankServer(s grpc.ServiceRegistrar, srv RankServer)
Types ¶
type RankClient ¶
type RankClient interface {
Rank(ctx context.Context, in *Request, opts ...grpc.CallOption) (*Response, error)
}
RankClient is the client API for Rank service.
For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream.
func NewRankClient ¶
func NewRankClient(cc grpc.ClientConnInterface) RankClient
type RankServer ¶
type RankServer interface { Rank(context.Context, *Request) (*Response, error) // contains filtered or unexported methods }
RankServer is the server API for Rank service. All implementations must embed UnimplementedRankServer for forward compatibility
type Record ¶
type Record struct { Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` Score float32 `protobuf:"fixed32,2,opt,name=score,proto3" json:"score,omitempty"` // contains filtered or unexported fields }
func (*Record) Descriptor
deprecated
func (*Record) ProtoMessage ¶
func (*Record) ProtoMessage()
func (*Record) ProtoReflect ¶
func (x *Record) ProtoReflect() protoreflect.Message
type Request ¶
type Request struct { ModelId string `protobuf:"bytes,1,opt,name=modelId,proto3" json:"modelId,omitempty"` UserId string `protobuf:"bytes,2,opt,name=userId,proto3" json:"userId,omitempty"` UserFeatures string `protobuf:"bytes,3,opt,name=userFeatures,proto3" json:"userFeatures,omitempty"` Records []*Record `protobuf:"bytes,4,rep,name=records,proto3" json:"records,omitempty"` Extras map[string]string `` /* 153-byte string literal not displayed */ RequestId string `protobuf:"bytes,6,opt,name=request_id,json=requestId,proto3" json:"request_id,omitempty"` // contains filtered or unexported fields }
func (*Request) Descriptor
deprecated
func (*Request) GetModelId ¶
func (*Request) GetRecords ¶
func (*Request) GetRequestId ¶
func (*Request) GetUserFeatures ¶
func (*Request) ProtoMessage ¶
func (*Request) ProtoMessage()
func (*Request) ProtoReflect ¶
func (x *Request) ProtoReflect() protoreflect.Message
type Response ¶
type Response struct { Status int32 `protobuf:"varint,1,opt,name=status,proto3" json:"status,omitempty"` UserId string `protobuf:"bytes,2,opt,name=userId,proto3" json:"userId,omitempty"` Records []*Record `protobuf:"bytes,3,rep,name=records,proto3" json:"records,omitempty"` Extras map[string]string `` /* 153-byte string literal not displayed */ RequestId string `protobuf:"bytes,5,opt,name=request_id,json=requestId,proto3" json:"request_id,omitempty"` // contains filtered or unexported fields }
func (*Response) Descriptor
deprecated
func (*Response) GetRecords ¶
func (*Response) GetRequestId ¶
func (*Response) ProtoMessage ¶
func (*Response) ProtoMessage()
func (*Response) ProtoReflect ¶
func (x *Response) ProtoReflect() protoreflect.Message
type UnimplementedRankServer ¶
type UnimplementedRankServer struct { }
UnimplementedRankServer must be embedded to have forward compatible implementations.
type UnsafeRankServer ¶
type UnsafeRankServer interface {
// contains filtered or unexported methods
}
UnsafeRankServer may be embedded to opt out of forward compatibility for this service. Use of this interface is not recommended, as added methods to RankServer will result in compilation errors.