@latticexyz/services 2.0.0-snapshot-test-32d38619 → 2.0.0
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/README.md +1 -241
- package/dist/faucet.d.ts +369 -0
- package/dist/faucet.js.map +1 -1
- package/package.json +5 -25
- package/protobuf/ts/faucet/faucet.ts +19 -19
- package/protobuf/ts/index.ts +0 -3
- package/ts/faucet/createFaucetService.ts +1 -1
- package/README.v1.md +0 -119
- package/bin/faucet +0 -0
- package/bin/mode +0 -0
- package/dist/ecs-relay.js +0 -683
- package/dist/ecs-relay.js.map +0 -1
- package/dist/ecs-snapshot.js +0 -810
- package/dist/ecs-snapshot.js.map +0 -1
- package/dist/ecs-stream.js +0 -391
- package/dist/ecs-stream.js.map +0 -1
- package/dist/mode.js +0 -1481
- package/dist/mode.js.map +0 -1
- package/protobuf/go/ecs-relay/ecs-relay.pb.go +0 -971
- package/protobuf/go/ecs-relay/ecs-relay_grpc.pb.go +0 -545
- package/protobuf/go/ecs-snapshot/ecs-snapshot.pb.go +0 -1124
- package/protobuf/go/ecs-snapshot/ecs-snapshot_grpc.pb.go +0 -502
- package/protobuf/go/ecs-stream/ecs-stream.pb.go +0 -525
- package/protobuf/go/ecs-stream/ecs-stream_grpc.pb.go +0 -138
- package/protobuf/go/faucet/faucet.pb.go +0 -1133
- package/protobuf/go/faucet/faucet_grpc.pb.go +0 -370
- package/protobuf/go/mode/mode.pb.go +0 -1772
- package/protobuf/go/mode/mode_grpc.pb.go +0 -283
- package/protobuf/ts/ecs-relay/ecs-relay.ts +0 -889
- package/protobuf/ts/ecs-snapshot/ecs-snapshot.ts +0 -1078
- package/protobuf/ts/ecs-stream/ecs-stream.ts +0 -508
- package/protobuf/ts/mode/google/protobuf/any.ts +0 -191
- package/protobuf/ts/mode/mode.ts +0 -1875
@@ -1,545 +0,0 @@
|
|
1
|
-
// Code generated by protoc-gen-go-grpc. DO NOT EDIT.
|
2
|
-
// versions:
|
3
|
-
// - protoc-gen-go-grpc v1.3.0
|
4
|
-
// - protoc v3.21.3
|
5
|
-
// source: proto/ecs-relay.proto
|
6
|
-
|
7
|
-
package ecs_relay
|
8
|
-
|
9
|
-
import (
|
10
|
-
context "context"
|
11
|
-
grpc "google.golang.org/grpc"
|
12
|
-
codes "google.golang.org/grpc/codes"
|
13
|
-
status "google.golang.org/grpc/status"
|
14
|
-
)
|
15
|
-
|
16
|
-
// This is a compile-time assertion to ensure that this generated file
|
17
|
-
// is compatible with the grpc package it is being compiled against.
|
18
|
-
// Requires gRPC-Go v1.32.0 or later.
|
19
|
-
const _ = grpc.SupportPackageIsVersion7
|
20
|
-
|
21
|
-
const (
|
22
|
-
ECSRelayService_Authenticate_FullMethodName = "/ecsrelay.ECSRelayService/Authenticate"
|
23
|
-
ECSRelayService_Revoke_FullMethodName = "/ecsrelay.ECSRelayService/Revoke"
|
24
|
-
ECSRelayService_Ping_FullMethodName = "/ecsrelay.ECSRelayService/Ping"
|
25
|
-
ECSRelayService_CountAuthenticated_FullMethodName = "/ecsrelay.ECSRelayService/CountAuthenticated"
|
26
|
-
ECSRelayService_CountConnected_FullMethodName = "/ecsrelay.ECSRelayService/CountConnected"
|
27
|
-
ECSRelayService_Subscribe_FullMethodName = "/ecsrelay.ECSRelayService/Subscribe"
|
28
|
-
ECSRelayService_Unsubscribe_FullMethodName = "/ecsrelay.ECSRelayService/Unsubscribe"
|
29
|
-
ECSRelayService_OpenStream_FullMethodName = "/ecsrelay.ECSRelayService/OpenStream"
|
30
|
-
ECSRelayService_PushStream_FullMethodName = "/ecsrelay.ECSRelayService/PushStream"
|
31
|
-
ECSRelayService_Push_FullMethodName = "/ecsrelay.ECSRelayService/Push"
|
32
|
-
ECSRelayService_MinBalanceForPush_FullMethodName = "/ecsrelay.ECSRelayService/MinBalanceForPush"
|
33
|
-
)
|
34
|
-
|
35
|
-
// ECSRelayServiceClient is the client API for ECSRelayService service.
|
36
|
-
//
|
37
|
-
// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream.
|
38
|
-
type ECSRelayServiceClient interface {
|
39
|
-
Authenticate(ctx context.Context, in *Signature, opts ...grpc.CallOption) (*Identity, error)
|
40
|
-
Revoke(ctx context.Context, in *Signature, opts ...grpc.CallOption) (*Identity, error)
|
41
|
-
Ping(ctx context.Context, in *Signature, opts ...grpc.CallOption) (*Identity, error)
|
42
|
-
CountAuthenticated(ctx context.Context, in *CountIdentitiesRequest, opts ...grpc.CallOption) (*CountIdentitiesResponse, error)
|
43
|
-
CountConnected(ctx context.Context, in *CountIdentitiesRequest, opts ...grpc.CallOption) (*CountIdentitiesResponse, error)
|
44
|
-
Subscribe(ctx context.Context, in *SubscriptionRequest, opts ...grpc.CallOption) (*Subscription, error)
|
45
|
-
Unsubscribe(ctx context.Context, in *SubscriptionRequest, opts ...grpc.CallOption) (*Subscription, error)
|
46
|
-
OpenStream(ctx context.Context, in *Signature, opts ...grpc.CallOption) (ECSRelayService_OpenStreamClient, error)
|
47
|
-
// Push a stream of messages to be relayed.
|
48
|
-
PushStream(ctx context.Context, opts ...grpc.CallOption) (ECSRelayService_PushStreamClient, error)
|
49
|
-
// Push a single message to be relayed.
|
50
|
-
Push(ctx context.Context, in *PushRequest, opts ...grpc.CallOption) (*PushResponse, error)
|
51
|
-
// Minimum balance an account must have to be able to push.
|
52
|
-
MinBalanceForPush(ctx context.Context, in *BalanceRequest, opts ...grpc.CallOption) (*BalanceResponse, error)
|
53
|
-
}
|
54
|
-
|
55
|
-
type eCSRelayServiceClient struct {
|
56
|
-
cc grpc.ClientConnInterface
|
57
|
-
}
|
58
|
-
|
59
|
-
func NewECSRelayServiceClient(cc grpc.ClientConnInterface) ECSRelayServiceClient {
|
60
|
-
return &eCSRelayServiceClient{cc}
|
61
|
-
}
|
62
|
-
|
63
|
-
func (c *eCSRelayServiceClient) Authenticate(ctx context.Context, in *Signature, opts ...grpc.CallOption) (*Identity, error) {
|
64
|
-
out := new(Identity)
|
65
|
-
err := c.cc.Invoke(ctx, ECSRelayService_Authenticate_FullMethodName, in, out, opts...)
|
66
|
-
if err != nil {
|
67
|
-
return nil, err
|
68
|
-
}
|
69
|
-
return out, nil
|
70
|
-
}
|
71
|
-
|
72
|
-
func (c *eCSRelayServiceClient) Revoke(ctx context.Context, in *Signature, opts ...grpc.CallOption) (*Identity, error) {
|
73
|
-
out := new(Identity)
|
74
|
-
err := c.cc.Invoke(ctx, ECSRelayService_Revoke_FullMethodName, in, out, opts...)
|
75
|
-
if err != nil {
|
76
|
-
return nil, err
|
77
|
-
}
|
78
|
-
return out, nil
|
79
|
-
}
|
80
|
-
|
81
|
-
func (c *eCSRelayServiceClient) Ping(ctx context.Context, in *Signature, opts ...grpc.CallOption) (*Identity, error) {
|
82
|
-
out := new(Identity)
|
83
|
-
err := c.cc.Invoke(ctx, ECSRelayService_Ping_FullMethodName, in, out, opts...)
|
84
|
-
if err != nil {
|
85
|
-
return nil, err
|
86
|
-
}
|
87
|
-
return out, nil
|
88
|
-
}
|
89
|
-
|
90
|
-
func (c *eCSRelayServiceClient) CountAuthenticated(ctx context.Context, in *CountIdentitiesRequest, opts ...grpc.CallOption) (*CountIdentitiesResponse, error) {
|
91
|
-
out := new(CountIdentitiesResponse)
|
92
|
-
err := c.cc.Invoke(ctx, ECSRelayService_CountAuthenticated_FullMethodName, in, out, opts...)
|
93
|
-
if err != nil {
|
94
|
-
return nil, err
|
95
|
-
}
|
96
|
-
return out, nil
|
97
|
-
}
|
98
|
-
|
99
|
-
func (c *eCSRelayServiceClient) CountConnected(ctx context.Context, in *CountIdentitiesRequest, opts ...grpc.CallOption) (*CountIdentitiesResponse, error) {
|
100
|
-
out := new(CountIdentitiesResponse)
|
101
|
-
err := c.cc.Invoke(ctx, ECSRelayService_CountConnected_FullMethodName, in, out, opts...)
|
102
|
-
if err != nil {
|
103
|
-
return nil, err
|
104
|
-
}
|
105
|
-
return out, nil
|
106
|
-
}
|
107
|
-
|
108
|
-
func (c *eCSRelayServiceClient) Subscribe(ctx context.Context, in *SubscriptionRequest, opts ...grpc.CallOption) (*Subscription, error) {
|
109
|
-
out := new(Subscription)
|
110
|
-
err := c.cc.Invoke(ctx, ECSRelayService_Subscribe_FullMethodName, in, out, opts...)
|
111
|
-
if err != nil {
|
112
|
-
return nil, err
|
113
|
-
}
|
114
|
-
return out, nil
|
115
|
-
}
|
116
|
-
|
117
|
-
func (c *eCSRelayServiceClient) Unsubscribe(ctx context.Context, in *SubscriptionRequest, opts ...grpc.CallOption) (*Subscription, error) {
|
118
|
-
out := new(Subscription)
|
119
|
-
err := c.cc.Invoke(ctx, ECSRelayService_Unsubscribe_FullMethodName, in, out, opts...)
|
120
|
-
if err != nil {
|
121
|
-
return nil, err
|
122
|
-
}
|
123
|
-
return out, nil
|
124
|
-
}
|
125
|
-
|
126
|
-
func (c *eCSRelayServiceClient) OpenStream(ctx context.Context, in *Signature, opts ...grpc.CallOption) (ECSRelayService_OpenStreamClient, error) {
|
127
|
-
stream, err := c.cc.NewStream(ctx, &ECSRelayService_ServiceDesc.Streams[0], ECSRelayService_OpenStream_FullMethodName, opts...)
|
128
|
-
if err != nil {
|
129
|
-
return nil, err
|
130
|
-
}
|
131
|
-
x := &eCSRelayServiceOpenStreamClient{stream}
|
132
|
-
if err := x.ClientStream.SendMsg(in); err != nil {
|
133
|
-
return nil, err
|
134
|
-
}
|
135
|
-
if err := x.ClientStream.CloseSend(); err != nil {
|
136
|
-
return nil, err
|
137
|
-
}
|
138
|
-
return x, nil
|
139
|
-
}
|
140
|
-
|
141
|
-
type ECSRelayService_OpenStreamClient interface {
|
142
|
-
Recv() (*Message, error)
|
143
|
-
grpc.ClientStream
|
144
|
-
}
|
145
|
-
|
146
|
-
type eCSRelayServiceOpenStreamClient struct {
|
147
|
-
grpc.ClientStream
|
148
|
-
}
|
149
|
-
|
150
|
-
func (x *eCSRelayServiceOpenStreamClient) Recv() (*Message, error) {
|
151
|
-
m := new(Message)
|
152
|
-
if err := x.ClientStream.RecvMsg(m); err != nil {
|
153
|
-
return nil, err
|
154
|
-
}
|
155
|
-
return m, nil
|
156
|
-
}
|
157
|
-
|
158
|
-
func (c *eCSRelayServiceClient) PushStream(ctx context.Context, opts ...grpc.CallOption) (ECSRelayService_PushStreamClient, error) {
|
159
|
-
stream, err := c.cc.NewStream(ctx, &ECSRelayService_ServiceDesc.Streams[1], ECSRelayService_PushStream_FullMethodName, opts...)
|
160
|
-
if err != nil {
|
161
|
-
return nil, err
|
162
|
-
}
|
163
|
-
x := &eCSRelayServicePushStreamClient{stream}
|
164
|
-
return x, nil
|
165
|
-
}
|
166
|
-
|
167
|
-
type ECSRelayService_PushStreamClient interface {
|
168
|
-
Send(*PushRequest) error
|
169
|
-
Recv() (*PushResponse, error)
|
170
|
-
grpc.ClientStream
|
171
|
-
}
|
172
|
-
|
173
|
-
type eCSRelayServicePushStreamClient struct {
|
174
|
-
grpc.ClientStream
|
175
|
-
}
|
176
|
-
|
177
|
-
func (x *eCSRelayServicePushStreamClient) Send(m *PushRequest) error {
|
178
|
-
return x.ClientStream.SendMsg(m)
|
179
|
-
}
|
180
|
-
|
181
|
-
func (x *eCSRelayServicePushStreamClient) Recv() (*PushResponse, error) {
|
182
|
-
m := new(PushResponse)
|
183
|
-
if err := x.ClientStream.RecvMsg(m); err != nil {
|
184
|
-
return nil, err
|
185
|
-
}
|
186
|
-
return m, nil
|
187
|
-
}
|
188
|
-
|
189
|
-
func (c *eCSRelayServiceClient) Push(ctx context.Context, in *PushRequest, opts ...grpc.CallOption) (*PushResponse, error) {
|
190
|
-
out := new(PushResponse)
|
191
|
-
err := c.cc.Invoke(ctx, ECSRelayService_Push_FullMethodName, in, out, opts...)
|
192
|
-
if err != nil {
|
193
|
-
return nil, err
|
194
|
-
}
|
195
|
-
return out, nil
|
196
|
-
}
|
197
|
-
|
198
|
-
func (c *eCSRelayServiceClient) MinBalanceForPush(ctx context.Context, in *BalanceRequest, opts ...grpc.CallOption) (*BalanceResponse, error) {
|
199
|
-
out := new(BalanceResponse)
|
200
|
-
err := c.cc.Invoke(ctx, ECSRelayService_MinBalanceForPush_FullMethodName, in, out, opts...)
|
201
|
-
if err != nil {
|
202
|
-
return nil, err
|
203
|
-
}
|
204
|
-
return out, nil
|
205
|
-
}
|
206
|
-
|
207
|
-
// ECSRelayServiceServer is the server API for ECSRelayService service.
|
208
|
-
// All implementations must embed UnimplementedECSRelayServiceServer
|
209
|
-
// for forward compatibility
|
210
|
-
type ECSRelayServiceServer interface {
|
211
|
-
Authenticate(context.Context, *Signature) (*Identity, error)
|
212
|
-
Revoke(context.Context, *Signature) (*Identity, error)
|
213
|
-
Ping(context.Context, *Signature) (*Identity, error)
|
214
|
-
CountAuthenticated(context.Context, *CountIdentitiesRequest) (*CountIdentitiesResponse, error)
|
215
|
-
CountConnected(context.Context, *CountIdentitiesRequest) (*CountIdentitiesResponse, error)
|
216
|
-
Subscribe(context.Context, *SubscriptionRequest) (*Subscription, error)
|
217
|
-
Unsubscribe(context.Context, *SubscriptionRequest) (*Subscription, error)
|
218
|
-
OpenStream(*Signature, ECSRelayService_OpenStreamServer) error
|
219
|
-
// Push a stream of messages to be relayed.
|
220
|
-
PushStream(ECSRelayService_PushStreamServer) error
|
221
|
-
// Push a single message to be relayed.
|
222
|
-
Push(context.Context, *PushRequest) (*PushResponse, error)
|
223
|
-
// Minimum balance an account must have to be able to push.
|
224
|
-
MinBalanceForPush(context.Context, *BalanceRequest) (*BalanceResponse, error)
|
225
|
-
mustEmbedUnimplementedECSRelayServiceServer()
|
226
|
-
}
|
227
|
-
|
228
|
-
// UnimplementedECSRelayServiceServer must be embedded to have forward compatible implementations.
|
229
|
-
type UnimplementedECSRelayServiceServer struct {
|
230
|
-
}
|
231
|
-
|
232
|
-
func (UnimplementedECSRelayServiceServer) Authenticate(context.Context, *Signature) (*Identity, error) {
|
233
|
-
return nil, status.Errorf(codes.Unimplemented, "method Authenticate not implemented")
|
234
|
-
}
|
235
|
-
func (UnimplementedECSRelayServiceServer) Revoke(context.Context, *Signature) (*Identity, error) {
|
236
|
-
return nil, status.Errorf(codes.Unimplemented, "method Revoke not implemented")
|
237
|
-
}
|
238
|
-
func (UnimplementedECSRelayServiceServer) Ping(context.Context, *Signature) (*Identity, error) {
|
239
|
-
return nil, status.Errorf(codes.Unimplemented, "method Ping not implemented")
|
240
|
-
}
|
241
|
-
func (UnimplementedECSRelayServiceServer) CountAuthenticated(context.Context, *CountIdentitiesRequest) (*CountIdentitiesResponse, error) {
|
242
|
-
return nil, status.Errorf(codes.Unimplemented, "method CountAuthenticated not implemented")
|
243
|
-
}
|
244
|
-
func (UnimplementedECSRelayServiceServer) CountConnected(context.Context, *CountIdentitiesRequest) (*CountIdentitiesResponse, error) {
|
245
|
-
return nil, status.Errorf(codes.Unimplemented, "method CountConnected not implemented")
|
246
|
-
}
|
247
|
-
func (UnimplementedECSRelayServiceServer) Subscribe(context.Context, *SubscriptionRequest) (*Subscription, error) {
|
248
|
-
return nil, status.Errorf(codes.Unimplemented, "method Subscribe not implemented")
|
249
|
-
}
|
250
|
-
func (UnimplementedECSRelayServiceServer) Unsubscribe(context.Context, *SubscriptionRequest) (*Subscription, error) {
|
251
|
-
return nil, status.Errorf(codes.Unimplemented, "method Unsubscribe not implemented")
|
252
|
-
}
|
253
|
-
func (UnimplementedECSRelayServiceServer) OpenStream(*Signature, ECSRelayService_OpenStreamServer) error {
|
254
|
-
return status.Errorf(codes.Unimplemented, "method OpenStream not implemented")
|
255
|
-
}
|
256
|
-
func (UnimplementedECSRelayServiceServer) PushStream(ECSRelayService_PushStreamServer) error {
|
257
|
-
return status.Errorf(codes.Unimplemented, "method PushStream not implemented")
|
258
|
-
}
|
259
|
-
func (UnimplementedECSRelayServiceServer) Push(context.Context, *PushRequest) (*PushResponse, error) {
|
260
|
-
return nil, status.Errorf(codes.Unimplemented, "method Push not implemented")
|
261
|
-
}
|
262
|
-
func (UnimplementedECSRelayServiceServer) MinBalanceForPush(context.Context, *BalanceRequest) (*BalanceResponse, error) {
|
263
|
-
return nil, status.Errorf(codes.Unimplemented, "method MinBalanceForPush not implemented")
|
264
|
-
}
|
265
|
-
func (UnimplementedECSRelayServiceServer) mustEmbedUnimplementedECSRelayServiceServer() {}
|
266
|
-
|
267
|
-
// UnsafeECSRelayServiceServer may be embedded to opt out of forward compatibility for this service.
|
268
|
-
// Use of this interface is not recommended, as added methods to ECSRelayServiceServer will
|
269
|
-
// result in compilation errors.
|
270
|
-
type UnsafeECSRelayServiceServer interface {
|
271
|
-
mustEmbedUnimplementedECSRelayServiceServer()
|
272
|
-
}
|
273
|
-
|
274
|
-
func RegisterECSRelayServiceServer(s grpc.ServiceRegistrar, srv ECSRelayServiceServer) {
|
275
|
-
s.RegisterService(&ECSRelayService_ServiceDesc, srv)
|
276
|
-
}
|
277
|
-
|
278
|
-
func _ECSRelayService_Authenticate_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
279
|
-
in := new(Signature)
|
280
|
-
if err := dec(in); err != nil {
|
281
|
-
return nil, err
|
282
|
-
}
|
283
|
-
if interceptor == nil {
|
284
|
-
return srv.(ECSRelayServiceServer).Authenticate(ctx, in)
|
285
|
-
}
|
286
|
-
info := &grpc.UnaryServerInfo{
|
287
|
-
Server: srv,
|
288
|
-
FullMethod: ECSRelayService_Authenticate_FullMethodName,
|
289
|
-
}
|
290
|
-
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
291
|
-
return srv.(ECSRelayServiceServer).Authenticate(ctx, req.(*Signature))
|
292
|
-
}
|
293
|
-
return interceptor(ctx, in, info, handler)
|
294
|
-
}
|
295
|
-
|
296
|
-
func _ECSRelayService_Revoke_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
297
|
-
in := new(Signature)
|
298
|
-
if err := dec(in); err != nil {
|
299
|
-
return nil, err
|
300
|
-
}
|
301
|
-
if interceptor == nil {
|
302
|
-
return srv.(ECSRelayServiceServer).Revoke(ctx, in)
|
303
|
-
}
|
304
|
-
info := &grpc.UnaryServerInfo{
|
305
|
-
Server: srv,
|
306
|
-
FullMethod: ECSRelayService_Revoke_FullMethodName,
|
307
|
-
}
|
308
|
-
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
309
|
-
return srv.(ECSRelayServiceServer).Revoke(ctx, req.(*Signature))
|
310
|
-
}
|
311
|
-
return interceptor(ctx, in, info, handler)
|
312
|
-
}
|
313
|
-
|
314
|
-
func _ECSRelayService_Ping_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
315
|
-
in := new(Signature)
|
316
|
-
if err := dec(in); err != nil {
|
317
|
-
return nil, err
|
318
|
-
}
|
319
|
-
if interceptor == nil {
|
320
|
-
return srv.(ECSRelayServiceServer).Ping(ctx, in)
|
321
|
-
}
|
322
|
-
info := &grpc.UnaryServerInfo{
|
323
|
-
Server: srv,
|
324
|
-
FullMethod: ECSRelayService_Ping_FullMethodName,
|
325
|
-
}
|
326
|
-
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
327
|
-
return srv.(ECSRelayServiceServer).Ping(ctx, req.(*Signature))
|
328
|
-
}
|
329
|
-
return interceptor(ctx, in, info, handler)
|
330
|
-
}
|
331
|
-
|
332
|
-
func _ECSRelayService_CountAuthenticated_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
333
|
-
in := new(CountIdentitiesRequest)
|
334
|
-
if err := dec(in); err != nil {
|
335
|
-
return nil, err
|
336
|
-
}
|
337
|
-
if interceptor == nil {
|
338
|
-
return srv.(ECSRelayServiceServer).CountAuthenticated(ctx, in)
|
339
|
-
}
|
340
|
-
info := &grpc.UnaryServerInfo{
|
341
|
-
Server: srv,
|
342
|
-
FullMethod: ECSRelayService_CountAuthenticated_FullMethodName,
|
343
|
-
}
|
344
|
-
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
345
|
-
return srv.(ECSRelayServiceServer).CountAuthenticated(ctx, req.(*CountIdentitiesRequest))
|
346
|
-
}
|
347
|
-
return interceptor(ctx, in, info, handler)
|
348
|
-
}
|
349
|
-
|
350
|
-
func _ECSRelayService_CountConnected_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
351
|
-
in := new(CountIdentitiesRequest)
|
352
|
-
if err := dec(in); err != nil {
|
353
|
-
return nil, err
|
354
|
-
}
|
355
|
-
if interceptor == nil {
|
356
|
-
return srv.(ECSRelayServiceServer).CountConnected(ctx, in)
|
357
|
-
}
|
358
|
-
info := &grpc.UnaryServerInfo{
|
359
|
-
Server: srv,
|
360
|
-
FullMethod: ECSRelayService_CountConnected_FullMethodName,
|
361
|
-
}
|
362
|
-
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
363
|
-
return srv.(ECSRelayServiceServer).CountConnected(ctx, req.(*CountIdentitiesRequest))
|
364
|
-
}
|
365
|
-
return interceptor(ctx, in, info, handler)
|
366
|
-
}
|
367
|
-
|
368
|
-
func _ECSRelayService_Subscribe_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
369
|
-
in := new(SubscriptionRequest)
|
370
|
-
if err := dec(in); err != nil {
|
371
|
-
return nil, err
|
372
|
-
}
|
373
|
-
if interceptor == nil {
|
374
|
-
return srv.(ECSRelayServiceServer).Subscribe(ctx, in)
|
375
|
-
}
|
376
|
-
info := &grpc.UnaryServerInfo{
|
377
|
-
Server: srv,
|
378
|
-
FullMethod: ECSRelayService_Subscribe_FullMethodName,
|
379
|
-
}
|
380
|
-
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
381
|
-
return srv.(ECSRelayServiceServer).Subscribe(ctx, req.(*SubscriptionRequest))
|
382
|
-
}
|
383
|
-
return interceptor(ctx, in, info, handler)
|
384
|
-
}
|
385
|
-
|
386
|
-
func _ECSRelayService_Unsubscribe_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
387
|
-
in := new(SubscriptionRequest)
|
388
|
-
if err := dec(in); err != nil {
|
389
|
-
return nil, err
|
390
|
-
}
|
391
|
-
if interceptor == nil {
|
392
|
-
return srv.(ECSRelayServiceServer).Unsubscribe(ctx, in)
|
393
|
-
}
|
394
|
-
info := &grpc.UnaryServerInfo{
|
395
|
-
Server: srv,
|
396
|
-
FullMethod: ECSRelayService_Unsubscribe_FullMethodName,
|
397
|
-
}
|
398
|
-
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
399
|
-
return srv.(ECSRelayServiceServer).Unsubscribe(ctx, req.(*SubscriptionRequest))
|
400
|
-
}
|
401
|
-
return interceptor(ctx, in, info, handler)
|
402
|
-
}
|
403
|
-
|
404
|
-
func _ECSRelayService_OpenStream_Handler(srv interface{}, stream grpc.ServerStream) error {
|
405
|
-
m := new(Signature)
|
406
|
-
if err := stream.RecvMsg(m); err != nil {
|
407
|
-
return err
|
408
|
-
}
|
409
|
-
return srv.(ECSRelayServiceServer).OpenStream(m, &eCSRelayServiceOpenStreamServer{stream})
|
410
|
-
}
|
411
|
-
|
412
|
-
type ECSRelayService_OpenStreamServer interface {
|
413
|
-
Send(*Message) error
|
414
|
-
grpc.ServerStream
|
415
|
-
}
|
416
|
-
|
417
|
-
type eCSRelayServiceOpenStreamServer struct {
|
418
|
-
grpc.ServerStream
|
419
|
-
}
|
420
|
-
|
421
|
-
func (x *eCSRelayServiceOpenStreamServer) Send(m *Message) error {
|
422
|
-
return x.ServerStream.SendMsg(m)
|
423
|
-
}
|
424
|
-
|
425
|
-
func _ECSRelayService_PushStream_Handler(srv interface{}, stream grpc.ServerStream) error {
|
426
|
-
return srv.(ECSRelayServiceServer).PushStream(&eCSRelayServicePushStreamServer{stream})
|
427
|
-
}
|
428
|
-
|
429
|
-
type ECSRelayService_PushStreamServer interface {
|
430
|
-
Send(*PushResponse) error
|
431
|
-
Recv() (*PushRequest, error)
|
432
|
-
grpc.ServerStream
|
433
|
-
}
|
434
|
-
|
435
|
-
type eCSRelayServicePushStreamServer struct {
|
436
|
-
grpc.ServerStream
|
437
|
-
}
|
438
|
-
|
439
|
-
func (x *eCSRelayServicePushStreamServer) Send(m *PushResponse) error {
|
440
|
-
return x.ServerStream.SendMsg(m)
|
441
|
-
}
|
442
|
-
|
443
|
-
func (x *eCSRelayServicePushStreamServer) Recv() (*PushRequest, error) {
|
444
|
-
m := new(PushRequest)
|
445
|
-
if err := x.ServerStream.RecvMsg(m); err != nil {
|
446
|
-
return nil, err
|
447
|
-
}
|
448
|
-
return m, nil
|
449
|
-
}
|
450
|
-
|
451
|
-
func _ECSRelayService_Push_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
452
|
-
in := new(PushRequest)
|
453
|
-
if err := dec(in); err != nil {
|
454
|
-
return nil, err
|
455
|
-
}
|
456
|
-
if interceptor == nil {
|
457
|
-
return srv.(ECSRelayServiceServer).Push(ctx, in)
|
458
|
-
}
|
459
|
-
info := &grpc.UnaryServerInfo{
|
460
|
-
Server: srv,
|
461
|
-
FullMethod: ECSRelayService_Push_FullMethodName,
|
462
|
-
}
|
463
|
-
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
464
|
-
return srv.(ECSRelayServiceServer).Push(ctx, req.(*PushRequest))
|
465
|
-
}
|
466
|
-
return interceptor(ctx, in, info, handler)
|
467
|
-
}
|
468
|
-
|
469
|
-
func _ECSRelayService_MinBalanceForPush_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
470
|
-
in := new(BalanceRequest)
|
471
|
-
if err := dec(in); err != nil {
|
472
|
-
return nil, err
|
473
|
-
}
|
474
|
-
if interceptor == nil {
|
475
|
-
return srv.(ECSRelayServiceServer).MinBalanceForPush(ctx, in)
|
476
|
-
}
|
477
|
-
info := &grpc.UnaryServerInfo{
|
478
|
-
Server: srv,
|
479
|
-
FullMethod: ECSRelayService_MinBalanceForPush_FullMethodName,
|
480
|
-
}
|
481
|
-
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
482
|
-
return srv.(ECSRelayServiceServer).MinBalanceForPush(ctx, req.(*BalanceRequest))
|
483
|
-
}
|
484
|
-
return interceptor(ctx, in, info, handler)
|
485
|
-
}
|
486
|
-
|
487
|
-
// ECSRelayService_ServiceDesc is the grpc.ServiceDesc for ECSRelayService service.
|
488
|
-
// It's only intended for direct use with grpc.RegisterService,
|
489
|
-
// and not to be introspected or modified (even as a copy)
|
490
|
-
var ECSRelayService_ServiceDesc = grpc.ServiceDesc{
|
491
|
-
ServiceName: "ecsrelay.ECSRelayService",
|
492
|
-
HandlerType: (*ECSRelayServiceServer)(nil),
|
493
|
-
Methods: []grpc.MethodDesc{
|
494
|
-
{
|
495
|
-
MethodName: "Authenticate",
|
496
|
-
Handler: _ECSRelayService_Authenticate_Handler,
|
497
|
-
},
|
498
|
-
{
|
499
|
-
MethodName: "Revoke",
|
500
|
-
Handler: _ECSRelayService_Revoke_Handler,
|
501
|
-
},
|
502
|
-
{
|
503
|
-
MethodName: "Ping",
|
504
|
-
Handler: _ECSRelayService_Ping_Handler,
|
505
|
-
},
|
506
|
-
{
|
507
|
-
MethodName: "CountAuthenticated",
|
508
|
-
Handler: _ECSRelayService_CountAuthenticated_Handler,
|
509
|
-
},
|
510
|
-
{
|
511
|
-
MethodName: "CountConnected",
|
512
|
-
Handler: _ECSRelayService_CountConnected_Handler,
|
513
|
-
},
|
514
|
-
{
|
515
|
-
MethodName: "Subscribe",
|
516
|
-
Handler: _ECSRelayService_Subscribe_Handler,
|
517
|
-
},
|
518
|
-
{
|
519
|
-
MethodName: "Unsubscribe",
|
520
|
-
Handler: _ECSRelayService_Unsubscribe_Handler,
|
521
|
-
},
|
522
|
-
{
|
523
|
-
MethodName: "Push",
|
524
|
-
Handler: _ECSRelayService_Push_Handler,
|
525
|
-
},
|
526
|
-
{
|
527
|
-
MethodName: "MinBalanceForPush",
|
528
|
-
Handler: _ECSRelayService_MinBalanceForPush_Handler,
|
529
|
-
},
|
530
|
-
},
|
531
|
-
Streams: []grpc.StreamDesc{
|
532
|
-
{
|
533
|
-
StreamName: "OpenStream",
|
534
|
-
Handler: _ECSRelayService_OpenStream_Handler,
|
535
|
-
ServerStreams: true,
|
536
|
-
},
|
537
|
-
{
|
538
|
-
StreamName: "PushStream",
|
539
|
-
Handler: _ECSRelayService_PushStream_Handler,
|
540
|
-
ServerStreams: true,
|
541
|
-
ClientStreams: true,
|
542
|
-
},
|
543
|
-
},
|
544
|
-
Metadata: "proto/ecs-relay.proto",
|
545
|
-
}
|