@latticexyz/services 1.42.0 → 1.43.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.
@@ -1,276 +0,0 @@
1
- // Code generated by protoc-gen-go-grpc. DO NOT EDIT.
2
- // versions:
3
- // - protoc-gen-go-grpc v1.2.0
4
- // - protoc v3.21.3
5
- // source: proto/mode.proto
6
-
7
- package mode
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
- // QueryLayerClient is the client API for QueryLayer service.
22
- //
23
- // 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.
24
- type QueryLayerClient interface {
25
- // Get state endpoint.
26
- GetState(ctx context.Context, in *StateRequest, opts ...grpc.CallOption) (*QueryLayerStateResponse, error)
27
- // Stream state endpoint.
28
- StreamState(ctx context.Context, in *StateRequest, opts ...grpc.CallOption) (QueryLayer_StreamStateClient, error)
29
- // Get state from single table endpoint.
30
- Single__GetState(ctx context.Context, in *Single__StateRequest, opts ...grpc.CallOption) (*QueryLayerStateResponse, error)
31
- // Stream state from single table endpoint.
32
- Single__StreamState(ctx context.Context, in *Single__StateRequest, opts ...grpc.CallOption) (QueryLayer_Single__StreamStateClient, error)
33
- }
34
-
35
- type queryLayerClient struct {
36
- cc grpc.ClientConnInterface
37
- }
38
-
39
- func NewQueryLayerClient(cc grpc.ClientConnInterface) QueryLayerClient {
40
- return &queryLayerClient{cc}
41
- }
42
-
43
- func (c *queryLayerClient) GetState(ctx context.Context, in *StateRequest, opts ...grpc.CallOption) (*QueryLayerStateResponse, error) {
44
- out := new(QueryLayerStateResponse)
45
- err := c.cc.Invoke(ctx, "/mode.QueryLayer/GetState", in, out, opts...)
46
- if err != nil {
47
- return nil, err
48
- }
49
- return out, nil
50
- }
51
-
52
- func (c *queryLayerClient) StreamState(ctx context.Context, in *StateRequest, opts ...grpc.CallOption) (QueryLayer_StreamStateClient, error) {
53
- stream, err := c.cc.NewStream(ctx, &QueryLayer_ServiceDesc.Streams[0], "/mode.QueryLayer/StreamState", opts...)
54
- if err != nil {
55
- return nil, err
56
- }
57
- x := &queryLayerStreamStateClient{stream}
58
- if err := x.ClientStream.SendMsg(in); err != nil {
59
- return nil, err
60
- }
61
- if err := x.ClientStream.CloseSend(); err != nil {
62
- return nil, err
63
- }
64
- return x, nil
65
- }
66
-
67
- type QueryLayer_StreamStateClient interface {
68
- Recv() (*QueryLayerStateStreamResponse, error)
69
- grpc.ClientStream
70
- }
71
-
72
- type queryLayerStreamStateClient struct {
73
- grpc.ClientStream
74
- }
75
-
76
- func (x *queryLayerStreamStateClient) Recv() (*QueryLayerStateStreamResponse, error) {
77
- m := new(QueryLayerStateStreamResponse)
78
- if err := x.ClientStream.RecvMsg(m); err != nil {
79
- return nil, err
80
- }
81
- return m, nil
82
- }
83
-
84
- func (c *queryLayerClient) Single__GetState(ctx context.Context, in *Single__StateRequest, opts ...grpc.CallOption) (*QueryLayerStateResponse, error) {
85
- out := new(QueryLayerStateResponse)
86
- err := c.cc.Invoke(ctx, "/mode.QueryLayer/Single__GetState", in, out, opts...)
87
- if err != nil {
88
- return nil, err
89
- }
90
- return out, nil
91
- }
92
-
93
- func (c *queryLayerClient) Single__StreamState(ctx context.Context, in *Single__StateRequest, opts ...grpc.CallOption) (QueryLayer_Single__StreamStateClient, error) {
94
- stream, err := c.cc.NewStream(ctx, &QueryLayer_ServiceDesc.Streams[1], "/mode.QueryLayer/Single__StreamState", opts...)
95
- if err != nil {
96
- return nil, err
97
- }
98
- x := &queryLayerSingle__StreamStateClient{stream}
99
- if err := x.ClientStream.SendMsg(in); err != nil {
100
- return nil, err
101
- }
102
- if err := x.ClientStream.CloseSend(); err != nil {
103
- return nil, err
104
- }
105
- return x, nil
106
- }
107
-
108
- type QueryLayer_Single__StreamStateClient interface {
109
- Recv() (*QueryLayerStateStreamResponse, error)
110
- grpc.ClientStream
111
- }
112
-
113
- type queryLayerSingle__StreamStateClient struct {
114
- grpc.ClientStream
115
- }
116
-
117
- func (x *queryLayerSingle__StreamStateClient) Recv() (*QueryLayerStateStreamResponse, error) {
118
- m := new(QueryLayerStateStreamResponse)
119
- if err := x.ClientStream.RecvMsg(m); err != nil {
120
- return nil, err
121
- }
122
- return m, nil
123
- }
124
-
125
- // QueryLayerServer is the server API for QueryLayer service.
126
- // All implementations must embed UnimplementedQueryLayerServer
127
- // for forward compatibility
128
- type QueryLayerServer interface {
129
- // Get state endpoint.
130
- GetState(context.Context, *StateRequest) (*QueryLayerStateResponse, error)
131
- // Stream state endpoint.
132
- StreamState(*StateRequest, QueryLayer_StreamStateServer) error
133
- // Get state from single table endpoint.
134
- Single__GetState(context.Context, *Single__StateRequest) (*QueryLayerStateResponse, error)
135
- // Stream state from single table endpoint.
136
- Single__StreamState(*Single__StateRequest, QueryLayer_Single__StreamStateServer) error
137
- mustEmbedUnimplementedQueryLayerServer()
138
- }
139
-
140
- // UnimplementedQueryLayerServer must be embedded to have forward compatible implementations.
141
- type UnimplementedQueryLayerServer struct {
142
- }
143
-
144
- func (UnimplementedQueryLayerServer) GetState(context.Context, *StateRequest) (*QueryLayerStateResponse, error) {
145
- return nil, status.Errorf(codes.Unimplemented, "method GetState not implemented")
146
- }
147
- func (UnimplementedQueryLayerServer) StreamState(*StateRequest, QueryLayer_StreamStateServer) error {
148
- return status.Errorf(codes.Unimplemented, "method StreamState not implemented")
149
- }
150
- func (UnimplementedQueryLayerServer) Single__GetState(context.Context, *Single__StateRequest) (*QueryLayerStateResponse, error) {
151
- return nil, status.Errorf(codes.Unimplemented, "method Single__GetState not implemented")
152
- }
153
- func (UnimplementedQueryLayerServer) Single__StreamState(*Single__StateRequest, QueryLayer_Single__StreamStateServer) error {
154
- return status.Errorf(codes.Unimplemented, "method Single__StreamState not implemented")
155
- }
156
- func (UnimplementedQueryLayerServer) mustEmbedUnimplementedQueryLayerServer() {}
157
-
158
- // UnsafeQueryLayerServer may be embedded to opt out of forward compatibility for this service.
159
- // Use of this interface is not recommended, as added methods to QueryLayerServer will
160
- // result in compilation errors.
161
- type UnsafeQueryLayerServer interface {
162
- mustEmbedUnimplementedQueryLayerServer()
163
- }
164
-
165
- func RegisterQueryLayerServer(s grpc.ServiceRegistrar, srv QueryLayerServer) {
166
- s.RegisterService(&QueryLayer_ServiceDesc, srv)
167
- }
168
-
169
- func _QueryLayer_GetState_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
170
- in := new(StateRequest)
171
- if err := dec(in); err != nil {
172
- return nil, err
173
- }
174
- if interceptor == nil {
175
- return srv.(QueryLayerServer).GetState(ctx, in)
176
- }
177
- info := &grpc.UnaryServerInfo{
178
- Server: srv,
179
- FullMethod: "/mode.QueryLayer/GetState",
180
- }
181
- handler := func(ctx context.Context, req interface{}) (interface{}, error) {
182
- return srv.(QueryLayerServer).GetState(ctx, req.(*StateRequest))
183
- }
184
- return interceptor(ctx, in, info, handler)
185
- }
186
-
187
- func _QueryLayer_StreamState_Handler(srv interface{}, stream grpc.ServerStream) error {
188
- m := new(StateRequest)
189
- if err := stream.RecvMsg(m); err != nil {
190
- return err
191
- }
192
- return srv.(QueryLayerServer).StreamState(m, &queryLayerStreamStateServer{stream})
193
- }
194
-
195
- type QueryLayer_StreamStateServer interface {
196
- Send(*QueryLayerStateStreamResponse) error
197
- grpc.ServerStream
198
- }
199
-
200
- type queryLayerStreamStateServer struct {
201
- grpc.ServerStream
202
- }
203
-
204
- func (x *queryLayerStreamStateServer) Send(m *QueryLayerStateStreamResponse) error {
205
- return x.ServerStream.SendMsg(m)
206
- }
207
-
208
- func _QueryLayer_Single__GetState_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
209
- in := new(Single__StateRequest)
210
- if err := dec(in); err != nil {
211
- return nil, err
212
- }
213
- if interceptor == nil {
214
- return srv.(QueryLayerServer).Single__GetState(ctx, in)
215
- }
216
- info := &grpc.UnaryServerInfo{
217
- Server: srv,
218
- FullMethod: "/mode.QueryLayer/Single__GetState",
219
- }
220
- handler := func(ctx context.Context, req interface{}) (interface{}, error) {
221
- return srv.(QueryLayerServer).Single__GetState(ctx, req.(*Single__StateRequest))
222
- }
223
- return interceptor(ctx, in, info, handler)
224
- }
225
-
226
- func _QueryLayer_Single__StreamState_Handler(srv interface{}, stream grpc.ServerStream) error {
227
- m := new(Single__StateRequest)
228
- if err := stream.RecvMsg(m); err != nil {
229
- return err
230
- }
231
- return srv.(QueryLayerServer).Single__StreamState(m, &queryLayerSingle__StreamStateServer{stream})
232
- }
233
-
234
- type QueryLayer_Single__StreamStateServer interface {
235
- Send(*QueryLayerStateStreamResponse) error
236
- grpc.ServerStream
237
- }
238
-
239
- type queryLayerSingle__StreamStateServer struct {
240
- grpc.ServerStream
241
- }
242
-
243
- func (x *queryLayerSingle__StreamStateServer) Send(m *QueryLayerStateStreamResponse) error {
244
- return x.ServerStream.SendMsg(m)
245
- }
246
-
247
- // QueryLayer_ServiceDesc is the grpc.ServiceDesc for QueryLayer service.
248
- // It's only intended for direct use with grpc.RegisterService,
249
- // and not to be introspected or modified (even as a copy)
250
- var QueryLayer_ServiceDesc = grpc.ServiceDesc{
251
- ServiceName: "mode.QueryLayer",
252
- HandlerType: (*QueryLayerServer)(nil),
253
- Methods: []grpc.MethodDesc{
254
- {
255
- MethodName: "GetState",
256
- Handler: _QueryLayer_GetState_Handler,
257
- },
258
- {
259
- MethodName: "Single__GetState",
260
- Handler: _QueryLayer_Single__GetState_Handler,
261
- },
262
- },
263
- Streams: []grpc.StreamDesc{
264
- {
265
- StreamName: "StreamState",
266
- Handler: _QueryLayer_StreamState_Handler,
267
- ServerStreams: true,
268
- },
269
- {
270
- StreamName: "Single__StreamState",
271
- Handler: _QueryLayer_Single__StreamState_Handler,
272
- ServerStreams: true,
273
- },
274
- },
275
- Metadata: "proto/mode.proto",
276
- }