longmenapi

package
v0.0.2-0...-058d74b Latest Latest
Warning

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

Go to latest
Published: Jan 23, 2024 License: AGPL-3.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

View Source
const (
	Rank_Rank_FullMethodName = "/longmenapi.Rank/Rank"
)

Variables

View Source
var File_longmenapi_proto protoreflect.FileDescriptor
View Source
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) Descriptor() ([]byte, []int)

Deprecated: Use Record.ProtoReflect.Descriptor instead.

func (*Record) GetId

func (x *Record) GetId() string

func (*Record) GetScore

func (x *Record) GetScore() float32

func (*Record) ProtoMessage

func (*Record) ProtoMessage()

func (*Record) ProtoReflect

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

func (*Record) Reset

func (x *Record) Reset()

func (*Record) String

func (x *Record) String() string

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

Deprecated: Use Request.ProtoReflect.Descriptor instead.

func (*Request) GetExtras

func (x *Request) GetExtras() map[string]string

func (*Request) GetModelId

func (x *Request) GetModelId() string

func (*Request) GetRecords

func (x *Request) GetRecords() []*Record

func (*Request) GetRequestId

func (x *Request) GetRequestId() string

func (*Request) GetUserFeatures

func (x *Request) GetUserFeatures() string

func (*Request) GetUserId

func (x *Request) GetUserId() string

func (*Request) ProtoMessage

func (*Request) ProtoMessage()

func (*Request) ProtoReflect

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

func (*Request) Reset

func (x *Request) Reset()

func (*Request) String

func (x *Request) String() string

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

Deprecated: Use Response.ProtoReflect.Descriptor instead.

func (*Response) GetExtras

func (x *Response) GetExtras() map[string]string

func (*Response) GetRecords

func (x *Response) GetRecords() []*Record

func (*Response) GetRequestId

func (x *Response) GetRequestId() string

func (*Response) GetStatus

func (x *Response) GetStatus() int32

func (*Response) GetUserId

func (x *Response) GetUserId() string

func (*Response) ProtoMessage

func (*Response) ProtoMessage()

func (*Response) ProtoReflect

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

func (*Response) Reset

func (x *Response) Reset()

func (*Response) String

func (x *Response) String() string

type UnimplementedRankServer

type UnimplementedRankServer struct {
}

UnimplementedRankServer must be embedded to have forward compatible implementations.

func (UnimplementedRankServer) Rank

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.

Jump to

Keyboard shortcuts

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