api.pb.go 43 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477147814791480148114821483148414851486148714881489149014911492149314941495149614971498149915001501150215031504150515061507150815091510151115121513151415151516151715181519152015211522152315241525152615271528152915301531153215331534153515361537153815391540154115421543154415451546154715481549155015511552155315541555155615571558155915601561156215631564156515661567156815691570157115721573157415751576157715781579158015811582158315841585158615871588158915901591159215931594159515961597159815991600160116021603160416051606160716081609161016111612161316141615161616171618161916201621162216231624162516261627162816291630163116321633163416351636163716381639164016411642164316441645164616471648164916501651165216531654165516561657165816591660166116621663166416651666166716681669167016711672167316741675167616771678167916801681168216831684168516861687168816891690169116921693169416951696169716981699170017011702170317041705170617071708170917101711171217131714171517161717171817191720172117221723172417251726172717281729173017311732173317341735173617371738173917401741174217431744174517461747174817491750175117521753175417551756175717581759176017611762176317641765176617671768176917701771177217731774177517761777
  1. // Code generated by protoc-gen-gogo. DO NOT EDIT.
  2. // source: app/interface/main/broadcast/api/grpc/v1/api.proto
  3. /*
  4. Package v1 is a generated protocol buffer package.
  5. It is generated from these files:
  6. app/interface/main/broadcast/api/grpc/v1/api.proto
  7. It has these top-level messages:
  8. Empty
  9. PushMsgReq
  10. PushMsgReply
  11. BroadcastReq
  12. BroadcastReply
  13. BroadcastRoomReq
  14. BroadcastRoomReply
  15. RoomsReq
  16. RoomsReply
  17. */
  18. package v1
  19. import proto "github.com/gogo/protobuf/proto"
  20. import fmt "fmt"
  21. import math "math"
  22. import push_service_broadcast_model "go-common/app/service/main/broadcast/model"
  23. import _ "github.com/gogo/protobuf/gogoproto"
  24. import context "golang.org/x/net/context"
  25. import grpc "google.golang.org/grpc"
  26. import io "io"
  27. // Reference imports to suppress errors if they are not otherwise used.
  28. var _ = proto.Marshal
  29. var _ = fmt.Errorf
  30. var _ = math.Inf
  31. // This is a compile-time assertion to ensure that this generated file
  32. // is compatible with the proto package it is being compiled against.
  33. // A compilation error at this line likely means your copy of the
  34. // proto package needs to be updated.
  35. const _ = proto.GoGoProtoPackageIsVersion2 // please upgrade the proto package
  36. type Empty struct {
  37. }
  38. func (m *Empty) Reset() { *m = Empty{} }
  39. func (m *Empty) String() string { return proto.CompactTextString(m) }
  40. func (*Empty) ProtoMessage() {}
  41. func (*Empty) Descriptor() ([]byte, []int) { return fileDescriptorApi, []int{0} }
  42. type PushMsgReq struct {
  43. Keys []string `protobuf:"bytes,1,rep,name=keys" json:"keys,omitempty"`
  44. ProtoOp int32 `protobuf:"varint,3,opt,name=protoOp,proto3" json:"protoOp,omitempty"`
  45. Proto *push_service_broadcast_model.Proto `protobuf:"bytes,2,opt,name=proto" json:"proto,omitempty"`
  46. }
  47. func (m *PushMsgReq) Reset() { *m = PushMsgReq{} }
  48. func (m *PushMsgReq) String() string { return proto.CompactTextString(m) }
  49. func (*PushMsgReq) ProtoMessage() {}
  50. func (*PushMsgReq) Descriptor() ([]byte, []int) { return fileDescriptorApi, []int{1} }
  51. func (m *PushMsgReq) GetKeys() []string {
  52. if m != nil {
  53. return m.Keys
  54. }
  55. return nil
  56. }
  57. func (m *PushMsgReq) GetProtoOp() int32 {
  58. if m != nil {
  59. return m.ProtoOp
  60. }
  61. return 0
  62. }
  63. func (m *PushMsgReq) GetProto() *push_service_broadcast_model.Proto {
  64. if m != nil {
  65. return m.Proto
  66. }
  67. return nil
  68. }
  69. type PushMsgReply struct {
  70. }
  71. func (m *PushMsgReply) Reset() { *m = PushMsgReply{} }
  72. func (m *PushMsgReply) String() string { return proto.CompactTextString(m) }
  73. func (*PushMsgReply) ProtoMessage() {}
  74. func (*PushMsgReply) Descriptor() ([]byte, []int) { return fileDescriptorApi, []int{2} }
  75. type BroadcastReq struct {
  76. ProtoOp int32 `protobuf:"varint,1,opt,name=protoOp,proto3" json:"protoOp,omitempty"`
  77. Proto *push_service_broadcast_model.Proto `protobuf:"bytes,2,opt,name=proto" json:"proto,omitempty"`
  78. Speed int32 `protobuf:"varint,3,opt,name=speed,proto3" json:"speed,omitempty"`
  79. Platform string `protobuf:"bytes,4,opt,name=platform,proto3" json:"platform,omitempty"`
  80. }
  81. func (m *BroadcastReq) Reset() { *m = BroadcastReq{} }
  82. func (m *BroadcastReq) String() string { return proto.CompactTextString(m) }
  83. func (*BroadcastReq) ProtoMessage() {}
  84. func (*BroadcastReq) Descriptor() ([]byte, []int) { return fileDescriptorApi, []int{3} }
  85. func (m *BroadcastReq) GetProtoOp() int32 {
  86. if m != nil {
  87. return m.ProtoOp
  88. }
  89. return 0
  90. }
  91. func (m *BroadcastReq) GetProto() *push_service_broadcast_model.Proto {
  92. if m != nil {
  93. return m.Proto
  94. }
  95. return nil
  96. }
  97. func (m *BroadcastReq) GetSpeed() int32 {
  98. if m != nil {
  99. return m.Speed
  100. }
  101. return 0
  102. }
  103. func (m *BroadcastReq) GetPlatform() string {
  104. if m != nil {
  105. return m.Platform
  106. }
  107. return ""
  108. }
  109. type BroadcastReply struct {
  110. }
  111. func (m *BroadcastReply) Reset() { *m = BroadcastReply{} }
  112. func (m *BroadcastReply) String() string { return proto.CompactTextString(m) }
  113. func (*BroadcastReply) ProtoMessage() {}
  114. func (*BroadcastReply) Descriptor() ([]byte, []int) { return fileDescriptorApi, []int{4} }
  115. type BroadcastRoomReq struct {
  116. RoomID string `protobuf:"bytes,1,opt,name=roomID,proto3" json:"roomID,omitempty"`
  117. Proto *push_service_broadcast_model.Proto `protobuf:"bytes,2,opt,name=proto" json:"proto,omitempty"`
  118. }
  119. func (m *BroadcastRoomReq) Reset() { *m = BroadcastRoomReq{} }
  120. func (m *BroadcastRoomReq) String() string { return proto.CompactTextString(m) }
  121. func (*BroadcastRoomReq) ProtoMessage() {}
  122. func (*BroadcastRoomReq) Descriptor() ([]byte, []int) { return fileDescriptorApi, []int{5} }
  123. func (m *BroadcastRoomReq) GetRoomID() string {
  124. if m != nil {
  125. return m.RoomID
  126. }
  127. return ""
  128. }
  129. func (m *BroadcastRoomReq) GetProto() *push_service_broadcast_model.Proto {
  130. if m != nil {
  131. return m.Proto
  132. }
  133. return nil
  134. }
  135. type BroadcastRoomReply struct {
  136. }
  137. func (m *BroadcastRoomReply) Reset() { *m = BroadcastRoomReply{} }
  138. func (m *BroadcastRoomReply) String() string { return proto.CompactTextString(m) }
  139. func (*BroadcastRoomReply) ProtoMessage() {}
  140. func (*BroadcastRoomReply) Descriptor() ([]byte, []int) { return fileDescriptorApi, []int{6} }
  141. type RoomsReq struct {
  142. }
  143. func (m *RoomsReq) Reset() { *m = RoomsReq{} }
  144. func (m *RoomsReq) String() string { return proto.CompactTextString(m) }
  145. func (*RoomsReq) ProtoMessage() {}
  146. func (*RoomsReq) Descriptor() ([]byte, []int) { return fileDescriptorApi, []int{7} }
  147. type RoomsReply struct {
  148. 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"`
  149. }
  150. func (m *RoomsReply) Reset() { *m = RoomsReply{} }
  151. func (*RoomsReply) ProtoMessage() {}
  152. func (*RoomsReply) Descriptor() ([]byte, []int) { return fileDescriptorApi, []int{8} }
  153. func (m *RoomsReply) GetRooms() map[string]bool {
  154. if m != nil {
  155. return m.Rooms
  156. }
  157. return nil
  158. }
  159. func init() {
  160. proto.RegisterType((*Empty)(nil), "push.interface.broadcast.Empty")
  161. proto.RegisterType((*PushMsgReq)(nil), "push.interface.broadcast.PushMsgReq")
  162. proto.RegisterType((*PushMsgReply)(nil), "push.interface.broadcast.PushMsgReply")
  163. proto.RegisterType((*BroadcastReq)(nil), "push.interface.broadcast.BroadcastReq")
  164. proto.RegisterType((*BroadcastReply)(nil), "push.interface.broadcast.BroadcastReply")
  165. proto.RegisterType((*BroadcastRoomReq)(nil), "push.interface.broadcast.BroadcastRoomReq")
  166. proto.RegisterType((*BroadcastRoomReply)(nil), "push.interface.broadcast.BroadcastRoomReply")
  167. proto.RegisterType((*RoomsReq)(nil), "push.interface.broadcast.RoomsReq")
  168. proto.RegisterType((*RoomsReply)(nil), "push.interface.broadcast.RoomsReply")
  169. }
  170. // Reference imports to suppress errors if they are not otherwise used.
  171. var _ context.Context
  172. var _ grpc.ClientConn
  173. // This is a compile-time assertion to ensure that this generated file
  174. // is compatible with the grpc package it is being compiled against.
  175. const _ = grpc.SupportPackageIsVersion4
  176. // Client API for Zerg service
  177. type ZergClient interface {
  178. // Ping Service
  179. Ping(ctx context.Context, in *Empty, opts ...grpc.CallOption) (*Empty, error)
  180. // Close Service
  181. Close(ctx context.Context, in *Empty, opts ...grpc.CallOption) (*Empty, error)
  182. // PushMsg push by key or mid
  183. PushMsg(ctx context.Context, in *PushMsgReq, opts ...grpc.CallOption) (*PushMsgReply, error)
  184. // Broadcast send to every enrity
  185. Broadcast(ctx context.Context, in *BroadcastReq, opts ...grpc.CallOption) (*BroadcastReply, error)
  186. // BroadcastRoom broadcast to one room
  187. BroadcastRoom(ctx context.Context, in *BroadcastRoomReq, opts ...grpc.CallOption) (*BroadcastRoomReply, error)
  188. // Rooms get all rooms
  189. Rooms(ctx context.Context, in *RoomsReq, opts ...grpc.CallOption) (*RoomsReply, error)
  190. }
  191. type zergClient struct {
  192. cc *grpc.ClientConn
  193. }
  194. func NewZergClient(cc *grpc.ClientConn) ZergClient {
  195. return &zergClient{cc}
  196. }
  197. func (c *zergClient) Ping(ctx context.Context, in *Empty, opts ...grpc.CallOption) (*Empty, error) {
  198. out := new(Empty)
  199. err := grpc.Invoke(ctx, "/push.interface.broadcast.Zerg/Ping", in, out, c.cc, opts...)
  200. if err != nil {
  201. return nil, err
  202. }
  203. return out, nil
  204. }
  205. func (c *zergClient) Close(ctx context.Context, in *Empty, opts ...grpc.CallOption) (*Empty, error) {
  206. out := new(Empty)
  207. err := grpc.Invoke(ctx, "/push.interface.broadcast.Zerg/Close", in, out, c.cc, opts...)
  208. if err != nil {
  209. return nil, err
  210. }
  211. return out, nil
  212. }
  213. func (c *zergClient) PushMsg(ctx context.Context, in *PushMsgReq, opts ...grpc.CallOption) (*PushMsgReply, error) {
  214. out := new(PushMsgReply)
  215. err := grpc.Invoke(ctx, "/push.interface.broadcast.Zerg/PushMsg", in, out, c.cc, opts...)
  216. if err != nil {
  217. return nil, err
  218. }
  219. return out, nil
  220. }
  221. func (c *zergClient) Broadcast(ctx context.Context, in *BroadcastReq, opts ...grpc.CallOption) (*BroadcastReply, error) {
  222. out := new(BroadcastReply)
  223. err := grpc.Invoke(ctx, "/push.interface.broadcast.Zerg/Broadcast", in, out, c.cc, opts...)
  224. if err != nil {
  225. return nil, err
  226. }
  227. return out, nil
  228. }
  229. func (c *zergClient) BroadcastRoom(ctx context.Context, in *BroadcastRoomReq, opts ...grpc.CallOption) (*BroadcastRoomReply, error) {
  230. out := new(BroadcastRoomReply)
  231. err := grpc.Invoke(ctx, "/push.interface.broadcast.Zerg/BroadcastRoom", in, out, c.cc, opts...)
  232. if err != nil {
  233. return nil, err
  234. }
  235. return out, nil
  236. }
  237. func (c *zergClient) Rooms(ctx context.Context, in *RoomsReq, opts ...grpc.CallOption) (*RoomsReply, error) {
  238. out := new(RoomsReply)
  239. err := grpc.Invoke(ctx, "/push.interface.broadcast.Zerg/Rooms", in, out, c.cc, opts...)
  240. if err != nil {
  241. return nil, err
  242. }
  243. return out, nil
  244. }
  245. // Server API for Zerg service
  246. type ZergServer interface {
  247. // Ping Service
  248. Ping(context.Context, *Empty) (*Empty, error)
  249. // Close Service
  250. Close(context.Context, *Empty) (*Empty, error)
  251. // PushMsg push by key or mid
  252. PushMsg(context.Context, *PushMsgReq) (*PushMsgReply, error)
  253. // Broadcast send to every enrity
  254. Broadcast(context.Context, *BroadcastReq) (*BroadcastReply, error)
  255. // BroadcastRoom broadcast to one room
  256. BroadcastRoom(context.Context, *BroadcastRoomReq) (*BroadcastRoomReply, error)
  257. // Rooms get all rooms
  258. Rooms(context.Context, *RoomsReq) (*RoomsReply, error)
  259. }
  260. func RegisterZergServer(s *grpc.Server, srv ZergServer) {
  261. s.RegisterService(&_Zerg_serviceDesc, srv)
  262. }
  263. func _Zerg_Ping_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
  264. in := new(Empty)
  265. if err := dec(in); err != nil {
  266. return nil, err
  267. }
  268. if interceptor == nil {
  269. return srv.(ZergServer).Ping(ctx, in)
  270. }
  271. info := &grpc.UnaryServerInfo{
  272. Server: srv,
  273. FullMethod: "/push.interface.broadcast.Zerg/Ping",
  274. }
  275. handler := func(ctx context.Context, req interface{}) (interface{}, error) {
  276. return srv.(ZergServer).Ping(ctx, req.(*Empty))
  277. }
  278. return interceptor(ctx, in, info, handler)
  279. }
  280. func _Zerg_Close_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
  281. in := new(Empty)
  282. if err := dec(in); err != nil {
  283. return nil, err
  284. }
  285. if interceptor == nil {
  286. return srv.(ZergServer).Close(ctx, in)
  287. }
  288. info := &grpc.UnaryServerInfo{
  289. Server: srv,
  290. FullMethod: "/push.interface.broadcast.Zerg/Close",
  291. }
  292. handler := func(ctx context.Context, req interface{}) (interface{}, error) {
  293. return srv.(ZergServer).Close(ctx, req.(*Empty))
  294. }
  295. return interceptor(ctx, in, info, handler)
  296. }
  297. func _Zerg_PushMsg_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
  298. in := new(PushMsgReq)
  299. if err := dec(in); err != nil {
  300. return nil, err
  301. }
  302. if interceptor == nil {
  303. return srv.(ZergServer).PushMsg(ctx, in)
  304. }
  305. info := &grpc.UnaryServerInfo{
  306. Server: srv,
  307. FullMethod: "/push.interface.broadcast.Zerg/PushMsg",
  308. }
  309. handler := func(ctx context.Context, req interface{}) (interface{}, error) {
  310. return srv.(ZergServer).PushMsg(ctx, req.(*PushMsgReq))
  311. }
  312. return interceptor(ctx, in, info, handler)
  313. }
  314. func _Zerg_Broadcast_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
  315. in := new(BroadcastReq)
  316. if err := dec(in); err != nil {
  317. return nil, err
  318. }
  319. if interceptor == nil {
  320. return srv.(ZergServer).Broadcast(ctx, in)
  321. }
  322. info := &grpc.UnaryServerInfo{
  323. Server: srv,
  324. FullMethod: "/push.interface.broadcast.Zerg/Broadcast",
  325. }
  326. handler := func(ctx context.Context, req interface{}) (interface{}, error) {
  327. return srv.(ZergServer).Broadcast(ctx, req.(*BroadcastReq))
  328. }
  329. return interceptor(ctx, in, info, handler)
  330. }
  331. func _Zerg_BroadcastRoom_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
  332. in := new(BroadcastRoomReq)
  333. if err := dec(in); err != nil {
  334. return nil, err
  335. }
  336. if interceptor == nil {
  337. return srv.(ZergServer).BroadcastRoom(ctx, in)
  338. }
  339. info := &grpc.UnaryServerInfo{
  340. Server: srv,
  341. FullMethod: "/push.interface.broadcast.Zerg/BroadcastRoom",
  342. }
  343. handler := func(ctx context.Context, req interface{}) (interface{}, error) {
  344. return srv.(ZergServer).BroadcastRoom(ctx, req.(*BroadcastRoomReq))
  345. }
  346. return interceptor(ctx, in, info, handler)
  347. }
  348. func _Zerg_Rooms_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
  349. in := new(RoomsReq)
  350. if err := dec(in); err != nil {
  351. return nil, err
  352. }
  353. if interceptor == nil {
  354. return srv.(ZergServer).Rooms(ctx, in)
  355. }
  356. info := &grpc.UnaryServerInfo{
  357. Server: srv,
  358. FullMethod: "/push.interface.broadcast.Zerg/Rooms",
  359. }
  360. handler := func(ctx context.Context, req interface{}) (interface{}, error) {
  361. return srv.(ZergServer).Rooms(ctx, req.(*RoomsReq))
  362. }
  363. return interceptor(ctx, in, info, handler)
  364. }
  365. var _Zerg_serviceDesc = grpc.ServiceDesc{
  366. ServiceName: "push.interface.broadcast.Zerg",
  367. HandlerType: (*ZergServer)(nil),
  368. Methods: []grpc.MethodDesc{
  369. {
  370. MethodName: "Ping",
  371. Handler: _Zerg_Ping_Handler,
  372. },
  373. {
  374. MethodName: "Close",
  375. Handler: _Zerg_Close_Handler,
  376. },
  377. {
  378. MethodName: "PushMsg",
  379. Handler: _Zerg_PushMsg_Handler,
  380. },
  381. {
  382. MethodName: "Broadcast",
  383. Handler: _Zerg_Broadcast_Handler,
  384. },
  385. {
  386. MethodName: "BroadcastRoom",
  387. Handler: _Zerg_BroadcastRoom_Handler,
  388. },
  389. {
  390. MethodName: "Rooms",
  391. Handler: _Zerg_Rooms_Handler,
  392. },
  393. },
  394. Streams: []grpc.StreamDesc{},
  395. Metadata: "app/interface/main/broadcast/api/grpc/v1/api.proto",
  396. }
  397. func (m *Empty) Marshal() (dAtA []byte, err error) {
  398. size := m.Size()
  399. dAtA = make([]byte, size)
  400. n, err := m.MarshalTo(dAtA)
  401. if err != nil {
  402. return nil, err
  403. }
  404. return dAtA[:n], nil
  405. }
  406. func (m *Empty) MarshalTo(dAtA []byte) (int, error) {
  407. var i int
  408. _ = i
  409. var l int
  410. _ = l
  411. return i, nil
  412. }
  413. func (m *PushMsgReq) Marshal() (dAtA []byte, err error) {
  414. size := m.Size()
  415. dAtA = make([]byte, size)
  416. n, err := m.MarshalTo(dAtA)
  417. if err != nil {
  418. return nil, err
  419. }
  420. return dAtA[:n], nil
  421. }
  422. func (m *PushMsgReq) MarshalTo(dAtA []byte) (int, error) {
  423. var i int
  424. _ = i
  425. var l int
  426. _ = l
  427. if len(m.Keys) > 0 {
  428. for _, s := range m.Keys {
  429. dAtA[i] = 0xa
  430. i++
  431. l = len(s)
  432. for l >= 1<<7 {
  433. dAtA[i] = uint8(uint64(l)&0x7f | 0x80)
  434. l >>= 7
  435. i++
  436. }
  437. dAtA[i] = uint8(l)
  438. i++
  439. i += copy(dAtA[i:], s)
  440. }
  441. }
  442. if m.Proto != nil {
  443. dAtA[i] = 0x12
  444. i++
  445. i = encodeVarintApi(dAtA, i, uint64(m.Proto.Size()))
  446. n1, err := m.Proto.MarshalTo(dAtA[i:])
  447. if err != nil {
  448. return 0, err
  449. }
  450. i += n1
  451. }
  452. if m.ProtoOp != 0 {
  453. dAtA[i] = 0x18
  454. i++
  455. i = encodeVarintApi(dAtA, i, uint64(m.ProtoOp))
  456. }
  457. return i, nil
  458. }
  459. func (m *PushMsgReply) Marshal() (dAtA []byte, err error) {
  460. size := m.Size()
  461. dAtA = make([]byte, size)
  462. n, err := m.MarshalTo(dAtA)
  463. if err != nil {
  464. return nil, err
  465. }
  466. return dAtA[:n], nil
  467. }
  468. func (m *PushMsgReply) MarshalTo(dAtA []byte) (int, error) {
  469. var i int
  470. _ = i
  471. var l int
  472. _ = l
  473. return i, nil
  474. }
  475. func (m *BroadcastReq) Marshal() (dAtA []byte, err error) {
  476. size := m.Size()
  477. dAtA = make([]byte, size)
  478. n, err := m.MarshalTo(dAtA)
  479. if err != nil {
  480. return nil, err
  481. }
  482. return dAtA[:n], nil
  483. }
  484. func (m *BroadcastReq) MarshalTo(dAtA []byte) (int, error) {
  485. var i int
  486. _ = i
  487. var l int
  488. _ = l
  489. if m.ProtoOp != 0 {
  490. dAtA[i] = 0x8
  491. i++
  492. i = encodeVarintApi(dAtA, i, uint64(m.ProtoOp))
  493. }
  494. if m.Proto != nil {
  495. dAtA[i] = 0x12
  496. i++
  497. i = encodeVarintApi(dAtA, i, uint64(m.Proto.Size()))
  498. n2, err := m.Proto.MarshalTo(dAtA[i:])
  499. if err != nil {
  500. return 0, err
  501. }
  502. i += n2
  503. }
  504. if m.Speed != 0 {
  505. dAtA[i] = 0x18
  506. i++
  507. i = encodeVarintApi(dAtA, i, uint64(m.Speed))
  508. }
  509. if len(m.Platform) > 0 {
  510. dAtA[i] = 0x22
  511. i++
  512. i = encodeVarintApi(dAtA, i, uint64(len(m.Platform)))
  513. i += copy(dAtA[i:], m.Platform)
  514. }
  515. return i, nil
  516. }
  517. func (m *BroadcastReply) Marshal() (dAtA []byte, err error) {
  518. size := m.Size()
  519. dAtA = make([]byte, size)
  520. n, err := m.MarshalTo(dAtA)
  521. if err != nil {
  522. return nil, err
  523. }
  524. return dAtA[:n], nil
  525. }
  526. func (m *BroadcastReply) MarshalTo(dAtA []byte) (int, error) {
  527. var i int
  528. _ = i
  529. var l int
  530. _ = l
  531. return i, nil
  532. }
  533. func (m *BroadcastRoomReq) Marshal() (dAtA []byte, err error) {
  534. size := m.Size()
  535. dAtA = make([]byte, size)
  536. n, err := m.MarshalTo(dAtA)
  537. if err != nil {
  538. return nil, err
  539. }
  540. return dAtA[:n], nil
  541. }
  542. func (m *BroadcastRoomReq) MarshalTo(dAtA []byte) (int, error) {
  543. var i int
  544. _ = i
  545. var l int
  546. _ = l
  547. if len(m.RoomID) > 0 {
  548. dAtA[i] = 0xa
  549. i++
  550. i = encodeVarintApi(dAtA, i, uint64(len(m.RoomID)))
  551. i += copy(dAtA[i:], m.RoomID)
  552. }
  553. if m.Proto != nil {
  554. dAtA[i] = 0x12
  555. i++
  556. i = encodeVarintApi(dAtA, i, uint64(m.Proto.Size()))
  557. n3, err := m.Proto.MarshalTo(dAtA[i:])
  558. if err != nil {
  559. return 0, err
  560. }
  561. i += n3
  562. }
  563. return i, nil
  564. }
  565. func (m *BroadcastRoomReply) Marshal() (dAtA []byte, err error) {
  566. size := m.Size()
  567. dAtA = make([]byte, size)
  568. n, err := m.MarshalTo(dAtA)
  569. if err != nil {
  570. return nil, err
  571. }
  572. return dAtA[:n], nil
  573. }
  574. func (m *BroadcastRoomReply) MarshalTo(dAtA []byte) (int, error) {
  575. var i int
  576. _ = i
  577. var l int
  578. _ = l
  579. return i, nil
  580. }
  581. func (m *RoomsReq) Marshal() (dAtA []byte, err error) {
  582. size := m.Size()
  583. dAtA = make([]byte, size)
  584. n, err := m.MarshalTo(dAtA)
  585. if err != nil {
  586. return nil, err
  587. }
  588. return dAtA[:n], nil
  589. }
  590. func (m *RoomsReq) MarshalTo(dAtA []byte) (int, error) {
  591. var i int
  592. _ = i
  593. var l int
  594. _ = l
  595. return i, nil
  596. }
  597. func (m *RoomsReply) Marshal() (dAtA []byte, err error) {
  598. size := m.Size()
  599. dAtA = make([]byte, size)
  600. n, err := m.MarshalTo(dAtA)
  601. if err != nil {
  602. return nil, err
  603. }
  604. return dAtA[:n], nil
  605. }
  606. func (m *RoomsReply) MarshalTo(dAtA []byte) (int, error) {
  607. var i int
  608. _ = i
  609. var l int
  610. _ = l
  611. if len(m.Rooms) > 0 {
  612. for k, _ := range m.Rooms {
  613. dAtA[i] = 0xa
  614. i++
  615. v := m.Rooms[k]
  616. mapSize := 1 + len(k) + sovApi(uint64(len(k))) + 1 + 1
  617. i = encodeVarintApi(dAtA, i, uint64(mapSize))
  618. dAtA[i] = 0xa
  619. i++
  620. i = encodeVarintApi(dAtA, i, uint64(len(k)))
  621. i += copy(dAtA[i:], k)
  622. dAtA[i] = 0x10
  623. i++
  624. if v {
  625. dAtA[i] = 1
  626. } else {
  627. dAtA[i] = 0
  628. }
  629. i++
  630. }
  631. }
  632. return i, nil
  633. }
  634. func encodeVarintApi(dAtA []byte, offset int, v uint64) int {
  635. for v >= 1<<7 {
  636. dAtA[offset] = uint8(v&0x7f | 0x80)
  637. v >>= 7
  638. offset++
  639. }
  640. dAtA[offset] = uint8(v)
  641. return offset + 1
  642. }
  643. func (m *Empty) Size() (n int) {
  644. var l int
  645. _ = l
  646. return n
  647. }
  648. func (m *PushMsgReq) Size() (n int) {
  649. var l int
  650. _ = l
  651. if len(m.Keys) > 0 {
  652. for _, s := range m.Keys {
  653. l = len(s)
  654. n += 1 + l + sovApi(uint64(l))
  655. }
  656. }
  657. if m.Proto != nil {
  658. l = m.Proto.Size()
  659. n += 1 + l + sovApi(uint64(l))
  660. }
  661. if m.ProtoOp != 0 {
  662. n += 1 + sovApi(uint64(m.ProtoOp))
  663. }
  664. return n
  665. }
  666. func (m *PushMsgReply) Size() (n int) {
  667. var l int
  668. _ = l
  669. return n
  670. }
  671. func (m *BroadcastReq) Size() (n int) {
  672. var l int
  673. _ = l
  674. if m.ProtoOp != 0 {
  675. n += 1 + sovApi(uint64(m.ProtoOp))
  676. }
  677. if m.Proto != nil {
  678. l = m.Proto.Size()
  679. n += 1 + l + sovApi(uint64(l))
  680. }
  681. if m.Speed != 0 {
  682. n += 1 + sovApi(uint64(m.Speed))
  683. }
  684. l = len(m.Platform)
  685. if l > 0 {
  686. n += 1 + l + sovApi(uint64(l))
  687. }
  688. return n
  689. }
  690. func (m *BroadcastReply) Size() (n int) {
  691. var l int
  692. _ = l
  693. return n
  694. }
  695. func (m *BroadcastRoomReq) Size() (n int) {
  696. var l int
  697. _ = l
  698. l = len(m.RoomID)
  699. if l > 0 {
  700. n += 1 + l + sovApi(uint64(l))
  701. }
  702. if m.Proto != nil {
  703. l = m.Proto.Size()
  704. n += 1 + l + sovApi(uint64(l))
  705. }
  706. return n
  707. }
  708. func (m *BroadcastRoomReply) Size() (n int) {
  709. var l int
  710. _ = l
  711. return n
  712. }
  713. func (m *RoomsReq) Size() (n int) {
  714. var l int
  715. _ = l
  716. return n
  717. }
  718. func (m *RoomsReply) Size() (n int) {
  719. var l int
  720. _ = l
  721. if len(m.Rooms) > 0 {
  722. for k, v := range m.Rooms {
  723. _ = k
  724. _ = v
  725. mapEntrySize := 1 + len(k) + sovApi(uint64(len(k))) + 1 + 1
  726. n += mapEntrySize + 1 + sovApi(uint64(mapEntrySize))
  727. }
  728. }
  729. return n
  730. }
  731. func sovApi(x uint64) (n int) {
  732. for {
  733. n++
  734. x >>= 7
  735. if x == 0 {
  736. break
  737. }
  738. }
  739. return n
  740. }
  741. func sozApi(x uint64) (n int) {
  742. return sovApi(uint64((x << 1) ^ uint64((int64(x) >> 63))))
  743. }
  744. func (m *Empty) Unmarshal(dAtA []byte) error {
  745. l := len(dAtA)
  746. iNdEx := 0
  747. for iNdEx < l {
  748. preIndex := iNdEx
  749. var wire uint64
  750. for shift := uint(0); ; shift += 7 {
  751. if shift >= 64 {
  752. return ErrIntOverflowApi
  753. }
  754. if iNdEx >= l {
  755. return io.ErrUnexpectedEOF
  756. }
  757. b := dAtA[iNdEx]
  758. iNdEx++
  759. wire |= (uint64(b) & 0x7F) << shift
  760. if b < 0x80 {
  761. break
  762. }
  763. }
  764. fieldNum := int32(wire >> 3)
  765. wireType := int(wire & 0x7)
  766. if wireType == 4 {
  767. return fmt.Errorf("proto: Empty: wiretype end group for non-group")
  768. }
  769. if fieldNum <= 0 {
  770. return fmt.Errorf("proto: Empty: illegal tag %d (wire type %d)", fieldNum, wire)
  771. }
  772. switch fieldNum {
  773. default:
  774. iNdEx = preIndex
  775. skippy, err := skipApi(dAtA[iNdEx:])
  776. if err != nil {
  777. return err
  778. }
  779. if skippy < 0 {
  780. return ErrInvalidLengthApi
  781. }
  782. if (iNdEx + skippy) > l {
  783. return io.ErrUnexpectedEOF
  784. }
  785. iNdEx += skippy
  786. }
  787. }
  788. if iNdEx > l {
  789. return io.ErrUnexpectedEOF
  790. }
  791. return nil
  792. }
  793. func (m *PushMsgReq) Unmarshal(dAtA []byte) error {
  794. l := len(dAtA)
  795. iNdEx := 0
  796. for iNdEx < l {
  797. preIndex := iNdEx
  798. var wire uint64
  799. for shift := uint(0); ; shift += 7 {
  800. if shift >= 64 {
  801. return ErrIntOverflowApi
  802. }
  803. if iNdEx >= l {
  804. return io.ErrUnexpectedEOF
  805. }
  806. b := dAtA[iNdEx]
  807. iNdEx++
  808. wire |= (uint64(b) & 0x7F) << shift
  809. if b < 0x80 {
  810. break
  811. }
  812. }
  813. fieldNum := int32(wire >> 3)
  814. wireType := int(wire & 0x7)
  815. if wireType == 4 {
  816. return fmt.Errorf("proto: PushMsgReq: wiretype end group for non-group")
  817. }
  818. if fieldNum <= 0 {
  819. return fmt.Errorf("proto: PushMsgReq: illegal tag %d (wire type %d)", fieldNum, wire)
  820. }
  821. switch fieldNum {
  822. case 1:
  823. if wireType != 2 {
  824. return fmt.Errorf("proto: wrong wireType = %d for field Keys", wireType)
  825. }
  826. var stringLen uint64
  827. for shift := uint(0); ; shift += 7 {
  828. if shift >= 64 {
  829. return ErrIntOverflowApi
  830. }
  831. if iNdEx >= l {
  832. return io.ErrUnexpectedEOF
  833. }
  834. b := dAtA[iNdEx]
  835. iNdEx++
  836. stringLen |= (uint64(b) & 0x7F) << shift
  837. if b < 0x80 {
  838. break
  839. }
  840. }
  841. intStringLen := int(stringLen)
  842. if intStringLen < 0 {
  843. return ErrInvalidLengthApi
  844. }
  845. postIndex := iNdEx + intStringLen
  846. if postIndex > l {
  847. return io.ErrUnexpectedEOF
  848. }
  849. m.Keys = append(m.Keys, string(dAtA[iNdEx:postIndex]))
  850. iNdEx = postIndex
  851. case 2:
  852. if wireType != 2 {
  853. return fmt.Errorf("proto: wrong wireType = %d for field Proto", wireType)
  854. }
  855. var msglen int
  856. for shift := uint(0); ; shift += 7 {
  857. if shift >= 64 {
  858. return ErrIntOverflowApi
  859. }
  860. if iNdEx >= l {
  861. return io.ErrUnexpectedEOF
  862. }
  863. b := dAtA[iNdEx]
  864. iNdEx++
  865. msglen |= (int(b) & 0x7F) << shift
  866. if b < 0x80 {
  867. break
  868. }
  869. }
  870. if msglen < 0 {
  871. return ErrInvalidLengthApi
  872. }
  873. postIndex := iNdEx + msglen
  874. if postIndex > l {
  875. return io.ErrUnexpectedEOF
  876. }
  877. if m.Proto == nil {
  878. m.Proto = &push_service_broadcast_model.Proto{}
  879. }
  880. if err := m.Proto.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
  881. return err
  882. }
  883. iNdEx = postIndex
  884. case 3:
  885. if wireType != 0 {
  886. return fmt.Errorf("proto: wrong wireType = %d for field ProtoOp", wireType)
  887. }
  888. m.ProtoOp = 0
  889. for shift := uint(0); ; shift += 7 {
  890. if shift >= 64 {
  891. return ErrIntOverflowApi
  892. }
  893. if iNdEx >= l {
  894. return io.ErrUnexpectedEOF
  895. }
  896. b := dAtA[iNdEx]
  897. iNdEx++
  898. m.ProtoOp |= (int32(b) & 0x7F) << shift
  899. if b < 0x80 {
  900. break
  901. }
  902. }
  903. default:
  904. iNdEx = preIndex
  905. skippy, err := skipApi(dAtA[iNdEx:])
  906. if err != nil {
  907. return err
  908. }
  909. if skippy < 0 {
  910. return ErrInvalidLengthApi
  911. }
  912. if (iNdEx + skippy) > l {
  913. return io.ErrUnexpectedEOF
  914. }
  915. iNdEx += skippy
  916. }
  917. }
  918. if iNdEx > l {
  919. return io.ErrUnexpectedEOF
  920. }
  921. return nil
  922. }
  923. func (m *PushMsgReply) Unmarshal(dAtA []byte) error {
  924. l := len(dAtA)
  925. iNdEx := 0
  926. for iNdEx < l {
  927. preIndex := iNdEx
  928. var wire uint64
  929. for shift := uint(0); ; shift += 7 {
  930. if shift >= 64 {
  931. return ErrIntOverflowApi
  932. }
  933. if iNdEx >= l {
  934. return io.ErrUnexpectedEOF
  935. }
  936. b := dAtA[iNdEx]
  937. iNdEx++
  938. wire |= (uint64(b) & 0x7F) << shift
  939. if b < 0x80 {
  940. break
  941. }
  942. }
  943. fieldNum := int32(wire >> 3)
  944. wireType := int(wire & 0x7)
  945. if wireType == 4 {
  946. return fmt.Errorf("proto: PushMsgReply: wiretype end group for non-group")
  947. }
  948. if fieldNum <= 0 {
  949. return fmt.Errorf("proto: PushMsgReply: illegal tag %d (wire type %d)", fieldNum, wire)
  950. }
  951. switch fieldNum {
  952. default:
  953. iNdEx = preIndex
  954. skippy, err := skipApi(dAtA[iNdEx:])
  955. if err != nil {
  956. return err
  957. }
  958. if skippy < 0 {
  959. return ErrInvalidLengthApi
  960. }
  961. if (iNdEx + skippy) > l {
  962. return io.ErrUnexpectedEOF
  963. }
  964. iNdEx += skippy
  965. }
  966. }
  967. if iNdEx > l {
  968. return io.ErrUnexpectedEOF
  969. }
  970. return nil
  971. }
  972. func (m *BroadcastReq) Unmarshal(dAtA []byte) error {
  973. l := len(dAtA)
  974. iNdEx := 0
  975. for iNdEx < l {
  976. preIndex := iNdEx
  977. var wire uint64
  978. for shift := uint(0); ; shift += 7 {
  979. if shift >= 64 {
  980. return ErrIntOverflowApi
  981. }
  982. if iNdEx >= l {
  983. return io.ErrUnexpectedEOF
  984. }
  985. b := dAtA[iNdEx]
  986. iNdEx++
  987. wire |= (uint64(b) & 0x7F) << shift
  988. if b < 0x80 {
  989. break
  990. }
  991. }
  992. fieldNum := int32(wire >> 3)
  993. wireType := int(wire & 0x7)
  994. if wireType == 4 {
  995. return fmt.Errorf("proto: BroadcastReq: wiretype end group for non-group")
  996. }
  997. if fieldNum <= 0 {
  998. return fmt.Errorf("proto: BroadcastReq: illegal tag %d (wire type %d)", fieldNum, wire)
  999. }
  1000. switch fieldNum {
  1001. case 1:
  1002. if wireType != 0 {
  1003. return fmt.Errorf("proto: wrong wireType = %d for field ProtoOp", wireType)
  1004. }
  1005. m.ProtoOp = 0
  1006. for shift := uint(0); ; shift += 7 {
  1007. if shift >= 64 {
  1008. return ErrIntOverflowApi
  1009. }
  1010. if iNdEx >= l {
  1011. return io.ErrUnexpectedEOF
  1012. }
  1013. b := dAtA[iNdEx]
  1014. iNdEx++
  1015. m.ProtoOp |= (int32(b) & 0x7F) << shift
  1016. if b < 0x80 {
  1017. break
  1018. }
  1019. }
  1020. case 2:
  1021. if wireType != 2 {
  1022. return fmt.Errorf("proto: wrong wireType = %d for field Proto", wireType)
  1023. }
  1024. var msglen int
  1025. for shift := uint(0); ; shift += 7 {
  1026. if shift >= 64 {
  1027. return ErrIntOverflowApi
  1028. }
  1029. if iNdEx >= l {
  1030. return io.ErrUnexpectedEOF
  1031. }
  1032. b := dAtA[iNdEx]
  1033. iNdEx++
  1034. msglen |= (int(b) & 0x7F) << shift
  1035. if b < 0x80 {
  1036. break
  1037. }
  1038. }
  1039. if msglen < 0 {
  1040. return ErrInvalidLengthApi
  1041. }
  1042. postIndex := iNdEx + msglen
  1043. if postIndex > l {
  1044. return io.ErrUnexpectedEOF
  1045. }
  1046. if m.Proto == nil {
  1047. m.Proto = &push_service_broadcast_model.Proto{}
  1048. }
  1049. if err := m.Proto.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
  1050. return err
  1051. }
  1052. iNdEx = postIndex
  1053. case 3:
  1054. if wireType != 0 {
  1055. return fmt.Errorf("proto: wrong wireType = %d for field Speed", wireType)
  1056. }
  1057. m.Speed = 0
  1058. for shift := uint(0); ; shift += 7 {
  1059. if shift >= 64 {
  1060. return ErrIntOverflowApi
  1061. }
  1062. if iNdEx >= l {
  1063. return io.ErrUnexpectedEOF
  1064. }
  1065. b := dAtA[iNdEx]
  1066. iNdEx++
  1067. m.Speed |= (int32(b) & 0x7F) << shift
  1068. if b < 0x80 {
  1069. break
  1070. }
  1071. }
  1072. case 4:
  1073. if wireType != 2 {
  1074. return fmt.Errorf("proto: wrong wireType = %d for field Platform", wireType)
  1075. }
  1076. var stringLen uint64
  1077. for shift := uint(0); ; shift += 7 {
  1078. if shift >= 64 {
  1079. return ErrIntOverflowApi
  1080. }
  1081. if iNdEx >= l {
  1082. return io.ErrUnexpectedEOF
  1083. }
  1084. b := dAtA[iNdEx]
  1085. iNdEx++
  1086. stringLen |= (uint64(b) & 0x7F) << shift
  1087. if b < 0x80 {
  1088. break
  1089. }
  1090. }
  1091. intStringLen := int(stringLen)
  1092. if intStringLen < 0 {
  1093. return ErrInvalidLengthApi
  1094. }
  1095. postIndex := iNdEx + intStringLen
  1096. if postIndex > l {
  1097. return io.ErrUnexpectedEOF
  1098. }
  1099. m.Platform = string(dAtA[iNdEx:postIndex])
  1100. iNdEx = postIndex
  1101. default:
  1102. iNdEx = preIndex
  1103. skippy, err := skipApi(dAtA[iNdEx:])
  1104. if err != nil {
  1105. return err
  1106. }
  1107. if skippy < 0 {
  1108. return ErrInvalidLengthApi
  1109. }
  1110. if (iNdEx + skippy) > l {
  1111. return io.ErrUnexpectedEOF
  1112. }
  1113. iNdEx += skippy
  1114. }
  1115. }
  1116. if iNdEx > l {
  1117. return io.ErrUnexpectedEOF
  1118. }
  1119. return nil
  1120. }
  1121. func (m *BroadcastReply) Unmarshal(dAtA []byte) error {
  1122. l := len(dAtA)
  1123. iNdEx := 0
  1124. for iNdEx < l {
  1125. preIndex := iNdEx
  1126. var wire uint64
  1127. for shift := uint(0); ; shift += 7 {
  1128. if shift >= 64 {
  1129. return ErrIntOverflowApi
  1130. }
  1131. if iNdEx >= l {
  1132. return io.ErrUnexpectedEOF
  1133. }
  1134. b := dAtA[iNdEx]
  1135. iNdEx++
  1136. wire |= (uint64(b) & 0x7F) << shift
  1137. if b < 0x80 {
  1138. break
  1139. }
  1140. }
  1141. fieldNum := int32(wire >> 3)
  1142. wireType := int(wire & 0x7)
  1143. if wireType == 4 {
  1144. return fmt.Errorf("proto: BroadcastReply: wiretype end group for non-group")
  1145. }
  1146. if fieldNum <= 0 {
  1147. return fmt.Errorf("proto: BroadcastReply: illegal tag %d (wire type %d)", fieldNum, wire)
  1148. }
  1149. switch fieldNum {
  1150. default:
  1151. iNdEx = preIndex
  1152. skippy, err := skipApi(dAtA[iNdEx:])
  1153. if err != nil {
  1154. return err
  1155. }
  1156. if skippy < 0 {
  1157. return ErrInvalidLengthApi
  1158. }
  1159. if (iNdEx + skippy) > l {
  1160. return io.ErrUnexpectedEOF
  1161. }
  1162. iNdEx += skippy
  1163. }
  1164. }
  1165. if iNdEx > l {
  1166. return io.ErrUnexpectedEOF
  1167. }
  1168. return nil
  1169. }
  1170. func (m *BroadcastRoomReq) Unmarshal(dAtA []byte) error {
  1171. l := len(dAtA)
  1172. iNdEx := 0
  1173. for iNdEx < l {
  1174. preIndex := iNdEx
  1175. var wire uint64
  1176. for shift := uint(0); ; shift += 7 {
  1177. if shift >= 64 {
  1178. return ErrIntOverflowApi
  1179. }
  1180. if iNdEx >= l {
  1181. return io.ErrUnexpectedEOF
  1182. }
  1183. b := dAtA[iNdEx]
  1184. iNdEx++
  1185. wire |= (uint64(b) & 0x7F) << shift
  1186. if b < 0x80 {
  1187. break
  1188. }
  1189. }
  1190. fieldNum := int32(wire >> 3)
  1191. wireType := int(wire & 0x7)
  1192. if wireType == 4 {
  1193. return fmt.Errorf("proto: BroadcastRoomReq: wiretype end group for non-group")
  1194. }
  1195. if fieldNum <= 0 {
  1196. return fmt.Errorf("proto: BroadcastRoomReq: illegal tag %d (wire type %d)", fieldNum, wire)
  1197. }
  1198. switch fieldNum {
  1199. case 1:
  1200. if wireType != 2 {
  1201. return fmt.Errorf("proto: wrong wireType = %d for field RoomID", wireType)
  1202. }
  1203. var stringLen uint64
  1204. for shift := uint(0); ; shift += 7 {
  1205. if shift >= 64 {
  1206. return ErrIntOverflowApi
  1207. }
  1208. if iNdEx >= l {
  1209. return io.ErrUnexpectedEOF
  1210. }
  1211. b := dAtA[iNdEx]
  1212. iNdEx++
  1213. stringLen |= (uint64(b) & 0x7F) << shift
  1214. if b < 0x80 {
  1215. break
  1216. }
  1217. }
  1218. intStringLen := int(stringLen)
  1219. if intStringLen < 0 {
  1220. return ErrInvalidLengthApi
  1221. }
  1222. postIndex := iNdEx + intStringLen
  1223. if postIndex > l {
  1224. return io.ErrUnexpectedEOF
  1225. }
  1226. m.RoomID = string(dAtA[iNdEx:postIndex])
  1227. iNdEx = postIndex
  1228. case 2:
  1229. if wireType != 2 {
  1230. return fmt.Errorf("proto: wrong wireType = %d for field Proto", wireType)
  1231. }
  1232. var msglen int
  1233. for shift := uint(0); ; shift += 7 {
  1234. if shift >= 64 {
  1235. return ErrIntOverflowApi
  1236. }
  1237. if iNdEx >= l {
  1238. return io.ErrUnexpectedEOF
  1239. }
  1240. b := dAtA[iNdEx]
  1241. iNdEx++
  1242. msglen |= (int(b) & 0x7F) << shift
  1243. if b < 0x80 {
  1244. break
  1245. }
  1246. }
  1247. if msglen < 0 {
  1248. return ErrInvalidLengthApi
  1249. }
  1250. postIndex := iNdEx + msglen
  1251. if postIndex > l {
  1252. return io.ErrUnexpectedEOF
  1253. }
  1254. if m.Proto == nil {
  1255. m.Proto = &push_service_broadcast_model.Proto{}
  1256. }
  1257. if err := m.Proto.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
  1258. return err
  1259. }
  1260. iNdEx = postIndex
  1261. default:
  1262. iNdEx = preIndex
  1263. skippy, err := skipApi(dAtA[iNdEx:])
  1264. if err != nil {
  1265. return err
  1266. }
  1267. if skippy < 0 {
  1268. return ErrInvalidLengthApi
  1269. }
  1270. if (iNdEx + skippy) > l {
  1271. return io.ErrUnexpectedEOF
  1272. }
  1273. iNdEx += skippy
  1274. }
  1275. }
  1276. if iNdEx > l {
  1277. return io.ErrUnexpectedEOF
  1278. }
  1279. return nil
  1280. }
  1281. func (m *BroadcastRoomReply) Unmarshal(dAtA []byte) error {
  1282. l := len(dAtA)
  1283. iNdEx := 0
  1284. for iNdEx < l {
  1285. preIndex := iNdEx
  1286. var wire uint64
  1287. for shift := uint(0); ; shift += 7 {
  1288. if shift >= 64 {
  1289. return ErrIntOverflowApi
  1290. }
  1291. if iNdEx >= l {
  1292. return io.ErrUnexpectedEOF
  1293. }
  1294. b := dAtA[iNdEx]
  1295. iNdEx++
  1296. wire |= (uint64(b) & 0x7F) << shift
  1297. if b < 0x80 {
  1298. break
  1299. }
  1300. }
  1301. fieldNum := int32(wire >> 3)
  1302. wireType := int(wire & 0x7)
  1303. if wireType == 4 {
  1304. return fmt.Errorf("proto: BroadcastRoomReply: wiretype end group for non-group")
  1305. }
  1306. if fieldNum <= 0 {
  1307. return fmt.Errorf("proto: BroadcastRoomReply: illegal tag %d (wire type %d)", fieldNum, wire)
  1308. }
  1309. switch fieldNum {
  1310. default:
  1311. iNdEx = preIndex
  1312. skippy, err := skipApi(dAtA[iNdEx:])
  1313. if err != nil {
  1314. return err
  1315. }
  1316. if skippy < 0 {
  1317. return ErrInvalidLengthApi
  1318. }
  1319. if (iNdEx + skippy) > l {
  1320. return io.ErrUnexpectedEOF
  1321. }
  1322. iNdEx += skippy
  1323. }
  1324. }
  1325. if iNdEx > l {
  1326. return io.ErrUnexpectedEOF
  1327. }
  1328. return nil
  1329. }
  1330. func (m *RoomsReq) Unmarshal(dAtA []byte) error {
  1331. l := len(dAtA)
  1332. iNdEx := 0
  1333. for iNdEx < l {
  1334. preIndex := iNdEx
  1335. var wire uint64
  1336. for shift := uint(0); ; shift += 7 {
  1337. if shift >= 64 {
  1338. return ErrIntOverflowApi
  1339. }
  1340. if iNdEx >= l {
  1341. return io.ErrUnexpectedEOF
  1342. }
  1343. b := dAtA[iNdEx]
  1344. iNdEx++
  1345. wire |= (uint64(b) & 0x7F) << shift
  1346. if b < 0x80 {
  1347. break
  1348. }
  1349. }
  1350. fieldNum := int32(wire >> 3)
  1351. wireType := int(wire & 0x7)
  1352. if wireType == 4 {
  1353. return fmt.Errorf("proto: RoomsReq: wiretype end group for non-group")
  1354. }
  1355. if fieldNum <= 0 {
  1356. return fmt.Errorf("proto: RoomsReq: illegal tag %d (wire type %d)", fieldNum, wire)
  1357. }
  1358. switch fieldNum {
  1359. default:
  1360. iNdEx = preIndex
  1361. skippy, err := skipApi(dAtA[iNdEx:])
  1362. if err != nil {
  1363. return err
  1364. }
  1365. if skippy < 0 {
  1366. return ErrInvalidLengthApi
  1367. }
  1368. if (iNdEx + skippy) > l {
  1369. return io.ErrUnexpectedEOF
  1370. }
  1371. iNdEx += skippy
  1372. }
  1373. }
  1374. if iNdEx > l {
  1375. return io.ErrUnexpectedEOF
  1376. }
  1377. return nil
  1378. }
  1379. func (m *RoomsReply) Unmarshal(dAtA []byte) error {
  1380. l := len(dAtA)
  1381. iNdEx := 0
  1382. for iNdEx < l {
  1383. preIndex := iNdEx
  1384. var wire uint64
  1385. for shift := uint(0); ; shift += 7 {
  1386. if shift >= 64 {
  1387. return ErrIntOverflowApi
  1388. }
  1389. if iNdEx >= l {
  1390. return io.ErrUnexpectedEOF
  1391. }
  1392. b := dAtA[iNdEx]
  1393. iNdEx++
  1394. wire |= (uint64(b) & 0x7F) << shift
  1395. if b < 0x80 {
  1396. break
  1397. }
  1398. }
  1399. fieldNum := int32(wire >> 3)
  1400. wireType := int(wire & 0x7)
  1401. if wireType == 4 {
  1402. return fmt.Errorf("proto: RoomsReply: wiretype end group for non-group")
  1403. }
  1404. if fieldNum <= 0 {
  1405. return fmt.Errorf("proto: RoomsReply: illegal tag %d (wire type %d)", fieldNum, wire)
  1406. }
  1407. switch fieldNum {
  1408. case 1:
  1409. if wireType != 2 {
  1410. return fmt.Errorf("proto: wrong wireType = %d for field Rooms", wireType)
  1411. }
  1412. var msglen int
  1413. for shift := uint(0); ; shift += 7 {
  1414. if shift >= 64 {
  1415. return ErrIntOverflowApi
  1416. }
  1417. if iNdEx >= l {
  1418. return io.ErrUnexpectedEOF
  1419. }
  1420. b := dAtA[iNdEx]
  1421. iNdEx++
  1422. msglen |= (int(b) & 0x7F) << shift
  1423. if b < 0x80 {
  1424. break
  1425. }
  1426. }
  1427. if msglen < 0 {
  1428. return ErrInvalidLengthApi
  1429. }
  1430. postIndex := iNdEx + msglen
  1431. if postIndex > l {
  1432. return io.ErrUnexpectedEOF
  1433. }
  1434. if m.Rooms == nil {
  1435. m.Rooms = make(map[string]bool)
  1436. }
  1437. var mapkey string
  1438. var mapvalue bool
  1439. for iNdEx < postIndex {
  1440. entryPreIndex := iNdEx
  1441. var wire uint64
  1442. for shift := uint(0); ; shift += 7 {
  1443. if shift >= 64 {
  1444. return ErrIntOverflowApi
  1445. }
  1446. if iNdEx >= l {
  1447. return io.ErrUnexpectedEOF
  1448. }
  1449. b := dAtA[iNdEx]
  1450. iNdEx++
  1451. wire |= (uint64(b) & 0x7F) << shift
  1452. if b < 0x80 {
  1453. break
  1454. }
  1455. }
  1456. fieldNum := int32(wire >> 3)
  1457. if fieldNum == 1 {
  1458. var stringLenmapkey uint64
  1459. for shift := uint(0); ; shift += 7 {
  1460. if shift >= 64 {
  1461. return ErrIntOverflowApi
  1462. }
  1463. if iNdEx >= l {
  1464. return io.ErrUnexpectedEOF
  1465. }
  1466. b := dAtA[iNdEx]
  1467. iNdEx++
  1468. stringLenmapkey |= (uint64(b) & 0x7F) << shift
  1469. if b < 0x80 {
  1470. break
  1471. }
  1472. }
  1473. intStringLenmapkey := int(stringLenmapkey)
  1474. if intStringLenmapkey < 0 {
  1475. return ErrInvalidLengthApi
  1476. }
  1477. postStringIndexmapkey := iNdEx + intStringLenmapkey
  1478. if postStringIndexmapkey > l {
  1479. return io.ErrUnexpectedEOF
  1480. }
  1481. mapkey = string(dAtA[iNdEx:postStringIndexmapkey])
  1482. iNdEx = postStringIndexmapkey
  1483. } else if fieldNum == 2 {
  1484. var mapvaluetemp int
  1485. for shift := uint(0); ; shift += 7 {
  1486. if shift >= 64 {
  1487. return ErrIntOverflowApi
  1488. }
  1489. if iNdEx >= l {
  1490. return io.ErrUnexpectedEOF
  1491. }
  1492. b := dAtA[iNdEx]
  1493. iNdEx++
  1494. mapvaluetemp |= (int(b) & 0x7F) << shift
  1495. if b < 0x80 {
  1496. break
  1497. }
  1498. }
  1499. mapvalue = bool(mapvaluetemp != 0)
  1500. } else {
  1501. iNdEx = entryPreIndex
  1502. skippy, err := skipApi(dAtA[iNdEx:])
  1503. if err != nil {
  1504. return err
  1505. }
  1506. if skippy < 0 {
  1507. return ErrInvalidLengthApi
  1508. }
  1509. if (iNdEx + skippy) > postIndex {
  1510. return io.ErrUnexpectedEOF
  1511. }
  1512. iNdEx += skippy
  1513. }
  1514. }
  1515. m.Rooms[mapkey] = mapvalue
  1516. iNdEx = postIndex
  1517. default:
  1518. iNdEx = preIndex
  1519. skippy, err := skipApi(dAtA[iNdEx:])
  1520. if err != nil {
  1521. return err
  1522. }
  1523. if skippy < 0 {
  1524. return ErrInvalidLengthApi
  1525. }
  1526. if (iNdEx + skippy) > l {
  1527. return io.ErrUnexpectedEOF
  1528. }
  1529. iNdEx += skippy
  1530. }
  1531. }
  1532. if iNdEx > l {
  1533. return io.ErrUnexpectedEOF
  1534. }
  1535. return nil
  1536. }
  1537. func skipApi(dAtA []byte) (n int, err error) {
  1538. l := len(dAtA)
  1539. iNdEx := 0
  1540. for iNdEx < l {
  1541. var wire uint64
  1542. for shift := uint(0); ; shift += 7 {
  1543. if shift >= 64 {
  1544. return 0, ErrIntOverflowApi
  1545. }
  1546. if iNdEx >= l {
  1547. return 0, io.ErrUnexpectedEOF
  1548. }
  1549. b := dAtA[iNdEx]
  1550. iNdEx++
  1551. wire |= (uint64(b) & 0x7F) << shift
  1552. if b < 0x80 {
  1553. break
  1554. }
  1555. }
  1556. wireType := int(wire & 0x7)
  1557. switch wireType {
  1558. case 0:
  1559. for shift := uint(0); ; shift += 7 {
  1560. if shift >= 64 {
  1561. return 0, ErrIntOverflowApi
  1562. }
  1563. if iNdEx >= l {
  1564. return 0, io.ErrUnexpectedEOF
  1565. }
  1566. iNdEx++
  1567. if dAtA[iNdEx-1] < 0x80 {
  1568. break
  1569. }
  1570. }
  1571. return iNdEx, nil
  1572. case 1:
  1573. iNdEx += 8
  1574. return iNdEx, nil
  1575. case 2:
  1576. var length int
  1577. for shift := uint(0); ; shift += 7 {
  1578. if shift >= 64 {
  1579. return 0, ErrIntOverflowApi
  1580. }
  1581. if iNdEx >= l {
  1582. return 0, io.ErrUnexpectedEOF
  1583. }
  1584. b := dAtA[iNdEx]
  1585. iNdEx++
  1586. length |= (int(b) & 0x7F) << shift
  1587. if b < 0x80 {
  1588. break
  1589. }
  1590. }
  1591. iNdEx += length
  1592. if length < 0 {
  1593. return 0, ErrInvalidLengthApi
  1594. }
  1595. return iNdEx, nil
  1596. case 3:
  1597. for {
  1598. var innerWire uint64
  1599. var start int = iNdEx
  1600. for shift := uint(0); ; shift += 7 {
  1601. if shift >= 64 {
  1602. return 0, ErrIntOverflowApi
  1603. }
  1604. if iNdEx >= l {
  1605. return 0, io.ErrUnexpectedEOF
  1606. }
  1607. b := dAtA[iNdEx]
  1608. iNdEx++
  1609. innerWire |= (uint64(b) & 0x7F) << shift
  1610. if b < 0x80 {
  1611. break
  1612. }
  1613. }
  1614. innerWireType := int(innerWire & 0x7)
  1615. if innerWireType == 4 {
  1616. break
  1617. }
  1618. next, err := skipApi(dAtA[start:])
  1619. if err != nil {
  1620. return 0, err
  1621. }
  1622. iNdEx = start + next
  1623. }
  1624. return iNdEx, nil
  1625. case 4:
  1626. return iNdEx, nil
  1627. case 5:
  1628. iNdEx += 4
  1629. return iNdEx, nil
  1630. default:
  1631. return 0, fmt.Errorf("proto: illegal wireType %d", wireType)
  1632. }
  1633. }
  1634. panic("unreachable")
  1635. }
  1636. var (
  1637. ErrInvalidLengthApi = fmt.Errorf("proto: negative length found during unmarshaling")
  1638. ErrIntOverflowApi = fmt.Errorf("proto: integer overflow")
  1639. )
  1640. func init() {
  1641. proto.RegisterFile("app/interface/main/broadcast/api/grpc/v1/api.proto", fileDescriptorApi)
  1642. }
  1643. var fileDescriptorApi = []byte{
  1644. // 520 bytes of a gzipped FileDescriptorProto
  1645. 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xac, 0x53, 0x41, 0x6b, 0xdb, 0x30,
  1646. 0x18, 0x9d, 0x12, 0xbb, 0x49, 0xbe, 0x76, 0x25, 0x88, 0x32, 0x8c, 0x0f, 0x69, 0xf0, 0xca, 0x30,
  1647. 0xa3, 0xb3, 0x69, 0x76, 0xe9, 0x7a, 0xec, 0x16, 0x58, 0x0f, 0x63, 0x99, 0x2f, 0x83, 0xc2, 0x0e,
  1648. 0x4e, 0xa2, 0x38, 0xa6, 0x76, 0xa4, 0x48, 0x76, 0xc0, 0x3f, 0x63, 0x8c, 0xc1, 0x8e, 0xfb, 0x39,
  1649. 0x3b, 0xee, 0x27, 0x8c, 0xfc, 0x92, 0x21, 0xc9, 0x75, 0xd2, 0x8d, 0xac, 0x86, 0xee, 0x12, 0xbe,
  1650. 0x27, 0xde, 0x7b, 0xdf, 0x93, 0xf5, 0x02, 0x83, 0x90, 0x31, 0x3f, 0x5e, 0x64, 0x84, 0xcf, 0xc2,
  1651. 0x09, 0xf1, 0xd3, 0x30, 0x5e, 0xf8, 0x63, 0x4e, 0xc3, 0xe9, 0x24, 0x14, 0x99, 0x1f, 0xb2, 0xd8,
  1652. 0x8f, 0x38, 0x9b, 0xf8, 0xab, 0x33, 0x39, 0x7b, 0x8c, 0xd3, 0x8c, 0x62, 0x8b, 0xe5, 0x62, 0xee,
  1653. 0x55, 0x22, 0xaf, 0xe2, 0xdb, 0xa7, 0xd2, 0x4d, 0x10, 0xbe, 0x8a, 0xff, 0xf6, 0x4a, 0xe9, 0x94,
  1654. 0x24, 0xfa, 0x57, 0xfb, 0xd8, 0x2f, 0xa2, 0x38, 0x9b, 0xe7, 0x63, 0x6f, 0x42, 0x53, 0x3f, 0xa2,
  1655. 0x11, 0xf5, 0xd5, 0xf1, 0x38, 0x9f, 0x29, 0xa4, 0x80, 0x9a, 0x34, 0xdd, 0x69, 0x81, 0x39, 0x4c,
  1656. 0x59, 0x56, 0x38, 0x39, 0xc0, 0x28, 0x17, 0xf3, 0x77, 0x22, 0x0a, 0xc8, 0x12, 0x63, 0x30, 0x6e,
  1657. 0x48, 0x21, 0x2c, 0xd4, 0x6f, 0xba, 0x9d, 0x40, 0xcd, 0xf8, 0x15, 0x98, 0x4a, 0x63, 0x35, 0xfa,
  1658. 0xc8, 0xdd, 0x1f, 0x3c, 0xf5, 0x54, 0xe2, 0x32, 0xd8, 0x26, 0xaf, 0xa7, 0xd3, 0x8c, 0x24, 0x35,
  1659. 0x30, 0xcb, 0xcb, 0x41, 0x4b, 0x0d, 0xef, 0x99, 0xd5, 0xec, 0x23, 0xd7, 0x0c, 0x6e, 0xa1, 0x73,
  1660. 0x08, 0x07, 0xd5, 0x5a, 0x96, 0x14, 0xce, 0x57, 0x04, 0x07, 0x97, 0xb7, 0x56, 0x32, 0xc9, 0x96,
  1661. 0x14, 0xdd, 0x91, 0x3e, 0x24, 0xcf, 0x11, 0x98, 0x82, 0x11, 0x32, 0x2d, 0xd3, 0x68, 0x80, 0x6d,
  1662. 0x68, 0xb3, 0x24, 0xcc, 0x66, 0x94, 0xa7, 0x96, 0xd1, 0x47, 0x6e, 0x27, 0xa8, 0xb0, 0xd3, 0x85,
  1663. 0xc3, 0xad, 0x58, 0x32, 0x29, 0x81, 0xee, 0xe6, 0x84, 0xd2, 0x54, 0x86, 0x7d, 0x02, 0x7b, 0x9c,
  1664. 0xd2, 0xf4, 0xea, 0x8d, 0xca, 0xda, 0x09, 0x4a, 0xf4, 0x80, 0xa8, 0xce, 0x11, 0xe0, 0x3f, 0xd6,
  1665. 0xc8, 0xe5, 0x00, 0x6d, 0x09, 0x44, 0x40, 0x96, 0xce, 0x17, 0x04, 0x50, 0x02, 0x96, 0x14, 0x78,
  1666. 0x08, 0xa6, 0xdc, 0xaa, 0xdf, 0x6e, 0x7f, 0xe0, 0x7b, 0xbb, 0x8a, 0xe5, 0x6d, 0x44, 0x7a, 0x1c,
  1667. 0x2e, 0x32, 0x5e, 0x04, 0x5a, 0x6d, 0x9f, 0x97, 0xa6, 0xea, 0x10, 0x77, 0xa1, 0x79, 0x43, 0x8a,
  1668. 0xf2, 0x56, 0x72, 0x94, 0x9f, 0x70, 0x15, 0x26, 0x39, 0x51, 0x57, 0x6a, 0x07, 0x1a, 0x5c, 0x34,
  1669. 0xce, 0xd1, 0x85, 0xf1, 0xed, 0xfb, 0xf1, 0xa3, 0xc1, 0x67, 0x03, 0x8c, 0x6b, 0xc2, 0x23, 0xfc,
  1670. 0x16, 0x8c, 0x51, 0xbc, 0x88, 0xf0, 0xf1, 0xee, 0x20, 0xaa, 0x81, 0xf6, 0x7d, 0x04, 0x7c, 0x05,
  1671. 0xe6, 0xeb, 0x84, 0x0a, 0xf2, 0x1f, 0xac, 0x3e, 0x42, 0xab, 0xac, 0x1d, 0x3e, 0xd9, 0xcd, 0xdd,
  1672. 0xfc, 0x21, 0xec, 0x67, 0x35, 0x58, 0xf2, 0xeb, 0x7f, 0x82, 0x4e, 0xf5, 0x5c, 0xf8, 0x1f, 0xa2,
  1673. 0xed, 0x8e, 0xdb, 0x6e, 0x2d, 0x9e, 0xb4, 0x8f, 0xe1, 0xf1, 0x9d, 0x36, 0xe0, 0xe7, 0x75, 0xa4,
  1674. 0xba, 0x9d, 0xf6, 0x69, 0x6d, 0xae, 0x5c, 0xf5, 0x01, 0x4c, 0x55, 0x00, 0xec, 0xdc, 0xdb, 0xa0,
  1675. 0xa5, 0x7d, 0x52, 0xa7, 0x65, 0x97, 0xdd, 0x1f, 0xeb, 0x1e, 0xfa, 0xb9, 0xee, 0xa1, 0x5f, 0xeb,
  1676. 0x1e, 0xba, 0x6e, 0xac, 0xce, 0xc6, 0x7b, 0xaa, 0xe4, 0x2f, 0x7f, 0x07, 0x00, 0x00, 0xff, 0xff,
  1677. 0x8e, 0xd0, 0xf3, 0x8f, 0x32, 0x05, 0x00, 0x00,
  1678. }