You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
1777 lines
43 KiB
1777 lines
43 KiB
// Code generated by protoc-gen-gogo. DO NOT EDIT. |
|
// source: app/interface/main/broadcast/api/grpc/v1/api.proto |
|
|
|
/* |
|
Package v1 is a generated protocol buffer package. |
|
|
|
It is generated from these files: |
|
app/interface/main/broadcast/api/grpc/v1/api.proto |
|
|
|
It has these top-level messages: |
|
Empty |
|
PushMsgReq |
|
PushMsgReply |
|
BroadcastReq |
|
BroadcastReply |
|
BroadcastRoomReq |
|
BroadcastRoomReply |
|
RoomsReq |
|
RoomsReply |
|
*/ |
|
package v1 |
|
|
|
import proto "github.com/gogo/protobuf/proto" |
|
import fmt "fmt" |
|
import math "math" |
|
import push_service_broadcast_model "go-common/app/service/main/broadcast/model" |
|
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 Empty struct { |
|
} |
|
|
|
func (m *Empty) Reset() { *m = Empty{} } |
|
func (m *Empty) String() string { return proto.CompactTextString(m) } |
|
func (*Empty) ProtoMessage() {} |
|
func (*Empty) Descriptor() ([]byte, []int) { return fileDescriptorApi, []int{0} } |
|
|
|
type PushMsgReq struct { |
|
Keys []string `protobuf:"bytes,1,rep,name=keys" json:"keys,omitempty"` |
|
ProtoOp int32 `protobuf:"varint,3,opt,name=protoOp,proto3" json:"protoOp,omitempty"` |
|
Proto *push_service_broadcast_model.Proto `protobuf:"bytes,2,opt,name=proto" json:"proto,omitempty"` |
|
} |
|
|
|
func (m *PushMsgReq) Reset() { *m = PushMsgReq{} } |
|
func (m *PushMsgReq) String() string { return proto.CompactTextString(m) } |
|
func (*PushMsgReq) ProtoMessage() {} |
|
func (*PushMsgReq) Descriptor() ([]byte, []int) { return fileDescriptorApi, []int{1} } |
|
|
|
func (m *PushMsgReq) GetKeys() []string { |
|
if m != nil { |
|
return m.Keys |
|
} |
|
return nil |
|
} |
|
|
|
func (m *PushMsgReq) GetProtoOp() int32 { |
|
if m != nil { |
|
return m.ProtoOp |
|
} |
|
return 0 |
|
} |
|
|
|
func (m *PushMsgReq) GetProto() *push_service_broadcast_model.Proto { |
|
if m != nil { |
|
return m.Proto |
|
} |
|
return nil |
|
} |
|
|
|
type PushMsgReply struct { |
|
} |
|
|
|
func (m *PushMsgReply) Reset() { *m = PushMsgReply{} } |
|
func (m *PushMsgReply) String() string { return proto.CompactTextString(m) } |
|
func (*PushMsgReply) ProtoMessage() {} |
|
func (*PushMsgReply) Descriptor() ([]byte, []int) { return fileDescriptorApi, []int{2} } |
|
|
|
type BroadcastReq struct { |
|
ProtoOp int32 `protobuf:"varint,1,opt,name=protoOp,proto3" json:"protoOp,omitempty"` |
|
Proto *push_service_broadcast_model.Proto `protobuf:"bytes,2,opt,name=proto" json:"proto,omitempty"` |
|
Speed int32 `protobuf:"varint,3,opt,name=speed,proto3" json:"speed,omitempty"` |
|
Platform string `protobuf:"bytes,4,opt,name=platform,proto3" json:"platform,omitempty"` |
|
} |
|
|
|
func (m *BroadcastReq) Reset() { *m = BroadcastReq{} } |
|
func (m *BroadcastReq) String() string { return proto.CompactTextString(m) } |
|
func (*BroadcastReq) ProtoMessage() {} |
|
func (*BroadcastReq) Descriptor() ([]byte, []int) { return fileDescriptorApi, []int{3} } |
|
|
|
func (m *BroadcastReq) GetProtoOp() int32 { |
|
if m != nil { |
|
return m.ProtoOp |
|
} |
|
return 0 |
|
} |
|
|
|
func (m *BroadcastReq) GetProto() *push_service_broadcast_model.Proto { |
|
if m != nil { |
|
return m.Proto |
|
} |
|
return nil |
|
} |
|
|
|
func (m *BroadcastReq) GetSpeed() int32 { |
|
if m != nil { |
|
return m.Speed |
|
} |
|
return 0 |
|
} |
|
|
|
func (m *BroadcastReq) GetPlatform() string { |
|
if m != nil { |
|
return m.Platform |
|
} |
|
return "" |
|
} |
|
|
|
type BroadcastReply struct { |
|
} |
|
|
|
func (m *BroadcastReply) Reset() { *m = BroadcastReply{} } |
|
func (m *BroadcastReply) String() string { return proto.CompactTextString(m) } |
|
func (*BroadcastReply) ProtoMessage() {} |
|
func (*BroadcastReply) Descriptor() ([]byte, []int) { return fileDescriptorApi, []int{4} } |
|
|
|
type BroadcastRoomReq struct { |
|
RoomID string `protobuf:"bytes,1,opt,name=roomID,proto3" json:"roomID,omitempty"` |
|
Proto *push_service_broadcast_model.Proto `protobuf:"bytes,2,opt,name=proto" json:"proto,omitempty"` |
|
} |
|
|
|
func (m *BroadcastRoomReq) Reset() { *m = BroadcastRoomReq{} } |
|
func (m *BroadcastRoomReq) String() string { return proto.CompactTextString(m) } |
|
func (*BroadcastRoomReq) ProtoMessage() {} |
|
func (*BroadcastRoomReq) Descriptor() ([]byte, []int) { return fileDescriptorApi, []int{5} } |
|
|
|
func (m *BroadcastRoomReq) GetRoomID() string { |
|
if m != nil { |
|
return m.RoomID |
|
} |
|
return "" |
|
} |
|
|
|
func (m *BroadcastRoomReq) GetProto() *push_service_broadcast_model.Proto { |
|
if m != nil { |
|
return m.Proto |
|
} |
|
return nil |
|
} |
|
|
|
type BroadcastRoomReply struct { |
|
} |
|
|
|
func (m *BroadcastRoomReply) Reset() { *m = BroadcastRoomReply{} } |
|
func (m *BroadcastRoomReply) String() string { return proto.CompactTextString(m) } |
|
func (*BroadcastRoomReply) ProtoMessage() {} |
|
func (*BroadcastRoomReply) Descriptor() ([]byte, []int) { return fileDescriptorApi, []int{6} } |
|
|
|
type RoomsReq struct { |
|
} |
|
|
|
func (m *RoomsReq) Reset() { *m = RoomsReq{} } |
|
func (m *RoomsReq) String() string { return proto.CompactTextString(m) } |
|
func (*RoomsReq) ProtoMessage() {} |
|
func (*RoomsReq) Descriptor() ([]byte, []int) { return fileDescriptorApi, []int{7} } |
|
|
|
type RoomsReply struct { |
|
Rooms map[string]bool `protobuf:"bytes,1,rep,name=rooms" json:"rooms,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"varint,2,opt,name=value,proto3"` |
|
} |
|
|
|
func (m *RoomsReply) Reset() { *m = RoomsReply{} } |
|
func (*RoomsReply) ProtoMessage() {} |
|
func (*RoomsReply) Descriptor() ([]byte, []int) { return fileDescriptorApi, []int{8} } |
|
|
|
func (m *RoomsReply) GetRooms() map[string]bool { |
|
if m != nil { |
|
return m.Rooms |
|
} |
|
return nil |
|
} |
|
|
|
func init() { |
|
proto.RegisterType((*Empty)(nil), "push.interface.broadcast.Empty") |
|
proto.RegisterType((*PushMsgReq)(nil), "push.interface.broadcast.PushMsgReq") |
|
proto.RegisterType((*PushMsgReply)(nil), "push.interface.broadcast.PushMsgReply") |
|
proto.RegisterType((*BroadcastReq)(nil), "push.interface.broadcast.BroadcastReq") |
|
proto.RegisterType((*BroadcastReply)(nil), "push.interface.broadcast.BroadcastReply") |
|
proto.RegisterType((*BroadcastRoomReq)(nil), "push.interface.broadcast.BroadcastRoomReq") |
|
proto.RegisterType((*BroadcastRoomReply)(nil), "push.interface.broadcast.BroadcastRoomReply") |
|
proto.RegisterType((*RoomsReq)(nil), "push.interface.broadcast.RoomsReq") |
|
proto.RegisterType((*RoomsReply)(nil), "push.interface.broadcast.RoomsReply") |
|
} |
|
|
|
// 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 Zerg service |
|
|
|
type ZergClient interface { |
|
// Ping Service |
|
Ping(ctx context.Context, in *Empty, opts ...grpc.CallOption) (*Empty, error) |
|
// Close Service |
|
Close(ctx context.Context, in *Empty, opts ...grpc.CallOption) (*Empty, error) |
|
// PushMsg push by key or mid |
|
PushMsg(ctx context.Context, in *PushMsgReq, opts ...grpc.CallOption) (*PushMsgReply, error) |
|
// Broadcast send to every enrity |
|
Broadcast(ctx context.Context, in *BroadcastReq, opts ...grpc.CallOption) (*BroadcastReply, error) |
|
// BroadcastRoom broadcast to one room |
|
BroadcastRoom(ctx context.Context, in *BroadcastRoomReq, opts ...grpc.CallOption) (*BroadcastRoomReply, error) |
|
// Rooms get all rooms |
|
Rooms(ctx context.Context, in *RoomsReq, opts ...grpc.CallOption) (*RoomsReply, error) |
|
} |
|
|
|
type zergClient struct { |
|
cc *grpc.ClientConn |
|
} |
|
|
|
func NewZergClient(cc *grpc.ClientConn) ZergClient { |
|
return &zergClient{cc} |
|
} |
|
|
|
func (c *zergClient) Ping(ctx context.Context, in *Empty, opts ...grpc.CallOption) (*Empty, error) { |
|
out := new(Empty) |
|
err := grpc.Invoke(ctx, "/push.interface.broadcast.Zerg/Ping", in, out, c.cc, opts...) |
|
if err != nil { |
|
return nil, err |
|
} |
|
return out, nil |
|
} |
|
|
|
func (c *zergClient) Close(ctx context.Context, in *Empty, opts ...grpc.CallOption) (*Empty, error) { |
|
out := new(Empty) |
|
err := grpc.Invoke(ctx, "/push.interface.broadcast.Zerg/Close", in, out, c.cc, opts...) |
|
if err != nil { |
|
return nil, err |
|
} |
|
return out, nil |
|
} |
|
|
|
func (c *zergClient) PushMsg(ctx context.Context, in *PushMsgReq, opts ...grpc.CallOption) (*PushMsgReply, error) { |
|
out := new(PushMsgReply) |
|
err := grpc.Invoke(ctx, "/push.interface.broadcast.Zerg/PushMsg", in, out, c.cc, opts...) |
|
if err != nil { |
|
return nil, err |
|
} |
|
return out, nil |
|
} |
|
|
|
func (c *zergClient) Broadcast(ctx context.Context, in *BroadcastReq, opts ...grpc.CallOption) (*BroadcastReply, error) { |
|
out := new(BroadcastReply) |
|
err := grpc.Invoke(ctx, "/push.interface.broadcast.Zerg/Broadcast", in, out, c.cc, opts...) |
|
if err != nil { |
|
return nil, err |
|
} |
|
return out, nil |
|
} |
|
|
|
func (c *zergClient) BroadcastRoom(ctx context.Context, in *BroadcastRoomReq, opts ...grpc.CallOption) (*BroadcastRoomReply, error) { |
|
out := new(BroadcastRoomReply) |
|
err := grpc.Invoke(ctx, "/push.interface.broadcast.Zerg/BroadcastRoom", in, out, c.cc, opts...) |
|
if err != nil { |
|
return nil, err |
|
} |
|
return out, nil |
|
} |
|
|
|
func (c *zergClient) Rooms(ctx context.Context, in *RoomsReq, opts ...grpc.CallOption) (*RoomsReply, error) { |
|
out := new(RoomsReply) |
|
err := grpc.Invoke(ctx, "/push.interface.broadcast.Zerg/Rooms", in, out, c.cc, opts...) |
|
if err != nil { |
|
return nil, err |
|
} |
|
return out, nil |
|
} |
|
|
|
// Server API for Zerg service |
|
|
|
type ZergServer interface { |
|
// Ping Service |
|
Ping(context.Context, *Empty) (*Empty, error) |
|
// Close Service |
|
Close(context.Context, *Empty) (*Empty, error) |
|
// PushMsg push by key or mid |
|
PushMsg(context.Context, *PushMsgReq) (*PushMsgReply, error) |
|
// Broadcast send to every enrity |
|
Broadcast(context.Context, *BroadcastReq) (*BroadcastReply, error) |
|
// BroadcastRoom broadcast to one room |
|
BroadcastRoom(context.Context, *BroadcastRoomReq) (*BroadcastRoomReply, error) |
|
// Rooms get all rooms |
|
Rooms(context.Context, *RoomsReq) (*RoomsReply, error) |
|
} |
|
|
|
func RegisterZergServer(s *grpc.Server, srv ZergServer) { |
|
s.RegisterService(&_Zerg_serviceDesc, srv) |
|
} |
|
|
|
func _Zerg_Ping_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { |
|
in := new(Empty) |
|
if err := dec(in); err != nil { |
|
return nil, err |
|
} |
|
if interceptor == nil { |
|
return srv.(ZergServer).Ping(ctx, in) |
|
} |
|
info := &grpc.UnaryServerInfo{ |
|
Server: srv, |
|
FullMethod: "/push.interface.broadcast.Zerg/Ping", |
|
} |
|
handler := func(ctx context.Context, req interface{}) (interface{}, error) { |
|
return srv.(ZergServer).Ping(ctx, req.(*Empty)) |
|
} |
|
return interceptor(ctx, in, info, handler) |
|
} |
|
|
|
func _Zerg_Close_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { |
|
in := new(Empty) |
|
if err := dec(in); err != nil { |
|
return nil, err |
|
} |
|
if interceptor == nil { |
|
return srv.(ZergServer).Close(ctx, in) |
|
} |
|
info := &grpc.UnaryServerInfo{ |
|
Server: srv, |
|
FullMethod: "/push.interface.broadcast.Zerg/Close", |
|
} |
|
handler := func(ctx context.Context, req interface{}) (interface{}, error) { |
|
return srv.(ZergServer).Close(ctx, req.(*Empty)) |
|
} |
|
return interceptor(ctx, in, info, handler) |
|
} |
|
|
|
func _Zerg_PushMsg_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { |
|
in := new(PushMsgReq) |
|
if err := dec(in); err != nil { |
|
return nil, err |
|
} |
|
if interceptor == nil { |
|
return srv.(ZergServer).PushMsg(ctx, in) |
|
} |
|
info := &grpc.UnaryServerInfo{ |
|
Server: srv, |
|
FullMethod: "/push.interface.broadcast.Zerg/PushMsg", |
|
} |
|
handler := func(ctx context.Context, req interface{}) (interface{}, error) { |
|
return srv.(ZergServer).PushMsg(ctx, req.(*PushMsgReq)) |
|
} |
|
return interceptor(ctx, in, info, handler) |
|
} |
|
|
|
func _Zerg_Broadcast_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { |
|
in := new(BroadcastReq) |
|
if err := dec(in); err != nil { |
|
return nil, err |
|
} |
|
if interceptor == nil { |
|
return srv.(ZergServer).Broadcast(ctx, in) |
|
} |
|
info := &grpc.UnaryServerInfo{ |
|
Server: srv, |
|
FullMethod: "/push.interface.broadcast.Zerg/Broadcast", |
|
} |
|
handler := func(ctx context.Context, req interface{}) (interface{}, error) { |
|
return srv.(ZergServer).Broadcast(ctx, req.(*BroadcastReq)) |
|
} |
|
return interceptor(ctx, in, info, handler) |
|
} |
|
|
|
func _Zerg_BroadcastRoom_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { |
|
in := new(BroadcastRoomReq) |
|
if err := dec(in); err != nil { |
|
return nil, err |
|
} |
|
if interceptor == nil { |
|
return srv.(ZergServer).BroadcastRoom(ctx, in) |
|
} |
|
info := &grpc.UnaryServerInfo{ |
|
Server: srv, |
|
FullMethod: "/push.interface.broadcast.Zerg/BroadcastRoom", |
|
} |
|
handler := func(ctx context.Context, req interface{}) (interface{}, error) { |
|
return srv.(ZergServer).BroadcastRoom(ctx, req.(*BroadcastRoomReq)) |
|
} |
|
return interceptor(ctx, in, info, handler) |
|
} |
|
|
|
func _Zerg_Rooms_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { |
|
in := new(RoomsReq) |
|
if err := dec(in); err != nil { |
|
return nil, err |
|
} |
|
if interceptor == nil { |
|
return srv.(ZergServer).Rooms(ctx, in) |
|
} |
|
info := &grpc.UnaryServerInfo{ |
|
Server: srv, |
|
FullMethod: "/push.interface.broadcast.Zerg/Rooms", |
|
} |
|
handler := func(ctx context.Context, req interface{}) (interface{}, error) { |
|
return srv.(ZergServer).Rooms(ctx, req.(*RoomsReq)) |
|
} |
|
return interceptor(ctx, in, info, handler) |
|
} |
|
|
|
var _Zerg_serviceDesc = grpc.ServiceDesc{ |
|
ServiceName: "push.interface.broadcast.Zerg", |
|
HandlerType: (*ZergServer)(nil), |
|
Methods: []grpc.MethodDesc{ |
|
{ |
|
MethodName: "Ping", |
|
Handler: _Zerg_Ping_Handler, |
|
}, |
|
{ |
|
MethodName: "Close", |
|
Handler: _Zerg_Close_Handler, |
|
}, |
|
{ |
|
MethodName: "PushMsg", |
|
Handler: _Zerg_PushMsg_Handler, |
|
}, |
|
{ |
|
MethodName: "Broadcast", |
|
Handler: _Zerg_Broadcast_Handler, |
|
}, |
|
{ |
|
MethodName: "BroadcastRoom", |
|
Handler: _Zerg_BroadcastRoom_Handler, |
|
}, |
|
{ |
|
MethodName: "Rooms", |
|
Handler: _Zerg_Rooms_Handler, |
|
}, |
|
}, |
|
Streams: []grpc.StreamDesc{}, |
|
Metadata: "app/interface/main/broadcast/api/grpc/v1/api.proto", |
|
} |
|
|
|
func (m *Empty) 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 *Empty) MarshalTo(dAtA []byte) (int, error) { |
|
var i int |
|
_ = i |
|
var l int |
|
_ = l |
|
return i, nil |
|
} |
|
|
|
func (m *PushMsgReq) 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 *PushMsgReq) MarshalTo(dAtA []byte) (int, error) { |
|
var i int |
|
_ = i |
|
var l int |
|
_ = l |
|
if len(m.Keys) > 0 { |
|
for _, s := range m.Keys { |
|
dAtA[i] = 0xa |
|
i++ |
|
l = len(s) |
|
for l >= 1<<7 { |
|
dAtA[i] = uint8(uint64(l)&0x7f | 0x80) |
|
l >>= 7 |
|
i++ |
|
} |
|
dAtA[i] = uint8(l) |
|
i++ |
|
i += copy(dAtA[i:], s) |
|
} |
|
} |
|
if m.Proto != nil { |
|
dAtA[i] = 0x12 |
|
i++ |
|
i = encodeVarintApi(dAtA, i, uint64(m.Proto.Size())) |
|
n1, err := m.Proto.MarshalTo(dAtA[i:]) |
|
if err != nil { |
|
return 0, err |
|
} |
|
i += n1 |
|
} |
|
if m.ProtoOp != 0 { |
|
dAtA[i] = 0x18 |
|
i++ |
|
i = encodeVarintApi(dAtA, i, uint64(m.ProtoOp)) |
|
} |
|
return i, nil |
|
} |
|
|
|
func (m *PushMsgReply) 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 *PushMsgReply) MarshalTo(dAtA []byte) (int, error) { |
|
var i int |
|
_ = i |
|
var l int |
|
_ = l |
|
return i, nil |
|
} |
|
|
|
func (m *BroadcastReq) 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 *BroadcastReq) MarshalTo(dAtA []byte) (int, error) { |
|
var i int |
|
_ = i |
|
var l int |
|
_ = l |
|
if m.ProtoOp != 0 { |
|
dAtA[i] = 0x8 |
|
i++ |
|
i = encodeVarintApi(dAtA, i, uint64(m.ProtoOp)) |
|
} |
|
if m.Proto != nil { |
|
dAtA[i] = 0x12 |
|
i++ |
|
i = encodeVarintApi(dAtA, i, uint64(m.Proto.Size())) |
|
n2, err := m.Proto.MarshalTo(dAtA[i:]) |
|
if err != nil { |
|
return 0, err |
|
} |
|
i += n2 |
|
} |
|
if m.Speed != 0 { |
|
dAtA[i] = 0x18 |
|
i++ |
|
i = encodeVarintApi(dAtA, i, uint64(m.Speed)) |
|
} |
|
if len(m.Platform) > 0 { |
|
dAtA[i] = 0x22 |
|
i++ |
|
i = encodeVarintApi(dAtA, i, uint64(len(m.Platform))) |
|
i += copy(dAtA[i:], m.Platform) |
|
} |
|
return i, nil |
|
} |
|
|
|
func (m *BroadcastReply) 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 *BroadcastReply) MarshalTo(dAtA []byte) (int, error) { |
|
var i int |
|
_ = i |
|
var l int |
|
_ = l |
|
return i, nil |
|
} |
|
|
|
func (m *BroadcastRoomReq) 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 *BroadcastRoomReq) MarshalTo(dAtA []byte) (int, error) { |
|
var i int |
|
_ = i |
|
var l int |
|
_ = l |
|
if len(m.RoomID) > 0 { |
|
dAtA[i] = 0xa |
|
i++ |
|
i = encodeVarintApi(dAtA, i, uint64(len(m.RoomID))) |
|
i += copy(dAtA[i:], m.RoomID) |
|
} |
|
if m.Proto != nil { |
|
dAtA[i] = 0x12 |
|
i++ |
|
i = encodeVarintApi(dAtA, i, uint64(m.Proto.Size())) |
|
n3, err := m.Proto.MarshalTo(dAtA[i:]) |
|
if err != nil { |
|
return 0, err |
|
} |
|
i += n3 |
|
} |
|
return i, nil |
|
} |
|
|
|
func (m *BroadcastRoomReply) 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 *BroadcastRoomReply) MarshalTo(dAtA []byte) (int, error) { |
|
var i int |
|
_ = i |
|
var l int |
|
_ = l |
|
return i, nil |
|
} |
|
|
|
func (m *RoomsReq) 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 *RoomsReq) MarshalTo(dAtA []byte) (int, error) { |
|
var i int |
|
_ = i |
|
var l int |
|
_ = l |
|
return i, nil |
|
} |
|
|
|
func (m *RoomsReply) 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 *RoomsReply) MarshalTo(dAtA []byte) (int, error) { |
|
var i int |
|
_ = i |
|
var l int |
|
_ = l |
|
if len(m.Rooms) > 0 { |
|
for k, _ := range m.Rooms { |
|
dAtA[i] = 0xa |
|
i++ |
|
v := m.Rooms[k] |
|
mapSize := 1 + len(k) + sovApi(uint64(len(k))) + 1 + 1 |
|
i = encodeVarintApi(dAtA, i, uint64(mapSize)) |
|
dAtA[i] = 0xa |
|
i++ |
|
i = encodeVarintApi(dAtA, i, uint64(len(k))) |
|
i += copy(dAtA[i:], k) |
|
dAtA[i] = 0x10 |
|
i++ |
|
if v { |
|
dAtA[i] = 1 |
|
} else { |
|
dAtA[i] = 0 |
|
} |
|
i++ |
|
} |
|
} |
|
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 *Empty) Size() (n int) { |
|
var l int |
|
_ = l |
|
return n |
|
} |
|
|
|
func (m *PushMsgReq) Size() (n int) { |
|
var l int |
|
_ = l |
|
if len(m.Keys) > 0 { |
|
for _, s := range m.Keys { |
|
l = len(s) |
|
n += 1 + l + sovApi(uint64(l)) |
|
} |
|
} |
|
if m.Proto != nil { |
|
l = m.Proto.Size() |
|
n += 1 + l + sovApi(uint64(l)) |
|
} |
|
if m.ProtoOp != 0 { |
|
n += 1 + sovApi(uint64(m.ProtoOp)) |
|
} |
|
return n |
|
} |
|
|
|
func (m *PushMsgReply) Size() (n int) { |
|
var l int |
|
_ = l |
|
return n |
|
} |
|
|
|
func (m *BroadcastReq) Size() (n int) { |
|
var l int |
|
_ = l |
|
if m.ProtoOp != 0 { |
|
n += 1 + sovApi(uint64(m.ProtoOp)) |
|
} |
|
if m.Proto != nil { |
|
l = m.Proto.Size() |
|
n += 1 + l + sovApi(uint64(l)) |
|
} |
|
if m.Speed != 0 { |
|
n += 1 + sovApi(uint64(m.Speed)) |
|
} |
|
l = len(m.Platform) |
|
if l > 0 { |
|
n += 1 + l + sovApi(uint64(l)) |
|
} |
|
return n |
|
} |
|
|
|
func (m *BroadcastReply) Size() (n int) { |
|
var l int |
|
_ = l |
|
return n |
|
} |
|
|
|
func (m *BroadcastRoomReq) Size() (n int) { |
|
var l int |
|
_ = l |
|
l = len(m.RoomID) |
|
if l > 0 { |
|
n += 1 + l + sovApi(uint64(l)) |
|
} |
|
if m.Proto != nil { |
|
l = m.Proto.Size() |
|
n += 1 + l + sovApi(uint64(l)) |
|
} |
|
return n |
|
} |
|
|
|
func (m *BroadcastRoomReply) Size() (n int) { |
|
var l int |
|
_ = l |
|
return n |
|
} |
|
|
|
func (m *RoomsReq) Size() (n int) { |
|
var l int |
|
_ = l |
|
return n |
|
} |
|
|
|
func (m *RoomsReply) Size() (n int) { |
|
var l int |
|
_ = l |
|
if len(m.Rooms) > 0 { |
|
for k, v := range m.Rooms { |
|
_ = k |
|
_ = v |
|
mapEntrySize := 1 + len(k) + sovApi(uint64(len(k))) + 1 + 1 |
|
n += mapEntrySize + 1 + sovApi(uint64(mapEntrySize)) |
|
} |
|
} |
|
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 *Empty) 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: Empty: wiretype end group for non-group") |
|
} |
|
if fieldNum <= 0 { |
|
return fmt.Errorf("proto: Empty: 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 |
|
} |
|
iNdEx += skippy |
|
} |
|
} |
|
|
|
if iNdEx > l { |
|
return io.ErrUnexpectedEOF |
|
} |
|
return nil |
|
} |
|
func (m *PushMsgReq) 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: PushMsgReq: wiretype end group for non-group") |
|
} |
|
if fieldNum <= 0 { |
|
return fmt.Errorf("proto: PushMsgReq: illegal tag %d (wire type %d)", fieldNum, wire) |
|
} |
|
switch fieldNum { |
|
case 1: |
|
if wireType != 2 { |
|
return fmt.Errorf("proto: wrong wireType = %d for field Keys", wireType) |
|
} |
|
var stringLen uint64 |
|
for shift := uint(0); ; shift += 7 { |
|
if shift >= 64 { |
|
return ErrIntOverflowApi |
|
} |
|
if iNdEx >= l { |
|
return io.ErrUnexpectedEOF |
|
} |
|
b := dAtA[iNdEx] |
|
iNdEx++ |
|
stringLen |= (uint64(b) & 0x7F) << shift |
|
if b < 0x80 { |
|
break |
|
} |
|
} |
|
intStringLen := int(stringLen) |
|
if intStringLen < 0 { |
|
return ErrInvalidLengthApi |
|
} |
|
postIndex := iNdEx + intStringLen |
|
if postIndex > l { |
|
return io.ErrUnexpectedEOF |
|
} |
|
m.Keys = append(m.Keys, string(dAtA[iNdEx:postIndex])) |
|
iNdEx = postIndex |
|
case 2: |
|
if wireType != 2 { |
|
return fmt.Errorf("proto: wrong wireType = %d for field Proto", wireType) |
|
} |
|
var msglen int |
|
for shift := uint(0); ; shift += 7 { |
|
if shift >= 64 { |
|
return ErrIntOverflowApi |
|
} |
|
if iNdEx >= l { |
|
return io.ErrUnexpectedEOF |
|
} |
|
b := dAtA[iNdEx] |
|
iNdEx++ |
|
msglen |= (int(b) & 0x7F) << shift |
|
if b < 0x80 { |
|
break |
|
} |
|
} |
|
if msglen < 0 { |
|
return ErrInvalidLengthApi |
|
} |
|
postIndex := iNdEx + msglen |
|
if postIndex > l { |
|
return io.ErrUnexpectedEOF |
|
} |
|
if m.Proto == nil { |
|
m.Proto = &push_service_broadcast_model.Proto{} |
|
} |
|
if err := m.Proto.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { |
|
return err |
|
} |
|
iNdEx = postIndex |
|
case 3: |
|
if wireType != 0 { |
|
return fmt.Errorf("proto: wrong wireType = %d for field ProtoOp", wireType) |
|
} |
|
m.ProtoOp = 0 |
|
for shift := uint(0); ; shift += 7 { |
|
if shift >= 64 { |
|
return ErrIntOverflowApi |
|
} |
|
if iNdEx >= l { |
|
return io.ErrUnexpectedEOF |
|
} |
|
b := dAtA[iNdEx] |
|
iNdEx++ |
|
m.ProtoOp |= (int32(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 |
|
} |
|
iNdEx += skippy |
|
} |
|
} |
|
|
|
if iNdEx > l { |
|
return io.ErrUnexpectedEOF |
|
} |
|
return nil |
|
} |
|
func (m *PushMsgReply) 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: PushMsgReply: wiretype end group for non-group") |
|
} |
|
if fieldNum <= 0 { |
|
return fmt.Errorf("proto: PushMsgReply: 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 |
|
} |
|
iNdEx += skippy |
|
} |
|
} |
|
|
|
if iNdEx > l { |
|
return io.ErrUnexpectedEOF |
|
} |
|
return nil |
|
} |
|
func (m *BroadcastReq) 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: BroadcastReq: wiretype end group for non-group") |
|
} |
|
if fieldNum <= 0 { |
|
return fmt.Errorf("proto: BroadcastReq: illegal tag %d (wire type %d)", fieldNum, wire) |
|
} |
|
switch fieldNum { |
|
case 1: |
|
if wireType != 0 { |
|
return fmt.Errorf("proto: wrong wireType = %d for field ProtoOp", wireType) |
|
} |
|
m.ProtoOp = 0 |
|
for shift := uint(0); ; shift += 7 { |
|
if shift >= 64 { |
|
return ErrIntOverflowApi |
|
} |
|
if iNdEx >= l { |
|
return io.ErrUnexpectedEOF |
|
} |
|
b := dAtA[iNdEx] |
|
iNdEx++ |
|
m.ProtoOp |= (int32(b) & 0x7F) << shift |
|
if b < 0x80 { |
|
break |
|
} |
|
} |
|
case 2: |
|
if wireType != 2 { |
|
return fmt.Errorf("proto: wrong wireType = %d for field Proto", wireType) |
|
} |
|
var msglen int |
|
for shift := uint(0); ; shift += 7 { |
|
if shift >= 64 { |
|
return ErrIntOverflowApi |
|
} |
|
if iNdEx >= l { |
|
return io.ErrUnexpectedEOF |
|
} |
|
b := dAtA[iNdEx] |
|
iNdEx++ |
|
msglen |= (int(b) & 0x7F) << shift |
|
if b < 0x80 { |
|
break |
|
} |
|
} |
|
if msglen < 0 { |
|
return ErrInvalidLengthApi |
|
} |
|
postIndex := iNdEx + msglen |
|
if postIndex > l { |
|
return io.ErrUnexpectedEOF |
|
} |
|
if m.Proto == nil { |
|
m.Proto = &push_service_broadcast_model.Proto{} |
|
} |
|
if err := m.Proto.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { |
|
return err |
|
} |
|
iNdEx = postIndex |
|
case 3: |
|
if wireType != 0 { |
|
return fmt.Errorf("proto: wrong wireType = %d for field Speed", wireType) |
|
} |
|
m.Speed = 0 |
|
for shift := uint(0); ; shift += 7 { |
|
if shift >= 64 { |
|
return ErrIntOverflowApi |
|
} |
|
if iNdEx >= l { |
|
return io.ErrUnexpectedEOF |
|
} |
|
b := dAtA[iNdEx] |
|
iNdEx++ |
|
m.Speed |= (int32(b) & 0x7F) << shift |
|
if b < 0x80 { |
|
break |
|
} |
|
} |
|
case 4: |
|
if wireType != 2 { |
|
return fmt.Errorf("proto: wrong wireType = %d for field Platform", wireType) |
|
} |
|
var stringLen uint64 |
|
for shift := uint(0); ; shift += 7 { |
|
if shift >= 64 { |
|
return ErrIntOverflowApi |
|
} |
|
if iNdEx >= l { |
|
return io.ErrUnexpectedEOF |
|
} |
|
b := dAtA[iNdEx] |
|
iNdEx++ |
|
stringLen |= (uint64(b) & 0x7F) << shift |
|
if b < 0x80 { |
|
break |
|
} |
|
} |
|
intStringLen := int(stringLen) |
|
if intStringLen < 0 { |
|
return ErrInvalidLengthApi |
|
} |
|
postIndex := iNdEx + intStringLen |
|
if postIndex > l { |
|
return io.ErrUnexpectedEOF |
|
} |
|
m.Platform = string(dAtA[iNdEx:postIndex]) |
|
iNdEx = postIndex |
|
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 |
|
} |
|
iNdEx += skippy |
|
} |
|
} |
|
|
|
if iNdEx > l { |
|
return io.ErrUnexpectedEOF |
|
} |
|
return nil |
|
} |
|
func (m *BroadcastReply) 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: BroadcastReply: wiretype end group for non-group") |
|
} |
|
if fieldNum <= 0 { |
|
return fmt.Errorf("proto: BroadcastReply: 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 |
|
} |
|
iNdEx += skippy |
|
} |
|
} |
|
|
|
if iNdEx > l { |
|
return io.ErrUnexpectedEOF |
|
} |
|
return nil |
|
} |
|
func (m *BroadcastRoomReq) 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: BroadcastRoomReq: wiretype end group for non-group") |
|
} |
|
if fieldNum <= 0 { |
|
return fmt.Errorf("proto: BroadcastRoomReq: illegal tag %d (wire type %d)", fieldNum, wire) |
|
} |
|
switch fieldNum { |
|
case 1: |
|
if wireType != 2 { |
|
return fmt.Errorf("proto: wrong wireType = %d for field RoomID", wireType) |
|
} |
|
var stringLen uint64 |
|
for shift := uint(0); ; shift += 7 { |
|
if shift >= 64 { |
|
return ErrIntOverflowApi |
|
} |
|
if iNdEx >= l { |
|
return io.ErrUnexpectedEOF |
|
} |
|
b := dAtA[iNdEx] |
|
iNdEx++ |
|
stringLen |= (uint64(b) & 0x7F) << shift |
|
if b < 0x80 { |
|
break |
|
} |
|
} |
|
intStringLen := int(stringLen) |
|
if intStringLen < 0 { |
|
return ErrInvalidLengthApi |
|
} |
|
postIndex := iNdEx + intStringLen |
|
if postIndex > l { |
|
return io.ErrUnexpectedEOF |
|
} |
|
m.RoomID = string(dAtA[iNdEx:postIndex]) |
|
iNdEx = postIndex |
|
case 2: |
|
if wireType != 2 { |
|
return fmt.Errorf("proto: wrong wireType = %d for field Proto", wireType) |
|
} |
|
var msglen int |
|
for shift := uint(0); ; shift += 7 { |
|
if shift >= 64 { |
|
return ErrIntOverflowApi |
|
} |
|
if iNdEx >= l { |
|
return io.ErrUnexpectedEOF |
|
} |
|
b := dAtA[iNdEx] |
|
iNdEx++ |
|
msglen |= (int(b) & 0x7F) << shift |
|
if b < 0x80 { |
|
break |
|
} |
|
} |
|
if msglen < 0 { |
|
return ErrInvalidLengthApi |
|
} |
|
postIndex := iNdEx + msglen |
|
if postIndex > l { |
|
return io.ErrUnexpectedEOF |
|
} |
|
if m.Proto == nil { |
|
m.Proto = &push_service_broadcast_model.Proto{} |
|
} |
|
if err := m.Proto.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { |
|
return err |
|
} |
|
iNdEx = postIndex |
|
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 |
|
} |
|
iNdEx += skippy |
|
} |
|
} |
|
|
|
if iNdEx > l { |
|
return io.ErrUnexpectedEOF |
|
} |
|
return nil |
|
} |
|
func (m *BroadcastRoomReply) 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: BroadcastRoomReply: wiretype end group for non-group") |
|
} |
|
if fieldNum <= 0 { |
|
return fmt.Errorf("proto: BroadcastRoomReply: 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 |
|
} |
|
iNdEx += skippy |
|
} |
|
} |
|
|
|
if iNdEx > l { |
|
return io.ErrUnexpectedEOF |
|
} |
|
return nil |
|
} |
|
func (m *RoomsReq) 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: RoomsReq: wiretype end group for non-group") |
|
} |
|
if fieldNum <= 0 { |
|
return fmt.Errorf("proto: RoomsReq: 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 |
|
} |
|
iNdEx += skippy |
|
} |
|
} |
|
|
|
if iNdEx > l { |
|
return io.ErrUnexpectedEOF |
|
} |
|
return nil |
|
} |
|
func (m *RoomsReply) 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: RoomsReply: wiretype end group for non-group") |
|
} |
|
if fieldNum <= 0 { |
|
return fmt.Errorf("proto: RoomsReply: illegal tag %d (wire type %d)", fieldNum, wire) |
|
} |
|
switch fieldNum { |
|
case 1: |
|
if wireType != 2 { |
|
return fmt.Errorf("proto: wrong wireType = %d for field Rooms", wireType) |
|
} |
|
var msglen int |
|
for shift := uint(0); ; shift += 7 { |
|
if shift >= 64 { |
|
return ErrIntOverflowApi |
|
} |
|
if iNdEx >= l { |
|
return io.ErrUnexpectedEOF |
|
} |
|
b := dAtA[iNdEx] |
|
iNdEx++ |
|
msglen |= (int(b) & 0x7F) << shift |
|
if b < 0x80 { |
|
break |
|
} |
|
} |
|
if msglen < 0 { |
|
return ErrInvalidLengthApi |
|
} |
|
postIndex := iNdEx + msglen |
|
if postIndex > l { |
|
return io.ErrUnexpectedEOF |
|
} |
|
if m.Rooms == nil { |
|
m.Rooms = make(map[string]bool) |
|
} |
|
var mapkey string |
|
var mapvalue bool |
|
for iNdEx < postIndex { |
|
entryPreIndex := 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) |
|
if fieldNum == 1 { |
|
var stringLenmapkey uint64 |
|
for shift := uint(0); ; shift += 7 { |
|
if shift >= 64 { |
|
return ErrIntOverflowApi |
|
} |
|
if iNdEx >= l { |
|
return io.ErrUnexpectedEOF |
|
} |
|
b := dAtA[iNdEx] |
|
iNdEx++ |
|
stringLenmapkey |= (uint64(b) & 0x7F) << shift |
|
if b < 0x80 { |
|
break |
|
} |
|
} |
|
intStringLenmapkey := int(stringLenmapkey) |
|
if intStringLenmapkey < 0 { |
|
return ErrInvalidLengthApi |
|
} |
|
postStringIndexmapkey := iNdEx + intStringLenmapkey |
|
if postStringIndexmapkey > l { |
|
return io.ErrUnexpectedEOF |
|
} |
|
mapkey = string(dAtA[iNdEx:postStringIndexmapkey]) |
|
iNdEx = postStringIndexmapkey |
|
} else if fieldNum == 2 { |
|
var mapvaluetemp int |
|
for shift := uint(0); ; shift += 7 { |
|
if shift >= 64 { |
|
return ErrIntOverflowApi |
|
} |
|
if iNdEx >= l { |
|
return io.ErrUnexpectedEOF |
|
} |
|
b := dAtA[iNdEx] |
|
iNdEx++ |
|
mapvaluetemp |= (int(b) & 0x7F) << shift |
|
if b < 0x80 { |
|
break |
|
} |
|
} |
|
mapvalue = bool(mapvaluetemp != 0) |
|
} else { |
|
iNdEx = entryPreIndex |
|
skippy, err := skipApi(dAtA[iNdEx:]) |
|
if err != nil { |
|
return err |
|
} |
|
if skippy < 0 { |
|
return ErrInvalidLengthApi |
|
} |
|
if (iNdEx + skippy) > postIndex { |
|
return io.ErrUnexpectedEOF |
|
} |
|
iNdEx += skippy |
|
} |
|
} |
|
m.Rooms[mapkey] = mapvalue |
|
iNdEx = postIndex |
|
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 |
|
} |
|
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/interface/main/broadcast/api/grpc/v1/api.proto", fileDescriptorApi) |
|
} |
|
|
|
var fileDescriptorApi = []byte{ |
|
// 520 bytes of a gzipped FileDescriptorProto |
|
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xac, 0x53, 0x41, 0x6b, 0xdb, 0x30, |
|
0x18, 0x9d, 0x12, 0xbb, 0x49, 0xbe, 0x76, 0x25, 0x88, 0x32, 0x8c, 0x0f, 0x69, 0xf0, 0xca, 0x30, |
|
0xa3, 0xb3, 0x69, 0x76, 0xe9, 0x7a, 0xec, 0x16, 0x58, 0x0f, 0x63, 0x99, 0x2f, 0x83, 0xc2, 0x0e, |
|
0x4e, 0xa2, 0x38, 0xa6, 0x76, 0xa4, 0x48, 0x76, 0xc0, 0x3f, 0x63, 0x8c, 0xc1, 0x8e, 0xfb, 0x39, |
|
0x3b, 0xee, 0x27, 0x8c, 0xfc, 0x92, 0x21, 0xc9, 0x75, 0xd2, 0x8d, 0xac, 0x86, 0xee, 0x12, 0xbe, |
|
0x27, 0xde, 0x7b, 0xdf, 0x93, 0xf5, 0x02, 0x83, 0x90, 0x31, 0x3f, 0x5e, 0x64, 0x84, 0xcf, 0xc2, |
|
0x09, 0xf1, 0xd3, 0x30, 0x5e, 0xf8, 0x63, 0x4e, 0xc3, 0xe9, 0x24, 0x14, 0x99, 0x1f, 0xb2, 0xd8, |
|
0x8f, 0x38, 0x9b, 0xf8, 0xab, 0x33, 0x39, 0x7b, 0x8c, 0xd3, 0x8c, 0x62, 0x8b, 0xe5, 0x62, 0xee, |
|
0x55, 0x22, 0xaf, 0xe2, 0xdb, 0xa7, 0xd2, 0x4d, 0x10, 0xbe, 0x8a, 0xff, 0xf6, 0x4a, 0xe9, 0x94, |
|
0x24, 0xfa, 0x57, 0xfb, 0xd8, 0x2f, 0xa2, 0x38, 0x9b, 0xe7, 0x63, 0x6f, 0x42, 0x53, 0x3f, 0xa2, |
|
0x11, 0xf5, 0xd5, 0xf1, 0x38, 0x9f, 0x29, 0xa4, 0x80, 0x9a, 0x34, 0xdd, 0x69, 0x81, 0x39, 0x4c, |
|
0x59, 0x56, 0x38, 0x39, 0xc0, 0x28, 0x17, 0xf3, 0x77, 0x22, 0x0a, 0xc8, 0x12, 0x63, 0x30, 0x6e, |
|
0x48, 0x21, 0x2c, 0xd4, 0x6f, 0xba, 0x9d, 0x40, 0xcd, 0xf8, 0x15, 0x98, 0x4a, 0x63, 0x35, 0xfa, |
|
0xc8, 0xdd, 0x1f, 0x3c, 0xf5, 0x54, 0xe2, 0x32, 0xd8, 0x26, 0xaf, 0xa7, 0xd3, 0x8c, 0x24, 0x35, |
|
0x30, 0xcb, 0xcb, 0x41, 0x4b, 0x0d, 0xef, 0x99, 0xd5, 0xec, 0x23, 0xd7, 0x0c, 0x6e, 0xa1, 0x73, |
|
0x08, 0x07, 0xd5, 0x5a, 0x96, 0x14, 0xce, 0x57, 0x04, 0x07, 0x97, 0xb7, 0x56, 0x32, 0xc9, 0x96, |
|
0x14, 0xdd, 0x91, 0x3e, 0x24, 0xcf, 0x11, 0x98, 0x82, 0x11, 0x32, 0x2d, 0xd3, 0x68, 0x80, 0x6d, |
|
0x68, 0xb3, 0x24, 0xcc, 0x66, 0x94, 0xa7, 0x96, 0xd1, 0x47, 0x6e, 0x27, 0xa8, 0xb0, 0xd3, 0x85, |
|
0xc3, 0xad, 0x58, 0x32, 0x29, 0x81, 0xee, 0xe6, 0x84, 0xd2, 0x54, 0x86, 0x7d, 0x02, 0x7b, 0x9c, |
|
0xd2, 0xf4, 0xea, 0x8d, 0xca, 0xda, 0x09, 0x4a, 0xf4, 0x80, 0xa8, 0xce, 0x11, 0xe0, 0x3f, 0xd6, |
|
0xc8, 0xe5, 0x00, 0x6d, 0x09, 0x44, 0x40, 0x96, 0xce, 0x17, 0x04, 0x50, 0x02, 0x96, 0x14, 0x78, |
|
0x08, 0xa6, 0xdc, 0xaa, 0xdf, 0x6e, 0x7f, 0xe0, 0x7b, 0xbb, 0x8a, 0xe5, 0x6d, 0x44, 0x7a, 0x1c, |
|
0x2e, 0x32, 0x5e, 0x04, 0x5a, 0x6d, 0x9f, 0x97, 0xa6, 0xea, 0x10, 0x77, 0xa1, 0x79, 0x43, 0x8a, |
|
0xf2, 0x56, 0x72, 0x94, 0x9f, 0x70, 0x15, 0x26, 0x39, 0x51, 0x57, 0x6a, 0x07, 0x1a, 0x5c, 0x34, |
|
0xce, 0xd1, 0x85, 0xf1, 0xed, 0xfb, 0xf1, 0xa3, 0xc1, 0x67, 0x03, 0x8c, 0x6b, 0xc2, 0x23, 0xfc, |
|
0x16, 0x8c, 0x51, 0xbc, 0x88, 0xf0, 0xf1, 0xee, 0x20, 0xaa, 0x81, 0xf6, 0x7d, 0x04, 0x7c, 0x05, |
|
0xe6, 0xeb, 0x84, 0x0a, 0xf2, 0x1f, 0xac, 0x3e, 0x42, 0xab, 0xac, 0x1d, 0x3e, 0xd9, 0xcd, 0xdd, |
|
0xfc, 0x21, 0xec, 0x67, 0x35, 0x58, 0xf2, 0xeb, 0x7f, 0x82, 0x4e, 0xf5, 0x5c, 0xf8, 0x1f, 0xa2, |
|
0xed, 0x8e, 0xdb, 0x6e, 0x2d, 0x9e, 0xb4, 0x8f, 0xe1, 0xf1, 0x9d, 0x36, 0xe0, 0xe7, 0x75, 0xa4, |
|
0xba, 0x9d, 0xf6, 0x69, 0x6d, 0xae, 0x5c, 0xf5, 0x01, 0x4c, 0x55, 0x00, 0xec, 0xdc, 0xdb, 0xa0, |
|
0xa5, 0x7d, 0x52, 0xa7, 0x65, 0x97, 0xdd, 0x1f, 0xeb, 0x1e, 0xfa, 0xb9, 0xee, 0xa1, 0x5f, 0xeb, |
|
0x1e, 0xba, 0x6e, 0xac, 0xce, 0xc6, 0x7b, 0xaa, 0xe4, 0x2f, 0x7f, 0x07, 0x00, 0x00, 0xff, 0xff, |
|
0x8e, 0xd0, 0xf3, 0x8f, 0x32, 0x05, 0x00, 0x00, |
|
}
|
|
|