starpc 0.30.0 → 0.30.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/e2e/mock/mock.pb.go +22 -1
- package/echo/echo.pb.go +22 -1
- package/go.mod +1 -1
- package/go.sum +2 -2
- package/package.json +2 -2
- package/srpc/rpcproto.pb.go +102 -1
package/e2e/mock/mock.pb.go
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
// Code generated by protoc-gen-go-lite. DO NOT EDIT.
|
|
2
|
-
// protoc-gen-go-lite version: v0.
|
|
2
|
+
// protoc-gen-go-lite version: v0.4.1
|
|
3
3
|
// source: github.com/aperturerobotics/starpc/e2e/mock/mock.proto
|
|
4
4
|
|
|
5
5
|
package e2e_mock
|
|
@@ -89,6 +89,27 @@ func (x *MockMsg) MarshalJSON() ([]byte, error) {
|
|
|
89
89
|
return json.DefaultMarshalerConfig.Marshal(x)
|
|
90
90
|
}
|
|
91
91
|
|
|
92
|
+
// UnmarshalProtoJSON unmarshals the MockMsg message from JSON.
|
|
93
|
+
func (x *MockMsg) UnmarshalProtoJSON(s *json.UnmarshalState) {
|
|
94
|
+
if s.ReadNil() {
|
|
95
|
+
return
|
|
96
|
+
}
|
|
97
|
+
s.ReadObject(func(key string) {
|
|
98
|
+
switch key {
|
|
99
|
+
default:
|
|
100
|
+
s.ReadAny() // ignore unknown field
|
|
101
|
+
case "body":
|
|
102
|
+
s.AddField("body")
|
|
103
|
+
x.Body = s.ReadString()
|
|
104
|
+
}
|
|
105
|
+
})
|
|
106
|
+
}
|
|
107
|
+
|
|
108
|
+
// UnmarshalJSON unmarshals the MockMsg from JSON.
|
|
109
|
+
func (x *MockMsg) UnmarshalJSON(b []byte) error {
|
|
110
|
+
return json.DefaultUnmarshalerConfig.Unmarshal(b, x)
|
|
111
|
+
}
|
|
112
|
+
|
|
92
113
|
func (m *MockMsg) MarshalVT() (dAtA []byte, err error) {
|
|
93
114
|
if m == nil {
|
|
94
115
|
return nil, nil
|
package/echo/echo.pb.go
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
// Code generated by protoc-gen-go-lite. DO NOT EDIT.
|
|
2
|
-
// protoc-gen-go-lite version: v0.
|
|
2
|
+
// protoc-gen-go-lite version: v0.4.1
|
|
3
3
|
// source: github.com/aperturerobotics/starpc/echo/echo.proto
|
|
4
4
|
|
|
5
5
|
package echo
|
|
@@ -90,6 +90,27 @@ func (x *EchoMsg) MarshalJSON() ([]byte, error) {
|
|
|
90
90
|
return json.DefaultMarshalerConfig.Marshal(x)
|
|
91
91
|
}
|
|
92
92
|
|
|
93
|
+
// UnmarshalProtoJSON unmarshals the EchoMsg message from JSON.
|
|
94
|
+
func (x *EchoMsg) UnmarshalProtoJSON(s *json.UnmarshalState) {
|
|
95
|
+
if s.ReadNil() {
|
|
96
|
+
return
|
|
97
|
+
}
|
|
98
|
+
s.ReadObject(func(key string) {
|
|
99
|
+
switch key {
|
|
100
|
+
default:
|
|
101
|
+
s.ReadAny() // ignore unknown field
|
|
102
|
+
case "body":
|
|
103
|
+
s.AddField("body")
|
|
104
|
+
x.Body = s.ReadString()
|
|
105
|
+
}
|
|
106
|
+
})
|
|
107
|
+
}
|
|
108
|
+
|
|
109
|
+
// UnmarshalJSON unmarshals the EchoMsg from JSON.
|
|
110
|
+
func (x *EchoMsg) UnmarshalJSON(b []byte) error {
|
|
111
|
+
return json.DefaultUnmarshalerConfig.Unmarshal(b, x)
|
|
112
|
+
}
|
|
113
|
+
|
|
93
114
|
func (m *EchoMsg) MarshalVT() (dAtA []byte, err error) {
|
|
94
115
|
if m == nil {
|
|
95
116
|
return nil, nil
|
package/go.mod
CHANGED
package/go.sum
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
github.com/aperturerobotics/protobuf-go-lite v0.
|
|
2
|
-
github.com/aperturerobotics/protobuf-go-lite v0.
|
|
1
|
+
github.com/aperturerobotics/protobuf-go-lite v0.4.1 h1:jd+DhFlf/f+L5gJPDCFrezBcaydCaxt5Keg0IJzJvOU=
|
|
2
|
+
github.com/aperturerobotics/protobuf-go-lite v0.4.1/go.mod h1:wRZn4YydbTn8Bdx4NB6ms0doF19llgim+0SNBvQ7M9c=
|
|
3
3
|
github.com/aperturerobotics/util v1.17.0 h1:eN9/NVXpf51OZQ4ERgGar/49kL1Pl8puW1MIYiYlA/8=
|
|
4
4
|
github.com/aperturerobotics/util v1.17.0/go.mod h1:YAWPti3PGLd1vagad3uMa3OfOLKo0rMXv80UJJPT0NA=
|
|
5
5
|
github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "starpc",
|
|
3
|
-
"version": "0.30.
|
|
3
|
+
"version": "0.30.1",
|
|
4
4
|
"description": "Streaming protobuf RPC service protocol over any two-way channel.",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"author": {
|
|
@@ -64,7 +64,7 @@
|
|
|
64
64
|
"singleQuote": true
|
|
65
65
|
},
|
|
66
66
|
"devDependencies": {
|
|
67
|
-
"@aperturerobotics/ts-common": "^0.10.
|
|
67
|
+
"@aperturerobotics/ts-common": "^0.10.2",
|
|
68
68
|
"bufferutil": "^4.0.7",
|
|
69
69
|
"depcheck": "^1.4.6",
|
|
70
70
|
"esbuild": "^0.20.0",
|
package/srpc/rpcproto.pb.go
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
// Code generated by protoc-gen-go-lite. DO NOT EDIT.
|
|
2
|
-
// protoc-gen-go-lite version: v0.
|
|
2
|
+
// protoc-gen-go-lite version: v0.4.1
|
|
3
3
|
// source: github.com/aperturerobotics/starpc/srpc/rpcproto.proto
|
|
4
4
|
|
|
5
5
|
package srpc
|
|
@@ -458,6 +458,47 @@ func (x *Packet) MarshalJSON() ([]byte, error) {
|
|
|
458
458
|
return json.DefaultMarshalerConfig.Marshal(x)
|
|
459
459
|
}
|
|
460
460
|
|
|
461
|
+
// UnmarshalProtoJSON unmarshals the Packet message from JSON.
|
|
462
|
+
func (x *Packet) UnmarshalProtoJSON(s *json.UnmarshalState) {
|
|
463
|
+
if s.ReadNil() {
|
|
464
|
+
return
|
|
465
|
+
}
|
|
466
|
+
s.ReadObject(func(key string) {
|
|
467
|
+
switch key {
|
|
468
|
+
default:
|
|
469
|
+
s.ReadAny() // ignore unknown field
|
|
470
|
+
case "call_start", "callStart":
|
|
471
|
+
ov := &Packet_CallStart{}
|
|
472
|
+
x.Body = ov
|
|
473
|
+
if s.ReadNil() {
|
|
474
|
+
ov.CallStart = nil
|
|
475
|
+
return
|
|
476
|
+
}
|
|
477
|
+
ov.CallStart = &CallStart{}
|
|
478
|
+
ov.CallStart.UnmarshalProtoJSON(s.WithField("call_start", true))
|
|
479
|
+
case "call_data", "callData":
|
|
480
|
+
ov := &Packet_CallData{}
|
|
481
|
+
x.Body = ov
|
|
482
|
+
if s.ReadNil() {
|
|
483
|
+
ov.CallData = nil
|
|
484
|
+
return
|
|
485
|
+
}
|
|
486
|
+
ov.CallData = &CallData{}
|
|
487
|
+
ov.CallData.UnmarshalProtoJSON(s.WithField("call_data", true))
|
|
488
|
+
case "call_cancel", "callCancel":
|
|
489
|
+
s.AddField("call_cancel")
|
|
490
|
+
ov := &Packet_CallCancel{}
|
|
491
|
+
x.Body = ov
|
|
492
|
+
ov.CallCancel = s.ReadBool()
|
|
493
|
+
}
|
|
494
|
+
})
|
|
495
|
+
}
|
|
496
|
+
|
|
497
|
+
// UnmarshalJSON unmarshals the Packet from JSON.
|
|
498
|
+
func (x *Packet) UnmarshalJSON(b []byte) error {
|
|
499
|
+
return json.DefaultUnmarshalerConfig.Unmarshal(b, x)
|
|
500
|
+
}
|
|
501
|
+
|
|
461
502
|
// MarshalProtoJSON marshals the CallStart message to JSON.
|
|
462
503
|
func (x *CallStart) MarshalProtoJSON(s *json.MarshalState) {
|
|
463
504
|
if x == nil {
|
|
@@ -494,6 +535,36 @@ func (x *CallStart) MarshalJSON() ([]byte, error) {
|
|
|
494
535
|
return json.DefaultMarshalerConfig.Marshal(x)
|
|
495
536
|
}
|
|
496
537
|
|
|
538
|
+
// UnmarshalProtoJSON unmarshals the CallStart message from JSON.
|
|
539
|
+
func (x *CallStart) UnmarshalProtoJSON(s *json.UnmarshalState) {
|
|
540
|
+
if s.ReadNil() {
|
|
541
|
+
return
|
|
542
|
+
}
|
|
543
|
+
s.ReadObject(func(key string) {
|
|
544
|
+
switch key {
|
|
545
|
+
default:
|
|
546
|
+
s.ReadAny() // ignore unknown field
|
|
547
|
+
case "rpc_service", "rpcService":
|
|
548
|
+
s.AddField("rpc_service")
|
|
549
|
+
x.RpcService = s.ReadString()
|
|
550
|
+
case "rpc_method", "rpcMethod":
|
|
551
|
+
s.AddField("rpc_method")
|
|
552
|
+
x.RpcMethod = s.ReadString()
|
|
553
|
+
case "data":
|
|
554
|
+
s.AddField("data")
|
|
555
|
+
x.Data = s.ReadBytes()
|
|
556
|
+
case "data_is_zero", "dataIsZero":
|
|
557
|
+
s.AddField("data_is_zero")
|
|
558
|
+
x.DataIsZero = s.ReadBool()
|
|
559
|
+
}
|
|
560
|
+
})
|
|
561
|
+
}
|
|
562
|
+
|
|
563
|
+
// UnmarshalJSON unmarshals the CallStart from JSON.
|
|
564
|
+
func (x *CallStart) UnmarshalJSON(b []byte) error {
|
|
565
|
+
return json.DefaultUnmarshalerConfig.Unmarshal(b, x)
|
|
566
|
+
}
|
|
567
|
+
|
|
497
568
|
// MarshalProtoJSON marshals the CallData message to JSON.
|
|
498
569
|
func (x *CallData) MarshalProtoJSON(s *json.MarshalState) {
|
|
499
570
|
if x == nil {
|
|
@@ -530,6 +601,36 @@ func (x *CallData) MarshalJSON() ([]byte, error) {
|
|
|
530
601
|
return json.DefaultMarshalerConfig.Marshal(x)
|
|
531
602
|
}
|
|
532
603
|
|
|
604
|
+
// UnmarshalProtoJSON unmarshals the CallData message from JSON.
|
|
605
|
+
func (x *CallData) UnmarshalProtoJSON(s *json.UnmarshalState) {
|
|
606
|
+
if s.ReadNil() {
|
|
607
|
+
return
|
|
608
|
+
}
|
|
609
|
+
s.ReadObject(func(key string) {
|
|
610
|
+
switch key {
|
|
611
|
+
default:
|
|
612
|
+
s.ReadAny() // ignore unknown field
|
|
613
|
+
case "data":
|
|
614
|
+
s.AddField("data")
|
|
615
|
+
x.Data = s.ReadBytes()
|
|
616
|
+
case "data_is_zero", "dataIsZero":
|
|
617
|
+
s.AddField("data_is_zero")
|
|
618
|
+
x.DataIsZero = s.ReadBool()
|
|
619
|
+
case "complete":
|
|
620
|
+
s.AddField("complete")
|
|
621
|
+
x.Complete = s.ReadBool()
|
|
622
|
+
case "error":
|
|
623
|
+
s.AddField("error")
|
|
624
|
+
x.Error = s.ReadString()
|
|
625
|
+
}
|
|
626
|
+
})
|
|
627
|
+
}
|
|
628
|
+
|
|
629
|
+
// UnmarshalJSON unmarshals the CallData from JSON.
|
|
630
|
+
func (x *CallData) UnmarshalJSON(b []byte) error {
|
|
631
|
+
return json.DefaultUnmarshalerConfig.Unmarshal(b, x)
|
|
632
|
+
}
|
|
633
|
+
|
|
533
634
|
func (m *Packet) MarshalVT() (dAtA []byte, err error) {
|
|
534
635
|
if m == nil {
|
|
535
636
|
return nil, nil
|