1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
|
// Code generated by protoc-gen-connect-go. DO NOT EDIT.
//
// Source: nostr/v1/nostr.proto
package nostrv1connect
import (
connect "connectrpc.com/connect"
context "context"
errors "errors"
http "net/http"
v1 "northwest.io/nostr-grpc/api/nostr/v1"
strings "strings"
)
// This is a compile-time assertion to ensure that this generated file and the connect package are
// compatible. If you get a compiler error that this constant is not defined, this code was
// generated with a version of connect newer than the one compiled into your binary. You can fix the
// problem by either regenerating this code with an older version of connect or updating the connect
// version compiled into your binary.
const _ = connect.IsAtLeastVersion1_13_0
const (
// NostrRelayName is the fully-qualified name of the NostrRelay service.
NostrRelayName = "nostr.v1.NostrRelay"
// RelayAdminName is the fully-qualified name of the RelayAdmin service.
RelayAdminName = "nostr.v1.RelayAdmin"
)
// These constants are the fully-qualified names of the RPCs defined in this package. They're
// exposed at runtime as Spec.Procedure and as the final two segments of the HTTP route.
//
// Note that these are different from the fully-qualified method names used by
// google.golang.org/protobuf/reflect/protoreflect. To convert from these constants to
// reflection-formatted method names, remove the leading slash and convert the remaining slash to a
// period.
const (
// NostrRelayPublishEventProcedure is the fully-qualified name of the NostrRelay's PublishEvent RPC.
NostrRelayPublishEventProcedure = "/nostr.v1.NostrRelay/PublishEvent"
// NostrRelaySubscribeProcedure is the fully-qualified name of the NostrRelay's Subscribe RPC.
NostrRelaySubscribeProcedure = "/nostr.v1.NostrRelay/Subscribe"
// NostrRelayUnsubscribeProcedure is the fully-qualified name of the NostrRelay's Unsubscribe RPC.
NostrRelayUnsubscribeProcedure = "/nostr.v1.NostrRelay/Unsubscribe"
// NostrRelayPublishBatchProcedure is the fully-qualified name of the NostrRelay's PublishBatch RPC.
NostrRelayPublishBatchProcedure = "/nostr.v1.NostrRelay/PublishBatch"
// NostrRelayQueryEventsProcedure is the fully-qualified name of the NostrRelay's QueryEvents RPC.
NostrRelayQueryEventsProcedure = "/nostr.v1.NostrRelay/QueryEvents"
// NostrRelayCountEventsProcedure is the fully-qualified name of the NostrRelay's CountEvents RPC.
NostrRelayCountEventsProcedure = "/nostr.v1.NostrRelay/CountEvents"
// RelayAdminGetStatsProcedure is the fully-qualified name of the RelayAdmin's GetStats RPC.
RelayAdminGetStatsProcedure = "/nostr.v1.RelayAdmin/GetStats"
// RelayAdminGetConnectionsProcedure is the fully-qualified name of the RelayAdmin's GetConnections
// RPC.
RelayAdminGetConnectionsProcedure = "/nostr.v1.RelayAdmin/GetConnections"
// RelayAdminBanPublicKeyProcedure is the fully-qualified name of the RelayAdmin's BanPublicKey RPC.
RelayAdminBanPublicKeyProcedure = "/nostr.v1.RelayAdmin/BanPublicKey"
// RelayAdminGetStorageInfoProcedure is the fully-qualified name of the RelayAdmin's GetStorageInfo
// RPC.
RelayAdminGetStorageInfoProcedure = "/nostr.v1.RelayAdmin/GetStorageInfo"
)
// NostrRelayClient is a client for the nostr.v1.NostrRelay service.
type NostrRelayClient interface {
// Publish a single event
PublishEvent(context.Context, *connect.Request[v1.PublishEventRequest]) (*connect.Response[v1.PublishEventResponse], error)
// Subscribe to events matching filters (streaming)
Subscribe(context.Context, *connect.Request[v1.SubscribeRequest]) (*connect.ServerStreamForClient[v1.Event], error)
// Unsubscribe from an active subscription
Unsubscribe(context.Context, *connect.Request[v1.UnsubscribeRequest]) (*connect.Response[v1.Empty], error)
// gRPC-specific: batch publish
PublishBatch(context.Context, *connect.Request[v1.PublishBatchRequest]) (*connect.Response[v1.PublishBatchResponse], error)
// gRPC-specific: paginated query (non-streaming)
QueryEvents(context.Context, *connect.Request[v1.QueryRequest]) (*connect.Response[v1.QueryResponse], error)
// Event counts (NIP-45)
CountEvents(context.Context, *connect.Request[v1.CountRequest]) (*connect.Response[v1.CountResponse], error)
}
// NewNostrRelayClient constructs a client for the nostr.v1.NostrRelay service. By default, it uses
// the Connect protocol with the binary Protobuf Codec, asks for gzipped responses, and sends
// uncompressed requests. To use the gRPC or gRPC-Web protocols, supply the connect.WithGRPC() or
// connect.WithGRPCWeb() options.
//
// The URL supplied here should be the base URL for the Connect or gRPC server (for example,
// http://api.acme.com or https://acme.com/grpc).
func NewNostrRelayClient(httpClient connect.HTTPClient, baseURL string, opts ...connect.ClientOption) NostrRelayClient {
baseURL = strings.TrimRight(baseURL, "/")
nostrRelayMethods := v1.File_nostr_v1_nostr_proto.Services().ByName("NostrRelay").Methods()
return &nostrRelayClient{
publishEvent: connect.NewClient[v1.PublishEventRequest, v1.PublishEventResponse](
httpClient,
baseURL+NostrRelayPublishEventProcedure,
connect.WithSchema(nostrRelayMethods.ByName("PublishEvent")),
connect.WithClientOptions(opts...),
),
subscribe: connect.NewClient[v1.SubscribeRequest, v1.Event](
httpClient,
baseURL+NostrRelaySubscribeProcedure,
connect.WithSchema(nostrRelayMethods.ByName("Subscribe")),
connect.WithClientOptions(opts...),
),
unsubscribe: connect.NewClient[v1.UnsubscribeRequest, v1.Empty](
httpClient,
baseURL+NostrRelayUnsubscribeProcedure,
connect.WithSchema(nostrRelayMethods.ByName("Unsubscribe")),
connect.WithClientOptions(opts...),
),
publishBatch: connect.NewClient[v1.PublishBatchRequest, v1.PublishBatchResponse](
httpClient,
baseURL+NostrRelayPublishBatchProcedure,
connect.WithSchema(nostrRelayMethods.ByName("PublishBatch")),
connect.WithClientOptions(opts...),
),
queryEvents: connect.NewClient[v1.QueryRequest, v1.QueryResponse](
httpClient,
baseURL+NostrRelayQueryEventsProcedure,
connect.WithSchema(nostrRelayMethods.ByName("QueryEvents")),
connect.WithClientOptions(opts...),
),
countEvents: connect.NewClient[v1.CountRequest, v1.CountResponse](
httpClient,
baseURL+NostrRelayCountEventsProcedure,
connect.WithSchema(nostrRelayMethods.ByName("CountEvents")),
connect.WithClientOptions(opts...),
),
}
}
// nostrRelayClient implements NostrRelayClient.
type nostrRelayClient struct {
publishEvent *connect.Client[v1.PublishEventRequest, v1.PublishEventResponse]
subscribe *connect.Client[v1.SubscribeRequest, v1.Event]
unsubscribe *connect.Client[v1.UnsubscribeRequest, v1.Empty]
publishBatch *connect.Client[v1.PublishBatchRequest, v1.PublishBatchResponse]
queryEvents *connect.Client[v1.QueryRequest, v1.QueryResponse]
countEvents *connect.Client[v1.CountRequest, v1.CountResponse]
}
// PublishEvent calls nostr.v1.NostrRelay.PublishEvent.
func (c *nostrRelayClient) PublishEvent(ctx context.Context, req *connect.Request[v1.PublishEventRequest]) (*connect.Response[v1.PublishEventResponse], error) {
return c.publishEvent.CallUnary(ctx, req)
}
// Subscribe calls nostr.v1.NostrRelay.Subscribe.
func (c *nostrRelayClient) Subscribe(ctx context.Context, req *connect.Request[v1.SubscribeRequest]) (*connect.ServerStreamForClient[v1.Event], error) {
return c.subscribe.CallServerStream(ctx, req)
}
// Unsubscribe calls nostr.v1.NostrRelay.Unsubscribe.
func (c *nostrRelayClient) Unsubscribe(ctx context.Context, req *connect.Request[v1.UnsubscribeRequest]) (*connect.Response[v1.Empty], error) {
return c.unsubscribe.CallUnary(ctx, req)
}
// PublishBatch calls nostr.v1.NostrRelay.PublishBatch.
func (c *nostrRelayClient) PublishBatch(ctx context.Context, req *connect.Request[v1.PublishBatchRequest]) (*connect.Response[v1.PublishBatchResponse], error) {
return c.publishBatch.CallUnary(ctx, req)
}
// QueryEvents calls nostr.v1.NostrRelay.QueryEvents.
func (c *nostrRelayClient) QueryEvents(ctx context.Context, req *connect.Request[v1.QueryRequest]) (*connect.Response[v1.QueryResponse], error) {
return c.queryEvents.CallUnary(ctx, req)
}
// CountEvents calls nostr.v1.NostrRelay.CountEvents.
func (c *nostrRelayClient) CountEvents(ctx context.Context, req *connect.Request[v1.CountRequest]) (*connect.Response[v1.CountResponse], error) {
return c.countEvents.CallUnary(ctx, req)
}
// NostrRelayHandler is an implementation of the nostr.v1.NostrRelay service.
type NostrRelayHandler interface {
// Publish a single event
PublishEvent(context.Context, *connect.Request[v1.PublishEventRequest]) (*connect.Response[v1.PublishEventResponse], error)
// Subscribe to events matching filters (streaming)
Subscribe(context.Context, *connect.Request[v1.SubscribeRequest], *connect.ServerStream[v1.Event]) error
// Unsubscribe from an active subscription
Unsubscribe(context.Context, *connect.Request[v1.UnsubscribeRequest]) (*connect.Response[v1.Empty], error)
// gRPC-specific: batch publish
PublishBatch(context.Context, *connect.Request[v1.PublishBatchRequest]) (*connect.Response[v1.PublishBatchResponse], error)
// gRPC-specific: paginated query (non-streaming)
QueryEvents(context.Context, *connect.Request[v1.QueryRequest]) (*connect.Response[v1.QueryResponse], error)
// Event counts (NIP-45)
CountEvents(context.Context, *connect.Request[v1.CountRequest]) (*connect.Response[v1.CountResponse], error)
}
// NewNostrRelayHandler builds an HTTP handler from the service implementation. It returns the path
// on which to mount the handler and the handler itself.
//
// By default, handlers support the Connect, gRPC, and gRPC-Web protocols with the binary Protobuf
// and JSON codecs. They also support gzip compression.
func NewNostrRelayHandler(svc NostrRelayHandler, opts ...connect.HandlerOption) (string, http.Handler) {
nostrRelayMethods := v1.File_nostr_v1_nostr_proto.Services().ByName("NostrRelay").Methods()
nostrRelayPublishEventHandler := connect.NewUnaryHandler(
NostrRelayPublishEventProcedure,
svc.PublishEvent,
connect.WithSchema(nostrRelayMethods.ByName("PublishEvent")),
connect.WithHandlerOptions(opts...),
)
nostrRelaySubscribeHandler := connect.NewServerStreamHandler(
NostrRelaySubscribeProcedure,
svc.Subscribe,
connect.WithSchema(nostrRelayMethods.ByName("Subscribe")),
connect.WithHandlerOptions(opts...),
)
nostrRelayUnsubscribeHandler := connect.NewUnaryHandler(
NostrRelayUnsubscribeProcedure,
svc.Unsubscribe,
connect.WithSchema(nostrRelayMethods.ByName("Unsubscribe")),
connect.WithHandlerOptions(opts...),
)
nostrRelayPublishBatchHandler := connect.NewUnaryHandler(
NostrRelayPublishBatchProcedure,
svc.PublishBatch,
connect.WithSchema(nostrRelayMethods.ByName("PublishBatch")),
connect.WithHandlerOptions(opts...),
)
nostrRelayQueryEventsHandler := connect.NewUnaryHandler(
NostrRelayQueryEventsProcedure,
svc.QueryEvents,
connect.WithSchema(nostrRelayMethods.ByName("QueryEvents")),
connect.WithHandlerOptions(opts...),
)
nostrRelayCountEventsHandler := connect.NewUnaryHandler(
NostrRelayCountEventsProcedure,
svc.CountEvents,
connect.WithSchema(nostrRelayMethods.ByName("CountEvents")),
connect.WithHandlerOptions(opts...),
)
return "/nostr.v1.NostrRelay/", http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {
switch r.URL.Path {
case NostrRelayPublishEventProcedure:
nostrRelayPublishEventHandler.ServeHTTP(w, r)
case NostrRelaySubscribeProcedure:
nostrRelaySubscribeHandler.ServeHTTP(w, r)
case NostrRelayUnsubscribeProcedure:
nostrRelayUnsubscribeHandler.ServeHTTP(w, r)
case NostrRelayPublishBatchProcedure:
nostrRelayPublishBatchHandler.ServeHTTP(w, r)
case NostrRelayQueryEventsProcedure:
nostrRelayQueryEventsHandler.ServeHTTP(w, r)
case NostrRelayCountEventsProcedure:
nostrRelayCountEventsHandler.ServeHTTP(w, r)
default:
http.NotFound(w, r)
}
})
}
// UnimplementedNostrRelayHandler returns CodeUnimplemented from all methods.
type UnimplementedNostrRelayHandler struct{}
func (UnimplementedNostrRelayHandler) PublishEvent(context.Context, *connect.Request[v1.PublishEventRequest]) (*connect.Response[v1.PublishEventResponse], error) {
return nil, connect.NewError(connect.CodeUnimplemented, errors.New("nostr.v1.NostrRelay.PublishEvent is not implemented"))
}
func (UnimplementedNostrRelayHandler) Subscribe(context.Context, *connect.Request[v1.SubscribeRequest], *connect.ServerStream[v1.Event]) error {
return connect.NewError(connect.CodeUnimplemented, errors.New("nostr.v1.NostrRelay.Subscribe is not implemented"))
}
func (UnimplementedNostrRelayHandler) Unsubscribe(context.Context, *connect.Request[v1.UnsubscribeRequest]) (*connect.Response[v1.Empty], error) {
return nil, connect.NewError(connect.CodeUnimplemented, errors.New("nostr.v1.NostrRelay.Unsubscribe is not implemented"))
}
func (UnimplementedNostrRelayHandler) PublishBatch(context.Context, *connect.Request[v1.PublishBatchRequest]) (*connect.Response[v1.PublishBatchResponse], error) {
return nil, connect.NewError(connect.CodeUnimplemented, errors.New("nostr.v1.NostrRelay.PublishBatch is not implemented"))
}
func (UnimplementedNostrRelayHandler) QueryEvents(context.Context, *connect.Request[v1.QueryRequest]) (*connect.Response[v1.QueryResponse], error) {
return nil, connect.NewError(connect.CodeUnimplemented, errors.New("nostr.v1.NostrRelay.QueryEvents is not implemented"))
}
func (UnimplementedNostrRelayHandler) CountEvents(context.Context, *connect.Request[v1.CountRequest]) (*connect.Response[v1.CountResponse], error) {
return nil, connect.NewError(connect.CodeUnimplemented, errors.New("nostr.v1.NostrRelay.CountEvents is not implemented"))
}
// RelayAdminClient is a client for the nostr.v1.RelayAdmin service.
type RelayAdminClient interface {
GetStats(context.Context, *connect.Request[v1.Empty]) (*connect.Response[v1.RelayStats], error)
GetConnections(context.Context, *connect.Request[v1.Empty]) (*connect.Response[v1.ConnectionList], error)
BanPublicKey(context.Context, *connect.Request[v1.BanRequest]) (*connect.Response[v1.Empty], error)
GetStorageInfo(context.Context, *connect.Request[v1.Empty]) (*connect.Response[v1.StorageStats], error)
}
// NewRelayAdminClient constructs a client for the nostr.v1.RelayAdmin service. By default, it uses
// the Connect protocol with the binary Protobuf Codec, asks for gzipped responses, and sends
// uncompressed requests. To use the gRPC or gRPC-Web protocols, supply the connect.WithGRPC() or
// connect.WithGRPCWeb() options.
//
// The URL supplied here should be the base URL for the Connect or gRPC server (for example,
// http://api.acme.com or https://acme.com/grpc).
func NewRelayAdminClient(httpClient connect.HTTPClient, baseURL string, opts ...connect.ClientOption) RelayAdminClient {
baseURL = strings.TrimRight(baseURL, "/")
relayAdminMethods := v1.File_nostr_v1_nostr_proto.Services().ByName("RelayAdmin").Methods()
return &relayAdminClient{
getStats: connect.NewClient[v1.Empty, v1.RelayStats](
httpClient,
baseURL+RelayAdminGetStatsProcedure,
connect.WithSchema(relayAdminMethods.ByName("GetStats")),
connect.WithClientOptions(opts...),
),
getConnections: connect.NewClient[v1.Empty, v1.ConnectionList](
httpClient,
baseURL+RelayAdminGetConnectionsProcedure,
connect.WithSchema(relayAdminMethods.ByName("GetConnections")),
connect.WithClientOptions(opts...),
),
banPublicKey: connect.NewClient[v1.BanRequest, v1.Empty](
httpClient,
baseURL+RelayAdminBanPublicKeyProcedure,
connect.WithSchema(relayAdminMethods.ByName("BanPublicKey")),
connect.WithClientOptions(opts...),
),
getStorageInfo: connect.NewClient[v1.Empty, v1.StorageStats](
httpClient,
baseURL+RelayAdminGetStorageInfoProcedure,
connect.WithSchema(relayAdminMethods.ByName("GetStorageInfo")),
connect.WithClientOptions(opts...),
),
}
}
// relayAdminClient implements RelayAdminClient.
type relayAdminClient struct {
getStats *connect.Client[v1.Empty, v1.RelayStats]
getConnections *connect.Client[v1.Empty, v1.ConnectionList]
banPublicKey *connect.Client[v1.BanRequest, v1.Empty]
getStorageInfo *connect.Client[v1.Empty, v1.StorageStats]
}
// GetStats calls nostr.v1.RelayAdmin.GetStats.
func (c *relayAdminClient) GetStats(ctx context.Context, req *connect.Request[v1.Empty]) (*connect.Response[v1.RelayStats], error) {
return c.getStats.CallUnary(ctx, req)
}
// GetConnections calls nostr.v1.RelayAdmin.GetConnections.
func (c *relayAdminClient) GetConnections(ctx context.Context, req *connect.Request[v1.Empty]) (*connect.Response[v1.ConnectionList], error) {
return c.getConnections.CallUnary(ctx, req)
}
// BanPublicKey calls nostr.v1.RelayAdmin.BanPublicKey.
func (c *relayAdminClient) BanPublicKey(ctx context.Context, req *connect.Request[v1.BanRequest]) (*connect.Response[v1.Empty], error) {
return c.banPublicKey.CallUnary(ctx, req)
}
// GetStorageInfo calls nostr.v1.RelayAdmin.GetStorageInfo.
func (c *relayAdminClient) GetStorageInfo(ctx context.Context, req *connect.Request[v1.Empty]) (*connect.Response[v1.StorageStats], error) {
return c.getStorageInfo.CallUnary(ctx, req)
}
// RelayAdminHandler is an implementation of the nostr.v1.RelayAdmin service.
type RelayAdminHandler interface {
GetStats(context.Context, *connect.Request[v1.Empty]) (*connect.Response[v1.RelayStats], error)
GetConnections(context.Context, *connect.Request[v1.Empty]) (*connect.Response[v1.ConnectionList], error)
BanPublicKey(context.Context, *connect.Request[v1.BanRequest]) (*connect.Response[v1.Empty], error)
GetStorageInfo(context.Context, *connect.Request[v1.Empty]) (*connect.Response[v1.StorageStats], error)
}
// NewRelayAdminHandler builds an HTTP handler from the service implementation. It returns the path
// on which to mount the handler and the handler itself.
//
// By default, handlers support the Connect, gRPC, and gRPC-Web protocols with the binary Protobuf
// and JSON codecs. They also support gzip compression.
func NewRelayAdminHandler(svc RelayAdminHandler, opts ...connect.HandlerOption) (string, http.Handler) {
relayAdminMethods := v1.File_nostr_v1_nostr_proto.Services().ByName("RelayAdmin").Methods()
relayAdminGetStatsHandler := connect.NewUnaryHandler(
RelayAdminGetStatsProcedure,
svc.GetStats,
connect.WithSchema(relayAdminMethods.ByName("GetStats")),
connect.WithHandlerOptions(opts...),
)
relayAdminGetConnectionsHandler := connect.NewUnaryHandler(
RelayAdminGetConnectionsProcedure,
svc.GetConnections,
connect.WithSchema(relayAdminMethods.ByName("GetConnections")),
connect.WithHandlerOptions(opts...),
)
relayAdminBanPublicKeyHandler := connect.NewUnaryHandler(
RelayAdminBanPublicKeyProcedure,
svc.BanPublicKey,
connect.WithSchema(relayAdminMethods.ByName("BanPublicKey")),
connect.WithHandlerOptions(opts...),
)
relayAdminGetStorageInfoHandler := connect.NewUnaryHandler(
RelayAdminGetStorageInfoProcedure,
svc.GetStorageInfo,
connect.WithSchema(relayAdminMethods.ByName("GetStorageInfo")),
connect.WithHandlerOptions(opts...),
)
return "/nostr.v1.RelayAdmin/", http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {
switch r.URL.Path {
case RelayAdminGetStatsProcedure:
relayAdminGetStatsHandler.ServeHTTP(w, r)
case RelayAdminGetConnectionsProcedure:
relayAdminGetConnectionsHandler.ServeHTTP(w, r)
case RelayAdminBanPublicKeyProcedure:
relayAdminBanPublicKeyHandler.ServeHTTP(w, r)
case RelayAdminGetStorageInfoProcedure:
relayAdminGetStorageInfoHandler.ServeHTTP(w, r)
default:
http.NotFound(w, r)
}
})
}
// UnimplementedRelayAdminHandler returns CodeUnimplemented from all methods.
type UnimplementedRelayAdminHandler struct{}
func (UnimplementedRelayAdminHandler) GetStats(context.Context, *connect.Request[v1.Empty]) (*connect.Response[v1.RelayStats], error) {
return nil, connect.NewError(connect.CodeUnimplemented, errors.New("nostr.v1.RelayAdmin.GetStats is not implemented"))
}
func (UnimplementedRelayAdminHandler) GetConnections(context.Context, *connect.Request[v1.Empty]) (*connect.Response[v1.ConnectionList], error) {
return nil, connect.NewError(connect.CodeUnimplemented, errors.New("nostr.v1.RelayAdmin.GetConnections is not implemented"))
}
func (UnimplementedRelayAdminHandler) BanPublicKey(context.Context, *connect.Request[v1.BanRequest]) (*connect.Response[v1.Empty], error) {
return nil, connect.NewError(connect.CodeUnimplemented, errors.New("nostr.v1.RelayAdmin.BanPublicKey is not implemented"))
}
func (UnimplementedRelayAdminHandler) GetStorageInfo(context.Context, *connect.Request[v1.Empty]) (*connect.Response[v1.StorageStats], error) {
return nil, connect.NewError(connect.CodeUnimplemented, errors.New("nostr.v1.RelayAdmin.GetStorageInfo is not implemented"))
}
|