1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477147814791480148114821483148414851486148714881489149014911492149314941495149614971498149915001501150215031504150515061507150815091510151115121513151415151516151715181519152015211522152315241525152615271528152915301531153215331534153515361537153815391540154115421543154415451546154715481549155015511552155315541555155615571558155915601561156215631564156515661567156815691570157115721573157415751576157715781579158015811582158315841585158615871588158915901591159215931594159515961597159815991600160116021603160416051606160716081609161016111612161316141615161616171618161916201621162216231624162516261627162816291630163116321633163416351636163716381639164016411642164316441645164616471648164916501651165216531654165516561657165816591660166116621663166416651666166716681669167016711672167316741675167616771678167916801681168216831684168516861687168816891690169116921693169416951696169716981699170017011702170317041705170617071708170917101711171217131714171517161717171817191720172117221723172417251726172717281729173017311732173317341735173617371738173917401741174217431744174517461747174817491750175117521753175417551756175717581759176017611762176317641765176617671768176917701771177217731774177517761777 |
- // 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,
- }
|