v0.14.0 f9976e7

mirror.connect.go RawHistoryFolder

1// SPDX-License-Identifier: MIT
2
3// Code generated by protoc-gen-connect-go. DO NOT EDIT.
4//
5// Source: ermite/mirror.proto
6
7package ermiteconnect
8
9import (
10	ermite "bnema.dev/ermite-api/gen/ermite"
11	connect "connectrpc.com/connect"
12	context "context"
13	errors "errors"
14	http "net/http"
15	strings "strings"
16)
17
18// This is a compile-time assertion to ensure that this generated file and the connect package are
19// compatible. If you get a compiler error that this constant is not defined, this code was
20// generated with a version of connect newer than the one compiled into your binary. You can fix the
21// problem by either regenerating this code with an older version of connect or updating the connect
22// version compiled into your binary.
23const _ = connect.IsAtLeastVersion1_13_0
24
25const (
26	// MirrorServiceName is the fully-qualified name of the MirrorService service.
27	MirrorServiceName = "ermite.MirrorService"
28)
29
30// These constants are the fully-qualified names of the RPCs defined in this package. They're
31// exposed at runtime as Spec.Procedure and as the final two segments of the HTTP route.
32//
33// Note that these are different from the fully-qualified method names used by
34// google.golang.org/protobuf/reflect/protoreflect. To convert from these constants to
35// reflection-formatted method names, remove the leading slash and convert the remaining slash to a
36// period.
37const (
38	// MirrorServiceGetMirrorKeyProcedure is the fully-qualified name of the MirrorService's
39	// GetMirrorKey RPC.
40	MirrorServiceGetMirrorKeyProcedure = "/ermite.MirrorService/GetMirrorKey"
41	// MirrorServiceRotateMirrorKeyProcedure is the fully-qualified name of the MirrorService's
42	// RotateMirrorKey RPC.
43	MirrorServiceRotateMirrorKeyProcedure = "/ermite.MirrorService/RotateMirrorKey"
44	// MirrorServiceGetMirrorConfigProcedure is the fully-qualified name of the MirrorService's
45	// GetMirrorConfig RPC.
46	MirrorServiceGetMirrorConfigProcedure = "/ermite.MirrorService/GetMirrorConfig"
47	// MirrorServiceSetMirrorConfigProcedure is the fully-qualified name of the MirrorService's
48	// SetMirrorConfig RPC.
49	MirrorServiceSetMirrorConfigProcedure = "/ermite.MirrorService/SetMirrorConfig"
50	// MirrorServiceSetRepoMirrorProcedure is the fully-qualified name of the MirrorService's
51	// SetRepoMirror RPC.
52	MirrorServiceSetRepoMirrorProcedure = "/ermite.MirrorService/SetRepoMirror"
53	// MirrorServiceRemoveRepoMirrorProcedure is the fully-qualified name of the MirrorService's
54	// RemoveRepoMirror RPC.
55	MirrorServiceRemoveRepoMirrorProcedure = "/ermite.MirrorService/RemoveRepoMirror"
56	// MirrorServiceSetRepoMirrorExcludedProcedure is the fully-qualified name of the MirrorService's
57	// SetRepoMirrorExcluded RPC.
58	MirrorServiceSetRepoMirrorExcludedProcedure = "/ermite.MirrorService/SetRepoMirrorExcluded"
59	// MirrorServiceGetMirrorStatusProcedure is the fully-qualified name of the MirrorService's
60	// GetMirrorStatus RPC.
61	MirrorServiceGetMirrorStatusProcedure = "/ermite.MirrorService/GetMirrorStatus"
62	// MirrorServiceListMirrorStatusProcedure is the fully-qualified name of the MirrorService's
63	// ListMirrorStatus RPC.
64	MirrorServiceListMirrorStatusProcedure = "/ermite.MirrorService/ListMirrorStatus"
65	// MirrorServiceSyncMirrorProcedure is the fully-qualified name of the MirrorService's SyncMirror
66	// RPC.
67	MirrorServiceSyncMirrorProcedure = "/ermite.MirrorService/SyncMirror"
68)
69
70// MirrorServiceClient is a client for the ermite.MirrorService service.
71type MirrorServiceClient interface {
72	// GetMirrorKey returns the public mirror key, generating it on first use.
73	// Needs a non-anonymous caller. Fails with failed_precondition without
74	// ERMITE_SECRETS_KEY.
75	GetMirrorKey(context.Context, *connect.Request[ermite.GetMirrorKeyRequest]) (*connect.Response[ermite.GetMirrorKeyResponse], error)
76	// RotateMirrorKey replaces the key immediately. Add the new key to remotes
77	// and sync with force to recover from authentication failures.
78	RotateMirrorKey(context.Context, *connect.Request[ermite.RotateMirrorKeyRequest]) (*connect.Response[ermite.RotateMirrorKeyResponse], error)
79	// GetMirrorConfig returns the global mirror policy.
80	GetMirrorConfig(context.Context, *connect.Request[ermite.GetMirrorConfigRequest]) (*connect.Response[ermite.GetMirrorConfigResponse], error)
81	// SetMirrorConfig patches the global policy. Unset fields are unchanged.
82	// Invalid fields give invalid_argument with field violations.
83	SetMirrorConfig(context.Context, *connect.Request[ermite.SetMirrorConfigRequest]) (*connect.Response[ermite.SetMirrorConfigResponse], error)
84	// SetRepoMirror sets an override, even when global mirroring is disabled.
85	SetRepoMirror(context.Context, *connect.Request[ermite.SetRepoMirrorRequest]) (*connect.Response[ermite.SetRepoMirrorResponse], error)
86	// RemoveRepoMirror removes the override so the global policy applies again.
87	RemoveRepoMirror(context.Context, *connect.Request[ermite.RemoveRepoMirrorRequest]) (*connect.Response[ermite.RemoveRepoMirrorResponse], error)
88	// SetRepoMirrorExcluded excludes or includes a repository in the global
89	// policy. An explicit URL override takes precedence.
90	SetRepoMirrorExcluded(context.Context, *connect.Request[ermite.SetRepoMirrorExcludedRequest]) (*connect.Response[ermite.SetRepoMirrorExcludedResponse], error)
91	// GetMirrorStatus returns the resolved target and status of one repository.
92	GetMirrorStatus(context.Context, *connect.Request[ermite.GetMirrorStatusRequest]) (*connect.Response[ermite.GetMirrorStatusResponse], error)
93	// ListMirrorStatus lists mirror statuses and needs owner rights.
94	ListMirrorStatus(context.Context, *connect.Request[ermite.ListMirrorStatusRequest]) (*connect.Response[ermite.ListMirrorStatusResponse], error)
95	// SyncMirror syncs Repo or, with All, every repository. Paused mirrors need
96	// Force. Manual requests without Force are at least 60 seconds apart.
97	SyncMirror(context.Context, *connect.Request[ermite.SyncMirrorRequest]) (*connect.Response[ermite.SyncMirrorResponse], error)
98}
99
100// NewMirrorServiceClient constructs a client for the ermite.MirrorService service. By default, it
101// uses the Connect protocol with the binary Protobuf Codec, asks for gzipped responses, and sends
102// uncompressed requests. To use the gRPC or gRPC-Web protocols, supply the connect.WithGRPC() or
103// connect.WithGRPCWeb() options.
104//
105// The URL supplied here should be the base URL for the Connect or gRPC server (for example,
106// http://api.acme.com or https://acme.com/grpc).
107func NewMirrorServiceClient(httpClient connect.HTTPClient, baseURL string, opts ...connect.ClientOption) MirrorServiceClient {
108	baseURL = strings.TrimRight(baseURL, "/")
109	mirrorServiceMethods := ermite.File_ermite_mirror_proto.Services().ByName("MirrorService").Methods()
110	return &mirrorServiceClient{
111		getMirrorKey: connect.NewClient[ermite.GetMirrorKeyRequest, ermite.GetMirrorKeyResponse](
112			httpClient,
113			baseURL+MirrorServiceGetMirrorKeyProcedure,
114			connect.WithSchema(mirrorServiceMethods.ByName("GetMirrorKey")),
115			connect.WithClientOptions(opts...),
116		),
117		rotateMirrorKey: connect.NewClient[ermite.RotateMirrorKeyRequest, ermite.RotateMirrorKeyResponse](
118			httpClient,
119			baseURL+MirrorServiceRotateMirrorKeyProcedure,
120			connect.WithSchema(mirrorServiceMethods.ByName("RotateMirrorKey")),
121			connect.WithClientOptions(opts...),
122		),
123		getMirrorConfig: connect.NewClient[ermite.GetMirrorConfigRequest, ermite.GetMirrorConfigResponse](
124			httpClient,
125			baseURL+MirrorServiceGetMirrorConfigProcedure,
126			connect.WithSchema(mirrorServiceMethods.ByName("GetMirrorConfig")),
127			connect.WithClientOptions(opts...),
128		),
129		setMirrorConfig: connect.NewClient[ermite.SetMirrorConfigRequest, ermite.SetMirrorConfigResponse](
130			httpClient,
131			baseURL+MirrorServiceSetMirrorConfigProcedure,
132			connect.WithSchema(mirrorServiceMethods.ByName("SetMirrorConfig")),
133			connect.WithClientOptions(opts...),
134		),
135		setRepoMirror: connect.NewClient[ermite.SetRepoMirrorRequest, ermite.SetRepoMirrorResponse](
136			httpClient,
137			baseURL+MirrorServiceSetRepoMirrorProcedure,
138			connect.WithSchema(mirrorServiceMethods.ByName("SetRepoMirror")),
139			connect.WithClientOptions(opts...),
140		),
141		removeRepoMirror: connect.NewClient[ermite.RemoveRepoMirrorRequest, ermite.RemoveRepoMirrorResponse](
142			httpClient,
143			baseURL+MirrorServiceRemoveRepoMirrorProcedure,
144			connect.WithSchema(mirrorServiceMethods.ByName("RemoveRepoMirror")),
145			connect.WithClientOptions(opts...),
146		),
147		setRepoMirrorExcluded: connect.NewClient[ermite.SetRepoMirrorExcludedRequest, ermite.SetRepoMirrorExcludedResponse](
148			httpClient,
149			baseURL+MirrorServiceSetRepoMirrorExcludedProcedure,
150			connect.WithSchema(mirrorServiceMethods.ByName("SetRepoMirrorExcluded")),
151			connect.WithClientOptions(opts...),
152		),
153		getMirrorStatus: connect.NewClient[ermite.GetMirrorStatusRequest, ermite.GetMirrorStatusResponse](
154			httpClient,
155			baseURL+MirrorServiceGetMirrorStatusProcedure,
156			connect.WithSchema(mirrorServiceMethods.ByName("GetMirrorStatus")),
157			connect.WithClientOptions(opts...),
158		),
159		listMirrorStatus: connect.NewClient[ermite.ListMirrorStatusRequest, ermite.ListMirrorStatusResponse](
160			httpClient,
161			baseURL+MirrorServiceListMirrorStatusProcedure,
162			connect.WithSchema(mirrorServiceMethods.ByName("ListMirrorStatus")),
163			connect.WithClientOptions(opts...),
164		),
165		syncMirror: connect.NewClient[ermite.SyncMirrorRequest, ermite.SyncMirrorResponse](
166			httpClient,
167			baseURL+MirrorServiceSyncMirrorProcedure,
168			connect.WithSchema(mirrorServiceMethods.ByName("SyncMirror")),
169			connect.WithClientOptions(opts...),
170		),
171	}
172}
173
174// mirrorServiceClient implements MirrorServiceClient.
175type mirrorServiceClient struct {
176	getMirrorKey          *connect.Client[ermite.GetMirrorKeyRequest, ermite.GetMirrorKeyResponse]
177	rotateMirrorKey       *connect.Client[ermite.RotateMirrorKeyRequest, ermite.RotateMirrorKeyResponse]
178	getMirrorConfig       *connect.Client[ermite.GetMirrorConfigRequest, ermite.GetMirrorConfigResponse]
179	setMirrorConfig       *connect.Client[ermite.SetMirrorConfigRequest, ermite.SetMirrorConfigResponse]
180	setRepoMirror         *connect.Client[ermite.SetRepoMirrorRequest, ermite.SetRepoMirrorResponse]
181	removeRepoMirror      *connect.Client[ermite.RemoveRepoMirrorRequest, ermite.RemoveRepoMirrorResponse]
182	setRepoMirrorExcluded *connect.Client[ermite.SetRepoMirrorExcludedRequest, ermite.SetRepoMirrorExcludedResponse]
183	getMirrorStatus       *connect.Client[ermite.GetMirrorStatusRequest, ermite.GetMirrorStatusResponse]
184	listMirrorStatus      *connect.Client[ermite.ListMirrorStatusRequest, ermite.ListMirrorStatusResponse]
185	syncMirror            *connect.Client[ermite.SyncMirrorRequest, ermite.SyncMirrorResponse]
186}
187
188// GetMirrorKey calls ermite.MirrorService.GetMirrorKey.
189func (c *mirrorServiceClient) GetMirrorKey(ctx context.Context, req *connect.Request[ermite.GetMirrorKeyRequest]) (*connect.Response[ermite.GetMirrorKeyResponse], error) {
190	return c.getMirrorKey.CallUnary(ctx, req)
191}
192
193// RotateMirrorKey calls ermite.MirrorService.RotateMirrorKey.
194func (c *mirrorServiceClient) RotateMirrorKey(ctx context.Context, req *connect.Request[ermite.RotateMirrorKeyRequest]) (*connect.Response[ermite.RotateMirrorKeyResponse], error) {
195	return c.rotateMirrorKey.CallUnary(ctx, req)
196}
197
198// GetMirrorConfig calls ermite.MirrorService.GetMirrorConfig.
199func (c *mirrorServiceClient) GetMirrorConfig(ctx context.Context, req *connect.Request[ermite.GetMirrorConfigRequest]) (*connect.Response[ermite.GetMirrorConfigResponse], error) {
200	return c.getMirrorConfig.CallUnary(ctx, req)
201}
202
203// SetMirrorConfig calls ermite.MirrorService.SetMirrorConfig.
204func (c *mirrorServiceClient) SetMirrorConfig(ctx context.Context, req *connect.Request[ermite.SetMirrorConfigRequest]) (*connect.Response[ermite.SetMirrorConfigResponse], error) {
205	return c.setMirrorConfig.CallUnary(ctx, req)
206}
207
208// SetRepoMirror calls ermite.MirrorService.SetRepoMirror.
209func (c *mirrorServiceClient) SetRepoMirror(ctx context.Context, req *connect.Request[ermite.SetRepoMirrorRequest]) (*connect.Response[ermite.SetRepoMirrorResponse], error) {
210	return c.setRepoMirror.CallUnary(ctx, req)
211}
212
213// RemoveRepoMirror calls ermite.MirrorService.RemoveRepoMirror.
214func (c *mirrorServiceClient) RemoveRepoMirror(ctx context.Context, req *connect.Request[ermite.RemoveRepoMirrorRequest]) (*connect.Response[ermite.RemoveRepoMirrorResponse], error) {
215	return c.removeRepoMirror.CallUnary(ctx, req)
216}
217
218// SetRepoMirrorExcluded calls ermite.MirrorService.SetRepoMirrorExcluded.
219func (c *mirrorServiceClient) SetRepoMirrorExcluded(ctx context.Context, req *connect.Request[ermite.SetRepoMirrorExcludedRequest]) (*connect.Response[ermite.SetRepoMirrorExcludedResponse], error) {
220	return c.setRepoMirrorExcluded.CallUnary(ctx, req)
221}
222
223// GetMirrorStatus calls ermite.MirrorService.GetMirrorStatus.
224func (c *mirrorServiceClient) GetMirrorStatus(ctx context.Context, req *connect.Request[ermite.GetMirrorStatusRequest]) (*connect.Response[ermite.GetMirrorStatusResponse], error) {
225	return c.getMirrorStatus.CallUnary(ctx, req)
226}
227
228// ListMirrorStatus calls ermite.MirrorService.ListMirrorStatus.
229func (c *mirrorServiceClient) ListMirrorStatus(ctx context.Context, req *connect.Request[ermite.ListMirrorStatusRequest]) (*connect.Response[ermite.ListMirrorStatusResponse], error) {
230	return c.listMirrorStatus.CallUnary(ctx, req)
231}
232
233// SyncMirror calls ermite.MirrorService.SyncMirror.
234func (c *mirrorServiceClient) SyncMirror(ctx context.Context, req *connect.Request[ermite.SyncMirrorRequest]) (*connect.Response[ermite.SyncMirrorResponse], error) {
235	return c.syncMirror.CallUnary(ctx, req)
236}
237
238// MirrorServiceHandler is an implementation of the ermite.MirrorService service.
239type MirrorServiceHandler interface {
240	// GetMirrorKey returns the public mirror key, generating it on first use.
241	// Needs a non-anonymous caller. Fails with failed_precondition without
242	// ERMITE_SECRETS_KEY.
243	GetMirrorKey(context.Context, *connect.Request[ermite.GetMirrorKeyRequest]) (*connect.Response[ermite.GetMirrorKeyResponse], error)
244	// RotateMirrorKey replaces the key immediately. Add the new key to remotes
245	// and sync with force to recover from authentication failures.
246	RotateMirrorKey(context.Context, *connect.Request[ermite.RotateMirrorKeyRequest]) (*connect.Response[ermite.RotateMirrorKeyResponse], error)
247	// GetMirrorConfig returns the global mirror policy.
248	GetMirrorConfig(context.Context, *connect.Request[ermite.GetMirrorConfigRequest]) (*connect.Response[ermite.GetMirrorConfigResponse], error)
249	// SetMirrorConfig patches the global policy. Unset fields are unchanged.
250	// Invalid fields give invalid_argument with field violations.
251	SetMirrorConfig(context.Context, *connect.Request[ermite.SetMirrorConfigRequest]) (*connect.Response[ermite.SetMirrorConfigResponse], error)
252	// SetRepoMirror sets an override, even when global mirroring is disabled.
253	SetRepoMirror(context.Context, *connect.Request[ermite.SetRepoMirrorRequest]) (*connect.Response[ermite.SetRepoMirrorResponse], error)
254	// RemoveRepoMirror removes the override so the global policy applies again.
255	RemoveRepoMirror(context.Context, *connect.Request[ermite.RemoveRepoMirrorRequest]) (*connect.Response[ermite.RemoveRepoMirrorResponse], error)
256	// SetRepoMirrorExcluded excludes or includes a repository in the global
257	// policy. An explicit URL override takes precedence.
258	SetRepoMirrorExcluded(context.Context, *connect.Request[ermite.SetRepoMirrorExcludedRequest]) (*connect.Response[ermite.SetRepoMirrorExcludedResponse], error)
259	// GetMirrorStatus returns the resolved target and status of one repository.
260	GetMirrorStatus(context.Context, *connect.Request[ermite.GetMirrorStatusRequest]) (*connect.Response[ermite.GetMirrorStatusResponse], error)
261	// ListMirrorStatus lists mirror statuses and needs owner rights.
262	ListMirrorStatus(context.Context, *connect.Request[ermite.ListMirrorStatusRequest]) (*connect.Response[ermite.ListMirrorStatusResponse], error)
263	// SyncMirror syncs Repo or, with All, every repository. Paused mirrors need
264	// Force. Manual requests without Force are at least 60 seconds apart.
265	SyncMirror(context.Context, *connect.Request[ermite.SyncMirrorRequest]) (*connect.Response[ermite.SyncMirrorResponse], error)
266}
267
268// NewMirrorServiceHandler builds an HTTP handler from the service implementation. It returns the
269// path on which to mount the handler and the handler itself.
270//
271// By default, handlers support the Connect, gRPC, and gRPC-Web protocols with the binary Protobuf
272// and JSON codecs. They also support gzip compression.
273func NewMirrorServiceHandler(svc MirrorServiceHandler, opts ...connect.HandlerOption) (string, http.Handler) {
274	mirrorServiceMethods := ermite.File_ermite_mirror_proto.Services().ByName("MirrorService").Methods()
275	mirrorServiceGetMirrorKeyHandler := connect.NewUnaryHandler(
276		MirrorServiceGetMirrorKeyProcedure,
277		svc.GetMirrorKey,
278		connect.WithSchema(mirrorServiceMethods.ByName("GetMirrorKey")),
279		connect.WithHandlerOptions(opts...),
280	)
281	mirrorServiceRotateMirrorKeyHandler := connect.NewUnaryHandler(
282		MirrorServiceRotateMirrorKeyProcedure,
283		svc.RotateMirrorKey,
284		connect.WithSchema(mirrorServiceMethods.ByName("RotateMirrorKey")),
285		connect.WithHandlerOptions(opts...),
286	)
287	mirrorServiceGetMirrorConfigHandler := connect.NewUnaryHandler(
288		MirrorServiceGetMirrorConfigProcedure,
289		svc.GetMirrorConfig,
290		connect.WithSchema(mirrorServiceMethods.ByName("GetMirrorConfig")),
291		connect.WithHandlerOptions(opts...),
292	)
293	mirrorServiceSetMirrorConfigHandler := connect.NewUnaryHandler(
294		MirrorServiceSetMirrorConfigProcedure,
295		svc.SetMirrorConfig,
296		connect.WithSchema(mirrorServiceMethods.ByName("SetMirrorConfig")),
297		connect.WithHandlerOptions(opts...),
298	)
299	mirrorServiceSetRepoMirrorHandler := connect.NewUnaryHandler(
300		MirrorServiceSetRepoMirrorProcedure,
301		svc.SetRepoMirror,
302		connect.WithSchema(mirrorServiceMethods.ByName("SetRepoMirror")),
303		connect.WithHandlerOptions(opts...),
304	)
305	mirrorServiceRemoveRepoMirrorHandler := connect.NewUnaryHandler(
306		MirrorServiceRemoveRepoMirrorProcedure,
307		svc.RemoveRepoMirror,
308		connect.WithSchema(mirrorServiceMethods.ByName("RemoveRepoMirror")),
309		connect.WithHandlerOptions(opts...),
310	)
311	mirrorServiceSetRepoMirrorExcludedHandler := connect.NewUnaryHandler(
312		MirrorServiceSetRepoMirrorExcludedProcedure,
313		svc.SetRepoMirrorExcluded,
314		connect.WithSchema(mirrorServiceMethods.ByName("SetRepoMirrorExcluded")),
315		connect.WithHandlerOptions(opts...),
316	)
317	mirrorServiceGetMirrorStatusHandler := connect.NewUnaryHandler(
318		MirrorServiceGetMirrorStatusProcedure,
319		svc.GetMirrorStatus,
320		connect.WithSchema(mirrorServiceMethods.ByName("GetMirrorStatus")),
321		connect.WithHandlerOptions(opts...),
322	)
323	mirrorServiceListMirrorStatusHandler := connect.NewUnaryHandler(
324		MirrorServiceListMirrorStatusProcedure,
325		svc.ListMirrorStatus,
326		connect.WithSchema(mirrorServiceMethods.ByName("ListMirrorStatus")),
327		connect.WithHandlerOptions(opts...),
328	)
329	mirrorServiceSyncMirrorHandler := connect.NewUnaryHandler(
330		MirrorServiceSyncMirrorProcedure,
331		svc.SyncMirror,
332		connect.WithSchema(mirrorServiceMethods.ByName("SyncMirror")),
333		connect.WithHandlerOptions(opts...),
334	)
335	return "/ermite.MirrorService/", http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {
336		switch r.URL.Path {
337		case MirrorServiceGetMirrorKeyProcedure:
338			mirrorServiceGetMirrorKeyHandler.ServeHTTP(w, r)
339		case MirrorServiceRotateMirrorKeyProcedure:
340			mirrorServiceRotateMirrorKeyHandler.ServeHTTP(w, r)
341		case MirrorServiceGetMirrorConfigProcedure:
342			mirrorServiceGetMirrorConfigHandler.ServeHTTP(w, r)
343		case MirrorServiceSetMirrorConfigProcedure:
344			mirrorServiceSetMirrorConfigHandler.ServeHTTP(w, r)
345		case MirrorServiceSetRepoMirrorProcedure:
346			mirrorServiceSetRepoMirrorHandler.ServeHTTP(w, r)
347		case MirrorServiceRemoveRepoMirrorProcedure:
348			mirrorServiceRemoveRepoMirrorHandler.ServeHTTP(w, r)
349		case MirrorServiceSetRepoMirrorExcludedProcedure:
350			mirrorServiceSetRepoMirrorExcludedHandler.ServeHTTP(w, r)
351		case MirrorServiceGetMirrorStatusProcedure:
352			mirrorServiceGetMirrorStatusHandler.ServeHTTP(w, r)
353		case MirrorServiceListMirrorStatusProcedure:
354			mirrorServiceListMirrorStatusHandler.ServeHTTP(w, r)
355		case MirrorServiceSyncMirrorProcedure:
356			mirrorServiceSyncMirrorHandler.ServeHTTP(w, r)
357		default:
358			http.NotFound(w, r)
359		}
360	})
361}
362
363// UnimplementedMirrorServiceHandler returns CodeUnimplemented from all methods.
364type UnimplementedMirrorServiceHandler struct{}
365
366func (UnimplementedMirrorServiceHandler) GetMirrorKey(context.Context, *connect.Request[ermite.GetMirrorKeyRequest]) (*connect.Response[ermite.GetMirrorKeyResponse], error) {
367	return nil, connect.NewError(connect.CodeUnimplemented, errors.New("ermite.MirrorService.GetMirrorKey is not implemented"))
368}
369
370func (UnimplementedMirrorServiceHandler) RotateMirrorKey(context.Context, *connect.Request[ermite.RotateMirrorKeyRequest]) (*connect.Response[ermite.RotateMirrorKeyResponse], error) {
371	return nil, connect.NewError(connect.CodeUnimplemented, errors.New("ermite.MirrorService.RotateMirrorKey is not implemented"))
372}
373
374func (UnimplementedMirrorServiceHandler) GetMirrorConfig(context.Context, *connect.Request[ermite.GetMirrorConfigRequest]) (*connect.Response[ermite.GetMirrorConfigResponse], error) {
375	return nil, connect.NewError(connect.CodeUnimplemented, errors.New("ermite.MirrorService.GetMirrorConfig is not implemented"))
376}
377
378func (UnimplementedMirrorServiceHandler) SetMirrorConfig(context.Context, *connect.Request[ermite.SetMirrorConfigRequest]) (*connect.Response[ermite.SetMirrorConfigResponse], error) {
379	return nil, connect.NewError(connect.CodeUnimplemented, errors.New("ermite.MirrorService.SetMirrorConfig is not implemented"))
380}
381
382func (UnimplementedMirrorServiceHandler) SetRepoMirror(context.Context, *connect.Request[ermite.SetRepoMirrorRequest]) (*connect.Response[ermite.SetRepoMirrorResponse], error) {
383	return nil, connect.NewError(connect.CodeUnimplemented, errors.New("ermite.MirrorService.SetRepoMirror is not implemented"))
384}
385
386func (UnimplementedMirrorServiceHandler) RemoveRepoMirror(context.Context, *connect.Request[ermite.RemoveRepoMirrorRequest]) (*connect.Response[ermite.RemoveRepoMirrorResponse], error) {
387	return nil, connect.NewError(connect.CodeUnimplemented, errors.New("ermite.MirrorService.RemoveRepoMirror is not implemented"))
388}
389
390func (UnimplementedMirrorServiceHandler) SetRepoMirrorExcluded(context.Context, *connect.Request[ermite.SetRepoMirrorExcludedRequest]) (*connect.Response[ermite.SetRepoMirrorExcludedResponse], error) {
391	return nil, connect.NewError(connect.CodeUnimplemented, errors.New("ermite.MirrorService.SetRepoMirrorExcluded is not implemented"))
392}
393
394func (UnimplementedMirrorServiceHandler) GetMirrorStatus(context.Context, *connect.Request[ermite.GetMirrorStatusRequest]) (*connect.Response[ermite.GetMirrorStatusResponse], error) {
395	return nil, connect.NewError(connect.CodeUnimplemented, errors.New("ermite.MirrorService.GetMirrorStatus is not implemented"))
396}
397
398func (UnimplementedMirrorServiceHandler) ListMirrorStatus(context.Context, *connect.Request[ermite.ListMirrorStatusRequest]) (*connect.Response[ermite.ListMirrorStatusResponse], error) {
399	return nil, connect.NewError(connect.CodeUnimplemented, errors.New("ermite.MirrorService.ListMirrorStatus is not implemented"))
400}
401
402func (UnimplementedMirrorServiceHandler) SyncMirror(context.Context, *connect.Request[ermite.SyncMirrorRequest]) (*connect.Response[ermite.SyncMirrorResponse], error) {
403	return nil, connect.NewError(connect.CodeUnimplemented, errors.New("ermite.MirrorService.SyncMirror is not implemented"))
404}

Keyboard shortcuts

Single-key shortcuts are on. ctrl k and esc work whatever this says.

ctrl k :
go to a section, branch, tag, file or repository
?
this list
j k
move the row cursor down / up
enter
open the row under the cursor; on Files, a directory opens or closes in place
↑ ↓ ← → home end
in the file tree (focus on a row): previous / next row, close / open a directory or go to its parent / first entry, first / last row. They never open a file
l h
on Files: open a directory or a file / close a directory or go up to its parent, then to the parent page. Elsewhere: into the side panel (on a merge request, its files) / back to the content; there j k move between its controls
g g G
first / last row
/
filter the list; on Files, find a file anywhere in the repository (esc clears, enter opens the best match)
b
switch branch or tag
g s g f g c g b g m g i g r g a
tabs: summary, files, commits, branches & tags, merge requests, issues, releases, actions (when available)
g h
home
w
wide mode: use the whole width of the screen, or not (remembered)
y
copy a permalink pinned to the commit
d u x
diff: split / unified / collapse or expand all
e E
diff: the whole file in view / every file, with the lines the hunks hide
n
merge request: next note in the diff
esc
close a dialog, leave a field

Branches 2

Tags 18

↑↓ moveenter openesc close