starpc 0.31.3 → 0.31.4
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/Makefile +1 -1
- package/e2e/mock/mock.pb.go +16 -1
- package/echo/echo.pb.go +16 -1
- package/go.mod +1 -1
- package/go.sum +2 -2
- package/package.json +1 -1
- package/srpc/rpcproto.pb.go +84 -1
package/Makefile
CHANGED
|
@@ -87,7 +87,7 @@ genproto: vendor node_modules $(GOIMPORTS) $(PROTOWRAP) $(PROTOC_GEN_GO) $(PROTO
|
|
|
87
87
|
--plugin=./node_modules/.bin/protoc-gen-es \
|
|
88
88
|
--plugin=./cmd/protoc-gen-es-starpc/dev/protoc-gen-es-starpc \
|
|
89
89
|
--go-lite_out=$${OUT} \
|
|
90
|
-
--go-lite_opt=features=marshal+unmarshal+size+equal+json+clone \
|
|
90
|
+
--go-lite_opt=features=marshal+unmarshal+size+equal+json+clone+text \
|
|
91
91
|
--go-starpc_out=$${OUT} \
|
|
92
92
|
--es_out=$${OUT} \
|
|
93
93
|
--es_opt target=ts \
|
package/e2e/mock/mock.pb.go
CHANGED
|
@@ -1,11 +1,13 @@
|
|
|
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.5.0
|
|
3
3
|
// source: github.com/aperturerobotics/starpc/e2e/mock/mock.proto
|
|
4
4
|
|
|
5
5
|
package e2e_mock
|
|
6
6
|
|
|
7
7
|
import (
|
|
8
8
|
io "io"
|
|
9
|
+
strconv "strconv"
|
|
10
|
+
strings "strings"
|
|
9
11
|
|
|
10
12
|
protobuf_go_lite "github.com/aperturerobotics/protobuf-go-lite"
|
|
11
13
|
json "github.com/aperturerobotics/protobuf-go-lite/json"
|
|
@@ -164,6 +166,19 @@ func (m *MockMsg) SizeVT() (n int) {
|
|
|
164
166
|
return n
|
|
165
167
|
}
|
|
166
168
|
|
|
169
|
+
func (x *MockMsg) MarshalProtoText() string {
|
|
170
|
+
var sb strings.Builder
|
|
171
|
+
sb.WriteString("MockMsg { ")
|
|
172
|
+
if x.Body != "" {
|
|
173
|
+
sb.WriteString(" body: ")
|
|
174
|
+
sb.WriteString(strconv.Quote(x.Body))
|
|
175
|
+
}
|
|
176
|
+
sb.WriteString("}")
|
|
177
|
+
return sb.String()
|
|
178
|
+
}
|
|
179
|
+
func (x *MockMsg) String() string {
|
|
180
|
+
return x.MarshalProtoText()
|
|
181
|
+
}
|
|
167
182
|
func (m *MockMsg) UnmarshalVT(dAtA []byte) error {
|
|
168
183
|
l := len(dAtA)
|
|
169
184
|
iNdEx := 0
|
package/echo/echo.pb.go
CHANGED
|
@@ -1,11 +1,13 @@
|
|
|
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.5.0
|
|
3
3
|
// source: github.com/aperturerobotics/starpc/echo/echo.proto
|
|
4
4
|
|
|
5
5
|
package echo
|
|
6
6
|
|
|
7
7
|
import (
|
|
8
8
|
io "io"
|
|
9
|
+
strconv "strconv"
|
|
10
|
+
strings "strings"
|
|
9
11
|
|
|
10
12
|
protobuf_go_lite "github.com/aperturerobotics/protobuf-go-lite"
|
|
11
13
|
json "github.com/aperturerobotics/protobuf-go-lite/json"
|
|
@@ -165,6 +167,19 @@ func (m *EchoMsg) SizeVT() (n int) {
|
|
|
165
167
|
return n
|
|
166
168
|
}
|
|
167
169
|
|
|
170
|
+
func (x *EchoMsg) MarshalProtoText() string {
|
|
171
|
+
var sb strings.Builder
|
|
172
|
+
sb.WriteString("EchoMsg { ")
|
|
173
|
+
if x.Body != "" {
|
|
174
|
+
sb.WriteString(" body: ")
|
|
175
|
+
sb.WriteString(strconv.Quote(x.Body))
|
|
176
|
+
}
|
|
177
|
+
sb.WriteString("}")
|
|
178
|
+
return sb.String()
|
|
179
|
+
}
|
|
180
|
+
func (x *EchoMsg) String() string {
|
|
181
|
+
return x.MarshalProtoText()
|
|
182
|
+
}
|
|
168
183
|
func (m *EchoMsg) UnmarshalVT(dAtA []byte) error {
|
|
169
184
|
l := len(dAtA)
|
|
170
185
|
iNdEx := 0
|
package/go.mod
CHANGED
|
@@ -3,7 +3,7 @@ module github.com/aperturerobotics/starpc
|
|
|
3
3
|
go 1.22
|
|
4
4
|
|
|
5
5
|
require (
|
|
6
|
-
github.com/aperturerobotics/protobuf-go-lite v0.
|
|
6
|
+
github.com/aperturerobotics/protobuf-go-lite v0.5.0 // latest
|
|
7
7
|
github.com/aperturerobotics/util v1.18.1 // latest
|
|
8
8
|
)
|
|
9
9
|
|
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.5.0 h1:JmTfiOeTQv06EYIFyVkjkmGXxI7JoCRuokVK2SOvo3I=
|
|
2
|
+
github.com/aperturerobotics/protobuf-go-lite v0.5.0/go.mod h1:/EduuzDxtr5s0e9s10XYG35+pPgvrgg3UmBliivOaSs=
|
|
3
3
|
github.com/aperturerobotics/util v1.18.1 h1:Iu8toMYRKs3d0TH8JkAMwfEYY8bEekDaTEvLOVVqh44=
|
|
4
4
|
github.com/aperturerobotics/util v1.18.1/go.mod h1:Oz7Rmq5sKS1UgTRJkDWYfyf1LiA2rIRbnO341Xd91bU=
|
|
5
5
|
github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
|
package/package.json
CHANGED
package/srpc/rpcproto.pb.go
CHANGED
|
@@ -1,11 +1,14 @@
|
|
|
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.5.0
|
|
3
3
|
// source: github.com/aperturerobotics/starpc/srpc/rpcproto.proto
|
|
4
4
|
|
|
5
5
|
package srpc
|
|
6
6
|
|
|
7
7
|
import (
|
|
8
|
+
base64 "encoding/base64"
|
|
8
9
|
io "io"
|
|
10
|
+
strconv "strconv"
|
|
11
|
+
strings "strings"
|
|
9
12
|
|
|
10
13
|
protobuf_go_lite "github.com/aperturerobotics/protobuf-go-lite"
|
|
11
14
|
json "github.com/aperturerobotics/protobuf-go-lite/json"
|
|
@@ -966,6 +969,86 @@ func (m *CallData) SizeVT() (n int) {
|
|
|
966
969
|
return n
|
|
967
970
|
}
|
|
968
971
|
|
|
972
|
+
func (x *Packet) MarshalProtoText() string {
|
|
973
|
+
var sb strings.Builder
|
|
974
|
+
sb.WriteString("Packet { ")
|
|
975
|
+
switch body := x.Body.(type) {
|
|
976
|
+
case *Packet_CallStart:
|
|
977
|
+
if body.CallStart != nil {
|
|
978
|
+
sb.WriteString(" call_start: ")
|
|
979
|
+
sb.WriteString(body.CallStart.MarshalProtoText())
|
|
980
|
+
}
|
|
981
|
+
case *Packet_CallData:
|
|
982
|
+
if body.CallData != nil {
|
|
983
|
+
sb.WriteString(" call_data: ")
|
|
984
|
+
sb.WriteString(body.CallData.MarshalProtoText())
|
|
985
|
+
}
|
|
986
|
+
case *Packet_CallCancel:
|
|
987
|
+
if body.CallCancel {
|
|
988
|
+
sb.WriteString(" call_cancel: ")
|
|
989
|
+
sb.WriteString(strconv.FormatBool(body.CallCancel))
|
|
990
|
+
}
|
|
991
|
+
}
|
|
992
|
+
sb.WriteString("}")
|
|
993
|
+
return sb.String()
|
|
994
|
+
}
|
|
995
|
+
func (x *Packet) String() string {
|
|
996
|
+
return x.MarshalProtoText()
|
|
997
|
+
}
|
|
998
|
+
func (x *CallStart) MarshalProtoText() string {
|
|
999
|
+
var sb strings.Builder
|
|
1000
|
+
sb.WriteString("CallStart { ")
|
|
1001
|
+
if x.RpcService != "" {
|
|
1002
|
+
sb.WriteString(" rpc_service: ")
|
|
1003
|
+
sb.WriteString(strconv.Quote(x.RpcService))
|
|
1004
|
+
}
|
|
1005
|
+
if x.RpcMethod != "" {
|
|
1006
|
+
sb.WriteString(" rpc_method: ")
|
|
1007
|
+
sb.WriteString(strconv.Quote(x.RpcMethod))
|
|
1008
|
+
}
|
|
1009
|
+
if len(x.Data) > 0 {
|
|
1010
|
+
sb.WriteString(" data: ")
|
|
1011
|
+
sb.WriteString("\"")
|
|
1012
|
+
sb.WriteString(base64.StdEncoding.EncodeToString(x.Data))
|
|
1013
|
+
sb.WriteString("\"")
|
|
1014
|
+
}
|
|
1015
|
+
if x.DataIsZero {
|
|
1016
|
+
sb.WriteString(" data_is_zero: ")
|
|
1017
|
+
sb.WriteString(strconv.FormatBool(x.DataIsZero))
|
|
1018
|
+
}
|
|
1019
|
+
sb.WriteString("}")
|
|
1020
|
+
return sb.String()
|
|
1021
|
+
}
|
|
1022
|
+
func (x *CallStart) String() string {
|
|
1023
|
+
return x.MarshalProtoText()
|
|
1024
|
+
}
|
|
1025
|
+
func (x *CallData) MarshalProtoText() string {
|
|
1026
|
+
var sb strings.Builder
|
|
1027
|
+
sb.WriteString("CallData { ")
|
|
1028
|
+
if len(x.Data) > 0 {
|
|
1029
|
+
sb.WriteString(" data: ")
|
|
1030
|
+
sb.WriteString("\"")
|
|
1031
|
+
sb.WriteString(base64.StdEncoding.EncodeToString(x.Data))
|
|
1032
|
+
sb.WriteString("\"")
|
|
1033
|
+
}
|
|
1034
|
+
if x.DataIsZero {
|
|
1035
|
+
sb.WriteString(" data_is_zero: ")
|
|
1036
|
+
sb.WriteString(strconv.FormatBool(x.DataIsZero))
|
|
1037
|
+
}
|
|
1038
|
+
if x.Complete {
|
|
1039
|
+
sb.WriteString(" complete: ")
|
|
1040
|
+
sb.WriteString(strconv.FormatBool(x.Complete))
|
|
1041
|
+
}
|
|
1042
|
+
if x.Error != "" {
|
|
1043
|
+
sb.WriteString(" error: ")
|
|
1044
|
+
sb.WriteString(strconv.Quote(x.Error))
|
|
1045
|
+
}
|
|
1046
|
+
sb.WriteString("}")
|
|
1047
|
+
return sb.String()
|
|
1048
|
+
}
|
|
1049
|
+
func (x *CallData) String() string {
|
|
1050
|
+
return x.MarshalProtoText()
|
|
1051
|
+
}
|
|
969
1052
|
func (m *Packet) UnmarshalVT(dAtA []byte) error {
|
|
970
1053
|
l := len(dAtA)
|
|
971
1054
|
iNdEx := 0
|