detached 5c335b8

feat(proto): CI-3 secrets, variables, environments, dispatch, permissions, cache (#10)

commit
5c335b8558242842327d24d060f3a58a1e636ef4
author
brice · · 2026-10-14 20:02 UTC
committer
bnema · · 2026-10-14 20:02 UTC
parent
49ac5fd
signature
SSH UnverifiedSHA256:VOCA5lYARHcbKDZ7GhTV45VmcjWnJ6ZQIBazj17LivA The key is unknown
refs
tag: v0.3.0
14 files · +3459 -269
M README.md +6 -3
@@ -2,7 +2,7 @@
22
33 The public API contract of [ermite](https://git.bnema.dev/bnema/ermite), a single-user Git forge: protobuf definitions for its ConnectRPC services and the Go code generated from them.
44
5-Status: early development. The contract defines nine services (below); the server that implements them is being built.
5+Status: early development. The contract defines twelve services (below); the server that implements them is being built.
66
77 ```go
88 import "bnema.dev/ermite-api/gen/ermite"
@@ -23,14 +23,17 @@ Handlers are mounted under `/-/api/` by the server. Errors are Connect codes.
2323 | `SessionService` | `CreateLoginLink`, `SignOutEverywhere` (owner only) |
2424 | `EventService` | `Watch` (streamed, resumable) |
2525 | `RunnerService` | `RegisterRunner`, `FetchJob` (long poll), `UpdateJob` (steps, annotations), `AppendLog` (offset-idempotent), `Heartbeat`, `WatchJob` (cancel requests, streamed), `CompleteJob` (idempotent), `ResolveActions` (where to download the `uses:` actions), `UploadSummary` (job summary of a step); for CI runners |
26-| `RunService` | `ListRuns`, `GetRun`, `GetJob`, `GetJobLog` (streamed, follow), `ListAnnotations`, `GetStepSummaries`, `CancelRun`, `RerunRun`, `ListChecks`, `ListRunners`, `RemoveRunner` |
26+| `RunService` | `ListRuns`, `GetRun`, `GetJob`, `GetJobLog` (streamed, follow), `ListAnnotations`, `GetStepSummaries`, `CancelRun`, `RerunRun`, `DispatchWorkflow`, `ListChecks`, `ListRunners`, `RemoveRunner` |
27+| `SecretService` | `SetSecret`, `ListSecrets` (names only, never values), `DeleteSecret`; scopes instance, repository and environment |
28+| `VariableService` | `SetVariable`, `GetVariable`, `ListVariables`, `DeleteVariable`; same scopes |
29+| `EnvironmentService` | `CreateEnvironment`, `ListEnvironments`, `DeleteEnvironment` |
2730 | `ServerService` | `GetVersion` (server version and feature list), `GetSigningKey` (commit signing key) |
2831
2932 Tokens carry scopes only; presets such as `cli` or `agent` are a client concern.
3033
3134 ## Layout
3235
33-- `proto/ermite/`: `.proto` files of the `ermite` package, one per service (`repo`, `git`, `merge_request`, `token`, `session`, `event`, `server`, `runner`, `run`) plus shared `types`. Checked by `buf lint` and `buf breaking`.
36+- `proto/ermite/`: `.proto` files of the `ermite` package, one per service (`repo`, `git`, `merge_request`, `token`, `session`, `event`, `server`, `runner`, `run`, `ci_settings`) plus shared `types`. Checked by `buf lint` and `buf breaking`.
3437 - `gen/ermite/`: generated Go messages. `gen/ermite/ermiteconnect/`: generated Connect clients and handlers. Committed, never edited by hand.
3538
3639 ## Generate
@@ -2,7 +2,7 @@
2 2
3 The public API contract of [ermite](https://git.bnema.dev/bnema/ermite), a single-user Git forge: protobuf definitions for its ConnectRPC services and the Go code generated from them.3 The public API contract of [ermite](https://git.bnema.dev/bnema/ermite), a single-user Git forge: protobuf definitions for its ConnectRPC services and the Go code generated from them.
4 4
5-Status: early development. The contract defines nine services (below); the server that implements them is being built.5+Status: early development. The contract defines twelve services (below); the server that implements them is being built.
6 6
7 ```go7 ```go
8 import "bnema.dev/ermite-api/gen/ermite"8 import "bnema.dev/ermite-api/gen/ermite"
@@ -23,14 +23,17 @@ Handlers are mounted under `/-/api/` by the server. Errors are Connect codes.
23 | `SessionService` | `CreateLoginLink`, `SignOutEverywhere` (owner only) |23 | `SessionService` | `CreateLoginLink`, `SignOutEverywhere` (owner only) |
24 | `EventService` | `Watch` (streamed, resumable) |24 | `EventService` | `Watch` (streamed, resumable) |
25 | `RunnerService` | `RegisterRunner`, `FetchJob` (long poll), `UpdateJob` (steps, annotations), `AppendLog` (offset-idempotent), `Heartbeat`, `WatchJob` (cancel requests, streamed), `CompleteJob` (idempotent), `ResolveActions` (where to download the `uses:` actions), `UploadSummary` (job summary of a step); for CI runners |25 | `RunnerService` | `RegisterRunner`, `FetchJob` (long poll), `UpdateJob` (steps, annotations), `AppendLog` (offset-idempotent), `Heartbeat`, `WatchJob` (cancel requests, streamed), `CompleteJob` (idempotent), `ResolveActions` (where to download the `uses:` actions), `UploadSummary` (job summary of a step); for CI runners |
26-| `RunService` | `ListRuns`, `GetRun`, `GetJob`, `GetJobLog` (streamed, follow), `ListAnnotations`, `GetStepSummaries`, `CancelRun`, `RerunRun`, `ListChecks`, `ListRunners`, `RemoveRunner` |26+| `RunService` | `ListRuns`, `GetRun`, `GetJob`, `GetJobLog` (streamed, follow), `ListAnnotations`, `GetStepSummaries`, `CancelRun`, `RerunRun`, `DispatchWorkflow`, `ListChecks`, `ListRunners`, `RemoveRunner` |
27+| `SecretService` | `SetSecret`, `ListSecrets` (names only, never values), `DeleteSecret`; scopes instance, repository and environment |
28+| `VariableService` | `SetVariable`, `GetVariable`, `ListVariables`, `DeleteVariable`; same scopes |
29+| `EnvironmentService` | `CreateEnvironment`, `ListEnvironments`, `DeleteEnvironment` |
27 | `ServerService` | `GetVersion` (server version and feature list), `GetSigningKey` (commit signing key) |30 | `ServerService` | `GetVersion` (server version and feature list), `GetSigningKey` (commit signing key) |
28 31
29 Tokens carry scopes only; presets such as `cli` or `agent` are a client concern.32 Tokens carry scopes only; presets such as `cli` or `agent` are a client concern.
30 33
31 ## Layout34 ## Layout
32 35
33-- `proto/ermite/`: `.proto` files of the `ermite` package, one per service (`repo`, `git`, `merge_request`, `token`, `session`, `event`, `server`, `runner`, `run`) plus shared `types`. Checked by `buf lint` and `buf breaking`.36+- `proto/ermite/`: `.proto` files of the `ermite` package, one per service (`repo`, `git`, `merge_request`, `token`, `session`, `event`, `server`, `runner`, `run`, `ci_settings`) plus shared `types`. Checked by `buf lint` and `buf breaking`.
34 - `gen/ermite/`: generated Go messages. `gen/ermite/ermiteconnect/`: generated Connect clients and handlers. Committed, never edited by hand.37 - `gen/ermite/`: generated Go messages. `gen/ermite/ermiteconnect/`: generated Connect clients and handlers. Committed, never edited by hand.
35 38
36 ## Generate39 ## Generate
A gen/ermite/ci_settings.pb.go +1660 -0
@@ -0,0 +1,1660 @@
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/ci_settings.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+// SettingsScope says where a secret or a variable lives, like the scopes of
28+// GitHub Actions. A job sees the ones of its instance, its repository and its
29+// environment, and the narrowest scope wins: environment over repository over
30+// instance.
31+type SettingsScope struct {
32+ state protoimpl.MessageState `protogen:"open.v1"`
33+ // Where is the scope. It is required: a request without it is
34+ // invalid_argument.
35+ //
36+ // Types that are valid to be assigned to Where:
37+ //
38+ // *SettingsScope_Instance
39+ // *SettingsScope_Repo
40+ // *SettingsScope_Environment
41+ Where isSettingsScope_Where `protobuf_oneof:"where"`
42+ unknownFields protoimpl.UnknownFields
43+ sizeCache protoimpl.SizeCache
44+}
45+
46+func (x *SettingsScope) Reset() {
47+ *x = SettingsScope{}
48+ mi := &file_ermite_ci_settings_proto_msgTypes[0]
49+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
50+ ms.StoreMessageInfo(mi)
51+}
52+
53+func (x *SettingsScope) String() string {
54+ return protoimpl.X.MessageStringOf(x)
55+}
56+
57+func (*SettingsScope) ProtoMessage() {}
58+
59+func (x *SettingsScope) ProtoReflect() protoreflect.Message {
60+ mi := &file_ermite_ci_settings_proto_msgTypes[0]
61+ if x != nil {
62+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
63+ if ms.LoadMessageInfo() == nil {
64+ ms.StoreMessageInfo(mi)
65+ }
66+ return ms
67+ }
68+ return mi.MessageOf(x)
69+}
70+
71+// Deprecated: Use SettingsScope.ProtoReflect.Descriptor instead.
72+func (*SettingsScope) Descriptor() ([]byte, []int) {
73+ return file_ermite_ci_settings_proto_rawDescGZIP(), []int{0}
74+}
75+
76+func (x *SettingsScope) GetWhere() isSettingsScope_Where {
77+ if x != nil {
78+ return x.Where
79+ }
80+ return nil
81+}
82+
83+func (x *SettingsScope) GetInstance() bool {
84+ if x != nil {
85+ if x, ok := x.Where.(*SettingsScope_Instance); ok {
86+ return x.Instance
87+ }
88+ }
89+ return false
90+}
91+
92+func (x *SettingsScope) GetRepo() string {
93+ if x != nil {
94+ if x, ok := x.Where.(*SettingsScope_Repo); ok {
95+ return x.Repo
96+ }
97+ }
98+ return ""
99+}
100+
101+func (x *SettingsScope) GetEnvironment() *EnvironmentRef {
102+ if x != nil {
103+ if x, ok := x.Where.(*SettingsScope_Environment); ok {
104+ return x.Environment
105+ }
106+ }
107+ return nil
108+}
109+
110+type isSettingsScope_Where interface {
111+ isSettingsScope_Where()
112+}
113+
114+type SettingsScope_Instance struct {
115+ // Instance is the whole server. It must be true when set. It needs a token
116+ // that is not restricted to repositories, or the root token.
117+ Instance bool `protobuf:"varint,1,opt,name=instance,proto3,oneof"`
118+}
119+
120+type SettingsScope_Repo struct {
121+ // Repo is the name of a repository.
122+ Repo string `protobuf:"bytes,2,opt,name=repo,proto3,oneof"`
123+}
124+
125+type SettingsScope_Environment struct {
126+ // Environment is an environment of a repository.
127+ Environment *EnvironmentRef `protobuf:"bytes,3,opt,name=environment,proto3,oneof"`
128+}
129+
130+func (*SettingsScope_Instance) isSettingsScope_Where() {}
131+
132+func (*SettingsScope_Repo) isSettingsScope_Where() {}
133+
134+func (*SettingsScope_Environment) isSettingsScope_Where() {}
135+
136+// EnvironmentRef names an environment of a repository.
137+type EnvironmentRef struct {
138+ state protoimpl.MessageState `protogen:"open.v1"`
139+ // Repo is the repository name.
140+ Repo string `protobuf:"bytes,1,opt,name=repo,proto3" json:"repo,omitempty"`
141+ // Name is the environment name, see Environment.name.
142+ Name string `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty"`
143+ unknownFields protoimpl.UnknownFields
144+ sizeCache protoimpl.SizeCache
145+}
146+
147+func (x *EnvironmentRef) Reset() {
148+ *x = EnvironmentRef{}
149+ mi := &file_ermite_ci_settings_proto_msgTypes[1]
150+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
151+ ms.StoreMessageInfo(mi)
152+}
153+
154+func (x *EnvironmentRef) String() string {
155+ return protoimpl.X.MessageStringOf(x)
156+}
157+
158+func (*EnvironmentRef) ProtoMessage() {}
159+
160+func (x *EnvironmentRef) ProtoReflect() protoreflect.Message {
161+ mi := &file_ermite_ci_settings_proto_msgTypes[1]
162+ if x != nil {
163+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
164+ if ms.LoadMessageInfo() == nil {
165+ ms.StoreMessageInfo(mi)
166+ }
167+ return ms
168+ }
169+ return mi.MessageOf(x)
170+}
171+
172+// Deprecated: Use EnvironmentRef.ProtoReflect.Descriptor instead.
173+func (*EnvironmentRef) Descriptor() ([]byte, []int) {
174+ return file_ermite_ci_settings_proto_rawDescGZIP(), []int{1}
175+}
176+
177+func (x *EnvironmentRef) GetRepo() string {
178+ if x != nil {
179+ return x.Repo
180+ }
181+ return ""
182+}
183+
184+func (x *EnvironmentRef) GetName() string {
185+ if x != nil {
186+ return x.Name
187+ }
188+ return ""
189+}
190+
191+// Secret describes a stored secret. It never contains the value: a value can
192+// be set but not read back.
193+type Secret struct {
194+ state protoimpl.MessageState `protogen:"open.v1"`
195+ // Name is the name of the secret, in upper case as the server stores it.
196+ Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
197+ // UpdatedAt is when the value was last set.
198+ UpdatedAt *timestamppb.Timestamp `protobuf:"bytes,2,opt,name=updated_at,json=updatedAt,proto3" json:"updated_at,omitempty"`
199+ unknownFields protoimpl.UnknownFields
200+ sizeCache protoimpl.SizeCache
201+}
202+
203+func (x *Secret) Reset() {
204+ *x = Secret{}
205+ mi := &file_ermite_ci_settings_proto_msgTypes[2]
206+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
207+ ms.StoreMessageInfo(mi)
208+}
209+
210+func (x *Secret) String() string {
211+ return protoimpl.X.MessageStringOf(x)
212+}
213+
214+func (*Secret) ProtoMessage() {}
215+
216+func (x *Secret) ProtoReflect() protoreflect.Message {
217+ mi := &file_ermite_ci_settings_proto_msgTypes[2]
218+ if x != nil {
219+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
220+ if ms.LoadMessageInfo() == nil {
221+ ms.StoreMessageInfo(mi)
222+ }
223+ return ms
224+ }
225+ return mi.MessageOf(x)
226+}
227+
228+// Deprecated: Use Secret.ProtoReflect.Descriptor instead.
229+func (*Secret) Descriptor() ([]byte, []int) {
230+ return file_ermite_ci_settings_proto_rawDescGZIP(), []int{2}
231+}
232+
233+func (x *Secret) GetName() string {
234+ if x != nil {
235+ return x.Name
236+ }
237+ return ""
238+}
239+
240+func (x *Secret) GetUpdatedAt() *timestamppb.Timestamp {
241+ if x != nil {
242+ return x.UpdatedAt
243+ }
244+ return nil
245+}
246+
247+// Variable is a configuration variable. Unlike a secret its value can be read
248+// back and it may appear in logs.
249+type Variable struct {
250+ state protoimpl.MessageState `protogen:"open.v1"`
251+ // Name is the name of the variable, in upper case as the server stores it.
252+ Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
253+ // Value is the value, at most 48 KiB.
254+ Value string `protobuf:"bytes,2,opt,name=value,proto3" json:"value,omitempty"`
255+ // UpdatedAt is when the value was last set.
256+ UpdatedAt *timestamppb.Timestamp `protobuf:"bytes,3,opt,name=updated_at,json=updatedAt,proto3" json:"updated_at,omitempty"`
257+ unknownFields protoimpl.UnknownFields
258+ sizeCache protoimpl.SizeCache
259+}
260+
261+func (x *Variable) Reset() {
262+ *x = Variable{}
263+ mi := &file_ermite_ci_settings_proto_msgTypes[3]
264+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
265+ ms.StoreMessageInfo(mi)
266+}
267+
268+func (x *Variable) String() string {
269+ return protoimpl.X.MessageStringOf(x)
270+}
271+
272+func (*Variable) ProtoMessage() {}
273+
274+func (x *Variable) ProtoReflect() protoreflect.Message {
275+ mi := &file_ermite_ci_settings_proto_msgTypes[3]
276+ if x != nil {
277+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
278+ if ms.LoadMessageInfo() == nil {
279+ ms.StoreMessageInfo(mi)
280+ }
281+ return ms
282+ }
283+ return mi.MessageOf(x)
284+}
285+
286+// Deprecated: Use Variable.ProtoReflect.Descriptor instead.
287+func (*Variable) Descriptor() ([]byte, []int) {
288+ return file_ermite_ci_settings_proto_rawDescGZIP(), []int{3}
289+}
290+
291+func (x *Variable) GetName() string {
292+ if x != nil {
293+ return x.Name
294+ }
295+ return ""
296+}
297+
298+func (x *Variable) GetValue() string {
299+ if x != nil {
300+ return x.Value
301+ }
302+ return ""
303+}
304+
305+func (x *Variable) GetUpdatedAt() *timestamppb.Timestamp {
306+ if x != nil {
307+ return x.UpdatedAt
308+ }
309+ return nil
310+}
311+
312+// Environment is a named deployment target of a repository, to which secrets
313+// and variables can be attached. A workflow job that names an environment
314+// creates it on first use, as on GitHub.
315+type Environment struct {
316+ state protoimpl.MessageState `protogen:"open.v1"`
317+ // Repo is the repository name.
318+ Repo string `protobuf:"bytes,1,opt,name=repo,proto3" json:"repo,omitempty"`
319+ // Name is the name of the environment, 1 to 255 characters without control
320+ // characters, unique in the repository without regard to case. The server
321+ // keeps the case it was given.
322+ Name string `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty"`
323+ // CreatedAt is when the environment was created.
324+ CreatedAt *timestamppb.Timestamp `protobuf:"bytes,3,opt,name=created_at,json=createdAt,proto3" json:"created_at,omitempty"`
325+ unknownFields protoimpl.UnknownFields
326+ sizeCache protoimpl.SizeCache
327+}
328+
329+func (x *Environment) Reset() {
330+ *x = Environment{}
331+ mi := &file_ermite_ci_settings_proto_msgTypes[4]
332+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
333+ ms.StoreMessageInfo(mi)
334+}
335+
336+func (x *Environment) String() string {
337+ return protoimpl.X.MessageStringOf(x)
338+}
339+
340+func (*Environment) ProtoMessage() {}
341+
342+func (x *Environment) ProtoReflect() protoreflect.Message {
343+ mi := &file_ermite_ci_settings_proto_msgTypes[4]
344+ if x != nil {
345+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
346+ if ms.LoadMessageInfo() == nil {
347+ ms.StoreMessageInfo(mi)
348+ }
349+ return ms
350+ }
351+ return mi.MessageOf(x)
352+}
353+
354+// Deprecated: Use Environment.ProtoReflect.Descriptor instead.
355+func (*Environment) Descriptor() ([]byte, []int) {
356+ return file_ermite_ci_settings_proto_rawDescGZIP(), []int{4}
357+}
358+
359+func (x *Environment) GetRepo() string {
360+ if x != nil {
361+ return x.Repo
362+ }
363+ return ""
364+}
365+
366+func (x *Environment) GetName() string {
367+ if x != nil {
368+ return x.Name
369+ }
370+ return ""
371+}
372+
373+func (x *Environment) GetCreatedAt() *timestamppb.Timestamp {
374+ if x != nil {
375+ return x.CreatedAt
376+ }
377+ return nil
378+}
379+
380+// SetSecretRequest names a secret and gives its value.
381+type SetSecretRequest struct {
382+ state protoimpl.MessageState `protogen:"open.v1"`
383+ // Scope is where the secret lives.
384+ Scope *SettingsScope `protobuf:"bytes,1,opt,name=scope,proto3" json:"scope,omitempty"`
385+ // Name is the name of the secret.
386+ Name string `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty"`
387+ // Value is the value in plain text, 1 byte to 48 KiB. It may contain
388+ // several lines.
389+ Value string `protobuf:"bytes,3,opt,name=value,proto3" json:"value,omitempty"`
390+ unknownFields protoimpl.UnknownFields
391+ sizeCache protoimpl.SizeCache
392+}
393+
394+func (x *SetSecretRequest) Reset() {
395+ *x = SetSecretRequest{}
396+ mi := &file_ermite_ci_settings_proto_msgTypes[5]
397+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
398+ ms.StoreMessageInfo(mi)
399+}
400+
401+func (x *SetSecretRequest) String() string {
402+ return protoimpl.X.MessageStringOf(x)
403+}
404+
405+func (*SetSecretRequest) ProtoMessage() {}
406+
407+func (x *SetSecretRequest) ProtoReflect() protoreflect.Message {
408+ mi := &file_ermite_ci_settings_proto_msgTypes[5]
409+ if x != nil {
410+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
411+ if ms.LoadMessageInfo() == nil {
412+ ms.StoreMessageInfo(mi)
413+ }
414+ return ms
415+ }
416+ return mi.MessageOf(x)
417+}
418+
419+// Deprecated: Use SetSecretRequest.ProtoReflect.Descriptor instead.
420+func (*SetSecretRequest) Descriptor() ([]byte, []int) {
421+ return file_ermite_ci_settings_proto_rawDescGZIP(), []int{5}
422+}
423+
424+func (x *SetSecretRequest) GetScope() *SettingsScope {
425+ if x != nil {
426+ return x.Scope
427+ }
428+ return nil
429+}
430+
431+func (x *SetSecretRequest) GetName() string {
432+ if x != nil {
433+ return x.Name
434+ }
435+ return ""
436+}
437+
438+func (x *SetSecretRequest) GetValue() string {
439+ if x != nil {
440+ return x.Value
441+ }
442+ return ""
443+}
444+
445+// SetSecretResponse describes the stored secret.
446+type SetSecretResponse struct {
447+ state protoimpl.MessageState `protogen:"open.v1"`
448+ // Secret is the secret, without its value.
449+ Secret *Secret `protobuf:"bytes,1,opt,name=secret,proto3" json:"secret,omitempty"`
450+ unknownFields protoimpl.UnknownFields
451+ sizeCache protoimpl.SizeCache
452+}
453+
454+func (x *SetSecretResponse) Reset() {
455+ *x = SetSecretResponse{}
456+ mi := &file_ermite_ci_settings_proto_msgTypes[6]
457+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
458+ ms.StoreMessageInfo(mi)
459+}
460+
461+func (x *SetSecretResponse) String() string {
462+ return protoimpl.X.MessageStringOf(x)
463+}
464+
465+func (*SetSecretResponse) ProtoMessage() {}
466+
467+func (x *SetSecretResponse) ProtoReflect() protoreflect.Message {
468+ mi := &file_ermite_ci_settings_proto_msgTypes[6]
469+ if x != nil {
470+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
471+ if ms.LoadMessageInfo() == nil {
472+ ms.StoreMessageInfo(mi)
473+ }
474+ return ms
475+ }
476+ return mi.MessageOf(x)
477+}
478+
479+// Deprecated: Use SetSecretResponse.ProtoReflect.Descriptor instead.
480+func (*SetSecretResponse) Descriptor() ([]byte, []int) {
481+ return file_ermite_ci_settings_proto_rawDescGZIP(), []int{6}
482+}
483+
484+func (x *SetSecretResponse) GetSecret() *Secret {
485+ if x != nil {
486+ return x.Secret
487+ }
488+ return nil
489+}
490+
491+// ListSecretsRequest selects a page of the secrets of a scope.
492+type ListSecretsRequest struct {
493+ state protoimpl.MessageState `protogen:"open.v1"`
494+ // Scope is the scope to list.
495+ Scope *SettingsScope `protobuf:"bytes,1,opt,name=scope,proto3" json:"scope,omitempty"`
496+ // PageSize is the maximum number of secrets to return. 0 means the server
497+ // default; values above the server maximum are lowered to it.
498+ PageSize int32 `protobuf:"varint,2,opt,name=page_size,json=pageSize,proto3" json:"page_size,omitempty"`
499+ // PageToken is the next_page_token of a previous response. Empty for the
500+ // first page.
501+ PageToken string `protobuf:"bytes,3,opt,name=page_token,json=pageToken,proto3" json:"page_token,omitempty"`
502+ unknownFields protoimpl.UnknownFields
503+ sizeCache protoimpl.SizeCache
504+}
505+
506+func (x *ListSecretsRequest) Reset() {
507+ *x = ListSecretsRequest{}
508+ mi := &file_ermite_ci_settings_proto_msgTypes[7]
509+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
510+ ms.StoreMessageInfo(mi)
511+}
512+
513+func (x *ListSecretsRequest) String() string {
514+ return protoimpl.X.MessageStringOf(x)
515+}
516+
517+func (*ListSecretsRequest) ProtoMessage() {}
518+
519+func (x *ListSecretsRequest) ProtoReflect() protoreflect.Message {
520+ mi := &file_ermite_ci_settings_proto_msgTypes[7]
521+ if x != nil {
522+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
523+ if ms.LoadMessageInfo() == nil {
524+ ms.StoreMessageInfo(mi)
525+ }
526+ return ms
527+ }
528+ return mi.MessageOf(x)
529+}
530+
531+// Deprecated: Use ListSecretsRequest.ProtoReflect.Descriptor instead.
532+func (*ListSecretsRequest) Descriptor() ([]byte, []int) {
533+ return file_ermite_ci_settings_proto_rawDescGZIP(), []int{7}
534+}
535+
536+func (x *ListSecretsRequest) GetScope() *SettingsScope {
537+ if x != nil {
538+ return x.Scope
539+ }
540+ return nil
541+}
542+
543+func (x *ListSecretsRequest) GetPageSize() int32 {
544+ if x != nil {
545+ return x.PageSize
546+ }
547+ return 0
548+}
549+
550+func (x *ListSecretsRequest) GetPageToken() string {
551+ if x != nil {
552+ return x.PageToken
553+ }
554+ return ""
555+}
556+
557+// ListSecretsResponse is one page of secrets.
558+type ListSecretsResponse struct {
559+ state protoimpl.MessageState `protogen:"open.v1"`
560+ // Secrets are the secrets of this page, ordered by name, without values.
561+ Secrets []*Secret `protobuf:"bytes,1,rep,name=secrets,proto3" json:"secrets,omitempty"`
562+ // NextPageToken is passed as page_token to get the next page. Empty when
563+ // there is no next page.
564+ NextPageToken string `protobuf:"bytes,2,opt,name=next_page_token,json=nextPageToken,proto3" json:"next_page_token,omitempty"`
565+ unknownFields protoimpl.UnknownFields
566+ sizeCache protoimpl.SizeCache
567+}
568+
569+func (x *ListSecretsResponse) Reset() {
570+ *x = ListSecretsResponse{}
571+ mi := &file_ermite_ci_settings_proto_msgTypes[8]
572+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
573+ ms.StoreMessageInfo(mi)
574+}
575+
576+func (x *ListSecretsResponse) String() string {
577+ return protoimpl.X.MessageStringOf(x)
578+}
579+
580+func (*ListSecretsResponse) ProtoMessage() {}
581+
582+func (x *ListSecretsResponse) ProtoReflect() protoreflect.Message {
583+ mi := &file_ermite_ci_settings_proto_msgTypes[8]
584+ if x != nil {
585+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
586+ if ms.LoadMessageInfo() == nil {
587+ ms.StoreMessageInfo(mi)
588+ }
589+ return ms
590+ }
591+ return mi.MessageOf(x)
592+}
593+
594+// Deprecated: Use ListSecretsResponse.ProtoReflect.Descriptor instead.
595+func (*ListSecretsResponse) Descriptor() ([]byte, []int) {
596+ return file_ermite_ci_settings_proto_rawDescGZIP(), []int{8}
597+}
598+
599+func (x *ListSecretsResponse) GetSecrets() []*Secret {
600+ if x != nil {
601+ return x.Secrets
602+ }
603+ return nil
604+}
605+
606+func (x *ListSecretsResponse) GetNextPageToken() string {
607+ if x != nil {
608+ return x.NextPageToken
609+ }
610+ return ""
611+}
612+
613+// DeleteSecretRequest names the secret to delete.
614+type DeleteSecretRequest struct {
615+ state protoimpl.MessageState `protogen:"open.v1"`
616+ // Scope is where the secret lives.
617+ Scope *SettingsScope `protobuf:"bytes,1,opt,name=scope,proto3" json:"scope,omitempty"`
618+ // Name is the name of the secret, without regard to case.
619+ Name string `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty"`
620+ unknownFields protoimpl.UnknownFields
621+ sizeCache protoimpl.SizeCache
622+}
623+
624+func (x *DeleteSecretRequest) Reset() {
625+ *x = DeleteSecretRequest{}
626+ mi := &file_ermite_ci_settings_proto_msgTypes[9]
627+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
628+ ms.StoreMessageInfo(mi)
629+}
630+
631+func (x *DeleteSecretRequest) String() string {
632+ return protoimpl.X.MessageStringOf(x)
633+}
634+
635+func (*DeleteSecretRequest) ProtoMessage() {}
636+
637+func (x *DeleteSecretRequest) ProtoReflect() protoreflect.Message {
638+ mi := &file_ermite_ci_settings_proto_msgTypes[9]
639+ if x != nil {
640+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
641+ if ms.LoadMessageInfo() == nil {
642+ ms.StoreMessageInfo(mi)
643+ }
644+ return ms
645+ }
646+ return mi.MessageOf(x)
647+}
648+
649+// Deprecated: Use DeleteSecretRequest.ProtoReflect.Descriptor instead.
650+func (*DeleteSecretRequest) Descriptor() ([]byte, []int) {
651+ return file_ermite_ci_settings_proto_rawDescGZIP(), []int{9}
652+}
653+
654+func (x *DeleteSecretRequest) GetScope() *SettingsScope {
655+ if x != nil {
656+ return x.Scope
657+ }
658+ return nil
659+}
660+
661+func (x *DeleteSecretRequest) GetName() string {
662+ if x != nil {
663+ return x.Name
664+ }
665+ return ""
666+}
667+
668+// DeleteSecretResponse is empty.
669+type DeleteSecretResponse struct {
670+ state protoimpl.MessageState `protogen:"open.v1"`
671+ unknownFields protoimpl.UnknownFields
672+ sizeCache protoimpl.SizeCache
673+}
674+
675+func (x *DeleteSecretResponse) Reset() {
676+ *x = DeleteSecretResponse{}
677+ mi := &file_ermite_ci_settings_proto_msgTypes[10]
678+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
679+ ms.StoreMessageInfo(mi)
680+}
681+
682+func (x *DeleteSecretResponse) String() string {
683+ return protoimpl.X.MessageStringOf(x)
684+}
685+
686+func (*DeleteSecretResponse) ProtoMessage() {}
687+
688+func (x *DeleteSecretResponse) ProtoReflect() protoreflect.Message {
689+ mi := &file_ermite_ci_settings_proto_msgTypes[10]
690+ if x != nil {
691+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
692+ if ms.LoadMessageInfo() == nil {
693+ ms.StoreMessageInfo(mi)
694+ }
695+ return ms
696+ }
697+ return mi.MessageOf(x)
698+}
699+
700+// Deprecated: Use DeleteSecretResponse.ProtoReflect.Descriptor instead.
701+func (*DeleteSecretResponse) Descriptor() ([]byte, []int) {
702+ return file_ermite_ci_settings_proto_rawDescGZIP(), []int{10}
703+}
704+
705+// SetVariableRequest names a variable and gives its value.
706+type SetVariableRequest struct {
707+ state protoimpl.MessageState `protogen:"open.v1"`
708+ // Scope is where the variable lives.
709+ Scope *SettingsScope `protobuf:"bytes,1,opt,name=scope,proto3" json:"scope,omitempty"`
710+ // Name is the name of the variable.
711+ Name string `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty"`
712+ // Value is the value, at most 48 KiB.
713+ Value string `protobuf:"bytes,3,opt,name=value,proto3" json:"value,omitempty"`
714+ unknownFields protoimpl.UnknownFields
715+ sizeCache protoimpl.SizeCache
716+}
717+
718+func (x *SetVariableRequest) Reset() {
719+ *x = SetVariableRequest{}
720+ mi := &file_ermite_ci_settings_proto_msgTypes[11]
721+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
722+ ms.StoreMessageInfo(mi)
723+}
724+
725+func (x *SetVariableRequest) String() string {
726+ return protoimpl.X.MessageStringOf(x)
727+}
728+
729+func (*SetVariableRequest) ProtoMessage() {}
730+
731+func (x *SetVariableRequest) ProtoReflect() protoreflect.Message {
732+ mi := &file_ermite_ci_settings_proto_msgTypes[11]
733+ if x != nil {
734+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
735+ if ms.LoadMessageInfo() == nil {
736+ ms.StoreMessageInfo(mi)
737+ }
738+ return ms
739+ }
740+ return mi.MessageOf(x)
741+}
742+
743+// Deprecated: Use SetVariableRequest.ProtoReflect.Descriptor instead.
744+func (*SetVariableRequest) Descriptor() ([]byte, []int) {
745+ return file_ermite_ci_settings_proto_rawDescGZIP(), []int{11}
746+}
747+
748+func (x *SetVariableRequest) GetScope() *SettingsScope {
749+ if x != nil {
750+ return x.Scope
751+ }
752+ return nil
753+}
754+
755+func (x *SetVariableRequest) GetName() string {
756+ if x != nil {
757+ return x.Name
758+ }
759+ return ""
760+}
761+
762+func (x *SetVariableRequest) GetValue() string {
763+ if x != nil {
764+ return x.Value
765+ }
766+ return ""
767+}
768+
769+// SetVariableResponse holds the stored variable.
770+type SetVariableResponse struct {
771+ state protoimpl.MessageState `protogen:"open.v1"`
772+ // Variable is the variable as stored.
773+ Variable *Variable `protobuf:"bytes,1,opt,name=variable,proto3" json:"variable,omitempty"`
774+ unknownFields protoimpl.UnknownFields
775+ sizeCache protoimpl.SizeCache
776+}
777+
778+func (x *SetVariableResponse) Reset() {
779+ *x = SetVariableResponse{}
780+ mi := &file_ermite_ci_settings_proto_msgTypes[12]
781+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
782+ ms.StoreMessageInfo(mi)
783+}
784+
785+func (x *SetVariableResponse) String() string {
786+ return protoimpl.X.MessageStringOf(x)
787+}
788+
789+func (*SetVariableResponse) ProtoMessage() {}
790+
791+func (x *SetVariableResponse) ProtoReflect() protoreflect.Message {
792+ mi := &file_ermite_ci_settings_proto_msgTypes[12]
793+ if x != nil {
794+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
795+ if ms.LoadMessageInfo() == nil {
796+ ms.StoreMessageInfo(mi)
797+ }
798+ return ms
799+ }
800+ return mi.MessageOf(x)
801+}
802+
803+// Deprecated: Use SetVariableResponse.ProtoReflect.Descriptor instead.
804+func (*SetVariableResponse) Descriptor() ([]byte, []int) {
805+ return file_ermite_ci_settings_proto_rawDescGZIP(), []int{12}
806+}
807+
808+func (x *SetVariableResponse) GetVariable() *Variable {
809+ if x != nil {
810+ return x.Variable
811+ }
812+ return nil
813+}
814+
815+// GetVariableRequest names a variable.
816+type GetVariableRequest struct {
817+ state protoimpl.MessageState `protogen:"open.v1"`
818+ // Scope is where the variable lives.
819+ Scope *SettingsScope `protobuf:"bytes,1,opt,name=scope,proto3" json:"scope,omitempty"`
820+ // Name is the name of the variable, without regard to case.
821+ Name string `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty"`
822+ unknownFields protoimpl.UnknownFields
823+ sizeCache protoimpl.SizeCache
824+}
825+
826+func (x *GetVariableRequest) Reset() {
827+ *x = GetVariableRequest{}
828+ mi := &file_ermite_ci_settings_proto_msgTypes[13]
829+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
830+ ms.StoreMessageInfo(mi)
831+}
832+
833+func (x *GetVariableRequest) String() string {
834+ return protoimpl.X.MessageStringOf(x)
835+}
836+
837+func (*GetVariableRequest) ProtoMessage() {}
838+
839+func (x *GetVariableRequest) ProtoReflect() protoreflect.Message {
840+ mi := &file_ermite_ci_settings_proto_msgTypes[13]
841+ if x != nil {
842+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
843+ if ms.LoadMessageInfo() == nil {
844+ ms.StoreMessageInfo(mi)
845+ }
846+ return ms
847+ }
848+ return mi.MessageOf(x)
849+}
850+
851+// Deprecated: Use GetVariableRequest.ProtoReflect.Descriptor instead.
852+func (*GetVariableRequest) Descriptor() ([]byte, []int) {
853+ return file_ermite_ci_settings_proto_rawDescGZIP(), []int{13}
854+}
855+
856+func (x *GetVariableRequest) GetScope() *SettingsScope {
857+ if x != nil {
858+ return x.Scope
859+ }
860+ return nil
861+}
862+
863+func (x *GetVariableRequest) GetName() string {
864+ if x != nil {
865+ return x.Name
866+ }
867+ return ""
868+}
869+
870+// GetVariableResponse holds a variable.
871+type GetVariableResponse struct {
872+ state protoimpl.MessageState `protogen:"open.v1"`
873+ // Variable is the variable.
874+ Variable *Variable `protobuf:"bytes,1,opt,name=variable,proto3" json:"variable,omitempty"`
875+ unknownFields protoimpl.UnknownFields
876+ sizeCache protoimpl.SizeCache
877+}
878+
879+func (x *GetVariableResponse) Reset() {
880+ *x = GetVariableResponse{}
881+ mi := &file_ermite_ci_settings_proto_msgTypes[14]
882+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
883+ ms.StoreMessageInfo(mi)
884+}
885+
886+func (x *GetVariableResponse) String() string {
887+ return protoimpl.X.MessageStringOf(x)
888+}
889+
890+func (*GetVariableResponse) ProtoMessage() {}
891+
892+func (x *GetVariableResponse) ProtoReflect() protoreflect.Message {
893+ mi := &file_ermite_ci_settings_proto_msgTypes[14]
894+ if x != nil {
895+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
896+ if ms.LoadMessageInfo() == nil {
897+ ms.StoreMessageInfo(mi)
898+ }
899+ return ms
900+ }
901+ return mi.MessageOf(x)
902+}
903+
904+// Deprecated: Use GetVariableResponse.ProtoReflect.Descriptor instead.
905+func (*GetVariableResponse) Descriptor() ([]byte, []int) {
906+ return file_ermite_ci_settings_proto_rawDescGZIP(), []int{14}
907+}
908+
909+func (x *GetVariableResponse) GetVariable() *Variable {
910+ if x != nil {
911+ return x.Variable
912+ }
913+ return nil
914+}
915+
916+// ListVariablesRequest selects a page of the variables of a scope.
917+type ListVariablesRequest struct {
918+ state protoimpl.MessageState `protogen:"open.v1"`
919+ // Scope is the scope to list.
920+ Scope *SettingsScope `protobuf:"bytes,1,opt,name=scope,proto3" json:"scope,omitempty"`
921+ // PageSize is the maximum number of variables to return. 0 means the server
922+ // default; values above the server maximum are lowered to it.
923+ PageSize int32 `protobuf:"varint,2,opt,name=page_size,json=pageSize,proto3" json:"page_size,omitempty"`
924+ // PageToken is the next_page_token of a previous response. Empty for the
925+ // first page.
926+ PageToken string `protobuf:"bytes,3,opt,name=page_token,json=pageToken,proto3" json:"page_token,omitempty"`
927+ unknownFields protoimpl.UnknownFields
928+ sizeCache protoimpl.SizeCache
929+}
930+
931+func (x *ListVariablesRequest) Reset() {
932+ *x = ListVariablesRequest{}
933+ mi := &file_ermite_ci_settings_proto_msgTypes[15]
934+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
935+ ms.StoreMessageInfo(mi)
936+}
937+
938+func (x *ListVariablesRequest) String() string {
939+ return protoimpl.X.MessageStringOf(x)
940+}
941+
942+func (*ListVariablesRequest) ProtoMessage() {}
943+
944+func (x *ListVariablesRequest) ProtoReflect() protoreflect.Message {
945+ mi := &file_ermite_ci_settings_proto_msgTypes[15]
946+ if x != nil {
947+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
948+ if ms.LoadMessageInfo() == nil {
949+ ms.StoreMessageInfo(mi)
950+ }
951+ return ms
952+ }
953+ return mi.MessageOf(x)
954+}
955+
956+// Deprecated: Use ListVariablesRequest.ProtoReflect.Descriptor instead.
957+func (*ListVariablesRequest) Descriptor() ([]byte, []int) {
958+ return file_ermite_ci_settings_proto_rawDescGZIP(), []int{15}
959+}
960+
961+func (x *ListVariablesRequest) GetScope() *SettingsScope {
962+ if x != nil {
963+ return x.Scope
964+ }
965+ return nil
966+}
967+
968+func (x *ListVariablesRequest) GetPageSize() int32 {
969+ if x != nil {
970+ return x.PageSize
971+ }
972+ return 0
973+}
974+
975+func (x *ListVariablesRequest) GetPageToken() string {
976+ if x != nil {
977+ return x.PageToken
978+ }
979+ return ""
980+}
981+
982+// ListVariablesResponse is one page of variables.
983+type ListVariablesResponse struct {
984+ state protoimpl.MessageState `protogen:"open.v1"`
985+ // Variables are the variables of this page, ordered by name.
986+ Variables []*Variable `protobuf:"bytes,1,rep,name=variables,proto3" json:"variables,omitempty"`
987+ // NextPageToken is passed as page_token to get the next page. Empty when
988+ // there is no next page.
989+ NextPageToken string `protobuf:"bytes,2,opt,name=next_page_token,json=nextPageToken,proto3" json:"next_page_token,omitempty"`
990+ unknownFields protoimpl.UnknownFields
991+ sizeCache protoimpl.SizeCache
992+}
993+
994+func (x *ListVariablesResponse) Reset() {
995+ *x = ListVariablesResponse{}
996+ mi := &file_ermite_ci_settings_proto_msgTypes[16]
997+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
998+ ms.StoreMessageInfo(mi)
999+}
1000+
1001+func (x *ListVariablesResponse) String() string {
1002+ return protoimpl.X.MessageStringOf(x)
1003+}
1004+
1005+func (*ListVariablesResponse) ProtoMessage() {}
1006+
1007+func (x *ListVariablesResponse) ProtoReflect() protoreflect.Message {
1008+ mi := &file_ermite_ci_settings_proto_msgTypes[16]
1009+ if x != nil {
1010+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
1011+ if ms.LoadMessageInfo() == nil {
1012+ ms.StoreMessageInfo(mi)
1013+ }
1014+ return ms
1015+ }
1016+ return mi.MessageOf(x)
1017+}
1018+
1019+// Deprecated: Use ListVariablesResponse.ProtoReflect.Descriptor instead.
1020+func (*ListVariablesResponse) Descriptor() ([]byte, []int) {
1021+ return file_ermite_ci_settings_proto_rawDescGZIP(), []int{16}
1022+}
1023+
1024+func (x *ListVariablesResponse) GetVariables() []*Variable {
1025+ if x != nil {
1026+ return x.Variables
1027+ }
1028+ return nil
1029+}
1030+
1031+func (x *ListVariablesResponse) GetNextPageToken() string {
1032+ if x != nil {
1033+ return x.NextPageToken
1034+ }
1035+ return ""
1036+}
1037+
1038+// DeleteVariableRequest names the variable to delete.
1039+type DeleteVariableRequest struct {
1040+ state protoimpl.MessageState `protogen:"open.v1"`
1041+ // Scope is where the variable lives.
1042+ Scope *SettingsScope `protobuf:"bytes,1,opt,name=scope,proto3" json:"scope,omitempty"`
1043+ // Name is the name of the variable, without regard to case.
1044+ Name string `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty"`
1045+ unknownFields protoimpl.UnknownFields
1046+ sizeCache protoimpl.SizeCache
1047+}
1048+
1049+func (x *DeleteVariableRequest) Reset() {
1050+ *x = DeleteVariableRequest{}
1051+ mi := &file_ermite_ci_settings_proto_msgTypes[17]
1052+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
1053+ ms.StoreMessageInfo(mi)
1054+}
1055+
1056+func (x *DeleteVariableRequest) String() string {
1057+ return protoimpl.X.MessageStringOf(x)
1058+}
1059+
1060+func (*DeleteVariableRequest) ProtoMessage() {}
1061+
1062+func (x *DeleteVariableRequest) ProtoReflect() protoreflect.Message {
1063+ mi := &file_ermite_ci_settings_proto_msgTypes[17]
1064+ if x != nil {
1065+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
1066+ if ms.LoadMessageInfo() == nil {
1067+ ms.StoreMessageInfo(mi)
1068+ }
1069+ return ms
1070+ }
1071+ return mi.MessageOf(x)
1072+}
1073+
1074+// Deprecated: Use DeleteVariableRequest.ProtoReflect.Descriptor instead.
1075+func (*DeleteVariableRequest) Descriptor() ([]byte, []int) {
1076+ return file_ermite_ci_settings_proto_rawDescGZIP(), []int{17}
1077+}
1078+
1079+func (x *DeleteVariableRequest) GetScope() *SettingsScope {
1080+ if x != nil {
1081+ return x.Scope
1082+ }
1083+ return nil
1084+}
1085+
1086+func (x *DeleteVariableRequest) GetName() string {
1087+ if x != nil {
1088+ return x.Name
1089+ }
1090+ return ""
1091+}
1092+
1093+// DeleteVariableResponse is empty.
1094+type DeleteVariableResponse struct {
1095+ state protoimpl.MessageState `protogen:"open.v1"`
1096+ unknownFields protoimpl.UnknownFields
1097+ sizeCache protoimpl.SizeCache
1098+}
1099+
1100+func (x *DeleteVariableResponse) Reset() {
1101+ *x = DeleteVariableResponse{}
1102+ mi := &file_ermite_ci_settings_proto_msgTypes[18]
1103+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
1104+ ms.StoreMessageInfo(mi)
1105+}
1106+
1107+func (x *DeleteVariableResponse) String() string {
1108+ return protoimpl.X.MessageStringOf(x)
1109+}
1110+
1111+func (*DeleteVariableResponse) ProtoMessage() {}
1112+
1113+func (x *DeleteVariableResponse) ProtoReflect() protoreflect.Message {
1114+ mi := &file_ermite_ci_settings_proto_msgTypes[18]
1115+ if x != nil {
1116+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
1117+ if ms.LoadMessageInfo() == nil {
1118+ ms.StoreMessageInfo(mi)
1119+ }
1120+ return ms
1121+ }
1122+ return mi.MessageOf(x)
1123+}
1124+
1125+// Deprecated: Use DeleteVariableResponse.ProtoReflect.Descriptor instead.
1126+func (*DeleteVariableResponse) Descriptor() ([]byte, []int) {
1127+ return file_ermite_ci_settings_proto_rawDescGZIP(), []int{18}
1128+}
1129+
1130+// CreateEnvironmentRequest names the environment to create.
1131+type CreateEnvironmentRequest struct {
1132+ state protoimpl.MessageState `protogen:"open.v1"`
1133+ // Repo is the repository name.
1134+ Repo string `protobuf:"bytes,1,opt,name=repo,proto3" json:"repo,omitempty"`
1135+ // Name is the name of the environment, see Environment.name.
1136+ Name string `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty"`
1137+ unknownFields protoimpl.UnknownFields
1138+ sizeCache protoimpl.SizeCache
1139+}
1140+
1141+func (x *CreateEnvironmentRequest) Reset() {
1142+ *x = CreateEnvironmentRequest{}
1143+ mi := &file_ermite_ci_settings_proto_msgTypes[19]
1144+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
1145+ ms.StoreMessageInfo(mi)
1146+}
1147+
1148+func (x *CreateEnvironmentRequest) String() string {
1149+ return protoimpl.X.MessageStringOf(x)
1150+}
1151+
1152+func (*CreateEnvironmentRequest) ProtoMessage() {}
1153+
1154+func (x *CreateEnvironmentRequest) ProtoReflect() protoreflect.Message {
1155+ mi := &file_ermite_ci_settings_proto_msgTypes[19]
1156+ if x != nil {
1157+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
1158+ if ms.LoadMessageInfo() == nil {
1159+ ms.StoreMessageInfo(mi)
1160+ }
1161+ return ms
1162+ }
1163+ return mi.MessageOf(x)
1164+}
1165+
1166+// Deprecated: Use CreateEnvironmentRequest.ProtoReflect.Descriptor instead.
1167+func (*CreateEnvironmentRequest) Descriptor() ([]byte, []int) {
1168+ return file_ermite_ci_settings_proto_rawDescGZIP(), []int{19}
1169+}
1170+
1171+func (x *CreateEnvironmentRequest) GetRepo() string {
1172+ if x != nil {
1173+ return x.Repo
1174+ }
1175+ return ""
1176+}
1177+
1178+func (x *CreateEnvironmentRequest) GetName() string {
1179+ if x != nil {
1180+ return x.Name
1181+ }
1182+ return ""
1183+}
1184+
1185+// CreateEnvironmentResponse holds the environment.
1186+type CreateEnvironmentResponse struct {
1187+ state protoimpl.MessageState `protogen:"open.v1"`
1188+ // Environment is the environment, new or existing.
1189+ Environment *Environment `protobuf:"bytes,1,opt,name=environment,proto3" json:"environment,omitempty"`
1190+ unknownFields protoimpl.UnknownFields
1191+ sizeCache protoimpl.SizeCache
1192+}
1193+
1194+func (x *CreateEnvironmentResponse) Reset() {
1195+ *x = CreateEnvironmentResponse{}
1196+ mi := &file_ermite_ci_settings_proto_msgTypes[20]
1197+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
1198+ ms.StoreMessageInfo(mi)
1199+}
1200+
1201+func (x *CreateEnvironmentResponse) String() string {
1202+ return protoimpl.X.MessageStringOf(x)
1203+}
1204+
1205+func (*CreateEnvironmentResponse) ProtoMessage() {}
1206+
1207+func (x *CreateEnvironmentResponse) ProtoReflect() protoreflect.Message {
1208+ mi := &file_ermite_ci_settings_proto_msgTypes[20]
1209+ if x != nil {
1210+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
1211+ if ms.LoadMessageInfo() == nil {
1212+ ms.StoreMessageInfo(mi)
1213+ }
1214+ return ms
1215+ }
1216+ return mi.MessageOf(x)
1217+}
1218+
1219+// Deprecated: Use CreateEnvironmentResponse.ProtoReflect.Descriptor instead.
1220+func (*CreateEnvironmentResponse) Descriptor() ([]byte, []int) {
1221+ return file_ermite_ci_settings_proto_rawDescGZIP(), []int{20}
1222+}
1223+
1224+func (x *CreateEnvironmentResponse) GetEnvironment() *Environment {
1225+ if x != nil {
1226+ return x.Environment
1227+ }
1228+ return nil
1229+}
1230+
1231+// ListEnvironmentsRequest selects a page of the environments of a repository.
1232+type ListEnvironmentsRequest struct {
1233+ state protoimpl.MessageState `protogen:"open.v1"`
1234+ // Repo is the repository name.
1235+ Repo string `protobuf:"bytes,1,opt,name=repo,proto3" json:"repo,omitempty"`
1236+ // PageSize is the maximum number of environments to return. 0 means the
1237+ // server default; values above the server maximum are lowered to it.
1238+ PageSize int32 `protobuf:"varint,2,opt,name=page_size,json=pageSize,proto3" json:"page_size,omitempty"`
1239+ // PageToken is the next_page_token of a previous response. Empty for the
1240+ // first page.
1241+ PageToken string `protobuf:"bytes,3,opt,name=page_token,json=pageToken,proto3" json:"page_token,omitempty"`
1242+ unknownFields protoimpl.UnknownFields
1243+ sizeCache protoimpl.SizeCache
1244+}
1245+
1246+func (x *ListEnvironmentsRequest) Reset() {
1247+ *x = ListEnvironmentsRequest{}
1248+ mi := &file_ermite_ci_settings_proto_msgTypes[21]
1249+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
1250+ ms.StoreMessageInfo(mi)
1251+}
1252+
1253+func (x *ListEnvironmentsRequest) String() string {
1254+ return protoimpl.X.MessageStringOf(x)
1255+}
1256+
1257+func (*ListEnvironmentsRequest) ProtoMessage() {}
1258+
1259+func (x *ListEnvironmentsRequest) ProtoReflect() protoreflect.Message {
1260+ mi := &file_ermite_ci_settings_proto_msgTypes[21]
1261+ if x != nil {
1262+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
1263+ if ms.LoadMessageInfo() == nil {
1264+ ms.StoreMessageInfo(mi)
1265+ }
1266+ return ms
1267+ }
1268+ return mi.MessageOf(x)
1269+}
1270+
1271+// Deprecated: Use ListEnvironmentsRequest.ProtoReflect.Descriptor instead.
1272+func (*ListEnvironmentsRequest) Descriptor() ([]byte, []int) {
1273+ return file_ermite_ci_settings_proto_rawDescGZIP(), []int{21}
1274+}
1275+
1276+func (x *ListEnvironmentsRequest) GetRepo() string {
1277+ if x != nil {
1278+ return x.Repo
1279+ }
1280+ return ""
1281+}
1282+
1283+func (x *ListEnvironmentsRequest) GetPageSize() int32 {
1284+ if x != nil {
1285+ return x.PageSize
1286+ }
1287+ return 0
1288+}
1289+
1290+func (x *ListEnvironmentsRequest) GetPageToken() string {
1291+ if x != nil {
1292+ return x.PageToken
1293+ }
1294+ return ""
1295+}
1296+
1297+// ListEnvironmentsResponse is one page of environments.
1298+type ListEnvironmentsResponse struct {
1299+ state protoimpl.MessageState `protogen:"open.v1"`
1300+ // Environments are the environments of this page, ordered by name.
1301+ Environments []*Environment `protobuf:"bytes,1,rep,name=environments,proto3" json:"environments,omitempty"`
1302+ // NextPageToken is passed as page_token to get the next page. Empty when
1303+ // there is no next page.
1304+ NextPageToken string `protobuf:"bytes,2,opt,name=next_page_token,json=nextPageToken,proto3" json:"next_page_token,omitempty"`
1305+ unknownFields protoimpl.UnknownFields
1306+ sizeCache protoimpl.SizeCache
1307+}
1308+
1309+func (x *ListEnvironmentsResponse) Reset() {
1310+ *x = ListEnvironmentsResponse{}
1311+ mi := &file_ermite_ci_settings_proto_msgTypes[22]
1312+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
1313+ ms.StoreMessageInfo(mi)
1314+}
1315+
1316+func (x *ListEnvironmentsResponse) String() string {
1317+ return protoimpl.X.MessageStringOf(x)
1318+}
1319+
1320+func (*ListEnvironmentsResponse) ProtoMessage() {}
1321+
1322+func (x *ListEnvironmentsResponse) ProtoReflect() protoreflect.Message {
1323+ mi := &file_ermite_ci_settings_proto_msgTypes[22]
1324+ if x != nil {
1325+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
1326+ if ms.LoadMessageInfo() == nil {
1327+ ms.StoreMessageInfo(mi)
1328+ }
1329+ return ms
1330+ }
1331+ return mi.MessageOf(x)
1332+}
1333+
1334+// Deprecated: Use ListEnvironmentsResponse.ProtoReflect.Descriptor instead.
1335+func (*ListEnvironmentsResponse) Descriptor() ([]byte, []int) {
1336+ return file_ermite_ci_settings_proto_rawDescGZIP(), []int{22}
1337+}
1338+
1339+func (x *ListEnvironmentsResponse) GetEnvironments() []*Environment {
1340+ if x != nil {
1341+ return x.Environments
1342+ }
1343+ return nil
1344+}
1345+
1346+func (x *ListEnvironmentsResponse) GetNextPageToken() string {
1347+ if x != nil {
1348+ return x.NextPageToken
1349+ }
1350+ return ""
1351+}
1352+
1353+// DeleteEnvironmentRequest names the environment to delete.
1354+type DeleteEnvironmentRequest struct {
1355+ state protoimpl.MessageState `protogen:"open.v1"`
1356+ // Repo is the repository name.
1357+ Repo string `protobuf:"bytes,1,opt,name=repo,proto3" json:"repo,omitempty"`
1358+ // Name is the name of the environment, without regard to case.
1359+ Name string `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty"`
1360+ unknownFields protoimpl.UnknownFields
1361+ sizeCache protoimpl.SizeCache
1362+}
1363+
1364+func (x *DeleteEnvironmentRequest) Reset() {
1365+ *x = DeleteEnvironmentRequest{}
1366+ mi := &file_ermite_ci_settings_proto_msgTypes[23]
1367+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
1368+ ms.StoreMessageInfo(mi)
1369+}
1370+
1371+func (x *DeleteEnvironmentRequest) String() string {
1372+ return protoimpl.X.MessageStringOf(x)
1373+}
1374+
1375+func (*DeleteEnvironmentRequest) ProtoMessage() {}
1376+
1377+func (x *DeleteEnvironmentRequest) ProtoReflect() protoreflect.Message {
1378+ mi := &file_ermite_ci_settings_proto_msgTypes[23]
1379+ if x != nil {
1380+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
1381+ if ms.LoadMessageInfo() == nil {
1382+ ms.StoreMessageInfo(mi)
1383+ }
1384+ return ms
1385+ }
1386+ return mi.MessageOf(x)
1387+}
1388+
1389+// Deprecated: Use DeleteEnvironmentRequest.ProtoReflect.Descriptor instead.
1390+func (*DeleteEnvironmentRequest) Descriptor() ([]byte, []int) {
1391+ return file_ermite_ci_settings_proto_rawDescGZIP(), []int{23}
1392+}
1393+
1394+func (x *DeleteEnvironmentRequest) GetRepo() string {
1395+ if x != nil {
1396+ return x.Repo
1397+ }
1398+ return ""
1399+}
1400+
1401+func (x *DeleteEnvironmentRequest) GetName() string {
1402+ if x != nil {
1403+ return x.Name
1404+ }
1405+ return ""
1406+}
1407+
1408+// DeleteEnvironmentResponse is empty.
1409+type DeleteEnvironmentResponse struct {
1410+ state protoimpl.MessageState `protogen:"open.v1"`
1411+ unknownFields protoimpl.UnknownFields
1412+ sizeCache protoimpl.SizeCache
1413+}
1414+
1415+func (x *DeleteEnvironmentResponse) Reset() {
1416+ *x = DeleteEnvironmentResponse{}
1417+ mi := &file_ermite_ci_settings_proto_msgTypes[24]
1418+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
1419+ ms.StoreMessageInfo(mi)
1420+}
1421+
1422+func (x *DeleteEnvironmentResponse) String() string {
1423+ return protoimpl.X.MessageStringOf(x)
1424+}
1425+
1426+func (*DeleteEnvironmentResponse) ProtoMessage() {}
1427+
1428+func (x *DeleteEnvironmentResponse) ProtoReflect() protoreflect.Message {
1429+ mi := &file_ermite_ci_settings_proto_msgTypes[24]
1430+ if x != nil {
1431+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
1432+ if ms.LoadMessageInfo() == nil {
1433+ ms.StoreMessageInfo(mi)
1434+ }
1435+ return ms
1436+ }
1437+ return mi.MessageOf(x)
1438+}
1439+
1440+// Deprecated: Use DeleteEnvironmentResponse.ProtoReflect.Descriptor instead.
1441+func (*DeleteEnvironmentResponse) Descriptor() ([]byte, []int) {
1442+ return file_ermite_ci_settings_proto_rawDescGZIP(), []int{24}
1443+}
1444+
1445+var File_ermite_ci_settings_proto protoreflect.FileDescriptor
1446+
1447+const file_ermite_ci_settings_proto_rawDesc = "" +
1448+ "\n" +
1449+ "\x18ermite/ci_settings.proto\x12\x06ermite\x1a\x1fgoogle/protobuf/timestamp.proto\"\x88\x01\n" +
1450+ "\rSettingsScope\x12\x1c\n" +
1451+ "\binstance\x18\x01 \x01(\bH\x00R\binstance\x12\x14\n" +
1452+ "\x04repo\x18\x02 \x01(\tH\x00R\x04repo\x12:\n" +
1453+ "\venvironment\x18\x03 \x01(\v2\x16.ermite.EnvironmentRefH\x00R\venvironmentB\a\n" +
1454+ "\x05where\"8\n" +
1455+ "\x0eEnvironmentRef\x12\x12\n" +
1456+ "\x04repo\x18\x01 \x01(\tR\x04repo\x12\x12\n" +
1457+ "\x04name\x18\x02 \x01(\tR\x04name\"W\n" +
1458+ "\x06Secret\x12\x12\n" +
1459+ "\x04name\x18\x01 \x01(\tR\x04name\x129\n" +
1460+ "\n" +
1461+ "updated_at\x18\x02 \x01(\v2\x1a.google.protobuf.TimestampR\tupdatedAt\"o\n" +
1462+ "\bVariable\x12\x12\n" +
1463+ "\x04name\x18\x01 \x01(\tR\x04name\x12\x14\n" +
1464+ "\x05value\x18\x02 \x01(\tR\x05value\x129\n" +
1465+ "\n" +
1466+ "updated_at\x18\x03 \x01(\v2\x1a.google.protobuf.TimestampR\tupdatedAt\"p\n" +
1467+ "\vEnvironment\x12\x12\n" +
1468+ "\x04repo\x18\x01 \x01(\tR\x04repo\x12\x12\n" +
1469+ "\x04name\x18\x02 \x01(\tR\x04name\x129\n" +
1470+ "\n" +
1471+ "created_at\x18\x03 \x01(\v2\x1a.google.protobuf.TimestampR\tcreatedAt\"i\n" +
1472+ "\x10SetSecretRequest\x12+\n" +
1473+ "\x05scope\x18\x01 \x01(\v2\x15.ermite.SettingsScopeR\x05scope\x12\x12\n" +
1474+ "\x04name\x18\x02 \x01(\tR\x04name\x12\x14\n" +
1475+ "\x05value\x18\x03 \x01(\tR\x05value\";\n" +
1476+ "\x11SetSecretResponse\x12&\n" +
1477+ "\x06secret\x18\x01 \x01(\v2\x0e.ermite.SecretR\x06secret\"}\n" +
1478+ "\x12ListSecretsRequest\x12+\n" +
1479+ "\x05scope\x18\x01 \x01(\v2\x15.ermite.SettingsScopeR\x05scope\x12\x1b\n" +
1480+ "\tpage_size\x18\x02 \x01(\x05R\bpageSize\x12\x1d\n" +
1481+ "\n" +
1482+ "page_token\x18\x03 \x01(\tR\tpageToken\"g\n" +
1483+ "\x13ListSecretsResponse\x12(\n" +
1484+ "\asecrets\x18\x01 \x03(\v2\x0e.ermite.SecretR\asecrets\x12&\n" +
1485+ "\x0fnext_page_token\x18\x02 \x01(\tR\rnextPageToken\"V\n" +
1486+ "\x13DeleteSecretRequest\x12+\n" +
1487+ "\x05scope\x18\x01 \x01(\v2\x15.ermite.SettingsScopeR\x05scope\x12\x12\n" +
1488+ "\x04name\x18\x02 \x01(\tR\x04name\"\x16\n" +
1489+ "\x14DeleteSecretResponse\"k\n" +
1490+ "\x12SetVariableRequest\x12+\n" +
1491+ "\x05scope\x18\x01 \x01(\v2\x15.ermite.SettingsScopeR\x05scope\x12\x12\n" +
1492+ "\x04name\x18\x02 \x01(\tR\x04name\x12\x14\n" +
1493+ "\x05value\x18\x03 \x01(\tR\x05value\"C\n" +
1494+ "\x13SetVariableResponse\x12,\n" +
1495+ "\bvariable\x18\x01 \x01(\v2\x10.ermite.VariableR\bvariable\"U\n" +
1496+ "\x12GetVariableRequest\x12+\n" +
1497+ "\x05scope\x18\x01 \x01(\v2\x15.ermite.SettingsScopeR\x05scope\x12\x12\n" +
1498+ "\x04name\x18\x02 \x01(\tR\x04name\"C\n" +
1499+ "\x13GetVariableResponse\x12,\n" +
1500+ "\bvariable\x18\x01 \x01(\v2\x10.ermite.VariableR\bvariable\"\x7f\n" +
1501+ "\x14ListVariablesRequest\x12+\n" +
1502+ "\x05scope\x18\x01 \x01(\v2\x15.ermite.SettingsScopeR\x05scope\x12\x1b\n" +
1503+ "\tpage_size\x18\x02 \x01(\x05R\bpageSize\x12\x1d\n" +
1504+ "\n" +
1505+ "page_token\x18\x03 \x01(\tR\tpageToken\"o\n" +
1506+ "\x15ListVariablesResponse\x12.\n" +
1507+ "\tvariables\x18\x01 \x03(\v2\x10.ermite.VariableR\tvariables\x12&\n" +
1508+ "\x0fnext_page_token\x18\x02 \x01(\tR\rnextPageToken\"X\n" +
1509+ "\x15DeleteVariableRequest\x12+\n" +
1510+ "\x05scope\x18\x01 \x01(\v2\x15.ermite.SettingsScopeR\x05scope\x12\x12\n" +
1511+ "\x04name\x18\x02 \x01(\tR\x04name\"\x18\n" +
1512+ "\x16DeleteVariableResponse\"B\n" +
1513+ "\x18CreateEnvironmentRequest\x12\x12\n" +
1514+ "\x04repo\x18\x01 \x01(\tR\x04repo\x12\x12\n" +
1515+ "\x04name\x18\x02 \x01(\tR\x04name\"R\n" +
1516+ "\x19CreateEnvironmentResponse\x125\n" +
1517+ "\venvironment\x18\x01 \x01(\v2\x13.ermite.EnvironmentR\venvironment\"i\n" +
1518+ "\x17ListEnvironmentsRequest\x12\x12\n" +
1519+ "\x04repo\x18\x01 \x01(\tR\x04repo\x12\x1b\n" +
1520+ "\tpage_size\x18\x02 \x01(\x05R\bpageSize\x12\x1d\n" +
1521+ "\n" +
1522+ "page_token\x18\x03 \x01(\tR\tpageToken\"{\n" +
1523+ "\x18ListEnvironmentsResponse\x127\n" +
1524+ "\fenvironments\x18\x01 \x03(\v2\x13.ermite.EnvironmentR\fenvironments\x12&\n" +
1525+ "\x0fnext_page_token\x18\x02 \x01(\tR\rnextPageToken\"B\n" +
1526+ "\x18DeleteEnvironmentRequest\x12\x12\n" +
1527+ "\x04repo\x18\x01 \x01(\tR\x04repo\x12\x12\n" +
1528+ "\x04name\x18\x02 \x01(\tR\x04name\"\x1b\n" +
1529+ "\x19DeleteEnvironmentResponse2\xe4\x01\n" +
1530+ "\rSecretService\x12@\n" +
1531+ "\tSetSecret\x12\x18.ermite.SetSecretRequest\x1a\x19.ermite.SetSecretResponse\x12F\n" +
1532+ "\vListSecrets\x12\x1a.ermite.ListSecretsRequest\x1a\x1b.ermite.ListSecretsResponse\x12I\n" +
1533+ "\fDeleteSecret\x12\x1b.ermite.DeleteSecretRequest\x1a\x1c.ermite.DeleteSecretResponse2\xc0\x02\n" +
1534+ "\x0fVariableService\x12F\n" +
1535+ "\vSetVariable\x12\x1a.ermite.SetVariableRequest\x1a\x1b.ermite.SetVariableResponse\x12F\n" +
1536+ "\vGetVariable\x12\x1a.ermite.GetVariableRequest\x1a\x1b.ermite.GetVariableResponse\x12L\n" +
1537+ "\rListVariables\x12\x1c.ermite.ListVariablesRequest\x1a\x1d.ermite.ListVariablesResponse\x12O\n" +
1538+ "\x0eDeleteVariable\x12\x1d.ermite.DeleteVariableRequest\x1a\x1e.ermite.DeleteVariableResponse2\x9f\x02\n" +
1539+ "\x12EnvironmentService\x12X\n" +
1540+ "\x11CreateEnvironment\x12 .ermite.CreateEnvironmentRequest\x1a!.ermite.CreateEnvironmentResponse\x12U\n" +
1541+ "\x10ListEnvironments\x12\x1f.ermite.ListEnvironmentsRequest\x1a .ermite.ListEnvironmentsResponse\x12X\n" +
1542+ "\x11DeleteEnvironment\x12 .ermite.DeleteEnvironmentRequest\x1a!.ermite.DeleteEnvironmentResponseBv\n" +
1543+ "\n" +
1544+ "com.ermiteB\x0fCiSettingsProtoP\x01Z\x1fbnema.dev/ermite-api/gen/ermite\xa2\x02\x03EXX\xaa\x02\x06Ermite\xca\x02\x06Ermite\xe2\x02\x12Ermite\\GPBMetadata\xea\x02\x06Ermiteb\x06proto3"
1545+
1546+var (
1547+ file_ermite_ci_settings_proto_rawDescOnce sync.Once
1548+ file_ermite_ci_settings_proto_rawDescData []byte
1549+)
1550+
1551+func file_ermite_ci_settings_proto_rawDescGZIP() []byte {
1552+ file_ermite_ci_settings_proto_rawDescOnce.Do(func() {
1553+ file_ermite_ci_settings_proto_rawDescData = protoimpl.X.CompressGZIP(unsafe.Slice(unsafe.StringData(file_ermite_ci_settings_proto_rawDesc), len(file_ermite_ci_settings_proto_rawDesc)))
1554+ })
1555+ return file_ermite_ci_settings_proto_rawDescData
1556+}
1557+
1558+var file_ermite_ci_settings_proto_msgTypes = make([]protoimpl.MessageInfo, 25)
1559+var file_ermite_ci_settings_proto_goTypes = []any{
1560+ (*SettingsScope)(nil), // 0: ermite.SettingsScope
1561+ (*EnvironmentRef)(nil), // 1: ermite.EnvironmentRef
1562+ (*Secret)(nil), // 2: ermite.Secret
1563+ (*Variable)(nil), // 3: ermite.Variable
1564+ (*Environment)(nil), // 4: ermite.Environment
1565+ (*SetSecretRequest)(nil), // 5: ermite.SetSecretRequest
1566+ (*SetSecretResponse)(nil), // 6: ermite.SetSecretResponse
1567+ (*ListSecretsRequest)(nil), // 7: ermite.ListSecretsRequest
1568+ (*ListSecretsResponse)(nil), // 8: ermite.ListSecretsResponse
1569+ (*DeleteSecretRequest)(nil), // 9: ermite.DeleteSecretRequest
1570+ (*DeleteSecretResponse)(nil), // 10: ermite.DeleteSecretResponse
1571+ (*SetVariableRequest)(nil), // 11: ermite.SetVariableRequest
1572+ (*SetVariableResponse)(nil), // 12: ermite.SetVariableResponse
1573+ (*GetVariableRequest)(nil), // 13: ermite.GetVariableRequest
1574+ (*GetVariableResponse)(nil), // 14: ermite.GetVariableResponse
1575+ (*ListVariablesRequest)(nil), // 15: ermite.ListVariablesRequest
1576+ (*ListVariablesResponse)(nil), // 16: ermite.ListVariablesResponse
1577+ (*DeleteVariableRequest)(nil), // 17: ermite.DeleteVariableRequest
1578+ (*DeleteVariableResponse)(nil), // 18: ermite.DeleteVariableResponse
1579+ (*CreateEnvironmentRequest)(nil), // 19: ermite.CreateEnvironmentRequest
1580+ (*CreateEnvironmentResponse)(nil), // 20: ermite.CreateEnvironmentResponse
1581+ (*ListEnvironmentsRequest)(nil), // 21: ermite.ListEnvironmentsRequest
1582+ (*ListEnvironmentsResponse)(nil), // 22: ermite.ListEnvironmentsResponse
1583+ (*DeleteEnvironmentRequest)(nil), // 23: ermite.DeleteEnvironmentRequest
1584+ (*DeleteEnvironmentResponse)(nil), // 24: ermite.DeleteEnvironmentResponse
1585+ (*timestamppb.Timestamp)(nil), // 25: google.protobuf.Timestamp
1586+}
1587+var file_ermite_ci_settings_proto_depIdxs = []int32{
1588+ 1, // 0: ermite.SettingsScope.environment:type_name -> ermite.EnvironmentRef
1589+ 25, // 1: ermite.Secret.updated_at:type_name -> google.protobuf.Timestamp
1590+ 25, // 2: ermite.Variable.updated_at:type_name -> google.protobuf.Timestamp
1591+ 25, // 3: ermite.Environment.created_at:type_name -> google.protobuf.Timestamp
1592+ 0, // 4: ermite.SetSecretRequest.scope:type_name -> ermite.SettingsScope
1593+ 2, // 5: ermite.SetSecretResponse.secret:type_name -> ermite.Secret
1594+ 0, // 6: ermite.ListSecretsRequest.scope:type_name -> ermite.SettingsScope
1595+ 2, // 7: ermite.ListSecretsResponse.secrets:type_name -> ermite.Secret
1596+ 0, // 8: ermite.DeleteSecretRequest.scope:type_name -> ermite.SettingsScope
1597+ 0, // 9: ermite.SetVariableRequest.scope:type_name -> ermite.SettingsScope
1598+ 3, // 10: ermite.SetVariableResponse.variable:type_name -> ermite.Variable
1599+ 0, // 11: ermite.GetVariableRequest.scope:type_name -> ermite.SettingsScope
1600+ 3, // 12: ermite.GetVariableResponse.variable:type_name -> ermite.Variable
1601+ 0, // 13: ermite.ListVariablesRequest.scope:type_name -> ermite.SettingsScope
1602+ 3, // 14: ermite.ListVariablesResponse.variables:type_name -> ermite.Variable
1603+ 0, // 15: ermite.DeleteVariableRequest.scope:type_name -> ermite.SettingsScope
1604+ 4, // 16: ermite.CreateEnvironmentResponse.environment:type_name -> ermite.Environment
1605+ 4, // 17: ermite.ListEnvironmentsResponse.environments:type_name -> ermite.Environment
1606+ 5, // 18: ermite.SecretService.SetSecret:input_type -> ermite.SetSecretRequest
1607+ 7, // 19: ermite.SecretService.ListSecrets:input_type -> ermite.ListSecretsRequest
1608+ 9, // 20: ermite.SecretService.DeleteSecret:input_type -> ermite.DeleteSecretRequest
1609+ 11, // 21: ermite.VariableService.SetVariable:input_type -> ermite.SetVariableRequest
1610+ 13, // 22: ermite.VariableService.GetVariable:input_type -> ermite.GetVariableRequest
1611+ 15, // 23: ermite.VariableService.ListVariables:input_type -> ermite.ListVariablesRequest
1612+ 17, // 24: ermite.VariableService.DeleteVariable:input_type -> ermite.DeleteVariableRequest
1613+ 19, // 25: ermite.EnvironmentService.CreateEnvironment:input_type -> ermite.CreateEnvironmentRequest
1614+ 21, // 26: ermite.EnvironmentService.ListEnvironments:input_type -> ermite.ListEnvironmentsRequest
1615+ 23, // 27: ermite.EnvironmentService.DeleteEnvironment:input_type -> ermite.DeleteEnvironmentRequest
1616+ 6, // 28: ermite.SecretService.SetSecret:output_type -> ermite.SetSecretResponse
1617+ 8, // 29: ermite.SecretService.ListSecrets:output_type -> ermite.ListSecretsResponse
1618+ 10, // 30: ermite.SecretService.DeleteSecret:output_type -> ermite.DeleteSecretResponse
1619+ 12, // 31: ermite.VariableService.SetVariable:output_type -> ermite.SetVariableResponse
1620+ 14, // 32: ermite.VariableService.GetVariable:output_type -> ermite.GetVariableResponse
1621+ 16, // 33: ermite.VariableService.ListVariables:output_type -> ermite.ListVariablesResponse
1622+ 18, // 34: ermite.VariableService.DeleteVariable:output_type -> ermite.DeleteVariableResponse
1623+ 20, // 35: ermite.EnvironmentService.CreateEnvironment:output_type -> ermite.CreateEnvironmentResponse
1624+ 22, // 36: ermite.EnvironmentService.ListEnvironments:output_type -> ermite.ListEnvironmentsResponse
1625+ 24, // 37: ermite.EnvironmentService.DeleteEnvironment:output_type -> ermite.DeleteEnvironmentResponse
1626+ 28, // [28:38] is the sub-list for method output_type
1627+ 18, // [18:28] is the sub-list for method input_type
1628+ 18, // [18:18] is the sub-list for extension type_name
1629+ 18, // [18:18] is the sub-list for extension extendee
1630+ 0, // [0:18] is the sub-list for field type_name
1631+}
1632+
1633+func init() { file_ermite_ci_settings_proto_init() }
1634+func file_ermite_ci_settings_proto_init() {
1635+ if File_ermite_ci_settings_proto != nil {
1636+ return
1637+ }
1638+ file_ermite_ci_settings_proto_msgTypes[0].OneofWrappers = []any{
1639+ (*SettingsScope_Instance)(nil),
1640+ (*SettingsScope_Repo)(nil),
1641+ (*SettingsScope_Environment)(nil),
1642+ }
1643+ type x struct{}
1644+ out := protoimpl.TypeBuilder{
1645+ File: protoimpl.DescBuilder{
1646+ GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
1647+ RawDescriptor: unsafe.Slice(unsafe.StringData(file_ermite_ci_settings_proto_rawDesc), len(file_ermite_ci_settings_proto_rawDesc)),
1648+ NumEnums: 0,
1649+ NumMessages: 25,
1650+ NumExtensions: 0,
1651+ NumServices: 3,
1652+ },
1653+ GoTypes: file_ermite_ci_settings_proto_goTypes,
1654+ DependencyIndexes: file_ermite_ci_settings_proto_depIdxs,
1655+ MessageInfos: file_ermite_ci_settings_proto_msgTypes,
1656+ }.Build()
1657+ File_ermite_ci_settings_proto = out.File
1658+ file_ermite_ci_settings_proto_goTypes = nil
1659+ file_ermite_ci_settings_proto_depIdxs = nil
1660+}
@@ -0,0 +1,1660 @@
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/ci_settings.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+// SettingsScope says where a secret or a variable lives, like the scopes of
28+// GitHub Actions. A job sees the ones of its instance, its repository and its
29+// environment, and the narrowest scope wins: environment over repository over
30+// instance.
31+type SettingsScope struct {
32+ state protoimpl.MessageState `protogen:"open.v1"`
33+ // Where is the scope. It is required: a request without it is
34+ // invalid_argument.
35+ //
36+ // Types that are valid to be assigned to Where:
37+ //
38+ // *SettingsScope_Instance
39+ // *SettingsScope_Repo
40+ // *SettingsScope_Environment
41+ Where isSettingsScope_Where `protobuf_oneof:"where"`
42+ unknownFields protoimpl.UnknownFields
43+ sizeCache protoimpl.SizeCache
44+}
45+
46+func (x *SettingsScope) Reset() {
47+ *x = SettingsScope{}
48+ mi := &file_ermite_ci_settings_proto_msgTypes[0]
49+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
50+ ms.StoreMessageInfo(mi)
51+}
52+
53+func (x *SettingsScope) String() string {
54+ return protoimpl.X.MessageStringOf(x)
55+}
56+
57+func (*SettingsScope) ProtoMessage() {}
58+
59+func (x *SettingsScope) ProtoReflect() protoreflect.Message {
60+ mi := &file_ermite_ci_settings_proto_msgTypes[0]
61+ if x != nil {
62+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
63+ if ms.LoadMessageInfo() == nil {
64+ ms.StoreMessageInfo(mi)
65+ }
66+ return ms
67+ }
68+ return mi.MessageOf(x)
69+}
70+
71+// Deprecated: Use SettingsScope.ProtoReflect.Descriptor instead.
72+func (*SettingsScope) Descriptor() ([]byte, []int) {
73+ return file_ermite_ci_settings_proto_rawDescGZIP(), []int{0}
74+}
75+
76+func (x *SettingsScope) GetWhere() isSettingsScope_Where {
77+ if x != nil {
78+ return x.Where
79+ }
80+ return nil
81+}
82+
83+func (x *SettingsScope) GetInstance() bool {
84+ if x != nil {
85+ if x, ok := x.Where.(*SettingsScope_Instance); ok {
86+ return x.Instance
87+ }
88+ }
89+ return false
90+}
91+
92+func (x *SettingsScope) GetRepo() string {
93+ if x != nil {
94+ if x, ok := x.Where.(*SettingsScope_Repo); ok {
95+ return x.Repo
96+ }
97+ }
98+ return ""
99+}
100+
101+func (x *SettingsScope) GetEnvironment() *EnvironmentRef {
102+ if x != nil {
103+ if x, ok := x.Where.(*SettingsScope_Environment); ok {
104+ return x.Environment
105+ }
106+ }
107+ return nil
108+}
109+
110+type isSettingsScope_Where interface {
111+ isSettingsScope_Where()
112+}
113+
114+type SettingsScope_Instance struct {
115+ // Instance is the whole server. It must be true when set. It needs a token
116+ // that is not restricted to repositories, or the root token.
117+ Instance bool `protobuf:"varint,1,opt,name=instance,proto3,oneof"`
118+}
119+
120+type SettingsScope_Repo struct {
121+ // Repo is the name of a repository.
122+ Repo string `protobuf:"bytes,2,opt,name=repo,proto3,oneof"`
123+}
124+
125+type SettingsScope_Environment struct {
126+ // Environment is an environment of a repository.
127+ Environment *EnvironmentRef `protobuf:"bytes,3,opt,name=environment,proto3,oneof"`
128+}
129+
130+func (*SettingsScope_Instance) isSettingsScope_Where() {}
131+
132+func (*SettingsScope_Repo) isSettingsScope_Where() {}
133+
134+func (*SettingsScope_Environment) isSettingsScope_Where() {}
135+
136+// EnvironmentRef names an environment of a repository.
137+type EnvironmentRef struct {
138+ state protoimpl.MessageState `protogen:"open.v1"`
139+ // Repo is the repository name.
140+ Repo string `protobuf:"bytes,1,opt,name=repo,proto3" json:"repo,omitempty"`
141+ // Name is the environment name, see Environment.name.
142+ Name string `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty"`
143+ unknownFields protoimpl.UnknownFields
144+ sizeCache protoimpl.SizeCache
145+}
146+
147+func (x *EnvironmentRef) Reset() {
148+ *x = EnvironmentRef{}
149+ mi := &file_ermite_ci_settings_proto_msgTypes[1]
150+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
151+ ms.StoreMessageInfo(mi)
152+}
153+
154+func (x *EnvironmentRef) String() string {
155+ return protoimpl.X.MessageStringOf(x)
156+}
157+
158+func (*EnvironmentRef) ProtoMessage() {}
159+
160+func (x *EnvironmentRef) ProtoReflect() protoreflect.Message {
161+ mi := &file_ermite_ci_settings_proto_msgTypes[1]
162+ if x != nil {
163+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
164+ if ms.LoadMessageInfo() == nil {
165+ ms.StoreMessageInfo(mi)
166+ }
167+ return ms
168+ }
169+ return mi.MessageOf(x)
170+}
171+
172+// Deprecated: Use EnvironmentRef.ProtoReflect.Descriptor instead.
173+func (*EnvironmentRef) Descriptor() ([]byte, []int) {
174+ return file_ermite_ci_settings_proto_rawDescGZIP(), []int{1}
175+}
176+
177+func (x *EnvironmentRef) GetRepo() string {
178+ if x != nil {
179+ return x.Repo
180+ }
181+ return ""
182+}
183+
184+func (x *EnvironmentRef) GetName() string {
185+ if x != nil {
186+ return x.Name
187+ }
188+ return ""
189+}
190+
191+// Secret describes a stored secret. It never contains the value: a value can
192+// be set but not read back.
193+type Secret struct {
194+ state protoimpl.MessageState `protogen:"open.v1"`
195+ // Name is the name of the secret, in upper case as the server stores it.
196+ Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
197+ // UpdatedAt is when the value was last set.
198+ UpdatedAt *timestamppb.Timestamp `protobuf:"bytes,2,opt,name=updated_at,json=updatedAt,proto3" json:"updated_at,omitempty"`
199+ unknownFields protoimpl.UnknownFields
200+ sizeCache protoimpl.SizeCache
201+}
202+
203+func (x *Secret) Reset() {
204+ *x = Secret{}
205+ mi := &file_ermite_ci_settings_proto_msgTypes[2]
206+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
207+ ms.StoreMessageInfo(mi)
208+}
209+
210+func (x *Secret) String() string {
211+ return protoimpl.X.MessageStringOf(x)
212+}
213+
214+func (*Secret) ProtoMessage() {}
215+
216+func (x *Secret) ProtoReflect() protoreflect.Message {
217+ mi := &file_ermite_ci_settings_proto_msgTypes[2]
218+ if x != nil {
219+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
220+ if ms.LoadMessageInfo() == nil {
221+ ms.StoreMessageInfo(mi)
222+ }
223+ return ms
224+ }
225+ return mi.MessageOf(x)
226+}
227+
228+// Deprecated: Use Secret.ProtoReflect.Descriptor instead.
229+func (*Secret) Descriptor() ([]byte, []int) {
230+ return file_ermite_ci_settings_proto_rawDescGZIP(), []int{2}
231+}
232+
233+func (x *Secret) GetName() string {
234+ if x != nil {
235+ return x.Name
236+ }
237+ return ""
238+}
239+
240+func (x *Secret) GetUpdatedAt() *timestamppb.Timestamp {
241+ if x != nil {
242+ return x.UpdatedAt
243+ }
244+ return nil
245+}
246+
247+// Variable is a configuration variable. Unlike a secret its value can be read
248+// back and it may appear in logs.
249+type Variable struct {
250+ state protoimpl.MessageState `protogen:"open.v1"`
251+ // Name is the name of the variable, in upper case as the server stores it.
252+ Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
253+ // Value is the value, at most 48 KiB.
254+ Value string `protobuf:"bytes,2,opt,name=value,proto3" json:"value,omitempty"`
255+ // UpdatedAt is when the value was last set.
256+ UpdatedAt *timestamppb.Timestamp `protobuf:"bytes,3,opt,name=updated_at,json=updatedAt,proto3" json:"updated_at,omitempty"`
257+ unknownFields protoimpl.UnknownFields
258+ sizeCache protoimpl.SizeCache
259+}
260+
261+func (x *Variable) Reset() {
262+ *x = Variable{}
263+ mi := &file_ermite_ci_settings_proto_msgTypes[3]
264+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
265+ ms.StoreMessageInfo(mi)
266+}
267+
268+func (x *Variable) String() string {
269+ return protoimpl.X.MessageStringOf(x)
270+}
271+
272+func (*Variable) ProtoMessage() {}
273+
274+func (x *Variable) ProtoReflect() protoreflect.Message {
275+ mi := &file_ermite_ci_settings_proto_msgTypes[3]
276+ if x != nil {
277+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
278+ if ms.LoadMessageInfo() == nil {
279+ ms.StoreMessageInfo(mi)
280+ }
281+ return ms
282+ }
283+ return mi.MessageOf(x)
284+}
285+
286+// Deprecated: Use Variable.ProtoReflect.Descriptor instead.
287+func (*Variable) Descriptor() ([]byte, []int) {
288+ return file_ermite_ci_settings_proto_rawDescGZIP(), []int{3}
289+}
290+
291+func (x *Variable) GetName() string {
292+ if x != nil {
293+ return x.Name
294+ }
295+ return ""
296+}
297+
298+func (x *Variable) GetValue() string {
299+ if x != nil {
300+ return x.Value
301+ }
302+ return ""
303+}
304+
305+func (x *Variable) GetUpdatedAt() *timestamppb.Timestamp {
306+ if x != nil {
307+ return x.UpdatedAt
308+ }
309+ return nil
310+}
311+
312+// Environment is a named deployment target of a repository, to which secrets
313+// and variables can be attached. A workflow job that names an environment
314+// creates it on first use, as on GitHub.
315+type Environment struct {
316+ state protoimpl.MessageState `protogen:"open.v1"`
317+ // Repo is the repository name.
318+ Repo string `protobuf:"bytes,1,opt,name=repo,proto3" json:"repo,omitempty"`
319+ // Name is the name of the environment, 1 to 255 characters without control
320+ // characters, unique in the repository without regard to case. The server
321+ // keeps the case it was given.
322+ Name string `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty"`
323+ // CreatedAt is when the environment was created.
324+ CreatedAt *timestamppb.Timestamp `protobuf:"bytes,3,opt,name=created_at,json=createdAt,proto3" json:"created_at,omitempty"`
325+ unknownFields protoimpl.UnknownFields
326+ sizeCache protoimpl.SizeCache
327+}
328+
329+func (x *Environment) Reset() {
330+ *x = Environment{}
331+ mi := &file_ermite_ci_settings_proto_msgTypes[4]
332+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
333+ ms.StoreMessageInfo(mi)
334+}
335+
336+func (x *Environment) String() string {
337+ return protoimpl.X.MessageStringOf(x)
338+}
339+
340+func (*Environment) ProtoMessage() {}
341+
342+func (x *Environment) ProtoReflect() protoreflect.Message {
343+ mi := &file_ermite_ci_settings_proto_msgTypes[4]
344+ if x != nil {
345+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
346+ if ms.LoadMessageInfo() == nil {
347+ ms.StoreMessageInfo(mi)
348+ }
349+ return ms
350+ }
351+ return mi.MessageOf(x)
352+}
353+
354+// Deprecated: Use Environment.ProtoReflect.Descriptor instead.
355+func (*Environment) Descriptor() ([]byte, []int) {
356+ return file_ermite_ci_settings_proto_rawDescGZIP(), []int{4}
357+}
358+
359+func (x *Environment) GetRepo() string {
360+ if x != nil {
361+ return x.Repo
362+ }
363+ return ""
364+}
365+
366+func (x *Environment) GetName() string {
367+ if x != nil {
368+ return x.Name
369+ }
370+ return ""
371+}
372+
373+func (x *Environment) GetCreatedAt() *timestamppb.Timestamp {
374+ if x != nil {
375+ return x.CreatedAt
376+ }
377+ return nil
378+}
379+
380+// SetSecretRequest names a secret and gives its value.
381+type SetSecretRequest struct {
382+ state protoimpl.MessageState `protogen:"open.v1"`
383+ // Scope is where the secret lives.
384+ Scope *SettingsScope `protobuf:"bytes,1,opt,name=scope,proto3" json:"scope,omitempty"`
385+ // Name is the name of the secret.
386+ Name string `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty"`
387+ // Value is the value in plain text, 1 byte to 48 KiB. It may contain
388+ // several lines.
389+ Value string `protobuf:"bytes,3,opt,name=value,proto3" json:"value,omitempty"`
390+ unknownFields protoimpl.UnknownFields
391+ sizeCache protoimpl.SizeCache
392+}
393+
394+func (x *SetSecretRequest) Reset() {
395+ *x = SetSecretRequest{}
396+ mi := &file_ermite_ci_settings_proto_msgTypes[5]
397+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
398+ ms.StoreMessageInfo(mi)
399+}
400+
401+func (x *SetSecretRequest) String() string {
402+ return protoimpl.X.MessageStringOf(x)
403+}
404+
405+func (*SetSecretRequest) ProtoMessage() {}
406+
407+func (x *SetSecretRequest) ProtoReflect() protoreflect.Message {
408+ mi := &file_ermite_ci_settings_proto_msgTypes[5]
409+ if x != nil {
410+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
411+ if ms.LoadMessageInfo() == nil {
412+ ms.StoreMessageInfo(mi)
413+ }
414+ return ms
415+ }
416+ return mi.MessageOf(x)
417+}
418+
419+// Deprecated: Use SetSecretRequest.ProtoReflect.Descriptor instead.
420+func (*SetSecretRequest) Descriptor() ([]byte, []int) {
421+ return file_ermite_ci_settings_proto_rawDescGZIP(), []int{5}
422+}
423+
424+func (x *SetSecretRequest) GetScope() *SettingsScope {
425+ if x != nil {
426+ return x.Scope
427+ }
428+ return nil
429+}
430+
431+func (x *SetSecretRequest) GetName() string {
432+ if x != nil {
433+ return x.Name
434+ }
435+ return ""
436+}
437+
438+func (x *SetSecretRequest) GetValue() string {
439+ if x != nil {
440+ return x.Value
441+ }
442+ return ""
443+}
444+
445+// SetSecretResponse describes the stored secret.
446+type SetSecretResponse struct {
447+ state protoimpl.MessageState `protogen:"open.v1"`
448+ // Secret is the secret, without its value.
449+ Secret *Secret `protobuf:"bytes,1,opt,name=secret,proto3" json:"secret,omitempty"`
450+ unknownFields protoimpl.UnknownFields
451+ sizeCache protoimpl.SizeCache
452+}
453+
454+func (x *SetSecretResponse) Reset() {
455+ *x = SetSecretResponse{}
456+ mi := &file_ermite_ci_settings_proto_msgTypes[6]
457+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
458+ ms.StoreMessageInfo(mi)
459+}
460+
461+func (x *SetSecretResponse) String() string {
462+ return protoimpl.X.MessageStringOf(x)
463+}
464+
465+func (*SetSecretResponse) ProtoMessage() {}
466+
467+func (x *SetSecretResponse) ProtoReflect() protoreflect.Message {
468+ mi := &file_ermite_ci_settings_proto_msgTypes[6]
469+ if x != nil {
470+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
471+ if ms.LoadMessageInfo() == nil {
472+ ms.StoreMessageInfo(mi)
473+ }
474+ return ms
475+ }
476+ return mi.MessageOf(x)
477+}
478+
479+// Deprecated: Use SetSecretResponse.ProtoReflect.Descriptor instead.
480+func (*SetSecretResponse) Descriptor() ([]byte, []int) {
481+ return file_ermite_ci_settings_proto_rawDescGZIP(), []int{6}
482+}
483+
484+func (x *SetSecretResponse) GetSecret() *Secret {
485+ if x != nil {
486+ return x.Secret
487+ }
488+ return nil
489+}
490+
491+// ListSecretsRequest selects a page of the secrets of a scope.
492+type ListSecretsRequest struct {
493+ state protoimpl.MessageState `protogen:"open.v1"`
494+ // Scope is the scope to list.
495+ Scope *SettingsScope `protobuf:"bytes,1,opt,name=scope,proto3" json:"scope,omitempty"`
496+ // PageSize is the maximum number of secrets to return. 0 means the server
497+ // default; values above the server maximum are lowered to it.
498+ PageSize int32 `protobuf:"varint,2,opt,name=page_size,json=pageSize,proto3" json:"page_size,omitempty"`
499+ // PageToken is the next_page_token of a previous response. Empty for the
500+ // first page.
501+ PageToken string `protobuf:"bytes,3,opt,name=page_token,json=pageToken,proto3" json:"page_token,omitempty"`
502+ unknownFields protoimpl.UnknownFields
503+ sizeCache protoimpl.SizeCache
504+}
505+
506+func (x *ListSecretsRequest) Reset() {
507+ *x = ListSecretsRequest{}
508+ mi := &file_ermite_ci_settings_proto_msgTypes[7]
509+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
510+ ms.StoreMessageInfo(mi)
511+}
512+
513+func (x *ListSecretsRequest) String() string {
514+ return protoimpl.X.MessageStringOf(x)
515+}
516+
517+func (*ListSecretsRequest) ProtoMessage() {}
518+
519+func (x *ListSecretsRequest) ProtoReflect() protoreflect.Message {
520+ mi := &file_ermite_ci_settings_proto_msgTypes[7]
521+ if x != nil {
522+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
523+ if ms.LoadMessageInfo() == nil {
524+ ms.StoreMessageInfo(mi)
525+ }
526+ return ms
527+ }
528+ return mi.MessageOf(x)
529+}
530+
531+// Deprecated: Use ListSecretsRequest.ProtoReflect.Descriptor instead.
532+func (*ListSecretsRequest) Descriptor() ([]byte, []int) {
533+ return file_ermite_ci_settings_proto_rawDescGZIP(), []int{7}
534+}
535+
536+func (x *ListSecretsRequest) GetScope() *SettingsScope {
537+ if x != nil {
538+ return x.Scope
539+ }
540+ return nil
541+}
542+
543+func (x *ListSecretsRequest) GetPageSize() int32 {
544+ if x != nil {
545+ return x.PageSize
546+ }
547+ return 0
548+}
549+
550+func (x *ListSecretsRequest) GetPageToken() string {
551+ if x != nil {
552+ return x.PageToken
553+ }
554+ return ""
555+}
556+
557+// ListSecretsResponse is one page of secrets.
558+type ListSecretsResponse struct {
559+ state protoimpl.MessageState `protogen:"open.v1"`
560+ // Secrets are the secrets of this page, ordered by name, without values.
561+ Secrets []*Secret `protobuf:"bytes,1,rep,name=secrets,proto3" json:"secrets,omitempty"`
562+ // NextPageToken is passed as page_token to get the next page. Empty when
563+ // there is no next page.
564+ NextPageToken string `protobuf:"bytes,2,opt,name=next_page_token,json=nextPageToken,proto3" json:"next_page_token,omitempty"`
565+ unknownFields protoimpl.UnknownFields
566+ sizeCache protoimpl.SizeCache
567+}
568+
569+func (x *ListSecretsResponse) Reset() {
570+ *x = ListSecretsResponse{}
571+ mi := &file_ermite_ci_settings_proto_msgTypes[8]
572+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
573+ ms.StoreMessageInfo(mi)
574+}
575+
576+func (x *ListSecretsResponse) String() string {
577+ return protoimpl.X.MessageStringOf(x)
578+}
579+
580+func (*ListSecretsResponse) ProtoMessage() {}
581+
582+func (x *ListSecretsResponse) ProtoReflect() protoreflect.Message {
583+ mi := &file_ermite_ci_settings_proto_msgTypes[8]
584+ if x != nil {
585+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
586+ if ms.LoadMessageInfo() == nil {
587+ ms.StoreMessageInfo(mi)
588+ }
589+ return ms
590+ }
591+ return mi.MessageOf(x)
592+}
593+
594+// Deprecated: Use ListSecretsResponse.ProtoReflect.Descriptor instead.
595+func (*ListSecretsResponse) Descriptor() ([]byte, []int) {
596+ return file_ermite_ci_settings_proto_rawDescGZIP(), []int{8}
597+}
598+
599+func (x *ListSecretsResponse) GetSecrets() []*Secret {
600+ if x != nil {
601+ return x.Secrets
602+ }
603+ return nil
604+}
605+
606+func (x *ListSecretsResponse) GetNextPageToken() string {
607+ if x != nil {
608+ return x.NextPageToken
609+ }
610+ return ""
611+}
612+
613+// DeleteSecretRequest names the secret to delete.
614+type DeleteSecretRequest struct {
615+ state protoimpl.MessageState `protogen:"open.v1"`
616+ // Scope is where the secret lives.
617+ Scope *SettingsScope `protobuf:"bytes,1,opt,name=scope,proto3" json:"scope,omitempty"`
618+ // Name is the name of the secret, without regard to case.
619+ Name string `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty"`
620+ unknownFields protoimpl.UnknownFields
621+ sizeCache protoimpl.SizeCache
622+}
623+
624+func (x *DeleteSecretRequest) Reset() {
625+ *x = DeleteSecretRequest{}
626+ mi := &file_ermite_ci_settings_proto_msgTypes[9]
627+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
628+ ms.StoreMessageInfo(mi)
629+}
630+
631+func (x *DeleteSecretRequest) String() string {
632+ return protoimpl.X.MessageStringOf(x)
633+}
634+
635+func (*DeleteSecretRequest) ProtoMessage() {}
636+
637+func (x *DeleteSecretRequest) ProtoReflect() protoreflect.Message {
638+ mi := &file_ermite_ci_settings_proto_msgTypes[9]
639+ if x != nil {
640+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
641+ if ms.LoadMessageInfo() == nil {
642+ ms.StoreMessageInfo(mi)
643+ }
644+ return ms
645+ }
646+ return mi.MessageOf(x)
647+}
648+
649+// Deprecated: Use DeleteSecretRequest.ProtoReflect.Descriptor instead.
650+func (*DeleteSecretRequest) Descriptor() ([]byte, []int) {
651+ return file_ermite_ci_settings_proto_rawDescGZIP(), []int{9}
652+}
653+
654+func (x *DeleteSecretRequest) GetScope() *SettingsScope {
655+ if x != nil {
656+ return x.Scope
657+ }
658+ return nil
659+}
660+
661+func (x *DeleteSecretRequest) GetName() string {
662+ if x != nil {
663+ return x.Name
664+ }
665+ return ""
666+}
667+
668+// DeleteSecretResponse is empty.
669+type DeleteSecretResponse struct {
670+ state protoimpl.MessageState `protogen:"open.v1"`
671+ unknownFields protoimpl.UnknownFields
672+ sizeCache protoimpl.SizeCache
673+}
674+
675+func (x *DeleteSecretResponse) Reset() {
676+ *x = DeleteSecretResponse{}
677+ mi := &file_ermite_ci_settings_proto_msgTypes[10]
678+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
679+ ms.StoreMessageInfo(mi)
680+}
681+
682+func (x *DeleteSecretResponse) String() string {
683+ return protoimpl.X.MessageStringOf(x)
684+}
685+
686+func (*DeleteSecretResponse) ProtoMessage() {}
687+
688+func (x *DeleteSecretResponse) ProtoReflect() protoreflect.Message {
689+ mi := &file_ermite_ci_settings_proto_msgTypes[10]
690+ if x != nil {
691+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
692+ if ms.LoadMessageInfo() == nil {
693+ ms.StoreMessageInfo(mi)
694+ }
695+ return ms
696+ }
697+ return mi.MessageOf(x)
698+}
699+
700+// Deprecated: Use DeleteSecretResponse.ProtoReflect.Descriptor instead.
701+func (*DeleteSecretResponse) Descriptor() ([]byte, []int) {
702+ return file_ermite_ci_settings_proto_rawDescGZIP(), []int{10}
703+}
704+
705+// SetVariableRequest names a variable and gives its value.
706+type SetVariableRequest struct {
707+ state protoimpl.MessageState `protogen:"open.v1"`
708+ // Scope is where the variable lives.
709+ Scope *SettingsScope `protobuf:"bytes,1,opt,name=scope,proto3" json:"scope,omitempty"`
710+ // Name is the name of the variable.
711+ Name string `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty"`
712+ // Value is the value, at most 48 KiB.
713+ Value string `protobuf:"bytes,3,opt,name=value,proto3" json:"value,omitempty"`
714+ unknownFields protoimpl.UnknownFields
715+ sizeCache protoimpl.SizeCache
716+}
717+
718+func (x *SetVariableRequest) Reset() {
719+ *x = SetVariableRequest{}
720+ mi := &file_ermite_ci_settings_proto_msgTypes[11]
721+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
722+ ms.StoreMessageInfo(mi)
723+}
724+
725+func (x *SetVariableRequest) String() string {
726+ return protoimpl.X.MessageStringOf(x)
727+}
728+
729+func (*SetVariableRequest) ProtoMessage() {}
730+
731+func (x *SetVariableRequest) ProtoReflect() protoreflect.Message {
732+ mi := &file_ermite_ci_settings_proto_msgTypes[11]
733+ if x != nil {
734+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
735+ if ms.LoadMessageInfo() == nil {
736+ ms.StoreMessageInfo(mi)
737+ }
738+ return ms
739+ }
740+ return mi.MessageOf(x)
741+}
742+
743+// Deprecated: Use SetVariableRequest.ProtoReflect.Descriptor instead.
744+func (*SetVariableRequest) Descriptor() ([]byte, []int) {
745+ return file_ermite_ci_settings_proto_rawDescGZIP(), []int{11}
746+}
747+
748+func (x *SetVariableRequest) GetScope() *SettingsScope {
749+ if x != nil {
750+ return x.Scope
751+ }
752+ return nil
753+}
754+
755+func (x *SetVariableRequest) GetName() string {
756+ if x != nil {
757+ return x.Name
758+ }
759+ return ""
760+}
761+
762+func (x *SetVariableRequest) GetValue() string {
763+ if x != nil {
764+ return x.Value
765+ }
766+ return ""
767+}
768+
769+// SetVariableResponse holds the stored variable.
770+type SetVariableResponse struct {
771+ state protoimpl.MessageState `protogen:"open.v1"`
772+ // Variable is the variable as stored.
773+ Variable *Variable `protobuf:"bytes,1,opt,name=variable,proto3" json:"variable,omitempty"`
774+ unknownFields protoimpl.UnknownFields
775+ sizeCache protoimpl.SizeCache
776+}
777+
778+func (x *SetVariableResponse) Reset() {
779+ *x = SetVariableResponse{}
780+ mi := &file_ermite_ci_settings_proto_msgTypes[12]
781+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
782+ ms.StoreMessageInfo(mi)
783+}
784+
785+func (x *SetVariableResponse) String() string {
786+ return protoimpl.X.MessageStringOf(x)
787+}
788+
789+func (*SetVariableResponse) ProtoMessage() {}
790+
791+func (x *SetVariableResponse) ProtoReflect() protoreflect.Message {
792+ mi := &file_ermite_ci_settings_proto_msgTypes[12]
793+ if x != nil {
794+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
795+ if ms.LoadMessageInfo() == nil {
796+ ms.StoreMessageInfo(mi)
797+ }
798+ return ms
799+ }
800+ return mi.MessageOf(x)
801+}
802+
803+// Deprecated: Use SetVariableResponse.ProtoReflect.Descriptor instead.
804+func (*SetVariableResponse) Descriptor() ([]byte, []int) {
805+ return file_ermite_ci_settings_proto_rawDescGZIP(), []int{12}
806+}
807+
808+func (x *SetVariableResponse) GetVariable() *Variable {
809+ if x != nil {
810+ return x.Variable
811+ }
812+ return nil
813+}
814+
815+// GetVariableRequest names a variable.
816+type GetVariableRequest struct {
817+ state protoimpl.MessageState `protogen:"open.v1"`
818+ // Scope is where the variable lives.
819+ Scope *SettingsScope `protobuf:"bytes,1,opt,name=scope,proto3" json:"scope,omitempty"`
820+ // Name is the name of the variable, without regard to case.
821+ Name string `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty"`
822+ unknownFields protoimpl.UnknownFields
823+ sizeCache protoimpl.SizeCache
824+}
825+
826+func (x *GetVariableRequest) Reset() {
827+ *x = GetVariableRequest{}
828+ mi := &file_ermite_ci_settings_proto_msgTypes[13]
829+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
830+ ms.StoreMessageInfo(mi)
831+}
832+
833+func (x *GetVariableRequest) String() string {
834+ return protoimpl.X.MessageStringOf(x)
835+}
836+
837+func (*GetVariableRequest) ProtoMessage() {}
838+
839+func (x *GetVariableRequest) ProtoReflect() protoreflect.Message {
840+ mi := &file_ermite_ci_settings_proto_msgTypes[13]
841+ if x != nil {
842+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
843+ if ms.LoadMessageInfo() == nil {
844+ ms.StoreMessageInfo(mi)
845+ }
846+ return ms
847+ }
848+ return mi.MessageOf(x)
849+}
850+
851+// Deprecated: Use GetVariableRequest.ProtoReflect.Descriptor instead.
852+func (*GetVariableRequest) Descriptor() ([]byte, []int) {
853+ return file_ermite_ci_settings_proto_rawDescGZIP(), []int{13}
854+}
855+
856+func (x *GetVariableRequest) GetScope() *SettingsScope {
857+ if x != nil {
858+ return x.Scope
859+ }
860+ return nil
861+}
862+
863+func (x *GetVariableRequest) GetName() string {
864+ if x != nil {
865+ return x.Name
866+ }
867+ return ""
868+}
869+
870+// GetVariableResponse holds a variable.
871+type GetVariableResponse struct {
872+ state protoimpl.MessageState `protogen:"open.v1"`
873+ // Variable is the variable.
874+ Variable *Variable `protobuf:"bytes,1,opt,name=variable,proto3" json:"variable,omitempty"`
875+ unknownFields protoimpl.UnknownFields
876+ sizeCache protoimpl.SizeCache
877+}
878+
879+func (x *GetVariableResponse) Reset() {
880+ *x = GetVariableResponse{}
881+ mi := &file_ermite_ci_settings_proto_msgTypes[14]
882+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
883+ ms.StoreMessageInfo(mi)
884+}
885+
886+func (x *GetVariableResponse) String() string {
887+ return protoimpl.X.MessageStringOf(x)
888+}
889+
890+func (*GetVariableResponse) ProtoMessage() {}
891+
892+func (x *GetVariableResponse) ProtoReflect() protoreflect.Message {
893+ mi := &file_ermite_ci_settings_proto_msgTypes[14]
894+ if x != nil {
895+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
896+ if ms.LoadMessageInfo() == nil {
897+ ms.StoreMessageInfo(mi)
898+ }
899+ return ms
900+ }
901+ return mi.MessageOf(x)
902+}
903+
904+// Deprecated: Use GetVariableResponse.ProtoReflect.Descriptor instead.
905+func (*GetVariableResponse) Descriptor() ([]byte, []int) {
906+ return file_ermite_ci_settings_proto_rawDescGZIP(), []int{14}
907+}
908+
909+func (x *GetVariableResponse) GetVariable() *Variable {
910+ if x != nil {
911+ return x.Variable
912+ }
913+ return nil
914+}
915+
916+// ListVariablesRequest selects a page of the variables of a scope.
917+type ListVariablesRequest struct {
918+ state protoimpl.MessageState `protogen:"open.v1"`
919+ // Scope is the scope to list.
920+ Scope *SettingsScope `protobuf:"bytes,1,opt,name=scope,proto3" json:"scope,omitempty"`
921+ // PageSize is the maximum number of variables to return. 0 means the server
922+ // default; values above the server maximum are lowered to it.
923+ PageSize int32 `protobuf:"varint,2,opt,name=page_size,json=pageSize,proto3" json:"page_size,omitempty"`
924+ // PageToken is the next_page_token of a previous response. Empty for the
925+ // first page.
926+ PageToken string `protobuf:"bytes,3,opt,name=page_token,json=pageToken,proto3" json:"page_token,omitempty"`
927+ unknownFields protoimpl.UnknownFields
928+ sizeCache protoimpl.SizeCache
929+}
930+
931+func (x *ListVariablesRequest) Reset() {
932+ *x = ListVariablesRequest{}
933+ mi := &file_ermite_ci_settings_proto_msgTypes[15]
934+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
935+ ms.StoreMessageInfo(mi)
936+}
937+
938+func (x *ListVariablesRequest) String() string {
939+ return protoimpl.X.MessageStringOf(x)
940+}
941+
942+func (*ListVariablesRequest) ProtoMessage() {}
943+
944+func (x *ListVariablesRequest) ProtoReflect() protoreflect.Message {
945+ mi := &file_ermite_ci_settings_proto_msgTypes[15]
946+ if x != nil {
947+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
948+ if ms.LoadMessageInfo() == nil {
949+ ms.StoreMessageInfo(mi)
950+ }
951+ return ms
952+ }
953+ return mi.MessageOf(x)
954+}
955+
956+// Deprecated: Use ListVariablesRequest.ProtoReflect.Descriptor instead.
957+func (*ListVariablesRequest) Descriptor() ([]byte, []int) {
958+ return file_ermite_ci_settings_proto_rawDescGZIP(), []int{15}
959+}
960+
961+func (x *ListVariablesRequest) GetScope() *SettingsScope {
962+ if x != nil {
963+ return x.Scope
964+ }
965+ return nil
966+}
967+
968+func (x *ListVariablesRequest) GetPageSize() int32 {
969+ if x != nil {
970+ return x.PageSize
971+ }
972+ return 0
973+}
974+
975+func (x *ListVariablesRequest) GetPageToken() string {
976+ if x != nil {
977+ return x.PageToken
978+ }
979+ return ""
980+}
981+
982+// ListVariablesResponse is one page of variables.
983+type ListVariablesResponse struct {
984+ state protoimpl.MessageState `protogen:"open.v1"`
985+ // Variables are the variables of this page, ordered by name.
986+ Variables []*Variable `protobuf:"bytes,1,rep,name=variables,proto3" json:"variables,omitempty"`
987+ // NextPageToken is passed as page_token to get the next page. Empty when
988+ // there is no next page.
989+ NextPageToken string `protobuf:"bytes,2,opt,name=next_page_token,json=nextPageToken,proto3" json:"next_page_token,omitempty"`
990+ unknownFields protoimpl.UnknownFields
991+ sizeCache protoimpl.SizeCache
992+}
993+
994+func (x *ListVariablesResponse) Reset() {
995+ *x = ListVariablesResponse{}
996+ mi := &file_ermite_ci_settings_proto_msgTypes[16]
997+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
998+ ms.StoreMessageInfo(mi)
999+}
1000+
1001+func (x *ListVariablesResponse) String() string {
1002+ return protoimpl.X.MessageStringOf(x)
1003+}
1004+
1005+func (*ListVariablesResponse) ProtoMessage() {}
1006+
1007+func (x *ListVariablesResponse) ProtoReflect() protoreflect.Message {
1008+ mi := &file_ermite_ci_settings_proto_msgTypes[16]
1009+ if x != nil {
1010+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
1011+ if ms.LoadMessageInfo() == nil {
1012+ ms.StoreMessageInfo(mi)
1013+ }
1014+ return ms
1015+ }
1016+ return mi.MessageOf(x)
1017+}
1018+
1019+// Deprecated: Use ListVariablesResponse.ProtoReflect.Descriptor instead.
1020+func (*ListVariablesResponse) Descriptor() ([]byte, []int) {
1021+ return file_ermite_ci_settings_proto_rawDescGZIP(), []int{16}
1022+}
1023+
1024+func (x *ListVariablesResponse) GetVariables() []*Variable {
1025+ if x != nil {
1026+ return x.Variables
1027+ }
1028+ return nil
1029+}
1030+
1031+func (x *ListVariablesResponse) GetNextPageToken() string {
1032+ if x != nil {
1033+ return x.NextPageToken
1034+ }
1035+ return ""
1036+}
1037+
1038+// DeleteVariableRequest names the variable to delete.
1039+type DeleteVariableRequest struct {
1040+ state protoimpl.MessageState `protogen:"open.v1"`
1041+ // Scope is where the variable lives.
1042+ Scope *SettingsScope `protobuf:"bytes,1,opt,name=scope,proto3" json:"scope,omitempty"`
1043+ // Name is the name of the variable, without regard to case.
1044+ Name string `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty"`
1045+ unknownFields protoimpl.UnknownFields
1046+ sizeCache protoimpl.SizeCache
1047+}
1048+
1049+func (x *DeleteVariableRequest) Reset() {
1050+ *x = DeleteVariableRequest{}
1051+ mi := &file_ermite_ci_settings_proto_msgTypes[17]
1052+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
1053+ ms.StoreMessageInfo(mi)
1054+}
1055+
1056+func (x *DeleteVariableRequest) String() string {
1057+ return protoimpl.X.MessageStringOf(x)
1058+}
1059+
1060+func (*DeleteVariableRequest) ProtoMessage() {}
1061+
1062+func (x *DeleteVariableRequest) ProtoReflect() protoreflect.Message {
1063+ mi := &file_ermite_ci_settings_proto_msgTypes[17]
1064+ if x != nil {
1065+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
1066+ if ms.LoadMessageInfo() == nil {
1067+ ms.StoreMessageInfo(mi)
1068+ }
1069+ return ms
1070+ }
1071+ return mi.MessageOf(x)
1072+}
1073+
1074+// Deprecated: Use DeleteVariableRequest.ProtoReflect.Descriptor instead.
1075+func (*DeleteVariableRequest) Descriptor() ([]byte, []int) {
1076+ return file_ermite_ci_settings_proto_rawDescGZIP(), []int{17}
1077+}
1078+
1079+func (x *DeleteVariableRequest) GetScope() *SettingsScope {
1080+ if x != nil {
1081+ return x.Scope
1082+ }
1083+ return nil
1084+}
1085+
1086+func (x *DeleteVariableRequest) GetName() string {
1087+ if x != nil {
1088+ return x.Name
1089+ }
1090+ return ""
1091+}
1092+
1093+// DeleteVariableResponse is empty.
1094+type DeleteVariableResponse struct {
1095+ state protoimpl.MessageState `protogen:"open.v1"`
1096+ unknownFields protoimpl.UnknownFields
1097+ sizeCache protoimpl.SizeCache
1098+}
1099+
1100+func (x *DeleteVariableResponse) Reset() {
1101+ *x = DeleteVariableResponse{}
1102+ mi := &file_ermite_ci_settings_proto_msgTypes[18]
1103+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
1104+ ms.StoreMessageInfo(mi)
1105+}
1106+
1107+func (x *DeleteVariableResponse) String() string {
1108+ return protoimpl.X.MessageStringOf(x)
1109+}
1110+
1111+func (*DeleteVariableResponse) ProtoMessage() {}
1112+
1113+func (x *DeleteVariableResponse) ProtoReflect() protoreflect.Message {
1114+ mi := &file_ermite_ci_settings_proto_msgTypes[18]
1115+ if x != nil {
1116+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
1117+ if ms.LoadMessageInfo() == nil {
1118+ ms.StoreMessageInfo(mi)
1119+ }
1120+ return ms
1121+ }
1122+ return mi.MessageOf(x)
1123+}
1124+
1125+// Deprecated: Use DeleteVariableResponse.ProtoReflect.Descriptor instead.
1126+func (*DeleteVariableResponse) Descriptor() ([]byte, []int) {
1127+ return file_ermite_ci_settings_proto_rawDescGZIP(), []int{18}
1128+}
1129+
1130+// CreateEnvironmentRequest names the environment to create.
1131+type CreateEnvironmentRequest struct {
1132+ state protoimpl.MessageState `protogen:"open.v1"`
1133+ // Repo is the repository name.
1134+ Repo string `protobuf:"bytes,1,opt,name=repo,proto3" json:"repo,omitempty"`
1135+ // Name is the name of the environment, see Environment.name.
1136+ Name string `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty"`
1137+ unknownFields protoimpl.UnknownFields
1138+ sizeCache protoimpl.SizeCache
1139+}
1140+
1141+func (x *CreateEnvironmentRequest) Reset() {
1142+ *x = CreateEnvironmentRequest{}
1143+ mi := &file_ermite_ci_settings_proto_msgTypes[19]
1144+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
1145+ ms.StoreMessageInfo(mi)
1146+}
1147+
1148+func (x *CreateEnvironmentRequest) String() string {
1149+ return protoimpl.X.MessageStringOf(x)
1150+}
1151+
1152+func (*CreateEnvironmentRequest) ProtoMessage() {}
1153+
1154+func (x *CreateEnvironmentRequest) ProtoReflect() protoreflect.Message {
1155+ mi := &file_ermite_ci_settings_proto_msgTypes[19]
1156+ if x != nil {
1157+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
1158+ if ms.LoadMessageInfo() == nil {
1159+ ms.StoreMessageInfo(mi)
1160+ }
1161+ return ms
1162+ }
1163+ return mi.MessageOf(x)
1164+}
1165+
1166+// Deprecated: Use CreateEnvironmentRequest.ProtoReflect.Descriptor instead.
1167+func (*CreateEnvironmentRequest) Descriptor() ([]byte, []int) {
1168+ return file_ermite_ci_settings_proto_rawDescGZIP(), []int{19}
1169+}
1170+
1171+func (x *CreateEnvironmentRequest) GetRepo() string {
1172+ if x != nil {
1173+ return x.Repo
1174+ }
1175+ return ""
1176+}
1177+
1178+func (x *CreateEnvironmentRequest) GetName() string {
1179+ if x != nil {
1180+ return x.Name
1181+ }
1182+ return ""
1183+}
1184+
1185+// CreateEnvironmentResponse holds the environment.
1186+type CreateEnvironmentResponse struct {
1187+ state protoimpl.MessageState `protogen:"open.v1"`
1188+ // Environment is the environment, new or existing.
1189+ Environment *Environment `protobuf:"bytes,1,opt,name=environment,proto3" json:"environment,omitempty"`
1190+ unknownFields protoimpl.UnknownFields
1191+ sizeCache protoimpl.SizeCache
1192+}
1193+
1194+func (x *CreateEnvironmentResponse) Reset() {
1195+ *x = CreateEnvironmentResponse{}
1196+ mi := &file_ermite_ci_settings_proto_msgTypes[20]
1197+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
1198+ ms.StoreMessageInfo(mi)
1199+}
1200+
1201+func (x *CreateEnvironmentResponse) String() string {
1202+ return protoimpl.X.MessageStringOf(x)
1203+}
1204+
1205+func (*CreateEnvironmentResponse) ProtoMessage() {}
1206+
1207+func (x *CreateEnvironmentResponse) ProtoReflect() protoreflect.Message {
1208+ mi := &file_ermite_ci_settings_proto_msgTypes[20]
1209+ if x != nil {
1210+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
1211+ if ms.LoadMessageInfo() == nil {
1212+ ms.StoreMessageInfo(mi)
1213+ }
1214+ return ms
1215+ }
1216+ return mi.MessageOf(x)
1217+}
1218+
1219+// Deprecated: Use CreateEnvironmentResponse.ProtoReflect.Descriptor instead.
1220+func (*CreateEnvironmentResponse) Descriptor() ([]byte, []int) {
1221+ return file_ermite_ci_settings_proto_rawDescGZIP(), []int{20}
1222+}
1223+
1224+func (x *CreateEnvironmentResponse) GetEnvironment() *Environment {
1225+ if x != nil {
1226+ return x.Environment
1227+ }
1228+ return nil
1229+}
1230+
1231+// ListEnvironmentsRequest selects a page of the environments of a repository.
1232+type ListEnvironmentsRequest struct {
1233+ state protoimpl.MessageState `protogen:"open.v1"`
1234+ // Repo is the repository name.
1235+ Repo string `protobuf:"bytes,1,opt,name=repo,proto3" json:"repo,omitempty"`
1236+ // PageSize is the maximum number of environments to return. 0 means the
1237+ // server default; values above the server maximum are lowered to it.
1238+ PageSize int32 `protobuf:"varint,2,opt,name=page_size,json=pageSize,proto3" json:"page_size,omitempty"`
1239+ // PageToken is the next_page_token of a previous response. Empty for the
1240+ // first page.
1241+ PageToken string `protobuf:"bytes,3,opt,name=page_token,json=pageToken,proto3" json:"page_token,omitempty"`
1242+ unknownFields protoimpl.UnknownFields
1243+ sizeCache protoimpl.SizeCache
1244+}
1245+
1246+func (x *ListEnvironmentsRequest) Reset() {
1247+ *x = ListEnvironmentsRequest{}
1248+ mi := &file_ermite_ci_settings_proto_msgTypes[21]
1249+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
1250+ ms.StoreMessageInfo(mi)
1251+}
1252+
1253+func (x *ListEnvironmentsRequest) String() string {
1254+ return protoimpl.X.MessageStringOf(x)
1255+}
1256+
1257+func (*ListEnvironmentsRequest) ProtoMessage() {}
1258+
1259+func (x *ListEnvironmentsRequest) ProtoReflect() protoreflect.Message {
1260+ mi := &file_ermite_ci_settings_proto_msgTypes[21]
1261+ if x != nil {
1262+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
1263+ if ms.LoadMessageInfo() == nil {
1264+ ms.StoreMessageInfo(mi)
1265+ }
1266+ return ms
1267+ }
1268+ return mi.MessageOf(x)
1269+}
1270+
1271+// Deprecated: Use ListEnvironmentsRequest.ProtoReflect.Descriptor instead.
1272+func (*ListEnvironmentsRequest) Descriptor() ([]byte, []int) {
1273+ return file_ermite_ci_settings_proto_rawDescGZIP(), []int{21}
1274+}
1275+
1276+func (x *ListEnvironmentsRequest) GetRepo() string {
1277+ if x != nil {
1278+ return x.Repo
1279+ }
1280+ return ""
1281+}
1282+
1283+func (x *ListEnvironmentsRequest) GetPageSize() int32 {
1284+ if x != nil {
1285+ return x.PageSize
1286+ }
1287+ return 0
1288+}
1289+
1290+func (x *ListEnvironmentsRequest) GetPageToken() string {
1291+ if x != nil {
1292+ return x.PageToken
1293+ }
1294+ return ""
1295+}
1296+
1297+// ListEnvironmentsResponse is one page of environments.
1298+type ListEnvironmentsResponse struct {
1299+ state protoimpl.MessageState `protogen:"open.v1"`
1300+ // Environments are the environments of this page, ordered by name.
1301+ Environments []*Environment `protobuf:"bytes,1,rep,name=environments,proto3" json:"environments,omitempty"`
1302+ // NextPageToken is passed as page_token to get the next page. Empty when
1303+ // there is no next page.
1304+ NextPageToken string `protobuf:"bytes,2,opt,name=next_page_token,json=nextPageToken,proto3" json:"next_page_token,omitempty"`
1305+ unknownFields protoimpl.UnknownFields
1306+ sizeCache protoimpl.SizeCache
1307+}
1308+
1309+func (x *ListEnvironmentsResponse) Reset() {
1310+ *x = ListEnvironmentsResponse{}
1311+ mi := &file_ermite_ci_settings_proto_msgTypes[22]
1312+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
1313+ ms.StoreMessageInfo(mi)
1314+}
1315+
1316+func (x *ListEnvironmentsResponse) String() string {
1317+ return protoimpl.X.MessageStringOf(x)
1318+}
1319+
1320+func (*ListEnvironmentsResponse) ProtoMessage() {}
1321+
1322+func (x *ListEnvironmentsResponse) ProtoReflect() protoreflect.Message {
1323+ mi := &file_ermite_ci_settings_proto_msgTypes[22]
1324+ if x != nil {
1325+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
1326+ if ms.LoadMessageInfo() == nil {
1327+ ms.StoreMessageInfo(mi)
1328+ }
1329+ return ms
1330+ }
1331+ return mi.MessageOf(x)
1332+}
1333+
1334+// Deprecated: Use ListEnvironmentsResponse.ProtoReflect.Descriptor instead.
1335+func (*ListEnvironmentsResponse) Descriptor() ([]byte, []int) {
1336+ return file_ermite_ci_settings_proto_rawDescGZIP(), []int{22}
1337+}
1338+
1339+func (x *ListEnvironmentsResponse) GetEnvironments() []*Environment {
1340+ if x != nil {
1341+ return x.Environments
1342+ }
1343+ return nil
1344+}
1345+
1346+func (x *ListEnvironmentsResponse) GetNextPageToken() string {
1347+ if x != nil {
1348+ return x.NextPageToken
1349+ }
1350+ return ""
1351+}
1352+
1353+// DeleteEnvironmentRequest names the environment to delete.
1354+type DeleteEnvironmentRequest struct {
1355+ state protoimpl.MessageState `protogen:"open.v1"`
1356+ // Repo is the repository name.
1357+ Repo string `protobuf:"bytes,1,opt,name=repo,proto3" json:"repo,omitempty"`
1358+ // Name is the name of the environment, without regard to case.
1359+ Name string `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty"`
1360+ unknownFields protoimpl.UnknownFields
1361+ sizeCache protoimpl.SizeCache
1362+}
1363+
1364+func (x *DeleteEnvironmentRequest) Reset() {
1365+ *x = DeleteEnvironmentRequest{}
1366+ mi := &file_ermite_ci_settings_proto_msgTypes[23]
1367+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
1368+ ms.StoreMessageInfo(mi)
1369+}
1370+
1371+func (x *DeleteEnvironmentRequest) String() string {
1372+ return protoimpl.X.MessageStringOf(x)
1373+}
1374+
1375+func (*DeleteEnvironmentRequest) ProtoMessage() {}
1376+
1377+func (x *DeleteEnvironmentRequest) ProtoReflect() protoreflect.Message {
1378+ mi := &file_ermite_ci_settings_proto_msgTypes[23]
1379+ if x != nil {
1380+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
1381+ if ms.LoadMessageInfo() == nil {
1382+ ms.StoreMessageInfo(mi)
1383+ }
1384+ return ms
1385+ }
1386+ return mi.MessageOf(x)
1387+}
1388+
1389+// Deprecated: Use DeleteEnvironmentRequest.ProtoReflect.Descriptor instead.
1390+func (*DeleteEnvironmentRequest) Descriptor() ([]byte, []int) {
1391+ return file_ermite_ci_settings_proto_rawDescGZIP(), []int{23}
1392+}
1393+
1394+func (x *DeleteEnvironmentRequest) GetRepo() string {
1395+ if x != nil {
1396+ return x.Repo
1397+ }
1398+ return ""
1399+}
1400+
1401+func (x *DeleteEnvironmentRequest) GetName() string {
1402+ if x != nil {
1403+ return x.Name
1404+ }
1405+ return ""
1406+}
1407+
1408+// DeleteEnvironmentResponse is empty.
1409+type DeleteEnvironmentResponse struct {
1410+ state protoimpl.MessageState `protogen:"open.v1"`
1411+ unknownFields protoimpl.UnknownFields
1412+ sizeCache protoimpl.SizeCache
1413+}
1414+
1415+func (x *DeleteEnvironmentResponse) Reset() {
1416+ *x = DeleteEnvironmentResponse{}
1417+ mi := &file_ermite_ci_settings_proto_msgTypes[24]
1418+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
1419+ ms.StoreMessageInfo(mi)
1420+}
1421+
1422+func (x *DeleteEnvironmentResponse) String() string {
1423+ return protoimpl.X.MessageStringOf(x)
1424+}
1425+
1426+func (*DeleteEnvironmentResponse) ProtoMessage() {}
1427+
1428+func (x *DeleteEnvironmentResponse) ProtoReflect() protoreflect.Message {
1429+ mi := &file_ermite_ci_settings_proto_msgTypes[24]
1430+ if x != nil {
1431+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
1432+ if ms.LoadMessageInfo() == nil {
1433+ ms.StoreMessageInfo(mi)
1434+ }
1435+ return ms
1436+ }
1437+ return mi.MessageOf(x)
1438+}
1439+
1440+// Deprecated: Use DeleteEnvironmentResponse.ProtoReflect.Descriptor instead.
1441+func (*DeleteEnvironmentResponse) Descriptor() ([]byte, []int) {
1442+ return file_ermite_ci_settings_proto_rawDescGZIP(), []int{24}
1443+}
1444+
1445+var File_ermite_ci_settings_proto protoreflect.FileDescriptor
1446+
1447+const file_ermite_ci_settings_proto_rawDesc = "" +
1448+ "\n" +
1449+ "\x18ermite/ci_settings.proto\x12\x06ermite\x1a\x1fgoogle/protobuf/timestamp.proto\"\x88\x01\n" +
1450+ "\rSettingsScope\x12\x1c\n" +
1451+ "\binstance\x18\x01 \x01(\bH\x00R\binstance\x12\x14\n" +
1452+ "\x04repo\x18\x02 \x01(\tH\x00R\x04repo\x12:\n" +
1453+ "\venvironment\x18\x03 \x01(\v2\x16.ermite.EnvironmentRefH\x00R\venvironmentB\a\n" +
1454+ "\x05where\"8\n" +
1455+ "\x0eEnvironmentRef\x12\x12\n" +
1456+ "\x04repo\x18\x01 \x01(\tR\x04repo\x12\x12\n" +
1457+ "\x04name\x18\x02 \x01(\tR\x04name\"W\n" +
1458+ "\x06Secret\x12\x12\n" +
1459+ "\x04name\x18\x01 \x01(\tR\x04name\x129\n" +
1460+ "\n" +
1461+ "updated_at\x18\x02 \x01(\v2\x1a.google.protobuf.TimestampR\tupdatedAt\"o\n" +
1462+ "\bVariable\x12\x12\n" +
1463+ "\x04name\x18\x01 \x01(\tR\x04name\x12\x14\n" +
1464+ "\x05value\x18\x02 \x01(\tR\x05value\x129\n" +
1465+ "\n" +
1466+ "updated_at\x18\x03 \x01(\v2\x1a.google.protobuf.TimestampR\tupdatedAt\"p\n" +
1467+ "\vEnvironment\x12\x12\n" +
1468+ "\x04repo\x18\x01 \x01(\tR\x04repo\x12\x12\n" +
1469+ "\x04name\x18\x02 \x01(\tR\x04name\x129\n" +
1470+ "\n" +
1471+ "created_at\x18\x03 \x01(\v2\x1a.google.protobuf.TimestampR\tcreatedAt\"i\n" +
1472+ "\x10SetSecretRequest\x12+\n" +
1473+ "\x05scope\x18\x01 \x01(\v2\x15.ermite.SettingsScopeR\x05scope\x12\x12\n" +
1474+ "\x04name\x18\x02 \x01(\tR\x04name\x12\x14\n" +
1475+ "\x05value\x18\x03 \x01(\tR\x05value\";\n" +
1476+ "\x11SetSecretResponse\x12&\n" +
1477+ "\x06secret\x18\x01 \x01(\v2\x0e.ermite.SecretR\x06secret\"}\n" +
1478+ "\x12ListSecretsRequest\x12+\n" +
1479+ "\x05scope\x18\x01 \x01(\v2\x15.ermite.SettingsScopeR\x05scope\x12\x1b\n" +
1480+ "\tpage_size\x18\x02 \x01(\x05R\bpageSize\x12\x1d\n" +
1481+ "\n" +
1482+ "page_token\x18\x03 \x01(\tR\tpageToken\"g\n" +
1483+ "\x13ListSecretsResponse\x12(\n" +
1484+ "\asecrets\x18\x01 \x03(\v2\x0e.ermite.SecretR\asecrets\x12&\n" +
1485+ "\x0fnext_page_token\x18\x02 \x01(\tR\rnextPageToken\"V\n" +
1486+ "\x13DeleteSecretRequest\x12+\n" +
1487+ "\x05scope\x18\x01 \x01(\v2\x15.ermite.SettingsScopeR\x05scope\x12\x12\n" +
1488+ "\x04name\x18\x02 \x01(\tR\x04name\"\x16\n" +
1489+ "\x14DeleteSecretResponse\"k\n" +
1490+ "\x12SetVariableRequest\x12+\n" +
1491+ "\x05scope\x18\x01 \x01(\v2\x15.ermite.SettingsScopeR\x05scope\x12\x12\n" +
1492+ "\x04name\x18\x02 \x01(\tR\x04name\x12\x14\n" +
1493+ "\x05value\x18\x03 \x01(\tR\x05value\"C\n" +
1494+ "\x13SetVariableResponse\x12,\n" +
1495+ "\bvariable\x18\x01 \x01(\v2\x10.ermite.VariableR\bvariable\"U\n" +
1496+ "\x12GetVariableRequest\x12+\n" +
1497+ "\x05scope\x18\x01 \x01(\v2\x15.ermite.SettingsScopeR\x05scope\x12\x12\n" +
1498+ "\x04name\x18\x02 \x01(\tR\x04name\"C\n" +
1499+ "\x13GetVariableResponse\x12,\n" +
1500+ "\bvariable\x18\x01 \x01(\v2\x10.ermite.VariableR\bvariable\"\x7f\n" +
1501+ "\x14ListVariablesRequest\x12+\n" +
1502+ "\x05scope\x18\x01 \x01(\v2\x15.ermite.SettingsScopeR\x05scope\x12\x1b\n" +
1503+ "\tpage_size\x18\x02 \x01(\x05R\bpageSize\x12\x1d\n" +
1504+ "\n" +
1505+ "page_token\x18\x03 \x01(\tR\tpageToken\"o\n" +
1506+ "\x15ListVariablesResponse\x12.\n" +
1507+ "\tvariables\x18\x01 \x03(\v2\x10.ermite.VariableR\tvariables\x12&\n" +
1508+ "\x0fnext_page_token\x18\x02 \x01(\tR\rnextPageToken\"X\n" +
1509+ "\x15DeleteVariableRequest\x12+\n" +
1510+ "\x05scope\x18\x01 \x01(\v2\x15.ermite.SettingsScopeR\x05scope\x12\x12\n" +
1511+ "\x04name\x18\x02 \x01(\tR\x04name\"\x18\n" +
1512+ "\x16DeleteVariableResponse\"B\n" +
1513+ "\x18CreateEnvironmentRequest\x12\x12\n" +
1514+ "\x04repo\x18\x01 \x01(\tR\x04repo\x12\x12\n" +
1515+ "\x04name\x18\x02 \x01(\tR\x04name\"R\n" +
1516+ "\x19CreateEnvironmentResponse\x125\n" +
1517+ "\venvironment\x18\x01 \x01(\v2\x13.ermite.EnvironmentR\venvironment\"i\n" +
1518+ "\x17ListEnvironmentsRequest\x12\x12\n" +
1519+ "\x04repo\x18\x01 \x01(\tR\x04repo\x12\x1b\n" +
1520+ "\tpage_size\x18\x02 \x01(\x05R\bpageSize\x12\x1d\n" +
1521+ "\n" +
1522+ "page_token\x18\x03 \x01(\tR\tpageToken\"{\n" +
1523+ "\x18ListEnvironmentsResponse\x127\n" +
1524+ "\fenvironments\x18\x01 \x03(\v2\x13.ermite.EnvironmentR\fenvironments\x12&\n" +
1525+ "\x0fnext_page_token\x18\x02 \x01(\tR\rnextPageToken\"B\n" +
1526+ "\x18DeleteEnvironmentRequest\x12\x12\n" +
1527+ "\x04repo\x18\x01 \x01(\tR\x04repo\x12\x12\n" +
1528+ "\x04name\x18\x02 \x01(\tR\x04name\"\x1b\n" +
1529+ "\x19DeleteEnvironmentResponse2\xe4\x01\n" +
1530+ "\rSecretService\x12@\n" +
1531+ "\tSetSecret\x12\x18.ermite.SetSecretRequest\x1a\x19.ermite.SetSecretResponse\x12F\n" +
1532+ "\vListSecrets\x12\x1a.ermite.ListSecretsRequest\x1a\x1b.ermite.ListSecretsResponse\x12I\n" +
1533+ "\fDeleteSecret\x12\x1b.ermite.DeleteSecretRequest\x1a\x1c.ermite.DeleteSecretResponse2\xc0\x02\n" +
1534+ "\x0fVariableService\x12F\n" +
1535+ "\vSetVariable\x12\x1a.ermite.SetVariableRequest\x1a\x1b.ermite.SetVariableResponse\x12F\n" +
1536+ "\vGetVariable\x12\x1a.ermite.GetVariableRequest\x1a\x1b.ermite.GetVariableResponse\x12L\n" +
1537+ "\rListVariables\x12\x1c.ermite.ListVariablesRequest\x1a\x1d.ermite.ListVariablesResponse\x12O\n" +
1538+ "\x0eDeleteVariable\x12\x1d.ermite.DeleteVariableRequest\x1a\x1e.ermite.DeleteVariableResponse2\x9f\x02\n" +
1539+ "\x12EnvironmentService\x12X\n" +
1540+ "\x11CreateEnvironment\x12 .ermite.CreateEnvironmentRequest\x1a!.ermite.CreateEnvironmentResponse\x12U\n" +
1541+ "\x10ListEnvironments\x12\x1f.ermite.ListEnvironmentsRequest\x1a .ermite.ListEnvironmentsResponse\x12X\n" +
1542+ "\x11DeleteEnvironment\x12 .ermite.DeleteEnvironmentRequest\x1a!.ermite.DeleteEnvironmentResponseBv\n" +
1543+ "\n" +
1544+ "com.ermiteB\x0fCiSettingsProtoP\x01Z\x1fbnema.dev/ermite-api/gen/ermite\xa2\x02\x03EXX\xaa\x02\x06Ermite\xca\x02\x06Ermite\xe2\x02\x12Ermite\\GPBMetadata\xea\x02\x06Ermiteb\x06proto3"
1545+
1546+var (
1547+ file_ermite_ci_settings_proto_rawDescOnce sync.Once
1548+ file_ermite_ci_settings_proto_rawDescData []byte
1549+)
1550+
1551+func file_ermite_ci_settings_proto_rawDescGZIP() []byte {
1552+ file_ermite_ci_settings_proto_rawDescOnce.Do(func() {
1553+ file_ermite_ci_settings_proto_rawDescData = protoimpl.X.CompressGZIP(unsafe.Slice(unsafe.StringData(file_ermite_ci_settings_proto_rawDesc), len(file_ermite_ci_settings_proto_rawDesc)))
1554+ })
1555+ return file_ermite_ci_settings_proto_rawDescData
1556+}
1557+
1558+var file_ermite_ci_settings_proto_msgTypes = make([]protoimpl.MessageInfo, 25)
1559+var file_ermite_ci_settings_proto_goTypes = []any{
1560+ (*SettingsScope)(nil), // 0: ermite.SettingsScope
1561+ (*EnvironmentRef)(nil), // 1: ermite.EnvironmentRef
1562+ (*Secret)(nil), // 2: ermite.Secret
1563+ (*Variable)(nil), // 3: ermite.Variable
1564+ (*Environment)(nil), // 4: ermite.Environment
1565+ (*SetSecretRequest)(nil), // 5: ermite.SetSecretRequest
1566+ (*SetSecretResponse)(nil), // 6: ermite.SetSecretResponse
1567+ (*ListSecretsRequest)(nil), // 7: ermite.ListSecretsRequest
1568+ (*ListSecretsResponse)(nil), // 8: ermite.ListSecretsResponse
1569+ (*DeleteSecretRequest)(nil), // 9: ermite.DeleteSecretRequest
1570+ (*DeleteSecretResponse)(nil), // 10: ermite.DeleteSecretResponse
1571+ (*SetVariableRequest)(nil), // 11: ermite.SetVariableRequest
1572+ (*SetVariableResponse)(nil), // 12: ermite.SetVariableResponse
1573+ (*GetVariableRequest)(nil), // 13: ermite.GetVariableRequest
1574+ (*GetVariableResponse)(nil), // 14: ermite.GetVariableResponse
1575+ (*ListVariablesRequest)(nil), // 15: ermite.ListVariablesRequest
1576+ (*ListVariablesResponse)(nil), // 16: ermite.ListVariablesResponse
1577+ (*DeleteVariableRequest)(nil), // 17: ermite.DeleteVariableRequest
1578+ (*DeleteVariableResponse)(nil), // 18: ermite.DeleteVariableResponse
1579+ (*CreateEnvironmentRequest)(nil), // 19: ermite.CreateEnvironmentRequest
1580+ (*CreateEnvironmentResponse)(nil), // 20: ermite.CreateEnvironmentResponse
1581+ (*ListEnvironmentsRequest)(nil), // 21: ermite.ListEnvironmentsRequest
1582+ (*ListEnvironmentsResponse)(nil), // 22: ermite.ListEnvironmentsResponse
1583+ (*DeleteEnvironmentRequest)(nil), // 23: ermite.DeleteEnvironmentRequest
1584+ (*DeleteEnvironmentResponse)(nil), // 24: ermite.DeleteEnvironmentResponse
1585+ (*timestamppb.Timestamp)(nil), // 25: google.protobuf.Timestamp
1586+}
1587+var file_ermite_ci_settings_proto_depIdxs = []int32{
1588+ 1, // 0: ermite.SettingsScope.environment:type_name -> ermite.EnvironmentRef
1589+ 25, // 1: ermite.Secret.updated_at:type_name -> google.protobuf.Timestamp
1590+ 25, // 2: ermite.Variable.updated_at:type_name -> google.protobuf.Timestamp
1591+ 25, // 3: ermite.Environment.created_at:type_name -> google.protobuf.Timestamp
1592+ 0, // 4: ermite.SetSecretRequest.scope:type_name -> ermite.SettingsScope
1593+ 2, // 5: ermite.SetSecretResponse.secret:type_name -> ermite.Secret
1594+ 0, // 6: ermite.ListSecretsRequest.scope:type_name -> ermite.SettingsScope
1595+ 2, // 7: ermite.ListSecretsResponse.secrets:type_name -> ermite.Secret
1596+ 0, // 8: ermite.DeleteSecretRequest.scope:type_name -> ermite.SettingsScope
1597+ 0, // 9: ermite.SetVariableRequest.scope:type_name -> ermite.SettingsScope
1598+ 3, // 10: ermite.SetVariableResponse.variable:type_name -> ermite.Variable
1599+ 0, // 11: ermite.GetVariableRequest.scope:type_name -> ermite.SettingsScope
1600+ 3, // 12: ermite.GetVariableResponse.variable:type_name -> ermite.Variable
1601+ 0, // 13: ermite.ListVariablesRequest.scope:type_name -> ermite.SettingsScope
1602+ 3, // 14: ermite.ListVariablesResponse.variables:type_name -> ermite.Variable
1603+ 0, // 15: ermite.DeleteVariableRequest.scope:type_name -> ermite.SettingsScope
1604+ 4, // 16: ermite.CreateEnvironmentResponse.environment:type_name -> ermite.Environment
1605+ 4, // 17: ermite.ListEnvironmentsResponse.environments:type_name -> ermite.Environment
1606+ 5, // 18: ermite.SecretService.SetSecret:input_type -> ermite.SetSecretRequest
1607+ 7, // 19: ermite.SecretService.ListSecrets:input_type -> ermite.ListSecretsRequest
1608+ 9, // 20: ermite.SecretService.DeleteSecret:input_type -> ermite.DeleteSecretRequest
1609+ 11, // 21: ermite.VariableService.SetVariable:input_type -> ermite.SetVariableRequest
1610+ 13, // 22: ermite.VariableService.GetVariable:input_type -> ermite.GetVariableRequest
1611+ 15, // 23: ermite.VariableService.ListVariables:input_type -> ermite.ListVariablesRequest
1612+ 17, // 24: ermite.VariableService.DeleteVariable:input_type -> ermite.DeleteVariableRequest
1613+ 19, // 25: ermite.EnvironmentService.CreateEnvironment:input_type -> ermite.CreateEnvironmentRequest
1614+ 21, // 26: ermite.EnvironmentService.ListEnvironments:input_type -> ermite.ListEnvironmentsRequest
1615+ 23, // 27: ermite.EnvironmentService.DeleteEnvironment:input_type -> ermite.DeleteEnvironmentRequest
1616+ 6, // 28: ermite.SecretService.SetSecret:output_type -> ermite.SetSecretResponse
1617+ 8, // 29: ermite.SecretService.ListSecrets:output_type -> ermite.ListSecretsResponse
1618+ 10, // 30: ermite.SecretService.DeleteSecret:output_type -> ermite.DeleteSecretResponse
1619+ 12, // 31: ermite.VariableService.SetVariable:output_type -> ermite.SetVariableResponse
1620+ 14, // 32: ermite.VariableService.GetVariable:output_type -> ermite.GetVariableResponse
1621+ 16, // 33: ermite.VariableService.ListVariables:output_type -> ermite.ListVariablesResponse
1622+ 18, // 34: ermite.VariableService.DeleteVariable:output_type -> ermite.DeleteVariableResponse
1623+ 20, // 35: ermite.EnvironmentService.CreateEnvironment:output_type -> ermite.CreateEnvironmentResponse
1624+ 22, // 36: ermite.EnvironmentService.ListEnvironments:output_type -> ermite.ListEnvironmentsResponse
1625+ 24, // 37: ermite.EnvironmentService.DeleteEnvironment:output_type -> ermite.DeleteEnvironmentResponse
1626+ 28, // [28:38] is the sub-list for method output_type
1627+ 18, // [18:28] is the sub-list for method input_type
1628+ 18, // [18:18] is the sub-list for extension type_name
1629+ 18, // [18:18] is the sub-list for extension extendee
1630+ 0, // [0:18] is the sub-list for field type_name
1631+}
1632+
1633+func init() { file_ermite_ci_settings_proto_init() }
1634+func file_ermite_ci_settings_proto_init() {
1635+ if File_ermite_ci_settings_proto != nil {
1636+ return
1637+ }
1638+ file_ermite_ci_settings_proto_msgTypes[0].OneofWrappers = []any{
1639+ (*SettingsScope_Instance)(nil),
1640+ (*SettingsScope_Repo)(nil),
1641+ (*SettingsScope_Environment)(nil),
1642+ }
1643+ type x struct{}
1644+ out := protoimpl.TypeBuilder{
1645+ File: protoimpl.DescBuilder{
1646+ GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
1647+ RawDescriptor: unsafe.Slice(unsafe.StringData(file_ermite_ci_settings_proto_rawDesc), len(file_ermite_ci_settings_proto_rawDesc)),
1648+ NumEnums: 0,
1649+ NumMessages: 25,
1650+ NumExtensions: 0,
1651+ NumServices: 3,
1652+ },
1653+ GoTypes: file_ermite_ci_settings_proto_goTypes,
1654+ DependencyIndexes: file_ermite_ci_settings_proto_depIdxs,
1655+ MessageInfos: file_ermite_ci_settings_proto_msgTypes,
1656+ }.Build()
1657+ File_ermite_ci_settings_proto = out.File
1658+ file_ermite_ci_settings_proto_goTypes = nil
1659+ file_ermite_ci_settings_proto_depIdxs = nil
1660+}
A gen/ermite/ermiteconnect/ci_settings.connect.go +515 -0
@@ -0,0 +1,515 @@
1+// SPDX-License-Identifier: MIT
2+
3+// Code generated by protoc-gen-connect-go. DO NOT EDIT.
4+//
5+// Source: ermite/ci_settings.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+ // SecretServiceName is the fully-qualified name of the SecretService service.
27+ SecretServiceName = "ermite.SecretService"
28+ // VariableServiceName is the fully-qualified name of the VariableService service.
29+ VariableServiceName = "ermite.VariableService"
30+ // EnvironmentServiceName is the fully-qualified name of the EnvironmentService service.
31+ EnvironmentServiceName = "ermite.EnvironmentService"
32+)
33+
34+// These constants are the fully-qualified names of the RPCs defined in this package. They're
35+// exposed at runtime as Spec.Procedure and as the final two segments of the HTTP route.
36+//
37+// Note that these are different from the fully-qualified method names used by
38+// google.golang.org/protobuf/reflect/protoreflect. To convert from these constants to
39+// reflection-formatted method names, remove the leading slash and convert the remaining slash to a
40+// period.
41+const (
42+ // SecretServiceSetSecretProcedure is the fully-qualified name of the SecretService's SetSecret RPC.
43+ SecretServiceSetSecretProcedure = "/ermite.SecretService/SetSecret"
44+ // SecretServiceListSecretsProcedure is the fully-qualified name of the SecretService's ListSecrets
45+ // RPC.
46+ SecretServiceListSecretsProcedure = "/ermite.SecretService/ListSecrets"
47+ // SecretServiceDeleteSecretProcedure is the fully-qualified name of the SecretService's
48+ // DeleteSecret RPC.
49+ SecretServiceDeleteSecretProcedure = "/ermite.SecretService/DeleteSecret"
50+ // VariableServiceSetVariableProcedure is the fully-qualified name of the VariableService's
51+ // SetVariable RPC.
52+ VariableServiceSetVariableProcedure = "/ermite.VariableService/SetVariable"
53+ // VariableServiceGetVariableProcedure is the fully-qualified name of the VariableService's
54+ // GetVariable RPC.
55+ VariableServiceGetVariableProcedure = "/ermite.VariableService/GetVariable"
56+ // VariableServiceListVariablesProcedure is the fully-qualified name of the VariableService's
57+ // ListVariables RPC.
58+ VariableServiceListVariablesProcedure = "/ermite.VariableService/ListVariables"
59+ // VariableServiceDeleteVariableProcedure is the fully-qualified name of the VariableService's
60+ // DeleteVariable RPC.
61+ VariableServiceDeleteVariableProcedure = "/ermite.VariableService/DeleteVariable"
62+ // EnvironmentServiceCreateEnvironmentProcedure is the fully-qualified name of the
63+ // EnvironmentService's CreateEnvironment RPC.
64+ EnvironmentServiceCreateEnvironmentProcedure = "/ermite.EnvironmentService/CreateEnvironment"
65+ // EnvironmentServiceListEnvironmentsProcedure is the fully-qualified name of the
66+ // EnvironmentService's ListEnvironments RPC.
67+ EnvironmentServiceListEnvironmentsProcedure = "/ermite.EnvironmentService/ListEnvironments"
68+ // EnvironmentServiceDeleteEnvironmentProcedure is the fully-qualified name of the
69+ // EnvironmentService's DeleteEnvironment RPC.
70+ EnvironmentServiceDeleteEnvironmentProcedure = "/ermite.EnvironmentService/DeleteEnvironment"
71+)
72+
73+// SecretServiceClient is a client for the ermite.SecretService service.
74+type SecretServiceClient interface {
75+ // SetSecret creates the secret or replaces its value. Fails with
76+ // invalid_argument if the name is not valid, if the value is empty or longer
77+ // than 48 KiB (49,152 bytes), or if scope is not set, with not_found if the
78+ // environment of the scope does not exist, and with failed_precondition if
79+ // the server has no encryption key.
80+ SetSecret(context.Context, *connect.Request[ermite.SetSecretRequest]) (*connect.Response[ermite.SetSecretResponse], error)
81+ // ListSecrets lists the secrets of one scope, ordered by name. It lists only
82+ // the secrets set in that scope, not the ones the scope inherits. It never
83+ // returns values.
84+ ListSecrets(context.Context, *connect.Request[ermite.ListSecretsRequest]) (*connect.Response[ermite.ListSecretsResponse], error)
85+ // DeleteSecret deletes a secret. Fails with not_found if it does not exist.
86+ DeleteSecret(context.Context, *connect.Request[ermite.DeleteSecretRequest]) (*connect.Response[ermite.DeleteSecretResponse], error)
87+}
88+
89+// NewSecretServiceClient constructs a client for the ermite.SecretService service. By default, it
90+// uses the Connect protocol with the binary Protobuf Codec, asks for gzipped responses, and sends
91+// uncompressed requests. To use the gRPC or gRPC-Web protocols, supply the connect.WithGRPC() or
92+// connect.WithGRPCWeb() options.
93+//
94+// The URL supplied here should be the base URL for the Connect or gRPC server (for example,
95+// http://api.acme.com or https://acme.com/grpc).
96+func NewSecretServiceClient(httpClient connect.HTTPClient, baseURL string, opts ...connect.ClientOption) SecretServiceClient {
97+ baseURL = strings.TrimRight(baseURL, "/")
98+ secretServiceMethods := ermite.File_ermite_ci_settings_proto.Services().ByName("SecretService").Methods()
99+ return &secretServiceClient{
100+ setSecret: connect.NewClient[ermite.SetSecretRequest, ermite.SetSecretResponse](
101+ httpClient,
102+ baseURL+SecretServiceSetSecretProcedure,
103+ connect.WithSchema(secretServiceMethods.ByName("SetSecret")),
104+ connect.WithClientOptions(opts...),
105+ ),
106+ listSecrets: connect.NewClient[ermite.ListSecretsRequest, ermite.ListSecretsResponse](
107+ httpClient,
108+ baseURL+SecretServiceListSecretsProcedure,
109+ connect.WithSchema(secretServiceMethods.ByName("ListSecrets")),
110+ connect.WithClientOptions(opts...),
111+ ),
112+ deleteSecret: connect.NewClient[ermite.DeleteSecretRequest, ermite.DeleteSecretResponse](
113+ httpClient,
114+ baseURL+SecretServiceDeleteSecretProcedure,
115+ connect.WithSchema(secretServiceMethods.ByName("DeleteSecret")),
116+ connect.WithClientOptions(opts...),
117+ ),
118+ }
119+}
120+
121+// secretServiceClient implements SecretServiceClient.
122+type secretServiceClient struct {
123+ setSecret *connect.Client[ermite.SetSecretRequest, ermite.SetSecretResponse]
124+ listSecrets *connect.Client[ermite.ListSecretsRequest, ermite.ListSecretsResponse]
125+ deleteSecret *connect.Client[ermite.DeleteSecretRequest, ermite.DeleteSecretResponse]
126+}
127+
128+// SetSecret calls ermite.SecretService.SetSecret.
129+func (c *secretServiceClient) SetSecret(ctx context.Context, req *connect.Request[ermite.SetSecretRequest]) (*connect.Response[ermite.SetSecretResponse], error) {
130+ return c.setSecret.CallUnary(ctx, req)
131+}
132+
133+// ListSecrets calls ermite.SecretService.ListSecrets.
134+func (c *secretServiceClient) ListSecrets(ctx context.Context, req *connect.Request[ermite.ListSecretsRequest]) (*connect.Response[ermite.ListSecretsResponse], error) {
135+ return c.listSecrets.CallUnary(ctx, req)
136+}
137+
138+// DeleteSecret calls ermite.SecretService.DeleteSecret.
139+func (c *secretServiceClient) DeleteSecret(ctx context.Context, req *connect.Request[ermite.DeleteSecretRequest]) (*connect.Response[ermite.DeleteSecretResponse], error) {
140+ return c.deleteSecret.CallUnary(ctx, req)
141+}
142+
143+// SecretServiceHandler is an implementation of the ermite.SecretService service.
144+type SecretServiceHandler interface {
145+ // SetSecret creates the secret or replaces its value. Fails with
146+ // invalid_argument if the name is not valid, if the value is empty or longer
147+ // than 48 KiB (49,152 bytes), or if scope is not set, with not_found if the
148+ // environment of the scope does not exist, and with failed_precondition if
149+ // the server has no encryption key.
150+ SetSecret(context.Context, *connect.Request[ermite.SetSecretRequest]) (*connect.Response[ermite.SetSecretResponse], error)
151+ // ListSecrets lists the secrets of one scope, ordered by name. It lists only
152+ // the secrets set in that scope, not the ones the scope inherits. It never
153+ // returns values.
154+ ListSecrets(context.Context, *connect.Request[ermite.ListSecretsRequest]) (*connect.Response[ermite.ListSecretsResponse], error)
155+ // DeleteSecret deletes a secret. Fails with not_found if it does not exist.
156+ DeleteSecret(context.Context, *connect.Request[ermite.DeleteSecretRequest]) (*connect.Response[ermite.DeleteSecretResponse], error)
157+}
158+
159+// NewSecretServiceHandler builds an HTTP handler from the service implementation. It returns the
160+// path on which to mount the handler and the handler itself.
161+//
162+// By default, handlers support the Connect, gRPC, and gRPC-Web protocols with the binary Protobuf
163+// and JSON codecs. They also support gzip compression.
164+func NewSecretServiceHandler(svc SecretServiceHandler, opts ...connect.HandlerOption) (string, http.Handler) {
165+ secretServiceMethods := ermite.File_ermite_ci_settings_proto.Services().ByName("SecretService").Methods()
166+ secretServiceSetSecretHandler := connect.NewUnaryHandler(
167+ SecretServiceSetSecretProcedure,
168+ svc.SetSecret,
169+ connect.WithSchema(secretServiceMethods.ByName("SetSecret")),
170+ connect.WithHandlerOptions(opts...),
171+ )
172+ secretServiceListSecretsHandler := connect.NewUnaryHandler(
173+ SecretServiceListSecretsProcedure,
174+ svc.ListSecrets,
175+ connect.WithSchema(secretServiceMethods.ByName("ListSecrets")),
176+ connect.WithHandlerOptions(opts...),
177+ )
178+ secretServiceDeleteSecretHandler := connect.NewUnaryHandler(
179+ SecretServiceDeleteSecretProcedure,
180+ svc.DeleteSecret,
181+ connect.WithSchema(secretServiceMethods.ByName("DeleteSecret")),
182+ connect.WithHandlerOptions(opts...),
183+ )
184+ return "/ermite.SecretService/", http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {
185+ switch r.URL.Path {
186+ case SecretServiceSetSecretProcedure:
187+ secretServiceSetSecretHandler.ServeHTTP(w, r)
188+ case SecretServiceListSecretsProcedure:
189+ secretServiceListSecretsHandler.ServeHTTP(w, r)
190+ case SecretServiceDeleteSecretProcedure:
191+ secretServiceDeleteSecretHandler.ServeHTTP(w, r)
192+ default:
193+ http.NotFound(w, r)
194+ }
195+ })
196+}
197+
198+// UnimplementedSecretServiceHandler returns CodeUnimplemented from all methods.
199+type UnimplementedSecretServiceHandler struct{}
200+
201+func (UnimplementedSecretServiceHandler) SetSecret(context.Context, *connect.Request[ermite.SetSecretRequest]) (*connect.Response[ermite.SetSecretResponse], error) {
202+ return nil, connect.NewError(connect.CodeUnimplemented, errors.New("ermite.SecretService.SetSecret is not implemented"))
203+}
204+
205+func (UnimplementedSecretServiceHandler) ListSecrets(context.Context, *connect.Request[ermite.ListSecretsRequest]) (*connect.Response[ermite.ListSecretsResponse], error) {
206+ return nil, connect.NewError(connect.CodeUnimplemented, errors.New("ermite.SecretService.ListSecrets is not implemented"))
207+}
208+
209+func (UnimplementedSecretServiceHandler) DeleteSecret(context.Context, *connect.Request[ermite.DeleteSecretRequest]) (*connect.Response[ermite.DeleteSecretResponse], error) {
210+ return nil, connect.NewError(connect.CodeUnimplemented, errors.New("ermite.SecretService.DeleteSecret is not implemented"))
211+}
212+
213+// VariableServiceClient is a client for the ermite.VariableService service.
214+type VariableServiceClient interface {
215+ // SetVariable creates the variable or replaces its value. Fails with
216+ // invalid_argument if the name is not valid, if the value is longer than 48
217+ // KiB (49,152 bytes) or if scope is not set, and with not_found if the
218+ // environment of the scope does not exist. An empty value is allowed.
219+ SetVariable(context.Context, *connect.Request[ermite.SetVariableRequest]) (*connect.Response[ermite.SetVariableResponse], error)
220+ // GetVariable returns one variable of one scope, with its value. Fails with
221+ // not_found if it does not exist in that scope.
222+ GetVariable(context.Context, *connect.Request[ermite.GetVariableRequest]) (*connect.Response[ermite.GetVariableResponse], error)
223+ // ListVariables lists the variables of one scope, ordered by name, with
224+ // their values. It lists only the variables set in that scope.
225+ ListVariables(context.Context, *connect.Request[ermite.ListVariablesRequest]) (*connect.Response[ermite.ListVariablesResponse], error)
226+ // DeleteVariable deletes a variable. Fails with not_found if it does not
227+ // exist.
228+ DeleteVariable(context.Context, *connect.Request[ermite.DeleteVariableRequest]) (*connect.Response[ermite.DeleteVariableResponse], error)
229+}
230+
231+// NewVariableServiceClient constructs a client for the ermite.VariableService service. By default,
232+// it uses the Connect protocol with the binary Protobuf Codec, asks for gzipped responses, and
233+// sends uncompressed requests. To use the gRPC or gRPC-Web protocols, supply the connect.WithGRPC()
234+// or connect.WithGRPCWeb() options.
235+//
236+// The URL supplied here should be the base URL for the Connect or gRPC server (for example,
237+// http://api.acme.com or https://acme.com/grpc).
238+func NewVariableServiceClient(httpClient connect.HTTPClient, baseURL string, opts ...connect.ClientOption) VariableServiceClient {
239+ baseURL = strings.TrimRight(baseURL, "/")
240+ variableServiceMethods := ermite.File_ermite_ci_settings_proto.Services().ByName("VariableService").Methods()
241+ return &variableServiceClient{
242+ setVariable: connect.NewClient[ermite.SetVariableRequest, ermite.SetVariableResponse](
243+ httpClient,
244+ baseURL+VariableServiceSetVariableProcedure,
245+ connect.WithSchema(variableServiceMethods.ByName("SetVariable")),
246+ connect.WithClientOptions(opts...),
247+ ),
248+ getVariable: connect.NewClient[ermite.GetVariableRequest, ermite.GetVariableResponse](
249+ httpClient,
250+ baseURL+VariableServiceGetVariableProcedure,
251+ connect.WithSchema(variableServiceMethods.ByName("GetVariable")),
252+ connect.WithClientOptions(opts...),
253+ ),
254+ listVariables: connect.NewClient[ermite.ListVariablesRequest, ermite.ListVariablesResponse](
255+ httpClient,
256+ baseURL+VariableServiceListVariablesProcedure,
257+ connect.WithSchema(variableServiceMethods.ByName("ListVariables")),
258+ connect.WithClientOptions(opts...),
259+ ),
260+ deleteVariable: connect.NewClient[ermite.DeleteVariableRequest, ermite.DeleteVariableResponse](
261+ httpClient,
262+ baseURL+VariableServiceDeleteVariableProcedure,
263+ connect.WithSchema(variableServiceMethods.ByName("DeleteVariable")),
264+ connect.WithClientOptions(opts...),
265+ ),
266+ }
267+}
268+
269+// variableServiceClient implements VariableServiceClient.
270+type variableServiceClient struct {
271+ setVariable *connect.Client[ermite.SetVariableRequest, ermite.SetVariableResponse]
272+ getVariable *connect.Client[ermite.GetVariableRequest, ermite.GetVariableResponse]
273+ listVariables *connect.Client[ermite.ListVariablesRequest, ermite.ListVariablesResponse]
274+ deleteVariable *connect.Client[ermite.DeleteVariableRequest, ermite.DeleteVariableResponse]
275+}
276+
277+// SetVariable calls ermite.VariableService.SetVariable.
278+func (c *variableServiceClient) SetVariable(ctx context.Context, req *connect.Request[ermite.SetVariableRequest]) (*connect.Response[ermite.SetVariableResponse], error) {
279+ return c.setVariable.CallUnary(ctx, req)
280+}
281+
282+// GetVariable calls ermite.VariableService.GetVariable.
283+func (c *variableServiceClient) GetVariable(ctx context.Context, req *connect.Request[ermite.GetVariableRequest]) (*connect.Response[ermite.GetVariableResponse], error) {
284+ return c.getVariable.CallUnary(ctx, req)
285+}
286+
287+// ListVariables calls ermite.VariableService.ListVariables.
288+func (c *variableServiceClient) ListVariables(ctx context.Context, req *connect.Request[ermite.ListVariablesRequest]) (*connect.Response[ermite.ListVariablesResponse], error) {
289+ return c.listVariables.CallUnary(ctx, req)
290+}
291+
292+// DeleteVariable calls ermite.VariableService.DeleteVariable.
293+func (c *variableServiceClient) DeleteVariable(ctx context.Context, req *connect.Request[ermite.DeleteVariableRequest]) (*connect.Response[ermite.DeleteVariableResponse], error) {
294+ return c.deleteVariable.CallUnary(ctx, req)
295+}
296+
297+// VariableServiceHandler is an implementation of the ermite.VariableService service.
298+type VariableServiceHandler interface {
299+ // SetVariable creates the variable or replaces its value. Fails with
300+ // invalid_argument if the name is not valid, if the value is longer than 48
301+ // KiB (49,152 bytes) or if scope is not set, and with not_found if the
302+ // environment of the scope does not exist. An empty value is allowed.
303+ SetVariable(context.Context, *connect.Request[ermite.SetVariableRequest]) (*connect.Response[ermite.SetVariableResponse], error)
304+ // GetVariable returns one variable of one scope, with its value. Fails with
305+ // not_found if it does not exist in that scope.
306+ GetVariable(context.Context, *connect.Request[ermite.GetVariableRequest]) (*connect.Response[ermite.GetVariableResponse], error)
307+ // ListVariables lists the variables of one scope, ordered by name, with
308+ // their values. It lists only the variables set in that scope.
309+ ListVariables(context.Context, *connect.Request[ermite.ListVariablesRequest]) (*connect.Response[ermite.ListVariablesResponse], error)
310+ // DeleteVariable deletes a variable. Fails with not_found if it does not
311+ // exist.
312+ DeleteVariable(context.Context, *connect.Request[ermite.DeleteVariableRequest]) (*connect.Response[ermite.DeleteVariableResponse], error)
313+}
314+
315+// NewVariableServiceHandler builds an HTTP handler from the service implementation. It returns the
316+// path on which to mount the handler and the handler itself.
317+//
318+// By default, handlers support the Connect, gRPC, and gRPC-Web protocols with the binary Protobuf
319+// and JSON codecs. They also support gzip compression.
320+func NewVariableServiceHandler(svc VariableServiceHandler, opts ...connect.HandlerOption) (string, http.Handler) {
321+ variableServiceMethods := ermite.File_ermite_ci_settings_proto.Services().ByName("VariableService").Methods()
322+ variableServiceSetVariableHandler := connect.NewUnaryHandler(
323+ VariableServiceSetVariableProcedure,
324+ svc.SetVariable,
325+ connect.WithSchema(variableServiceMethods.ByName("SetVariable")),
326+ connect.WithHandlerOptions(opts...),
327+ )
328+ variableServiceGetVariableHandler := connect.NewUnaryHandler(
329+ VariableServiceGetVariableProcedure,
330+ svc.GetVariable,
331+ connect.WithSchema(variableServiceMethods.ByName("GetVariable")),
332+ connect.WithHandlerOptions(opts...),
333+ )
334+ variableServiceListVariablesHandler := connect.NewUnaryHandler(
335+ VariableServiceListVariablesProcedure,
336+ svc.ListVariables,
337+ connect.WithSchema(variableServiceMethods.ByName("ListVariables")),
338+ connect.WithHandlerOptions(opts...),
339+ )
340+ variableServiceDeleteVariableHandler := connect.NewUnaryHandler(
341+ VariableServiceDeleteVariableProcedure,
342+ svc.DeleteVariable,
343+ connect.WithSchema(variableServiceMethods.ByName("DeleteVariable")),
344+ connect.WithHandlerOptions(opts...),
345+ )
346+ return "/ermite.VariableService/", http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {
347+ switch r.URL.Path {
348+ case VariableServiceSetVariableProcedure:
349+ variableServiceSetVariableHandler.ServeHTTP(w, r)
350+ case VariableServiceGetVariableProcedure:
351+ variableServiceGetVariableHandler.ServeHTTP(w, r)
352+ case VariableServiceListVariablesProcedure:
353+ variableServiceListVariablesHandler.ServeHTTP(w, r)
354+ case VariableServiceDeleteVariableProcedure:
355+ variableServiceDeleteVariableHandler.ServeHTTP(w, r)
356+ default:
357+ http.NotFound(w, r)
358+ }
359+ })
360+}
361+
362+// UnimplementedVariableServiceHandler returns CodeUnimplemented from all methods.
363+type UnimplementedVariableServiceHandler struct{}
364+
365+func (UnimplementedVariableServiceHandler) SetVariable(context.Context, *connect.Request[ermite.SetVariableRequest]) (*connect.Response[ermite.SetVariableResponse], error) {
366+ return nil, connect.NewError(connect.CodeUnimplemented, errors.New("ermite.VariableService.SetVariable is not implemented"))
367+}
368+
369+func (UnimplementedVariableServiceHandler) GetVariable(context.Context, *connect.Request[ermite.GetVariableRequest]) (*connect.Response[ermite.GetVariableResponse], error) {
370+ return nil, connect.NewError(connect.CodeUnimplemented, errors.New("ermite.VariableService.GetVariable is not implemented"))
371+}
372+
373+func (UnimplementedVariableServiceHandler) ListVariables(context.Context, *connect.Request[ermite.ListVariablesRequest]) (*connect.Response[ermite.ListVariablesResponse], error) {
374+ return nil, connect.NewError(connect.CodeUnimplemented, errors.New("ermite.VariableService.ListVariables is not implemented"))
375+}
376+
377+func (UnimplementedVariableServiceHandler) DeleteVariable(context.Context, *connect.Request[ermite.DeleteVariableRequest]) (*connect.Response[ermite.DeleteVariableResponse], error) {
378+ return nil, connect.NewError(connect.CodeUnimplemented, errors.New("ermite.VariableService.DeleteVariable is not implemented"))
379+}
380+
381+// EnvironmentServiceClient is a client for the ermite.EnvironmentService service.
382+type EnvironmentServiceClient interface {
383+ // CreateEnvironment creates an environment. It succeeds and changes nothing
384+ // if the environment already exists (without regard to case), as GitHub's
385+ // create-or-update does. Fails with invalid_argument if the name is not
386+ // valid and with not_found if the repository does not exist.
387+ CreateEnvironment(context.Context, *connect.Request[ermite.CreateEnvironmentRequest]) (*connect.Response[ermite.CreateEnvironmentResponse], error)
388+ // ListEnvironments lists the environments of a repository, ordered by name.
389+ ListEnvironments(context.Context, *connect.Request[ermite.ListEnvironmentsRequest]) (*connect.Response[ermite.ListEnvironmentsResponse], error)
390+ // DeleteEnvironment deletes an environment with its secrets and variables.
391+ // Fails with not_found if it does not exist.
392+ DeleteEnvironment(context.Context, *connect.Request[ermite.DeleteEnvironmentRequest]) (*connect.Response[ermite.DeleteEnvironmentResponse], error)
393+}
394+
395+// NewEnvironmentServiceClient constructs a client for the ermite.EnvironmentService service. By
396+// default, it uses the Connect protocol with the binary Protobuf Codec, asks for gzipped responses,
397+// and sends uncompressed requests. To use the gRPC or gRPC-Web protocols, supply the
398+// connect.WithGRPC() or connect.WithGRPCWeb() options.
399+//
400+// The URL supplied here should be the base URL for the Connect or gRPC server (for example,
401+// http://api.acme.com or https://acme.com/grpc).
402+func NewEnvironmentServiceClient(httpClient connect.HTTPClient, baseURL string, opts ...connect.ClientOption) EnvironmentServiceClient {
403+ baseURL = strings.TrimRight(baseURL, "/")
404+ environmentServiceMethods := ermite.File_ermite_ci_settings_proto.Services().ByName("EnvironmentService").Methods()
405+ return &environmentServiceClient{
406+ createEnvironment: connect.NewClient[ermite.CreateEnvironmentRequest, ermite.CreateEnvironmentResponse](
407+ httpClient,
408+ baseURL+EnvironmentServiceCreateEnvironmentProcedure,
409+ connect.WithSchema(environmentServiceMethods.ByName("CreateEnvironment")),
410+ connect.WithClientOptions(opts...),
411+ ),
412+ listEnvironments: connect.NewClient[ermite.ListEnvironmentsRequest, ermite.ListEnvironmentsResponse](
413+ httpClient,
414+ baseURL+EnvironmentServiceListEnvironmentsProcedure,
415+ connect.WithSchema(environmentServiceMethods.ByName("ListEnvironments")),
416+ connect.WithClientOptions(opts...),
417+ ),
418+ deleteEnvironment: connect.NewClient[ermite.DeleteEnvironmentRequest, ermite.DeleteEnvironmentResponse](
419+ httpClient,
420+ baseURL+EnvironmentServiceDeleteEnvironmentProcedure,
421+ connect.WithSchema(environmentServiceMethods.ByName("DeleteEnvironment")),
422+ connect.WithClientOptions(opts...),
423+ ),
424+ }
425+}
426+
427+// environmentServiceClient implements EnvironmentServiceClient.
428+type environmentServiceClient struct {
429+ createEnvironment *connect.Client[ermite.CreateEnvironmentRequest, ermite.CreateEnvironmentResponse]
430+ listEnvironments *connect.Client[ermite.ListEnvironmentsRequest, ermite.ListEnvironmentsResponse]
431+ deleteEnvironment *connect.Client[ermite.DeleteEnvironmentRequest, ermite.DeleteEnvironmentResponse]
432+}
433+
434+// CreateEnvironment calls ermite.EnvironmentService.CreateEnvironment.
435+func (c *environmentServiceClient) CreateEnvironment(ctx context.Context, req *connect.Request[ermite.CreateEnvironmentRequest]) (*connect.Response[ermite.CreateEnvironmentResponse], error) {
436+ return c.createEnvironment.CallUnary(ctx, req)
437+}
438+
439+// ListEnvironments calls ermite.EnvironmentService.ListEnvironments.
440+func (c *environmentServiceClient) ListEnvironments(ctx context.Context, req *connect.Request[ermite.ListEnvironmentsRequest]) (*connect.Response[ermite.ListEnvironmentsResponse], error) {
441+ return c.listEnvironments.CallUnary(ctx, req)
442+}
443+
444+// DeleteEnvironment calls ermite.EnvironmentService.DeleteEnvironment.
445+func (c *environmentServiceClient) DeleteEnvironment(ctx context.Context, req *connect.Request[ermite.DeleteEnvironmentRequest]) (*connect.Response[ermite.DeleteEnvironmentResponse], error) {
446+ return c.deleteEnvironment.CallUnary(ctx, req)
447+}
448+
449+// EnvironmentServiceHandler is an implementation of the ermite.EnvironmentService service.
450+type EnvironmentServiceHandler interface {
451+ // CreateEnvironment creates an environment. It succeeds and changes nothing
452+ // if the environment already exists (without regard to case), as GitHub's
453+ // create-or-update does. Fails with invalid_argument if the name is not
454+ // valid and with not_found if the repository does not exist.
455+ CreateEnvironment(context.Context, *connect.Request[ermite.CreateEnvironmentRequest]) (*connect.Response[ermite.CreateEnvironmentResponse], error)
456+ // ListEnvironments lists the environments of a repository, ordered by name.
457+ ListEnvironments(context.Context, *connect.Request[ermite.ListEnvironmentsRequest]) (*connect.Response[ermite.ListEnvironmentsResponse], error)
458+ // DeleteEnvironment deletes an environment with its secrets and variables.
459+ // Fails with not_found if it does not exist.
460+ DeleteEnvironment(context.Context, *connect.Request[ermite.DeleteEnvironmentRequest]) (*connect.Response[ermite.DeleteEnvironmentResponse], error)
461+}
462+
463+// NewEnvironmentServiceHandler builds an HTTP handler from the service implementation. It returns
464+// the path on which to mount the handler and the handler itself.
465+//
466+// By default, handlers support the Connect, gRPC, and gRPC-Web protocols with the binary Protobuf
467+// and JSON codecs. They also support gzip compression.
468+func NewEnvironmentServiceHandler(svc EnvironmentServiceHandler, opts ...connect.HandlerOption) (string, http.Handler) {
469+ environmentServiceMethods := ermite.File_ermite_ci_settings_proto.Services().ByName("EnvironmentService").Methods()
470+ environmentServiceCreateEnvironmentHandler := connect.NewUnaryHandler(
471+ EnvironmentServiceCreateEnvironmentProcedure,
472+ svc.CreateEnvironment,
473+ connect.WithSchema(environmentServiceMethods.ByName("CreateEnvironment")),
474+ connect.WithHandlerOptions(opts...),
475+ )
476+ environmentServiceListEnvironmentsHandler := connect.NewUnaryHandler(
477+ EnvironmentServiceListEnvironmentsProcedure,
478+ svc.ListEnvironments,
479+ connect.WithSchema(environmentServiceMethods.ByName("ListEnvironments")),
480+ connect.WithHandlerOptions(opts...),
481+ )
482+ environmentServiceDeleteEnvironmentHandler := connect.NewUnaryHandler(
483+ EnvironmentServiceDeleteEnvironmentProcedure,
484+ svc.DeleteEnvironment,
485+ connect.WithSchema(environmentServiceMethods.ByName("DeleteEnvironment")),
486+ connect.WithHandlerOptions(opts...),
487+ )
488+ return "/ermite.EnvironmentService/", http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {
489+ switch r.URL.Path {
490+ case EnvironmentServiceCreateEnvironmentProcedure:
491+ environmentServiceCreateEnvironmentHandler.ServeHTTP(w, r)
492+ case EnvironmentServiceListEnvironmentsProcedure:
493+ environmentServiceListEnvironmentsHandler.ServeHTTP(w, r)
494+ case EnvironmentServiceDeleteEnvironmentProcedure:
495+ environmentServiceDeleteEnvironmentHandler.ServeHTTP(w, r)
496+ default:
497+ http.NotFound(w, r)
498+ }
499+ })
500+}
501+
502+// UnimplementedEnvironmentServiceHandler returns CodeUnimplemented from all methods.
503+type UnimplementedEnvironmentServiceHandler struct{}
504+
505+func (UnimplementedEnvironmentServiceHandler) CreateEnvironment(context.Context, *connect.Request[ermite.CreateEnvironmentRequest]) (*connect.Response[ermite.CreateEnvironmentResponse], error) {
506+ return nil, connect.NewError(connect.CodeUnimplemented, errors.New("ermite.EnvironmentService.CreateEnvironment is not implemented"))
507+}
508+
509+func (UnimplementedEnvironmentServiceHandler) ListEnvironments(context.Context, *connect.Request[ermite.ListEnvironmentsRequest]) (*connect.Response[ermite.ListEnvironmentsResponse], error) {
510+ return nil, connect.NewError(connect.CodeUnimplemented, errors.New("ermite.EnvironmentService.ListEnvironments is not implemented"))
511+}
512+
513+func (UnimplementedEnvironmentServiceHandler) DeleteEnvironment(context.Context, *connect.Request[ermite.DeleteEnvironmentRequest]) (*connect.Response[ermite.DeleteEnvironmentResponse], error) {
514+ return nil, connect.NewError(connect.CodeUnimplemented, errors.New("ermite.EnvironmentService.DeleteEnvironment is not implemented"))
515+}
@@ -0,0 +1,515 @@
1+// SPDX-License-Identifier: MIT
2+
3+// Code generated by protoc-gen-connect-go. DO NOT EDIT.
4+//
5+// Source: ermite/ci_settings.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+ // SecretServiceName is the fully-qualified name of the SecretService service.
27+ SecretServiceName = "ermite.SecretService"
28+ // VariableServiceName is the fully-qualified name of the VariableService service.
29+ VariableServiceName = "ermite.VariableService"
30+ // EnvironmentServiceName is the fully-qualified name of the EnvironmentService service.
31+ EnvironmentServiceName = "ermite.EnvironmentService"
32+)
33+
34+// These constants are the fully-qualified names of the RPCs defined in this package. They're
35+// exposed at runtime as Spec.Procedure and as the final two segments of the HTTP route.
36+//
37+// Note that these are different from the fully-qualified method names used by
38+// google.golang.org/protobuf/reflect/protoreflect. To convert from these constants to
39+// reflection-formatted method names, remove the leading slash and convert the remaining slash to a
40+// period.
41+const (
42+ // SecretServiceSetSecretProcedure is the fully-qualified name of the SecretService's SetSecret RPC.
43+ SecretServiceSetSecretProcedure = "/ermite.SecretService/SetSecret"
44+ // SecretServiceListSecretsProcedure is the fully-qualified name of the SecretService's ListSecrets
45+ // RPC.
46+ SecretServiceListSecretsProcedure = "/ermite.SecretService/ListSecrets"
47+ // SecretServiceDeleteSecretProcedure is the fully-qualified name of the SecretService's
48+ // DeleteSecret RPC.
49+ SecretServiceDeleteSecretProcedure = "/ermite.SecretService/DeleteSecret"
50+ // VariableServiceSetVariableProcedure is the fully-qualified name of the VariableService's
51+ // SetVariable RPC.
52+ VariableServiceSetVariableProcedure = "/ermite.VariableService/SetVariable"
53+ // VariableServiceGetVariableProcedure is the fully-qualified name of the VariableService's
54+ // GetVariable RPC.
55+ VariableServiceGetVariableProcedure = "/ermite.VariableService/GetVariable"
56+ // VariableServiceListVariablesProcedure is the fully-qualified name of the VariableService's
57+ // ListVariables RPC.
58+ VariableServiceListVariablesProcedure = "/ermite.VariableService/ListVariables"
59+ // VariableServiceDeleteVariableProcedure is the fully-qualified name of the VariableService's
60+ // DeleteVariable RPC.
61+ VariableServiceDeleteVariableProcedure = "/ermite.VariableService/DeleteVariable"
62+ // EnvironmentServiceCreateEnvironmentProcedure is the fully-qualified name of the
63+ // EnvironmentService's CreateEnvironment RPC.
64+ EnvironmentServiceCreateEnvironmentProcedure = "/ermite.EnvironmentService/CreateEnvironment"
65+ // EnvironmentServiceListEnvironmentsProcedure is the fully-qualified name of the
66+ // EnvironmentService's ListEnvironments RPC.
67+ EnvironmentServiceListEnvironmentsProcedure = "/ermite.EnvironmentService/ListEnvironments"
68+ // EnvironmentServiceDeleteEnvironmentProcedure is the fully-qualified name of the
69+ // EnvironmentService's DeleteEnvironment RPC.
70+ EnvironmentServiceDeleteEnvironmentProcedure = "/ermite.EnvironmentService/DeleteEnvironment"
71+)
72+
73+// SecretServiceClient is a client for the ermite.SecretService service.
74+type SecretServiceClient interface {
75+ // SetSecret creates the secret or replaces its value. Fails with
76+ // invalid_argument if the name is not valid, if the value is empty or longer
77+ // than 48 KiB (49,152 bytes), or if scope is not set, with not_found if the
78+ // environment of the scope does not exist, and with failed_precondition if
79+ // the server has no encryption key.
80+ SetSecret(context.Context, *connect.Request[ermite.SetSecretRequest]) (*connect.Response[ermite.SetSecretResponse], error)
81+ // ListSecrets lists the secrets of one scope, ordered by name. It lists only
82+ // the secrets set in that scope, not the ones the scope inherits. It never
83+ // returns values.
84+ ListSecrets(context.Context, *connect.Request[ermite.ListSecretsRequest]) (*connect.Response[ermite.ListSecretsResponse], error)
85+ // DeleteSecret deletes a secret. Fails with not_found if it does not exist.
86+ DeleteSecret(context.Context, *connect.Request[ermite.DeleteSecretRequest]) (*connect.Response[ermite.DeleteSecretResponse], error)
87+}
88+
89+// NewSecretServiceClient constructs a client for the ermite.SecretService service. By default, it
90+// uses the Connect protocol with the binary Protobuf Codec, asks for gzipped responses, and sends
91+// uncompressed requests. To use the gRPC or gRPC-Web protocols, supply the connect.WithGRPC() or
92+// connect.WithGRPCWeb() options.
93+//
94+// The URL supplied here should be the base URL for the Connect or gRPC server (for example,
95+// http://api.acme.com or https://acme.com/grpc).
96+func NewSecretServiceClient(httpClient connect.HTTPClient, baseURL string, opts ...connect.ClientOption) SecretServiceClient {
97+ baseURL = strings.TrimRight(baseURL, "/")
98+ secretServiceMethods := ermite.File_ermite_ci_settings_proto.Services().ByName("SecretService").Methods()
99+ return &secretServiceClient{
100+ setSecret: connect.NewClient[ermite.SetSecretRequest, ermite.SetSecretResponse](
101+ httpClient,
102+ baseURL+SecretServiceSetSecretProcedure,
103+ connect.WithSchema(secretServiceMethods.ByName("SetSecret")),
104+ connect.WithClientOptions(opts...),
105+ ),
106+ listSecrets: connect.NewClient[ermite.ListSecretsRequest, ermite.ListSecretsResponse](
107+ httpClient,
108+ baseURL+SecretServiceListSecretsProcedure,
109+ connect.WithSchema(secretServiceMethods.ByName("ListSecrets")),
110+ connect.WithClientOptions(opts...),
111+ ),
112+ deleteSecret: connect.NewClient[ermite.DeleteSecretRequest, ermite.DeleteSecretResponse](
113+ httpClient,
114+ baseURL+SecretServiceDeleteSecretProcedure,
115+ connect.WithSchema(secretServiceMethods.ByName("DeleteSecret")),
116+ connect.WithClientOptions(opts...),
117+ ),
118+ }
119+}
120+
121+// secretServiceClient implements SecretServiceClient.
122+type secretServiceClient struct {
123+ setSecret *connect.Client[ermite.SetSecretRequest, ermite.SetSecretResponse]
124+ listSecrets *connect.Client[ermite.ListSecretsRequest, ermite.ListSecretsResponse]
125+ deleteSecret *connect.Client[ermite.DeleteSecretRequest, ermite.DeleteSecretResponse]
126+}
127+
128+// SetSecret calls ermite.SecretService.SetSecret.
129+func (c *secretServiceClient) SetSecret(ctx context.Context, req *connect.Request[ermite.SetSecretRequest]) (*connect.Response[ermite.SetSecretResponse], error) {
130+ return c.setSecret.CallUnary(ctx, req)
131+}
132+
133+// ListSecrets calls ermite.SecretService.ListSecrets.
134+func (c *secretServiceClient) ListSecrets(ctx context.Context, req *connect.Request[ermite.ListSecretsRequest]) (*connect.Response[ermite.ListSecretsResponse], error) {
135+ return c.listSecrets.CallUnary(ctx, req)
136+}
137+
138+// DeleteSecret calls ermite.SecretService.DeleteSecret.
139+func (c *secretServiceClient) DeleteSecret(ctx context.Context, req *connect.Request[ermite.DeleteSecretRequest]) (*connect.Response[ermite.DeleteSecretResponse], error) {
140+ return c.deleteSecret.CallUnary(ctx, req)
141+}
142+
143+// SecretServiceHandler is an implementation of the ermite.SecretService service.
144+type SecretServiceHandler interface {
145+ // SetSecret creates the secret or replaces its value. Fails with
146+ // invalid_argument if the name is not valid, if the value is empty or longer
147+ // than 48 KiB (49,152 bytes), or if scope is not set, with not_found if the
148+ // environment of the scope does not exist, and with failed_precondition if
149+ // the server has no encryption key.
150+ SetSecret(context.Context, *connect.Request[ermite.SetSecretRequest]) (*connect.Response[ermite.SetSecretResponse], error)
151+ // ListSecrets lists the secrets of one scope, ordered by name. It lists only
152+ // the secrets set in that scope, not the ones the scope inherits. It never
153+ // returns values.
154+ ListSecrets(context.Context, *connect.Request[ermite.ListSecretsRequest]) (*connect.Response[ermite.ListSecretsResponse], error)
155+ // DeleteSecret deletes a secret. Fails with not_found if it does not exist.
156+ DeleteSecret(context.Context, *connect.Request[ermite.DeleteSecretRequest]) (*connect.Response[ermite.DeleteSecretResponse], error)
157+}
158+
159+// NewSecretServiceHandler builds an HTTP handler from the service implementation. It returns the
160+// path on which to mount the handler and the handler itself.
161+//
162+// By default, handlers support the Connect, gRPC, and gRPC-Web protocols with the binary Protobuf
163+// and JSON codecs. They also support gzip compression.
164+func NewSecretServiceHandler(svc SecretServiceHandler, opts ...connect.HandlerOption) (string, http.Handler) {
165+ secretServiceMethods := ermite.File_ermite_ci_settings_proto.Services().ByName("SecretService").Methods()
166+ secretServiceSetSecretHandler := connect.NewUnaryHandler(
167+ SecretServiceSetSecretProcedure,
168+ svc.SetSecret,
169+ connect.WithSchema(secretServiceMethods.ByName("SetSecret")),
170+ connect.WithHandlerOptions(opts...),
171+ )
172+ secretServiceListSecretsHandler := connect.NewUnaryHandler(
173+ SecretServiceListSecretsProcedure,
174+ svc.ListSecrets,
175+ connect.WithSchema(secretServiceMethods.ByName("ListSecrets")),
176+ connect.WithHandlerOptions(opts...),
177+ )
178+ secretServiceDeleteSecretHandler := connect.NewUnaryHandler(
179+ SecretServiceDeleteSecretProcedure,
180+ svc.DeleteSecret,
181+ connect.WithSchema(secretServiceMethods.ByName("DeleteSecret")),
182+ connect.WithHandlerOptions(opts...),
183+ )
184+ return "/ermite.SecretService/", http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {
185+ switch r.URL.Path {
186+ case SecretServiceSetSecretProcedure:
187+ secretServiceSetSecretHandler.ServeHTTP(w, r)
188+ case SecretServiceListSecretsProcedure:
189+ secretServiceListSecretsHandler.ServeHTTP(w, r)
190+ case SecretServiceDeleteSecretProcedure:
191+ secretServiceDeleteSecretHandler.ServeHTTP(w, r)
192+ default:
193+ http.NotFound(w, r)
194+ }
195+ })
196+}
197+
198+// UnimplementedSecretServiceHandler returns CodeUnimplemented from all methods.
199+type UnimplementedSecretServiceHandler struct{}
200+
201+func (UnimplementedSecretServiceHandler) SetSecret(context.Context, *connect.Request[ermite.SetSecretRequest]) (*connect.Response[ermite.SetSecretResponse], error) {
202+ return nil, connect.NewError(connect.CodeUnimplemented, errors.New("ermite.SecretService.SetSecret is not implemented"))
203+}
204+
205+func (UnimplementedSecretServiceHandler) ListSecrets(context.Context, *connect.Request[ermite.ListSecretsRequest]) (*connect.Response[ermite.ListSecretsResponse], error) {
206+ return nil, connect.NewError(connect.CodeUnimplemented, errors.New("ermite.SecretService.ListSecrets is not implemented"))
207+}
208+
209+func (UnimplementedSecretServiceHandler) DeleteSecret(context.Context, *connect.Request[ermite.DeleteSecretRequest]) (*connect.Response[ermite.DeleteSecretResponse], error) {
210+ return nil, connect.NewError(connect.CodeUnimplemented, errors.New("ermite.SecretService.DeleteSecret is not implemented"))
211+}
212+
213+// VariableServiceClient is a client for the ermite.VariableService service.
214+type VariableServiceClient interface {
215+ // SetVariable creates the variable or replaces its value. Fails with
216+ // invalid_argument if the name is not valid, if the value is longer than 48
217+ // KiB (49,152 bytes) or if scope is not set, and with not_found if the
218+ // environment of the scope does not exist. An empty value is allowed.
219+ SetVariable(context.Context, *connect.Request[ermite.SetVariableRequest]) (*connect.Response[ermite.SetVariableResponse], error)
220+ // GetVariable returns one variable of one scope, with its value. Fails with
221+ // not_found if it does not exist in that scope.
222+ GetVariable(context.Context, *connect.Request[ermite.GetVariableRequest]) (*connect.Response[ermite.GetVariableResponse], error)
223+ // ListVariables lists the variables of one scope, ordered by name, with
224+ // their values. It lists only the variables set in that scope.
225+ ListVariables(context.Context, *connect.Request[ermite.ListVariablesRequest]) (*connect.Response[ermite.ListVariablesResponse], error)
226+ // DeleteVariable deletes a variable. Fails with not_found if it does not
227+ // exist.
228+ DeleteVariable(context.Context, *connect.Request[ermite.DeleteVariableRequest]) (*connect.Response[ermite.DeleteVariableResponse], error)
229+}
230+
231+// NewVariableServiceClient constructs a client for the ermite.VariableService service. By default,
232+// it uses the Connect protocol with the binary Protobuf Codec, asks for gzipped responses, and
233+// sends uncompressed requests. To use the gRPC or gRPC-Web protocols, supply the connect.WithGRPC()
234+// or connect.WithGRPCWeb() options.
235+//
236+// The URL supplied here should be the base URL for the Connect or gRPC server (for example,
237+// http://api.acme.com or https://acme.com/grpc).
238+func NewVariableServiceClient(httpClient connect.HTTPClient, baseURL string, opts ...connect.ClientOption) VariableServiceClient {
239+ baseURL = strings.TrimRight(baseURL, "/")
240+ variableServiceMethods := ermite.File_ermite_ci_settings_proto.Services().ByName("VariableService").Methods()
241+ return &variableServiceClient{
242+ setVariable: connect.NewClient[ermite.SetVariableRequest, ermite.SetVariableResponse](
243+ httpClient,
244+ baseURL+VariableServiceSetVariableProcedure,
245+ connect.WithSchema(variableServiceMethods.ByName("SetVariable")),
246+ connect.WithClientOptions(opts...),
247+ ),
248+ getVariable: connect.NewClient[ermite.GetVariableRequest, ermite.GetVariableResponse](
249+ httpClient,
250+ baseURL+VariableServiceGetVariableProcedure,
251+ connect.WithSchema(variableServiceMethods.ByName("GetVariable")),
252+ connect.WithClientOptions(opts...),
253+ ),
254+ listVariables: connect.NewClient[ermite.ListVariablesRequest, ermite.ListVariablesResponse](
255+ httpClient,
256+ baseURL+VariableServiceListVariablesProcedure,
257+ connect.WithSchema(variableServiceMethods.ByName("ListVariables")),
258+ connect.WithClientOptions(opts...),
259+ ),
260+ deleteVariable: connect.NewClient[ermite.DeleteVariableRequest, ermite.DeleteVariableResponse](
261+ httpClient,
262+ baseURL+VariableServiceDeleteVariableProcedure,
263+ connect.WithSchema(variableServiceMethods.ByName("DeleteVariable")),
264+ connect.WithClientOptions(opts...),
265+ ),
266+ }
267+}
268+
269+// variableServiceClient implements VariableServiceClient.
270+type variableServiceClient struct {
271+ setVariable *connect.Client[ermite.SetVariableRequest, ermite.SetVariableResponse]
272+ getVariable *connect.Client[ermite.GetVariableRequest, ermite.GetVariableResponse]
273+ listVariables *connect.Client[ermite.ListVariablesRequest, ermite.ListVariablesResponse]
274+ deleteVariable *connect.Client[ermite.DeleteVariableRequest, ermite.DeleteVariableResponse]
275+}
276+
277+// SetVariable calls ermite.VariableService.SetVariable.
278+func (c *variableServiceClient) SetVariable(ctx context.Context, req *connect.Request[ermite.SetVariableRequest]) (*connect.Response[ermite.SetVariableResponse], error) {
279+ return c.setVariable.CallUnary(ctx, req)
280+}
281+
282+// GetVariable calls ermite.VariableService.GetVariable.
283+func (c *variableServiceClient) GetVariable(ctx context.Context, req *connect.Request[ermite.GetVariableRequest]) (*connect.Response[ermite.GetVariableResponse], error) {
284+ return c.getVariable.CallUnary(ctx, req)
285+}
286+
287+// ListVariables calls ermite.VariableService.ListVariables.
288+func (c *variableServiceClient) ListVariables(ctx context.Context, req *connect.Request[ermite.ListVariablesRequest]) (*connect.Response[ermite.ListVariablesResponse], error) {
289+ return c.listVariables.CallUnary(ctx, req)
290+}
291+
292+// DeleteVariable calls ermite.VariableService.DeleteVariable.
293+func (c *variableServiceClient) DeleteVariable(ctx context.Context, req *connect.Request[ermite.DeleteVariableRequest]) (*connect.Response[ermite.DeleteVariableResponse], error) {
294+ return c.deleteVariable.CallUnary(ctx, req)
295+}
296+
297+// VariableServiceHandler is an implementation of the ermite.VariableService service.
298+type VariableServiceHandler interface {
299+ // SetVariable creates the variable or replaces its value. Fails with
300+ // invalid_argument if the name is not valid, if the value is longer than 48
301+ // KiB (49,152 bytes) or if scope is not set, and with not_found if the
302+ // environment of the scope does not exist. An empty value is allowed.
303+ SetVariable(context.Context, *connect.Request[ermite.SetVariableRequest]) (*connect.Response[ermite.SetVariableResponse], error)
304+ // GetVariable returns one variable of one scope, with its value. Fails with
305+ // not_found if it does not exist in that scope.
306+ GetVariable(context.Context, *connect.Request[ermite.GetVariableRequest]) (*connect.Response[ermite.GetVariableResponse], error)
307+ // ListVariables lists the variables of one scope, ordered by name, with
308+ // their values. It lists only the variables set in that scope.
309+ ListVariables(context.Context, *connect.Request[ermite.ListVariablesRequest]) (*connect.Response[ermite.ListVariablesResponse], error)
310+ // DeleteVariable deletes a variable. Fails with not_found if it does not
311+ // exist.
312+ DeleteVariable(context.Context, *connect.Request[ermite.DeleteVariableRequest]) (*connect.Response[ermite.DeleteVariableResponse], error)
313+}
314+
315+// NewVariableServiceHandler builds an HTTP handler from the service implementation. It returns the
316+// path on which to mount the handler and the handler itself.
317+//
318+// By default, handlers support the Connect, gRPC, and gRPC-Web protocols with the binary Protobuf
319+// and JSON codecs. They also support gzip compression.
320+func NewVariableServiceHandler(svc VariableServiceHandler, opts ...connect.HandlerOption) (string, http.Handler) {
321+ variableServiceMethods := ermite.File_ermite_ci_settings_proto.Services().ByName("VariableService").Methods()
322+ variableServiceSetVariableHandler := connect.NewUnaryHandler(
323+ VariableServiceSetVariableProcedure,
324+ svc.SetVariable,
325+ connect.WithSchema(variableServiceMethods.ByName("SetVariable")),
326+ connect.WithHandlerOptions(opts...),
327+ )
328+ variableServiceGetVariableHandler := connect.NewUnaryHandler(
329+ VariableServiceGetVariableProcedure,
330+ svc.GetVariable,
331+ connect.WithSchema(variableServiceMethods.ByName("GetVariable")),
332+ connect.WithHandlerOptions(opts...),
333+ )
334+ variableServiceListVariablesHandler := connect.NewUnaryHandler(
335+ VariableServiceListVariablesProcedure,
336+ svc.ListVariables,
337+ connect.WithSchema(variableServiceMethods.ByName("ListVariables")),
338+ connect.WithHandlerOptions(opts...),
339+ )
340+ variableServiceDeleteVariableHandler := connect.NewUnaryHandler(
341+ VariableServiceDeleteVariableProcedure,
342+ svc.DeleteVariable,
343+ connect.WithSchema(variableServiceMethods.ByName("DeleteVariable")),
344+ connect.WithHandlerOptions(opts...),
345+ )
346+ return "/ermite.VariableService/", http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {
347+ switch r.URL.Path {
348+ case VariableServiceSetVariableProcedure:
349+ variableServiceSetVariableHandler.ServeHTTP(w, r)
350+ case VariableServiceGetVariableProcedure:
351+ variableServiceGetVariableHandler.ServeHTTP(w, r)
352+ case VariableServiceListVariablesProcedure:
353+ variableServiceListVariablesHandler.ServeHTTP(w, r)
354+ case VariableServiceDeleteVariableProcedure:
355+ variableServiceDeleteVariableHandler.ServeHTTP(w, r)
356+ default:
357+ http.NotFound(w, r)
358+ }
359+ })
360+}
361+
362+// UnimplementedVariableServiceHandler returns CodeUnimplemented from all methods.
363+type UnimplementedVariableServiceHandler struct{}
364+
365+func (UnimplementedVariableServiceHandler) SetVariable(context.Context, *connect.Request[ermite.SetVariableRequest]) (*connect.Response[ermite.SetVariableResponse], error) {
366+ return nil, connect.NewError(connect.CodeUnimplemented, errors.New("ermite.VariableService.SetVariable is not implemented"))
367+}
368+
369+func (UnimplementedVariableServiceHandler) GetVariable(context.Context, *connect.Request[ermite.GetVariableRequest]) (*connect.Response[ermite.GetVariableResponse], error) {
370+ return nil, connect.NewError(connect.CodeUnimplemented, errors.New("ermite.VariableService.GetVariable is not implemented"))
371+}
372+
373+func (UnimplementedVariableServiceHandler) ListVariables(context.Context, *connect.Request[ermite.ListVariablesRequest]) (*connect.Response[ermite.ListVariablesResponse], error) {
374+ return nil, connect.NewError(connect.CodeUnimplemented, errors.New("ermite.VariableService.ListVariables is not implemented"))
375+}
376+
377+func (UnimplementedVariableServiceHandler) DeleteVariable(context.Context, *connect.Request[ermite.DeleteVariableRequest]) (*connect.Response[ermite.DeleteVariableResponse], error) {
378+ return nil, connect.NewError(connect.CodeUnimplemented, errors.New("ermite.VariableService.DeleteVariable is not implemented"))
379+}
380+
381+// EnvironmentServiceClient is a client for the ermite.EnvironmentService service.
382+type EnvironmentServiceClient interface {
383+ // CreateEnvironment creates an environment. It succeeds and changes nothing
384+ // if the environment already exists (without regard to case), as GitHub's
385+ // create-or-update does. Fails with invalid_argument if the name is not
386+ // valid and with not_found if the repository does not exist.
387+ CreateEnvironment(context.Context, *connect.Request[ermite.CreateEnvironmentRequest]) (*connect.Response[ermite.CreateEnvironmentResponse], error)
388+ // ListEnvironments lists the environments of a repository, ordered by name.
389+ ListEnvironments(context.Context, *connect.Request[ermite.ListEnvironmentsRequest]) (*connect.Response[ermite.ListEnvironmentsResponse], error)
390+ // DeleteEnvironment deletes an environment with its secrets and variables.
391+ // Fails with not_found if it does not exist.
392+ DeleteEnvironment(context.Context, *connect.Request[ermite.DeleteEnvironmentRequest]) (*connect.Response[ermite.DeleteEnvironmentResponse], error)
393+}
394+
395+// NewEnvironmentServiceClient constructs a client for the ermite.EnvironmentService service. By
396+// default, it uses the Connect protocol with the binary Protobuf Codec, asks for gzipped responses,
397+// and sends uncompressed requests. To use the gRPC or gRPC-Web protocols, supply the
398+// connect.WithGRPC() or connect.WithGRPCWeb() options.
399+//
400+// The URL supplied here should be the base URL for the Connect or gRPC server (for example,
401+// http://api.acme.com or https://acme.com/grpc).
402+func NewEnvironmentServiceClient(httpClient connect.HTTPClient, baseURL string, opts ...connect.ClientOption) EnvironmentServiceClient {
403+ baseURL = strings.TrimRight(baseURL, "/")
404+ environmentServiceMethods := ermite.File_ermite_ci_settings_proto.Services().ByName("EnvironmentService").Methods()
405+ return &environmentServiceClient{
406+ createEnvironment: connect.NewClient[ermite.CreateEnvironmentRequest, ermite.CreateEnvironmentResponse](
407+ httpClient,
408+ baseURL+EnvironmentServiceCreateEnvironmentProcedure,
409+ connect.WithSchema(environmentServiceMethods.ByName("CreateEnvironment")),
410+ connect.WithClientOptions(opts...),
411+ ),
412+ listEnvironments: connect.NewClient[ermite.ListEnvironmentsRequest, ermite.ListEnvironmentsResponse](
413+ httpClient,
414+ baseURL+EnvironmentServiceListEnvironmentsProcedure,
415+ connect.WithSchema(environmentServiceMethods.ByName("ListEnvironments")),
416+ connect.WithClientOptions(opts...),
417+ ),
418+ deleteEnvironment: connect.NewClient[ermite.DeleteEnvironmentRequest, ermite.DeleteEnvironmentResponse](
419+ httpClient,
420+ baseURL+EnvironmentServiceDeleteEnvironmentProcedure,
421+ connect.WithSchema(environmentServiceMethods.ByName("DeleteEnvironment")),
422+ connect.WithClientOptions(opts...),
423+ ),
424+ }
425+}
426+
427+// environmentServiceClient implements EnvironmentServiceClient.
428+type environmentServiceClient struct {
429+ createEnvironment *connect.Client[ermite.CreateEnvironmentRequest, ermite.CreateEnvironmentResponse]
430+ listEnvironments *connect.Client[ermite.ListEnvironmentsRequest, ermite.ListEnvironmentsResponse]
431+ deleteEnvironment *connect.Client[ermite.DeleteEnvironmentRequest, ermite.DeleteEnvironmentResponse]
432+}
433+
434+// CreateEnvironment calls ermite.EnvironmentService.CreateEnvironment.
435+func (c *environmentServiceClient) CreateEnvironment(ctx context.Context, req *connect.Request[ermite.CreateEnvironmentRequest]) (*connect.Response[ermite.CreateEnvironmentResponse], error) {
436+ return c.createEnvironment.CallUnary(ctx, req)
437+}
438+
439+// ListEnvironments calls ermite.EnvironmentService.ListEnvironments.
440+func (c *environmentServiceClient) ListEnvironments(ctx context.Context, req *connect.Request[ermite.ListEnvironmentsRequest]) (*connect.Response[ermite.ListEnvironmentsResponse], error) {
441+ return c.listEnvironments.CallUnary(ctx, req)
442+}
443+
444+// DeleteEnvironment calls ermite.EnvironmentService.DeleteEnvironment.
445+func (c *environmentServiceClient) DeleteEnvironment(ctx context.Context, req *connect.Request[ermite.DeleteEnvironmentRequest]) (*connect.Response[ermite.DeleteEnvironmentResponse], error) {
446+ return c.deleteEnvironment.CallUnary(ctx, req)
447+}
448+
449+// EnvironmentServiceHandler is an implementation of the ermite.EnvironmentService service.
450+type EnvironmentServiceHandler interface {
451+ // CreateEnvironment creates an environment. It succeeds and changes nothing
452+ // if the environment already exists (without regard to case), as GitHub's
453+ // create-or-update does. Fails with invalid_argument if the name is not
454+ // valid and with not_found if the repository does not exist.
455+ CreateEnvironment(context.Context, *connect.Request[ermite.CreateEnvironmentRequest]) (*connect.Response[ermite.CreateEnvironmentResponse], error)
456+ // ListEnvironments lists the environments of a repository, ordered by name.
457+ ListEnvironments(context.Context, *connect.Request[ermite.ListEnvironmentsRequest]) (*connect.Response[ermite.ListEnvironmentsResponse], error)
458+ // DeleteEnvironment deletes an environment with its secrets and variables.
459+ // Fails with not_found if it does not exist.
460+ DeleteEnvironment(context.Context, *connect.Request[ermite.DeleteEnvironmentRequest]) (*connect.Response[ermite.DeleteEnvironmentResponse], error)
461+}
462+
463+// NewEnvironmentServiceHandler builds an HTTP handler from the service implementation. It returns
464+// the path on which to mount the handler and the handler itself.
465+//
466+// By default, handlers support the Connect, gRPC, and gRPC-Web protocols with the binary Protobuf
467+// and JSON codecs. They also support gzip compression.
468+func NewEnvironmentServiceHandler(svc EnvironmentServiceHandler, opts ...connect.HandlerOption) (string, http.Handler) {
469+ environmentServiceMethods := ermite.File_ermite_ci_settings_proto.Services().ByName("EnvironmentService").Methods()
470+ environmentServiceCreateEnvironmentHandler := connect.NewUnaryHandler(
471+ EnvironmentServiceCreateEnvironmentProcedure,
472+ svc.CreateEnvironment,
473+ connect.WithSchema(environmentServiceMethods.ByName("CreateEnvironment")),
474+ connect.WithHandlerOptions(opts...),
475+ )
476+ environmentServiceListEnvironmentsHandler := connect.NewUnaryHandler(
477+ EnvironmentServiceListEnvironmentsProcedure,
478+ svc.ListEnvironments,
479+ connect.WithSchema(environmentServiceMethods.ByName("ListEnvironments")),
480+ connect.WithHandlerOptions(opts...),
481+ )
482+ environmentServiceDeleteEnvironmentHandler := connect.NewUnaryHandler(
483+ EnvironmentServiceDeleteEnvironmentProcedure,
484+ svc.DeleteEnvironment,
485+ connect.WithSchema(environmentServiceMethods.ByName("DeleteEnvironment")),
486+ connect.WithHandlerOptions(opts...),
487+ )
488+ return "/ermite.EnvironmentService/", http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {
489+ switch r.URL.Path {
490+ case EnvironmentServiceCreateEnvironmentProcedure:
491+ environmentServiceCreateEnvironmentHandler.ServeHTTP(w, r)
492+ case EnvironmentServiceListEnvironmentsProcedure:
493+ environmentServiceListEnvironmentsHandler.ServeHTTP(w, r)
494+ case EnvironmentServiceDeleteEnvironmentProcedure:
495+ environmentServiceDeleteEnvironmentHandler.ServeHTTP(w, r)
496+ default:
497+ http.NotFound(w, r)
498+ }
499+ })
500+}
501+
502+// UnimplementedEnvironmentServiceHandler returns CodeUnimplemented from all methods.
503+type UnimplementedEnvironmentServiceHandler struct{}
504+
505+func (UnimplementedEnvironmentServiceHandler) CreateEnvironment(context.Context, *connect.Request[ermite.CreateEnvironmentRequest]) (*connect.Response[ermite.CreateEnvironmentResponse], error) {
506+ return nil, connect.NewError(connect.CodeUnimplemented, errors.New("ermite.EnvironmentService.CreateEnvironment is not implemented"))
507+}
508+
509+func (UnimplementedEnvironmentServiceHandler) ListEnvironments(context.Context, *connect.Request[ermite.ListEnvironmentsRequest]) (*connect.Response[ermite.ListEnvironmentsResponse], error) {
510+ return nil, connect.NewError(connect.CodeUnimplemented, errors.New("ermite.EnvironmentService.ListEnvironments is not implemented"))
511+}
512+
513+func (UnimplementedEnvironmentServiceHandler) DeleteEnvironment(context.Context, *connect.Request[ermite.DeleteEnvironmentRequest]) (*connect.Response[ermite.DeleteEnvironmentResponse], error) {
514+ return nil, connect.NewError(connect.CodeUnimplemented, errors.New("ermite.EnvironmentService.DeleteEnvironment is not implemented"))
515+}
M gen/ermite/ermiteconnect/run.connect.go +57 -0
@@ -53,6 +53,9 @@ const (
5353 RunServiceCancelRunProcedure = "/ermite.RunService/CancelRun"
5454 // RunServiceRerunRunProcedure is the fully-qualified name of the RunService's RerunRun RPC.
5555 RunServiceRerunRunProcedure = "/ermite.RunService/RerunRun"
56+ // RunServiceDispatchWorkflowProcedure is the fully-qualified name of the RunService's
57+ // DispatchWorkflow RPC.
58+ RunServiceDispatchWorkflowProcedure = "/ermite.RunService/DispatchWorkflow"
5659 // RunServiceListChecksProcedure is the fully-qualified name of the RunService's ListChecks RPC.
5760 RunServiceListChecksProcedure = "/ermite.RunService/ListChecks"
5861 // RunServiceListRunnersProcedure is the fully-qualified name of the RunService's ListRunners RPC.
@@ -127,6 +130,21 @@ type RunServiceClient interface {
127130 // with failed_precondition if the latest attempt has not completed, or if
128131 // failed_only is set and no job failed. The new attempt is returned QUEUED.
129132 RerunRun(context.Context, *connect.Request[ermite.RerunRunRequest]) (*connect.Response[ermite.RerunRunResponse], error)
133+ // DispatchWorkflow starts a run of a workflow file by hand, like `gh
134+ // workflow run` and GitHub's "workflow_dispatch" event. Needs the ci:write
135+ // scope on the repository. The workflow is read at ref and must have
136+ // "workflow_dispatch" among its events. The run has event
137+ // "workflow_dispatch", ref and the commit ref points to, and the caller as
138+ // actor; it is trusted when the caller is the owner and not trusted when the
139+ // caller is a token limited to branches. The run is returned QUEUED, before
140+ // any job has been given to a runner. Only servers with the feature
141+ // "ci.dispatch" implement it (unimplemented otherwise). Fails with
142+ // not_found if the repository, the workflow file or ref does not exist,
143+ // with failed_precondition if the workflow does not declare
144+ // "workflow_dispatch", and with invalid_argument if an input is unknown, is
145+ // missing while required without default, or has a value of the wrong type
146+ // or outside its choices, or if the workflow file is not valid.
147+ DispatchWorkflow(context.Context, *connect.Request[ermite.DispatchWorkflowRequest]) (*connect.Response[ermite.DispatchWorkflowResponse], error)
130148 // ListChecks lists the checks of a commit: for each job of each run on that
131149 // sha, the one of the latest attempt, ordered by creation time then name.
132150 // A commit without a run has no check: the list is empty, which is not an
@@ -203,6 +221,12 @@ func NewRunServiceClient(httpClient connect.HTTPClient, baseURL string, opts ...
203221 connect.WithSchema(runServiceMethods.ByName("RerunRun")),
204222 connect.WithClientOptions(opts...),
205223 ),
224+ dispatchWorkflow: connect.NewClient[ermite.DispatchWorkflowRequest, ermite.DispatchWorkflowResponse](
225+ httpClient,
226+ baseURL+RunServiceDispatchWorkflowProcedure,
227+ connect.WithSchema(runServiceMethods.ByName("DispatchWorkflow")),
228+ connect.WithClientOptions(opts...),
229+ ),
206230 listChecks: connect.NewClient[ermite.ListChecksRequest, ermite.ListChecksResponse](
207231 httpClient,
208232 baseURL+RunServiceListChecksProcedure,
@@ -234,6 +258,7 @@ type runServiceClient struct {
234258 getJobLog *connect.Client[ermite.GetJobLogRequest, ermite.GetJobLogResponse]
235259 cancelRun *connect.Client[ermite.CancelRunRequest, ermite.CancelRunResponse]
236260 rerunRun *connect.Client[ermite.RerunRunRequest, ermite.RerunRunResponse]
261+ dispatchWorkflow *connect.Client[ermite.DispatchWorkflowRequest, ermite.DispatchWorkflowResponse]
237262 listChecks *connect.Client[ermite.ListChecksRequest, ermite.ListChecksResponse]
238263 listRunners *connect.Client[ermite.ListRunnersRequest, ermite.ListRunnersResponse]
239264 removeRunner *connect.Client[ermite.RemoveRunnerRequest, ermite.RemoveRunnerResponse]
@@ -279,6 +304,11 @@ func (c *runServiceClient) RerunRun(ctx context.Context, req *connect.Request[er
279304 return c.rerunRun.CallUnary(ctx, req)
280305 }
281306
307+// DispatchWorkflow calls ermite.RunService.DispatchWorkflow.
308+func (c *runServiceClient) DispatchWorkflow(ctx context.Context, req *connect.Request[ermite.DispatchWorkflowRequest]) (*connect.Response[ermite.DispatchWorkflowResponse], error) {
309+ return c.dispatchWorkflow.CallUnary(ctx, req)
310+}
311+
282312 // ListChecks calls ermite.RunService.ListChecks.
283313 func (c *runServiceClient) ListChecks(ctx context.Context, req *connect.Request[ermite.ListChecksRequest]) (*connect.Response[ermite.ListChecksResponse], error) {
284314 return c.listChecks.CallUnary(ctx, req)
@@ -360,6 +390,21 @@ type RunServiceHandler interface {
360390 // with failed_precondition if the latest attempt has not completed, or if
361391 // failed_only is set and no job failed. The new attempt is returned QUEUED.
362392 RerunRun(context.Context, *connect.Request[ermite.RerunRunRequest]) (*connect.Response[ermite.RerunRunResponse], error)
393+ // DispatchWorkflow starts a run of a workflow file by hand, like `gh
394+ // workflow run` and GitHub's "workflow_dispatch" event. Needs the ci:write
395+ // scope on the repository. The workflow is read at ref and must have
396+ // "workflow_dispatch" among its events. The run has event
397+ // "workflow_dispatch", ref and the commit ref points to, and the caller as
398+ // actor; it is trusted when the caller is the owner and not trusted when the
399+ // caller is a token limited to branches. The run is returned QUEUED, before
400+ // any job has been given to a runner. Only servers with the feature
401+ // "ci.dispatch" implement it (unimplemented otherwise). Fails with
402+ // not_found if the repository, the workflow file or ref does not exist,
403+ // with failed_precondition if the workflow does not declare
404+ // "workflow_dispatch", and with invalid_argument if an input is unknown, is
405+ // missing while required without default, or has a value of the wrong type
406+ // or outside its choices, or if the workflow file is not valid.
407+ DispatchWorkflow(context.Context, *connect.Request[ermite.DispatchWorkflowRequest]) (*connect.Response[ermite.DispatchWorkflowResponse], error)
363408 // ListChecks lists the checks of a commit: for each job of each run on that
364409 // sha, the one of the latest attempt, ordered by creation time then name.
365410 // A commit without a run has no check: the list is empty, which is not an
@@ -432,6 +477,12 @@ func NewRunServiceHandler(svc RunServiceHandler, opts ...connect.HandlerOption)
432477 connect.WithSchema(runServiceMethods.ByName("RerunRun")),
433478 connect.WithHandlerOptions(opts...),
434479 )
480+ runServiceDispatchWorkflowHandler := connect.NewUnaryHandler(
481+ RunServiceDispatchWorkflowProcedure,
482+ svc.DispatchWorkflow,
483+ connect.WithSchema(runServiceMethods.ByName("DispatchWorkflow")),
484+ connect.WithHandlerOptions(opts...),
485+ )
435486 runServiceListChecksHandler := connect.NewUnaryHandler(
436487 RunServiceListChecksProcedure,
437488 svc.ListChecks,
@@ -468,6 +519,8 @@ func NewRunServiceHandler(svc RunServiceHandler, opts ...connect.HandlerOption)
468519 runServiceCancelRunHandler.ServeHTTP(w, r)
469520 case RunServiceRerunRunProcedure:
470521 runServiceRerunRunHandler.ServeHTTP(w, r)
522+ case RunServiceDispatchWorkflowProcedure:
523+ runServiceDispatchWorkflowHandler.ServeHTTP(w, r)
471524 case RunServiceListChecksProcedure:
472525 runServiceListChecksHandler.ServeHTTP(w, r)
473526 case RunServiceListRunnersProcedure:
@@ -515,6 +568,10 @@ func (UnimplementedRunServiceHandler) RerunRun(context.Context, *connect.Request
515568 return nil, connect.NewError(connect.CodeUnimplemented, errors.New("ermite.RunService.RerunRun is not implemented"))
516569 }
517570
571+func (UnimplementedRunServiceHandler) DispatchWorkflow(context.Context, *connect.Request[ermite.DispatchWorkflowRequest]) (*connect.Response[ermite.DispatchWorkflowResponse], error) {
572+ return nil, connect.NewError(connect.CodeUnimplemented, errors.New("ermite.RunService.DispatchWorkflow is not implemented"))
573+}
574+
518575 func (UnimplementedRunServiceHandler) ListChecks(context.Context, *connect.Request[ermite.ListChecksRequest]) (*connect.Response[ermite.ListChecksResponse], error) {
519576 return nil, connect.NewError(connect.CodeUnimplemented, errors.New("ermite.RunService.ListChecks is not implemented"))
520577 }
@@ -53,6 +53,9 @@ const (
53 RunServiceCancelRunProcedure = "/ermite.RunService/CancelRun"53 RunServiceCancelRunProcedure = "/ermite.RunService/CancelRun"
54 // RunServiceRerunRunProcedure is the fully-qualified name of the RunService's RerunRun RPC.54 // RunServiceRerunRunProcedure is the fully-qualified name of the RunService's RerunRun RPC.
55 RunServiceRerunRunProcedure = "/ermite.RunService/RerunRun"55 RunServiceRerunRunProcedure = "/ermite.RunService/RerunRun"
56+ // RunServiceDispatchWorkflowProcedure is the fully-qualified name of the RunService's
57+ // DispatchWorkflow RPC.
58+ RunServiceDispatchWorkflowProcedure = "/ermite.RunService/DispatchWorkflow"
56 // RunServiceListChecksProcedure is the fully-qualified name of the RunService's ListChecks RPC.59 // RunServiceListChecksProcedure is the fully-qualified name of the RunService's ListChecks RPC.
57 RunServiceListChecksProcedure = "/ermite.RunService/ListChecks"60 RunServiceListChecksProcedure = "/ermite.RunService/ListChecks"
58 // RunServiceListRunnersProcedure is the fully-qualified name of the RunService's ListRunners RPC.61 // RunServiceListRunnersProcedure is the fully-qualified name of the RunService's ListRunners RPC.
@@ -127,6 +130,21 @@ type RunServiceClient interface {
127 // with failed_precondition if the latest attempt has not completed, or if130 // with failed_precondition if the latest attempt has not completed, or if
128 // failed_only is set and no job failed. The new attempt is returned QUEUED.131 // failed_only is set and no job failed. The new attempt is returned QUEUED.
129 RerunRun(context.Context, *connect.Request[ermite.RerunRunRequest]) (*connect.Response[ermite.RerunRunResponse], error)132 RerunRun(context.Context, *connect.Request[ermite.RerunRunRequest]) (*connect.Response[ermite.RerunRunResponse], error)
133+ // DispatchWorkflow starts a run of a workflow file by hand, like `gh
134+ // workflow run` and GitHub's "workflow_dispatch" event. Needs the ci:write
135+ // scope on the repository. The workflow is read at ref and must have
136+ // "workflow_dispatch" among its events. The run has event
137+ // "workflow_dispatch", ref and the commit ref points to, and the caller as
138+ // actor; it is trusted when the caller is the owner and not trusted when the
139+ // caller is a token limited to branches. The run is returned QUEUED, before
140+ // any job has been given to a runner. Only servers with the feature
141+ // "ci.dispatch" implement it (unimplemented otherwise). Fails with
142+ // not_found if the repository, the workflow file or ref does not exist,
143+ // with failed_precondition if the workflow does not declare
144+ // "workflow_dispatch", and with invalid_argument if an input is unknown, is
145+ // missing while required without default, or has a value of the wrong type
146+ // or outside its choices, or if the workflow file is not valid.
147+ DispatchWorkflow(context.Context, *connect.Request[ermite.DispatchWorkflowRequest]) (*connect.Response[ermite.DispatchWorkflowResponse], error)
130 // ListChecks lists the checks of a commit: for each job of each run on that148 // ListChecks lists the checks of a commit: for each job of each run on that
131 // sha, the one of the latest attempt, ordered by creation time then name.149 // sha, the one of the latest attempt, ordered by creation time then name.
132 // A commit without a run has no check: the list is empty, which is not an150 // A commit without a run has no check: the list is empty, which is not an
@@ -203,6 +221,12 @@ func NewRunServiceClient(httpClient connect.HTTPClient, baseURL string, opts ...
203 connect.WithSchema(runServiceMethods.ByName("RerunRun")),221 connect.WithSchema(runServiceMethods.ByName("RerunRun")),
204 connect.WithClientOptions(opts...),222 connect.WithClientOptions(opts...),
205 ),223 ),
224+ dispatchWorkflow: connect.NewClient[ermite.DispatchWorkflowRequest, ermite.DispatchWorkflowResponse](
225+ httpClient,
226+ baseURL+RunServiceDispatchWorkflowProcedure,
227+ connect.WithSchema(runServiceMethods.ByName("DispatchWorkflow")),
228+ connect.WithClientOptions(opts...),
229+ ),
206 listChecks: connect.NewClient[ermite.ListChecksRequest, ermite.ListChecksResponse](230 listChecks: connect.NewClient[ermite.ListChecksRequest, ermite.ListChecksResponse](
207 httpClient,231 httpClient,
208 baseURL+RunServiceListChecksProcedure,232 baseURL+RunServiceListChecksProcedure,
@@ -234,6 +258,7 @@ type runServiceClient struct {
234 getJobLog *connect.Client[ermite.GetJobLogRequest, ermite.GetJobLogResponse]258 getJobLog *connect.Client[ermite.GetJobLogRequest, ermite.GetJobLogResponse]
235 cancelRun *connect.Client[ermite.CancelRunRequest, ermite.CancelRunResponse]259 cancelRun *connect.Client[ermite.CancelRunRequest, ermite.CancelRunResponse]
236 rerunRun *connect.Client[ermite.RerunRunRequest, ermite.RerunRunResponse]260 rerunRun *connect.Client[ermite.RerunRunRequest, ermite.RerunRunResponse]
261+ dispatchWorkflow *connect.Client[ermite.DispatchWorkflowRequest, ermite.DispatchWorkflowResponse]
237 listChecks *connect.Client[ermite.ListChecksRequest, ermite.ListChecksResponse]262 listChecks *connect.Client[ermite.ListChecksRequest, ermite.ListChecksResponse]
238 listRunners *connect.Client[ermite.ListRunnersRequest, ermite.ListRunnersResponse]263 listRunners *connect.Client[ermite.ListRunnersRequest, ermite.ListRunnersResponse]
239 removeRunner *connect.Client[ermite.RemoveRunnerRequest, ermite.RemoveRunnerResponse]264 removeRunner *connect.Client[ermite.RemoveRunnerRequest, ermite.RemoveRunnerResponse]
@@ -279,6 +304,11 @@ func (c *runServiceClient) RerunRun(ctx context.Context, req *connect.Request[er
279 return c.rerunRun.CallUnary(ctx, req)304 return c.rerunRun.CallUnary(ctx, req)
280 }305 }
281 306
307+// DispatchWorkflow calls ermite.RunService.DispatchWorkflow.
308+func (c *runServiceClient) DispatchWorkflow(ctx context.Context, req *connect.Request[ermite.DispatchWorkflowRequest]) (*connect.Response[ermite.DispatchWorkflowResponse], error) {
309+ return c.dispatchWorkflow.CallUnary(ctx, req)
310+}
311+
282 // ListChecks calls ermite.RunService.ListChecks.312 // ListChecks calls ermite.RunService.ListChecks.
283 func (c *runServiceClient) ListChecks(ctx context.Context, req *connect.Request[ermite.ListChecksRequest]) (*connect.Response[ermite.ListChecksResponse], error) {313 func (c *runServiceClient) ListChecks(ctx context.Context, req *connect.Request[ermite.ListChecksRequest]) (*connect.Response[ermite.ListChecksResponse], error) {
284 return c.listChecks.CallUnary(ctx, req)314 return c.listChecks.CallUnary(ctx, req)
@@ -360,6 +390,21 @@ type RunServiceHandler interface {
360 // with failed_precondition if the latest attempt has not completed, or if390 // with failed_precondition if the latest attempt has not completed, or if
361 // failed_only is set and no job failed. The new attempt is returned QUEUED.391 // failed_only is set and no job failed. The new attempt is returned QUEUED.
362 RerunRun(context.Context, *connect.Request[ermite.RerunRunRequest]) (*connect.Response[ermite.RerunRunResponse], error)392 RerunRun(context.Context, *connect.Request[ermite.RerunRunRequest]) (*connect.Response[ermite.RerunRunResponse], error)
393+ // DispatchWorkflow starts a run of a workflow file by hand, like `gh
394+ // workflow run` and GitHub's "workflow_dispatch" event. Needs the ci:write
395+ // scope on the repository. The workflow is read at ref and must have
396+ // "workflow_dispatch" among its events. The run has event
397+ // "workflow_dispatch", ref and the commit ref points to, and the caller as
398+ // actor; it is trusted when the caller is the owner and not trusted when the
399+ // caller is a token limited to branches. The run is returned QUEUED, before
400+ // any job has been given to a runner. Only servers with the feature
401+ // "ci.dispatch" implement it (unimplemented otherwise). Fails with
402+ // not_found if the repository, the workflow file or ref does not exist,
403+ // with failed_precondition if the workflow does not declare
404+ // "workflow_dispatch", and with invalid_argument if an input is unknown, is
405+ // missing while required without default, or has a value of the wrong type
406+ // or outside its choices, or if the workflow file is not valid.
407+ DispatchWorkflow(context.Context, *connect.Request[ermite.DispatchWorkflowRequest]) (*connect.Response[ermite.DispatchWorkflowResponse], error)
363 // ListChecks lists the checks of a commit: for each job of each run on that408 // ListChecks lists the checks of a commit: for each job of each run on that
364 // sha, the one of the latest attempt, ordered by creation time then name.409 // sha, the one of the latest attempt, ordered by creation time then name.
365 // A commit without a run has no check: the list is empty, which is not an410 // A commit without a run has no check: the list is empty, which is not an
@@ -432,6 +477,12 @@ func NewRunServiceHandler(svc RunServiceHandler, opts ...connect.HandlerOption)
432 connect.WithSchema(runServiceMethods.ByName("RerunRun")),477 connect.WithSchema(runServiceMethods.ByName("RerunRun")),
433 connect.WithHandlerOptions(opts...),478 connect.WithHandlerOptions(opts...),
434 )479 )
480+ runServiceDispatchWorkflowHandler := connect.NewUnaryHandler(
481+ RunServiceDispatchWorkflowProcedure,
482+ svc.DispatchWorkflow,
483+ connect.WithSchema(runServiceMethods.ByName("DispatchWorkflow")),
484+ connect.WithHandlerOptions(opts...),
485+ )
435 runServiceListChecksHandler := connect.NewUnaryHandler(486 runServiceListChecksHandler := connect.NewUnaryHandler(
436 RunServiceListChecksProcedure,487 RunServiceListChecksProcedure,
437 svc.ListChecks,488 svc.ListChecks,
@@ -468,6 +519,8 @@ func NewRunServiceHandler(svc RunServiceHandler, opts ...connect.HandlerOption)
468 runServiceCancelRunHandler.ServeHTTP(w, r)519 runServiceCancelRunHandler.ServeHTTP(w, r)
469 case RunServiceRerunRunProcedure:520 case RunServiceRerunRunProcedure:
470 runServiceRerunRunHandler.ServeHTTP(w, r)521 runServiceRerunRunHandler.ServeHTTP(w, r)
522+ case RunServiceDispatchWorkflowProcedure:
523+ runServiceDispatchWorkflowHandler.ServeHTTP(w, r)
471 case RunServiceListChecksProcedure:524 case RunServiceListChecksProcedure:
472 runServiceListChecksHandler.ServeHTTP(w, r)525 runServiceListChecksHandler.ServeHTTP(w, r)
473 case RunServiceListRunnersProcedure:526 case RunServiceListRunnersProcedure:
@@ -515,6 +568,10 @@ func (UnimplementedRunServiceHandler) RerunRun(context.Context, *connect.Request
515 return nil, connect.NewError(connect.CodeUnimplemented, errors.New("ermite.RunService.RerunRun is not implemented"))568 return nil, connect.NewError(connect.CodeUnimplemented, errors.New("ermite.RunService.RerunRun is not implemented"))
516 }569 }
517 570
571+func (UnimplementedRunServiceHandler) DispatchWorkflow(context.Context, *connect.Request[ermite.DispatchWorkflowRequest]) (*connect.Response[ermite.DispatchWorkflowResponse], error) {
572+ return nil, connect.NewError(connect.CodeUnimplemented, errors.New("ermite.RunService.DispatchWorkflow is not implemented"))
573+}
574+
518 func (UnimplementedRunServiceHandler) ListChecks(context.Context, *connect.Request[ermite.ListChecksRequest]) (*connect.Response[ermite.ListChecksResponse], error) {575 func (UnimplementedRunServiceHandler) ListChecks(context.Context, *connect.Request[ermite.ListChecksRequest]) (*connect.Response[ermite.ListChecksResponse], error) {
519 return nil, connect.NewError(connect.CodeUnimplemented, errors.New("ermite.RunService.ListChecks is not implemented"))576 return nil, connect.NewError(connect.CodeUnimplemented, errors.New("ermite.RunService.ListChecks is not implemented"))
520 }577 }
M gen/ermite/run.pb.go +272 -100 generated file: collapsed
M gen/ermite/runner.pb.go +400 -150 generated file: collapsed
M gen/ermite/server.pb.go +5 -1 generated file: collapsed
M gen/ermite/token.pb.go +4 -2 generated file: collapsed
M gen_test.go +89 -0
@@ -64,9 +64,20 @@ func TestProcedures(t *testing.T) {
6464 {ermiteconnect.RunServiceGetStepSummariesProcedure, "/ermite.RunService/GetStepSummaries"},
6565 {ermiteconnect.RunServiceCancelRunProcedure, "/ermite.RunService/CancelRun"},
6666 {ermiteconnect.RunServiceRerunRunProcedure, "/ermite.RunService/RerunRun"},
67+ {ermiteconnect.RunServiceDispatchWorkflowProcedure, "/ermite.RunService/DispatchWorkflow"},
6768 {ermiteconnect.RunServiceListChecksProcedure, "/ermite.RunService/ListChecks"},
6869 {ermiteconnect.RunServiceListRunnersProcedure, "/ermite.RunService/ListRunners"},
6970 {ermiteconnect.RunServiceRemoveRunnerProcedure, "/ermite.RunService/RemoveRunner"},
71+ {ermiteconnect.SecretServiceSetSecretProcedure, "/ermite.SecretService/SetSecret"},
72+ {ermiteconnect.SecretServiceListSecretsProcedure, "/ermite.SecretService/ListSecrets"},
73+ {ermiteconnect.SecretServiceDeleteSecretProcedure, "/ermite.SecretService/DeleteSecret"},
74+ {ermiteconnect.VariableServiceSetVariableProcedure, "/ermite.VariableService/SetVariable"},
75+ {ermiteconnect.VariableServiceGetVariableProcedure, "/ermite.VariableService/GetVariable"},
76+ {ermiteconnect.VariableServiceListVariablesProcedure, "/ermite.VariableService/ListVariables"},
77+ {ermiteconnect.VariableServiceDeleteVariableProcedure, "/ermite.VariableService/DeleteVariable"},
78+ {ermiteconnect.EnvironmentServiceCreateEnvironmentProcedure, "/ermite.EnvironmentService/CreateEnvironment"},
79+ {ermiteconnect.EnvironmentServiceListEnvironmentsProcedure, "/ermite.EnvironmentService/ListEnvironments"},
80+ {ermiteconnect.EnvironmentServiceDeleteEnvironmentProcedure, "/ermite.EnvironmentService/DeleteEnvironment"},
7081 }
7182 for _, tt := range tests {
7283 if tt.got != tt.want {
@@ -104,6 +115,7 @@ func TestEnumNumbers(t *testing.T) {
104115 {"CI_STATUS_QUEUED", int32(ermite.CiStatus_CI_STATUS_QUEUED), 1},
105116 {"CI_STATUS_IN_PROGRESS", int32(ermite.CiStatus_CI_STATUS_IN_PROGRESS), 2},
106117 {"CI_STATUS_COMPLETED", int32(ermite.CiStatus_CI_STATUS_COMPLETED), 3},
118+ {"CI_STATUS_PENDING", int32(ermite.CiStatus_CI_STATUS_PENDING), 4},
107119 {"CI_CONCLUSION_UNSPECIFIED", int32(ermite.CiConclusion_CI_CONCLUSION_UNSPECIFIED), 0},
108120 {"CI_CONCLUSION_SUCCESS", int32(ermite.CiConclusion_CI_CONCLUSION_SUCCESS), 1},
109121 {"CI_CONCLUSION_FAILURE", int32(ermite.CiConclusion_CI_CONCLUSION_FAILURE), 2},
@@ -450,3 +462,80 @@ func TestCI2RoundTrip(t *testing.T) {
450462 }
451463 }
452464 }
465+
466+// TestCI3FieldNumbers pins the numbers of the fields added for CI-3.
467+func TestCI3FieldNumbers(t *testing.T) {
468+ tests := []struct {
469+ msg proto.Message
470+ fields map[string]int
471+ }{
472+ {&ermite.Job{}, map[string]int{
473+ "secrets": 16, "vars": 17, "environment": 18, "permissions": 19, "cache": 20, "trusted": 21,
474+ }},
475+ {&ermite.JobPermissions{}, map[string]int{"levels": 1}},
476+ {&ermite.JobCache{}, map[string]int{"repository": 1, "write_ref": 2, "read_refs": 3}},
477+ {&ermite.Run{}, map[string]int{"trusted": 20}},
478+ {&ermite.RunJob{}, map[string]int{"concurrency_group": 20}},
479+ {&ermite.DispatchWorkflowRequest{}, map[string]int{"repo": 1, "workflow_path": 2, "ref": 3, "inputs": 4}},
480+ {&ermite.DispatchWorkflowResponse{}, map[string]int{"run": 1}},
481+ {&ermite.SettingsScope{}, map[string]int{"instance": 1, "repo": 2, "environment": 3}},
482+ {&ermite.EnvironmentRef{}, map[string]int{"repo": 1, "name": 2}},
483+ {&ermite.Secret{}, map[string]int{"name": 1, "updated_at": 2}},
484+ {&ermite.Variable{}, map[string]int{"name": 1, "value": 2, "updated_at": 3}},
485+ {&ermite.Environment{}, map[string]int{"repo": 1, "name": 2, "created_at": 3}},
486+ {&ermite.SetSecretRequest{}, map[string]int{"scope": 1, "name": 2, "value": 3}},
487+ {&ermite.ListSecretsRequest{}, map[string]int{"scope": 1, "page_size": 2, "page_token": 3}},
488+ {&ermite.ListSecretsResponse{}, map[string]int{"secrets": 1, "next_page_token": 2}},
489+ {&ermite.ListVariablesResponse{}, map[string]int{"variables": 1, "next_page_token": 2}},
490+ {&ermite.ListEnvironmentsRequest{}, map[string]int{"repo": 1, "page_size": 2, "page_token": 3}},
491+ {&ermite.ListEnvironmentsResponse{}, map[string]int{"environments": 1, "next_page_token": 2}},
492+ }
493+ for _, tt := range tests {
494+ md := tt.msg.ProtoReflect().Descriptor()
495+ for name, num := range tt.fields {
496+ if fd := md.Fields().ByName(protoreflect.Name(name)); fd == nil || int(fd.Number()) != num {
497+ t.Errorf("%s.%s: %v, want number %d", md.Name(), name, fd, num)
498+ }
499+ }
500+ }
501+}
502+
503+// TestCI3RoundTrip checks that the CI-3 messages survive the wire.
504+func TestCI3RoundTrip(t *testing.T) {
505+ msgs := []proto.Message{
506+ &ermite.Job{
507+ JobId: "j1", Secrets: map[string]string{"TOKEN": "s3cret"}, Vars: map[string]string{"REGION": "eu"},
508+ Environment: "staging", Trusted: true,
509+ Permissions: &ermite.JobPermissions{Levels: map[string]string{"contents": "write", "packages": "none"}},
510+ Cache: &ermite.JobCache{
511+ Repository: "ermite", WriteRef: "refs/pull/7/merge",
512+ ReadRefs: []string{"refs/pull/7/merge", "refs/heads/main"},
513+ },
514+ },
515+ &ermite.Run{Id: 9, Event: "workflow_dispatch", Trusted: true},
516+ &ermite.RunJob{Id: "j1", Status: ermite.CiStatus_CI_STATUS_PENDING, ConcurrencyGroup: "deploy"},
517+ &ermite.DispatchWorkflowRequest{Repo: "ermite", WorkflowPath: "ci.yml", Ref: "main", Inputs: map[string]string{"debug": "true"}},
518+ &ermite.DispatchWorkflowResponse{Run: &ermite.Run{Id: 9, Event: "workflow_dispatch"}},
519+ &ermite.SetSecretRequest{Scope: &ermite.SettingsScope{Where: &ermite.SettingsScope_Instance{Instance: true}}, Name: "A", Value: "v"},
520+ &ermite.SetSecretRequest{Scope: &ermite.SettingsScope{Where: &ermite.SettingsScope_Repo{Repo: "ermite"}}, Name: "A", Value: "v"},
521+ &ermite.SetVariableRequest{
522+ Scope: &ermite.SettingsScope{Where: &ermite.SettingsScope_Environment{Environment: &ermite.EnvironmentRef{Repo: "ermite", Name: "prod"}}},
523+ Name: "A", Value: "v",
524+ },
525+ &ermite.ListSecretsResponse{Secrets: []*ermite.Secret{{Name: "A"}}, NextPageToken: "t"},
526+ &ermite.ListEnvironmentsResponse{Environments: []*ermite.Environment{{Repo: "ermite", Name: "prod"}}},
527+ }
528+ for _, in := range msgs {
529+ b, err := proto.Marshal(in)
530+ if err != nil {
531+ t.Fatal(err)
532+ }
533+ out := in.ProtoReflect().New().Interface()
534+ if err := proto.Unmarshal(b, out); err != nil {
535+ t.Fatal(err)
536+ }
537+ if !proto.Equal(in, out) {
538+ t.Errorf("%T: round trip mismatch: %v != %v", in, out, in)
539+ }
540+ }
541+}
@@ -64,9 +64,20 @@ func TestProcedures(t *testing.T) {
64 {ermiteconnect.RunServiceGetStepSummariesProcedure, "/ermite.RunService/GetStepSummaries"},64 {ermiteconnect.RunServiceGetStepSummariesProcedure, "/ermite.RunService/GetStepSummaries"},
65 {ermiteconnect.RunServiceCancelRunProcedure, "/ermite.RunService/CancelRun"},65 {ermiteconnect.RunServiceCancelRunProcedure, "/ermite.RunService/CancelRun"},
66 {ermiteconnect.RunServiceRerunRunProcedure, "/ermite.RunService/RerunRun"},66 {ermiteconnect.RunServiceRerunRunProcedure, "/ermite.RunService/RerunRun"},
67+ {ermiteconnect.RunServiceDispatchWorkflowProcedure, "/ermite.RunService/DispatchWorkflow"},
67 {ermiteconnect.RunServiceListChecksProcedure, "/ermite.RunService/ListChecks"},68 {ermiteconnect.RunServiceListChecksProcedure, "/ermite.RunService/ListChecks"},
68 {ermiteconnect.RunServiceListRunnersProcedure, "/ermite.RunService/ListRunners"},69 {ermiteconnect.RunServiceListRunnersProcedure, "/ermite.RunService/ListRunners"},
69 {ermiteconnect.RunServiceRemoveRunnerProcedure, "/ermite.RunService/RemoveRunner"},70 {ermiteconnect.RunServiceRemoveRunnerProcedure, "/ermite.RunService/RemoveRunner"},
71+ {ermiteconnect.SecretServiceSetSecretProcedure, "/ermite.SecretService/SetSecret"},
72+ {ermiteconnect.SecretServiceListSecretsProcedure, "/ermite.SecretService/ListSecrets"},
73+ {ermiteconnect.SecretServiceDeleteSecretProcedure, "/ermite.SecretService/DeleteSecret"},
74+ {ermiteconnect.VariableServiceSetVariableProcedure, "/ermite.VariableService/SetVariable"},
75+ {ermiteconnect.VariableServiceGetVariableProcedure, "/ermite.VariableService/GetVariable"},
76+ {ermiteconnect.VariableServiceListVariablesProcedure, "/ermite.VariableService/ListVariables"},
77+ {ermiteconnect.VariableServiceDeleteVariableProcedure, "/ermite.VariableService/DeleteVariable"},
78+ {ermiteconnect.EnvironmentServiceCreateEnvironmentProcedure, "/ermite.EnvironmentService/CreateEnvironment"},
79+ {ermiteconnect.EnvironmentServiceListEnvironmentsProcedure, "/ermite.EnvironmentService/ListEnvironments"},
80+ {ermiteconnect.EnvironmentServiceDeleteEnvironmentProcedure, "/ermite.EnvironmentService/DeleteEnvironment"},
70 }81 }
71 for _, tt := range tests {82 for _, tt := range tests {
72 if tt.got != tt.want {83 if tt.got != tt.want {
@@ -104,6 +115,7 @@ func TestEnumNumbers(t *testing.T) {
104 {"CI_STATUS_QUEUED", int32(ermite.CiStatus_CI_STATUS_QUEUED), 1},115 {"CI_STATUS_QUEUED", int32(ermite.CiStatus_CI_STATUS_QUEUED), 1},
105 {"CI_STATUS_IN_PROGRESS", int32(ermite.CiStatus_CI_STATUS_IN_PROGRESS), 2},116 {"CI_STATUS_IN_PROGRESS", int32(ermite.CiStatus_CI_STATUS_IN_PROGRESS), 2},
106 {"CI_STATUS_COMPLETED", int32(ermite.CiStatus_CI_STATUS_COMPLETED), 3},117 {"CI_STATUS_COMPLETED", int32(ermite.CiStatus_CI_STATUS_COMPLETED), 3},
118+ {"CI_STATUS_PENDING", int32(ermite.CiStatus_CI_STATUS_PENDING), 4},
107 {"CI_CONCLUSION_UNSPECIFIED", int32(ermite.CiConclusion_CI_CONCLUSION_UNSPECIFIED), 0},119 {"CI_CONCLUSION_UNSPECIFIED", int32(ermite.CiConclusion_CI_CONCLUSION_UNSPECIFIED), 0},
108 {"CI_CONCLUSION_SUCCESS", int32(ermite.CiConclusion_CI_CONCLUSION_SUCCESS), 1},120 {"CI_CONCLUSION_SUCCESS", int32(ermite.CiConclusion_CI_CONCLUSION_SUCCESS), 1},
109 {"CI_CONCLUSION_FAILURE", int32(ermite.CiConclusion_CI_CONCLUSION_FAILURE), 2},121 {"CI_CONCLUSION_FAILURE", int32(ermite.CiConclusion_CI_CONCLUSION_FAILURE), 2},
@@ -450,3 +462,80 @@ func TestCI2RoundTrip(t *testing.T) {
450 }462 }
451 }463 }
452 }464 }
465+
466+// TestCI3FieldNumbers pins the numbers of the fields added for CI-3.
467+func TestCI3FieldNumbers(t *testing.T) {
468+ tests := []struct {
469+ msg proto.Message
470+ fields map[string]int
471+ }{
472+ {&ermite.Job{}, map[string]int{
473+ "secrets": 16, "vars": 17, "environment": 18, "permissions": 19, "cache": 20, "trusted": 21,
474+ }},
475+ {&ermite.JobPermissions{}, map[string]int{"levels": 1}},
476+ {&ermite.JobCache{}, map[string]int{"repository": 1, "write_ref": 2, "read_refs": 3}},
477+ {&ermite.Run{}, map[string]int{"trusted": 20}},
478+ {&ermite.RunJob{}, map[string]int{"concurrency_group": 20}},
479+ {&ermite.DispatchWorkflowRequest{}, map[string]int{"repo": 1, "workflow_path": 2, "ref": 3, "inputs": 4}},
480+ {&ermite.DispatchWorkflowResponse{}, map[string]int{"run": 1}},
481+ {&ermite.SettingsScope{}, map[string]int{"instance": 1, "repo": 2, "environment": 3}},
482+ {&ermite.EnvironmentRef{}, map[string]int{"repo": 1, "name": 2}},
483+ {&ermite.Secret{}, map[string]int{"name": 1, "updated_at": 2}},
484+ {&ermite.Variable{}, map[string]int{"name": 1, "value": 2, "updated_at": 3}},
485+ {&ermite.Environment{}, map[string]int{"repo": 1, "name": 2, "created_at": 3}},
486+ {&ermite.SetSecretRequest{}, map[string]int{"scope": 1, "name": 2, "value": 3}},
487+ {&ermite.ListSecretsRequest{}, map[string]int{"scope": 1, "page_size": 2, "page_token": 3}},
488+ {&ermite.ListSecretsResponse{}, map[string]int{"secrets": 1, "next_page_token": 2}},
489+ {&ermite.ListVariablesResponse{}, map[string]int{"variables": 1, "next_page_token": 2}},
490+ {&ermite.ListEnvironmentsRequest{}, map[string]int{"repo": 1, "page_size": 2, "page_token": 3}},
491+ {&ermite.ListEnvironmentsResponse{}, map[string]int{"environments": 1, "next_page_token": 2}},
492+ }
493+ for _, tt := range tests {
494+ md := tt.msg.ProtoReflect().Descriptor()
495+ for name, num := range tt.fields {
496+ if fd := md.Fields().ByName(protoreflect.Name(name)); fd == nil || int(fd.Number()) != num {
497+ t.Errorf("%s.%s: %v, want number %d", md.Name(), name, fd, num)
498+ }
499+ }
500+ }
501+}
502+
503+// TestCI3RoundTrip checks that the CI-3 messages survive the wire.
504+func TestCI3RoundTrip(t *testing.T) {
505+ msgs := []proto.Message{
506+ &ermite.Job{
507+ JobId: "j1", Secrets: map[string]string{"TOKEN": "s3cret"}, Vars: map[string]string{"REGION": "eu"},
508+ Environment: "staging", Trusted: true,
509+ Permissions: &ermite.JobPermissions{Levels: map[string]string{"contents": "write", "packages": "none"}},
510+ Cache: &ermite.JobCache{
511+ Repository: "ermite", WriteRef: "refs/pull/7/merge",
512+ ReadRefs: []string{"refs/pull/7/merge", "refs/heads/main"},
513+ },
514+ },
515+ &ermite.Run{Id: 9, Event: "workflow_dispatch", Trusted: true},
516+ &ermite.RunJob{Id: "j1", Status: ermite.CiStatus_CI_STATUS_PENDING, ConcurrencyGroup: "deploy"},
517+ &ermite.DispatchWorkflowRequest{Repo: "ermite", WorkflowPath: "ci.yml", Ref: "main", Inputs: map[string]string{"debug": "true"}},
518+ &ermite.DispatchWorkflowResponse{Run: &ermite.Run{Id: 9, Event: "workflow_dispatch"}},
519+ &ermite.SetSecretRequest{Scope: &ermite.SettingsScope{Where: &ermite.SettingsScope_Instance{Instance: true}}, Name: "A", Value: "v"},
520+ &ermite.SetSecretRequest{Scope: &ermite.SettingsScope{Where: &ermite.SettingsScope_Repo{Repo: "ermite"}}, Name: "A", Value: "v"},
521+ &ermite.SetVariableRequest{
522+ Scope: &ermite.SettingsScope{Where: &ermite.SettingsScope_Environment{Environment: &ermite.EnvironmentRef{Repo: "ermite", Name: "prod"}}},
523+ Name: "A", Value: "v",
524+ },
525+ &ermite.ListSecretsResponse{Secrets: []*ermite.Secret{{Name: "A"}}, NextPageToken: "t"},
526+ &ermite.ListEnvironmentsResponse{Environments: []*ermite.Environment{{Repo: "ermite", Name: "prod"}}},
527+ }
528+ for _, in := range msgs {
529+ b, err := proto.Marshal(in)
530+ if err != nil {
531+ t.Fatal(err)
532+ }
533+ out := in.ProtoReflect().New().Interface()
534+ if err := proto.Unmarshal(b, out); err != nil {
535+ t.Fatal(err)
536+ }
537+ if !proto.Equal(in, out) {
538+ t.Errorf("%T: round trip mismatch: %v != %v", in, out, in)
539+ }
540+ }
541+}
A proto/ermite/ci_settings.proto +297 -0
@@ -0,0 +1,297 @@
1+// SPDX-License-Identifier: MIT
2+
3+syntax = "proto3";
4+
5+package ermite;
6+
7+import "google/protobuf/timestamp.proto";
8+
9+// SettingsScope says where a secret or a variable lives, like the scopes of
10+// GitHub Actions. A job sees the ones of its instance, its repository and its
11+// environment, and the narrowest scope wins: environment over repository over
12+// instance.
13+message SettingsScope {
14+ // Where is the scope. It is required: a request without it is
15+ // invalid_argument.
16+ oneof where {
17+ // Instance is the whole server. It must be true when set. It needs a token
18+ // that is not restricted to repositories, or the root token.
19+ bool instance = 1;
20+ // Repo is the name of a repository.
21+ string repo = 2;
22+ // Environment is an environment of a repository.
23+ EnvironmentRef environment = 3;
24+ }
25+}
26+
27+// EnvironmentRef names an environment of a repository.
28+message EnvironmentRef {
29+ // Repo is the repository name.
30+ string repo = 1;
31+ // Name is the environment name, see Environment.name.
32+ string name = 2;
33+}
34+
35+// Secret describes a stored secret. It never contains the value: a value can
36+// be set but not read back.
37+message Secret {
38+ // Name is the name of the secret, in upper case as the server stores it.
39+ string name = 1;
40+ // UpdatedAt is when the value was last set.
41+ google.protobuf.Timestamp updated_at = 2;
42+}
43+
44+// Variable is a configuration variable. Unlike a secret its value can be read
45+// back and it may appear in logs.
46+message Variable {
47+ // Name is the name of the variable, in upper case as the server stores it.
48+ string name = 1;
49+ // Value is the value, at most 48 KiB.
50+ string value = 2;
51+ // UpdatedAt is when the value was last set.
52+ google.protobuf.Timestamp updated_at = 3;
53+}
54+
55+// Environment is a named deployment target of a repository, to which secrets
56+// and variables can be attached. A workflow job that names an environment
57+// creates it on first use, as on GitHub.
58+message Environment {
59+ // Repo is the repository name.
60+ string repo = 1;
61+ // Name is the name of the environment, 1 to 255 characters without control
62+ // characters, unique in the repository without regard to case. The server
63+ // keeps the case it was given.
64+ string name = 2;
65+ // CreatedAt is when the environment was created.
66+ google.protobuf.Timestamp created_at = 3;
67+}
68+
69+// SecretService manages the encrypted secrets that CI jobs receive, like `gh
70+// secret` does on GitHub. Names are 1 to 255 characters among letters, digits
71+// and "_", do not begin with a digit or with "GITHUB_", and are
72+// case-insensitive: the server stores them in upper case.
73+//
74+// Every RPC needs the secrets:write scope on a token that may access the
75+// repository of the scope (a repository-restricted token cannot use the
76+// instance scope), or the root token. Tokens limited to branches are refused
77+// with permission_denied, whatever their scopes: they never hold the owner's
78+// rights. A repository that does not exist or that the caller cannot access
79+// gives not_found.
80+//
81+// Values are encrypted at rest with the server's key. A server without a key
82+// refuses to set a secret with failed_precondition and sends no secrets to
83+// jobs. The API never returns a value, and the server never logs one.
84+//
85+// Page sizes and page tokens work as in the other services.
86+//
87+// Servers that implement it list "ci.secrets" in GetVersionResponse.features.
88+service SecretService {
89+ // SetSecret creates the secret or replaces its value. Fails with
90+ // invalid_argument if the name is not valid, if the value is empty or longer
91+ // than 48 KiB (49,152 bytes), or if scope is not set, with not_found if the
92+ // environment of the scope does not exist, and with failed_precondition if
93+ // the server has no encryption key.
94+ rpc SetSecret(SetSecretRequest) returns (SetSecretResponse);
95+ // ListSecrets lists the secrets of one scope, ordered by name. It lists only
96+ // the secrets set in that scope, not the ones the scope inherits. It never
97+ // returns values.
98+ rpc ListSecrets(ListSecretsRequest) returns (ListSecretsResponse);
99+ // DeleteSecret deletes a secret. Fails with not_found if it does not exist.
100+ rpc DeleteSecret(DeleteSecretRequest) returns (DeleteSecretResponse);
101+}
102+
103+// SetSecretRequest names a secret and gives its value.
104+message SetSecretRequest {
105+ // Scope is where the secret lives.
106+ SettingsScope scope = 1;
107+ // Name is the name of the secret.
108+ string name = 2;
109+ // Value is the value in plain text, 1 byte to 48 KiB. It may contain
110+ // several lines.
111+ string value = 3;
112+}
113+
114+// SetSecretResponse describes the stored secret.
115+message SetSecretResponse {
116+ // Secret is the secret, without its value.
117+ Secret secret = 1;
118+}
119+
120+// ListSecretsRequest selects a page of the secrets of a scope.
121+message ListSecretsRequest {
122+ // Scope is the scope to list.
123+ SettingsScope scope = 1;
124+ // PageSize is the maximum number of secrets to return. 0 means the server
125+ // default; values above the server maximum are lowered to it.
126+ int32 page_size = 2;
127+ // PageToken is the next_page_token of a previous response. Empty for the
128+ // first page.
129+ string page_token = 3;
130+}
131+
132+// ListSecretsResponse is one page of secrets.
133+message ListSecretsResponse {
134+ // Secrets are the secrets of this page, ordered by name, without values.
135+ repeated Secret secrets = 1;
136+ // NextPageToken is passed as page_token to get the next page. Empty when
137+ // there is no next page.
138+ string next_page_token = 2;
139+}
140+
141+// DeleteSecretRequest names the secret to delete.
142+message DeleteSecretRequest {
143+ // Scope is where the secret lives.
144+ SettingsScope scope = 1;
145+ // Name is the name of the secret, without regard to case.
146+ string name = 2;
147+}
148+
149+// DeleteSecretResponse is empty.
150+message DeleteSecretResponse {}
151+
152+// VariableService manages the configuration variables that CI jobs receive in
153+// the "vars" context, like `gh variable` does on GitHub. Names follow the
154+// rules of SecretService. Access rules, errors and page handling are those of
155+// SecretService, and the same servers (feature "ci.secrets") implement it.
156+service VariableService {
157+ // SetVariable creates the variable or replaces its value. Fails with
158+ // invalid_argument if the name is not valid, if the value is longer than 48
159+ // KiB (49,152 bytes) or if scope is not set, and with not_found if the
160+ // environment of the scope does not exist. An empty value is allowed.
161+ rpc SetVariable(SetVariableRequest) returns (SetVariableResponse);
162+ // GetVariable returns one variable of one scope, with its value. Fails with
163+ // not_found if it does not exist in that scope.
164+ rpc GetVariable(GetVariableRequest) returns (GetVariableResponse);
165+ // ListVariables lists the variables of one scope, ordered by name, with
166+ // their values. It lists only the variables set in that scope.
167+ rpc ListVariables(ListVariablesRequest) returns (ListVariablesResponse);
168+ // DeleteVariable deletes a variable. Fails with not_found if it does not
169+ // exist.
170+ rpc DeleteVariable(DeleteVariableRequest) returns (DeleteVariableResponse);
171+}
172+
173+// SetVariableRequest names a variable and gives its value.
174+message SetVariableRequest {
175+ // Scope is where the variable lives.
176+ SettingsScope scope = 1;
177+ // Name is the name of the variable.
178+ string name = 2;
179+ // Value is the value, at most 48 KiB.
180+ string value = 3;
181+}
182+
183+// SetVariableResponse holds the stored variable.
184+message SetVariableResponse {
185+ // Variable is the variable as stored.
186+ Variable variable = 1;
187+}
188+
189+// GetVariableRequest names a variable.
190+message GetVariableRequest {
191+ // Scope is where the variable lives.
192+ SettingsScope scope = 1;
193+ // Name is the name of the variable, without regard to case.
194+ string name = 2;
195+}
196+
197+// GetVariableResponse holds a variable.
198+message GetVariableResponse {
199+ // Variable is the variable.
200+ Variable variable = 1;
201+}
202+
203+// ListVariablesRequest selects a page of the variables of a scope.
204+message ListVariablesRequest {
205+ // Scope is the scope to list.
206+ SettingsScope scope = 1;
207+ // PageSize is the maximum number of variables to return. 0 means the server
208+ // default; values above the server maximum are lowered to it.
209+ int32 page_size = 2;
210+ // PageToken is the next_page_token of a previous response. Empty for the
211+ // first page.
212+ string page_token = 3;
213+}
214+
215+// ListVariablesResponse is one page of variables.
216+message ListVariablesResponse {
217+ // Variables are the variables of this page, ordered by name.
218+ repeated Variable variables = 1;
219+ // NextPageToken is passed as page_token to get the next page. Empty when
220+ // there is no next page.
221+ string next_page_token = 2;
222+}
223+
224+// DeleteVariableRequest names the variable to delete.
225+message DeleteVariableRequest {
226+ // Scope is where the variable lives.
227+ SettingsScope scope = 1;
228+ // Name is the name of the variable, without regard to case.
229+ string name = 2;
230+}
231+
232+// DeleteVariableResponse is empty.
233+message DeleteVariableResponse {}
234+
235+// EnvironmentService manages the environments of a repository, to which
236+// secrets and variables are attached. Environments have no protection rules
237+// and no deployments. Access rules and errors are those of SecretService (the
238+// secrets:write scope, no token limited to branches), and the same servers
239+// (feature "ci.secrets") implement it.
240+service EnvironmentService {
241+ // CreateEnvironment creates an environment. It succeeds and changes nothing
242+ // if the environment already exists (without regard to case), as GitHub's
243+ // create-or-update does. Fails with invalid_argument if the name is not
244+ // valid and with not_found if the repository does not exist.
245+ rpc CreateEnvironment(CreateEnvironmentRequest) returns (CreateEnvironmentResponse);
246+ // ListEnvironments lists the environments of a repository, ordered by name.
247+ rpc ListEnvironments(ListEnvironmentsRequest) returns (ListEnvironmentsResponse);
248+ // DeleteEnvironment deletes an environment with its secrets and variables.
249+ // Fails with not_found if it does not exist.
250+ rpc DeleteEnvironment(DeleteEnvironmentRequest) returns (DeleteEnvironmentResponse);
251+}
252+
253+// CreateEnvironmentRequest names the environment to create.
254+message CreateEnvironmentRequest {
255+ // Repo is the repository name.
256+ string repo = 1;
257+ // Name is the name of the environment, see Environment.name.
258+ string name = 2;
259+}
260+
261+// CreateEnvironmentResponse holds the environment.
262+message CreateEnvironmentResponse {
263+ // Environment is the environment, new or existing.
264+ Environment environment = 1;
265+}
266+
267+// ListEnvironmentsRequest selects a page of the environments of a repository.
268+message ListEnvironmentsRequest {
269+ // Repo is the repository name.
270+ string repo = 1;
271+ // PageSize is the maximum number of environments to return. 0 means the
272+ // server default; values above the server maximum are lowered to it.
273+ int32 page_size = 2;
274+ // PageToken is the next_page_token of a previous response. Empty for the
275+ // first page.
276+ string page_token = 3;
277+}
278+
279+// ListEnvironmentsResponse is one page of environments.
280+message ListEnvironmentsResponse {
281+ // Environments are the environments of this page, ordered by name.
282+ repeated Environment environments = 1;
283+ // NextPageToken is passed as page_token to get the next page. Empty when
284+ // there is no next page.
285+ string next_page_token = 2;
286+}
287+
288+// DeleteEnvironmentRequest names the environment to delete.
289+message DeleteEnvironmentRequest {
290+ // Repo is the repository name.
291+ string repo = 1;
292+ // Name is the name of the environment, without regard to case.
293+ string name = 2;
294+}
295+
296+// DeleteEnvironmentResponse is empty.
297+message DeleteEnvironmentResponse {}
@@ -0,0 +1,297 @@
1+// SPDX-License-Identifier: MIT
2+
3+syntax = "proto3";
4+
5+package ermite;
6+
7+import "google/protobuf/timestamp.proto";
8+
9+// SettingsScope says where a secret or a variable lives, like the scopes of
10+// GitHub Actions. A job sees the ones of its instance, its repository and its
11+// environment, and the narrowest scope wins: environment over repository over
12+// instance.
13+message SettingsScope {
14+ // Where is the scope. It is required: a request without it is
15+ // invalid_argument.
16+ oneof where {
17+ // Instance is the whole server. It must be true when set. It needs a token
18+ // that is not restricted to repositories, or the root token.
19+ bool instance = 1;
20+ // Repo is the name of a repository.
21+ string repo = 2;
22+ // Environment is an environment of a repository.
23+ EnvironmentRef environment = 3;
24+ }
25+}
26+
27+// EnvironmentRef names an environment of a repository.
28+message EnvironmentRef {
29+ // Repo is the repository name.
30+ string repo = 1;
31+ // Name is the environment name, see Environment.name.
32+ string name = 2;
33+}
34+
35+// Secret describes a stored secret. It never contains the value: a value can
36+// be set but not read back.
37+message Secret {
38+ // Name is the name of the secret, in upper case as the server stores it.
39+ string name = 1;
40+ // UpdatedAt is when the value was last set.
41+ google.protobuf.Timestamp updated_at = 2;
42+}
43+
44+// Variable is a configuration variable. Unlike a secret its value can be read
45+// back and it may appear in logs.
46+message Variable {
47+ // Name is the name of the variable, in upper case as the server stores it.
48+ string name = 1;
49+ // Value is the value, at most 48 KiB.
50+ string value = 2;
51+ // UpdatedAt is when the value was last set.
52+ google.protobuf.Timestamp updated_at = 3;
53+}
54+
55+// Environment is a named deployment target of a repository, to which secrets
56+// and variables can be attached. A workflow job that names an environment
57+// creates it on first use, as on GitHub.
58+message Environment {
59+ // Repo is the repository name.
60+ string repo = 1;
61+ // Name is the name of the environment, 1 to 255 characters without control
62+ // characters, unique in the repository without regard to case. The server
63+ // keeps the case it was given.
64+ string name = 2;
65+ // CreatedAt is when the environment was created.
66+ google.protobuf.Timestamp created_at = 3;
67+}
68+
69+// SecretService manages the encrypted secrets that CI jobs receive, like `gh
70+// secret` does on GitHub. Names are 1 to 255 characters among letters, digits
71+// and "_", do not begin with a digit or with "GITHUB_", and are
72+// case-insensitive: the server stores them in upper case.
73+//
74+// Every RPC needs the secrets:write scope on a token that may access the
75+// repository of the scope (a repository-restricted token cannot use the
76+// instance scope), or the root token. Tokens limited to branches are refused
77+// with permission_denied, whatever their scopes: they never hold the owner's
78+// rights. A repository that does not exist or that the caller cannot access
79+// gives not_found.
80+//
81+// Values are encrypted at rest with the server's key. A server without a key
82+// refuses to set a secret with failed_precondition and sends no secrets to
83+// jobs. The API never returns a value, and the server never logs one.
84+//
85+// Page sizes and page tokens work as in the other services.
86+//
87+// Servers that implement it list "ci.secrets" in GetVersionResponse.features.
88+service SecretService {
89+ // SetSecret creates the secret or replaces its value. Fails with
90+ // invalid_argument if the name is not valid, if the value is empty or longer
91+ // than 48 KiB (49,152 bytes), or if scope is not set, with not_found if the
92+ // environment of the scope does not exist, and with failed_precondition if
93+ // the server has no encryption key.
94+ rpc SetSecret(SetSecretRequest) returns (SetSecretResponse);
95+ // ListSecrets lists the secrets of one scope, ordered by name. It lists only
96+ // the secrets set in that scope, not the ones the scope inherits. It never
97+ // returns values.
98+ rpc ListSecrets(ListSecretsRequest) returns (ListSecretsResponse);
99+ // DeleteSecret deletes a secret. Fails with not_found if it does not exist.
100+ rpc DeleteSecret(DeleteSecretRequest) returns (DeleteSecretResponse);
101+}
102+
103+// SetSecretRequest names a secret and gives its value.
104+message SetSecretRequest {
105+ // Scope is where the secret lives.
106+ SettingsScope scope = 1;
107+ // Name is the name of the secret.
108+ string name = 2;
109+ // Value is the value in plain text, 1 byte to 48 KiB. It may contain
110+ // several lines.
111+ string value = 3;
112+}
113+
114+// SetSecretResponse describes the stored secret.
115+message SetSecretResponse {
116+ // Secret is the secret, without its value.
117+ Secret secret = 1;
118+}
119+
120+// ListSecretsRequest selects a page of the secrets of a scope.
121+message ListSecretsRequest {
122+ // Scope is the scope to list.
123+ SettingsScope scope = 1;
124+ // PageSize is the maximum number of secrets to return. 0 means the server
125+ // default; values above the server maximum are lowered to it.
126+ int32 page_size = 2;
127+ // PageToken is the next_page_token of a previous response. Empty for the
128+ // first page.
129+ string page_token = 3;
130+}
131+
132+// ListSecretsResponse is one page of secrets.
133+message ListSecretsResponse {
134+ // Secrets are the secrets of this page, ordered by name, without values.
135+ repeated Secret secrets = 1;
136+ // NextPageToken is passed as page_token to get the next page. Empty when
137+ // there is no next page.
138+ string next_page_token = 2;
139+}
140+
141+// DeleteSecretRequest names the secret to delete.
142+message DeleteSecretRequest {
143+ // Scope is where the secret lives.
144+ SettingsScope scope = 1;
145+ // Name is the name of the secret, without regard to case.
146+ string name = 2;
147+}
148+
149+// DeleteSecretResponse is empty.
150+message DeleteSecretResponse {}
151+
152+// VariableService manages the configuration variables that CI jobs receive in
153+// the "vars" context, like `gh variable` does on GitHub. Names follow the
154+// rules of SecretService. Access rules, errors and page handling are those of
155+// SecretService, and the same servers (feature "ci.secrets") implement it.
156+service VariableService {
157+ // SetVariable creates the variable or replaces its value. Fails with
158+ // invalid_argument if the name is not valid, if the value is longer than 48
159+ // KiB (49,152 bytes) or if scope is not set, and with not_found if the
160+ // environment of the scope does not exist. An empty value is allowed.
161+ rpc SetVariable(SetVariableRequest) returns (SetVariableResponse);
162+ // GetVariable returns one variable of one scope, with its value. Fails with
163+ // not_found if it does not exist in that scope.
164+ rpc GetVariable(GetVariableRequest) returns (GetVariableResponse);
165+ // ListVariables lists the variables of one scope, ordered by name, with
166+ // their values. It lists only the variables set in that scope.
167+ rpc ListVariables(ListVariablesRequest) returns (ListVariablesResponse);
168+ // DeleteVariable deletes a variable. Fails with not_found if it does not
169+ // exist.
170+ rpc DeleteVariable(DeleteVariableRequest) returns (DeleteVariableResponse);
171+}
172+
173+// SetVariableRequest names a variable and gives its value.
174+message SetVariableRequest {
175+ // Scope is where the variable lives.
176+ SettingsScope scope = 1;
177+ // Name is the name of the variable.
178+ string name = 2;
179+ // Value is the value, at most 48 KiB.
180+ string value = 3;
181+}
182+
183+// SetVariableResponse holds the stored variable.
184+message SetVariableResponse {
185+ // Variable is the variable as stored.
186+ Variable variable = 1;
187+}
188+
189+// GetVariableRequest names a variable.
190+message GetVariableRequest {
191+ // Scope is where the variable lives.
192+ SettingsScope scope = 1;
193+ // Name is the name of the variable, without regard to case.
194+ string name = 2;
195+}
196+
197+// GetVariableResponse holds a variable.
198+message GetVariableResponse {
199+ // Variable is the variable.
200+ Variable variable = 1;
201+}
202+
203+// ListVariablesRequest selects a page of the variables of a scope.
204+message ListVariablesRequest {
205+ // Scope is the scope to list.
206+ SettingsScope scope = 1;
207+ // PageSize is the maximum number of variables to return. 0 means the server
208+ // default; values above the server maximum are lowered to it.
209+ int32 page_size = 2;
210+ // PageToken is the next_page_token of a previous response. Empty for the
211+ // first page.
212+ string page_token = 3;
213+}
214+
215+// ListVariablesResponse is one page of variables.
216+message ListVariablesResponse {
217+ // Variables are the variables of this page, ordered by name.
218+ repeated Variable variables = 1;
219+ // NextPageToken is passed as page_token to get the next page. Empty when
220+ // there is no next page.
221+ string next_page_token = 2;
222+}
223+
224+// DeleteVariableRequest names the variable to delete.
225+message DeleteVariableRequest {
226+ // Scope is where the variable lives.
227+ SettingsScope scope = 1;
228+ // Name is the name of the variable, without regard to case.
229+ string name = 2;
230+}
231+
232+// DeleteVariableResponse is empty.
233+message DeleteVariableResponse {}
234+
235+// EnvironmentService manages the environments of a repository, to which
236+// secrets and variables are attached. Environments have no protection rules
237+// and no deployments. Access rules and errors are those of SecretService (the
238+// secrets:write scope, no token limited to branches), and the same servers
239+// (feature "ci.secrets") implement it.
240+service EnvironmentService {
241+ // CreateEnvironment creates an environment. It succeeds and changes nothing
242+ // if the environment already exists (without regard to case), as GitHub's
243+ // create-or-update does. Fails with invalid_argument if the name is not
244+ // valid and with not_found if the repository does not exist.
245+ rpc CreateEnvironment(CreateEnvironmentRequest) returns (CreateEnvironmentResponse);
246+ // ListEnvironments lists the environments of a repository, ordered by name.
247+ rpc ListEnvironments(ListEnvironmentsRequest) returns (ListEnvironmentsResponse);
248+ // DeleteEnvironment deletes an environment with its secrets and variables.
249+ // Fails with not_found if it does not exist.
250+ rpc DeleteEnvironment(DeleteEnvironmentRequest) returns (DeleteEnvironmentResponse);
251+}
252+
253+// CreateEnvironmentRequest names the environment to create.
254+message CreateEnvironmentRequest {
255+ // Repo is the repository name.
256+ string repo = 1;
257+ // Name is the name of the environment, see Environment.name.
258+ string name = 2;
259+}
260+
261+// CreateEnvironmentResponse holds the environment.
262+message CreateEnvironmentResponse {
263+ // Environment is the environment, new or existing.
264+ Environment environment = 1;
265+}
266+
267+// ListEnvironmentsRequest selects a page of the environments of a repository.
268+message ListEnvironmentsRequest {
269+ // Repo is the repository name.
270+ string repo = 1;
271+ // PageSize is the maximum number of environments to return. 0 means the
272+ // server default; values above the server maximum are lowered to it.
273+ int32 page_size = 2;
274+ // PageToken is the next_page_token of a previous response. Empty for the
275+ // first page.
276+ string page_token = 3;
277+}
278+
279+// ListEnvironmentsResponse is one page of environments.
280+message ListEnvironmentsResponse {
281+ // Environments are the environments of this page, ordered by name.
282+ repeated Environment environments = 1;
283+ // NextPageToken is passed as page_token to get the next page. Empty when
284+ // there is no next page.
285+ string next_page_token = 2;
286+}
287+
288+// DeleteEnvironmentRequest names the environment to delete.
289+message DeleteEnvironmentRequest {
290+ // Repo is the repository name.
291+ string repo = 1;
292+ // Name is the name of the environment, without regard to case.
293+ string name = 2;
294+}
295+
296+// DeleteEnvironmentResponse is empty.
297+message DeleteEnvironmentResponse {}
M proto/ermite/run.proto +61 -6
@@ -36,9 +36,10 @@ message Run {
3636 // the name of the workflow registered for workflow_path (the "name" of that
3737 // file on the default branch, else workflow_name).
3838 string title = 7;
39- // Event is the event that triggered the run, in GitHub's name: "push" (the
40- // only one for now; push to a branch or a tag, and merge of a merge
41- // request). New values may be added; clients show the ones they do not
39+ // Event is the event that triggered the run, in GitHub's name: "push" (push
40+ // to a branch or a tag, and merge of a merge request), and from servers with
41+ // the matching trigger "pull_request", "workflow_dispatch", "schedule" and
42+ // "workflow_run". New values may be added; clients show the ones they do not
4243 // know as they are.
4344 string event = 8;
4445 // Ref is the full ref name that was pushed, for example "refs/heads/main"
@@ -84,6 +85,14 @@ message Run {
8485 // the workflow has a "run-name". A run stored before this field existed
8586 // reads as workflow_name.
8687 string name = 19;
88+ // Trusted is true when the run may use secrets and a job token with write
89+ // permissions: its actor is the owner, a "workflow_run" inherits it from the
90+ // run that triggered it, and a re-run keeps it only if the original run had
91+ // it and the caller of the re-run is the owner. It is false when the actor
92+ // is a token limited to branches (see Job.trusted). It never goes from false
93+ // to true. False for a run stored before this field existed and from servers
94+ // without the feature "ci.secrets".
95+ bool trusted = 20;
8796 }
8897
8998 // RunJob is a job of a run as people see it: the state of one job instance
@@ -109,7 +118,7 @@ message RunJob {
109118 // name of the job's check.
110119 string name = 6;
111120 // Status is where the job is. A job waits QUEUED for a runner and for the
112- // jobs it needs.
121+ // jobs it needs, and PENDING for its concurrency group.
113122 CiStatus status = 7;
114123 // Conclusion is how the job ended. Unset until status is COMPLETED.
115124 CiConclusion conclusion = 8;
@@ -148,6 +157,12 @@ message RunJob {
148157 // and never goes back. A client that holds two copies of a job keeps the
149158 // one with the higher version and drops the other, as for Run.version.
150159 int64 version = 19;
160+ // ConcurrencyGroup is the evaluated concurrency group of the job (its
161+ // "concurrency:", or the one of its workflow), compared without regard to
162+ // case within the repository. Empty when the job has none and from servers
163+ // without the feature "ci.concurrency". The job is PENDING while another job
164+ // of the group runs or a newer one is waiting.
165+ string concurrency_group = 20;
151166 }
152167
153168 // Step is one step of a job, with where its lines are in the job log.
@@ -261,12 +276,15 @@ message Runner {
261276 // request (other fields must be unchanged).
262277 //
263278 // Servers that implement the runs side (every RPC but ListRunners,
264-// RemoveRunner, ListAnnotations and GetStepSummaries) list "ci.runs" in
279+// RemoveRunner, ListAnnotations, GetStepSummaries and DispatchWorkflow) list
280+// "ci.runs" in
265281 // GetVersionResponse.features; those that
266282 // implement the runners side list "ci.runners", as RunnerService does. A server
267283 // that honours the filters of ListRunsRequest also lists "ci.runs.filters".
268284 // ListAnnotations needs "ci.annotations" and GetStepSummaries "ci.summaries",
269-// which are also the features of the runner side of each.
285+// which are also the features of the runner side of each. DispatchWorkflow
286+// needs "ci.dispatch". RunJob.concurrency_group and CI_STATUS_PENDING belong
287+// to "ci.concurrency", Run.trusted to "ci.secrets".
270288 service RunService {
271289 // ListRuns lists the runs of a repository, highest id (newest) first. Each
272290 // run is described by its latest attempt. The filters narrow the result; a
@@ -332,6 +350,21 @@ service RunService {
332350 // with failed_precondition if the latest attempt has not completed, or if
333351 // failed_only is set and no job failed. The new attempt is returned QUEUED.
334352 rpc RerunRun(RerunRunRequest) returns (RerunRunResponse);
353+ // DispatchWorkflow starts a run of a workflow file by hand, like `gh
354+ // workflow run` and GitHub's "workflow_dispatch" event. Needs the ci:write
355+ // scope on the repository. The workflow is read at ref and must have
356+ // "workflow_dispatch" among its events. The run has event
357+ // "workflow_dispatch", ref and the commit ref points to, and the caller as
358+ // actor; it is trusted when the caller is the owner and not trusted when the
359+ // caller is a token limited to branches. The run is returned QUEUED, before
360+ // any job has been given to a runner. Only servers with the feature
361+ // "ci.dispatch" implement it (unimplemented otherwise). Fails with
362+ // not_found if the repository, the workflow file or ref does not exist,
363+ // with failed_precondition if the workflow does not declare
364+ // "workflow_dispatch", and with invalid_argument if an input is unknown, is
365+ // missing while required without default, or has a value of the wrong type
366+ // or outside its choices, or if the workflow file is not valid.
367+ rpc DispatchWorkflow(DispatchWorkflowRequest) returns (DispatchWorkflowResponse);
335368 // ListChecks lists the checks of a commit: for each job of each run on that
336369 // sha, the one of the latest attempt, ordered by creation time then name.
337370 // A commit without a run has no check: the list is empty, which is not an
@@ -556,6 +589,28 @@ message RerunRunResponse {
556589 Run run = 1;
557590 }
558591
592+// DispatchWorkflowRequest names the workflow to run and its inputs.
593+message DispatchWorkflowRequest {
594+ // Repo is the repository name.
595+ string repo = 1;
596+ // WorkflowPath is the path of the workflow file at ref, for example
597+ // ".github/workflows/ci.yml", or its file name ("ci.yml").
598+ string workflow_path = 2;
599+ // Ref is the branch or tag to run on, by short name ("main") or full name
600+ // ("refs/heads/main"). Empty means the default branch of the repository.
601+ string ref = 3;
602+ // Inputs are the values of the "inputs" of the workflow's
603+ // "workflow_dispatch" by name, as strings: a boolean is "true" or "false", a
604+ // number its decimal text. An input left out takes its default.
605+ map<string, string> inputs = 4;
606+}
607+
608+// DispatchWorkflowResponse holds the new run.
609+message DispatchWorkflowResponse {
610+ // Run is the new run, QUEUED, attempt 1.
611+ Run run = 1;
612+}
613+
559614 // ListChecksRequest names the commit.
560615 message ListChecksRequest {
561616 // Repo is the repository name.
@@ -36,9 +36,10 @@ message Run {
36 // the name of the workflow registered for workflow_path (the "name" of that36 // the name of the workflow registered for workflow_path (the "name" of that
37 // file on the default branch, else workflow_name).37 // file on the default branch, else workflow_name).
38 string title = 7;38 string title = 7;
39- // Event is the event that triggered the run, in GitHub's name: "push" (the39+ // Event is the event that triggered the run, in GitHub's name: "push" (push
40- // only one for now; push to a branch or a tag, and merge of a merge40+ // to a branch or a tag, and merge of a merge request), and from servers with
41- // request). New values may be added; clients show the ones they do not41+ // the matching trigger "pull_request", "workflow_dispatch", "schedule" and
42+ // "workflow_run". New values may be added; clients show the ones they do not
42 // know as they are.43 // know as they are.
43 string event = 8;44 string event = 8;
44 // Ref is the full ref name that was pushed, for example "refs/heads/main"45 // Ref is the full ref name that was pushed, for example "refs/heads/main"
@@ -84,6 +85,14 @@ message Run {
84 // the workflow has a "run-name". A run stored before this field existed85 // the workflow has a "run-name". A run stored before this field existed
85 // reads as workflow_name.86 // reads as workflow_name.
86 string name = 19;87 string name = 19;
88+ // Trusted is true when the run may use secrets and a job token with write
89+ // permissions: its actor is the owner, a "workflow_run" inherits it from the
90+ // run that triggered it, and a re-run keeps it only if the original run had
91+ // it and the caller of the re-run is the owner. It is false when the actor
92+ // is a token limited to branches (see Job.trusted). It never goes from false
93+ // to true. False for a run stored before this field existed and from servers
94+ // without the feature "ci.secrets".
95+ bool trusted = 20;
87 }96 }
88 97
89 // RunJob is a job of a run as people see it: the state of one job instance98 // RunJob is a job of a run as people see it: the state of one job instance
@@ -109,7 +118,7 @@ message RunJob {
109 // name of the job's check.118 // name of the job's check.
110 string name = 6;119 string name = 6;
111 // Status is where the job is. A job waits QUEUED for a runner and for the120 // Status is where the job is. A job waits QUEUED for a runner and for the
112- // jobs it needs.121+ // jobs it needs, and PENDING for its concurrency group.
113 CiStatus status = 7;122 CiStatus status = 7;
114 // Conclusion is how the job ended. Unset until status is COMPLETED.123 // Conclusion is how the job ended. Unset until status is COMPLETED.
115 CiConclusion conclusion = 8;124 CiConclusion conclusion = 8;
@@ -148,6 +157,12 @@ message RunJob {
148 // and never goes back. A client that holds two copies of a job keeps the157 // and never goes back. A client that holds two copies of a job keeps the
149 // one with the higher version and drops the other, as for Run.version.158 // one with the higher version and drops the other, as for Run.version.
150 int64 version = 19;159 int64 version = 19;
160+ // ConcurrencyGroup is the evaluated concurrency group of the job (its
161+ // "concurrency:", or the one of its workflow), compared without regard to
162+ // case within the repository. Empty when the job has none and from servers
163+ // without the feature "ci.concurrency". The job is PENDING while another job
164+ // of the group runs or a newer one is waiting.
165+ string concurrency_group = 20;
151 }166 }
152 167
153 // Step is one step of a job, with where its lines are in the job log.168 // Step is one step of a job, with where its lines are in the job log.
@@ -261,12 +276,15 @@ message Runner {
261 // request (other fields must be unchanged).276 // request (other fields must be unchanged).
262 //277 //
263 // Servers that implement the runs side (every RPC but ListRunners,278 // Servers that implement the runs side (every RPC but ListRunners,
264-// RemoveRunner, ListAnnotations and GetStepSummaries) list "ci.runs" in279+// RemoveRunner, ListAnnotations, GetStepSummaries and DispatchWorkflow) list
280+// "ci.runs" in
265 // GetVersionResponse.features; those that281 // GetVersionResponse.features; those that
266 // implement the runners side list "ci.runners", as RunnerService does. A server282 // implement the runners side list "ci.runners", as RunnerService does. A server
267 // that honours the filters of ListRunsRequest also lists "ci.runs.filters".283 // that honours the filters of ListRunsRequest also lists "ci.runs.filters".
268 // ListAnnotations needs "ci.annotations" and GetStepSummaries "ci.summaries",284 // ListAnnotations needs "ci.annotations" and GetStepSummaries "ci.summaries",
269-// which are also the features of the runner side of each.285+// which are also the features of the runner side of each. DispatchWorkflow
286+// needs "ci.dispatch". RunJob.concurrency_group and CI_STATUS_PENDING belong
287+// to "ci.concurrency", Run.trusted to "ci.secrets".
270 service RunService {288 service RunService {
271 // ListRuns lists the runs of a repository, highest id (newest) first. Each289 // ListRuns lists the runs of a repository, highest id (newest) first. Each
272 // run is described by its latest attempt. The filters narrow the result; a290 // run is described by its latest attempt. The filters narrow the result; a
@@ -332,6 +350,21 @@ service RunService {
332 // with failed_precondition if the latest attempt has not completed, or if350 // with failed_precondition if the latest attempt has not completed, or if
333 // failed_only is set and no job failed. The new attempt is returned QUEUED.351 // failed_only is set and no job failed. The new attempt is returned QUEUED.
334 rpc RerunRun(RerunRunRequest) returns (RerunRunResponse);352 rpc RerunRun(RerunRunRequest) returns (RerunRunResponse);
353+ // DispatchWorkflow starts a run of a workflow file by hand, like `gh
354+ // workflow run` and GitHub's "workflow_dispatch" event. Needs the ci:write
355+ // scope on the repository. The workflow is read at ref and must have
356+ // "workflow_dispatch" among its events. The run has event
357+ // "workflow_dispatch", ref and the commit ref points to, and the caller as
358+ // actor; it is trusted when the caller is the owner and not trusted when the
359+ // caller is a token limited to branches. The run is returned QUEUED, before
360+ // any job has been given to a runner. Only servers with the feature
361+ // "ci.dispatch" implement it (unimplemented otherwise). Fails with
362+ // not_found if the repository, the workflow file or ref does not exist,
363+ // with failed_precondition if the workflow does not declare
364+ // "workflow_dispatch", and with invalid_argument if an input is unknown, is
365+ // missing while required without default, or has a value of the wrong type
366+ // or outside its choices, or if the workflow file is not valid.
367+ rpc DispatchWorkflow(DispatchWorkflowRequest) returns (DispatchWorkflowResponse);
335 // ListChecks lists the checks of a commit: for each job of each run on that368 // ListChecks lists the checks of a commit: for each job of each run on that
336 // sha, the one of the latest attempt, ordered by creation time then name.369 // sha, the one of the latest attempt, ordered by creation time then name.
337 // A commit without a run has no check: the list is empty, which is not an370 // A commit without a run has no check: the list is empty, which is not an
@@ -556,6 +589,28 @@ message RerunRunResponse {
556 Run run = 1;589 Run run = 1;
557 }590 }
558 591
592+// DispatchWorkflowRequest names the workflow to run and its inputs.
593+message DispatchWorkflowRequest {
594+ // Repo is the repository name.
595+ string repo = 1;
596+ // WorkflowPath is the path of the workflow file at ref, for example
597+ // ".github/workflows/ci.yml", or its file name ("ci.yml").
598+ string workflow_path = 2;
599+ // Ref is the branch or tag to run on, by short name ("main") or full name
600+ // ("refs/heads/main"). Empty means the default branch of the repository.
601+ string ref = 3;
602+ // Inputs are the values of the "inputs" of the workflow's
603+ // "workflow_dispatch" by name, as strings: a boolean is "true" or "false", a
604+ // number its decimal text. An input left out takes its default.
605+ map<string, string> inputs = 4;
606+}
607+
608+// DispatchWorkflowResponse holds the new run.
609+message DispatchWorkflowResponse {
610+ // Run is the new run, QUEUED, attempt 1.
611+ Run run = 1;
612+}
613+
559 // ListChecksRequest names the commit.614 // ListChecksRequest names the commit.
560 message ListChecksRequest {615 message ListChecksRequest {
561 // Repo is the repository name.616 // Repo is the repository name.
M proto/ermite/runner.proto +84 -4
@@ -19,6 +19,11 @@ enum CiStatus {
1919 CI_STATUS_IN_PROGRESS = 2;
2020 // Over. The conclusion says how it ended.
2121 CI_STATUS_COMPLETED = 3;
22+ // Held back by a concurrency group: another run or job of the group is
23+ // running, or a newer one is waiting (see RunJob.concurrency_group). Only for
24+ // jobs and checks, and only from servers with the feature "ci.concurrency";
25+ // a client that does not know the value shows it as queued.
26+ CI_STATUS_PENDING = 4;
2227 }
2328
2429 // CiConclusion is how a run, a job, a step or a check ended, with GitHub's
@@ -171,7 +176,9 @@ enum ActionSource {
171176 // Job.github_token also list "ci.actions", those that accept annotations
172177 // (UpdateJobRequest.annotations, CompleteJobRequest.annotations) list
173178 // "ci.annotations", and those that implement UploadSummary list
174-// "ci.summaries". A server without a feature ignores the fields of that
179+// "ci.summaries". Those that send Job.secrets, Job.vars, Job.environment,
180+// Job.permissions and Job.trusted list "ci.secrets", and those that send
181+// Job.cache list "ci.cache". A server without a feature ignores the fields of that
175182 // feature (protobuf drops unknown fields) and answers unimplemented to its
176183 // RPCs; a runner that needs one checks GetVersion first.
177184 service RunnerService {
@@ -534,14 +541,84 @@ message Job {
534541 // "secrets.GITHUB_TOKEN" of the job: "ermitegh_" and 43 base64url characters
535542 // (32 random bytes, no padding). Unlike job_token it is meant for the code of
536543 // the job: the runner gives it to the sandbox (actions/checkout clones with
537- // it). It can only read the repository of the run (read-only, whatever
538- // "permissions:" says), and is valid from the assignment until the job ends
544+ // it). It can only act on the repository of the run: read-only from servers
545+ // without the feature "ci.secrets", whatever "permissions:" says, and with
546+ // the rights of permissions from those that have it (never more than read
547+ // when trusted is false). It is valid from the assignment until the job ends
539548 // (it is revoked then, on cancellation and when the job is lost). It is a
540549 // secret: the runner registers it in its masker before anything runs, and
541550 // neither the runner nor the server logs it. It is shown only in this
542551 // response, or in a repeat of the same poll_id; a new assignment of the same
543552 // job has a new one. Empty from servers without the feature "ci.actions".
544553 string github_token = 15;
554+ // Secrets are the secrets of the job by name (upper case), in plain text:
555+ // the ones the job's workflow refers to, from the instance, the repository
556+ // and the environment, with the environment overriding the repository and
557+ // the repository the instance. The server picks them; the runner uses them
558+ // as they are. They are empty when the job is not trusted, when the job
559+ // refers to none, and from servers without the feature "ci.secrets"; the
560+ // "GITHUB_TOKEN" secret is github_token, not an entry here. They travel only
561+ // over the runner's authenticated channel. The runner never logs them, never
562+ // writes them to disk or to its recovery state, and registers them in its
563+ // log masker before the first step runs, as GitHub's runner does: each value
564+ // trimmed, each non-empty trimmed line of it (split on CR and LF), and the
565+ // encoded forms of each. The server never stores them in the run record nor
566+ // logs them. Treat the whole map as a secret.
567+ map<string, string> secrets = 16;
568+ // Vars are the configuration variables of the job by name (upper case),
569+ // already merged by the server with environment over repository over
570+ // instance. They are not secret. The same values are in the "vars" context
571+ // of contexts, which the runner may use instead. Empty from servers without
572+ // the feature "ci.secrets".
573+ map<string, string> vars = 17;
574+ // Environment is the name of the environment the job deploys to (the
575+ // evaluated "environment:" of the job). Empty when the job has none. It is
576+ // environment that secrets and vars were resolved for.
577+ string environment = 18;
578+ // Permissions are the effective permissions of github_token. Unset from
579+ // servers without the feature "ci.secrets"; the token is then read-only.
580+ JobPermissions permissions = 19;
581+ // Cache tells the runner which cache entries the job may read and write.
582+ // Unset when the server gives the job no cache (the runner then serves no
583+ // cache) and from servers without the feature "ci.cache".
584+ JobCache cache = 20;
585+ // Trusted is true when the run's actor is the owner (or a re-run of a
586+ // trusted run by the owner): only then are secrets sent and a write
587+ // permission granted. It is false when the actor is a token limited to
588+ // branches (an automated agent could otherwise print any secret by pushing a
589+ // workflow) and for a re-run of such a run, and then secrets is empty and
590+ // github_token is read-only whatever "permissions:" says. The runner states
591+ // this in the log of "Set up job". False from servers that do not send it:
592+ // the safe reading.
593+ bool trusted = 21;
594+}
595+
596+// JobPermissions are the permissions of the job repository token, with the
597+// keys and values of the "permissions:" of a GitHub workflow.
598+message JobPermissions {
599+ // Levels maps a permission key ("contents", "pull-requests", "id-token",
600+ // "actions", ...) to "read", "write" or "none". They are the permissions in
601+ // effect after the server merged the workflow's and the job's "permissions:"
602+ // (and the caller's, for a reusable workflow) and applied the trust rule of
603+ // Job.trusted; a key absent from the map is "none". Keys are lowercase as in
604+ // the workflow. The runner prints them in "Set up job" and does not
605+ // enforce them: the server checks the token.
606+ map<string, string> levels = 1;
607+}
608+
609+// JobCache is the scope of the cache of one job. The cache is served by the
610+// runner and shared by the jobs of a repository, as GitHub scopes it.
611+message JobCache {
612+ // Repository is the name of the repository whose cache the job uses. Entries
613+ // of another repository are never visible to it.
614+ string repository = 1;
615+ // WriteRef is the only ref the job may save entries under, for example
616+ // "refs/heads/main" or "refs/pull/7/merge".
617+ string write_ref = 2;
618+ // ReadRefs are the refs the job may restore entries from, most specific
619+ // first: the ref of the run, then the base branch for a pull request, then
620+ // the default branch. Entries under other refs are never restored.
621+ repeated string read_refs = 3;
545622 }
546623
547624 // UpdateJobRequest reports the steps of a running job.
@@ -612,7 +689,10 @@ message CompleteJobRequest {
612689 // are invalid_argument. Each value is at most 1 MiB, and all names and
613690 // values together at most 1 MiB (1,048,576 bytes); beyond that the whole call
614691 // is rejected with invalid_argument and the runner reports the failure of
615- // the job without outputs, with a line in the log.
692+ // the job without outputs, with a line in the log. The runner leaves out an
693+ // output whose value its masker would change, with the warning "Skip output
694+ // '<name>' since it may contain secret." (as GitHub's runner), so no secret
695+ // reaches the server through outputs.
616696 map<string, string> outputs = 3;
617697 // RunnerShutdown is true when the runner ends the job because it was told to
618698 // stop (service stopped, signal). Only allowed with CI_CONCLUSION_CANCELLED.
@@ -19,6 +19,11 @@ enum CiStatus {
19 CI_STATUS_IN_PROGRESS = 2;19 CI_STATUS_IN_PROGRESS = 2;
20 // Over. The conclusion says how it ended.20 // Over. The conclusion says how it ended.
21 CI_STATUS_COMPLETED = 3;21 CI_STATUS_COMPLETED = 3;
22+ // Held back by a concurrency group: another run or job of the group is
23+ // running, or a newer one is waiting (see RunJob.concurrency_group). Only for
24+ // jobs and checks, and only from servers with the feature "ci.concurrency";
25+ // a client that does not know the value shows it as queued.
26+ CI_STATUS_PENDING = 4;
22 }27 }
23 28
24 // CiConclusion is how a run, a job, a step or a check ended, with GitHub's29 // CiConclusion is how a run, a job, a step or a check ended, with GitHub's
@@ -171,7 +176,9 @@ enum ActionSource {
171 // Job.github_token also list "ci.actions", those that accept annotations176 // Job.github_token also list "ci.actions", those that accept annotations
172 // (UpdateJobRequest.annotations, CompleteJobRequest.annotations) list177 // (UpdateJobRequest.annotations, CompleteJobRequest.annotations) list
173 // "ci.annotations", and those that implement UploadSummary list178 // "ci.annotations", and those that implement UploadSummary list
174-// "ci.summaries". A server without a feature ignores the fields of that179+// "ci.summaries". Those that send Job.secrets, Job.vars, Job.environment,
180+// Job.permissions and Job.trusted list "ci.secrets", and those that send
181+// Job.cache list "ci.cache". A server without a feature ignores the fields of that
175 // feature (protobuf drops unknown fields) and answers unimplemented to its182 // feature (protobuf drops unknown fields) and answers unimplemented to its
176 // RPCs; a runner that needs one checks GetVersion first.183 // RPCs; a runner that needs one checks GetVersion first.
177 service RunnerService {184 service RunnerService {
@@ -534,14 +541,84 @@ message Job {
534 // "secrets.GITHUB_TOKEN" of the job: "ermitegh_" and 43 base64url characters541 // "secrets.GITHUB_TOKEN" of the job: "ermitegh_" and 43 base64url characters
535 // (32 random bytes, no padding). Unlike job_token it is meant for the code of542 // (32 random bytes, no padding). Unlike job_token it is meant for the code of
536 // the job: the runner gives it to the sandbox (actions/checkout clones with543 // the job: the runner gives it to the sandbox (actions/checkout clones with
537- // it). It can only read the repository of the run (read-only, whatever544+ // it). It can only act on the repository of the run: read-only from servers
538- // "permissions:" says), and is valid from the assignment until the job ends545+ // without the feature "ci.secrets", whatever "permissions:" says, and with
546+ // the rights of permissions from those that have it (never more than read
547+ // when trusted is false). It is valid from the assignment until the job ends
539 // (it is revoked then, on cancellation and when the job is lost). It is a548 // (it is revoked then, on cancellation and when the job is lost). It is a
540 // secret: the runner registers it in its masker before anything runs, and549 // secret: the runner registers it in its masker before anything runs, and
541 // neither the runner nor the server logs it. It is shown only in this550 // neither the runner nor the server logs it. It is shown only in this
542 // response, or in a repeat of the same poll_id; a new assignment of the same551 // response, or in a repeat of the same poll_id; a new assignment of the same
543 // job has a new one. Empty from servers without the feature "ci.actions".552 // job has a new one. Empty from servers without the feature "ci.actions".
544 string github_token = 15;553 string github_token = 15;
554+ // Secrets are the secrets of the job by name (upper case), in plain text:
555+ // the ones the job's workflow refers to, from the instance, the repository
556+ // and the environment, with the environment overriding the repository and
557+ // the repository the instance. The server picks them; the runner uses them
558+ // as they are. They are empty when the job is not trusted, when the job
559+ // refers to none, and from servers without the feature "ci.secrets"; the
560+ // "GITHUB_TOKEN" secret is github_token, not an entry here. They travel only
561+ // over the runner's authenticated channel. The runner never logs them, never
562+ // writes them to disk or to its recovery state, and registers them in its
563+ // log masker before the first step runs, as GitHub's runner does: each value
564+ // trimmed, each non-empty trimmed line of it (split on CR and LF), and the
565+ // encoded forms of each. The server never stores them in the run record nor
566+ // logs them. Treat the whole map as a secret.
567+ map<string, string> secrets = 16;
568+ // Vars are the configuration variables of the job by name (upper case),
569+ // already merged by the server with environment over repository over
570+ // instance. They are not secret. The same values are in the "vars" context
571+ // of contexts, which the runner may use instead. Empty from servers without
572+ // the feature "ci.secrets".
573+ map<string, string> vars = 17;
574+ // Environment is the name of the environment the job deploys to (the
575+ // evaluated "environment:" of the job). Empty when the job has none. It is
576+ // environment that secrets and vars were resolved for.
577+ string environment = 18;
578+ // Permissions are the effective permissions of github_token. Unset from
579+ // servers without the feature "ci.secrets"; the token is then read-only.
580+ JobPermissions permissions = 19;
581+ // Cache tells the runner which cache entries the job may read and write.
582+ // Unset when the server gives the job no cache (the runner then serves no
583+ // cache) and from servers without the feature "ci.cache".
584+ JobCache cache = 20;
585+ // Trusted is true when the run's actor is the owner (or a re-run of a
586+ // trusted run by the owner): only then are secrets sent and a write
587+ // permission granted. It is false when the actor is a token limited to
588+ // branches (an automated agent could otherwise print any secret by pushing a
589+ // workflow) and for a re-run of such a run, and then secrets is empty and
590+ // github_token is read-only whatever "permissions:" says. The runner states
591+ // this in the log of "Set up job". False from servers that do not send it:
592+ // the safe reading.
593+ bool trusted = 21;
594+}
595+
596+// JobPermissions are the permissions of the job repository token, with the
597+// keys and values of the "permissions:" of a GitHub workflow.
598+message JobPermissions {
599+ // Levels maps a permission key ("contents", "pull-requests", "id-token",
600+ // "actions", ...) to "read", "write" or "none". They are the permissions in
601+ // effect after the server merged the workflow's and the job's "permissions:"
602+ // (and the caller's, for a reusable workflow) and applied the trust rule of
603+ // Job.trusted; a key absent from the map is "none". Keys are lowercase as in
604+ // the workflow. The runner prints them in "Set up job" and does not
605+ // enforce them: the server checks the token.
606+ map<string, string> levels = 1;
607+}
608+
609+// JobCache is the scope of the cache of one job. The cache is served by the
610+// runner and shared by the jobs of a repository, as GitHub scopes it.
611+message JobCache {
612+ // Repository is the name of the repository whose cache the job uses. Entries
613+ // of another repository are never visible to it.
614+ string repository = 1;
615+ // WriteRef is the only ref the job may save entries under, for example
616+ // "refs/heads/main" or "refs/pull/7/merge".
617+ string write_ref = 2;
618+ // ReadRefs are the refs the job may restore entries from, most specific
619+ // first: the ref of the run, then the base branch for a pull request, then
620+ // the default branch. Entries under other refs are never restored.
621+ repeated string read_refs = 3;
545 }622 }
546 623
547 // UpdateJobRequest reports the steps of a running job.624 // UpdateJobRequest reports the steps of a running job.
@@ -612,7 +689,10 @@ message CompleteJobRequest {
612 // are invalid_argument. Each value is at most 1 MiB, and all names and689 // are invalid_argument. Each value is at most 1 MiB, and all names and
613 // values together at most 1 MiB (1,048,576 bytes); beyond that the whole call690 // values together at most 1 MiB (1,048,576 bytes); beyond that the whole call
614 // is rejected with invalid_argument and the runner reports the failure of691 // is rejected with invalid_argument and the runner reports the failure of
615- // the job without outputs, with a line in the log.692+ // the job without outputs, with a line in the log. The runner leaves out an
693+ // output whose value its masker would change, with the warning "Skip output
694+ // '<name>' since it may contain secret." (as GitHub's runner), so no secret
695+ // reaches the server through outputs.
616 map<string, string> outputs = 3;696 map<string, string> outputs = 3;
617 // RunnerShutdown is true when the runner ends the job because it was told to697 // RunnerShutdown is true when the runner ends the job because it was told to
618 // stop (service stopped, signal). Only allowed with CI_CONCLUSION_CANCELLED.698 // stop (service stopped, signal). Only allowed with CI_CONCLUSION_CANCELLED.
M proto/ermite/server.proto +5 -1
@@ -39,7 +39,11 @@ message GetVersionResponse {
3939 // (RunnerService.ResolveActions and Job.github_token), "ci.annotations"
4040 // (annotations in UpdateJob and CompleteJob, and RunService.ListAnnotations)
4141 // and "ci.summaries" (RunnerService.UploadSummary and
42- // RunService.GetStepSummaries).
42+ // RunService.GetStepSummaries). The CI platform identifiers are "ci.secrets"
43+ // (SecretService, VariableService and EnvironmentService, and in Job the
44+ // secrets, vars, environment, permissions and trusted fields and Run.trusted),
45+ // "ci.dispatch" (RunService.DispatchWorkflow), "ci.concurrency"
46+ // (CI_STATUS_PENDING and RunJob.concurrency_group) and "ci.cache" (Job.cache).
4347 repeated string features = 2;
4448 }
4549
@@ -39,7 +39,11 @@ message GetVersionResponse {
39 // (RunnerService.ResolveActions and Job.github_token), "ci.annotations"39 // (RunnerService.ResolveActions and Job.github_token), "ci.annotations"
40 // (annotations in UpdateJob and CompleteJob, and RunService.ListAnnotations)40 // (annotations in UpdateJob and CompleteJob, and RunService.ListAnnotations)
41 // and "ci.summaries" (RunnerService.UploadSummary and41 // and "ci.summaries" (RunnerService.UploadSummary and
42- // RunService.GetStepSummaries).42+ // RunService.GetStepSummaries). The CI platform identifiers are "ci.secrets"
43+ // (SecretService, VariableService and EnvironmentService, and in Job the
44+ // secrets, vars, environment, permissions and trusted fields and Run.trusted),
45+ // "ci.dispatch" (RunService.DispatchWorkflow), "ci.concurrency"
46+ // (CI_STATUS_PENDING and RunJob.concurrency_group) and "ci.cache" (Job.cache).
43 repeated string features = 2;47 repeated string features = 2;
44 }48 }
45 49
M proto/ermite/token.proto +4 -2
@@ -28,8 +28,10 @@ enum Scope {
2828 // SCOPE_CI_WRITE allows re-running or cancelling CI runs. Wire name:
2929 // ci:write.
3030 SCOPE_CI_WRITE = 6;
31- // SCOPE_SECRETS_WRITE allows setting and deleting secrets and variables.
32- // Wire name: secrets:write.
31+ // SCOPE_SECRETS_WRITE allows managing secrets, variables and environments
32+ // (SecretService, VariableService, EnvironmentService), reads included. A
33+ // token limited to branches is refused them even with this scope. Wire name:
34+ // secrets:write.
3335 SCOPE_SECRETS_WRITE = 7;
3436 // SCOPE_RUNNER_REGISTER allows registering a CI runner. Wire name:
3537 // runner:register.
@@ -28,8 +28,10 @@ enum Scope {
28 // SCOPE_CI_WRITE allows re-running or cancelling CI runs. Wire name:28 // SCOPE_CI_WRITE allows re-running or cancelling CI runs. Wire name:
29 // ci:write.29 // ci:write.
30 SCOPE_CI_WRITE = 6;30 SCOPE_CI_WRITE = 6;
31- // SCOPE_SECRETS_WRITE allows setting and deleting secrets and variables.31+ // SCOPE_SECRETS_WRITE allows managing secrets, variables and environments
32- // Wire name: secrets:write.32+ // (SecretService, VariableService, EnvironmentService), reads included. A
33+ // token limited to branches is refused them even with this scope. Wire name:
34+ // secrets:write.
33 SCOPE_SECRETS_WRITE = 7;35 SCOPE_SECRETS_WRITE = 7;
34 // SCOPE_RUNNER_REGISTER allows registering a CI runner. Wire name:36 // SCOPE_RUNNER_REGISTER allows registering a CI runner. Wire name:
35 // runner:register.37 // runner:register.

Keyboard shortcuts

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

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

Branches 2

Tags 18

↑↓ moveenter openesc close