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