1120 lines
28 KiB
Go
1120 lines
28 KiB
Go
// Code generated by protoc-gen-gogo. DO NOT EDIT.
|
|
// source: app/service/live/recommend/api/grpc/v1/api.proto
|
|
|
|
package v1
|
|
|
|
import proto "github.com/gogo/protobuf/proto"
|
|
import fmt "fmt"
|
|
import math "math"
|
|
import _ "github.com/gogo/protobuf/gogoproto"
|
|
|
|
import context "golang.org/x/net/context"
|
|
import grpc "google.golang.org/grpc"
|
|
|
|
import io "io"
|
|
|
|
// Reference imports to suppress errors if they are not otherwise used.
|
|
var _ = proto.Marshal
|
|
var _ = fmt.Errorf
|
|
var _ = math.Inf
|
|
|
|
// This is a compile-time assertion to ensure that this generated file
|
|
// is compatible with the proto package it is being compiled against.
|
|
// A compilation error at this line likely means your copy of the
|
|
// proto package needs to be updated.
|
|
const _ = proto.GoGoProtoPackageIsVersion2 // please upgrade the proto package
|
|
|
|
type ClearRecommendRequest struct {
|
|
// 用户uid
|
|
Uid int64 `protobuf:"varint,1,opt,name=uid,proto3" json:"uid,omitempty" validate:"gt=0"`
|
|
XXX_NoUnkeyedLiteral struct{} `json:"-"`
|
|
XXX_unrecognized []byte `json:"-"`
|
|
XXX_sizecache int32 `json:"-"`
|
|
}
|
|
|
|
func (m *ClearRecommendRequest) Reset() { *m = ClearRecommendRequest{} }
|
|
func (m *ClearRecommendRequest) String() string { return proto.CompactTextString(m) }
|
|
func (*ClearRecommendRequest) ProtoMessage() {}
|
|
func (*ClearRecommendRequest) Descriptor() ([]byte, []int) {
|
|
return fileDescriptor_api_84fa36ba9c5b1c9c, []int{0}
|
|
}
|
|
func (m *ClearRecommendRequest) XXX_Unmarshal(b []byte) error {
|
|
return m.Unmarshal(b)
|
|
}
|
|
func (m *ClearRecommendRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
|
|
if deterministic {
|
|
return xxx_messageInfo_ClearRecommendRequest.Marshal(b, m, deterministic)
|
|
} else {
|
|
b = b[:cap(b)]
|
|
n, err := m.MarshalTo(b)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return b[:n], nil
|
|
}
|
|
}
|
|
func (dst *ClearRecommendRequest) XXX_Merge(src proto.Message) {
|
|
xxx_messageInfo_ClearRecommendRequest.Merge(dst, src)
|
|
}
|
|
func (m *ClearRecommendRequest) XXX_Size() int {
|
|
return m.Size()
|
|
}
|
|
func (m *ClearRecommendRequest) XXX_DiscardUnknown() {
|
|
xxx_messageInfo_ClearRecommendRequest.DiscardUnknown(m)
|
|
}
|
|
|
|
var xxx_messageInfo_ClearRecommendRequest proto.InternalMessageInfo
|
|
|
|
func (m *ClearRecommendRequest) GetUid() int64 {
|
|
if m != nil {
|
|
return m.Uid
|
|
}
|
|
return 0
|
|
}
|
|
|
|
type ClearRecommendResponse struct {
|
|
XXX_NoUnkeyedLiteral struct{} `json:"-"`
|
|
XXX_unrecognized []byte `json:"-"`
|
|
XXX_sizecache int32 `json:"-"`
|
|
}
|
|
|
|
func (m *ClearRecommendResponse) Reset() { *m = ClearRecommendResponse{} }
|
|
func (m *ClearRecommendResponse) String() string { return proto.CompactTextString(m) }
|
|
func (*ClearRecommendResponse) ProtoMessage() {}
|
|
func (*ClearRecommendResponse) Descriptor() ([]byte, []int) {
|
|
return fileDescriptor_api_84fa36ba9c5b1c9c, []int{1}
|
|
}
|
|
func (m *ClearRecommendResponse) XXX_Unmarshal(b []byte) error {
|
|
return m.Unmarshal(b)
|
|
}
|
|
func (m *ClearRecommendResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
|
|
if deterministic {
|
|
return xxx_messageInfo_ClearRecommendResponse.Marshal(b, m, deterministic)
|
|
} else {
|
|
b = b[:cap(b)]
|
|
n, err := m.MarshalTo(b)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return b[:n], nil
|
|
}
|
|
}
|
|
func (dst *ClearRecommendResponse) XXX_Merge(src proto.Message) {
|
|
xxx_messageInfo_ClearRecommendResponse.Merge(dst, src)
|
|
}
|
|
func (m *ClearRecommendResponse) XXX_Size() int {
|
|
return m.Size()
|
|
}
|
|
func (m *ClearRecommendResponse) XXX_DiscardUnknown() {
|
|
xxx_messageInfo_ClearRecommendResponse.DiscardUnknown(m)
|
|
}
|
|
|
|
var xxx_messageInfo_ClearRecommendResponse proto.InternalMessageInfo
|
|
|
|
type GetRandomRecReq struct {
|
|
// 用户uid
|
|
Uid int64 `protobuf:"varint,1,opt,name=uid,proto3" json:"uid,omitempty" validate:"gt=0"`
|
|
// 获取数量
|
|
Count uint32 `protobuf:"varint,2,opt,name=count,proto3" json:"count,omitempty" validate:"gt=0"`
|
|
// room_id去重
|
|
ExistIds []int64 `protobuf:"varint,3,rep,packed,name=exist_ids,json=existIds" json:"exist_ids,omitempty"`
|
|
XXX_NoUnkeyedLiteral struct{} `json:"-"`
|
|
XXX_unrecognized []byte `json:"-"`
|
|
XXX_sizecache int32 `json:"-"`
|
|
}
|
|
|
|
func (m *GetRandomRecReq) Reset() { *m = GetRandomRecReq{} }
|
|
func (m *GetRandomRecReq) String() string { return proto.CompactTextString(m) }
|
|
func (*GetRandomRecReq) ProtoMessage() {}
|
|
func (*GetRandomRecReq) Descriptor() ([]byte, []int) {
|
|
return fileDescriptor_api_84fa36ba9c5b1c9c, []int{2}
|
|
}
|
|
func (m *GetRandomRecReq) XXX_Unmarshal(b []byte) error {
|
|
return m.Unmarshal(b)
|
|
}
|
|
func (m *GetRandomRecReq) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
|
|
if deterministic {
|
|
return xxx_messageInfo_GetRandomRecReq.Marshal(b, m, deterministic)
|
|
} else {
|
|
b = b[:cap(b)]
|
|
n, err := m.MarshalTo(b)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return b[:n], nil
|
|
}
|
|
}
|
|
func (dst *GetRandomRecReq) XXX_Merge(src proto.Message) {
|
|
xxx_messageInfo_GetRandomRecReq.Merge(dst, src)
|
|
}
|
|
func (m *GetRandomRecReq) XXX_Size() int {
|
|
return m.Size()
|
|
}
|
|
func (m *GetRandomRecReq) XXX_DiscardUnknown() {
|
|
xxx_messageInfo_GetRandomRecReq.DiscardUnknown(m)
|
|
}
|
|
|
|
var xxx_messageInfo_GetRandomRecReq proto.InternalMessageInfo
|
|
|
|
func (m *GetRandomRecReq) GetUid() int64 {
|
|
if m != nil {
|
|
return m.Uid
|
|
}
|
|
return 0
|
|
}
|
|
|
|
func (m *GetRandomRecReq) GetCount() uint32 {
|
|
if m != nil {
|
|
return m.Count
|
|
}
|
|
return 0
|
|
}
|
|
|
|
func (m *GetRandomRecReq) GetExistIds() []int64 {
|
|
if m != nil {
|
|
return m.ExistIds
|
|
}
|
|
return nil
|
|
}
|
|
|
|
type GetRandomRecResp struct {
|
|
// 返回数量
|
|
Count uint32 `protobuf:"varint,1,opt,name=count,proto3" json:"count,omitempty"`
|
|
// 房间id
|
|
RoomIds []int64 `protobuf:"varint,2,rep,packed,name=room_ids,json=roomIds" json:"room_ids,omitempty"`
|
|
XXX_NoUnkeyedLiteral struct{} `json:"-"`
|
|
XXX_unrecognized []byte `json:"-"`
|
|
XXX_sizecache int32 `json:"-"`
|
|
}
|
|
|
|
func (m *GetRandomRecResp) Reset() { *m = GetRandomRecResp{} }
|
|
func (m *GetRandomRecResp) String() string { return proto.CompactTextString(m) }
|
|
func (*GetRandomRecResp) ProtoMessage() {}
|
|
func (*GetRandomRecResp) Descriptor() ([]byte, []int) {
|
|
return fileDescriptor_api_84fa36ba9c5b1c9c, []int{3}
|
|
}
|
|
func (m *GetRandomRecResp) XXX_Unmarshal(b []byte) error {
|
|
return m.Unmarshal(b)
|
|
}
|
|
func (m *GetRandomRecResp) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
|
|
if deterministic {
|
|
return xxx_messageInfo_GetRandomRecResp.Marshal(b, m, deterministic)
|
|
} else {
|
|
b = b[:cap(b)]
|
|
n, err := m.MarshalTo(b)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return b[:n], nil
|
|
}
|
|
}
|
|
func (dst *GetRandomRecResp) XXX_Merge(src proto.Message) {
|
|
xxx_messageInfo_GetRandomRecResp.Merge(dst, src)
|
|
}
|
|
func (m *GetRandomRecResp) XXX_Size() int {
|
|
return m.Size()
|
|
}
|
|
func (m *GetRandomRecResp) XXX_DiscardUnknown() {
|
|
xxx_messageInfo_GetRandomRecResp.DiscardUnknown(m)
|
|
}
|
|
|
|
var xxx_messageInfo_GetRandomRecResp proto.InternalMessageInfo
|
|
|
|
func (m *GetRandomRecResp) GetCount() uint32 {
|
|
if m != nil {
|
|
return m.Count
|
|
}
|
|
return 0
|
|
}
|
|
|
|
func (m *GetRandomRecResp) GetRoomIds() []int64 {
|
|
if m != nil {
|
|
return m.RoomIds
|
|
}
|
|
return nil
|
|
}
|
|
|
|
func init() {
|
|
proto.RegisterType((*ClearRecommendRequest)(nil), "live.recommend.v1.ClearRecommendRequest")
|
|
proto.RegisterType((*ClearRecommendResponse)(nil), "live.recommend.v1.ClearRecommendResponse")
|
|
proto.RegisterType((*GetRandomRecReq)(nil), "live.recommend.v1.GetRandomRecReq")
|
|
proto.RegisterType((*GetRandomRecResp)(nil), "live.recommend.v1.GetRandomRecResp")
|
|
}
|
|
|
|
// Reference imports to suppress errors if they are not otherwise used.
|
|
var _ context.Context
|
|
var _ grpc.ClientConn
|
|
|
|
// This is a compile-time assertion to ensure that this generated file
|
|
// is compatible with the grpc package it is being compiled against.
|
|
const _ = grpc.SupportPackageIsVersion4
|
|
|
|
// Client API for Recommend service
|
|
|
|
type RecommendClient interface {
|
|
// 获取n个推荐, 得到的结果是在线的房间
|
|
// 去重,不会重复推荐
|
|
// 如果没有足够推荐的结果则返回空的结果,调用方需要补位
|
|
RandomRecsByUser(ctx context.Context, in *GetRandomRecReq, opts ...grpc.CallOption) (*GetRandomRecResp, error)
|
|
// 清空推荐缓存,清空推荐过的集合
|
|
ClearRecommendCache(ctx context.Context, in *ClearRecommendRequest, opts ...grpc.CallOption) (*ClearRecommendResponse, error)
|
|
}
|
|
|
|
type recommendClient struct {
|
|
cc *grpc.ClientConn
|
|
}
|
|
|
|
func NewRecommendClient(cc *grpc.ClientConn) RecommendClient {
|
|
return &recommendClient{cc}
|
|
}
|
|
|
|
func (c *recommendClient) RandomRecsByUser(ctx context.Context, in *GetRandomRecReq, opts ...grpc.CallOption) (*GetRandomRecResp, error) {
|
|
out := new(GetRandomRecResp)
|
|
err := c.cc.Invoke(ctx, "/live.recommend.v1.Recommend/random_recs_by_user", in, out, opts...)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return out, nil
|
|
}
|
|
|
|
func (c *recommendClient) ClearRecommendCache(ctx context.Context, in *ClearRecommendRequest, opts ...grpc.CallOption) (*ClearRecommendResponse, error) {
|
|
out := new(ClearRecommendResponse)
|
|
err := c.cc.Invoke(ctx, "/live.recommend.v1.Recommend/clear_recommend_cache", in, out, opts...)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return out, nil
|
|
}
|
|
|
|
// Server API for Recommend service
|
|
|
|
type RecommendServer interface {
|
|
// 获取n个推荐, 得到的结果是在线的房间
|
|
// 去重,不会重复推荐
|
|
// 如果没有足够推荐的结果则返回空的结果,调用方需要补位
|
|
RandomRecsByUser(context.Context, *GetRandomRecReq) (*GetRandomRecResp, error)
|
|
// 清空推荐缓存,清空推荐过的集合
|
|
ClearRecommendCache(context.Context, *ClearRecommendRequest) (*ClearRecommendResponse, error)
|
|
}
|
|
|
|
func RegisterRecommendServer(s *grpc.Server, srv RecommendServer) {
|
|
s.RegisterService(&_Recommend_serviceDesc, srv)
|
|
}
|
|
|
|
func _Recommend_RandomRecsByUser_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
|
in := new(GetRandomRecReq)
|
|
if err := dec(in); err != nil {
|
|
return nil, err
|
|
}
|
|
if interceptor == nil {
|
|
return srv.(RecommendServer).RandomRecsByUser(ctx, in)
|
|
}
|
|
info := &grpc.UnaryServerInfo{
|
|
Server: srv,
|
|
FullMethod: "/live.recommend.v1.Recommend/RandomRecsByUser",
|
|
}
|
|
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
|
return srv.(RecommendServer).RandomRecsByUser(ctx, req.(*GetRandomRecReq))
|
|
}
|
|
return interceptor(ctx, in, info, handler)
|
|
}
|
|
|
|
func _Recommend_ClearRecommendCache_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
|
in := new(ClearRecommendRequest)
|
|
if err := dec(in); err != nil {
|
|
return nil, err
|
|
}
|
|
if interceptor == nil {
|
|
return srv.(RecommendServer).ClearRecommendCache(ctx, in)
|
|
}
|
|
info := &grpc.UnaryServerInfo{
|
|
Server: srv,
|
|
FullMethod: "/live.recommend.v1.Recommend/ClearRecommendCache",
|
|
}
|
|
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
|
return srv.(RecommendServer).ClearRecommendCache(ctx, req.(*ClearRecommendRequest))
|
|
}
|
|
return interceptor(ctx, in, info, handler)
|
|
}
|
|
|
|
var _Recommend_serviceDesc = grpc.ServiceDesc{
|
|
ServiceName: "live.recommend.v1.Recommend",
|
|
HandlerType: (*RecommendServer)(nil),
|
|
Methods: []grpc.MethodDesc{
|
|
{
|
|
MethodName: "random_recs_by_user",
|
|
Handler: _Recommend_RandomRecsByUser_Handler,
|
|
},
|
|
{
|
|
MethodName: "clear_recommend_cache",
|
|
Handler: _Recommend_ClearRecommendCache_Handler,
|
|
},
|
|
},
|
|
Streams: []grpc.StreamDesc{},
|
|
Metadata: "app/service/live/recommend/api/grpc/v1/api.proto",
|
|
}
|
|
|
|
func (m *ClearRecommendRequest) Marshal() (dAtA []byte, err error) {
|
|
size := m.Size()
|
|
dAtA = make([]byte, size)
|
|
n, err := m.MarshalTo(dAtA)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return dAtA[:n], nil
|
|
}
|
|
|
|
func (m *ClearRecommendRequest) MarshalTo(dAtA []byte) (int, error) {
|
|
var i int
|
|
_ = i
|
|
var l int
|
|
_ = l
|
|
if m.Uid != 0 {
|
|
dAtA[i] = 0x8
|
|
i++
|
|
i = encodeVarintApi(dAtA, i, uint64(m.Uid))
|
|
}
|
|
if m.XXX_unrecognized != nil {
|
|
i += copy(dAtA[i:], m.XXX_unrecognized)
|
|
}
|
|
return i, nil
|
|
}
|
|
|
|
func (m *ClearRecommendResponse) Marshal() (dAtA []byte, err error) {
|
|
size := m.Size()
|
|
dAtA = make([]byte, size)
|
|
n, err := m.MarshalTo(dAtA)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return dAtA[:n], nil
|
|
}
|
|
|
|
func (m *ClearRecommendResponse) MarshalTo(dAtA []byte) (int, error) {
|
|
var i int
|
|
_ = i
|
|
var l int
|
|
_ = l
|
|
if m.XXX_unrecognized != nil {
|
|
i += copy(dAtA[i:], m.XXX_unrecognized)
|
|
}
|
|
return i, nil
|
|
}
|
|
|
|
func (m *GetRandomRecReq) Marshal() (dAtA []byte, err error) {
|
|
size := m.Size()
|
|
dAtA = make([]byte, size)
|
|
n, err := m.MarshalTo(dAtA)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return dAtA[:n], nil
|
|
}
|
|
|
|
func (m *GetRandomRecReq) MarshalTo(dAtA []byte) (int, error) {
|
|
var i int
|
|
_ = i
|
|
var l int
|
|
_ = l
|
|
if m.Uid != 0 {
|
|
dAtA[i] = 0x8
|
|
i++
|
|
i = encodeVarintApi(dAtA, i, uint64(m.Uid))
|
|
}
|
|
if m.Count != 0 {
|
|
dAtA[i] = 0x10
|
|
i++
|
|
i = encodeVarintApi(dAtA, i, uint64(m.Count))
|
|
}
|
|
if len(m.ExistIds) > 0 {
|
|
dAtA2 := make([]byte, len(m.ExistIds)*10)
|
|
var j1 int
|
|
for _, num1 := range m.ExistIds {
|
|
num := uint64(num1)
|
|
for num >= 1<<7 {
|
|
dAtA2[j1] = uint8(uint64(num)&0x7f | 0x80)
|
|
num >>= 7
|
|
j1++
|
|
}
|
|
dAtA2[j1] = uint8(num)
|
|
j1++
|
|
}
|
|
dAtA[i] = 0x1a
|
|
i++
|
|
i = encodeVarintApi(dAtA, i, uint64(j1))
|
|
i += copy(dAtA[i:], dAtA2[:j1])
|
|
}
|
|
if m.XXX_unrecognized != nil {
|
|
i += copy(dAtA[i:], m.XXX_unrecognized)
|
|
}
|
|
return i, nil
|
|
}
|
|
|
|
func (m *GetRandomRecResp) Marshal() (dAtA []byte, err error) {
|
|
size := m.Size()
|
|
dAtA = make([]byte, size)
|
|
n, err := m.MarshalTo(dAtA)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return dAtA[:n], nil
|
|
}
|
|
|
|
func (m *GetRandomRecResp) MarshalTo(dAtA []byte) (int, error) {
|
|
var i int
|
|
_ = i
|
|
var l int
|
|
_ = l
|
|
if m.Count != 0 {
|
|
dAtA[i] = 0x8
|
|
i++
|
|
i = encodeVarintApi(dAtA, i, uint64(m.Count))
|
|
}
|
|
if len(m.RoomIds) > 0 {
|
|
dAtA4 := make([]byte, len(m.RoomIds)*10)
|
|
var j3 int
|
|
for _, num1 := range m.RoomIds {
|
|
num := uint64(num1)
|
|
for num >= 1<<7 {
|
|
dAtA4[j3] = uint8(uint64(num)&0x7f | 0x80)
|
|
num >>= 7
|
|
j3++
|
|
}
|
|
dAtA4[j3] = uint8(num)
|
|
j3++
|
|
}
|
|
dAtA[i] = 0x12
|
|
i++
|
|
i = encodeVarintApi(dAtA, i, uint64(j3))
|
|
i += copy(dAtA[i:], dAtA4[:j3])
|
|
}
|
|
if m.XXX_unrecognized != nil {
|
|
i += copy(dAtA[i:], m.XXX_unrecognized)
|
|
}
|
|
return i, nil
|
|
}
|
|
|
|
func encodeVarintApi(dAtA []byte, offset int, v uint64) int {
|
|
for v >= 1<<7 {
|
|
dAtA[offset] = uint8(v&0x7f | 0x80)
|
|
v >>= 7
|
|
offset++
|
|
}
|
|
dAtA[offset] = uint8(v)
|
|
return offset + 1
|
|
}
|
|
func (m *ClearRecommendRequest) Size() (n int) {
|
|
var l int
|
|
_ = l
|
|
if m.Uid != 0 {
|
|
n += 1 + sovApi(uint64(m.Uid))
|
|
}
|
|
if m.XXX_unrecognized != nil {
|
|
n += len(m.XXX_unrecognized)
|
|
}
|
|
return n
|
|
}
|
|
|
|
func (m *ClearRecommendResponse) Size() (n int) {
|
|
var l int
|
|
_ = l
|
|
if m.XXX_unrecognized != nil {
|
|
n += len(m.XXX_unrecognized)
|
|
}
|
|
return n
|
|
}
|
|
|
|
func (m *GetRandomRecReq) Size() (n int) {
|
|
var l int
|
|
_ = l
|
|
if m.Uid != 0 {
|
|
n += 1 + sovApi(uint64(m.Uid))
|
|
}
|
|
if m.Count != 0 {
|
|
n += 1 + sovApi(uint64(m.Count))
|
|
}
|
|
if len(m.ExistIds) > 0 {
|
|
l = 0
|
|
for _, e := range m.ExistIds {
|
|
l += sovApi(uint64(e))
|
|
}
|
|
n += 1 + sovApi(uint64(l)) + l
|
|
}
|
|
if m.XXX_unrecognized != nil {
|
|
n += len(m.XXX_unrecognized)
|
|
}
|
|
return n
|
|
}
|
|
|
|
func (m *GetRandomRecResp) Size() (n int) {
|
|
var l int
|
|
_ = l
|
|
if m.Count != 0 {
|
|
n += 1 + sovApi(uint64(m.Count))
|
|
}
|
|
if len(m.RoomIds) > 0 {
|
|
l = 0
|
|
for _, e := range m.RoomIds {
|
|
l += sovApi(uint64(e))
|
|
}
|
|
n += 1 + sovApi(uint64(l)) + l
|
|
}
|
|
if m.XXX_unrecognized != nil {
|
|
n += len(m.XXX_unrecognized)
|
|
}
|
|
return n
|
|
}
|
|
|
|
func sovApi(x uint64) (n int) {
|
|
for {
|
|
n++
|
|
x >>= 7
|
|
if x == 0 {
|
|
break
|
|
}
|
|
}
|
|
return n
|
|
}
|
|
func sozApi(x uint64) (n int) {
|
|
return sovApi(uint64((x << 1) ^ uint64((int64(x) >> 63))))
|
|
}
|
|
func (m *ClearRecommendRequest) Unmarshal(dAtA []byte) error {
|
|
l := len(dAtA)
|
|
iNdEx := 0
|
|
for iNdEx < l {
|
|
preIndex := iNdEx
|
|
var wire uint64
|
|
for shift := uint(0); ; shift += 7 {
|
|
if shift >= 64 {
|
|
return ErrIntOverflowApi
|
|
}
|
|
if iNdEx >= l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
b := dAtA[iNdEx]
|
|
iNdEx++
|
|
wire |= (uint64(b) & 0x7F) << shift
|
|
if b < 0x80 {
|
|
break
|
|
}
|
|
}
|
|
fieldNum := int32(wire >> 3)
|
|
wireType := int(wire & 0x7)
|
|
if wireType == 4 {
|
|
return fmt.Errorf("proto: ClearRecommendRequest: wiretype end group for non-group")
|
|
}
|
|
if fieldNum <= 0 {
|
|
return fmt.Errorf("proto: ClearRecommendRequest: illegal tag %d (wire type %d)", fieldNum, wire)
|
|
}
|
|
switch fieldNum {
|
|
case 1:
|
|
if wireType != 0 {
|
|
return fmt.Errorf("proto: wrong wireType = %d for field Uid", wireType)
|
|
}
|
|
m.Uid = 0
|
|
for shift := uint(0); ; shift += 7 {
|
|
if shift >= 64 {
|
|
return ErrIntOverflowApi
|
|
}
|
|
if iNdEx >= l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
b := dAtA[iNdEx]
|
|
iNdEx++
|
|
m.Uid |= (int64(b) & 0x7F) << shift
|
|
if b < 0x80 {
|
|
break
|
|
}
|
|
}
|
|
default:
|
|
iNdEx = preIndex
|
|
skippy, err := skipApi(dAtA[iNdEx:])
|
|
if err != nil {
|
|
return err
|
|
}
|
|
if skippy < 0 {
|
|
return ErrInvalidLengthApi
|
|
}
|
|
if (iNdEx + skippy) > l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...)
|
|
iNdEx += skippy
|
|
}
|
|
}
|
|
|
|
if iNdEx > l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
return nil
|
|
}
|
|
func (m *ClearRecommendResponse) Unmarshal(dAtA []byte) error {
|
|
l := len(dAtA)
|
|
iNdEx := 0
|
|
for iNdEx < l {
|
|
preIndex := iNdEx
|
|
var wire uint64
|
|
for shift := uint(0); ; shift += 7 {
|
|
if shift >= 64 {
|
|
return ErrIntOverflowApi
|
|
}
|
|
if iNdEx >= l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
b := dAtA[iNdEx]
|
|
iNdEx++
|
|
wire |= (uint64(b) & 0x7F) << shift
|
|
if b < 0x80 {
|
|
break
|
|
}
|
|
}
|
|
fieldNum := int32(wire >> 3)
|
|
wireType := int(wire & 0x7)
|
|
if wireType == 4 {
|
|
return fmt.Errorf("proto: ClearRecommendResponse: wiretype end group for non-group")
|
|
}
|
|
if fieldNum <= 0 {
|
|
return fmt.Errorf("proto: ClearRecommendResponse: illegal tag %d (wire type %d)", fieldNum, wire)
|
|
}
|
|
switch fieldNum {
|
|
default:
|
|
iNdEx = preIndex
|
|
skippy, err := skipApi(dAtA[iNdEx:])
|
|
if err != nil {
|
|
return err
|
|
}
|
|
if skippy < 0 {
|
|
return ErrInvalidLengthApi
|
|
}
|
|
if (iNdEx + skippy) > l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...)
|
|
iNdEx += skippy
|
|
}
|
|
}
|
|
|
|
if iNdEx > l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
return nil
|
|
}
|
|
func (m *GetRandomRecReq) Unmarshal(dAtA []byte) error {
|
|
l := len(dAtA)
|
|
iNdEx := 0
|
|
for iNdEx < l {
|
|
preIndex := iNdEx
|
|
var wire uint64
|
|
for shift := uint(0); ; shift += 7 {
|
|
if shift >= 64 {
|
|
return ErrIntOverflowApi
|
|
}
|
|
if iNdEx >= l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
b := dAtA[iNdEx]
|
|
iNdEx++
|
|
wire |= (uint64(b) & 0x7F) << shift
|
|
if b < 0x80 {
|
|
break
|
|
}
|
|
}
|
|
fieldNum := int32(wire >> 3)
|
|
wireType := int(wire & 0x7)
|
|
if wireType == 4 {
|
|
return fmt.Errorf("proto: GetRandomRecReq: wiretype end group for non-group")
|
|
}
|
|
if fieldNum <= 0 {
|
|
return fmt.Errorf("proto: GetRandomRecReq: illegal tag %d (wire type %d)", fieldNum, wire)
|
|
}
|
|
switch fieldNum {
|
|
case 1:
|
|
if wireType != 0 {
|
|
return fmt.Errorf("proto: wrong wireType = %d for field Uid", wireType)
|
|
}
|
|
m.Uid = 0
|
|
for shift := uint(0); ; shift += 7 {
|
|
if shift >= 64 {
|
|
return ErrIntOverflowApi
|
|
}
|
|
if iNdEx >= l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
b := dAtA[iNdEx]
|
|
iNdEx++
|
|
m.Uid |= (int64(b) & 0x7F) << shift
|
|
if b < 0x80 {
|
|
break
|
|
}
|
|
}
|
|
case 2:
|
|
if wireType != 0 {
|
|
return fmt.Errorf("proto: wrong wireType = %d for field Count", wireType)
|
|
}
|
|
m.Count = 0
|
|
for shift := uint(0); ; shift += 7 {
|
|
if shift >= 64 {
|
|
return ErrIntOverflowApi
|
|
}
|
|
if iNdEx >= l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
b := dAtA[iNdEx]
|
|
iNdEx++
|
|
m.Count |= (uint32(b) & 0x7F) << shift
|
|
if b < 0x80 {
|
|
break
|
|
}
|
|
}
|
|
case 3:
|
|
if wireType == 0 {
|
|
var v int64
|
|
for shift := uint(0); ; shift += 7 {
|
|
if shift >= 64 {
|
|
return ErrIntOverflowApi
|
|
}
|
|
if iNdEx >= l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
b := dAtA[iNdEx]
|
|
iNdEx++
|
|
v |= (int64(b) & 0x7F) << shift
|
|
if b < 0x80 {
|
|
break
|
|
}
|
|
}
|
|
m.ExistIds = append(m.ExistIds, v)
|
|
} else if wireType == 2 {
|
|
var packedLen int
|
|
for shift := uint(0); ; shift += 7 {
|
|
if shift >= 64 {
|
|
return ErrIntOverflowApi
|
|
}
|
|
if iNdEx >= l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
b := dAtA[iNdEx]
|
|
iNdEx++
|
|
packedLen |= (int(b) & 0x7F) << shift
|
|
if b < 0x80 {
|
|
break
|
|
}
|
|
}
|
|
if packedLen < 0 {
|
|
return ErrInvalidLengthApi
|
|
}
|
|
postIndex := iNdEx + packedLen
|
|
if postIndex > l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
for iNdEx < postIndex {
|
|
var v int64
|
|
for shift := uint(0); ; shift += 7 {
|
|
if shift >= 64 {
|
|
return ErrIntOverflowApi
|
|
}
|
|
if iNdEx >= l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
b := dAtA[iNdEx]
|
|
iNdEx++
|
|
v |= (int64(b) & 0x7F) << shift
|
|
if b < 0x80 {
|
|
break
|
|
}
|
|
}
|
|
m.ExistIds = append(m.ExistIds, v)
|
|
}
|
|
} else {
|
|
return fmt.Errorf("proto: wrong wireType = %d for field ExistIds", wireType)
|
|
}
|
|
default:
|
|
iNdEx = preIndex
|
|
skippy, err := skipApi(dAtA[iNdEx:])
|
|
if err != nil {
|
|
return err
|
|
}
|
|
if skippy < 0 {
|
|
return ErrInvalidLengthApi
|
|
}
|
|
if (iNdEx + skippy) > l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...)
|
|
iNdEx += skippy
|
|
}
|
|
}
|
|
|
|
if iNdEx > l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
return nil
|
|
}
|
|
func (m *GetRandomRecResp) Unmarshal(dAtA []byte) error {
|
|
l := len(dAtA)
|
|
iNdEx := 0
|
|
for iNdEx < l {
|
|
preIndex := iNdEx
|
|
var wire uint64
|
|
for shift := uint(0); ; shift += 7 {
|
|
if shift >= 64 {
|
|
return ErrIntOverflowApi
|
|
}
|
|
if iNdEx >= l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
b := dAtA[iNdEx]
|
|
iNdEx++
|
|
wire |= (uint64(b) & 0x7F) << shift
|
|
if b < 0x80 {
|
|
break
|
|
}
|
|
}
|
|
fieldNum := int32(wire >> 3)
|
|
wireType := int(wire & 0x7)
|
|
if wireType == 4 {
|
|
return fmt.Errorf("proto: GetRandomRecResp: wiretype end group for non-group")
|
|
}
|
|
if fieldNum <= 0 {
|
|
return fmt.Errorf("proto: GetRandomRecResp: illegal tag %d (wire type %d)", fieldNum, wire)
|
|
}
|
|
switch fieldNum {
|
|
case 1:
|
|
if wireType != 0 {
|
|
return fmt.Errorf("proto: wrong wireType = %d for field Count", wireType)
|
|
}
|
|
m.Count = 0
|
|
for shift := uint(0); ; shift += 7 {
|
|
if shift >= 64 {
|
|
return ErrIntOverflowApi
|
|
}
|
|
if iNdEx >= l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
b := dAtA[iNdEx]
|
|
iNdEx++
|
|
m.Count |= (uint32(b) & 0x7F) << shift
|
|
if b < 0x80 {
|
|
break
|
|
}
|
|
}
|
|
case 2:
|
|
if wireType == 0 {
|
|
var v int64
|
|
for shift := uint(0); ; shift += 7 {
|
|
if shift >= 64 {
|
|
return ErrIntOverflowApi
|
|
}
|
|
if iNdEx >= l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
b := dAtA[iNdEx]
|
|
iNdEx++
|
|
v |= (int64(b) & 0x7F) << shift
|
|
if b < 0x80 {
|
|
break
|
|
}
|
|
}
|
|
m.RoomIds = append(m.RoomIds, v)
|
|
} else if wireType == 2 {
|
|
var packedLen int
|
|
for shift := uint(0); ; shift += 7 {
|
|
if shift >= 64 {
|
|
return ErrIntOverflowApi
|
|
}
|
|
if iNdEx >= l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
b := dAtA[iNdEx]
|
|
iNdEx++
|
|
packedLen |= (int(b) & 0x7F) << shift
|
|
if b < 0x80 {
|
|
break
|
|
}
|
|
}
|
|
if packedLen < 0 {
|
|
return ErrInvalidLengthApi
|
|
}
|
|
postIndex := iNdEx + packedLen
|
|
if postIndex > l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
for iNdEx < postIndex {
|
|
var v int64
|
|
for shift := uint(0); ; shift += 7 {
|
|
if shift >= 64 {
|
|
return ErrIntOverflowApi
|
|
}
|
|
if iNdEx >= l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
b := dAtA[iNdEx]
|
|
iNdEx++
|
|
v |= (int64(b) & 0x7F) << shift
|
|
if b < 0x80 {
|
|
break
|
|
}
|
|
}
|
|
m.RoomIds = append(m.RoomIds, v)
|
|
}
|
|
} else {
|
|
return fmt.Errorf("proto: wrong wireType = %d for field RoomIds", wireType)
|
|
}
|
|
default:
|
|
iNdEx = preIndex
|
|
skippy, err := skipApi(dAtA[iNdEx:])
|
|
if err != nil {
|
|
return err
|
|
}
|
|
if skippy < 0 {
|
|
return ErrInvalidLengthApi
|
|
}
|
|
if (iNdEx + skippy) > l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...)
|
|
iNdEx += skippy
|
|
}
|
|
}
|
|
|
|
if iNdEx > l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
return nil
|
|
}
|
|
func skipApi(dAtA []byte) (n int, err error) {
|
|
l := len(dAtA)
|
|
iNdEx := 0
|
|
for iNdEx < l {
|
|
var wire uint64
|
|
for shift := uint(0); ; shift += 7 {
|
|
if shift >= 64 {
|
|
return 0, ErrIntOverflowApi
|
|
}
|
|
if iNdEx >= l {
|
|
return 0, io.ErrUnexpectedEOF
|
|
}
|
|
b := dAtA[iNdEx]
|
|
iNdEx++
|
|
wire |= (uint64(b) & 0x7F) << shift
|
|
if b < 0x80 {
|
|
break
|
|
}
|
|
}
|
|
wireType := int(wire & 0x7)
|
|
switch wireType {
|
|
case 0:
|
|
for shift := uint(0); ; shift += 7 {
|
|
if shift >= 64 {
|
|
return 0, ErrIntOverflowApi
|
|
}
|
|
if iNdEx >= l {
|
|
return 0, io.ErrUnexpectedEOF
|
|
}
|
|
iNdEx++
|
|
if dAtA[iNdEx-1] < 0x80 {
|
|
break
|
|
}
|
|
}
|
|
return iNdEx, nil
|
|
case 1:
|
|
iNdEx += 8
|
|
return iNdEx, nil
|
|
case 2:
|
|
var length int
|
|
for shift := uint(0); ; shift += 7 {
|
|
if shift >= 64 {
|
|
return 0, ErrIntOverflowApi
|
|
}
|
|
if iNdEx >= l {
|
|
return 0, io.ErrUnexpectedEOF
|
|
}
|
|
b := dAtA[iNdEx]
|
|
iNdEx++
|
|
length |= (int(b) & 0x7F) << shift
|
|
if b < 0x80 {
|
|
break
|
|
}
|
|
}
|
|
iNdEx += length
|
|
if length < 0 {
|
|
return 0, ErrInvalidLengthApi
|
|
}
|
|
return iNdEx, nil
|
|
case 3:
|
|
for {
|
|
var innerWire uint64
|
|
var start int = iNdEx
|
|
for shift := uint(0); ; shift += 7 {
|
|
if shift >= 64 {
|
|
return 0, ErrIntOverflowApi
|
|
}
|
|
if iNdEx >= l {
|
|
return 0, io.ErrUnexpectedEOF
|
|
}
|
|
b := dAtA[iNdEx]
|
|
iNdEx++
|
|
innerWire |= (uint64(b) & 0x7F) << shift
|
|
if b < 0x80 {
|
|
break
|
|
}
|
|
}
|
|
innerWireType := int(innerWire & 0x7)
|
|
if innerWireType == 4 {
|
|
break
|
|
}
|
|
next, err := skipApi(dAtA[start:])
|
|
if err != nil {
|
|
return 0, err
|
|
}
|
|
iNdEx = start + next
|
|
}
|
|
return iNdEx, nil
|
|
case 4:
|
|
return iNdEx, nil
|
|
case 5:
|
|
iNdEx += 4
|
|
return iNdEx, nil
|
|
default:
|
|
return 0, fmt.Errorf("proto: illegal wireType %d", wireType)
|
|
}
|
|
}
|
|
panic("unreachable")
|
|
}
|
|
|
|
var (
|
|
ErrInvalidLengthApi = fmt.Errorf("proto: negative length found during unmarshaling")
|
|
ErrIntOverflowApi = fmt.Errorf("proto: integer overflow")
|
|
)
|
|
|
|
func init() {
|
|
proto.RegisterFile("app/service/live/recommend/api/grpc/v1/api.proto", fileDescriptor_api_84fa36ba9c5b1c9c)
|
|
}
|
|
|
|
var fileDescriptor_api_84fa36ba9c5b1c9c = []byte{
|
|
// 368 bytes of a gzipped FileDescriptorProto
|
|
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x8c, 0x92, 0x41, 0x6b, 0xdb, 0x30,
|
|
0x14, 0x80, 0x51, 0xcc, 0xb6, 0x44, 0x10, 0x92, 0x29, 0xcb, 0xf0, 0x32, 0xc8, 0x82, 0xc7, 0xc0,
|
|
0x39, 0xcc, 0x4a, 0xb6, 0xdb, 0x60, 0x3b, 0x24, 0x87, 0x91, 0xab, 0x8f, 0x3b, 0xcc, 0xd8, 0xf2,
|
|
0xab, 0x23, 0xb0, 0x2d, 0x45, 0x92, 0x4d, 0x7b, 0xeb, 0xcf, 0xeb, 0xb1, 0xd7, 0x5e, 0x4a, 0xc9,
|
|
0x4f, 0xe8, 0x2f, 0x28, 0x56, 0x48, 0xa0, 0x69, 0xa0, 0xb9, 0xbd, 0x27, 0x7d, 0xef, 0xe3, 0x3d,
|
|
0x3d, 0xe1, 0x59, 0x2c, 0x25, 0xd5, 0xa0, 0x6a, 0xce, 0x80, 0xe6, 0xbc, 0x06, 0xaa, 0x80, 0x89,
|
|
0xa2, 0x80, 0x32, 0xa5, 0xb1, 0xe4, 0x34, 0x53, 0x92, 0xd1, 0x7a, 0xde, 0xc4, 0x81, 0x54, 0xc2,
|
|
0x08, 0xf2, 0xbe, 0xa1, 0x82, 0x03, 0x15, 0xd4, 0xf3, 0xd1, 0xf7, 0x8c, 0x9b, 0x75, 0x95, 0x04,
|
|
0x4c, 0x14, 0x34, 0x13, 0x99, 0xa0, 0x96, 0x4c, 0xaa, 0x0b, 0x9b, 0xd9, 0xc4, 0x46, 0x3b, 0x83,
|
|
0xf7, 0x07, 0x0f, 0x97, 0x39, 0xc4, 0x2a, 0xdc, 0x3b, 0x42, 0xd8, 0x54, 0xa0, 0x0d, 0xf9, 0x86,
|
|
0x9d, 0x8a, 0xa7, 0x2e, 0x9a, 0x20, 0xdf, 0x59, 0x0c, 0x1e, 0xef, 0xbf, 0xf4, 0xea, 0x38, 0xe7,
|
|
0x69, 0x6c, 0xe0, 0x97, 0x97, 0x99, 0xdf, 0x33, 0x2f, 0x6c, 0xee, 0x3d, 0x17, 0x7f, 0x3c, 0xae,
|
|
0xd7, 0x52, 0x94, 0x1a, 0xbc, 0x6b, 0x84, 0x7b, 0x7f, 0xc1, 0x84, 0x71, 0x99, 0x8a, 0x22, 0x04,
|
|
0x16, 0xc2, 0xe6, 0x4c, 0x29, 0x99, 0xe2, 0x37, 0x4c, 0x54, 0xa5, 0x71, 0x5b, 0x13, 0xe4, 0x77,
|
|
0x4f, 0x83, 0x3b, 0x82, 0x7c, 0xc6, 0x1d, 0xb8, 0xe4, 0xda, 0x44, 0x3c, 0xd5, 0xae, 0x33, 0x71,
|
|
0x7c, 0x27, 0x6c, 0xdb, 0x83, 0x55, 0xaa, 0xbd, 0x25, 0xee, 0x3f, 0xef, 0x40, 0x4b, 0xf2, 0x61,
|
|
0xef, 0x6e, 0x9a, 0xe8, 0xee, 0x35, 0x9f, 0x70, 0x5b, 0x09, 0x51, 0x58, 0x4b, 0xcb, 0x5a, 0xde,
|
|
0x35, 0xf9, 0x2a, 0xd5, 0x3f, 0xee, 0x10, 0xee, 0x1c, 0xa6, 0x23, 0xff, 0xf1, 0x40, 0x59, 0x5f,
|
|
0xa4, 0x80, 0xe9, 0x28, 0xb9, 0x8a, 0x2a, 0x0d, 0x8a, 0x78, 0xc1, 0x8b, 0x4d, 0x04, 0x47, 0xc3,
|
|
0x8f, 0xbe, 0xbe, 0xca, 0x68, 0x49, 0x72, 0x3c, 0x64, 0xcd, 0x7b, 0x46, 0x07, 0x2c, 0x62, 0x31,
|
|
0x5b, 0x03, 0xf1, 0x4f, 0x54, 0x9f, 0xdc, 0xdc, 0x68, 0x7a, 0x06, 0xb9, 0xdb, 0xd1, 0xa2, 0x7f,
|
|
0xb3, 0x1d, 0xa3, 0xdb, 0xed, 0x18, 0x3d, 0x6c, 0xc7, 0xe8, 0x5f, 0xab, 0x9e, 0x27, 0x6f, 0xed,
|
|
0xb7, 0xf8, 0xf9, 0x14, 0x00, 0x00, 0xff, 0xff, 0x80, 0x53, 0x86, 0xed, 0x8c, 0x02, 0x00, 0x00,
|
|
}
|