detached 6cfb42d

feat(proto): add the mirror service and mirror events

commit
6cfb42df17f633480c92cdd239b33257c5f674ba
author
brice · · 2026-10-20 05:26 UTC
committer
brice · · 2026-10-20 07:06 UTC
parent
94ffd87
signature
GPG VerifiedCD88F9E564E0102646FB6077A1A07C7C7C3E349D · arch-gpg Verified for the committer email
7 files · +2833 -41
M docs/services.md +32 -0
@@ -18,3 +18,35 @@
1818 | `EnvironmentService` | `CreateEnvironment`, `ListEnvironments`, `DeleteEnvironment` |
1919 | `ArtifactService` | `ListArtifacts`, `DownloadArtifact` (streamed, resumable), `DeleteArtifact` |
2020 | `JobArtifactService` | `CreateJobArtifact`, `UploadJobArtifactBlock` (client stream), `CommitJobArtifact`, `FinalizeJobArtifact`, `ListJobArtifacts`, `DownloadJobArtifact` (streamed, resumable), `DeleteJobArtifact`. Scoped to the run of the job token |
21+
22+## MirrorService
23+
24+Servers implementing push mirrors advertise `mirror` in `GetVersionResponse.features`.
25+No new token scope is introduced.
26+
27+| RPC | Access and behavior |
28+|---|---|
29+| `GetMirrorKey` | Non-anonymous caller; generates the public SSH key on first call. Without `ERMITE_SECRETS_KEY`, returns `failed_precondition` |
30+| `RotateMirrorKey` | Owner rights: admin token or a token with every scope and no repository or branch limits. Replaces the key immediately and returns the previous fingerprint |
31+| `GetMirrorConfig`, `SetMirrorConfig` | Owner rights. Set patches only present fields; invalid fields return `invalid_argument` with field violations |
32+| `SetRepoMirror` | `repo:admin` on the repository. Sets an override, even if global mirroring is disabled; empty cron and absent all-branches inherit the global values |
33+| `RemoveRepoMirror` | `repo:admin` on the repository. Removes the override |
34+| `SetRepoMirrorExcluded` | `repo:admin` on the repository. Opts out of or into the global template; a URL override wins over exclusion |
35+| `GetMirrorStatus` | Read access to the repository. Error `detail` is returned only with `repo:admin` |
36+| `ListMirrorStatus` | Owner rights |
37+| `SyncMirror` | `repo:admin` for `repo`, or owner rights for `all=true` (with empty `repo`). Returns per-repository results, including queued and no-op indicators |
38+
39+Cron expressions have five fields, run in UTC and must be at least five minutes
40+apart. Mirrors push the default branch (or every branch with `all_branches`) and
41+tags. `force` lifts a pause, skips the no-op check and the 60-second manual sync
42+throttle; it **never** performs a Git force push. Pushes are atomic: one rejected
43+ref fails the whole push. After key rotation, add the new public key to remotes
44+and sync with `force` to recover from authentication failures. Configuration can
45+be saved without `ERMITE_SECRETS_KEY`, but pushes cannot run without it.
46+
47+`EventService.Watch` adds `mirror_failed` (field 23, `MirrorFailed`) when a mirror
48+enters failing or paused, including failing to paused, and `mirror_recovered`
49+(field 24, `MirrorRecovered`) when a failing or paused mirror succeeds again.
50+These are transition events, not events for every attempt. They are delivered on
51+`repo:<name>` and `home`, subject to repository visibility. Neither event carries
52+a URL or error detail.
@@ -18,3 +18,35 @@
18 | `EnvironmentService` | `CreateEnvironment`, `ListEnvironments`, `DeleteEnvironment` |18 | `EnvironmentService` | `CreateEnvironment`, `ListEnvironments`, `DeleteEnvironment` |
19 | `ArtifactService` | `ListArtifacts`, `DownloadArtifact` (streamed, resumable), `DeleteArtifact` |19 | `ArtifactService` | `ListArtifacts`, `DownloadArtifact` (streamed, resumable), `DeleteArtifact` |
20 | `JobArtifactService` | `CreateJobArtifact`, `UploadJobArtifactBlock` (client stream), `CommitJobArtifact`, `FinalizeJobArtifact`, `ListJobArtifacts`, `DownloadJobArtifact` (streamed, resumable), `DeleteJobArtifact`. Scoped to the run of the job token |20 | `JobArtifactService` | `CreateJobArtifact`, `UploadJobArtifactBlock` (client stream), `CommitJobArtifact`, `FinalizeJobArtifact`, `ListJobArtifacts`, `DownloadJobArtifact` (streamed, resumable), `DeleteJobArtifact`. Scoped to the run of the job token |
21+
22+## MirrorService
23+
24+Servers implementing push mirrors advertise `mirror` in `GetVersionResponse.features`.
25+No new token scope is introduced.
26+
27+| RPC | Access and behavior |
28+|---|---|
29+| `GetMirrorKey` | Non-anonymous caller; generates the public SSH key on first call. Without `ERMITE_SECRETS_KEY`, returns `failed_precondition` |
30+| `RotateMirrorKey` | Owner rights: admin token or a token with every scope and no repository or branch limits. Replaces the key immediately and returns the previous fingerprint |
31+| `GetMirrorConfig`, `SetMirrorConfig` | Owner rights. Set patches only present fields; invalid fields return `invalid_argument` with field violations |
32+| `SetRepoMirror` | `repo:admin` on the repository. Sets an override, even if global mirroring is disabled; empty cron and absent all-branches inherit the global values |
33+| `RemoveRepoMirror` | `repo:admin` on the repository. Removes the override |
34+| `SetRepoMirrorExcluded` | `repo:admin` on the repository. Opts out of or into the global template; a URL override wins over exclusion |
35+| `GetMirrorStatus` | Read access to the repository. Error `detail` is returned only with `repo:admin` |
36+| `ListMirrorStatus` | Owner rights |
37+| `SyncMirror` | `repo:admin` for `repo`, or owner rights for `all=true` (with empty `repo`). Returns per-repository results, including queued and no-op indicators |
38+
39+Cron expressions have five fields, run in UTC and must be at least five minutes
40+apart. Mirrors push the default branch (or every branch with `all_branches`) and
41+tags. `force` lifts a pause, skips the no-op check and the 60-second manual sync
42+throttle; it **never** performs a Git force push. Pushes are atomic: one rejected
43+ref fails the whole push. After key rotation, add the new public key to remotes
44+and sync with `force` to recover from authentication failures. Configuration can
45+be saved without `ERMITE_SECRETS_KEY`, but pushes cannot run without it.
46+
47+`EventService.Watch` adds `mirror_failed` (field 23, `MirrorFailed`) when a mirror
48+enters failing or paused, including failing to paused, and `mirror_recovered`
49+(field 24, `MirrorRecovered`) when a failing or paused mirror succeeds again.
50+These are transition events, not events for every attempt. They are delivered on
51+`repo:<name>` and `home`, subject to repository visibility. Neither event carries
52+a URL or error detail.
A gen/ermite/ermiteconnect/mirror.connect.go +404 -0
@@ -0,0 +1,404 @@
1+// SPDX-License-Identifier: MIT
2+
3+// Code generated by protoc-gen-connect-go. DO NOT EDIT.
4+//
5+// Source: ermite/mirror.proto
6+
7+package ermiteconnect
8+
9+import (
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.
23+const _ = connect.IsAtLeastVersion1_13_0
24+
25+const (
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.
37+const (
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.
71+type 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).
107+func 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.
175+type 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.
189+func (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.
194+func (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.
199+func (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.
204+func (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.
209+func (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.
214+func (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.
219+func (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.
224+func (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.
229+func (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.
234+func (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.
239+type 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.
273+func 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.
364+type UnimplementedMirrorServiceHandler struct{}
365+
366+func (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+
370+func (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+
374+func (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+
378+func (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+
382+func (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+
386+func (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+
390+func (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+
394+func (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+
398+func (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+
402+func (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+}
@@ -0,0 +1,404 @@
1+// SPDX-License-Identifier: MIT
2+
3+// Code generated by protoc-gen-connect-go. DO NOT EDIT.
4+//
5+// Source: ermite/mirror.proto
6+
7+package ermiteconnect
8+
9+import (
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.
23+const _ = connect.IsAtLeastVersion1_13_0
24+
25+const (
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.
37+const (
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.
71+type 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).
107+func 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.
175+type 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.
189+func (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.
194+func (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.
199+func (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.
204+func (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.
209+func (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.
214+func (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.
219+func (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.
224+func (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.
229+func (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.
234+func (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.
239+type 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.
273+func 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.
364+type UnimplementedMirrorServiceHandler struct{}
365+
366+func (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+
370+func (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+
374+func (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+
378+func (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+
382+func (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+
386+func (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+
390+func (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+
394+func (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+
398+func (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+
402+func (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+}
M gen/ermite/event.pb.go +215 -41 generated file: collapsed
A gen/ermite/mirror.pb.go +1814 -0
@@ -0,0 +1,1814 @@
1+// SPDX-License-Identifier: MIT
2+
3+// Code generated by protoc-gen-go. DO NOT EDIT.
4+// versions:
5+// protoc-gen-go v1.36.12
6+// protoc (unknown)
7+// source: ermite/mirror.proto
8+
9+package ermite
10+
11+import (
12+ protoreflect "google.golang.org/protobuf/reflect/protoreflect"
13+ protoimpl "google.golang.org/protobuf/runtime/protoimpl"
14+ timestamppb "google.golang.org/protobuf/types/known/timestamppb"
15+ reflect "reflect"
16+ sync "sync"
17+ unsafe "unsafe"
18+)
19+
20+const (
21+ // Verify that this generated code is sufficiently up-to-date.
22+ _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion)
23+ // Verify that runtime/protoimpl is sufficiently up-to-date.
24+ _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20)
25+)
26+
27+// MirrorSource says which configuration applies to a repository.
28+type MirrorSource int32
29+
30+const (
31+ // Unspecified.
32+ MirrorSource_MIRROR_SOURCE_UNSPECIFIED MirrorSource = 0
33+ // Disabled.
34+ MirrorSource_MIRROR_SOURCE_DISABLED MirrorSource = 1
35+ // Global.
36+ MirrorSource_MIRROR_SOURCE_GLOBAL MirrorSource = 2
37+ // Override.
38+ MirrorSource_MIRROR_SOURCE_OVERRIDE MirrorSource = 3
39+ // Excluded.
40+ MirrorSource_MIRROR_SOURCE_EXCLUDED MirrorSource = 4
41+)
42+
43+// Enum value maps for MirrorSource.
44+var (
45+ MirrorSource_name = map[int32]string{
46+ 0: "MIRROR_SOURCE_UNSPECIFIED",
47+ 1: "MIRROR_SOURCE_DISABLED",
48+ 2: "MIRROR_SOURCE_GLOBAL",
49+ 3: "MIRROR_SOURCE_OVERRIDE",
50+ 4: "MIRROR_SOURCE_EXCLUDED",
51+ }
52+ MirrorSource_value = map[string]int32{
53+ "MIRROR_SOURCE_UNSPECIFIED": 0,
54+ "MIRROR_SOURCE_DISABLED": 1,
55+ "MIRROR_SOURCE_GLOBAL": 2,
56+ "MIRROR_SOURCE_OVERRIDE": 3,
57+ "MIRROR_SOURCE_EXCLUDED": 4,
58+ }
59+)
60+
61+func (x MirrorSource) Enum() *MirrorSource {
62+ p := new(MirrorSource)
63+ *p = x
64+ return p
65+}
66+
67+func (x MirrorSource) String() string {
68+ return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x))
69+}
70+
71+func (MirrorSource) Descriptor() protoreflect.EnumDescriptor {
72+ return file_ermite_mirror_proto_enumTypes[0].Descriptor()
73+}
74+
75+func (MirrorSource) Type() protoreflect.EnumType {
76+ return &file_ermite_mirror_proto_enumTypes[0]
77+}
78+
79+func (x MirrorSource) Number() protoreflect.EnumNumber {
80+ return protoreflect.EnumNumber(x)
81+}
82+
83+// Deprecated: Use MirrorSource.Descriptor instead.
84+func (MirrorSource) EnumDescriptor() ([]byte, []int) {
85+ return file_ermite_mirror_proto_rawDescGZIP(), []int{0}
86+}
87+
88+// MirrorState is the current state of a push mirror.
89+type MirrorState int32
90+
91+const (
92+ // Unspecified.
93+ MirrorState_MIRROR_STATE_UNSPECIFIED MirrorState = 0
94+ // Disabled.
95+ MirrorState_MIRROR_STATE_DISABLED MirrorState = 1
96+ // Ok.
97+ MirrorState_MIRROR_STATE_OK MirrorState = 2
98+ // Failing.
99+ MirrorState_MIRROR_STATE_FAILING MirrorState = 3
100+ // Paused.
101+ MirrorState_MIRROR_STATE_PAUSED MirrorState = 4
102+)
103+
104+// Enum value maps for MirrorState.
105+var (
106+ MirrorState_name = map[int32]string{
107+ 0: "MIRROR_STATE_UNSPECIFIED",
108+ 1: "MIRROR_STATE_DISABLED",
109+ 2: "MIRROR_STATE_OK",
110+ 3: "MIRROR_STATE_FAILING",
111+ 4: "MIRROR_STATE_PAUSED",
112+ }
113+ MirrorState_value = map[string]int32{
114+ "MIRROR_STATE_UNSPECIFIED": 0,
115+ "MIRROR_STATE_DISABLED": 1,
116+ "MIRROR_STATE_OK": 2,
117+ "MIRROR_STATE_FAILING": 3,
118+ "MIRROR_STATE_PAUSED": 4,
119+ }
120+)
121+
122+func (x MirrorState) Enum() *MirrorState {
123+ p := new(MirrorState)
124+ *p = x
125+ return p
126+}
127+
128+func (x MirrorState) String() string {
129+ return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x))
130+}
131+
132+func (MirrorState) Descriptor() protoreflect.EnumDescriptor {
133+ return file_ermite_mirror_proto_enumTypes[1].Descriptor()
134+}
135+
136+func (MirrorState) Type() protoreflect.EnumType {
137+ return &file_ermite_mirror_proto_enumTypes[1]
138+}
139+
140+func (x MirrorState) Number() protoreflect.EnumNumber {
141+ return protoreflect.EnumNumber(x)
142+}
143+
144+// Deprecated: Use MirrorState.Descriptor instead.
145+func (MirrorState) EnumDescriptor() ([]byte, []int) {
146+ return file_ermite_mirror_proto_rawDescGZIP(), []int{1}
147+}
148+
149+// MirrorKey is the public SSH key used for push mirrors. Private key material
150+// is never returned.
151+type MirrorKey struct {
152+ state protoimpl.MessageState `protogen:"open.v1"`
153+ // AuthorizedKey is the SSH authorized_keys line.
154+ AuthorizedKey string `protobuf:"bytes,1,opt,name=authorized_key,json=authorizedKey,proto3" json:"authorized_key,omitempty"`
155+ // Fingerprint is the SHA256 fingerprint of the public key.
156+ Fingerprint string `protobuf:"bytes,2,opt,name=fingerprint,proto3" json:"fingerprint,omitempty"`
157+ // CreatedAt is when the key was created.
158+ CreatedAt *timestamppb.Timestamp `protobuf:"bytes,3,opt,name=created_at,json=createdAt,proto3" json:"created_at,omitempty"`
159+ unknownFields protoimpl.UnknownFields
160+ sizeCache protoimpl.SizeCache
161+}
162+
163+func (x *MirrorKey) Reset() {
164+ *x = MirrorKey{}
165+ mi := &file_ermite_mirror_proto_msgTypes[0]
166+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
167+ ms.StoreMessageInfo(mi)
168+}
169+
170+func (x *MirrorKey) String() string {
171+ return protoimpl.X.MessageStringOf(x)
172+}
173+
174+func (*MirrorKey) ProtoMessage() {}
175+
176+func (x *MirrorKey) ProtoReflect() protoreflect.Message {
177+ mi := &file_ermite_mirror_proto_msgTypes[0]
178+ if x != nil {
179+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
180+ if ms.LoadMessageInfo() == nil {
181+ ms.StoreMessageInfo(mi)
182+ }
183+ return ms
184+ }
185+ return mi.MessageOf(x)
186+}
187+
188+// Deprecated: Use MirrorKey.ProtoReflect.Descriptor instead.
189+func (*MirrorKey) Descriptor() ([]byte, []int) {
190+ return file_ermite_mirror_proto_rawDescGZIP(), []int{0}
191+}
192+
193+func (x *MirrorKey) GetAuthorizedKey() string {
194+ if x != nil {
195+ return x.AuthorizedKey
196+ }
197+ return ""
198+}
199+
200+func (x *MirrorKey) GetFingerprint() string {
201+ if x != nil {
202+ return x.Fingerprint
203+ }
204+ return ""
205+}
206+
207+func (x *MirrorKey) GetCreatedAt() *timestamppb.Timestamp {
208+ if x != nil {
209+ return x.CreatedAt
210+ }
211+ return nil
212+}
213+
214+// GetMirrorKeyRequest selects the input of GetMirrorKey.
215+type GetMirrorKeyRequest struct {
216+ state protoimpl.MessageState `protogen:"open.v1"`
217+ unknownFields protoimpl.UnknownFields
218+ sizeCache protoimpl.SizeCache
219+}
220+
221+func (x *GetMirrorKeyRequest) Reset() {
222+ *x = GetMirrorKeyRequest{}
223+ mi := &file_ermite_mirror_proto_msgTypes[1]
224+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
225+ ms.StoreMessageInfo(mi)
226+}
227+
228+func (x *GetMirrorKeyRequest) String() string {
229+ return protoimpl.X.MessageStringOf(x)
230+}
231+
232+func (*GetMirrorKeyRequest) ProtoMessage() {}
233+
234+func (x *GetMirrorKeyRequest) ProtoReflect() protoreflect.Message {
235+ mi := &file_ermite_mirror_proto_msgTypes[1]
236+ if x != nil {
237+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
238+ if ms.LoadMessageInfo() == nil {
239+ ms.StoreMessageInfo(mi)
240+ }
241+ return ms
242+ }
243+ return mi.MessageOf(x)
244+}
245+
246+// Deprecated: Use GetMirrorKeyRequest.ProtoReflect.Descriptor instead.
247+func (*GetMirrorKeyRequest) Descriptor() ([]byte, []int) {
248+ return file_ermite_mirror_proto_rawDescGZIP(), []int{1}
249+}
250+
251+// GetMirrorKeyResponse holds the result of GetMirrorKey.
252+type GetMirrorKeyResponse struct {
253+ state protoimpl.MessageState `protogen:"open.v1"`
254+ // Key is the public mirror key.
255+ Key *MirrorKey `protobuf:"bytes,1,opt,name=key,proto3" json:"key,omitempty"`
256+ unknownFields protoimpl.UnknownFields
257+ sizeCache protoimpl.SizeCache
258+}
259+
260+func (x *GetMirrorKeyResponse) Reset() {
261+ *x = GetMirrorKeyResponse{}
262+ mi := &file_ermite_mirror_proto_msgTypes[2]
263+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
264+ ms.StoreMessageInfo(mi)
265+}
266+
267+func (x *GetMirrorKeyResponse) String() string {
268+ return protoimpl.X.MessageStringOf(x)
269+}
270+
271+func (*GetMirrorKeyResponse) ProtoMessage() {}
272+
273+func (x *GetMirrorKeyResponse) ProtoReflect() protoreflect.Message {
274+ mi := &file_ermite_mirror_proto_msgTypes[2]
275+ if x != nil {
276+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
277+ if ms.LoadMessageInfo() == nil {
278+ ms.StoreMessageInfo(mi)
279+ }
280+ return ms
281+ }
282+ return mi.MessageOf(x)
283+}
284+
285+// Deprecated: Use GetMirrorKeyResponse.ProtoReflect.Descriptor instead.
286+func (*GetMirrorKeyResponse) Descriptor() ([]byte, []int) {
287+ return file_ermite_mirror_proto_rawDescGZIP(), []int{2}
288+}
289+
290+func (x *GetMirrorKeyResponse) GetKey() *MirrorKey {
291+ if x != nil {
292+ return x.Key
293+ }
294+ return nil
295+}
296+
297+// RotateMirrorKeyRequest selects the input of RotateMirrorKey.
298+type RotateMirrorKeyRequest struct {
299+ state protoimpl.MessageState `protogen:"open.v1"`
300+ unknownFields protoimpl.UnknownFields
301+ sizeCache protoimpl.SizeCache
302+}
303+
304+func (x *RotateMirrorKeyRequest) Reset() {
305+ *x = RotateMirrorKeyRequest{}
306+ mi := &file_ermite_mirror_proto_msgTypes[3]
307+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
308+ ms.StoreMessageInfo(mi)
309+}
310+
311+func (x *RotateMirrorKeyRequest) String() string {
312+ return protoimpl.X.MessageStringOf(x)
313+}
314+
315+func (*RotateMirrorKeyRequest) ProtoMessage() {}
316+
317+func (x *RotateMirrorKeyRequest) ProtoReflect() protoreflect.Message {
318+ mi := &file_ermite_mirror_proto_msgTypes[3]
319+ if x != nil {
320+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
321+ if ms.LoadMessageInfo() == nil {
322+ ms.StoreMessageInfo(mi)
323+ }
324+ return ms
325+ }
326+ return mi.MessageOf(x)
327+}
328+
329+// Deprecated: Use RotateMirrorKeyRequest.ProtoReflect.Descriptor instead.
330+func (*RotateMirrorKeyRequest) Descriptor() ([]byte, []int) {
331+ return file_ermite_mirror_proto_rawDescGZIP(), []int{3}
332+}
333+
334+// RotateMirrorKeyResponse holds the result of RotateMirrorKey.
335+type RotateMirrorKeyResponse struct {
336+ state protoimpl.MessageState `protogen:"open.v1"`
337+ // Key is the public mirror key.
338+ Key *MirrorKey `protobuf:"bytes,1,opt,name=key,proto3" json:"key,omitempty"`
339+ // PreviousFingerprint is the fingerprint of the replaced key.
340+ PreviousFingerprint string `protobuf:"bytes,2,opt,name=previous_fingerprint,json=previousFingerprint,proto3" json:"previous_fingerprint,omitempty"`
341+ unknownFields protoimpl.UnknownFields
342+ sizeCache protoimpl.SizeCache
343+}
344+
345+func (x *RotateMirrorKeyResponse) Reset() {
346+ *x = RotateMirrorKeyResponse{}
347+ mi := &file_ermite_mirror_proto_msgTypes[4]
348+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
349+ ms.StoreMessageInfo(mi)
350+}
351+
352+func (x *RotateMirrorKeyResponse) String() string {
353+ return protoimpl.X.MessageStringOf(x)
354+}
355+
356+func (*RotateMirrorKeyResponse) ProtoMessage() {}
357+
358+func (x *RotateMirrorKeyResponse) ProtoReflect() protoreflect.Message {
359+ mi := &file_ermite_mirror_proto_msgTypes[4]
360+ if x != nil {
361+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
362+ if ms.LoadMessageInfo() == nil {
363+ ms.StoreMessageInfo(mi)
364+ }
365+ return ms
366+ }
367+ return mi.MessageOf(x)
368+}
369+
370+// Deprecated: Use RotateMirrorKeyResponse.ProtoReflect.Descriptor instead.
371+func (*RotateMirrorKeyResponse) Descriptor() ([]byte, []int) {
372+ return file_ermite_mirror_proto_rawDescGZIP(), []int{4}
373+}
374+
375+func (x *RotateMirrorKeyResponse) GetKey() *MirrorKey {
376+ if x != nil {
377+ return x.Key
378+ }
379+ return nil
380+}
381+
382+func (x *RotateMirrorKeyResponse) GetPreviousFingerprint() string {
383+ if x != nil {
384+ return x.PreviousFingerprint
385+ }
386+ return ""
387+}
388+
389+// MirrorConfig is the server-wide push mirror policy.
390+type MirrorConfig struct {
391+ state protoimpl.MessageState `protogen:"open.v1"`
392+ // Enabled says whether mirroring is enabled.
393+ Enabled bool `protobuf:"varint,1,opt,name=enabled,proto3" json:"enabled,omitempty"`
394+ // URLTemplate is an SSH URL containing "{repo}", replaced with the
395+ // repository name.
396+ UrlTemplate string `protobuf:"bytes,2,opt,name=url_template,json=urlTemplate,proto3" json:"url_template,omitempty"`
397+ // Cron is a five-field cron expression in UTC, no more frequent than every
398+ // five minutes.
399+ Cron string `protobuf:"bytes,3,opt,name=cron,proto3" json:"cron,omitempty"`
400+ // AllBranches includes every branch rather than only the default branch.
401+ // Tags are always included.
402+ AllBranches bool `protobuf:"varint,4,opt,name=all_branches,json=allBranches,proto3" json:"all_branches,omitempty"`
403+ // UpdatedAt is when the configuration was last changed.
404+ UpdatedAt *timestamppb.Timestamp `protobuf:"bytes,5,opt,name=updated_at,json=updatedAt,proto3" json:"updated_at,omitempty"`
405+ unknownFields protoimpl.UnknownFields
406+ sizeCache protoimpl.SizeCache
407+}
408+
409+func (x *MirrorConfig) Reset() {
410+ *x = MirrorConfig{}
411+ mi := &file_ermite_mirror_proto_msgTypes[5]
412+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
413+ ms.StoreMessageInfo(mi)
414+}
415+
416+func (x *MirrorConfig) String() string {
417+ return protoimpl.X.MessageStringOf(x)
418+}
419+
420+func (*MirrorConfig) ProtoMessage() {}
421+
422+func (x *MirrorConfig) ProtoReflect() protoreflect.Message {
423+ mi := &file_ermite_mirror_proto_msgTypes[5]
424+ if x != nil {
425+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
426+ if ms.LoadMessageInfo() == nil {
427+ ms.StoreMessageInfo(mi)
428+ }
429+ return ms
430+ }
431+ return mi.MessageOf(x)
432+}
433+
434+// Deprecated: Use MirrorConfig.ProtoReflect.Descriptor instead.
435+func (*MirrorConfig) Descriptor() ([]byte, []int) {
436+ return file_ermite_mirror_proto_rawDescGZIP(), []int{5}
437+}
438+
439+func (x *MirrorConfig) GetEnabled() bool {
440+ if x != nil {
441+ return x.Enabled
442+ }
443+ return false
444+}
445+
446+func (x *MirrorConfig) GetUrlTemplate() string {
447+ if x != nil {
448+ return x.UrlTemplate
449+ }
450+ return ""
451+}
452+
453+func (x *MirrorConfig) GetCron() string {
454+ if x != nil {
455+ return x.Cron
456+ }
457+ return ""
458+}
459+
460+func (x *MirrorConfig) GetAllBranches() bool {
461+ if x != nil {
462+ return x.AllBranches
463+ }
464+ return false
465+}
466+
467+func (x *MirrorConfig) GetUpdatedAt() *timestamppb.Timestamp {
468+ if x != nil {
469+ return x.UpdatedAt
470+ }
471+ return nil
472+}
473+
474+// GetMirrorConfigRequest selects the input of GetMirrorConfig.
475+type GetMirrorConfigRequest struct {
476+ state protoimpl.MessageState `protogen:"open.v1"`
477+ unknownFields protoimpl.UnknownFields
478+ sizeCache protoimpl.SizeCache
479+}
480+
481+func (x *GetMirrorConfigRequest) Reset() {
482+ *x = GetMirrorConfigRequest{}
483+ mi := &file_ermite_mirror_proto_msgTypes[6]
484+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
485+ ms.StoreMessageInfo(mi)
486+}
487+
488+func (x *GetMirrorConfigRequest) String() string {
489+ return protoimpl.X.MessageStringOf(x)
490+}
491+
492+func (*GetMirrorConfigRequest) ProtoMessage() {}
493+
494+func (x *GetMirrorConfigRequest) ProtoReflect() protoreflect.Message {
495+ mi := &file_ermite_mirror_proto_msgTypes[6]
496+ if x != nil {
497+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
498+ if ms.LoadMessageInfo() == nil {
499+ ms.StoreMessageInfo(mi)
500+ }
501+ return ms
502+ }
503+ return mi.MessageOf(x)
504+}
505+
506+// Deprecated: Use GetMirrorConfigRequest.ProtoReflect.Descriptor instead.
507+func (*GetMirrorConfigRequest) Descriptor() ([]byte, []int) {
508+ return file_ermite_mirror_proto_rawDescGZIP(), []int{6}
509+}
510+
511+// GetMirrorConfigResponse holds the result of GetMirrorConfig.
512+type GetMirrorConfigResponse struct {
513+ state protoimpl.MessageState `protogen:"open.v1"`
514+ // Config is the global mirror policy.
515+ Config *MirrorConfig `protobuf:"bytes,1,opt,name=config,proto3" json:"config,omitempty"`
516+ unknownFields protoimpl.UnknownFields
517+ sizeCache protoimpl.SizeCache
518+}
519+
520+func (x *GetMirrorConfigResponse) Reset() {
521+ *x = GetMirrorConfigResponse{}
522+ mi := &file_ermite_mirror_proto_msgTypes[7]
523+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
524+ ms.StoreMessageInfo(mi)
525+}
526+
527+func (x *GetMirrorConfigResponse) String() string {
528+ return protoimpl.X.MessageStringOf(x)
529+}
530+
531+func (*GetMirrorConfigResponse) ProtoMessage() {}
532+
533+func (x *GetMirrorConfigResponse) ProtoReflect() protoreflect.Message {
534+ mi := &file_ermite_mirror_proto_msgTypes[7]
535+ if x != nil {
536+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
537+ if ms.LoadMessageInfo() == nil {
538+ ms.StoreMessageInfo(mi)
539+ }
540+ return ms
541+ }
542+ return mi.MessageOf(x)
543+}
544+
545+// Deprecated: Use GetMirrorConfigResponse.ProtoReflect.Descriptor instead.
546+func (*GetMirrorConfigResponse) Descriptor() ([]byte, []int) {
547+ return file_ermite_mirror_proto_rawDescGZIP(), []int{7}
548+}
549+
550+func (x *GetMirrorConfigResponse) GetConfig() *MirrorConfig {
551+ if x != nil {
552+ return x.Config
553+ }
554+ return nil
555+}
556+
557+// SetMirrorConfigRequest selects the input of SetMirrorConfig.
558+type SetMirrorConfigRequest struct {
559+ state protoimpl.MessageState `protogen:"open.v1"`
560+ // Enabled says whether mirroring is enabled. Unset means unchanged.
561+ Enabled *bool `protobuf:"varint,1,opt,name=enabled,proto3,oneof" json:"enabled,omitempty"`
562+ // URLTemplate is an SSH URL containing "{repo}", replaced with the
563+ // repository name. Unset means unchanged.
564+ UrlTemplate *string `protobuf:"bytes,2,opt,name=url_template,json=urlTemplate,proto3,oneof" json:"url_template,omitempty"`
565+ // Cron is a five-field cron expression in UTC, no more frequent than every
566+ // five minutes. Unset means unchanged.
567+ Cron *string `protobuf:"bytes,3,opt,name=cron,proto3,oneof" json:"cron,omitempty"`
568+ // AllBranches includes every branch rather than only the default branch.
569+ // Tags are always included. Unset means unchanged.
570+ AllBranches *bool `protobuf:"varint,4,opt,name=all_branches,json=allBranches,proto3,oneof" json:"all_branches,omitempty"`
571+ unknownFields protoimpl.UnknownFields
572+ sizeCache protoimpl.SizeCache
573+}
574+
575+func (x *SetMirrorConfigRequest) Reset() {
576+ *x = SetMirrorConfigRequest{}
577+ mi := &file_ermite_mirror_proto_msgTypes[8]
578+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
579+ ms.StoreMessageInfo(mi)
580+}
581+
582+func (x *SetMirrorConfigRequest) String() string {
583+ return protoimpl.X.MessageStringOf(x)
584+}
585+
586+func (*SetMirrorConfigRequest) ProtoMessage() {}
587+
588+func (x *SetMirrorConfigRequest) ProtoReflect() protoreflect.Message {
589+ mi := &file_ermite_mirror_proto_msgTypes[8]
590+ if x != nil {
591+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
592+ if ms.LoadMessageInfo() == nil {
593+ ms.StoreMessageInfo(mi)
594+ }
595+ return ms
596+ }
597+ return mi.MessageOf(x)
598+}
599+
600+// Deprecated: Use SetMirrorConfigRequest.ProtoReflect.Descriptor instead.
601+func (*SetMirrorConfigRequest) Descriptor() ([]byte, []int) {
602+ return file_ermite_mirror_proto_rawDescGZIP(), []int{8}
603+}
604+
605+func (x *SetMirrorConfigRequest) GetEnabled() bool {
606+ if x != nil && x.Enabled != nil {
607+ return *x.Enabled
608+ }
609+ return false
610+}
611+
612+func (x *SetMirrorConfigRequest) GetUrlTemplate() string {
613+ if x != nil && x.UrlTemplate != nil {
614+ return *x.UrlTemplate
615+ }
616+ return ""
617+}
618+
619+func (x *SetMirrorConfigRequest) GetCron() string {
620+ if x != nil && x.Cron != nil {
621+ return *x.Cron
622+ }
623+ return ""
624+}
625+
626+func (x *SetMirrorConfigRequest) GetAllBranches() bool {
627+ if x != nil && x.AllBranches != nil {
628+ return *x.AllBranches
629+ }
630+ return false
631+}
632+
633+// SetMirrorConfigResponse holds the result of SetMirrorConfig.
634+type SetMirrorConfigResponse struct {
635+ state protoimpl.MessageState `protogen:"open.v1"`
636+ // Config is the global mirror policy.
637+ Config *MirrorConfig `protobuf:"bytes,1,opt,name=config,proto3" json:"config,omitempty"`
638+ unknownFields protoimpl.UnknownFields
639+ sizeCache protoimpl.SizeCache
640+}
641+
642+func (x *SetMirrorConfigResponse) Reset() {
643+ *x = SetMirrorConfigResponse{}
644+ mi := &file_ermite_mirror_proto_msgTypes[9]
645+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
646+ ms.StoreMessageInfo(mi)
647+}
648+
649+func (x *SetMirrorConfigResponse) String() string {
650+ return protoimpl.X.MessageStringOf(x)
651+}
652+
653+func (*SetMirrorConfigResponse) ProtoMessage() {}
654+
655+func (x *SetMirrorConfigResponse) ProtoReflect() protoreflect.Message {
656+ mi := &file_ermite_mirror_proto_msgTypes[9]
657+ if x != nil {
658+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
659+ if ms.LoadMessageInfo() == nil {
660+ ms.StoreMessageInfo(mi)
661+ }
662+ return ms
663+ }
664+ return mi.MessageOf(x)
665+}
666+
667+// Deprecated: Use SetMirrorConfigResponse.ProtoReflect.Descriptor instead.
668+func (*SetMirrorConfigResponse) Descriptor() ([]byte, []int) {
669+ return file_ermite_mirror_proto_rawDescGZIP(), []int{9}
670+}
671+
672+func (x *SetMirrorConfigResponse) GetConfig() *MirrorConfig {
673+ if x != nil {
674+ return x.Config
675+ }
676+ return nil
677+}
678+
679+// MirrorTarget is the resolved push mirror target of a repository.
680+type MirrorTarget struct {
681+ state protoimpl.MessageState `protogen:"open.v1"`
682+ // Repo is the repository name.
683+ Repo string `protobuf:"bytes,1,opt,name=repo,proto3" json:"repo,omitempty"`
684+ // Enabled says whether mirroring is enabled.
685+ Enabled bool `protobuf:"varint,2,opt,name=enabled,proto3" json:"enabled,omitempty"`
686+ // URL is the SSH destination of the mirror.
687+ Url string `protobuf:"bytes,3,opt,name=url,proto3" json:"url,omitempty"`
688+ // Cron is a five-field cron expression in UTC, no more frequent than every
689+ // five minutes.
690+ Cron string `protobuf:"bytes,4,opt,name=cron,proto3" json:"cron,omitempty"`
691+ // AllBranches includes every branch rather than only the default branch.
692+ // Tags are always included.
693+ AllBranches bool `protobuf:"varint,5,opt,name=all_branches,json=allBranches,proto3" json:"all_branches,omitempty"`
694+ // Source is the configuration used to resolve the target.
695+ Source MirrorSource `protobuf:"varint,6,opt,name=source,proto3,enum=ermite.MirrorSource" json:"source,omitempty"`
696+ unknownFields protoimpl.UnknownFields
697+ sizeCache protoimpl.SizeCache
698+}
699+
700+func (x *MirrorTarget) Reset() {
701+ *x = MirrorTarget{}
702+ mi := &file_ermite_mirror_proto_msgTypes[10]
703+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
704+ ms.StoreMessageInfo(mi)
705+}
706+
707+func (x *MirrorTarget) String() string {
708+ return protoimpl.X.MessageStringOf(x)
709+}
710+
711+func (*MirrorTarget) ProtoMessage() {}
712+
713+func (x *MirrorTarget) ProtoReflect() protoreflect.Message {
714+ mi := &file_ermite_mirror_proto_msgTypes[10]
715+ if x != nil {
716+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
717+ if ms.LoadMessageInfo() == nil {
718+ ms.StoreMessageInfo(mi)
719+ }
720+ return ms
721+ }
722+ return mi.MessageOf(x)
723+}
724+
725+// Deprecated: Use MirrorTarget.ProtoReflect.Descriptor instead.
726+func (*MirrorTarget) Descriptor() ([]byte, []int) {
727+ return file_ermite_mirror_proto_rawDescGZIP(), []int{10}
728+}
729+
730+func (x *MirrorTarget) GetRepo() string {
731+ if x != nil {
732+ return x.Repo
733+ }
734+ return ""
735+}
736+
737+func (x *MirrorTarget) GetEnabled() bool {
738+ if x != nil {
739+ return x.Enabled
740+ }
741+ return false
742+}
743+
744+func (x *MirrorTarget) GetUrl() string {
745+ if x != nil {
746+ return x.Url
747+ }
748+ return ""
749+}
750+
751+func (x *MirrorTarget) GetCron() string {
752+ if x != nil {
753+ return x.Cron
754+ }
755+ return ""
756+}
757+
758+func (x *MirrorTarget) GetAllBranches() bool {
759+ if x != nil {
760+ return x.AllBranches
761+ }
762+ return false
763+}
764+
765+func (x *MirrorTarget) GetSource() MirrorSource {
766+ if x != nil {
767+ return x.Source
768+ }
769+ return MirrorSource_MIRROR_SOURCE_UNSPECIFIED
770+}
771+
772+// SetRepoMirrorRequest selects the input of SetRepoMirror.
773+type SetRepoMirrorRequest struct {
774+ state protoimpl.MessageState `protogen:"open.v1"`
775+ // Repo is the repository name.
776+ Repo string `protobuf:"bytes,1,opt,name=repo,proto3" json:"repo,omitempty"`
777+ // URL is the SSH destination of the mirror.
778+ Url string `protobuf:"bytes,2,opt,name=url,proto3" json:"url,omitempty"`
779+ // Cron is a five-field cron expression in UTC, no more frequent than every
780+ // five minutes.
781+ // Empty means inherit the global cron.
782+ Cron string `protobuf:"bytes,3,opt,name=cron,proto3" json:"cron,omitempty"`
783+ // AllBranches includes every branch rather than only the default branch.
784+ // Tags are always included. Unset means inherit the global setting.
785+ AllBranches *bool `protobuf:"varint,4,opt,name=all_branches,json=allBranches,proto3,oneof" json:"all_branches,omitempty"`
786+ unknownFields protoimpl.UnknownFields
787+ sizeCache protoimpl.SizeCache
788+}
789+
790+func (x *SetRepoMirrorRequest) Reset() {
791+ *x = SetRepoMirrorRequest{}
792+ mi := &file_ermite_mirror_proto_msgTypes[11]
793+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
794+ ms.StoreMessageInfo(mi)
795+}
796+
797+func (x *SetRepoMirrorRequest) String() string {
798+ return protoimpl.X.MessageStringOf(x)
799+}
800+
801+func (*SetRepoMirrorRequest) ProtoMessage() {}
802+
803+func (x *SetRepoMirrorRequest) ProtoReflect() protoreflect.Message {
804+ mi := &file_ermite_mirror_proto_msgTypes[11]
805+ if x != nil {
806+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
807+ if ms.LoadMessageInfo() == nil {
808+ ms.StoreMessageInfo(mi)
809+ }
810+ return ms
811+ }
812+ return mi.MessageOf(x)
813+}
814+
815+// Deprecated: Use SetRepoMirrorRequest.ProtoReflect.Descriptor instead.
816+func (*SetRepoMirrorRequest) Descriptor() ([]byte, []int) {
817+ return file_ermite_mirror_proto_rawDescGZIP(), []int{11}
818+}
819+
820+func (x *SetRepoMirrorRequest) GetRepo() string {
821+ if x != nil {
822+ return x.Repo
823+ }
824+ return ""
825+}
826+
827+func (x *SetRepoMirrorRequest) GetUrl() string {
828+ if x != nil {
829+ return x.Url
830+ }
831+ return ""
832+}
833+
834+func (x *SetRepoMirrorRequest) GetCron() string {
835+ if x != nil {
836+ return x.Cron
837+ }
838+ return ""
839+}
840+
841+func (x *SetRepoMirrorRequest) GetAllBranches() bool {
842+ if x != nil && x.AllBranches != nil {
843+ return *x.AllBranches
844+ }
845+ return false
846+}
847+
848+// SetRepoMirrorResponse holds the result of SetRepoMirror.
849+type SetRepoMirrorResponse struct {
850+ state protoimpl.MessageState `protogen:"open.v1"`
851+ // Target is the resolved mirror target.
852+ Target *MirrorTarget `protobuf:"bytes,1,opt,name=target,proto3" json:"target,omitempty"`
853+ unknownFields protoimpl.UnknownFields
854+ sizeCache protoimpl.SizeCache
855+}
856+
857+func (x *SetRepoMirrorResponse) Reset() {
858+ *x = SetRepoMirrorResponse{}
859+ mi := &file_ermite_mirror_proto_msgTypes[12]
860+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
861+ ms.StoreMessageInfo(mi)
862+}
863+
864+func (x *SetRepoMirrorResponse) String() string {
865+ return protoimpl.X.MessageStringOf(x)
866+}
867+
868+func (*SetRepoMirrorResponse) ProtoMessage() {}
869+
870+func (x *SetRepoMirrorResponse) ProtoReflect() protoreflect.Message {
871+ mi := &file_ermite_mirror_proto_msgTypes[12]
872+ if x != nil {
873+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
874+ if ms.LoadMessageInfo() == nil {
875+ ms.StoreMessageInfo(mi)
876+ }
877+ return ms
878+ }
879+ return mi.MessageOf(x)
880+}
881+
882+// Deprecated: Use SetRepoMirrorResponse.ProtoReflect.Descriptor instead.
883+func (*SetRepoMirrorResponse) Descriptor() ([]byte, []int) {
884+ return file_ermite_mirror_proto_rawDescGZIP(), []int{12}
885+}
886+
887+func (x *SetRepoMirrorResponse) GetTarget() *MirrorTarget {
888+ if x != nil {
889+ return x.Target
890+ }
891+ return nil
892+}
893+
894+// RemoveRepoMirrorRequest selects the input of RemoveRepoMirror.
895+type RemoveRepoMirrorRequest struct {
896+ state protoimpl.MessageState `protogen:"open.v1"`
897+ // Repo is the repository name.
898+ Repo string `protobuf:"bytes,1,opt,name=repo,proto3" json:"repo,omitempty"`
899+ unknownFields protoimpl.UnknownFields
900+ sizeCache protoimpl.SizeCache
901+}
902+
903+func (x *RemoveRepoMirrorRequest) Reset() {
904+ *x = RemoveRepoMirrorRequest{}
905+ mi := &file_ermite_mirror_proto_msgTypes[13]
906+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
907+ ms.StoreMessageInfo(mi)
908+}
909+
910+func (x *RemoveRepoMirrorRequest) String() string {
911+ return protoimpl.X.MessageStringOf(x)
912+}
913+
914+func (*RemoveRepoMirrorRequest) ProtoMessage() {}
915+
916+func (x *RemoveRepoMirrorRequest) ProtoReflect() protoreflect.Message {
917+ mi := &file_ermite_mirror_proto_msgTypes[13]
918+ if x != nil {
919+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
920+ if ms.LoadMessageInfo() == nil {
921+ ms.StoreMessageInfo(mi)
922+ }
923+ return ms
924+ }
925+ return mi.MessageOf(x)
926+}
927+
928+// Deprecated: Use RemoveRepoMirrorRequest.ProtoReflect.Descriptor instead.
929+func (*RemoveRepoMirrorRequest) Descriptor() ([]byte, []int) {
930+ return file_ermite_mirror_proto_rawDescGZIP(), []int{13}
931+}
932+
933+func (x *RemoveRepoMirrorRequest) GetRepo() string {
934+ if x != nil {
935+ return x.Repo
936+ }
937+ return ""
938+}
939+
940+// RemoveRepoMirrorResponse holds the result of RemoveRepoMirror.
941+type RemoveRepoMirrorResponse struct {
942+ state protoimpl.MessageState `protogen:"open.v1"`
943+ unknownFields protoimpl.UnknownFields
944+ sizeCache protoimpl.SizeCache
945+}
946+
947+func (x *RemoveRepoMirrorResponse) Reset() {
948+ *x = RemoveRepoMirrorResponse{}
949+ mi := &file_ermite_mirror_proto_msgTypes[14]
950+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
951+ ms.StoreMessageInfo(mi)
952+}
953+
954+func (x *RemoveRepoMirrorResponse) String() string {
955+ return protoimpl.X.MessageStringOf(x)
956+}
957+
958+func (*RemoveRepoMirrorResponse) ProtoMessage() {}
959+
960+func (x *RemoveRepoMirrorResponse) ProtoReflect() protoreflect.Message {
961+ mi := &file_ermite_mirror_proto_msgTypes[14]
962+ if x != nil {
963+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
964+ if ms.LoadMessageInfo() == nil {
965+ ms.StoreMessageInfo(mi)
966+ }
967+ return ms
968+ }
969+ return mi.MessageOf(x)
970+}
971+
972+// Deprecated: Use RemoveRepoMirrorResponse.ProtoReflect.Descriptor instead.
973+func (*RemoveRepoMirrorResponse) Descriptor() ([]byte, []int) {
974+ return file_ermite_mirror_proto_rawDescGZIP(), []int{14}
975+}
976+
977+// SetRepoMirrorExcludedRequest selects the input of SetRepoMirrorExcluded.
978+type SetRepoMirrorExcludedRequest struct {
979+ state protoimpl.MessageState `protogen:"open.v1"`
980+ // Repo is the repository name.
981+ Repo string `protobuf:"bytes,1,opt,name=repo,proto3" json:"repo,omitempty"`
982+ // Excluded opts out of the global template, unless a URL override exists.
983+ Excluded bool `protobuf:"varint,2,opt,name=excluded,proto3" json:"excluded,omitempty"`
984+ unknownFields protoimpl.UnknownFields
985+ sizeCache protoimpl.SizeCache
986+}
987+
988+func (x *SetRepoMirrorExcludedRequest) Reset() {
989+ *x = SetRepoMirrorExcludedRequest{}
990+ mi := &file_ermite_mirror_proto_msgTypes[15]
991+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
992+ ms.StoreMessageInfo(mi)
993+}
994+
995+func (x *SetRepoMirrorExcludedRequest) String() string {
996+ return protoimpl.X.MessageStringOf(x)
997+}
998+
999+func (*SetRepoMirrorExcludedRequest) ProtoMessage() {}
1000+
1001+func (x *SetRepoMirrorExcludedRequest) ProtoReflect() protoreflect.Message {
1002+ mi := &file_ermite_mirror_proto_msgTypes[15]
1003+ if x != nil {
1004+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
1005+ if ms.LoadMessageInfo() == nil {
1006+ ms.StoreMessageInfo(mi)
1007+ }
1008+ return ms
1009+ }
1010+ return mi.MessageOf(x)
1011+}
1012+
1013+// Deprecated: Use SetRepoMirrorExcludedRequest.ProtoReflect.Descriptor instead.
1014+func (*SetRepoMirrorExcludedRequest) Descriptor() ([]byte, []int) {
1015+ return file_ermite_mirror_proto_rawDescGZIP(), []int{15}
1016+}
1017+
1018+func (x *SetRepoMirrorExcludedRequest) GetRepo() string {
1019+ if x != nil {
1020+ return x.Repo
1021+ }
1022+ return ""
1023+}
1024+
1025+func (x *SetRepoMirrorExcludedRequest) GetExcluded() bool {
1026+ if x != nil {
1027+ return x.Excluded
1028+ }
1029+ return false
1030+}
1031+
1032+// SetRepoMirrorExcludedResponse holds the result of SetRepoMirrorExcluded.
1033+type SetRepoMirrorExcludedResponse struct {
1034+ state protoimpl.MessageState `protogen:"open.v1"`
1035+ // Target is the resolved mirror target.
1036+ Target *MirrorTarget `protobuf:"bytes,1,opt,name=target,proto3" json:"target,omitempty"`
1037+ unknownFields protoimpl.UnknownFields
1038+ sizeCache protoimpl.SizeCache
1039+}
1040+
1041+func (x *SetRepoMirrorExcludedResponse) Reset() {
1042+ *x = SetRepoMirrorExcludedResponse{}
1043+ mi := &file_ermite_mirror_proto_msgTypes[16]
1044+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
1045+ ms.StoreMessageInfo(mi)
1046+}
1047+
1048+func (x *SetRepoMirrorExcludedResponse) String() string {
1049+ return protoimpl.X.MessageStringOf(x)
1050+}
1051+
1052+func (*SetRepoMirrorExcludedResponse) ProtoMessage() {}
1053+
1054+func (x *SetRepoMirrorExcludedResponse) ProtoReflect() protoreflect.Message {
1055+ mi := &file_ermite_mirror_proto_msgTypes[16]
1056+ if x != nil {
1057+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
1058+ if ms.LoadMessageInfo() == nil {
1059+ ms.StoreMessageInfo(mi)
1060+ }
1061+ return ms
1062+ }
1063+ return mi.MessageOf(x)
1064+}
1065+
1066+// Deprecated: Use SetRepoMirrorExcludedResponse.ProtoReflect.Descriptor instead.
1067+func (*SetRepoMirrorExcludedResponse) Descriptor() ([]byte, []int) {
1068+ return file_ermite_mirror_proto_rawDescGZIP(), []int{16}
1069+}
1070+
1071+func (x *SetRepoMirrorExcludedResponse) GetTarget() *MirrorTarget {
1072+ if x != nil {
1073+ return x.Target
1074+ }
1075+ return nil
1076+}
1077+
1078+// MirrorStatus describes a repository mirror and its last attempts.
1079+type MirrorStatus struct {
1080+ state protoimpl.MessageState `protogen:"open.v1"`
1081+ // Target is the resolved mirror target.
1082+ Target *MirrorTarget `protobuf:"bytes,1,opt,name=target,proto3" json:"target,omitempty"`
1083+ // State is the current mirror state.
1084+ State MirrorState `protobuf:"varint,2,opt,name=state,proto3,enum=ermite.MirrorState" json:"state,omitempty"`
1085+ // FailureClass is the failure category, empty when there is no failure.
1086+ FailureClass string `protobuf:"bytes,3,opt,name=failure_class,json=failureClass,proto3" json:"failure_class,omitempty"`
1087+ // Reason explains the current state.
1088+ Reason string `protobuf:"bytes,4,opt,name=reason,proto3" json:"reason,omitempty"`
1089+ // Detail is the last error detail, returned only to callers with repo:admin
1090+ // on the repository.
1091+ Detail string `protobuf:"bytes,5,opt,name=detail,proto3" json:"detail,omitempty"`
1092+ // ConsecutiveFailures counts failed attempts since the last success or
1093+ // reset.
1094+ ConsecutiveFailures int32 `protobuf:"varint,6,opt,name=consecutive_failures,json=consecutiveFailures,proto3" json:"consecutive_failures,omitempty"`
1095+ // LastAttemptAt is when the last sync was attempted.
1096+ LastAttemptAt *timestamppb.Timestamp `protobuf:"bytes,7,opt,name=last_attempt_at,json=lastAttemptAt,proto3" json:"last_attempt_at,omitempty"`
1097+ // LastSuccessAt is when the last sync succeeded, including a no-op.
1098+ LastSuccessAt *timestamppb.Timestamp `protobuf:"bytes,8,opt,name=last_success_at,json=lastSuccessAt,proto3" json:"last_success_at,omitempty"`
1099+ // NextRetryAt is the next retry time while failing; otherwise unset.
1100+ NextRetryAt *timestamppb.Timestamp `protobuf:"bytes,9,opt,name=next_retry_at,json=nextRetryAt,proto3" json:"next_retry_at,omitempty"`
1101+ // NextRunAt is the next scheduled sync time, or the retry time while
1102+ // failing.
1103+ NextRunAt *timestamppb.Timestamp `protobuf:"bytes,10,opt,name=next_run_at,json=nextRunAt,proto3" json:"next_run_at,omitempty"`
1104+ // PausedAt is when the mirror was paused; otherwise unset.
1105+ PausedAt *timestamppb.Timestamp `protobuf:"bytes,11,opt,name=paused_at,json=pausedAt,proto3" json:"paused_at,omitempty"`
1106+ unknownFields protoimpl.UnknownFields
1107+ sizeCache protoimpl.SizeCache
1108+}
1109+
1110+func (x *MirrorStatus) Reset() {
1111+ *x = MirrorStatus{}
1112+ mi := &file_ermite_mirror_proto_msgTypes[17]
1113+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
1114+ ms.StoreMessageInfo(mi)
1115+}
1116+
1117+func (x *MirrorStatus) String() string {
1118+ return protoimpl.X.MessageStringOf(x)
1119+}
1120+
1121+func (*MirrorStatus) ProtoMessage() {}
1122+
1123+func (x *MirrorStatus) ProtoReflect() protoreflect.Message {
1124+ mi := &file_ermite_mirror_proto_msgTypes[17]
1125+ if x != nil {
1126+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
1127+ if ms.LoadMessageInfo() == nil {
1128+ ms.StoreMessageInfo(mi)
1129+ }
1130+ return ms
1131+ }
1132+ return mi.MessageOf(x)
1133+}
1134+
1135+// Deprecated: Use MirrorStatus.ProtoReflect.Descriptor instead.
1136+func (*MirrorStatus) Descriptor() ([]byte, []int) {
1137+ return file_ermite_mirror_proto_rawDescGZIP(), []int{17}
1138+}
1139+
1140+func (x *MirrorStatus) GetTarget() *MirrorTarget {
1141+ if x != nil {
1142+ return x.Target
1143+ }
1144+ return nil
1145+}
1146+
1147+func (x *MirrorStatus) GetState() MirrorState {
1148+ if x != nil {
1149+ return x.State
1150+ }
1151+ return MirrorState_MIRROR_STATE_UNSPECIFIED
1152+}
1153+
1154+func (x *MirrorStatus) GetFailureClass() string {
1155+ if x != nil {
1156+ return x.FailureClass
1157+ }
1158+ return ""
1159+}
1160+
1161+func (x *MirrorStatus) GetReason() string {
1162+ if x != nil {
1163+ return x.Reason
1164+ }
1165+ return ""
1166+}
1167+
1168+func (x *MirrorStatus) GetDetail() string {
1169+ if x != nil {
1170+ return x.Detail
1171+ }
1172+ return ""
1173+}
1174+
1175+func (x *MirrorStatus) GetConsecutiveFailures() int32 {
1176+ if x != nil {
1177+ return x.ConsecutiveFailures
1178+ }
1179+ return 0
1180+}
1181+
1182+func (x *MirrorStatus) GetLastAttemptAt() *timestamppb.Timestamp {
1183+ if x != nil {
1184+ return x.LastAttemptAt
1185+ }
1186+ return nil
1187+}
1188+
1189+func (x *MirrorStatus) GetLastSuccessAt() *timestamppb.Timestamp {
1190+ if x != nil {
1191+ return x.LastSuccessAt
1192+ }
1193+ return nil
1194+}
1195+
1196+func (x *MirrorStatus) GetNextRetryAt() *timestamppb.Timestamp {
1197+ if x != nil {
1198+ return x.NextRetryAt
1199+ }
1200+ return nil
1201+}
1202+
1203+func (x *MirrorStatus) GetNextRunAt() *timestamppb.Timestamp {
1204+ if x != nil {
1205+ return x.NextRunAt
1206+ }
1207+ return nil
1208+}
1209+
1210+func (x *MirrorStatus) GetPausedAt() *timestamppb.Timestamp {
1211+ if x != nil {
1212+ return x.PausedAt
1213+ }
1214+ return nil
1215+}
1216+
1217+// GetMirrorStatusRequest selects the input of GetMirrorStatus.
1218+type GetMirrorStatusRequest struct {
1219+ state protoimpl.MessageState `protogen:"open.v1"`
1220+ // Repo is the repository name.
1221+ Repo string `protobuf:"bytes,1,opt,name=repo,proto3" json:"repo,omitempty"`
1222+ unknownFields protoimpl.UnknownFields
1223+ sizeCache protoimpl.SizeCache
1224+}
1225+
1226+func (x *GetMirrorStatusRequest) Reset() {
1227+ *x = GetMirrorStatusRequest{}
1228+ mi := &file_ermite_mirror_proto_msgTypes[18]
1229+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
1230+ ms.StoreMessageInfo(mi)
1231+}
1232+
1233+func (x *GetMirrorStatusRequest) String() string {
1234+ return protoimpl.X.MessageStringOf(x)
1235+}
1236+
1237+func (*GetMirrorStatusRequest) ProtoMessage() {}
1238+
1239+func (x *GetMirrorStatusRequest) ProtoReflect() protoreflect.Message {
1240+ mi := &file_ermite_mirror_proto_msgTypes[18]
1241+ if x != nil {
1242+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
1243+ if ms.LoadMessageInfo() == nil {
1244+ ms.StoreMessageInfo(mi)
1245+ }
1246+ return ms
1247+ }
1248+ return mi.MessageOf(x)
1249+}
1250+
1251+// Deprecated: Use GetMirrorStatusRequest.ProtoReflect.Descriptor instead.
1252+func (*GetMirrorStatusRequest) Descriptor() ([]byte, []int) {
1253+ return file_ermite_mirror_proto_rawDescGZIP(), []int{18}
1254+}
1255+
1256+func (x *GetMirrorStatusRequest) GetRepo() string {
1257+ if x != nil {
1258+ return x.Repo
1259+ }
1260+ return ""
1261+}
1262+
1263+// GetMirrorStatusResponse holds the result of GetMirrorStatus.
1264+type GetMirrorStatusResponse struct {
1265+ state protoimpl.MessageState `protogen:"open.v1"`
1266+ // Status is the current mirror status.
1267+ Status *MirrorStatus `protobuf:"bytes,1,opt,name=status,proto3" json:"status,omitempty"`
1268+ unknownFields protoimpl.UnknownFields
1269+ sizeCache protoimpl.SizeCache
1270+}
1271+
1272+func (x *GetMirrorStatusResponse) Reset() {
1273+ *x = GetMirrorStatusResponse{}
1274+ mi := &file_ermite_mirror_proto_msgTypes[19]
1275+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
1276+ ms.StoreMessageInfo(mi)
1277+}
1278+
1279+func (x *GetMirrorStatusResponse) String() string {
1280+ return protoimpl.X.MessageStringOf(x)
1281+}
1282+
1283+func (*GetMirrorStatusResponse) ProtoMessage() {}
1284+
1285+func (x *GetMirrorStatusResponse) ProtoReflect() protoreflect.Message {
1286+ mi := &file_ermite_mirror_proto_msgTypes[19]
1287+ if x != nil {
1288+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
1289+ if ms.LoadMessageInfo() == nil {
1290+ ms.StoreMessageInfo(mi)
1291+ }
1292+ return ms
1293+ }
1294+ return mi.MessageOf(x)
1295+}
1296+
1297+// Deprecated: Use GetMirrorStatusResponse.ProtoReflect.Descriptor instead.
1298+func (*GetMirrorStatusResponse) Descriptor() ([]byte, []int) {
1299+ return file_ermite_mirror_proto_rawDescGZIP(), []int{19}
1300+}
1301+
1302+func (x *GetMirrorStatusResponse) GetStatus() *MirrorStatus {
1303+ if x != nil {
1304+ return x.Status
1305+ }
1306+ return nil
1307+}
1308+
1309+// ListMirrorStatusRequest selects the input of ListMirrorStatus.
1310+type ListMirrorStatusRequest struct {
1311+ state protoimpl.MessageState `protogen:"open.v1"`
1312+ unknownFields protoimpl.UnknownFields
1313+ sizeCache protoimpl.SizeCache
1314+}
1315+
1316+func (x *ListMirrorStatusRequest) Reset() {
1317+ *x = ListMirrorStatusRequest{}
1318+ mi := &file_ermite_mirror_proto_msgTypes[20]
1319+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
1320+ ms.StoreMessageInfo(mi)
1321+}
1322+
1323+func (x *ListMirrorStatusRequest) String() string {
1324+ return protoimpl.X.MessageStringOf(x)
1325+}
1326+
1327+func (*ListMirrorStatusRequest) ProtoMessage() {}
1328+
1329+func (x *ListMirrorStatusRequest) ProtoReflect() protoreflect.Message {
1330+ mi := &file_ermite_mirror_proto_msgTypes[20]
1331+ if x != nil {
1332+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
1333+ if ms.LoadMessageInfo() == nil {
1334+ ms.StoreMessageInfo(mi)
1335+ }
1336+ return ms
1337+ }
1338+ return mi.MessageOf(x)
1339+}
1340+
1341+// Deprecated: Use ListMirrorStatusRequest.ProtoReflect.Descriptor instead.
1342+func (*ListMirrorStatusRequest) Descriptor() ([]byte, []int) {
1343+ return file_ermite_mirror_proto_rawDescGZIP(), []int{20}
1344+}
1345+
1346+// ListMirrorStatusResponse holds the result of ListMirrorStatus.
1347+type ListMirrorStatusResponse struct {
1348+ state protoimpl.MessageState `protogen:"open.v1"`
1349+ // Statuses are the mirror statuses.
1350+ Statuses []*MirrorStatus `protobuf:"bytes,1,rep,name=statuses,proto3" json:"statuses,omitempty"`
1351+ unknownFields protoimpl.UnknownFields
1352+ sizeCache protoimpl.SizeCache
1353+}
1354+
1355+func (x *ListMirrorStatusResponse) Reset() {
1356+ *x = ListMirrorStatusResponse{}
1357+ mi := &file_ermite_mirror_proto_msgTypes[21]
1358+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
1359+ ms.StoreMessageInfo(mi)
1360+}
1361+
1362+func (x *ListMirrorStatusResponse) String() string {
1363+ return protoimpl.X.MessageStringOf(x)
1364+}
1365+
1366+func (*ListMirrorStatusResponse) ProtoMessage() {}
1367+
1368+func (x *ListMirrorStatusResponse) ProtoReflect() protoreflect.Message {
1369+ mi := &file_ermite_mirror_proto_msgTypes[21]
1370+ if x != nil {
1371+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
1372+ if ms.LoadMessageInfo() == nil {
1373+ ms.StoreMessageInfo(mi)
1374+ }
1375+ return ms
1376+ }
1377+ return mi.MessageOf(x)
1378+}
1379+
1380+// Deprecated: Use ListMirrorStatusResponse.ProtoReflect.Descriptor instead.
1381+func (*ListMirrorStatusResponse) Descriptor() ([]byte, []int) {
1382+ return file_ermite_mirror_proto_rawDescGZIP(), []int{21}
1383+}
1384+
1385+func (x *ListMirrorStatusResponse) GetStatuses() []*MirrorStatus {
1386+ if x != nil {
1387+ return x.Statuses
1388+ }
1389+ return nil
1390+}
1391+
1392+// SyncMirrorRequest selects the input of SyncMirror.
1393+type SyncMirrorRequest struct {
1394+ state protoimpl.MessageState `protogen:"open.v1"`
1395+ // Repo is the repository name.
1396+ Repo string `protobuf:"bytes,1,opt,name=repo,proto3" json:"repo,omitempty"`
1397+ // All selects every repository and needs owner rights. Repo must be empty
1398+ // when true.
1399+ All bool `protobuf:"varint,2,opt,name=all,proto3" json:"all,omitempty"`
1400+ // Force lifts a pause and skips the no-op check and the 60-second manual
1401+ // throttle. It never forces a Git push.
1402+ Force bool `protobuf:"varint,3,opt,name=force,proto3" json:"force,omitempty"`
1403+ unknownFields protoimpl.UnknownFields
1404+ sizeCache protoimpl.SizeCache
1405+}
1406+
1407+func (x *SyncMirrorRequest) Reset() {
1408+ *x = SyncMirrorRequest{}
1409+ mi := &file_ermite_mirror_proto_msgTypes[22]
1410+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
1411+ ms.StoreMessageInfo(mi)
1412+}
1413+
1414+func (x *SyncMirrorRequest) String() string {
1415+ return protoimpl.X.MessageStringOf(x)
1416+}
1417+
1418+func (*SyncMirrorRequest) ProtoMessage() {}
1419+
1420+func (x *SyncMirrorRequest) ProtoReflect() protoreflect.Message {
1421+ mi := &file_ermite_mirror_proto_msgTypes[22]
1422+ if x != nil {
1423+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
1424+ if ms.LoadMessageInfo() == nil {
1425+ ms.StoreMessageInfo(mi)
1426+ }
1427+ return ms
1428+ }
1429+ return mi.MessageOf(x)
1430+}
1431+
1432+// Deprecated: Use SyncMirrorRequest.ProtoReflect.Descriptor instead.
1433+func (*SyncMirrorRequest) Descriptor() ([]byte, []int) {
1434+ return file_ermite_mirror_proto_rawDescGZIP(), []int{22}
1435+}
1436+
1437+func (x *SyncMirrorRequest) GetRepo() string {
1438+ if x != nil {
1439+ return x.Repo
1440+ }
1441+ return ""
1442+}
1443+
1444+func (x *SyncMirrorRequest) GetAll() bool {
1445+ if x != nil {
1446+ return x.All
1447+ }
1448+ return false
1449+}
1450+
1451+func (x *SyncMirrorRequest) GetForce() bool {
1452+ if x != nil {
1453+ return x.Force
1454+ }
1455+ return false
1456+}
1457+
1458+// SyncMirrorResult is the result of a sync request for one repository.
1459+type SyncMirrorResult struct {
1460+ state protoimpl.MessageState `protogen:"open.v1"`
1461+ // Repo is the repository name.
1462+ Repo string `protobuf:"bytes,1,opt,name=repo,proto3" json:"repo,omitempty"`
1463+ // Queued says another sync is running and this request was queued.
1464+ Queued bool `protobuf:"varint,2,opt,name=queued,proto3" json:"queued,omitempty"`
1465+ // NoOp says the refs already matched the last successful snapshot.
1466+ NoOp bool `protobuf:"varint,3,opt,name=no_op,json=noOp,proto3" json:"no_op,omitempty"`
1467+ // Status is the current mirror status.
1468+ Status *MirrorStatus `protobuf:"bytes,4,opt,name=status,proto3" json:"status,omitempty"`
1469+ unknownFields protoimpl.UnknownFields
1470+ sizeCache protoimpl.SizeCache
1471+}
1472+
1473+func (x *SyncMirrorResult) Reset() {
1474+ *x = SyncMirrorResult{}
1475+ mi := &file_ermite_mirror_proto_msgTypes[23]
1476+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
1477+ ms.StoreMessageInfo(mi)
1478+}
1479+
1480+func (x *SyncMirrorResult) String() string {
1481+ return protoimpl.X.MessageStringOf(x)
1482+}
1483+
1484+func (*SyncMirrorResult) ProtoMessage() {}
1485+
1486+func (x *SyncMirrorResult) ProtoReflect() protoreflect.Message {
1487+ mi := &file_ermite_mirror_proto_msgTypes[23]
1488+ if x != nil {
1489+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
1490+ if ms.LoadMessageInfo() == nil {
1491+ ms.StoreMessageInfo(mi)
1492+ }
1493+ return ms
1494+ }
1495+ return mi.MessageOf(x)
1496+}
1497+
1498+// Deprecated: Use SyncMirrorResult.ProtoReflect.Descriptor instead.
1499+func (*SyncMirrorResult) Descriptor() ([]byte, []int) {
1500+ return file_ermite_mirror_proto_rawDescGZIP(), []int{23}
1501+}
1502+
1503+func (x *SyncMirrorResult) GetRepo() string {
1504+ if x != nil {
1505+ return x.Repo
1506+ }
1507+ return ""
1508+}
1509+
1510+func (x *SyncMirrorResult) GetQueued() bool {
1511+ if x != nil {
1512+ return x.Queued
1513+ }
1514+ return false
1515+}
1516+
1517+func (x *SyncMirrorResult) GetNoOp() bool {
1518+ if x != nil {
1519+ return x.NoOp
1520+ }
1521+ return false
1522+}
1523+
1524+func (x *SyncMirrorResult) GetStatus() *MirrorStatus {
1525+ if x != nil {
1526+ return x.Status
1527+ }
1528+ return nil
1529+}
1530+
1531+// SyncMirrorResponse holds the result of SyncMirror.
1532+type SyncMirrorResponse struct {
1533+ state protoimpl.MessageState `protogen:"open.v1"`
1534+ // Results are the per-repository sync results.
1535+ Results []*SyncMirrorResult `protobuf:"bytes,1,rep,name=results,proto3" json:"results,omitempty"`
1536+ unknownFields protoimpl.UnknownFields
1537+ sizeCache protoimpl.SizeCache
1538+}
1539+
1540+func (x *SyncMirrorResponse) Reset() {
1541+ *x = SyncMirrorResponse{}
1542+ mi := &file_ermite_mirror_proto_msgTypes[24]
1543+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
1544+ ms.StoreMessageInfo(mi)
1545+}
1546+
1547+func (x *SyncMirrorResponse) String() string {
1548+ return protoimpl.X.MessageStringOf(x)
1549+}
1550+
1551+func (*SyncMirrorResponse) ProtoMessage() {}
1552+
1553+func (x *SyncMirrorResponse) ProtoReflect() protoreflect.Message {
1554+ mi := &file_ermite_mirror_proto_msgTypes[24]
1555+ if x != nil {
1556+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
1557+ if ms.LoadMessageInfo() == nil {
1558+ ms.StoreMessageInfo(mi)
1559+ }
1560+ return ms
1561+ }
1562+ return mi.MessageOf(x)
1563+}
1564+
1565+// Deprecated: Use SyncMirrorResponse.ProtoReflect.Descriptor instead.
1566+func (*SyncMirrorResponse) Descriptor() ([]byte, []int) {
1567+ return file_ermite_mirror_proto_rawDescGZIP(), []int{24}
1568+}
1569+
1570+func (x *SyncMirrorResponse) GetResults() []*SyncMirrorResult {
1571+ if x != nil {
1572+ return x.Results
1573+ }
1574+ return nil
1575+}
1576+
1577+var File_ermite_mirror_proto protoreflect.FileDescriptor
1578+
1579+const file_ermite_mirror_proto_rawDesc = "" +
1580+ "\n" +
1581+ "\x13ermite/mirror.proto\x12\x06ermite\x1a\x1fgoogle/protobuf/timestamp.proto\"\x8f\x01\n" +
1582+ "\tMirrorKey\x12%\n" +
1583+ "\x0eauthorized_key\x18\x01 \x01(\tR\rauthorizedKey\x12 \n" +
1584+ "\vfingerprint\x18\x02 \x01(\tR\vfingerprint\x129\n" +
1585+ "\n" +
1586+ "created_at\x18\x03 \x01(\v2\x1a.google.protobuf.TimestampR\tcreatedAt\"\x15\n" +
1587+ "\x13GetMirrorKeyRequest\";\n" +
1588+ "\x14GetMirrorKeyResponse\x12#\n" +
1589+ "\x03key\x18\x01 \x01(\v2\x11.ermite.MirrorKeyR\x03key\"\x18\n" +
1590+ "\x16RotateMirrorKeyRequest\"q\n" +
1591+ "\x17RotateMirrorKeyResponse\x12#\n" +
1592+ "\x03key\x18\x01 \x01(\v2\x11.ermite.MirrorKeyR\x03key\x121\n" +
1593+ "\x14previous_fingerprint\x18\x02 \x01(\tR\x13previousFingerprint\"\xbd\x01\n" +
1594+ "\fMirrorConfig\x12\x18\n" +
1595+ "\aenabled\x18\x01 \x01(\bR\aenabled\x12!\n" +
1596+ "\furl_template\x18\x02 \x01(\tR\vurlTemplate\x12\x12\n" +
1597+ "\x04cron\x18\x03 \x01(\tR\x04cron\x12!\n" +
1598+ "\fall_branches\x18\x04 \x01(\bR\vallBranches\x129\n" +
1599+ "\n" +
1600+ "updated_at\x18\x05 \x01(\v2\x1a.google.protobuf.TimestampR\tupdatedAt\"\x18\n" +
1601+ "\x16GetMirrorConfigRequest\"G\n" +
1602+ "\x17GetMirrorConfigResponse\x12,\n" +
1603+ "\x06config\x18\x01 \x01(\v2\x14.ermite.MirrorConfigR\x06config\"\xd7\x01\n" +
1604+ "\x16SetMirrorConfigRequest\x12\x1d\n" +
1605+ "\aenabled\x18\x01 \x01(\bH\x00R\aenabled\x88\x01\x01\x12&\n" +
1606+ "\furl_template\x18\x02 \x01(\tH\x01R\vurlTemplate\x88\x01\x01\x12\x17\n" +
1607+ "\x04cron\x18\x03 \x01(\tH\x02R\x04cron\x88\x01\x01\x12&\n" +
1608+ "\fall_branches\x18\x04 \x01(\bH\x03R\vallBranches\x88\x01\x01B\n" +
1609+ "\n" +
1610+ "\b_enabledB\x0f\n" +
1611+ "\r_url_templateB\a\n" +
1612+ "\x05_cronB\x0f\n" +
1613+ "\r_all_branches\"G\n" +
1614+ "\x17SetMirrorConfigResponse\x12,\n" +
1615+ "\x06config\x18\x01 \x01(\v2\x14.ermite.MirrorConfigR\x06config\"\xb3\x01\n" +
1616+ "\fMirrorTarget\x12\x12\n" +
1617+ "\x04repo\x18\x01 \x01(\tR\x04repo\x12\x18\n" +
1618+ "\aenabled\x18\x02 \x01(\bR\aenabled\x12\x10\n" +
1619+ "\x03url\x18\x03 \x01(\tR\x03url\x12\x12\n" +
1620+ "\x04cron\x18\x04 \x01(\tR\x04cron\x12!\n" +
1621+ "\fall_branches\x18\x05 \x01(\bR\vallBranches\x12,\n" +
1622+ "\x06source\x18\x06 \x01(\x0e2\x14.ermite.MirrorSourceR\x06source\"\x89\x01\n" +
1623+ "\x14SetRepoMirrorRequest\x12\x12\n" +
1624+ "\x04repo\x18\x01 \x01(\tR\x04repo\x12\x10\n" +
1625+ "\x03url\x18\x02 \x01(\tR\x03url\x12\x12\n" +
1626+ "\x04cron\x18\x03 \x01(\tR\x04cron\x12&\n" +
1627+ "\fall_branches\x18\x04 \x01(\bH\x00R\vallBranches\x88\x01\x01B\x0f\n" +
1628+ "\r_all_branches\"E\n" +
1629+ "\x15SetRepoMirrorResponse\x12,\n" +
1630+ "\x06target\x18\x01 \x01(\v2\x14.ermite.MirrorTargetR\x06target\"-\n" +
1631+ "\x17RemoveRepoMirrorRequest\x12\x12\n" +
1632+ "\x04repo\x18\x01 \x01(\tR\x04repo\"\x1a\n" +
1633+ "\x18RemoveRepoMirrorResponse\"N\n" +
1634+ "\x1cSetRepoMirrorExcludedRequest\x12\x12\n" +
1635+ "\x04repo\x18\x01 \x01(\tR\x04repo\x12\x1a\n" +
1636+ "\bexcluded\x18\x02 \x01(\bR\bexcluded\"M\n" +
1637+ "\x1dSetRepoMirrorExcludedResponse\x12,\n" +
1638+ "\x06target\x18\x01 \x01(\v2\x14.ermite.MirrorTargetR\x06target\"\xac\x04\n" +
1639+ "\fMirrorStatus\x12,\n" +
1640+ "\x06target\x18\x01 \x01(\v2\x14.ermite.MirrorTargetR\x06target\x12)\n" +
1641+ "\x05state\x18\x02 \x01(\x0e2\x13.ermite.MirrorStateR\x05state\x12#\n" +
1642+ "\rfailure_class\x18\x03 \x01(\tR\ffailureClass\x12\x16\n" +
1643+ "\x06reason\x18\x04 \x01(\tR\x06reason\x12\x16\n" +
1644+ "\x06detail\x18\x05 \x01(\tR\x06detail\x121\n" +
1645+ "\x14consecutive_failures\x18\x06 \x01(\x05R\x13consecutiveFailures\x12B\n" +
1646+ "\x0flast_attempt_at\x18\a \x01(\v2\x1a.google.protobuf.TimestampR\rlastAttemptAt\x12B\n" +
1647+ "\x0flast_success_at\x18\b \x01(\v2\x1a.google.protobuf.TimestampR\rlastSuccessAt\x12>\n" +
1648+ "\rnext_retry_at\x18\t \x01(\v2\x1a.google.protobuf.TimestampR\vnextRetryAt\x12:\n" +
1649+ "\vnext_run_at\x18\n" +
1650+ " \x01(\v2\x1a.google.protobuf.TimestampR\tnextRunAt\x127\n" +
1651+ "\tpaused_at\x18\v \x01(\v2\x1a.google.protobuf.TimestampR\bpausedAt\",\n" +
1652+ "\x16GetMirrorStatusRequest\x12\x12\n" +
1653+ "\x04repo\x18\x01 \x01(\tR\x04repo\"G\n" +
1654+ "\x17GetMirrorStatusResponse\x12,\n" +
1655+ "\x06status\x18\x01 \x01(\v2\x14.ermite.MirrorStatusR\x06status\"\x19\n" +
1656+ "\x17ListMirrorStatusRequest\"L\n" +
1657+ "\x18ListMirrorStatusResponse\x120\n" +
1658+ "\bstatuses\x18\x01 \x03(\v2\x14.ermite.MirrorStatusR\bstatuses\"O\n" +
1659+ "\x11SyncMirrorRequest\x12\x12\n" +
1660+ "\x04repo\x18\x01 \x01(\tR\x04repo\x12\x10\n" +
1661+ "\x03all\x18\x02 \x01(\bR\x03all\x12\x14\n" +
1662+ "\x05force\x18\x03 \x01(\bR\x05force\"\x81\x01\n" +
1663+ "\x10SyncMirrorResult\x12\x12\n" +
1664+ "\x04repo\x18\x01 \x01(\tR\x04repo\x12\x16\n" +
1665+ "\x06queued\x18\x02 \x01(\bR\x06queued\x12\x13\n" +
1666+ "\x05no_op\x18\x03 \x01(\bR\x04noOp\x12,\n" +
1667+ "\x06status\x18\x04 \x01(\v2\x14.ermite.MirrorStatusR\x06status\"H\n" +
1668+ "\x12SyncMirrorResponse\x122\n" +
1669+ "\aresults\x18\x01 \x03(\v2\x18.ermite.SyncMirrorResultR\aresults*\x9b\x01\n" +
1670+ "\fMirrorSource\x12\x1d\n" +
1671+ "\x19MIRROR_SOURCE_UNSPECIFIED\x10\x00\x12\x1a\n" +
1672+ "\x16MIRROR_SOURCE_DISABLED\x10\x01\x12\x18\n" +
1673+ "\x14MIRROR_SOURCE_GLOBAL\x10\x02\x12\x1a\n" +
1674+ "\x16MIRROR_SOURCE_OVERRIDE\x10\x03\x12\x1a\n" +
1675+ "\x16MIRROR_SOURCE_EXCLUDED\x10\x04*\x8e\x01\n" +
1676+ "\vMirrorState\x12\x1c\n" +
1677+ "\x18MIRROR_STATE_UNSPECIFIED\x10\x00\x12\x19\n" +
1678+ "\x15MIRROR_STATE_DISABLED\x10\x01\x12\x13\n" +
1679+ "\x0fMIRROR_STATE_OK\x10\x02\x12\x18\n" +
1680+ "\x14MIRROR_STATE_FAILING\x10\x03\x12\x17\n" +
1681+ "\x13MIRROR_STATE_PAUSED\x10\x042\xd1\x06\n" +
1682+ "\rMirrorService\x12I\n" +
1683+ "\fGetMirrorKey\x12\x1b.ermite.GetMirrorKeyRequest\x1a\x1c.ermite.GetMirrorKeyResponse\x12R\n" +
1684+ "\x0fRotateMirrorKey\x12\x1e.ermite.RotateMirrorKeyRequest\x1a\x1f.ermite.RotateMirrorKeyResponse\x12R\n" +
1685+ "\x0fGetMirrorConfig\x12\x1e.ermite.GetMirrorConfigRequest\x1a\x1f.ermite.GetMirrorConfigResponse\x12R\n" +
1686+ "\x0fSetMirrorConfig\x12\x1e.ermite.SetMirrorConfigRequest\x1a\x1f.ermite.SetMirrorConfigResponse\x12L\n" +
1687+ "\rSetRepoMirror\x12\x1c.ermite.SetRepoMirrorRequest\x1a\x1d.ermite.SetRepoMirrorResponse\x12U\n" +
1688+ "\x10RemoveRepoMirror\x12\x1f.ermite.RemoveRepoMirrorRequest\x1a .ermite.RemoveRepoMirrorResponse\x12d\n" +
1689+ "\x15SetRepoMirrorExcluded\x12$.ermite.SetRepoMirrorExcludedRequest\x1a%.ermite.SetRepoMirrorExcludedResponse\x12R\n" +
1690+ "\x0fGetMirrorStatus\x12\x1e.ermite.GetMirrorStatusRequest\x1a\x1f.ermite.GetMirrorStatusResponse\x12U\n" +
1691+ "\x10ListMirrorStatus\x12\x1f.ermite.ListMirrorStatusRequest\x1a .ermite.ListMirrorStatusResponse\x12C\n" +
1692+ "\n" +
1693+ "SyncMirror\x12\x19.ermite.SyncMirrorRequest\x1a\x1a.ermite.SyncMirrorResponseBr\n" +
1694+ "\n" +
1695+ "com.ermiteB\vMirrorProtoP\x01Z\x1fbnema.dev/ermite-api/gen/ermite\xa2\x02\x03EXX\xaa\x02\x06Ermite\xca\x02\x06Ermite\xe2\x02\x12Ermite\\GPBMetadata\xea\x02\x06Ermiteb\x06proto3"
1696+
1697+var (
1698+ file_ermite_mirror_proto_rawDescOnce sync.Once
1699+ file_ermite_mirror_proto_rawDescData []byte
1700+)
1701+
1702+func file_ermite_mirror_proto_rawDescGZIP() []byte {
1703+ file_ermite_mirror_proto_rawDescOnce.Do(func() {
1704+ file_ermite_mirror_proto_rawDescData = protoimpl.X.CompressGZIP(unsafe.Slice(unsafe.StringData(file_ermite_mirror_proto_rawDesc), len(file_ermite_mirror_proto_rawDesc)))
1705+ })
1706+ return file_ermite_mirror_proto_rawDescData
1707+}
1708+
1709+var file_ermite_mirror_proto_enumTypes = make([]protoimpl.EnumInfo, 2)
1710+var file_ermite_mirror_proto_msgTypes = make([]protoimpl.MessageInfo, 25)
1711+var file_ermite_mirror_proto_goTypes = []any{
1712+ (MirrorSource)(0), // 0: ermite.MirrorSource
1713+ (MirrorState)(0), // 1: ermite.MirrorState
1714+ (*MirrorKey)(nil), // 2: ermite.MirrorKey
1715+ (*GetMirrorKeyRequest)(nil), // 3: ermite.GetMirrorKeyRequest
1716+ (*GetMirrorKeyResponse)(nil), // 4: ermite.GetMirrorKeyResponse
1717+ (*RotateMirrorKeyRequest)(nil), // 5: ermite.RotateMirrorKeyRequest
1718+ (*RotateMirrorKeyResponse)(nil), // 6: ermite.RotateMirrorKeyResponse
1719+ (*MirrorConfig)(nil), // 7: ermite.MirrorConfig
1720+ (*GetMirrorConfigRequest)(nil), // 8: ermite.GetMirrorConfigRequest
1721+ (*GetMirrorConfigResponse)(nil), // 9: ermite.GetMirrorConfigResponse
1722+ (*SetMirrorConfigRequest)(nil), // 10: ermite.SetMirrorConfigRequest
1723+ (*SetMirrorConfigResponse)(nil), // 11: ermite.SetMirrorConfigResponse
1724+ (*MirrorTarget)(nil), // 12: ermite.MirrorTarget
1725+ (*SetRepoMirrorRequest)(nil), // 13: ermite.SetRepoMirrorRequest
1726+ (*SetRepoMirrorResponse)(nil), // 14: ermite.SetRepoMirrorResponse
1727+ (*RemoveRepoMirrorRequest)(nil), // 15: ermite.RemoveRepoMirrorRequest
1728+ (*RemoveRepoMirrorResponse)(nil), // 16: ermite.RemoveRepoMirrorResponse
1729+ (*SetRepoMirrorExcludedRequest)(nil), // 17: ermite.SetRepoMirrorExcludedRequest
1730+ (*SetRepoMirrorExcludedResponse)(nil), // 18: ermite.SetRepoMirrorExcludedResponse
1731+ (*MirrorStatus)(nil), // 19: ermite.MirrorStatus
1732+ (*GetMirrorStatusRequest)(nil), // 20: ermite.GetMirrorStatusRequest
1733+ (*GetMirrorStatusResponse)(nil), // 21: ermite.GetMirrorStatusResponse
1734+ (*ListMirrorStatusRequest)(nil), // 22: ermite.ListMirrorStatusRequest
1735+ (*ListMirrorStatusResponse)(nil), // 23: ermite.ListMirrorStatusResponse
1736+ (*SyncMirrorRequest)(nil), // 24: ermite.SyncMirrorRequest
1737+ (*SyncMirrorResult)(nil), // 25: ermite.SyncMirrorResult
1738+ (*SyncMirrorResponse)(nil), // 26: ermite.SyncMirrorResponse
1739+ (*timestamppb.Timestamp)(nil), // 27: google.protobuf.Timestamp
1740+}
1741+var file_ermite_mirror_proto_depIdxs = []int32{
1742+ 27, // 0: ermite.MirrorKey.created_at:type_name -> google.protobuf.Timestamp
1743+ 2, // 1: ermite.GetMirrorKeyResponse.key:type_name -> ermite.MirrorKey
1744+ 2, // 2: ermite.RotateMirrorKeyResponse.key:type_name -> ermite.MirrorKey
1745+ 27, // 3: ermite.MirrorConfig.updated_at:type_name -> google.protobuf.Timestamp
1746+ 7, // 4: ermite.GetMirrorConfigResponse.config:type_name -> ermite.MirrorConfig
1747+ 7, // 5: ermite.SetMirrorConfigResponse.config:type_name -> ermite.MirrorConfig
1748+ 0, // 6: ermite.MirrorTarget.source:type_name -> ermite.MirrorSource
1749+ 12, // 7: ermite.SetRepoMirrorResponse.target:type_name -> ermite.MirrorTarget
1750+ 12, // 8: ermite.SetRepoMirrorExcludedResponse.target:type_name -> ermite.MirrorTarget
1751+ 12, // 9: ermite.MirrorStatus.target:type_name -> ermite.MirrorTarget
1752+ 1, // 10: ermite.MirrorStatus.state:type_name -> ermite.MirrorState
1753+ 27, // 11: ermite.MirrorStatus.last_attempt_at:type_name -> google.protobuf.Timestamp
1754+ 27, // 12: ermite.MirrorStatus.last_success_at:type_name -> google.protobuf.Timestamp
1755+ 27, // 13: ermite.MirrorStatus.next_retry_at:type_name -> google.protobuf.Timestamp
1756+ 27, // 14: ermite.MirrorStatus.next_run_at:type_name -> google.protobuf.Timestamp
1757+ 27, // 15: ermite.MirrorStatus.paused_at:type_name -> google.protobuf.Timestamp
1758+ 19, // 16: ermite.GetMirrorStatusResponse.status:type_name -> ermite.MirrorStatus
1759+ 19, // 17: ermite.ListMirrorStatusResponse.statuses:type_name -> ermite.MirrorStatus
1760+ 19, // 18: ermite.SyncMirrorResult.status:type_name -> ermite.MirrorStatus
1761+ 25, // 19: ermite.SyncMirrorResponse.results:type_name -> ermite.SyncMirrorResult
1762+ 3, // 20: ermite.MirrorService.GetMirrorKey:input_type -> ermite.GetMirrorKeyRequest
1763+ 5, // 21: ermite.MirrorService.RotateMirrorKey:input_type -> ermite.RotateMirrorKeyRequest
1764+ 8, // 22: ermite.MirrorService.GetMirrorConfig:input_type -> ermite.GetMirrorConfigRequest
1765+ 10, // 23: ermite.MirrorService.SetMirrorConfig:input_type -> ermite.SetMirrorConfigRequest
1766+ 13, // 24: ermite.MirrorService.SetRepoMirror:input_type -> ermite.SetRepoMirrorRequest
1767+ 15, // 25: ermite.MirrorService.RemoveRepoMirror:input_type -> ermite.RemoveRepoMirrorRequest
1768+ 17, // 26: ermite.MirrorService.SetRepoMirrorExcluded:input_type -> ermite.SetRepoMirrorExcludedRequest
1769+ 20, // 27: ermite.MirrorService.GetMirrorStatus:input_type -> ermite.GetMirrorStatusRequest
1770+ 22, // 28: ermite.MirrorService.ListMirrorStatus:input_type -> ermite.ListMirrorStatusRequest
1771+ 24, // 29: ermite.MirrorService.SyncMirror:input_type -> ermite.SyncMirrorRequest
1772+ 4, // 30: ermite.MirrorService.GetMirrorKey:output_type -> ermite.GetMirrorKeyResponse
1773+ 6, // 31: ermite.MirrorService.RotateMirrorKey:output_type -> ermite.RotateMirrorKeyResponse
1774+ 9, // 32: ermite.MirrorService.GetMirrorConfig:output_type -> ermite.GetMirrorConfigResponse
1775+ 11, // 33: ermite.MirrorService.SetMirrorConfig:output_type -> ermite.SetMirrorConfigResponse
1776+ 14, // 34: ermite.MirrorService.SetRepoMirror:output_type -> ermite.SetRepoMirrorResponse
1777+ 16, // 35: ermite.MirrorService.RemoveRepoMirror:output_type -> ermite.RemoveRepoMirrorResponse
1778+ 18, // 36: ermite.MirrorService.SetRepoMirrorExcluded:output_type -> ermite.SetRepoMirrorExcludedResponse
1779+ 21, // 37: ermite.MirrorService.GetMirrorStatus:output_type -> ermite.GetMirrorStatusResponse
1780+ 23, // 38: ermite.MirrorService.ListMirrorStatus:output_type -> ermite.ListMirrorStatusResponse
1781+ 26, // 39: ermite.MirrorService.SyncMirror:output_type -> ermite.SyncMirrorResponse
1782+ 30, // [30:40] is the sub-list for method output_type
1783+ 20, // [20:30] is the sub-list for method input_type
1784+ 20, // [20:20] is the sub-list for extension type_name
1785+ 20, // [20:20] is the sub-list for extension extendee
1786+ 0, // [0:20] is the sub-list for field type_name
1787+}
1788+
1789+func init() { file_ermite_mirror_proto_init() }
1790+func file_ermite_mirror_proto_init() {
1791+ if File_ermite_mirror_proto != nil {
1792+ return
1793+ }
1794+ file_ermite_mirror_proto_msgTypes[8].OneofWrappers = []any{}
1795+ file_ermite_mirror_proto_msgTypes[11].OneofWrappers = []any{}
1796+ type x struct{}
1797+ out := protoimpl.TypeBuilder{
1798+ File: protoimpl.DescBuilder{
1799+ GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
1800+ RawDescriptor: unsafe.Slice(unsafe.StringData(file_ermite_mirror_proto_rawDesc), len(file_ermite_mirror_proto_rawDesc)),
1801+ NumEnums: 2,
1802+ NumMessages: 25,
1803+ NumExtensions: 0,
1804+ NumServices: 1,
1805+ },
1806+ GoTypes: file_ermite_mirror_proto_goTypes,
1807+ DependencyIndexes: file_ermite_mirror_proto_depIdxs,
1808+ EnumInfos: file_ermite_mirror_proto_enumTypes,
1809+ MessageInfos: file_ermite_mirror_proto_msgTypes,
1810+ }.Build()
1811+ File_ermite_mirror_proto = out.File
1812+ file_ermite_mirror_proto_goTypes = nil
1813+ file_ermite_mirror_proto_depIdxs = nil
1814+}
@@ -0,0 +1,1814 @@
1+// SPDX-License-Identifier: MIT
2+
3+// Code generated by protoc-gen-go. DO NOT EDIT.
4+// versions:
5+// protoc-gen-go v1.36.12
6+// protoc (unknown)
7+// source: ermite/mirror.proto
8+
9+package ermite
10+
11+import (
12+ protoreflect "google.golang.org/protobuf/reflect/protoreflect"
13+ protoimpl "google.golang.org/protobuf/runtime/protoimpl"
14+ timestamppb "google.golang.org/protobuf/types/known/timestamppb"
15+ reflect "reflect"
16+ sync "sync"
17+ unsafe "unsafe"
18+)
19+
20+const (
21+ // Verify that this generated code is sufficiently up-to-date.
22+ _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion)
23+ // Verify that runtime/protoimpl is sufficiently up-to-date.
24+ _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20)
25+)
26+
27+// MirrorSource says which configuration applies to a repository.
28+type MirrorSource int32
29+
30+const (
31+ // Unspecified.
32+ MirrorSource_MIRROR_SOURCE_UNSPECIFIED MirrorSource = 0
33+ // Disabled.
34+ MirrorSource_MIRROR_SOURCE_DISABLED MirrorSource = 1
35+ // Global.
36+ MirrorSource_MIRROR_SOURCE_GLOBAL MirrorSource = 2
37+ // Override.
38+ MirrorSource_MIRROR_SOURCE_OVERRIDE MirrorSource = 3
39+ // Excluded.
40+ MirrorSource_MIRROR_SOURCE_EXCLUDED MirrorSource = 4
41+)
42+
43+// Enum value maps for MirrorSource.
44+var (
45+ MirrorSource_name = map[int32]string{
46+ 0: "MIRROR_SOURCE_UNSPECIFIED",
47+ 1: "MIRROR_SOURCE_DISABLED",
48+ 2: "MIRROR_SOURCE_GLOBAL",
49+ 3: "MIRROR_SOURCE_OVERRIDE",
50+ 4: "MIRROR_SOURCE_EXCLUDED",
51+ }
52+ MirrorSource_value = map[string]int32{
53+ "MIRROR_SOURCE_UNSPECIFIED": 0,
54+ "MIRROR_SOURCE_DISABLED": 1,
55+ "MIRROR_SOURCE_GLOBAL": 2,
56+ "MIRROR_SOURCE_OVERRIDE": 3,
57+ "MIRROR_SOURCE_EXCLUDED": 4,
58+ }
59+)
60+
61+func (x MirrorSource) Enum() *MirrorSource {
62+ p := new(MirrorSource)
63+ *p = x
64+ return p
65+}
66+
67+func (x MirrorSource) String() string {
68+ return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x))
69+}
70+
71+func (MirrorSource) Descriptor() protoreflect.EnumDescriptor {
72+ return file_ermite_mirror_proto_enumTypes[0].Descriptor()
73+}
74+
75+func (MirrorSource) Type() protoreflect.EnumType {
76+ return &file_ermite_mirror_proto_enumTypes[0]
77+}
78+
79+func (x MirrorSource) Number() protoreflect.EnumNumber {
80+ return protoreflect.EnumNumber(x)
81+}
82+
83+// Deprecated: Use MirrorSource.Descriptor instead.
84+func (MirrorSource) EnumDescriptor() ([]byte, []int) {
85+ return file_ermite_mirror_proto_rawDescGZIP(), []int{0}
86+}
87+
88+// MirrorState is the current state of a push mirror.
89+type MirrorState int32
90+
91+const (
92+ // Unspecified.
93+ MirrorState_MIRROR_STATE_UNSPECIFIED MirrorState = 0
94+ // Disabled.
95+ MirrorState_MIRROR_STATE_DISABLED MirrorState = 1
96+ // Ok.
97+ MirrorState_MIRROR_STATE_OK MirrorState = 2
98+ // Failing.
99+ MirrorState_MIRROR_STATE_FAILING MirrorState = 3
100+ // Paused.
101+ MirrorState_MIRROR_STATE_PAUSED MirrorState = 4
102+)
103+
104+// Enum value maps for MirrorState.
105+var (
106+ MirrorState_name = map[int32]string{
107+ 0: "MIRROR_STATE_UNSPECIFIED",
108+ 1: "MIRROR_STATE_DISABLED",
109+ 2: "MIRROR_STATE_OK",
110+ 3: "MIRROR_STATE_FAILING",
111+ 4: "MIRROR_STATE_PAUSED",
112+ }
113+ MirrorState_value = map[string]int32{
114+ "MIRROR_STATE_UNSPECIFIED": 0,
115+ "MIRROR_STATE_DISABLED": 1,
116+ "MIRROR_STATE_OK": 2,
117+ "MIRROR_STATE_FAILING": 3,
118+ "MIRROR_STATE_PAUSED": 4,
119+ }
120+)
121+
122+func (x MirrorState) Enum() *MirrorState {
123+ p := new(MirrorState)
124+ *p = x
125+ return p
126+}
127+
128+func (x MirrorState) String() string {
129+ return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x))
130+}
131+
132+func (MirrorState) Descriptor() protoreflect.EnumDescriptor {
133+ return file_ermite_mirror_proto_enumTypes[1].Descriptor()
134+}
135+
136+func (MirrorState) Type() protoreflect.EnumType {
137+ return &file_ermite_mirror_proto_enumTypes[1]
138+}
139+
140+func (x MirrorState) Number() protoreflect.EnumNumber {
141+ return protoreflect.EnumNumber(x)
142+}
143+
144+// Deprecated: Use MirrorState.Descriptor instead.
145+func (MirrorState) EnumDescriptor() ([]byte, []int) {
146+ return file_ermite_mirror_proto_rawDescGZIP(), []int{1}
147+}
148+
149+// MirrorKey is the public SSH key used for push mirrors. Private key material
150+// is never returned.
151+type MirrorKey struct {
152+ state protoimpl.MessageState `protogen:"open.v1"`
153+ // AuthorizedKey is the SSH authorized_keys line.
154+ AuthorizedKey string `protobuf:"bytes,1,opt,name=authorized_key,json=authorizedKey,proto3" json:"authorized_key,omitempty"`
155+ // Fingerprint is the SHA256 fingerprint of the public key.
156+ Fingerprint string `protobuf:"bytes,2,opt,name=fingerprint,proto3" json:"fingerprint,omitempty"`
157+ // CreatedAt is when the key was created.
158+ CreatedAt *timestamppb.Timestamp `protobuf:"bytes,3,opt,name=created_at,json=createdAt,proto3" json:"created_at,omitempty"`
159+ unknownFields protoimpl.UnknownFields
160+ sizeCache protoimpl.SizeCache
161+}
162+
163+func (x *MirrorKey) Reset() {
164+ *x = MirrorKey{}
165+ mi := &file_ermite_mirror_proto_msgTypes[0]
166+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
167+ ms.StoreMessageInfo(mi)
168+}
169+
170+func (x *MirrorKey) String() string {
171+ return protoimpl.X.MessageStringOf(x)
172+}
173+
174+func (*MirrorKey) ProtoMessage() {}
175+
176+func (x *MirrorKey) ProtoReflect() protoreflect.Message {
177+ mi := &file_ermite_mirror_proto_msgTypes[0]
178+ if x != nil {
179+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
180+ if ms.LoadMessageInfo() == nil {
181+ ms.StoreMessageInfo(mi)
182+ }
183+ return ms
184+ }
185+ return mi.MessageOf(x)
186+}
187+
188+// Deprecated: Use MirrorKey.ProtoReflect.Descriptor instead.
189+func (*MirrorKey) Descriptor() ([]byte, []int) {
190+ return file_ermite_mirror_proto_rawDescGZIP(), []int{0}
191+}
192+
193+func (x *MirrorKey) GetAuthorizedKey() string {
194+ if x != nil {
195+ return x.AuthorizedKey
196+ }
197+ return ""
198+}
199+
200+func (x *MirrorKey) GetFingerprint() string {
201+ if x != nil {
202+ return x.Fingerprint
203+ }
204+ return ""
205+}
206+
207+func (x *MirrorKey) GetCreatedAt() *timestamppb.Timestamp {
208+ if x != nil {
209+ return x.CreatedAt
210+ }
211+ return nil
212+}
213+
214+// GetMirrorKeyRequest selects the input of GetMirrorKey.
215+type GetMirrorKeyRequest struct {
216+ state protoimpl.MessageState `protogen:"open.v1"`
217+ unknownFields protoimpl.UnknownFields
218+ sizeCache protoimpl.SizeCache
219+}
220+
221+func (x *GetMirrorKeyRequest) Reset() {
222+ *x = GetMirrorKeyRequest{}
223+ mi := &file_ermite_mirror_proto_msgTypes[1]
224+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
225+ ms.StoreMessageInfo(mi)
226+}
227+
228+func (x *GetMirrorKeyRequest) String() string {
229+ return protoimpl.X.MessageStringOf(x)
230+}
231+
232+func (*GetMirrorKeyRequest) ProtoMessage() {}
233+
234+func (x *GetMirrorKeyRequest) ProtoReflect() protoreflect.Message {
235+ mi := &file_ermite_mirror_proto_msgTypes[1]
236+ if x != nil {
237+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
238+ if ms.LoadMessageInfo() == nil {
239+ ms.StoreMessageInfo(mi)
240+ }
241+ return ms
242+ }
243+ return mi.MessageOf(x)
244+}
245+
246+// Deprecated: Use GetMirrorKeyRequest.ProtoReflect.Descriptor instead.
247+func (*GetMirrorKeyRequest) Descriptor() ([]byte, []int) {
248+ return file_ermite_mirror_proto_rawDescGZIP(), []int{1}
249+}
250+
251+// GetMirrorKeyResponse holds the result of GetMirrorKey.
252+type GetMirrorKeyResponse struct {
253+ state protoimpl.MessageState `protogen:"open.v1"`
254+ // Key is the public mirror key.
255+ Key *MirrorKey `protobuf:"bytes,1,opt,name=key,proto3" json:"key,omitempty"`
256+ unknownFields protoimpl.UnknownFields
257+ sizeCache protoimpl.SizeCache
258+}
259+
260+func (x *GetMirrorKeyResponse) Reset() {
261+ *x = GetMirrorKeyResponse{}
262+ mi := &file_ermite_mirror_proto_msgTypes[2]
263+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
264+ ms.StoreMessageInfo(mi)
265+}
266+
267+func (x *GetMirrorKeyResponse) String() string {
268+ return protoimpl.X.MessageStringOf(x)
269+}
270+
271+func (*GetMirrorKeyResponse) ProtoMessage() {}
272+
273+func (x *GetMirrorKeyResponse) ProtoReflect() protoreflect.Message {
274+ mi := &file_ermite_mirror_proto_msgTypes[2]
275+ if x != nil {
276+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
277+ if ms.LoadMessageInfo() == nil {
278+ ms.StoreMessageInfo(mi)
279+ }
280+ return ms
281+ }
282+ return mi.MessageOf(x)
283+}
284+
285+// Deprecated: Use GetMirrorKeyResponse.ProtoReflect.Descriptor instead.
286+func (*GetMirrorKeyResponse) Descriptor() ([]byte, []int) {
287+ return file_ermite_mirror_proto_rawDescGZIP(), []int{2}
288+}
289+
290+func (x *GetMirrorKeyResponse) GetKey() *MirrorKey {
291+ if x != nil {
292+ return x.Key
293+ }
294+ return nil
295+}
296+
297+// RotateMirrorKeyRequest selects the input of RotateMirrorKey.
298+type RotateMirrorKeyRequest struct {
299+ state protoimpl.MessageState `protogen:"open.v1"`
300+ unknownFields protoimpl.UnknownFields
301+ sizeCache protoimpl.SizeCache
302+}
303+
304+func (x *RotateMirrorKeyRequest) Reset() {
305+ *x = RotateMirrorKeyRequest{}
306+ mi := &file_ermite_mirror_proto_msgTypes[3]
307+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
308+ ms.StoreMessageInfo(mi)
309+}
310+
311+func (x *RotateMirrorKeyRequest) String() string {
312+ return protoimpl.X.MessageStringOf(x)
313+}
314+
315+func (*RotateMirrorKeyRequest) ProtoMessage() {}
316+
317+func (x *RotateMirrorKeyRequest) ProtoReflect() protoreflect.Message {
318+ mi := &file_ermite_mirror_proto_msgTypes[3]
319+ if x != nil {
320+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
321+ if ms.LoadMessageInfo() == nil {
322+ ms.StoreMessageInfo(mi)
323+ }
324+ return ms
325+ }
326+ return mi.MessageOf(x)
327+}
328+
329+// Deprecated: Use RotateMirrorKeyRequest.ProtoReflect.Descriptor instead.
330+func (*RotateMirrorKeyRequest) Descriptor() ([]byte, []int) {
331+ return file_ermite_mirror_proto_rawDescGZIP(), []int{3}
332+}
333+
334+// RotateMirrorKeyResponse holds the result of RotateMirrorKey.
335+type RotateMirrorKeyResponse struct {
336+ state protoimpl.MessageState `protogen:"open.v1"`
337+ // Key is the public mirror key.
338+ Key *MirrorKey `protobuf:"bytes,1,opt,name=key,proto3" json:"key,omitempty"`
339+ // PreviousFingerprint is the fingerprint of the replaced key.
340+ PreviousFingerprint string `protobuf:"bytes,2,opt,name=previous_fingerprint,json=previousFingerprint,proto3" json:"previous_fingerprint,omitempty"`
341+ unknownFields protoimpl.UnknownFields
342+ sizeCache protoimpl.SizeCache
343+}
344+
345+func (x *RotateMirrorKeyResponse) Reset() {
346+ *x = RotateMirrorKeyResponse{}
347+ mi := &file_ermite_mirror_proto_msgTypes[4]
348+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
349+ ms.StoreMessageInfo(mi)
350+}
351+
352+func (x *RotateMirrorKeyResponse) String() string {
353+ return protoimpl.X.MessageStringOf(x)
354+}
355+
356+func (*RotateMirrorKeyResponse) ProtoMessage() {}
357+
358+func (x *RotateMirrorKeyResponse) ProtoReflect() protoreflect.Message {
359+ mi := &file_ermite_mirror_proto_msgTypes[4]
360+ if x != nil {
361+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
362+ if ms.LoadMessageInfo() == nil {
363+ ms.StoreMessageInfo(mi)
364+ }
365+ return ms
366+ }
367+ return mi.MessageOf(x)
368+}
369+
370+// Deprecated: Use RotateMirrorKeyResponse.ProtoReflect.Descriptor instead.
371+func (*RotateMirrorKeyResponse) Descriptor() ([]byte, []int) {
372+ return file_ermite_mirror_proto_rawDescGZIP(), []int{4}
373+}
374+
375+func (x *RotateMirrorKeyResponse) GetKey() *MirrorKey {
376+ if x != nil {
377+ return x.Key
378+ }
379+ return nil
380+}
381+
382+func (x *RotateMirrorKeyResponse) GetPreviousFingerprint() string {
383+ if x != nil {
384+ return x.PreviousFingerprint
385+ }
386+ return ""
387+}
388+
389+// MirrorConfig is the server-wide push mirror policy.
390+type MirrorConfig struct {
391+ state protoimpl.MessageState `protogen:"open.v1"`
392+ // Enabled says whether mirroring is enabled.
393+ Enabled bool `protobuf:"varint,1,opt,name=enabled,proto3" json:"enabled,omitempty"`
394+ // URLTemplate is an SSH URL containing "{repo}", replaced with the
395+ // repository name.
396+ UrlTemplate string `protobuf:"bytes,2,opt,name=url_template,json=urlTemplate,proto3" json:"url_template,omitempty"`
397+ // Cron is a five-field cron expression in UTC, no more frequent than every
398+ // five minutes.
399+ Cron string `protobuf:"bytes,3,opt,name=cron,proto3" json:"cron,omitempty"`
400+ // AllBranches includes every branch rather than only the default branch.
401+ // Tags are always included.
402+ AllBranches bool `protobuf:"varint,4,opt,name=all_branches,json=allBranches,proto3" json:"all_branches,omitempty"`
403+ // UpdatedAt is when the configuration was last changed.
404+ UpdatedAt *timestamppb.Timestamp `protobuf:"bytes,5,opt,name=updated_at,json=updatedAt,proto3" json:"updated_at,omitempty"`
405+ unknownFields protoimpl.UnknownFields
406+ sizeCache protoimpl.SizeCache
407+}
408+
409+func (x *MirrorConfig) Reset() {
410+ *x = MirrorConfig{}
411+ mi := &file_ermite_mirror_proto_msgTypes[5]
412+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
413+ ms.StoreMessageInfo(mi)
414+}
415+
416+func (x *MirrorConfig) String() string {
417+ return protoimpl.X.MessageStringOf(x)
418+}
419+
420+func (*MirrorConfig) ProtoMessage() {}
421+
422+func (x *MirrorConfig) ProtoReflect() protoreflect.Message {
423+ mi := &file_ermite_mirror_proto_msgTypes[5]
424+ if x != nil {
425+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
426+ if ms.LoadMessageInfo() == nil {
427+ ms.StoreMessageInfo(mi)
428+ }
429+ return ms
430+ }
431+ return mi.MessageOf(x)
432+}
433+
434+// Deprecated: Use MirrorConfig.ProtoReflect.Descriptor instead.
435+func (*MirrorConfig) Descriptor() ([]byte, []int) {
436+ return file_ermite_mirror_proto_rawDescGZIP(), []int{5}
437+}
438+
439+func (x *MirrorConfig) GetEnabled() bool {
440+ if x != nil {
441+ return x.Enabled
442+ }
443+ return false
444+}
445+
446+func (x *MirrorConfig) GetUrlTemplate() string {
447+ if x != nil {
448+ return x.UrlTemplate
449+ }
450+ return ""
451+}
452+
453+func (x *MirrorConfig) GetCron() string {
454+ if x != nil {
455+ return x.Cron
456+ }
457+ return ""
458+}
459+
460+func (x *MirrorConfig) GetAllBranches() bool {
461+ if x != nil {
462+ return x.AllBranches
463+ }
464+ return false
465+}
466+
467+func (x *MirrorConfig) GetUpdatedAt() *timestamppb.Timestamp {
468+ if x != nil {
469+ return x.UpdatedAt
470+ }
471+ return nil
472+}
473+
474+// GetMirrorConfigRequest selects the input of GetMirrorConfig.
475+type GetMirrorConfigRequest struct {
476+ state protoimpl.MessageState `protogen:"open.v1"`
477+ unknownFields protoimpl.UnknownFields
478+ sizeCache protoimpl.SizeCache
479+}
480+
481+func (x *GetMirrorConfigRequest) Reset() {
482+ *x = GetMirrorConfigRequest{}
483+ mi := &file_ermite_mirror_proto_msgTypes[6]
484+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
485+ ms.StoreMessageInfo(mi)
486+}
487+
488+func (x *GetMirrorConfigRequest) String() string {
489+ return protoimpl.X.MessageStringOf(x)
490+}
491+
492+func (*GetMirrorConfigRequest) ProtoMessage() {}
493+
494+func (x *GetMirrorConfigRequest) ProtoReflect() protoreflect.Message {
495+ mi := &file_ermite_mirror_proto_msgTypes[6]
496+ if x != nil {
497+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
498+ if ms.LoadMessageInfo() == nil {
499+ ms.StoreMessageInfo(mi)
500+ }
501+ return ms
502+ }
503+ return mi.MessageOf(x)
504+}
505+
506+// Deprecated: Use GetMirrorConfigRequest.ProtoReflect.Descriptor instead.
507+func (*GetMirrorConfigRequest) Descriptor() ([]byte, []int) {
508+ return file_ermite_mirror_proto_rawDescGZIP(), []int{6}
509+}
510+
511+// GetMirrorConfigResponse holds the result of GetMirrorConfig.
512+type GetMirrorConfigResponse struct {
513+ state protoimpl.MessageState `protogen:"open.v1"`
514+ // Config is the global mirror policy.
515+ Config *MirrorConfig `protobuf:"bytes,1,opt,name=config,proto3" json:"config,omitempty"`
516+ unknownFields protoimpl.UnknownFields
517+ sizeCache protoimpl.SizeCache
518+}
519+
520+func (x *GetMirrorConfigResponse) Reset() {
521+ *x = GetMirrorConfigResponse{}
522+ mi := &file_ermite_mirror_proto_msgTypes[7]
523+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
524+ ms.StoreMessageInfo(mi)
525+}
526+
527+func (x *GetMirrorConfigResponse) String() string {
528+ return protoimpl.X.MessageStringOf(x)
529+}
530+
531+func (*GetMirrorConfigResponse) ProtoMessage() {}
532+
533+func (x *GetMirrorConfigResponse) ProtoReflect() protoreflect.Message {
534+ mi := &file_ermite_mirror_proto_msgTypes[7]
535+ if x != nil {
536+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
537+ if ms.LoadMessageInfo() == nil {
538+ ms.StoreMessageInfo(mi)
539+ }
540+ return ms
541+ }
542+ return mi.MessageOf(x)
543+}
544+
545+// Deprecated: Use GetMirrorConfigResponse.ProtoReflect.Descriptor instead.
546+func (*GetMirrorConfigResponse) Descriptor() ([]byte, []int) {
547+ return file_ermite_mirror_proto_rawDescGZIP(), []int{7}
548+}
549+
550+func (x *GetMirrorConfigResponse) GetConfig() *MirrorConfig {
551+ if x != nil {
552+ return x.Config
553+ }
554+ return nil
555+}
556+
557+// SetMirrorConfigRequest selects the input of SetMirrorConfig.
558+type SetMirrorConfigRequest struct {
559+ state protoimpl.MessageState `protogen:"open.v1"`
560+ // Enabled says whether mirroring is enabled. Unset means unchanged.
561+ Enabled *bool `protobuf:"varint,1,opt,name=enabled,proto3,oneof" json:"enabled,omitempty"`
562+ // URLTemplate is an SSH URL containing "{repo}", replaced with the
563+ // repository name. Unset means unchanged.
564+ UrlTemplate *string `protobuf:"bytes,2,opt,name=url_template,json=urlTemplate,proto3,oneof" json:"url_template,omitempty"`
565+ // Cron is a five-field cron expression in UTC, no more frequent than every
566+ // five minutes. Unset means unchanged.
567+ Cron *string `protobuf:"bytes,3,opt,name=cron,proto3,oneof" json:"cron,omitempty"`
568+ // AllBranches includes every branch rather than only the default branch.
569+ // Tags are always included. Unset means unchanged.
570+ AllBranches *bool `protobuf:"varint,4,opt,name=all_branches,json=allBranches,proto3,oneof" json:"all_branches,omitempty"`
571+ unknownFields protoimpl.UnknownFields
572+ sizeCache protoimpl.SizeCache
573+}
574+
575+func (x *SetMirrorConfigRequest) Reset() {
576+ *x = SetMirrorConfigRequest{}
577+ mi := &file_ermite_mirror_proto_msgTypes[8]
578+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
579+ ms.StoreMessageInfo(mi)
580+}
581+
582+func (x *SetMirrorConfigRequest) String() string {
583+ return protoimpl.X.MessageStringOf(x)
584+}
585+
586+func (*SetMirrorConfigRequest) ProtoMessage() {}
587+
588+func (x *SetMirrorConfigRequest) ProtoReflect() protoreflect.Message {
589+ mi := &file_ermite_mirror_proto_msgTypes[8]
590+ if x != nil {
591+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
592+ if ms.LoadMessageInfo() == nil {
593+ ms.StoreMessageInfo(mi)
594+ }
595+ return ms
596+ }
597+ return mi.MessageOf(x)
598+}
599+
600+// Deprecated: Use SetMirrorConfigRequest.ProtoReflect.Descriptor instead.
601+func (*SetMirrorConfigRequest) Descriptor() ([]byte, []int) {
602+ return file_ermite_mirror_proto_rawDescGZIP(), []int{8}
603+}
604+
605+func (x *SetMirrorConfigRequest) GetEnabled() bool {
606+ if x != nil && x.Enabled != nil {
607+ return *x.Enabled
608+ }
609+ return false
610+}
611+
612+func (x *SetMirrorConfigRequest) GetUrlTemplate() string {
613+ if x != nil && x.UrlTemplate != nil {
614+ return *x.UrlTemplate
615+ }
616+ return ""
617+}
618+
619+func (x *SetMirrorConfigRequest) GetCron() string {
620+ if x != nil && x.Cron != nil {
621+ return *x.Cron
622+ }
623+ return ""
624+}
625+
626+func (x *SetMirrorConfigRequest) GetAllBranches() bool {
627+ if x != nil && x.AllBranches != nil {
628+ return *x.AllBranches
629+ }
630+ return false
631+}
632+
633+// SetMirrorConfigResponse holds the result of SetMirrorConfig.
634+type SetMirrorConfigResponse struct {
635+ state protoimpl.MessageState `protogen:"open.v1"`
636+ // Config is the global mirror policy.
637+ Config *MirrorConfig `protobuf:"bytes,1,opt,name=config,proto3" json:"config,omitempty"`
638+ unknownFields protoimpl.UnknownFields
639+ sizeCache protoimpl.SizeCache
640+}
641+
642+func (x *SetMirrorConfigResponse) Reset() {
643+ *x = SetMirrorConfigResponse{}
644+ mi := &file_ermite_mirror_proto_msgTypes[9]
645+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
646+ ms.StoreMessageInfo(mi)
647+}
648+
649+func (x *SetMirrorConfigResponse) String() string {
650+ return protoimpl.X.MessageStringOf(x)
651+}
652+
653+func (*SetMirrorConfigResponse) ProtoMessage() {}
654+
655+func (x *SetMirrorConfigResponse) ProtoReflect() protoreflect.Message {
656+ mi := &file_ermite_mirror_proto_msgTypes[9]
657+ if x != nil {
658+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
659+ if ms.LoadMessageInfo() == nil {
660+ ms.StoreMessageInfo(mi)
661+ }
662+ return ms
663+ }
664+ return mi.MessageOf(x)
665+}
666+
667+// Deprecated: Use SetMirrorConfigResponse.ProtoReflect.Descriptor instead.
668+func (*SetMirrorConfigResponse) Descriptor() ([]byte, []int) {
669+ return file_ermite_mirror_proto_rawDescGZIP(), []int{9}
670+}
671+
672+func (x *SetMirrorConfigResponse) GetConfig() *MirrorConfig {
673+ if x != nil {
674+ return x.Config
675+ }
676+ return nil
677+}
678+
679+// MirrorTarget is the resolved push mirror target of a repository.
680+type MirrorTarget struct {
681+ state protoimpl.MessageState `protogen:"open.v1"`
682+ // Repo is the repository name.
683+ Repo string `protobuf:"bytes,1,opt,name=repo,proto3" json:"repo,omitempty"`
684+ // Enabled says whether mirroring is enabled.
685+ Enabled bool `protobuf:"varint,2,opt,name=enabled,proto3" json:"enabled,omitempty"`
686+ // URL is the SSH destination of the mirror.
687+ Url string `protobuf:"bytes,3,opt,name=url,proto3" json:"url,omitempty"`
688+ // Cron is a five-field cron expression in UTC, no more frequent than every
689+ // five minutes.
690+ Cron string `protobuf:"bytes,4,opt,name=cron,proto3" json:"cron,omitempty"`
691+ // AllBranches includes every branch rather than only the default branch.
692+ // Tags are always included.
693+ AllBranches bool `protobuf:"varint,5,opt,name=all_branches,json=allBranches,proto3" json:"all_branches,omitempty"`
694+ // Source is the configuration used to resolve the target.
695+ Source MirrorSource `protobuf:"varint,6,opt,name=source,proto3,enum=ermite.MirrorSource" json:"source,omitempty"`
696+ unknownFields protoimpl.UnknownFields
697+ sizeCache protoimpl.SizeCache
698+}
699+
700+func (x *MirrorTarget) Reset() {
701+ *x = MirrorTarget{}
702+ mi := &file_ermite_mirror_proto_msgTypes[10]
703+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
704+ ms.StoreMessageInfo(mi)
705+}
706+
707+func (x *MirrorTarget) String() string {
708+ return protoimpl.X.MessageStringOf(x)
709+}
710+
711+func (*MirrorTarget) ProtoMessage() {}
712+
713+func (x *MirrorTarget) ProtoReflect() protoreflect.Message {
714+ mi := &file_ermite_mirror_proto_msgTypes[10]
715+ if x != nil {
716+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
717+ if ms.LoadMessageInfo() == nil {
718+ ms.StoreMessageInfo(mi)
719+ }
720+ return ms
721+ }
722+ return mi.MessageOf(x)
723+}
724+
725+// Deprecated: Use MirrorTarget.ProtoReflect.Descriptor instead.
726+func (*MirrorTarget) Descriptor() ([]byte, []int) {
727+ return file_ermite_mirror_proto_rawDescGZIP(), []int{10}
728+}
729+
730+func (x *MirrorTarget) GetRepo() string {
731+ if x != nil {
732+ return x.Repo
733+ }
734+ return ""
735+}
736+
737+func (x *MirrorTarget) GetEnabled() bool {
738+ if x != nil {
739+ return x.Enabled
740+ }
741+ return false
742+}
743+
744+func (x *MirrorTarget) GetUrl() string {
745+ if x != nil {
746+ return x.Url
747+ }
748+ return ""
749+}
750+
751+func (x *MirrorTarget) GetCron() string {
752+ if x != nil {
753+ return x.Cron
754+ }
755+ return ""
756+}
757+
758+func (x *MirrorTarget) GetAllBranches() bool {
759+ if x != nil {
760+ return x.AllBranches
761+ }
762+ return false
763+}
764+
765+func (x *MirrorTarget) GetSource() MirrorSource {
766+ if x != nil {
767+ return x.Source
768+ }
769+ return MirrorSource_MIRROR_SOURCE_UNSPECIFIED
770+}
771+
772+// SetRepoMirrorRequest selects the input of SetRepoMirror.
773+type SetRepoMirrorRequest struct {
774+ state protoimpl.MessageState `protogen:"open.v1"`
775+ // Repo is the repository name.
776+ Repo string `protobuf:"bytes,1,opt,name=repo,proto3" json:"repo,omitempty"`
777+ // URL is the SSH destination of the mirror.
778+ Url string `protobuf:"bytes,2,opt,name=url,proto3" json:"url,omitempty"`
779+ // Cron is a five-field cron expression in UTC, no more frequent than every
780+ // five minutes.
781+ // Empty means inherit the global cron.
782+ Cron string `protobuf:"bytes,3,opt,name=cron,proto3" json:"cron,omitempty"`
783+ // AllBranches includes every branch rather than only the default branch.
784+ // Tags are always included. Unset means inherit the global setting.
785+ AllBranches *bool `protobuf:"varint,4,opt,name=all_branches,json=allBranches,proto3,oneof" json:"all_branches,omitempty"`
786+ unknownFields protoimpl.UnknownFields
787+ sizeCache protoimpl.SizeCache
788+}
789+
790+func (x *SetRepoMirrorRequest) Reset() {
791+ *x = SetRepoMirrorRequest{}
792+ mi := &file_ermite_mirror_proto_msgTypes[11]
793+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
794+ ms.StoreMessageInfo(mi)
795+}
796+
797+func (x *SetRepoMirrorRequest) String() string {
798+ return protoimpl.X.MessageStringOf(x)
799+}
800+
801+func (*SetRepoMirrorRequest) ProtoMessage() {}
802+
803+func (x *SetRepoMirrorRequest) ProtoReflect() protoreflect.Message {
804+ mi := &file_ermite_mirror_proto_msgTypes[11]
805+ if x != nil {
806+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
807+ if ms.LoadMessageInfo() == nil {
808+ ms.StoreMessageInfo(mi)
809+ }
810+ return ms
811+ }
812+ return mi.MessageOf(x)
813+}
814+
815+// Deprecated: Use SetRepoMirrorRequest.ProtoReflect.Descriptor instead.
816+func (*SetRepoMirrorRequest) Descriptor() ([]byte, []int) {
817+ return file_ermite_mirror_proto_rawDescGZIP(), []int{11}
818+}
819+
820+func (x *SetRepoMirrorRequest) GetRepo() string {
821+ if x != nil {
822+ return x.Repo
823+ }
824+ return ""
825+}
826+
827+func (x *SetRepoMirrorRequest) GetUrl() string {
828+ if x != nil {
829+ return x.Url
830+ }
831+ return ""
832+}
833+
834+func (x *SetRepoMirrorRequest) GetCron() string {
835+ if x != nil {
836+ return x.Cron
837+ }
838+ return ""
839+}
840+
841+func (x *SetRepoMirrorRequest) GetAllBranches() bool {
842+ if x != nil && x.AllBranches != nil {
843+ return *x.AllBranches
844+ }
845+ return false
846+}
847+
848+// SetRepoMirrorResponse holds the result of SetRepoMirror.
849+type SetRepoMirrorResponse struct {
850+ state protoimpl.MessageState `protogen:"open.v1"`
851+ // Target is the resolved mirror target.
852+ Target *MirrorTarget `protobuf:"bytes,1,opt,name=target,proto3" json:"target,omitempty"`
853+ unknownFields protoimpl.UnknownFields
854+ sizeCache protoimpl.SizeCache
855+}
856+
857+func (x *SetRepoMirrorResponse) Reset() {
858+ *x = SetRepoMirrorResponse{}
859+ mi := &file_ermite_mirror_proto_msgTypes[12]
860+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
861+ ms.StoreMessageInfo(mi)
862+}
863+
864+func (x *SetRepoMirrorResponse) String() string {
865+ return protoimpl.X.MessageStringOf(x)
866+}
867+
868+func (*SetRepoMirrorResponse) ProtoMessage() {}
869+
870+func (x *SetRepoMirrorResponse) ProtoReflect() protoreflect.Message {
871+ mi := &file_ermite_mirror_proto_msgTypes[12]
872+ if x != nil {
873+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
874+ if ms.LoadMessageInfo() == nil {
875+ ms.StoreMessageInfo(mi)
876+ }
877+ return ms
878+ }
879+ return mi.MessageOf(x)
880+}
881+
882+// Deprecated: Use SetRepoMirrorResponse.ProtoReflect.Descriptor instead.
883+func (*SetRepoMirrorResponse) Descriptor() ([]byte, []int) {
884+ return file_ermite_mirror_proto_rawDescGZIP(), []int{12}
885+}
886+
887+func (x *SetRepoMirrorResponse) GetTarget() *MirrorTarget {
888+ if x != nil {
889+ return x.Target
890+ }
891+ return nil
892+}
893+
894+// RemoveRepoMirrorRequest selects the input of RemoveRepoMirror.
895+type RemoveRepoMirrorRequest struct {
896+ state protoimpl.MessageState `protogen:"open.v1"`
897+ // Repo is the repository name.
898+ Repo string `protobuf:"bytes,1,opt,name=repo,proto3" json:"repo,omitempty"`
899+ unknownFields protoimpl.UnknownFields
900+ sizeCache protoimpl.SizeCache
901+}
902+
903+func (x *RemoveRepoMirrorRequest) Reset() {
904+ *x = RemoveRepoMirrorRequest{}
905+ mi := &file_ermite_mirror_proto_msgTypes[13]
906+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
907+ ms.StoreMessageInfo(mi)
908+}
909+
910+func (x *RemoveRepoMirrorRequest) String() string {
911+ return protoimpl.X.MessageStringOf(x)
912+}
913+
914+func (*RemoveRepoMirrorRequest) ProtoMessage() {}
915+
916+func (x *RemoveRepoMirrorRequest) ProtoReflect() protoreflect.Message {
917+ mi := &file_ermite_mirror_proto_msgTypes[13]
918+ if x != nil {
919+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
920+ if ms.LoadMessageInfo() == nil {
921+ ms.StoreMessageInfo(mi)
922+ }
923+ return ms
924+ }
925+ return mi.MessageOf(x)
926+}
927+
928+// Deprecated: Use RemoveRepoMirrorRequest.ProtoReflect.Descriptor instead.
929+func (*RemoveRepoMirrorRequest) Descriptor() ([]byte, []int) {
930+ return file_ermite_mirror_proto_rawDescGZIP(), []int{13}
931+}
932+
933+func (x *RemoveRepoMirrorRequest) GetRepo() string {
934+ if x != nil {
935+ return x.Repo
936+ }
937+ return ""
938+}
939+
940+// RemoveRepoMirrorResponse holds the result of RemoveRepoMirror.
941+type RemoveRepoMirrorResponse struct {
942+ state protoimpl.MessageState `protogen:"open.v1"`
943+ unknownFields protoimpl.UnknownFields
944+ sizeCache protoimpl.SizeCache
945+}
946+
947+func (x *RemoveRepoMirrorResponse) Reset() {
948+ *x = RemoveRepoMirrorResponse{}
949+ mi := &file_ermite_mirror_proto_msgTypes[14]
950+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
951+ ms.StoreMessageInfo(mi)
952+}
953+
954+func (x *RemoveRepoMirrorResponse) String() string {
955+ return protoimpl.X.MessageStringOf(x)
956+}
957+
958+func (*RemoveRepoMirrorResponse) ProtoMessage() {}
959+
960+func (x *RemoveRepoMirrorResponse) ProtoReflect() protoreflect.Message {
961+ mi := &file_ermite_mirror_proto_msgTypes[14]
962+ if x != nil {
963+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
964+ if ms.LoadMessageInfo() == nil {
965+ ms.StoreMessageInfo(mi)
966+ }
967+ return ms
968+ }
969+ return mi.MessageOf(x)
970+}
971+
972+// Deprecated: Use RemoveRepoMirrorResponse.ProtoReflect.Descriptor instead.
973+func (*RemoveRepoMirrorResponse) Descriptor() ([]byte, []int) {
974+ return file_ermite_mirror_proto_rawDescGZIP(), []int{14}
975+}
976+
977+// SetRepoMirrorExcludedRequest selects the input of SetRepoMirrorExcluded.
978+type SetRepoMirrorExcludedRequest struct {
979+ state protoimpl.MessageState `protogen:"open.v1"`
980+ // Repo is the repository name.
981+ Repo string `protobuf:"bytes,1,opt,name=repo,proto3" json:"repo,omitempty"`
982+ // Excluded opts out of the global template, unless a URL override exists.
983+ Excluded bool `protobuf:"varint,2,opt,name=excluded,proto3" json:"excluded,omitempty"`
984+ unknownFields protoimpl.UnknownFields
985+ sizeCache protoimpl.SizeCache
986+}
987+
988+func (x *SetRepoMirrorExcludedRequest) Reset() {
989+ *x = SetRepoMirrorExcludedRequest{}
990+ mi := &file_ermite_mirror_proto_msgTypes[15]
991+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
992+ ms.StoreMessageInfo(mi)
993+}
994+
995+func (x *SetRepoMirrorExcludedRequest) String() string {
996+ return protoimpl.X.MessageStringOf(x)
997+}
998+
999+func (*SetRepoMirrorExcludedRequest) ProtoMessage() {}
1000+
1001+func (x *SetRepoMirrorExcludedRequest) ProtoReflect() protoreflect.Message {
1002+ mi := &file_ermite_mirror_proto_msgTypes[15]
1003+ if x != nil {
1004+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
1005+ if ms.LoadMessageInfo() == nil {
1006+ ms.StoreMessageInfo(mi)
1007+ }
1008+ return ms
1009+ }
1010+ return mi.MessageOf(x)
1011+}
1012+
1013+// Deprecated: Use SetRepoMirrorExcludedRequest.ProtoReflect.Descriptor instead.
1014+func (*SetRepoMirrorExcludedRequest) Descriptor() ([]byte, []int) {
1015+ return file_ermite_mirror_proto_rawDescGZIP(), []int{15}
1016+}
1017+
1018+func (x *SetRepoMirrorExcludedRequest) GetRepo() string {
1019+ if x != nil {
1020+ return x.Repo
1021+ }
1022+ return ""
1023+}
1024+
1025+func (x *SetRepoMirrorExcludedRequest) GetExcluded() bool {
1026+ if x != nil {
1027+ return x.Excluded
1028+ }
1029+ return false
1030+}
1031+
1032+// SetRepoMirrorExcludedResponse holds the result of SetRepoMirrorExcluded.
1033+type SetRepoMirrorExcludedResponse struct {
1034+ state protoimpl.MessageState `protogen:"open.v1"`
1035+ // Target is the resolved mirror target.
1036+ Target *MirrorTarget `protobuf:"bytes,1,opt,name=target,proto3" json:"target,omitempty"`
1037+ unknownFields protoimpl.UnknownFields
1038+ sizeCache protoimpl.SizeCache
1039+}
1040+
1041+func (x *SetRepoMirrorExcludedResponse) Reset() {
1042+ *x = SetRepoMirrorExcludedResponse{}
1043+ mi := &file_ermite_mirror_proto_msgTypes[16]
1044+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
1045+ ms.StoreMessageInfo(mi)
1046+}
1047+
1048+func (x *SetRepoMirrorExcludedResponse) String() string {
1049+ return protoimpl.X.MessageStringOf(x)
1050+}
1051+
1052+func (*SetRepoMirrorExcludedResponse) ProtoMessage() {}
1053+
1054+func (x *SetRepoMirrorExcludedResponse) ProtoReflect() protoreflect.Message {
1055+ mi := &file_ermite_mirror_proto_msgTypes[16]
1056+ if x != nil {
1057+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
1058+ if ms.LoadMessageInfo() == nil {
1059+ ms.StoreMessageInfo(mi)
1060+ }
1061+ return ms
1062+ }
1063+ return mi.MessageOf(x)
1064+}
1065+
1066+// Deprecated: Use SetRepoMirrorExcludedResponse.ProtoReflect.Descriptor instead.
1067+func (*SetRepoMirrorExcludedResponse) Descriptor() ([]byte, []int) {
1068+ return file_ermite_mirror_proto_rawDescGZIP(), []int{16}
1069+}
1070+
1071+func (x *SetRepoMirrorExcludedResponse) GetTarget() *MirrorTarget {
1072+ if x != nil {
1073+ return x.Target
1074+ }
1075+ return nil
1076+}
1077+
1078+// MirrorStatus describes a repository mirror and its last attempts.
1079+type MirrorStatus struct {
1080+ state protoimpl.MessageState `protogen:"open.v1"`
1081+ // Target is the resolved mirror target.
1082+ Target *MirrorTarget `protobuf:"bytes,1,opt,name=target,proto3" json:"target,omitempty"`
1083+ // State is the current mirror state.
1084+ State MirrorState `protobuf:"varint,2,opt,name=state,proto3,enum=ermite.MirrorState" json:"state,omitempty"`
1085+ // FailureClass is the failure category, empty when there is no failure.
1086+ FailureClass string `protobuf:"bytes,3,opt,name=failure_class,json=failureClass,proto3" json:"failure_class,omitempty"`
1087+ // Reason explains the current state.
1088+ Reason string `protobuf:"bytes,4,opt,name=reason,proto3" json:"reason,omitempty"`
1089+ // Detail is the last error detail, returned only to callers with repo:admin
1090+ // on the repository.
1091+ Detail string `protobuf:"bytes,5,opt,name=detail,proto3" json:"detail,omitempty"`
1092+ // ConsecutiveFailures counts failed attempts since the last success or
1093+ // reset.
1094+ ConsecutiveFailures int32 `protobuf:"varint,6,opt,name=consecutive_failures,json=consecutiveFailures,proto3" json:"consecutive_failures,omitempty"`
1095+ // LastAttemptAt is when the last sync was attempted.
1096+ LastAttemptAt *timestamppb.Timestamp `protobuf:"bytes,7,opt,name=last_attempt_at,json=lastAttemptAt,proto3" json:"last_attempt_at,omitempty"`
1097+ // LastSuccessAt is when the last sync succeeded, including a no-op.
1098+ LastSuccessAt *timestamppb.Timestamp `protobuf:"bytes,8,opt,name=last_success_at,json=lastSuccessAt,proto3" json:"last_success_at,omitempty"`
1099+ // NextRetryAt is the next retry time while failing; otherwise unset.
1100+ NextRetryAt *timestamppb.Timestamp `protobuf:"bytes,9,opt,name=next_retry_at,json=nextRetryAt,proto3" json:"next_retry_at,omitempty"`
1101+ // NextRunAt is the next scheduled sync time, or the retry time while
1102+ // failing.
1103+ NextRunAt *timestamppb.Timestamp `protobuf:"bytes,10,opt,name=next_run_at,json=nextRunAt,proto3" json:"next_run_at,omitempty"`
1104+ // PausedAt is when the mirror was paused; otherwise unset.
1105+ PausedAt *timestamppb.Timestamp `protobuf:"bytes,11,opt,name=paused_at,json=pausedAt,proto3" json:"paused_at,omitempty"`
1106+ unknownFields protoimpl.UnknownFields
1107+ sizeCache protoimpl.SizeCache
1108+}
1109+
1110+func (x *MirrorStatus) Reset() {
1111+ *x = MirrorStatus{}
1112+ mi := &file_ermite_mirror_proto_msgTypes[17]
1113+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
1114+ ms.StoreMessageInfo(mi)
1115+}
1116+
1117+func (x *MirrorStatus) String() string {
1118+ return protoimpl.X.MessageStringOf(x)
1119+}
1120+
1121+func (*MirrorStatus) ProtoMessage() {}
1122+
1123+func (x *MirrorStatus) ProtoReflect() protoreflect.Message {
1124+ mi := &file_ermite_mirror_proto_msgTypes[17]
1125+ if x != nil {
1126+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
1127+ if ms.LoadMessageInfo() == nil {
1128+ ms.StoreMessageInfo(mi)
1129+ }
1130+ return ms
1131+ }
1132+ return mi.MessageOf(x)
1133+}
1134+
1135+// Deprecated: Use MirrorStatus.ProtoReflect.Descriptor instead.
1136+func (*MirrorStatus) Descriptor() ([]byte, []int) {
1137+ return file_ermite_mirror_proto_rawDescGZIP(), []int{17}
1138+}
1139+
1140+func (x *MirrorStatus) GetTarget() *MirrorTarget {
1141+ if x != nil {
1142+ return x.Target
1143+ }
1144+ return nil
1145+}
1146+
1147+func (x *MirrorStatus) GetState() MirrorState {
1148+ if x != nil {
1149+ return x.State
1150+ }
1151+ return MirrorState_MIRROR_STATE_UNSPECIFIED
1152+}
1153+
1154+func (x *MirrorStatus) GetFailureClass() string {
1155+ if x != nil {
1156+ return x.FailureClass
1157+ }
1158+ return ""
1159+}
1160+
1161+func (x *MirrorStatus) GetReason() string {
1162+ if x != nil {
1163+ return x.Reason
1164+ }
1165+ return ""
1166+}
1167+
1168+func (x *MirrorStatus) GetDetail() string {
1169+ if x != nil {
1170+ return x.Detail
1171+ }
1172+ return ""
1173+}
1174+
1175+func (x *MirrorStatus) GetConsecutiveFailures() int32 {
1176+ if x != nil {
1177+ return x.ConsecutiveFailures
1178+ }
1179+ return 0
1180+}
1181+
1182+func (x *MirrorStatus) GetLastAttemptAt() *timestamppb.Timestamp {
1183+ if x != nil {
1184+ return x.LastAttemptAt
1185+ }
1186+ return nil
1187+}
1188+
1189+func (x *MirrorStatus) GetLastSuccessAt() *timestamppb.Timestamp {
1190+ if x != nil {
1191+ return x.LastSuccessAt
1192+ }
1193+ return nil
1194+}
1195+
1196+func (x *MirrorStatus) GetNextRetryAt() *timestamppb.Timestamp {
1197+ if x != nil {
1198+ return x.NextRetryAt
1199+ }
1200+ return nil
1201+}
1202+
1203+func (x *MirrorStatus) GetNextRunAt() *timestamppb.Timestamp {
1204+ if x != nil {
1205+ return x.NextRunAt
1206+ }
1207+ return nil
1208+}
1209+
1210+func (x *MirrorStatus) GetPausedAt() *timestamppb.Timestamp {
1211+ if x != nil {
1212+ return x.PausedAt
1213+ }
1214+ return nil
1215+}
1216+
1217+// GetMirrorStatusRequest selects the input of GetMirrorStatus.
1218+type GetMirrorStatusRequest struct {
1219+ state protoimpl.MessageState `protogen:"open.v1"`
1220+ // Repo is the repository name.
1221+ Repo string `protobuf:"bytes,1,opt,name=repo,proto3" json:"repo,omitempty"`
1222+ unknownFields protoimpl.UnknownFields
1223+ sizeCache protoimpl.SizeCache
1224+}
1225+
1226+func (x *GetMirrorStatusRequest) Reset() {
1227+ *x = GetMirrorStatusRequest{}
1228+ mi := &file_ermite_mirror_proto_msgTypes[18]
1229+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
1230+ ms.StoreMessageInfo(mi)
1231+}
1232+
1233+func (x *GetMirrorStatusRequest) String() string {
1234+ return protoimpl.X.MessageStringOf(x)
1235+}
1236+
1237+func (*GetMirrorStatusRequest) ProtoMessage() {}
1238+
1239+func (x *GetMirrorStatusRequest) ProtoReflect() protoreflect.Message {
1240+ mi := &file_ermite_mirror_proto_msgTypes[18]
1241+ if x != nil {
1242+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
1243+ if ms.LoadMessageInfo() == nil {
1244+ ms.StoreMessageInfo(mi)
1245+ }
1246+ return ms
1247+ }
1248+ return mi.MessageOf(x)
1249+}
1250+
1251+// Deprecated: Use GetMirrorStatusRequest.ProtoReflect.Descriptor instead.
1252+func (*GetMirrorStatusRequest) Descriptor() ([]byte, []int) {
1253+ return file_ermite_mirror_proto_rawDescGZIP(), []int{18}
1254+}
1255+
1256+func (x *GetMirrorStatusRequest) GetRepo() string {
1257+ if x != nil {
1258+ return x.Repo
1259+ }
1260+ return ""
1261+}
1262+
1263+// GetMirrorStatusResponse holds the result of GetMirrorStatus.
1264+type GetMirrorStatusResponse struct {
1265+ state protoimpl.MessageState `protogen:"open.v1"`
1266+ // Status is the current mirror status.
1267+ Status *MirrorStatus `protobuf:"bytes,1,opt,name=status,proto3" json:"status,omitempty"`
1268+ unknownFields protoimpl.UnknownFields
1269+ sizeCache protoimpl.SizeCache
1270+}
1271+
1272+func (x *GetMirrorStatusResponse) Reset() {
1273+ *x = GetMirrorStatusResponse{}
1274+ mi := &file_ermite_mirror_proto_msgTypes[19]
1275+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
1276+ ms.StoreMessageInfo(mi)
1277+}
1278+
1279+func (x *GetMirrorStatusResponse) String() string {
1280+ return protoimpl.X.MessageStringOf(x)
1281+}
1282+
1283+func (*GetMirrorStatusResponse) ProtoMessage() {}
1284+
1285+func (x *GetMirrorStatusResponse) ProtoReflect() protoreflect.Message {
1286+ mi := &file_ermite_mirror_proto_msgTypes[19]
1287+ if x != nil {
1288+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
1289+ if ms.LoadMessageInfo() == nil {
1290+ ms.StoreMessageInfo(mi)
1291+ }
1292+ return ms
1293+ }
1294+ return mi.MessageOf(x)
1295+}
1296+
1297+// Deprecated: Use GetMirrorStatusResponse.ProtoReflect.Descriptor instead.
1298+func (*GetMirrorStatusResponse) Descriptor() ([]byte, []int) {
1299+ return file_ermite_mirror_proto_rawDescGZIP(), []int{19}
1300+}
1301+
1302+func (x *GetMirrorStatusResponse) GetStatus() *MirrorStatus {
1303+ if x != nil {
1304+ return x.Status
1305+ }
1306+ return nil
1307+}
1308+
1309+// ListMirrorStatusRequest selects the input of ListMirrorStatus.
1310+type ListMirrorStatusRequest struct {
1311+ state protoimpl.MessageState `protogen:"open.v1"`
1312+ unknownFields protoimpl.UnknownFields
1313+ sizeCache protoimpl.SizeCache
1314+}
1315+
1316+func (x *ListMirrorStatusRequest) Reset() {
1317+ *x = ListMirrorStatusRequest{}
1318+ mi := &file_ermite_mirror_proto_msgTypes[20]
1319+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
1320+ ms.StoreMessageInfo(mi)
1321+}
1322+
1323+func (x *ListMirrorStatusRequest) String() string {
1324+ return protoimpl.X.MessageStringOf(x)
1325+}
1326+
1327+func (*ListMirrorStatusRequest) ProtoMessage() {}
1328+
1329+func (x *ListMirrorStatusRequest) ProtoReflect() protoreflect.Message {
1330+ mi := &file_ermite_mirror_proto_msgTypes[20]
1331+ if x != nil {
1332+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
1333+ if ms.LoadMessageInfo() == nil {
1334+ ms.StoreMessageInfo(mi)
1335+ }
1336+ return ms
1337+ }
1338+ return mi.MessageOf(x)
1339+}
1340+
1341+// Deprecated: Use ListMirrorStatusRequest.ProtoReflect.Descriptor instead.
1342+func (*ListMirrorStatusRequest) Descriptor() ([]byte, []int) {
1343+ return file_ermite_mirror_proto_rawDescGZIP(), []int{20}
1344+}
1345+
1346+// ListMirrorStatusResponse holds the result of ListMirrorStatus.
1347+type ListMirrorStatusResponse struct {
1348+ state protoimpl.MessageState `protogen:"open.v1"`
1349+ // Statuses are the mirror statuses.
1350+ Statuses []*MirrorStatus `protobuf:"bytes,1,rep,name=statuses,proto3" json:"statuses,omitempty"`
1351+ unknownFields protoimpl.UnknownFields
1352+ sizeCache protoimpl.SizeCache
1353+}
1354+
1355+func (x *ListMirrorStatusResponse) Reset() {
1356+ *x = ListMirrorStatusResponse{}
1357+ mi := &file_ermite_mirror_proto_msgTypes[21]
1358+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
1359+ ms.StoreMessageInfo(mi)
1360+}
1361+
1362+func (x *ListMirrorStatusResponse) String() string {
1363+ return protoimpl.X.MessageStringOf(x)
1364+}
1365+
1366+func (*ListMirrorStatusResponse) ProtoMessage() {}
1367+
1368+func (x *ListMirrorStatusResponse) ProtoReflect() protoreflect.Message {
1369+ mi := &file_ermite_mirror_proto_msgTypes[21]
1370+ if x != nil {
1371+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
1372+ if ms.LoadMessageInfo() == nil {
1373+ ms.StoreMessageInfo(mi)
1374+ }
1375+ return ms
1376+ }
1377+ return mi.MessageOf(x)
1378+}
1379+
1380+// Deprecated: Use ListMirrorStatusResponse.ProtoReflect.Descriptor instead.
1381+func (*ListMirrorStatusResponse) Descriptor() ([]byte, []int) {
1382+ return file_ermite_mirror_proto_rawDescGZIP(), []int{21}
1383+}
1384+
1385+func (x *ListMirrorStatusResponse) GetStatuses() []*MirrorStatus {
1386+ if x != nil {
1387+ return x.Statuses
1388+ }
1389+ return nil
1390+}
1391+
1392+// SyncMirrorRequest selects the input of SyncMirror.
1393+type SyncMirrorRequest struct {
1394+ state protoimpl.MessageState `protogen:"open.v1"`
1395+ // Repo is the repository name.
1396+ Repo string `protobuf:"bytes,1,opt,name=repo,proto3" json:"repo,omitempty"`
1397+ // All selects every repository and needs owner rights. Repo must be empty
1398+ // when true.
1399+ All bool `protobuf:"varint,2,opt,name=all,proto3" json:"all,omitempty"`
1400+ // Force lifts a pause and skips the no-op check and the 60-second manual
1401+ // throttle. It never forces a Git push.
1402+ Force bool `protobuf:"varint,3,opt,name=force,proto3" json:"force,omitempty"`
1403+ unknownFields protoimpl.UnknownFields
1404+ sizeCache protoimpl.SizeCache
1405+}
1406+
1407+func (x *SyncMirrorRequest) Reset() {
1408+ *x = SyncMirrorRequest{}
1409+ mi := &file_ermite_mirror_proto_msgTypes[22]
1410+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
1411+ ms.StoreMessageInfo(mi)
1412+}
1413+
1414+func (x *SyncMirrorRequest) String() string {
1415+ return protoimpl.X.MessageStringOf(x)
1416+}
1417+
1418+func (*SyncMirrorRequest) ProtoMessage() {}
1419+
1420+func (x *SyncMirrorRequest) ProtoReflect() protoreflect.Message {
1421+ mi := &file_ermite_mirror_proto_msgTypes[22]
1422+ if x != nil {
1423+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
1424+ if ms.LoadMessageInfo() == nil {
1425+ ms.StoreMessageInfo(mi)
1426+ }
1427+ return ms
1428+ }
1429+ return mi.MessageOf(x)
1430+}
1431+
1432+// Deprecated: Use SyncMirrorRequest.ProtoReflect.Descriptor instead.
1433+func (*SyncMirrorRequest) Descriptor() ([]byte, []int) {
1434+ return file_ermite_mirror_proto_rawDescGZIP(), []int{22}
1435+}
1436+
1437+func (x *SyncMirrorRequest) GetRepo() string {
1438+ if x != nil {
1439+ return x.Repo
1440+ }
1441+ return ""
1442+}
1443+
1444+func (x *SyncMirrorRequest) GetAll() bool {
1445+ if x != nil {
1446+ return x.All
1447+ }
1448+ return false
1449+}
1450+
1451+func (x *SyncMirrorRequest) GetForce() bool {
1452+ if x != nil {
1453+ return x.Force
1454+ }
1455+ return false
1456+}
1457+
1458+// SyncMirrorResult is the result of a sync request for one repository.
1459+type SyncMirrorResult struct {
1460+ state protoimpl.MessageState `protogen:"open.v1"`
1461+ // Repo is the repository name.
1462+ Repo string `protobuf:"bytes,1,opt,name=repo,proto3" json:"repo,omitempty"`
1463+ // Queued says another sync is running and this request was queued.
1464+ Queued bool `protobuf:"varint,2,opt,name=queued,proto3" json:"queued,omitempty"`
1465+ // NoOp says the refs already matched the last successful snapshot.
1466+ NoOp bool `protobuf:"varint,3,opt,name=no_op,json=noOp,proto3" json:"no_op,omitempty"`
1467+ // Status is the current mirror status.
1468+ Status *MirrorStatus `protobuf:"bytes,4,opt,name=status,proto3" json:"status,omitempty"`
1469+ unknownFields protoimpl.UnknownFields
1470+ sizeCache protoimpl.SizeCache
1471+}
1472+
1473+func (x *SyncMirrorResult) Reset() {
1474+ *x = SyncMirrorResult{}
1475+ mi := &file_ermite_mirror_proto_msgTypes[23]
1476+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
1477+ ms.StoreMessageInfo(mi)
1478+}
1479+
1480+func (x *SyncMirrorResult) String() string {
1481+ return protoimpl.X.MessageStringOf(x)
1482+}
1483+
1484+func (*SyncMirrorResult) ProtoMessage() {}
1485+
1486+func (x *SyncMirrorResult) ProtoReflect() protoreflect.Message {
1487+ mi := &file_ermite_mirror_proto_msgTypes[23]
1488+ if x != nil {
1489+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
1490+ if ms.LoadMessageInfo() == nil {
1491+ ms.StoreMessageInfo(mi)
1492+ }
1493+ return ms
1494+ }
1495+ return mi.MessageOf(x)
1496+}
1497+
1498+// Deprecated: Use SyncMirrorResult.ProtoReflect.Descriptor instead.
1499+func (*SyncMirrorResult) Descriptor() ([]byte, []int) {
1500+ return file_ermite_mirror_proto_rawDescGZIP(), []int{23}
1501+}
1502+
1503+func (x *SyncMirrorResult) GetRepo() string {
1504+ if x != nil {
1505+ return x.Repo
1506+ }
1507+ return ""
1508+}
1509+
1510+func (x *SyncMirrorResult) GetQueued() bool {
1511+ if x != nil {
1512+ return x.Queued
1513+ }
1514+ return false
1515+}
1516+
1517+func (x *SyncMirrorResult) GetNoOp() bool {
1518+ if x != nil {
1519+ return x.NoOp
1520+ }
1521+ return false
1522+}
1523+
1524+func (x *SyncMirrorResult) GetStatus() *MirrorStatus {
1525+ if x != nil {
1526+ return x.Status
1527+ }
1528+ return nil
1529+}
1530+
1531+// SyncMirrorResponse holds the result of SyncMirror.
1532+type SyncMirrorResponse struct {
1533+ state protoimpl.MessageState `protogen:"open.v1"`
1534+ // Results are the per-repository sync results.
1535+ Results []*SyncMirrorResult `protobuf:"bytes,1,rep,name=results,proto3" json:"results,omitempty"`
1536+ unknownFields protoimpl.UnknownFields
1537+ sizeCache protoimpl.SizeCache
1538+}
1539+
1540+func (x *SyncMirrorResponse) Reset() {
1541+ *x = SyncMirrorResponse{}
1542+ mi := &file_ermite_mirror_proto_msgTypes[24]
1543+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
1544+ ms.StoreMessageInfo(mi)
1545+}
1546+
1547+func (x *SyncMirrorResponse) String() string {
1548+ return protoimpl.X.MessageStringOf(x)
1549+}
1550+
1551+func (*SyncMirrorResponse) ProtoMessage() {}
1552+
1553+func (x *SyncMirrorResponse) ProtoReflect() protoreflect.Message {
1554+ mi := &file_ermite_mirror_proto_msgTypes[24]
1555+ if x != nil {
1556+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
1557+ if ms.LoadMessageInfo() == nil {
1558+ ms.StoreMessageInfo(mi)
1559+ }
1560+ return ms
1561+ }
1562+ return mi.MessageOf(x)
1563+}
1564+
1565+// Deprecated: Use SyncMirrorResponse.ProtoReflect.Descriptor instead.
1566+func (*SyncMirrorResponse) Descriptor() ([]byte, []int) {
1567+ return file_ermite_mirror_proto_rawDescGZIP(), []int{24}
1568+}
1569+
1570+func (x *SyncMirrorResponse) GetResults() []*SyncMirrorResult {
1571+ if x != nil {
1572+ return x.Results
1573+ }
1574+ return nil
1575+}
1576+
1577+var File_ermite_mirror_proto protoreflect.FileDescriptor
1578+
1579+const file_ermite_mirror_proto_rawDesc = "" +
1580+ "\n" +
1581+ "\x13ermite/mirror.proto\x12\x06ermite\x1a\x1fgoogle/protobuf/timestamp.proto\"\x8f\x01\n" +
1582+ "\tMirrorKey\x12%\n" +
1583+ "\x0eauthorized_key\x18\x01 \x01(\tR\rauthorizedKey\x12 \n" +
1584+ "\vfingerprint\x18\x02 \x01(\tR\vfingerprint\x129\n" +
1585+ "\n" +
1586+ "created_at\x18\x03 \x01(\v2\x1a.google.protobuf.TimestampR\tcreatedAt\"\x15\n" +
1587+ "\x13GetMirrorKeyRequest\";\n" +
1588+ "\x14GetMirrorKeyResponse\x12#\n" +
1589+ "\x03key\x18\x01 \x01(\v2\x11.ermite.MirrorKeyR\x03key\"\x18\n" +
1590+ "\x16RotateMirrorKeyRequest\"q\n" +
1591+ "\x17RotateMirrorKeyResponse\x12#\n" +
1592+ "\x03key\x18\x01 \x01(\v2\x11.ermite.MirrorKeyR\x03key\x121\n" +
1593+ "\x14previous_fingerprint\x18\x02 \x01(\tR\x13previousFingerprint\"\xbd\x01\n" +
1594+ "\fMirrorConfig\x12\x18\n" +
1595+ "\aenabled\x18\x01 \x01(\bR\aenabled\x12!\n" +
1596+ "\furl_template\x18\x02 \x01(\tR\vurlTemplate\x12\x12\n" +
1597+ "\x04cron\x18\x03 \x01(\tR\x04cron\x12!\n" +
1598+ "\fall_branches\x18\x04 \x01(\bR\vallBranches\x129\n" +
1599+ "\n" +
1600+ "updated_at\x18\x05 \x01(\v2\x1a.google.protobuf.TimestampR\tupdatedAt\"\x18\n" +
1601+ "\x16GetMirrorConfigRequest\"G\n" +
1602+ "\x17GetMirrorConfigResponse\x12,\n" +
1603+ "\x06config\x18\x01 \x01(\v2\x14.ermite.MirrorConfigR\x06config\"\xd7\x01\n" +
1604+ "\x16SetMirrorConfigRequest\x12\x1d\n" +
1605+ "\aenabled\x18\x01 \x01(\bH\x00R\aenabled\x88\x01\x01\x12&\n" +
1606+ "\furl_template\x18\x02 \x01(\tH\x01R\vurlTemplate\x88\x01\x01\x12\x17\n" +
1607+ "\x04cron\x18\x03 \x01(\tH\x02R\x04cron\x88\x01\x01\x12&\n" +
1608+ "\fall_branches\x18\x04 \x01(\bH\x03R\vallBranches\x88\x01\x01B\n" +
1609+ "\n" +
1610+ "\b_enabledB\x0f\n" +
1611+ "\r_url_templateB\a\n" +
1612+ "\x05_cronB\x0f\n" +
1613+ "\r_all_branches\"G\n" +
1614+ "\x17SetMirrorConfigResponse\x12,\n" +
1615+ "\x06config\x18\x01 \x01(\v2\x14.ermite.MirrorConfigR\x06config\"\xb3\x01\n" +
1616+ "\fMirrorTarget\x12\x12\n" +
1617+ "\x04repo\x18\x01 \x01(\tR\x04repo\x12\x18\n" +
1618+ "\aenabled\x18\x02 \x01(\bR\aenabled\x12\x10\n" +
1619+ "\x03url\x18\x03 \x01(\tR\x03url\x12\x12\n" +
1620+ "\x04cron\x18\x04 \x01(\tR\x04cron\x12!\n" +
1621+ "\fall_branches\x18\x05 \x01(\bR\vallBranches\x12,\n" +
1622+ "\x06source\x18\x06 \x01(\x0e2\x14.ermite.MirrorSourceR\x06source\"\x89\x01\n" +
1623+ "\x14SetRepoMirrorRequest\x12\x12\n" +
1624+ "\x04repo\x18\x01 \x01(\tR\x04repo\x12\x10\n" +
1625+ "\x03url\x18\x02 \x01(\tR\x03url\x12\x12\n" +
1626+ "\x04cron\x18\x03 \x01(\tR\x04cron\x12&\n" +
1627+ "\fall_branches\x18\x04 \x01(\bH\x00R\vallBranches\x88\x01\x01B\x0f\n" +
1628+ "\r_all_branches\"E\n" +
1629+ "\x15SetRepoMirrorResponse\x12,\n" +
1630+ "\x06target\x18\x01 \x01(\v2\x14.ermite.MirrorTargetR\x06target\"-\n" +
1631+ "\x17RemoveRepoMirrorRequest\x12\x12\n" +
1632+ "\x04repo\x18\x01 \x01(\tR\x04repo\"\x1a\n" +
1633+ "\x18RemoveRepoMirrorResponse\"N\n" +
1634+ "\x1cSetRepoMirrorExcludedRequest\x12\x12\n" +
1635+ "\x04repo\x18\x01 \x01(\tR\x04repo\x12\x1a\n" +
1636+ "\bexcluded\x18\x02 \x01(\bR\bexcluded\"M\n" +
1637+ "\x1dSetRepoMirrorExcludedResponse\x12,\n" +
1638+ "\x06target\x18\x01 \x01(\v2\x14.ermite.MirrorTargetR\x06target\"\xac\x04\n" +
1639+ "\fMirrorStatus\x12,\n" +
1640+ "\x06target\x18\x01 \x01(\v2\x14.ermite.MirrorTargetR\x06target\x12)\n" +
1641+ "\x05state\x18\x02 \x01(\x0e2\x13.ermite.MirrorStateR\x05state\x12#\n" +
1642+ "\rfailure_class\x18\x03 \x01(\tR\ffailureClass\x12\x16\n" +
1643+ "\x06reason\x18\x04 \x01(\tR\x06reason\x12\x16\n" +
1644+ "\x06detail\x18\x05 \x01(\tR\x06detail\x121\n" +
1645+ "\x14consecutive_failures\x18\x06 \x01(\x05R\x13consecutiveFailures\x12B\n" +
1646+ "\x0flast_attempt_at\x18\a \x01(\v2\x1a.google.protobuf.TimestampR\rlastAttemptAt\x12B\n" +
1647+ "\x0flast_success_at\x18\b \x01(\v2\x1a.google.protobuf.TimestampR\rlastSuccessAt\x12>\n" +
1648+ "\rnext_retry_at\x18\t \x01(\v2\x1a.google.protobuf.TimestampR\vnextRetryAt\x12:\n" +
1649+ "\vnext_run_at\x18\n" +
1650+ " \x01(\v2\x1a.google.protobuf.TimestampR\tnextRunAt\x127\n" +
1651+ "\tpaused_at\x18\v \x01(\v2\x1a.google.protobuf.TimestampR\bpausedAt\",\n" +
1652+ "\x16GetMirrorStatusRequest\x12\x12\n" +
1653+ "\x04repo\x18\x01 \x01(\tR\x04repo\"G\n" +
1654+ "\x17GetMirrorStatusResponse\x12,\n" +
1655+ "\x06status\x18\x01 \x01(\v2\x14.ermite.MirrorStatusR\x06status\"\x19\n" +
1656+ "\x17ListMirrorStatusRequest\"L\n" +
1657+ "\x18ListMirrorStatusResponse\x120\n" +
1658+ "\bstatuses\x18\x01 \x03(\v2\x14.ermite.MirrorStatusR\bstatuses\"O\n" +
1659+ "\x11SyncMirrorRequest\x12\x12\n" +
1660+ "\x04repo\x18\x01 \x01(\tR\x04repo\x12\x10\n" +
1661+ "\x03all\x18\x02 \x01(\bR\x03all\x12\x14\n" +
1662+ "\x05force\x18\x03 \x01(\bR\x05force\"\x81\x01\n" +
1663+ "\x10SyncMirrorResult\x12\x12\n" +
1664+ "\x04repo\x18\x01 \x01(\tR\x04repo\x12\x16\n" +
1665+ "\x06queued\x18\x02 \x01(\bR\x06queued\x12\x13\n" +
1666+ "\x05no_op\x18\x03 \x01(\bR\x04noOp\x12,\n" +
1667+ "\x06status\x18\x04 \x01(\v2\x14.ermite.MirrorStatusR\x06status\"H\n" +
1668+ "\x12SyncMirrorResponse\x122\n" +
1669+ "\aresults\x18\x01 \x03(\v2\x18.ermite.SyncMirrorResultR\aresults*\x9b\x01\n" +
1670+ "\fMirrorSource\x12\x1d\n" +
1671+ "\x19MIRROR_SOURCE_UNSPECIFIED\x10\x00\x12\x1a\n" +
1672+ "\x16MIRROR_SOURCE_DISABLED\x10\x01\x12\x18\n" +
1673+ "\x14MIRROR_SOURCE_GLOBAL\x10\x02\x12\x1a\n" +
1674+ "\x16MIRROR_SOURCE_OVERRIDE\x10\x03\x12\x1a\n" +
1675+ "\x16MIRROR_SOURCE_EXCLUDED\x10\x04*\x8e\x01\n" +
1676+ "\vMirrorState\x12\x1c\n" +
1677+ "\x18MIRROR_STATE_UNSPECIFIED\x10\x00\x12\x19\n" +
1678+ "\x15MIRROR_STATE_DISABLED\x10\x01\x12\x13\n" +
1679+ "\x0fMIRROR_STATE_OK\x10\x02\x12\x18\n" +
1680+ "\x14MIRROR_STATE_FAILING\x10\x03\x12\x17\n" +
1681+ "\x13MIRROR_STATE_PAUSED\x10\x042\xd1\x06\n" +
1682+ "\rMirrorService\x12I\n" +
1683+ "\fGetMirrorKey\x12\x1b.ermite.GetMirrorKeyRequest\x1a\x1c.ermite.GetMirrorKeyResponse\x12R\n" +
1684+ "\x0fRotateMirrorKey\x12\x1e.ermite.RotateMirrorKeyRequest\x1a\x1f.ermite.RotateMirrorKeyResponse\x12R\n" +
1685+ "\x0fGetMirrorConfig\x12\x1e.ermite.GetMirrorConfigRequest\x1a\x1f.ermite.GetMirrorConfigResponse\x12R\n" +
1686+ "\x0fSetMirrorConfig\x12\x1e.ermite.SetMirrorConfigRequest\x1a\x1f.ermite.SetMirrorConfigResponse\x12L\n" +
1687+ "\rSetRepoMirror\x12\x1c.ermite.SetRepoMirrorRequest\x1a\x1d.ermite.SetRepoMirrorResponse\x12U\n" +
1688+ "\x10RemoveRepoMirror\x12\x1f.ermite.RemoveRepoMirrorRequest\x1a .ermite.RemoveRepoMirrorResponse\x12d\n" +
1689+ "\x15SetRepoMirrorExcluded\x12$.ermite.SetRepoMirrorExcludedRequest\x1a%.ermite.SetRepoMirrorExcludedResponse\x12R\n" +
1690+ "\x0fGetMirrorStatus\x12\x1e.ermite.GetMirrorStatusRequest\x1a\x1f.ermite.GetMirrorStatusResponse\x12U\n" +
1691+ "\x10ListMirrorStatus\x12\x1f.ermite.ListMirrorStatusRequest\x1a .ermite.ListMirrorStatusResponse\x12C\n" +
1692+ "\n" +
1693+ "SyncMirror\x12\x19.ermite.SyncMirrorRequest\x1a\x1a.ermite.SyncMirrorResponseBr\n" +
1694+ "\n" +
1695+ "com.ermiteB\vMirrorProtoP\x01Z\x1fbnema.dev/ermite-api/gen/ermite\xa2\x02\x03EXX\xaa\x02\x06Ermite\xca\x02\x06Ermite\xe2\x02\x12Ermite\\GPBMetadata\xea\x02\x06Ermiteb\x06proto3"
1696+
1697+var (
1698+ file_ermite_mirror_proto_rawDescOnce sync.Once
1699+ file_ermite_mirror_proto_rawDescData []byte
1700+)
1701+
1702+func file_ermite_mirror_proto_rawDescGZIP() []byte {
1703+ file_ermite_mirror_proto_rawDescOnce.Do(func() {
1704+ file_ermite_mirror_proto_rawDescData = protoimpl.X.CompressGZIP(unsafe.Slice(unsafe.StringData(file_ermite_mirror_proto_rawDesc), len(file_ermite_mirror_proto_rawDesc)))
1705+ })
1706+ return file_ermite_mirror_proto_rawDescData
1707+}
1708+
1709+var file_ermite_mirror_proto_enumTypes = make([]protoimpl.EnumInfo, 2)
1710+var file_ermite_mirror_proto_msgTypes = make([]protoimpl.MessageInfo, 25)
1711+var file_ermite_mirror_proto_goTypes = []any{
1712+ (MirrorSource)(0), // 0: ermite.MirrorSource
1713+ (MirrorState)(0), // 1: ermite.MirrorState
1714+ (*MirrorKey)(nil), // 2: ermite.MirrorKey
1715+ (*GetMirrorKeyRequest)(nil), // 3: ermite.GetMirrorKeyRequest
1716+ (*GetMirrorKeyResponse)(nil), // 4: ermite.GetMirrorKeyResponse
1717+ (*RotateMirrorKeyRequest)(nil), // 5: ermite.RotateMirrorKeyRequest
1718+ (*RotateMirrorKeyResponse)(nil), // 6: ermite.RotateMirrorKeyResponse
1719+ (*MirrorConfig)(nil), // 7: ermite.MirrorConfig
1720+ (*GetMirrorConfigRequest)(nil), // 8: ermite.GetMirrorConfigRequest
1721+ (*GetMirrorConfigResponse)(nil), // 9: ermite.GetMirrorConfigResponse
1722+ (*SetMirrorConfigRequest)(nil), // 10: ermite.SetMirrorConfigRequest
1723+ (*SetMirrorConfigResponse)(nil), // 11: ermite.SetMirrorConfigResponse
1724+ (*MirrorTarget)(nil), // 12: ermite.MirrorTarget
1725+ (*SetRepoMirrorRequest)(nil), // 13: ermite.SetRepoMirrorRequest
1726+ (*SetRepoMirrorResponse)(nil), // 14: ermite.SetRepoMirrorResponse
1727+ (*RemoveRepoMirrorRequest)(nil), // 15: ermite.RemoveRepoMirrorRequest
1728+ (*RemoveRepoMirrorResponse)(nil), // 16: ermite.RemoveRepoMirrorResponse
1729+ (*SetRepoMirrorExcludedRequest)(nil), // 17: ermite.SetRepoMirrorExcludedRequest
1730+ (*SetRepoMirrorExcludedResponse)(nil), // 18: ermite.SetRepoMirrorExcludedResponse
1731+ (*MirrorStatus)(nil), // 19: ermite.MirrorStatus
1732+ (*GetMirrorStatusRequest)(nil), // 20: ermite.GetMirrorStatusRequest
1733+ (*GetMirrorStatusResponse)(nil), // 21: ermite.GetMirrorStatusResponse
1734+ (*ListMirrorStatusRequest)(nil), // 22: ermite.ListMirrorStatusRequest
1735+ (*ListMirrorStatusResponse)(nil), // 23: ermite.ListMirrorStatusResponse
1736+ (*SyncMirrorRequest)(nil), // 24: ermite.SyncMirrorRequest
1737+ (*SyncMirrorResult)(nil), // 25: ermite.SyncMirrorResult
1738+ (*SyncMirrorResponse)(nil), // 26: ermite.SyncMirrorResponse
1739+ (*timestamppb.Timestamp)(nil), // 27: google.protobuf.Timestamp
1740+}
1741+var file_ermite_mirror_proto_depIdxs = []int32{
1742+ 27, // 0: ermite.MirrorKey.created_at:type_name -> google.protobuf.Timestamp
1743+ 2, // 1: ermite.GetMirrorKeyResponse.key:type_name -> ermite.MirrorKey
1744+ 2, // 2: ermite.RotateMirrorKeyResponse.key:type_name -> ermite.MirrorKey
1745+ 27, // 3: ermite.MirrorConfig.updated_at:type_name -> google.protobuf.Timestamp
1746+ 7, // 4: ermite.GetMirrorConfigResponse.config:type_name -> ermite.MirrorConfig
1747+ 7, // 5: ermite.SetMirrorConfigResponse.config:type_name -> ermite.MirrorConfig
1748+ 0, // 6: ermite.MirrorTarget.source:type_name -> ermite.MirrorSource
1749+ 12, // 7: ermite.SetRepoMirrorResponse.target:type_name -> ermite.MirrorTarget
1750+ 12, // 8: ermite.SetRepoMirrorExcludedResponse.target:type_name -> ermite.MirrorTarget
1751+ 12, // 9: ermite.MirrorStatus.target:type_name -> ermite.MirrorTarget
1752+ 1, // 10: ermite.MirrorStatus.state:type_name -> ermite.MirrorState
1753+ 27, // 11: ermite.MirrorStatus.last_attempt_at:type_name -> google.protobuf.Timestamp
1754+ 27, // 12: ermite.MirrorStatus.last_success_at:type_name -> google.protobuf.Timestamp
1755+ 27, // 13: ermite.MirrorStatus.next_retry_at:type_name -> google.protobuf.Timestamp
1756+ 27, // 14: ermite.MirrorStatus.next_run_at:type_name -> google.protobuf.Timestamp
1757+ 27, // 15: ermite.MirrorStatus.paused_at:type_name -> google.protobuf.Timestamp
1758+ 19, // 16: ermite.GetMirrorStatusResponse.status:type_name -> ermite.MirrorStatus
1759+ 19, // 17: ermite.ListMirrorStatusResponse.statuses:type_name -> ermite.MirrorStatus
1760+ 19, // 18: ermite.SyncMirrorResult.status:type_name -> ermite.MirrorStatus
1761+ 25, // 19: ermite.SyncMirrorResponse.results:type_name -> ermite.SyncMirrorResult
1762+ 3, // 20: ermite.MirrorService.GetMirrorKey:input_type -> ermite.GetMirrorKeyRequest
1763+ 5, // 21: ermite.MirrorService.RotateMirrorKey:input_type -> ermite.RotateMirrorKeyRequest
1764+ 8, // 22: ermite.MirrorService.GetMirrorConfig:input_type -> ermite.GetMirrorConfigRequest
1765+ 10, // 23: ermite.MirrorService.SetMirrorConfig:input_type -> ermite.SetMirrorConfigRequest
1766+ 13, // 24: ermite.MirrorService.SetRepoMirror:input_type -> ermite.SetRepoMirrorRequest
1767+ 15, // 25: ermite.MirrorService.RemoveRepoMirror:input_type -> ermite.RemoveRepoMirrorRequest
1768+ 17, // 26: ermite.MirrorService.SetRepoMirrorExcluded:input_type -> ermite.SetRepoMirrorExcludedRequest
1769+ 20, // 27: ermite.MirrorService.GetMirrorStatus:input_type -> ermite.GetMirrorStatusRequest
1770+ 22, // 28: ermite.MirrorService.ListMirrorStatus:input_type -> ermite.ListMirrorStatusRequest
1771+ 24, // 29: ermite.MirrorService.SyncMirror:input_type -> ermite.SyncMirrorRequest
1772+ 4, // 30: ermite.MirrorService.GetMirrorKey:output_type -> ermite.GetMirrorKeyResponse
1773+ 6, // 31: ermite.MirrorService.RotateMirrorKey:output_type -> ermite.RotateMirrorKeyResponse
1774+ 9, // 32: ermite.MirrorService.GetMirrorConfig:output_type -> ermite.GetMirrorConfigResponse
1775+ 11, // 33: ermite.MirrorService.SetMirrorConfig:output_type -> ermite.SetMirrorConfigResponse
1776+ 14, // 34: ermite.MirrorService.SetRepoMirror:output_type -> ermite.SetRepoMirrorResponse
1777+ 16, // 35: ermite.MirrorService.RemoveRepoMirror:output_type -> ermite.RemoveRepoMirrorResponse
1778+ 18, // 36: ermite.MirrorService.SetRepoMirrorExcluded:output_type -> ermite.SetRepoMirrorExcludedResponse
1779+ 21, // 37: ermite.MirrorService.GetMirrorStatus:output_type -> ermite.GetMirrorStatusResponse
1780+ 23, // 38: ermite.MirrorService.ListMirrorStatus:output_type -> ermite.ListMirrorStatusResponse
1781+ 26, // 39: ermite.MirrorService.SyncMirror:output_type -> ermite.SyncMirrorResponse
1782+ 30, // [30:40] is the sub-list for method output_type
1783+ 20, // [20:30] is the sub-list for method input_type
1784+ 20, // [20:20] is the sub-list for extension type_name
1785+ 20, // [20:20] is the sub-list for extension extendee
1786+ 0, // [0:20] is the sub-list for field type_name
1787+}
1788+
1789+func init() { file_ermite_mirror_proto_init() }
1790+func file_ermite_mirror_proto_init() {
1791+ if File_ermite_mirror_proto != nil {
1792+ return
1793+ }
1794+ file_ermite_mirror_proto_msgTypes[8].OneofWrappers = []any{}
1795+ file_ermite_mirror_proto_msgTypes[11].OneofWrappers = []any{}
1796+ type x struct{}
1797+ out := protoimpl.TypeBuilder{
1798+ File: protoimpl.DescBuilder{
1799+ GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
1800+ RawDescriptor: unsafe.Slice(unsafe.StringData(file_ermite_mirror_proto_rawDesc), len(file_ermite_mirror_proto_rawDesc)),
1801+ NumEnums: 2,
1802+ NumMessages: 25,
1803+ NumExtensions: 0,
1804+ NumServices: 1,
1805+ },
1806+ GoTypes: file_ermite_mirror_proto_goTypes,
1807+ DependencyIndexes: file_ermite_mirror_proto_depIdxs,
1808+ EnumInfos: file_ermite_mirror_proto_enumTypes,
1809+ MessageInfos: file_ermite_mirror_proto_msgTypes,
1810+ }.Build()
1811+ File_ermite_mirror_proto = out.File
1812+ file_ermite_mirror_proto_goTypes = nil
1813+ file_ermite_mirror_proto_depIdxs = nil
1814+}
M gen_test.go +45 -0
@@ -19,6 +19,17 @@ import (
1919 // TestProcedures pins the procedure paths: they are the wire contract.
2020 func TestProcedures(t *testing.T) {
2121 tests := []struct{ got, want string }{
22+ {ermiteconnect.MirrorServiceGetMirrorKeyProcedure, "/ermite.MirrorService/GetMirrorKey"},
23+ {ermiteconnect.MirrorServiceRotateMirrorKeyProcedure, "/ermite.MirrorService/RotateMirrorKey"},
24+ {ermiteconnect.MirrorServiceGetMirrorConfigProcedure, "/ermite.MirrorService/GetMirrorConfig"},
25+ {ermiteconnect.MirrorServiceSetMirrorConfigProcedure, "/ermite.MirrorService/SetMirrorConfig"},
26+ {ermiteconnect.MirrorServiceSetRepoMirrorProcedure, "/ermite.MirrorService/SetRepoMirror"},
27+ {ermiteconnect.MirrorServiceRemoveRepoMirrorProcedure, "/ermite.MirrorService/RemoveRepoMirror"},
28+ {ermiteconnect.MirrorServiceSetRepoMirrorExcludedProcedure, "/ermite.MirrorService/SetRepoMirrorExcluded"},
29+ {ermiteconnect.MirrorServiceGetMirrorStatusProcedure, "/ermite.MirrorService/GetMirrorStatus"},
30+ {ermiteconnect.MirrorServiceListMirrorStatusProcedure, "/ermite.MirrorService/ListMirrorStatus"},
31+ {ermiteconnect.MirrorServiceSyncMirrorProcedure, "/ermite.MirrorService/SyncMirror"},
32+
2233 {ermiteconnect.RepoServiceListReposProcedure, "/ermite.RepoService/ListRepos"},
2334 {ermiteconnect.RepoServiceGetRepoProcedure, "/ermite.RepoService/GetRepo"},
2435 {ermiteconnect.RepoServiceCreateRepoProcedure, "/ermite.RepoService/CreateRepo"},
@@ -569,3 +580,37 @@ func TestCI3RoundTrip(t *testing.T) {
569580 }
570581 }
571582 }
583+
584+// TestMirrorWire pins event numbers and verifies presence of explicit zero patches.
585+func TestMirrorWire(t *testing.T) {
586+ fields := (&ermite.Event{}).ProtoReflect().Descriptor().Fields()
587+ for name, number := range map[protoreflect.Name]protoreflect.FieldNumber{"mirror_failed": 23, "mirror_recovered": 24} {
588+ if fd := fields.ByName(name); fd == nil || fd.Number() != number || fd.ContainingOneof().Name() != "kind" {
589+ t.Fatalf("Event.%s: %v, want kind field %d", name, fd, number)
590+ }
591+ }
592+ for _, msg := range []proto.Message{&ermite.MirrorFailed{}, &ermite.MirrorRecovered{}} {
593+ fields := msg.ProtoReflect().Descriptor().Fields()
594+ if fields.ByName("url") != nil || fields.ByName("detail") != nil {
595+ t.Fatalf("%T leaks URL or detail", msg)
596+ }
597+ }
598+ for _, in := range []proto.Message{
599+ &ermite.SetMirrorConfigRequest{Enabled: proto.Bool(false), UrlTemplate: proto.String(""), Cron: proto.String(""), AllBranches: proto.Bool(false)},
600+ &ermite.SetRepoMirrorRequest{Repo: "repo", AllBranches: proto.Bool(false)},
601+ &ermite.Event{Kind: &ermite.Event_MirrorFailed{MirrorFailed: &ermite.MirrorFailed{Repo: "repo", State: ermite.MirrorState_MIRROR_STATE_PAUSED, FailureClass: "diverged", Reason: "remote diverged"}}},
602+ &ermite.Event{Kind: &ermite.Event_MirrorRecovered{MirrorRecovered: &ermite.MirrorRecovered{Repo: "repo"}}},
603+ } {
604+ b, err := proto.Marshal(in)
605+ if err != nil {
606+ t.Fatal(err)
607+ }
608+ out := in.ProtoReflect().New().Interface()
609+ if err := proto.Unmarshal(b, out); err != nil {
610+ t.Fatal(err)
611+ }
612+ if !proto.Equal(in, out) {
613+ t.Errorf("%T: round trip mismatch: %v != %v", in, out, in)
614+ }
615+ }
616+}
@@ -19,6 +19,17 @@ import (
19 // TestProcedures pins the procedure paths: they are the wire contract.19 // TestProcedures pins the procedure paths: they are the wire contract.
20 func TestProcedures(t *testing.T) {20 func TestProcedures(t *testing.T) {
21 tests := []struct{ got, want string }{21 tests := []struct{ got, want string }{
22+ {ermiteconnect.MirrorServiceGetMirrorKeyProcedure, "/ermite.MirrorService/GetMirrorKey"},
23+ {ermiteconnect.MirrorServiceRotateMirrorKeyProcedure, "/ermite.MirrorService/RotateMirrorKey"},
24+ {ermiteconnect.MirrorServiceGetMirrorConfigProcedure, "/ermite.MirrorService/GetMirrorConfig"},
25+ {ermiteconnect.MirrorServiceSetMirrorConfigProcedure, "/ermite.MirrorService/SetMirrorConfig"},
26+ {ermiteconnect.MirrorServiceSetRepoMirrorProcedure, "/ermite.MirrorService/SetRepoMirror"},
27+ {ermiteconnect.MirrorServiceRemoveRepoMirrorProcedure, "/ermite.MirrorService/RemoveRepoMirror"},
28+ {ermiteconnect.MirrorServiceSetRepoMirrorExcludedProcedure, "/ermite.MirrorService/SetRepoMirrorExcluded"},
29+ {ermiteconnect.MirrorServiceGetMirrorStatusProcedure, "/ermite.MirrorService/GetMirrorStatus"},
30+ {ermiteconnect.MirrorServiceListMirrorStatusProcedure, "/ermite.MirrorService/ListMirrorStatus"},
31+ {ermiteconnect.MirrorServiceSyncMirrorProcedure, "/ermite.MirrorService/SyncMirror"},
32+
22 {ermiteconnect.RepoServiceListReposProcedure, "/ermite.RepoService/ListRepos"},33 {ermiteconnect.RepoServiceListReposProcedure, "/ermite.RepoService/ListRepos"},
23 {ermiteconnect.RepoServiceGetRepoProcedure, "/ermite.RepoService/GetRepo"},34 {ermiteconnect.RepoServiceGetRepoProcedure, "/ermite.RepoService/GetRepo"},
24 {ermiteconnect.RepoServiceCreateRepoProcedure, "/ermite.RepoService/CreateRepo"},35 {ermiteconnect.RepoServiceCreateRepoProcedure, "/ermite.RepoService/CreateRepo"},
@@ -569,3 +580,37 @@ func TestCI3RoundTrip(t *testing.T) {
569 }580 }
570 }581 }
571 }582 }
583+
584+// TestMirrorWire pins event numbers and verifies presence of explicit zero patches.
585+func TestMirrorWire(t *testing.T) {
586+ fields := (&ermite.Event{}).ProtoReflect().Descriptor().Fields()
587+ for name, number := range map[protoreflect.Name]protoreflect.FieldNumber{"mirror_failed": 23, "mirror_recovered": 24} {
588+ if fd := fields.ByName(name); fd == nil || fd.Number() != number || fd.ContainingOneof().Name() != "kind" {
589+ t.Fatalf("Event.%s: %v, want kind field %d", name, fd, number)
590+ }
591+ }
592+ for _, msg := range []proto.Message{&ermite.MirrorFailed{}, &ermite.MirrorRecovered{}} {
593+ fields := msg.ProtoReflect().Descriptor().Fields()
594+ if fields.ByName("url") != nil || fields.ByName("detail") != nil {
595+ t.Fatalf("%T leaks URL or detail", msg)
596+ }
597+ }
598+ for _, in := range []proto.Message{
599+ &ermite.SetMirrorConfigRequest{Enabled: proto.Bool(false), UrlTemplate: proto.String(""), Cron: proto.String(""), AllBranches: proto.Bool(false)},
600+ &ermite.SetRepoMirrorRequest{Repo: "repo", AllBranches: proto.Bool(false)},
601+ &ermite.Event{Kind: &ermite.Event_MirrorFailed{MirrorFailed: &ermite.MirrorFailed{Repo: "repo", State: ermite.MirrorState_MIRROR_STATE_PAUSED, FailureClass: "diverged", Reason: "remote diverged"}}},
602+ &ermite.Event{Kind: &ermite.Event_MirrorRecovered{MirrorRecovered: &ermite.MirrorRecovered{Repo: "repo"}}},
603+ } {
604+ b, err := proto.Marshal(in)
605+ if err != nil {
606+ t.Fatal(err)
607+ }
608+ out := in.ProtoReflect().New().Interface()
609+ if err := proto.Unmarshal(b, out); err != nil {
610+ t.Fatal(err)
611+ }
612+ if !proto.Equal(in, out) {
613+ t.Errorf("%T: round trip mismatch: %v != %v", in, out, in)
614+ }
615+ }
616+}
M proto/ermite/event.proto +27 -0
@@ -6,6 +6,7 @@ package ermite;
66
77 import "ermite/issue.proto";
88 import "ermite/merge_request.proto";
9+import "ermite/mirror.proto";
910 import "ermite/repo.proto";
1011 import "ermite/run.proto";
1112 import "google/protobuf/timestamp.proto";
@@ -135,6 +136,10 @@ message Event {
135136 // MergeRequestMergeability: the mergeability of an open merge request
136137 // changed.
137138 MergeRequestMergeability merge_request_mergeability = 22;
139+ // MirrorFailed: a mirror entered failing or paused.
140+ MirrorFailed mirror_failed = 23;
141+ // MirrorRecovered: a failing or paused mirror succeeded again.
142+ MirrorRecovered mirror_recovered = 24;
138143 }
139144 }
140145
@@ -306,3 +311,25 @@ message JobUpdated {
306311 // Job is the job after the change, with its steps.
307312 RunJob job = 1;
308313 }
314+
315+// MirrorFailed reports a transition into failing or paused, including failing
316+// to paused, not every failed attempt. Servers with feature "mirror" deliver it
317+// on "repo:<name>" and "home", subject to repository visibility. It carries no
318+// URL or error detail.
319+message MirrorFailed {
320+ // Repo is the repository name.
321+ string repo = 1;
322+ // State is the new mirror state.
323+ MirrorState state = 2;
324+ // FailureClass is the failure category.
325+ string failure_class = 3;
326+ // Reason explains the failure without a URL or error detail.
327+ string reason = 4;
328+}
329+
330+// MirrorRecovered reports a successful sync after failing or paused. Delivery
331+// follows MirrorFailed. It carries no URL or error detail.
332+message MirrorRecovered {
333+ // Repo is the repository name.
334+ string repo = 1;
335+}
@@ -6,6 +6,7 @@ package ermite;
6 6
7 import "ermite/issue.proto";7 import "ermite/issue.proto";
8 import "ermite/merge_request.proto";8 import "ermite/merge_request.proto";
9+import "ermite/mirror.proto";
9 import "ermite/repo.proto";10 import "ermite/repo.proto";
10 import "ermite/run.proto";11 import "ermite/run.proto";
11 import "google/protobuf/timestamp.proto";12 import "google/protobuf/timestamp.proto";
@@ -135,6 +136,10 @@ message Event {
135 // MergeRequestMergeability: the mergeability of an open merge request136 // MergeRequestMergeability: the mergeability of an open merge request
136 // changed.137 // changed.
137 MergeRequestMergeability merge_request_mergeability = 22;138 MergeRequestMergeability merge_request_mergeability = 22;
139+ // MirrorFailed: a mirror entered failing or paused.
140+ MirrorFailed mirror_failed = 23;
141+ // MirrorRecovered: a failing or paused mirror succeeded again.
142+ MirrorRecovered mirror_recovered = 24;
138 }143 }
139 }144 }
140 145
@@ -306,3 +311,25 @@ message JobUpdated {
306 // Job is the job after the change, with its steps.311 // Job is the job after the change, with its steps.
307 RunJob job = 1;312 RunJob job = 1;
308 }313 }
314+
315+// MirrorFailed reports a transition into failing or paused, including failing
316+// to paused, not every failed attempt. Servers with feature "mirror" deliver it
317+// on "repo:<name>" and "home", subject to repository visibility. It carries no
318+// URL or error detail.
319+message MirrorFailed {
320+ // Repo is the repository name.
321+ string repo = 1;
322+ // State is the new mirror state.
323+ MirrorState state = 2;
324+ // FailureClass is the failure category.
325+ string failure_class = 3;
326+ // Reason explains the failure without a URL or error detail.
327+ string reason = 4;
328+}
329+
330+// MirrorRecovered reports a successful sync after failing or paused. Delivery
331+// follows MirrorFailed. It carries no URL or error detail.
332+message MirrorRecovered {
333+ // Repo is the repository name.
334+ string repo = 1;
335+}
A proto/ermite/mirror.proto +296 -0
@@ -0,0 +1,296 @@
1+// SPDX-License-Identifier: MIT
2+
3+syntax = "proto3";
4+
5+package ermite;
6+
7+import "google/protobuf/timestamp.proto";
8+
9+// MirrorService configures the push mirrors of the server. Global settings
10+// and key
11+// rotation need the admin token or a token with every scope and no repository
12+// or
13+// branch limits; per-repository settings and SyncMirror need repo:admin on
14+// the
15+// repository; status needs read access. GetMirrorKey needs a non-anonymous
16+// caller.
17+// ListMirrorStatus and SyncMirror with All need owner rights. No new token
18+// scope
19+// is required. Servers implementing this service list "mirror" in
20+// GetVersionResponse.features.
21+service MirrorService {
22+ // GetMirrorKey returns the public mirror key, generating it on first use.
23+ // Needs a non-anonymous caller. Fails with failed_precondition without
24+ // ERMITE_SECRETS_KEY.
25+ rpc GetMirrorKey(GetMirrorKeyRequest) returns (GetMirrorKeyResponse);
26+ // RotateMirrorKey replaces the key immediately. Add the new key to remotes
27+ // and sync with force to recover from authentication failures.
28+ rpc RotateMirrorKey(RotateMirrorKeyRequest) returns (RotateMirrorKeyResponse);
29+ // GetMirrorConfig returns the global mirror policy.
30+ rpc GetMirrorConfig(GetMirrorConfigRequest) returns (GetMirrorConfigResponse);
31+ // SetMirrorConfig patches the global policy. Unset fields are unchanged.
32+ // Invalid fields give invalid_argument with field violations.
33+ rpc SetMirrorConfig(SetMirrorConfigRequest) returns (SetMirrorConfigResponse);
34+ // SetRepoMirror sets an override, even when global mirroring is disabled.
35+ rpc SetRepoMirror(SetRepoMirrorRequest) returns (SetRepoMirrorResponse);
36+ // RemoveRepoMirror removes the override so the global policy applies again.
37+ rpc RemoveRepoMirror(RemoveRepoMirrorRequest) returns (RemoveRepoMirrorResponse);
38+ // SetRepoMirrorExcluded excludes or includes a repository in the global
39+ // policy. An explicit URL override takes precedence.
40+ rpc SetRepoMirrorExcluded(SetRepoMirrorExcludedRequest) returns (SetRepoMirrorExcludedResponse);
41+ // GetMirrorStatus returns the resolved target and status of one repository.
42+ rpc GetMirrorStatus(GetMirrorStatusRequest) returns (GetMirrorStatusResponse);
43+ // ListMirrorStatus lists mirror statuses and needs owner rights.
44+ rpc ListMirrorStatus(ListMirrorStatusRequest) returns (ListMirrorStatusResponse);
45+ // SyncMirror syncs Repo or, with All, every repository. Paused mirrors need
46+ // Force. Manual requests without Force are at least 60 seconds apart.
47+ rpc SyncMirror(SyncMirrorRequest) returns (SyncMirrorResponse);
48+}
49+
50+// MirrorKey is the public SSH key used for push mirrors. Private key material
51+// is never returned.
52+message MirrorKey {
53+ // AuthorizedKey is the SSH authorized_keys line.
54+ string authorized_key = 1;
55+ // Fingerprint is the SHA256 fingerprint of the public key.
56+ string fingerprint = 2;
57+ // CreatedAt is when the key was created.
58+ google.protobuf.Timestamp created_at = 3;
59+}
60+
61+// GetMirrorKeyRequest selects the input of GetMirrorKey.
62+message GetMirrorKeyRequest {}
63+
64+// GetMirrorKeyResponse holds the result of GetMirrorKey.
65+message GetMirrorKeyResponse {
66+ // Key is the public mirror key.
67+ MirrorKey key = 1;
68+}
69+
70+// RotateMirrorKeyRequest selects the input of RotateMirrorKey.
71+message RotateMirrorKeyRequest {}
72+
73+// RotateMirrorKeyResponse holds the result of RotateMirrorKey.
74+message RotateMirrorKeyResponse {
75+ // Key is the public mirror key.
76+ MirrorKey key = 1;
77+ // PreviousFingerprint is the fingerprint of the replaced key.
78+ string previous_fingerprint = 2;
79+}
80+
81+// MirrorConfig is the server-wide push mirror policy.
82+message MirrorConfig {
83+ // Enabled says whether mirroring is enabled.
84+ bool enabled = 1;
85+ // URLTemplate is an SSH URL containing "{repo}", replaced with the
86+ // repository name.
87+ string url_template = 2;
88+ // Cron is a five-field cron expression in UTC, no more frequent than every
89+ // five minutes.
90+ string cron = 3;
91+ // AllBranches includes every branch rather than only the default branch.
92+ // Tags are always included.
93+ bool all_branches = 4;
94+ // UpdatedAt is when the configuration was last changed.
95+ google.protobuf.Timestamp updated_at = 5;
96+}
97+
98+// GetMirrorConfigRequest selects the input of GetMirrorConfig.
99+message GetMirrorConfigRequest {}
100+
101+// GetMirrorConfigResponse holds the result of GetMirrorConfig.
102+message GetMirrorConfigResponse {
103+ // Config is the global mirror policy.
104+ MirrorConfig config = 1;
105+}
106+
107+// SetMirrorConfigRequest selects the input of SetMirrorConfig.
108+message SetMirrorConfigRequest {
109+ // Enabled says whether mirroring is enabled. Unset means unchanged.
110+ optional bool enabled = 1;
111+ // URLTemplate is an SSH URL containing "{repo}", replaced with the
112+ // repository name. Unset means unchanged.
113+ optional string url_template = 2;
114+ // Cron is a five-field cron expression in UTC, no more frequent than every
115+ // five minutes. Unset means unchanged.
116+ optional string cron = 3;
117+ // AllBranches includes every branch rather than only the default branch.
118+ // Tags are always included. Unset means unchanged.
119+ optional bool all_branches = 4;
120+}
121+
122+// SetMirrorConfigResponse holds the result of SetMirrorConfig.
123+message SetMirrorConfigResponse {
124+ // Config is the global mirror policy.
125+ MirrorConfig config = 1;
126+}
127+
128+// MirrorSource says which configuration applies to a repository.
129+enum MirrorSource {
130+ // Unspecified.
131+ MIRROR_SOURCE_UNSPECIFIED = 0;
132+ // Disabled.
133+ MIRROR_SOURCE_DISABLED = 1;
134+ // Global.
135+ MIRROR_SOURCE_GLOBAL = 2;
136+ // Override.
137+ MIRROR_SOURCE_OVERRIDE = 3;
138+ // Excluded.
139+ MIRROR_SOURCE_EXCLUDED = 4;
140+}
141+
142+// MirrorTarget is the resolved push mirror target of a repository.
143+message MirrorTarget {
144+ // Repo is the repository name.
145+ string repo = 1;
146+ // Enabled says whether mirroring is enabled.
147+ bool enabled = 2;
148+ // URL is the SSH destination of the mirror.
149+ string url = 3;
150+ // Cron is a five-field cron expression in UTC, no more frequent than every
151+ // five minutes.
152+ string cron = 4;
153+ // AllBranches includes every branch rather than only the default branch.
154+ // Tags are always included.
155+ bool all_branches = 5;
156+ // Source is the configuration used to resolve the target.
157+ MirrorSource source = 6;
158+}
159+
160+// SetRepoMirrorRequest selects the input of SetRepoMirror.
161+message SetRepoMirrorRequest {
162+ // Repo is the repository name.
163+ string repo = 1;
164+ // URL is the SSH destination of the mirror.
165+ string url = 2;
166+ // Cron is a five-field cron expression in UTC, no more frequent than every
167+ // five minutes.
168+ // Empty means inherit the global cron.
169+ string cron = 3;
170+ // AllBranches includes every branch rather than only the default branch.
171+ // Tags are always included. Unset means inherit the global setting.
172+ optional bool all_branches = 4;
173+}
174+
175+// SetRepoMirrorResponse holds the result of SetRepoMirror.
176+message SetRepoMirrorResponse {
177+ // Target is the resolved mirror target.
178+ MirrorTarget target = 1;
179+}
180+
181+// RemoveRepoMirrorRequest selects the input of RemoveRepoMirror.
182+message RemoveRepoMirrorRequest {
183+ // Repo is the repository name.
184+ string repo = 1;
185+}
186+
187+// RemoveRepoMirrorResponse holds the result of RemoveRepoMirror.
188+message RemoveRepoMirrorResponse {}
189+
190+// SetRepoMirrorExcludedRequest selects the input of SetRepoMirrorExcluded.
191+message SetRepoMirrorExcludedRequest {
192+ // Repo is the repository name.
193+ string repo = 1;
194+ // Excluded opts out of the global template, unless a URL override exists.
195+ bool excluded = 2;
196+}
197+
198+// SetRepoMirrorExcludedResponse holds the result of SetRepoMirrorExcluded.
199+message SetRepoMirrorExcludedResponse {
200+ // Target is the resolved mirror target.
201+ MirrorTarget target = 1;
202+}
203+
204+// MirrorState is the current state of a push mirror.
205+enum MirrorState {
206+ // Unspecified.
207+ MIRROR_STATE_UNSPECIFIED = 0;
208+ // Disabled.
209+ MIRROR_STATE_DISABLED = 1;
210+ // Ok.
211+ MIRROR_STATE_OK = 2;
212+ // Failing.
213+ MIRROR_STATE_FAILING = 3;
214+ // Paused.
215+ MIRROR_STATE_PAUSED = 4;
216+}
217+
218+// MirrorStatus describes a repository mirror and its last attempts.
219+message MirrorStatus {
220+ // Target is the resolved mirror target.
221+ MirrorTarget target = 1;
222+ // State is the current mirror state.
223+ MirrorState state = 2;
224+ // FailureClass is the failure category, empty when there is no failure.
225+ string failure_class = 3;
226+ // Reason explains the current state.
227+ string reason = 4;
228+ // Detail is the last error detail, returned only to callers with repo:admin
229+ // on the repository.
230+ string detail = 5;
231+ // ConsecutiveFailures counts failed attempts since the last success or
232+ // reset.
233+ int32 consecutive_failures = 6;
234+ // LastAttemptAt is when the last sync was attempted.
235+ google.protobuf.Timestamp last_attempt_at = 7;
236+ // LastSuccessAt is when the last sync succeeded, including a no-op.
237+ google.protobuf.Timestamp last_success_at = 8;
238+ // NextRetryAt is the next retry time while failing; otherwise unset.
239+ google.protobuf.Timestamp next_retry_at = 9;
240+ // NextRunAt is the next scheduled sync time, or the retry time while
241+ // failing.
242+ google.protobuf.Timestamp next_run_at = 10;
243+ // PausedAt is when the mirror was paused; otherwise unset.
244+ google.protobuf.Timestamp paused_at = 11;
245+}
246+
247+// GetMirrorStatusRequest selects the input of GetMirrorStatus.
248+message GetMirrorStatusRequest {
249+ // Repo is the repository name.
250+ string repo = 1;
251+}
252+
253+// GetMirrorStatusResponse holds the result of GetMirrorStatus.
254+message GetMirrorStatusResponse {
255+ // Status is the current mirror status.
256+ MirrorStatus status = 1;
257+}
258+
259+// ListMirrorStatusRequest selects the input of ListMirrorStatus.
260+message ListMirrorStatusRequest {}
261+
262+// ListMirrorStatusResponse holds the result of ListMirrorStatus.
263+message ListMirrorStatusResponse {
264+ // Statuses are the mirror statuses.
265+ repeated MirrorStatus statuses = 1;
266+}
267+
268+// SyncMirrorRequest selects the input of SyncMirror.
269+message SyncMirrorRequest {
270+ // Repo is the repository name.
271+ string repo = 1;
272+ // All selects every repository and needs owner rights. Repo must be empty
273+ // when true.
274+ bool all = 2;
275+ // Force lifts a pause and skips the no-op check and the 60-second manual
276+ // throttle. It never forces a Git push.
277+ bool force = 3;
278+}
279+
280+// SyncMirrorResult is the result of a sync request for one repository.
281+message SyncMirrorResult {
282+ // Repo is the repository name.
283+ string repo = 1;
284+ // Queued says another sync is running and this request was queued.
285+ bool queued = 2;
286+ // NoOp says the refs already matched the last successful snapshot.
287+ bool no_op = 3;
288+ // Status is the current mirror status.
289+ MirrorStatus status = 4;
290+}
291+
292+// SyncMirrorResponse holds the result of SyncMirror.
293+message SyncMirrorResponse {
294+ // Results are the per-repository sync results.
295+ repeated SyncMirrorResult results = 1;
296+}
@@ -0,0 +1,296 @@
1+// SPDX-License-Identifier: MIT
2+
3+syntax = "proto3";
4+
5+package ermite;
6+
7+import "google/protobuf/timestamp.proto";
8+
9+// MirrorService configures the push mirrors of the server. Global settings
10+// and key
11+// rotation need the admin token or a token with every scope and no repository
12+// or
13+// branch limits; per-repository settings and SyncMirror need repo:admin on
14+// the
15+// repository; status needs read access. GetMirrorKey needs a non-anonymous
16+// caller.
17+// ListMirrorStatus and SyncMirror with All need owner rights. No new token
18+// scope
19+// is required. Servers implementing this service list "mirror" in
20+// GetVersionResponse.features.
21+service MirrorService {
22+ // GetMirrorKey returns the public mirror key, generating it on first use.
23+ // Needs a non-anonymous caller. Fails with failed_precondition without
24+ // ERMITE_SECRETS_KEY.
25+ rpc GetMirrorKey(GetMirrorKeyRequest) returns (GetMirrorKeyResponse);
26+ // RotateMirrorKey replaces the key immediately. Add the new key to remotes
27+ // and sync with force to recover from authentication failures.
28+ rpc RotateMirrorKey(RotateMirrorKeyRequest) returns (RotateMirrorKeyResponse);
29+ // GetMirrorConfig returns the global mirror policy.
30+ rpc GetMirrorConfig(GetMirrorConfigRequest) returns (GetMirrorConfigResponse);
31+ // SetMirrorConfig patches the global policy. Unset fields are unchanged.
32+ // Invalid fields give invalid_argument with field violations.
33+ rpc SetMirrorConfig(SetMirrorConfigRequest) returns (SetMirrorConfigResponse);
34+ // SetRepoMirror sets an override, even when global mirroring is disabled.
35+ rpc SetRepoMirror(SetRepoMirrorRequest) returns (SetRepoMirrorResponse);
36+ // RemoveRepoMirror removes the override so the global policy applies again.
37+ rpc RemoveRepoMirror(RemoveRepoMirrorRequest) returns (RemoveRepoMirrorResponse);
38+ // SetRepoMirrorExcluded excludes or includes a repository in the global
39+ // policy. An explicit URL override takes precedence.
40+ rpc SetRepoMirrorExcluded(SetRepoMirrorExcludedRequest) returns (SetRepoMirrorExcludedResponse);
41+ // GetMirrorStatus returns the resolved target and status of one repository.
42+ rpc GetMirrorStatus(GetMirrorStatusRequest) returns (GetMirrorStatusResponse);
43+ // ListMirrorStatus lists mirror statuses and needs owner rights.
44+ rpc ListMirrorStatus(ListMirrorStatusRequest) returns (ListMirrorStatusResponse);
45+ // SyncMirror syncs Repo or, with All, every repository. Paused mirrors need
46+ // Force. Manual requests without Force are at least 60 seconds apart.
47+ rpc SyncMirror(SyncMirrorRequest) returns (SyncMirrorResponse);
48+}
49+
50+// MirrorKey is the public SSH key used for push mirrors. Private key material
51+// is never returned.
52+message MirrorKey {
53+ // AuthorizedKey is the SSH authorized_keys line.
54+ string authorized_key = 1;
55+ // Fingerprint is the SHA256 fingerprint of the public key.
56+ string fingerprint = 2;
57+ // CreatedAt is when the key was created.
58+ google.protobuf.Timestamp created_at = 3;
59+}
60+
61+// GetMirrorKeyRequest selects the input of GetMirrorKey.
62+message GetMirrorKeyRequest {}
63+
64+// GetMirrorKeyResponse holds the result of GetMirrorKey.
65+message GetMirrorKeyResponse {
66+ // Key is the public mirror key.
67+ MirrorKey key = 1;
68+}
69+
70+// RotateMirrorKeyRequest selects the input of RotateMirrorKey.
71+message RotateMirrorKeyRequest {}
72+
73+// RotateMirrorKeyResponse holds the result of RotateMirrorKey.
74+message RotateMirrorKeyResponse {
75+ // Key is the public mirror key.
76+ MirrorKey key = 1;
77+ // PreviousFingerprint is the fingerprint of the replaced key.
78+ string previous_fingerprint = 2;
79+}
80+
81+// MirrorConfig is the server-wide push mirror policy.
82+message MirrorConfig {
83+ // Enabled says whether mirroring is enabled.
84+ bool enabled = 1;
85+ // URLTemplate is an SSH URL containing "{repo}", replaced with the
86+ // repository name.
87+ string url_template = 2;
88+ // Cron is a five-field cron expression in UTC, no more frequent than every
89+ // five minutes.
90+ string cron = 3;
91+ // AllBranches includes every branch rather than only the default branch.
92+ // Tags are always included.
93+ bool all_branches = 4;
94+ // UpdatedAt is when the configuration was last changed.
95+ google.protobuf.Timestamp updated_at = 5;
96+}
97+
98+// GetMirrorConfigRequest selects the input of GetMirrorConfig.
99+message GetMirrorConfigRequest {}
100+
101+// GetMirrorConfigResponse holds the result of GetMirrorConfig.
102+message GetMirrorConfigResponse {
103+ // Config is the global mirror policy.
104+ MirrorConfig config = 1;
105+}
106+
107+// SetMirrorConfigRequest selects the input of SetMirrorConfig.
108+message SetMirrorConfigRequest {
109+ // Enabled says whether mirroring is enabled. Unset means unchanged.
110+ optional bool enabled = 1;
111+ // URLTemplate is an SSH URL containing "{repo}", replaced with the
112+ // repository name. Unset means unchanged.
113+ optional string url_template = 2;
114+ // Cron is a five-field cron expression in UTC, no more frequent than every
115+ // five minutes. Unset means unchanged.
116+ optional string cron = 3;
117+ // AllBranches includes every branch rather than only the default branch.
118+ // Tags are always included. Unset means unchanged.
119+ optional bool all_branches = 4;
120+}
121+
122+// SetMirrorConfigResponse holds the result of SetMirrorConfig.
123+message SetMirrorConfigResponse {
124+ // Config is the global mirror policy.
125+ MirrorConfig config = 1;
126+}
127+
128+// MirrorSource says which configuration applies to a repository.
129+enum MirrorSource {
130+ // Unspecified.
131+ MIRROR_SOURCE_UNSPECIFIED = 0;
132+ // Disabled.
133+ MIRROR_SOURCE_DISABLED = 1;
134+ // Global.
135+ MIRROR_SOURCE_GLOBAL = 2;
136+ // Override.
137+ MIRROR_SOURCE_OVERRIDE = 3;
138+ // Excluded.
139+ MIRROR_SOURCE_EXCLUDED = 4;
140+}
141+
142+// MirrorTarget is the resolved push mirror target of a repository.
143+message MirrorTarget {
144+ // Repo is the repository name.
145+ string repo = 1;
146+ // Enabled says whether mirroring is enabled.
147+ bool enabled = 2;
148+ // URL is the SSH destination of the mirror.
149+ string url = 3;
150+ // Cron is a five-field cron expression in UTC, no more frequent than every
151+ // five minutes.
152+ string cron = 4;
153+ // AllBranches includes every branch rather than only the default branch.
154+ // Tags are always included.
155+ bool all_branches = 5;
156+ // Source is the configuration used to resolve the target.
157+ MirrorSource source = 6;
158+}
159+
160+// SetRepoMirrorRequest selects the input of SetRepoMirror.
161+message SetRepoMirrorRequest {
162+ // Repo is the repository name.
163+ string repo = 1;
164+ // URL is the SSH destination of the mirror.
165+ string url = 2;
166+ // Cron is a five-field cron expression in UTC, no more frequent than every
167+ // five minutes.
168+ // Empty means inherit the global cron.
169+ string cron = 3;
170+ // AllBranches includes every branch rather than only the default branch.
171+ // Tags are always included. Unset means inherit the global setting.
172+ optional bool all_branches = 4;
173+}
174+
175+// SetRepoMirrorResponse holds the result of SetRepoMirror.
176+message SetRepoMirrorResponse {
177+ // Target is the resolved mirror target.
178+ MirrorTarget target = 1;
179+}
180+
181+// RemoveRepoMirrorRequest selects the input of RemoveRepoMirror.
182+message RemoveRepoMirrorRequest {
183+ // Repo is the repository name.
184+ string repo = 1;
185+}
186+
187+// RemoveRepoMirrorResponse holds the result of RemoveRepoMirror.
188+message RemoveRepoMirrorResponse {}
189+
190+// SetRepoMirrorExcludedRequest selects the input of SetRepoMirrorExcluded.
191+message SetRepoMirrorExcludedRequest {
192+ // Repo is the repository name.
193+ string repo = 1;
194+ // Excluded opts out of the global template, unless a URL override exists.
195+ bool excluded = 2;
196+}
197+
198+// SetRepoMirrorExcludedResponse holds the result of SetRepoMirrorExcluded.
199+message SetRepoMirrorExcludedResponse {
200+ // Target is the resolved mirror target.
201+ MirrorTarget target = 1;
202+}
203+
204+// MirrorState is the current state of a push mirror.
205+enum MirrorState {
206+ // Unspecified.
207+ MIRROR_STATE_UNSPECIFIED = 0;
208+ // Disabled.
209+ MIRROR_STATE_DISABLED = 1;
210+ // Ok.
211+ MIRROR_STATE_OK = 2;
212+ // Failing.
213+ MIRROR_STATE_FAILING = 3;
214+ // Paused.
215+ MIRROR_STATE_PAUSED = 4;
216+}
217+
218+// MirrorStatus describes a repository mirror and its last attempts.
219+message MirrorStatus {
220+ // Target is the resolved mirror target.
221+ MirrorTarget target = 1;
222+ // State is the current mirror state.
223+ MirrorState state = 2;
224+ // FailureClass is the failure category, empty when there is no failure.
225+ string failure_class = 3;
226+ // Reason explains the current state.
227+ string reason = 4;
228+ // Detail is the last error detail, returned only to callers with repo:admin
229+ // on the repository.
230+ string detail = 5;
231+ // ConsecutiveFailures counts failed attempts since the last success or
232+ // reset.
233+ int32 consecutive_failures = 6;
234+ // LastAttemptAt is when the last sync was attempted.
235+ google.protobuf.Timestamp last_attempt_at = 7;
236+ // LastSuccessAt is when the last sync succeeded, including a no-op.
237+ google.protobuf.Timestamp last_success_at = 8;
238+ // NextRetryAt is the next retry time while failing; otherwise unset.
239+ google.protobuf.Timestamp next_retry_at = 9;
240+ // NextRunAt is the next scheduled sync time, or the retry time while
241+ // failing.
242+ google.protobuf.Timestamp next_run_at = 10;
243+ // PausedAt is when the mirror was paused; otherwise unset.
244+ google.protobuf.Timestamp paused_at = 11;
245+}
246+
247+// GetMirrorStatusRequest selects the input of GetMirrorStatus.
248+message GetMirrorStatusRequest {
249+ // Repo is the repository name.
250+ string repo = 1;
251+}
252+
253+// GetMirrorStatusResponse holds the result of GetMirrorStatus.
254+message GetMirrorStatusResponse {
255+ // Status is the current mirror status.
256+ MirrorStatus status = 1;
257+}
258+
259+// ListMirrorStatusRequest selects the input of ListMirrorStatus.
260+message ListMirrorStatusRequest {}
261+
262+// ListMirrorStatusResponse holds the result of ListMirrorStatus.
263+message ListMirrorStatusResponse {
264+ // Statuses are the mirror statuses.
265+ repeated MirrorStatus statuses = 1;
266+}
267+
268+// SyncMirrorRequest selects the input of SyncMirror.
269+message SyncMirrorRequest {
270+ // Repo is the repository name.
271+ string repo = 1;
272+ // All selects every repository and needs owner rights. Repo must be empty
273+ // when true.
274+ bool all = 2;
275+ // Force lifts a pause and skips the no-op check and the 60-second manual
276+ // throttle. It never forces a Git push.
277+ bool force = 3;
278+}
279+
280+// SyncMirrorResult is the result of a sync request for one repository.
281+message SyncMirrorResult {
282+ // Repo is the repository name.
283+ string repo = 1;
284+ // Queued says another sync is running and this request was queued.
285+ bool queued = 2;
286+ // NoOp says the refs already matched the last successful snapshot.
287+ bool no_op = 3;
288+ // Status is the current mirror status.
289+ MirrorStatus status = 4;
290+}
291+
292+// SyncMirrorResponse holds the result of SyncMirror.
293+message SyncMirrorResponse {
294+ // Results are the per-repository sync results.
295+ repeated SyncMirrorResult results = 1;
296+}

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