+51
-13
gen/go/lrc.pb.go
+51
-13
gen/go/lrc.pb.go
···
40
40
// *Event_Ban
41
41
// *Event_Unban
42
42
// *Event_Editbatch
43
+
// *Event_Mediainit
44
+
// *Event_Mediapub
43
45
Msg isEvent_Msg `protobuf_oneof:"msg"`
44
46
Id *uint32 `protobuf:"varint,16,opt,name=id,proto3,oneof" json:"id,omitempty"`
45
47
unknownFields protoimpl.UnknownFields
···
218
220
return nil
219
221
}
220
222
223
+
func (x *Event) GetMediainit() *MediaInit {
224
+
if x != nil {
225
+
if x, ok := x.Msg.(*Event_Mediainit); ok {
226
+
return x.Mediainit
227
+
}
228
+
}
229
+
return nil
230
+
}
231
+
232
+
func (x *Event) GetMediapub() *MediaPub {
233
+
if x != nil {
234
+
if x, ok := x.Msg.(*Event_Mediapub); ok {
235
+
return x.Mediapub
236
+
}
237
+
}
238
+
return nil
239
+
}
240
+
221
241
func (x *Event) GetId() uint32 {
222
242
if x != nil && x.Id != nil {
223
243
return *x.Id
···
289
309
Editbatch *EditBatch `protobuf:"bytes,15,opt,name=editbatch,proto3,oneof"`
290
310
}
291
311
312
+
type Event_Mediainit struct {
313
+
Mediainit *MediaInit `protobuf:"bytes,17,opt,name=mediainit,proto3,oneof"`
314
+
}
315
+
316
+
type Event_Mediapub struct {
317
+
Mediapub *MediaPub `protobuf:"bytes,18,opt,name=mediapub,proto3,oneof"`
318
+
}
319
+
292
320
func (*Event_Ping) isEvent_Msg() {}
293
321
294
322
func (*Event_Pong) isEvent_Msg() {}
···
318
346
func (*Event_Unban) isEvent_Msg() {}
319
347
320
348
func (*Event_Editbatch) isEvent_Msg() {}
349
+
350
+
func (*Event_Mediainit) isEvent_Msg() {}
351
+
352
+
func (*Event_Mediapub) isEvent_Msg() {}
321
353
322
354
type Ping struct {
323
355
state protoimpl.MessageState `protogen:"open.v1"`
···
1365
1397
1366
1398
const file_lrc_proto_rawDesc = "" +
1367
1399
"\n" +
1368
-
"\tlrc.proto\x12\x06lrc.v1\"\xdb\x04\n" +
1400
+
"\tlrc.proto\x12\x06lrc.v1\"\xbe\x05\n" +
1369
1401
"\x05Event\x12\"\n" +
1370
1402
"\x04ping\x18\x01 \x01(\v2\f.lrc.v1.PingH\x00R\x04ping\x12\"\n" +
1371
1403
"\x04pong\x18\x02 \x01(\v2\f.lrc.v1.PongH\x00R\x04pong\x12\"\n" +
···
1382
1414
"\x03hug\x18\f \x01(\v2\v.lrc.v1.HugH\x00R\x03hug\x12\x1f\n" +
1383
1415
"\x03ban\x18\r \x01(\v2\v.lrc.v1.BanH\x00R\x03ban\x12%\n" +
1384
1416
"\x05unban\x18\x0e \x01(\v2\r.lrc.v1.UnbanH\x00R\x05unban\x121\n" +
1385
-
"\teditbatch\x18\x0f \x01(\v2\x11.lrc.v1.EditBatchH\x00R\teditbatch\x12\x13\n" +
1417
+
"\teditbatch\x18\x0f \x01(\v2\x11.lrc.v1.EditBatchH\x00R\teditbatch\x121\n" +
1418
+
"\tmediainit\x18\x11 \x01(\v2\x11.lrc.v1.MediaInitH\x00R\tmediainit\x12.\n" +
1419
+
"\bmediapub\x18\x12 \x01(\v2\x10.lrc.v1.MediaPubH\x00R\bmediapub\x12\x13\n" +
1386
1420
"\x02id\x18\x10 \x01(\rH\x01R\x02id\x88\x01\x01B\x05\n" +
1387
1421
"\x03msgB\x05\n" +
1388
1422
"\x03_id\"\x06\n" +
···
1541
1575
14, // 12: lrc.v1.Event.ban:type_name -> lrc.v1.Ban
1542
1576
15, // 13: lrc.v1.Event.unban:type_name -> lrc.v1.Unban
1543
1577
17, // 14: lrc.v1.Event.editbatch:type_name -> lrc.v1.EditBatch
1544
-
11, // 15: lrc.v1.Kick.privileges:type_name -> lrc.v1.Sudo
1545
-
11, // 16: lrc.v1.Ban.privileges:type_name -> lrc.v1.Sudo
1546
-
11, // 17: lrc.v1.Unban.privileges:type_name -> lrc.v1.Sudo
1547
-
5, // 18: lrc.v1.Edit.insert:type_name -> lrc.v1.Insert
1548
-
6, // 19: lrc.v1.Edit.delete:type_name -> lrc.v1.Delete
1549
-
16, // 20: lrc.v1.EditBatch.edits:type_name -> lrc.v1.Edit
1550
-
21, // [21:21] is the sub-list for method output_type
1551
-
21, // [21:21] is the sub-list for method input_type
1552
-
21, // [21:21] is the sub-list for extension type_name
1553
-
21, // [21:21] is the sub-list for extension extendee
1554
-
0, // [0:21] is the sub-list for field type_name
1578
+
18, // 15: lrc.v1.Event.mediainit:type_name -> lrc.v1.MediaInit
1579
+
19, // 16: lrc.v1.Event.mediapub:type_name -> lrc.v1.MediaPub
1580
+
11, // 17: lrc.v1.Kick.privileges:type_name -> lrc.v1.Sudo
1581
+
11, // 18: lrc.v1.Ban.privileges:type_name -> lrc.v1.Sudo
1582
+
11, // 19: lrc.v1.Unban.privileges:type_name -> lrc.v1.Sudo
1583
+
5, // 20: lrc.v1.Edit.insert:type_name -> lrc.v1.Insert
1584
+
6, // 21: lrc.v1.Edit.delete:type_name -> lrc.v1.Delete
1585
+
16, // 22: lrc.v1.EditBatch.edits:type_name -> lrc.v1.Edit
1586
+
23, // [23:23] is the sub-list for method output_type
1587
+
23, // [23:23] is the sub-list for method input_type
1588
+
23, // [23:23] is the sub-list for extension type_name
1589
+
23, // [23:23] is the sub-list for extension extendee
1590
+
0, // [0:23] is the sub-list for field type_name
1555
1591
}
1556
1592
1557
1593
func init() { file_lrc_proto_init() }
···
1575
1611
(*Event_Ban)(nil),
1576
1612
(*Event_Unban)(nil),
1577
1613
(*Event_Editbatch)(nil),
1614
+
(*Event_Mediainit)(nil),
1615
+
(*Event_Mediapub)(nil),
1578
1616
}
1579
1617
file_lrc_proto_msgTypes[3].OneofWrappers = []any{}
1580
1618
file_lrc_proto_msgTypes[4].OneofWrappers = []any{}
+32
gen/ts/lrc.ts
+32
gen/ts/lrc.ts
···
108
108
*/
109
109
editbatch: EditBatch;
110
110
} | {
111
+
oneofKind: "mediainit";
112
+
/**
113
+
* @generated from protobuf field: lrc.v1.MediaInit mediainit = 17;
114
+
*/
115
+
mediainit: MediaInit;
116
+
} | {
117
+
oneofKind: "mediapub";
118
+
/**
119
+
* @generated from protobuf field: lrc.v1.MediaPub mediapub = 18;
120
+
*/
121
+
mediapub: MediaPub;
122
+
} | {
111
123
oneofKind: undefined;
112
124
};
113
125
/**
···
403
415
{ no: 13, name: "ban", kind: "message", oneof: "msg", T: () => Ban },
404
416
{ no: 14, name: "unban", kind: "message", oneof: "msg", T: () => Unban },
405
417
{ no: 15, name: "editbatch", kind: "message", oneof: "msg", T: () => EditBatch },
418
+
{ no: 17, name: "mediainit", kind: "message", oneof: "msg", T: () => MediaInit },
419
+
{ no: 18, name: "mediapub", kind: "message", oneof: "msg", T: () => MediaPub },
406
420
{ no: 16, name: "id", kind: "scalar", opt: true, T: 13 /*ScalarType.UINT32*/ }
407
421
]);
408
422
}
···
508
522
editbatch: EditBatch.internalBinaryRead(reader, reader.uint32(), options, (message.msg as any).editbatch)
509
523
};
510
524
break;
525
+
case /* lrc.v1.MediaInit mediainit */ 17:
526
+
message.msg = {
527
+
oneofKind: "mediainit",
528
+
mediainit: MediaInit.internalBinaryRead(reader, reader.uint32(), options, (message.msg as any).mediainit)
529
+
};
530
+
break;
531
+
case /* lrc.v1.MediaPub mediapub */ 18:
532
+
message.msg = {
533
+
oneofKind: "mediapub",
534
+
mediapub: MediaPub.internalBinaryRead(reader, reader.uint32(), options, (message.msg as any).mediapub)
535
+
};
536
+
break;
511
537
case /* optional uint32 id */ 16:
512
538
message.id = reader.uint32();
513
539
break;
···
571
597
/* optional uint32 id = 16; */
572
598
if (message.id !== undefined)
573
599
writer.tag(16, WireType.Varint).uint32(message.id);
600
+
/* lrc.v1.MediaInit mediainit = 17; */
601
+
if (message.msg.oneofKind === "mediainit")
602
+
MediaInit.internalBinaryWrite(message.msg.mediainit, writer.tag(17, WireType.LengthDelimited).fork(), options).join();
603
+
/* lrc.v1.MediaPub mediapub = 18; */
604
+
if (message.msg.oneofKind === "mediapub")
605
+
MediaPub.internalBinaryWrite(message.msg.mediapub, writer.tag(18, WireType.LengthDelimited).fork(), options).join();
574
606
let u = options.writeUnknownFields;
575
607
if (u !== false)
576
608
(u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
+2
lrc.proto
+2
lrc.proto