v0.13.0 b97dc86

token.pb.go RawHistoryFolder

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/token.proto
8
9package ermite
10
11import (
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
20const (
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// Scope is a permission carried by a token. The API knows scopes only; any
28// grouping into presets is a client concern.
29type Scope int32
30
31const (
32	// Not set. Rejected in requests, never returned by the server.
33	Scope_SCOPE_UNSPECIFIED Scope = 0
34	// SCOPE_REPO_READ allows reading private repositories (public ones need no
35	// token). Wire name: repo:read.
36	Scope_SCOPE_REPO_READ Scope = 1
37	// SCOPE_REPO_WRITE allows pushing and creating repositories. Wire name:
38	// repo:write.
39	Scope_SCOPE_REPO_WRITE Scope = 2
40	// SCOPE_REPO_ADMIN allows deleting a repository and changing its visibility,
41	// description or default branch. Wire name: repo:admin.
42	Scope_SCOPE_REPO_ADMIN Scope = 3
43	// SCOPE_MR_WRITE allows creating, commenting on and closing merge requests.
44	// Wire name: mr:write.
45	Scope_SCOPE_MR_WRITE Scope = 4
46	// SCOPE_MR_MERGE allows merging merge requests. Wire name: mr:merge.
47	Scope_SCOPE_MR_MERGE Scope = 5
48	// SCOPE_CI_WRITE allows re-running or cancelling CI runs. Wire name:
49	// ci:write.
50	Scope_SCOPE_CI_WRITE Scope = 6
51	// SCOPE_SECRETS_WRITE allows managing secrets, variables and environments
52	// (SecretService, VariableService, EnvironmentService), reads included. A
53	// token limited to branches is refused them even with this scope. Wire name:
54	// secrets:write.
55	Scope_SCOPE_SECRETS_WRITE Scope = 7
56	// SCOPE_RUNNER_REGISTER allows registering a CI runner. Wire name:
57	// runner:register.
58	Scope_SCOPE_RUNNER_REGISTER Scope = 8
59	// SCOPE_TOKEN_ADMIN allows creating, listing and revoking tokens. Wire name:
60	// token:admin.
61	Scope_SCOPE_TOKEN_ADMIN Scope = 9
62	// SCOPE_MR_REVIEW allows setting a verdict (approve, changes requested) on
63	// merge request notes. Wire name: mr:review.
64	Scope_SCOPE_MR_REVIEW Scope = 10
65	// SCOPE_ISSUE_WRITE allows creating, commenting on, closing and reopening
66	// issues. Wire name: issue:write.
67	Scope_SCOPE_ISSUE_WRITE Scope = 11
68)
69
70// Enum value maps for Scope.
71var (
72	Scope_name = map[int32]string{
73		0:  "SCOPE_UNSPECIFIED",
74		1:  "SCOPE_REPO_READ",
75		2:  "SCOPE_REPO_WRITE",
76		3:  "SCOPE_REPO_ADMIN",
77		4:  "SCOPE_MR_WRITE",
78		5:  "SCOPE_MR_MERGE",
79		6:  "SCOPE_CI_WRITE",
80		7:  "SCOPE_SECRETS_WRITE",
81		8:  "SCOPE_RUNNER_REGISTER",
82		9:  "SCOPE_TOKEN_ADMIN",
83		10: "SCOPE_MR_REVIEW",
84		11: "SCOPE_ISSUE_WRITE",
85	}
86	Scope_value = map[string]int32{
87		"SCOPE_UNSPECIFIED":     0,
88		"SCOPE_REPO_READ":       1,
89		"SCOPE_REPO_WRITE":      2,
90		"SCOPE_REPO_ADMIN":      3,
91		"SCOPE_MR_WRITE":        4,
92		"SCOPE_MR_MERGE":        5,
93		"SCOPE_CI_WRITE":        6,
94		"SCOPE_SECRETS_WRITE":   7,
95		"SCOPE_RUNNER_REGISTER": 8,
96		"SCOPE_TOKEN_ADMIN":     9,
97		"SCOPE_MR_REVIEW":       10,
98		"SCOPE_ISSUE_WRITE":     11,
99	}
100)
101
102func (x Scope) Enum() *Scope {
103	p := new(Scope)
104	*p = x
105	return p
106}
107
108func (x Scope) String() string {
109	return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x))
110}
111
112func (Scope) Descriptor() protoreflect.EnumDescriptor {
113	return file_ermite_token_proto_enumTypes[0].Descriptor()
114}
115
116func (Scope) Type() protoreflect.EnumType {
117	return &file_ermite_token_proto_enumTypes[0]
118}
119
120func (x Scope) Number() protoreflect.EnumNumber {
121	return protoreflect.EnumNumber(x)
122}
123
124// Deprecated: Use Scope.Descriptor instead.
125func (Scope) EnumDescriptor() ([]byte, []int) {
126	return file_ermite_token_proto_rawDescGZIP(), []int{0}
127}
128
129// Token describes a stored token. It never contains the secret nor its hash.
130type Token struct {
131	state protoimpl.MessageState `protogen:"open.v1"`
132	// Id identifies the token in ListTokens and RevokeToken. It is not the
133	// secret and cannot be used to authenticate.
134	Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"`
135	// Label is a human-readable name chosen at creation.
136	Label string `protobuf:"bytes,2,opt,name=label,proto3" json:"label,omitempty"`
137	// Scopes are the permissions of the token. Never empty.
138	Scopes []Scope `protobuf:"varint,3,rep,packed,name=scopes,proto3,enum=ermite.Scope" json:"scopes,omitempty"`
139	// Repos restricts the token to these repository names. Empty means every
140	// repository.
141	Repos []string `protobuf:"bytes,4,rep,name=repos,proto3" json:"repos,omitempty"`
142	// ExpiresAt is when the token stops working. Unset means it never expires.
143	ExpiresAt *timestamppb.Timestamp `protobuf:"bytes,5,opt,name=expires_at,json=expiresAt,proto3" json:"expires_at,omitempty"`
144	// CreatedAt is when the token was created.
145	CreatedAt *timestamppb.Timestamp `protobuf:"bytes,6,opt,name=created_at,json=createdAt,proto3" json:"created_at,omitempty"`
146	// LastUsedAt is when the token last authenticated a request. Unset if never
147	// used. It may lag behind the real time by a short delay.
148	LastUsedAt *timestamppb.Timestamp `protobuf:"bytes,7,opt,name=last_used_at,json=lastUsedAt,proto3" json:"last_used_at,omitempty"`
149	// BranchPrefixes limits the branches the token may write. Each prefix ends
150	// with "/" (for example "agent/claude/"). Empty means every branch. A limited
151	// token can push, force-push and delete only branches under its prefixes; it
152	// cannot push tags or other refs, create repositories, or merge into or
153	// delete a branch outside its prefixes.
154	BranchPrefixes []string `protobuf:"bytes,8,rep,name=branch_prefixes,json=branchPrefixes,proto3" json:"branch_prefixes,omitempty"`
155	unknownFields  protoimpl.UnknownFields
156	sizeCache      protoimpl.SizeCache
157}
158
159func (x *Token) Reset() {
160	*x = Token{}
161	mi := &file_ermite_token_proto_msgTypes[0]
162	ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
163	ms.StoreMessageInfo(mi)
164}
165
166func (x *Token) String() string {
167	return protoimpl.X.MessageStringOf(x)
168}
169
170func (*Token) ProtoMessage() {}
171
172func (x *Token) ProtoReflect() protoreflect.Message {
173	mi := &file_ermite_token_proto_msgTypes[0]
174	if x != nil {
175		ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
176		if ms.LoadMessageInfo() == nil {
177			ms.StoreMessageInfo(mi)
178		}
179		return ms
180	}
181	return mi.MessageOf(x)
182}
183
184// Deprecated: Use Token.ProtoReflect.Descriptor instead.
185func (*Token) Descriptor() ([]byte, []int) {
186	return file_ermite_token_proto_rawDescGZIP(), []int{0}
187}
188
189func (x *Token) GetId() string {
190	if x != nil {
191		return x.Id
192	}
193	return ""
194}
195
196func (x *Token) GetLabel() string {
197	if x != nil {
198		return x.Label
199	}
200	return ""
201}
202
203func (x *Token) GetScopes() []Scope {
204	if x != nil {
205		return x.Scopes
206	}
207	return nil
208}
209
210func (x *Token) GetRepos() []string {
211	if x != nil {
212		return x.Repos
213	}
214	return nil
215}
216
217func (x *Token) GetExpiresAt() *timestamppb.Timestamp {
218	if x != nil {
219		return x.ExpiresAt
220	}
221	return nil
222}
223
224func (x *Token) GetCreatedAt() *timestamppb.Timestamp {
225	if x != nil {
226		return x.CreatedAt
227	}
228	return nil
229}
230
231func (x *Token) GetLastUsedAt() *timestamppb.Timestamp {
232	if x != nil {
233		return x.LastUsedAt
234	}
235	return nil
236}
237
238func (x *Token) GetBranchPrefixes() []string {
239	if x != nil {
240		return x.BranchPrefixes
241	}
242	return nil
243}
244
245// CreateTokenRequest describes the token to create.
246type CreateTokenRequest struct {
247	state protoimpl.MessageState `protogen:"open.v1"`
248	// Label is a human-readable name, for example "laptop". Not required to be
249	// unique.
250	Label string `protobuf:"bytes,1,opt,name=label,proto3" json:"label,omitempty"`
251	// Scopes are the permissions to grant. At least one is required.
252	Scopes []Scope `protobuf:"varint,2,rep,packed,name=scopes,proto3,enum=ermite.Scope" json:"scopes,omitempty"`
253	// Repos restricts the token to these repository names. Empty means every
254	// repository.
255	Repos []string `protobuf:"bytes,3,rep,name=repos,proto3" json:"repos,omitempty"`
256	// ExpiresAt is when the token stops working. Unset means no expiry. It must
257	// be in the future.
258	ExpiresAt *timestamppb.Timestamp `protobuf:"bytes,4,opt,name=expires_at,json=expiresAt,proto3" json:"expires_at,omitempty"`
259	// BranchPrefixes limits the branches the token may write, for example
260	// "agent/claude/". Each prefix must end with "/" and be a valid branch name
261	// once the "/" is removed; at most 8 are allowed. Empty means every branch;
262	// a limited token cannot push tags or create repositories. A token that has
263	// prefixes can only create tokens whose prefixes each lie within its own.
264	// Fails with invalid_argument when a prefix is malformed.
265	BranchPrefixes []string `protobuf:"bytes,5,rep,name=branch_prefixes,json=branchPrefixes,proto3" json:"branch_prefixes,omitempty"`
266	unknownFields  protoimpl.UnknownFields
267	sizeCache      protoimpl.SizeCache
268}
269
270func (x *CreateTokenRequest) Reset() {
271	*x = CreateTokenRequest{}
272	mi := &file_ermite_token_proto_msgTypes[1]
273	ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
274	ms.StoreMessageInfo(mi)
275}
276
277func (x *CreateTokenRequest) String() string {
278	return protoimpl.X.MessageStringOf(x)
279}
280
281func (*CreateTokenRequest) ProtoMessage() {}
282
283func (x *CreateTokenRequest) ProtoReflect() protoreflect.Message {
284	mi := &file_ermite_token_proto_msgTypes[1]
285	if x != nil {
286		ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
287		if ms.LoadMessageInfo() == nil {
288			ms.StoreMessageInfo(mi)
289		}
290		return ms
291	}
292	return mi.MessageOf(x)
293}
294
295// Deprecated: Use CreateTokenRequest.ProtoReflect.Descriptor instead.
296func (*CreateTokenRequest) Descriptor() ([]byte, []int) {
297	return file_ermite_token_proto_rawDescGZIP(), []int{1}
298}
299
300func (x *CreateTokenRequest) GetLabel() string {
301	if x != nil {
302		return x.Label
303	}
304	return ""
305}
306
307func (x *CreateTokenRequest) GetScopes() []Scope {
308	if x != nil {
309		return x.Scopes
310	}
311	return nil
312}
313
314func (x *CreateTokenRequest) GetRepos() []string {
315	if x != nil {
316		return x.Repos
317	}
318	return nil
319}
320
321func (x *CreateTokenRequest) GetExpiresAt() *timestamppb.Timestamp {
322	if x != nil {
323		return x.ExpiresAt
324	}
325	return nil
326}
327
328func (x *CreateTokenRequest) GetBranchPrefixes() []string {
329	if x != nil {
330		return x.BranchPrefixes
331	}
332	return nil
333}
334
335// CreateTokenResponse holds the new token and its secret.
336type CreateTokenResponse struct {
337	state protoimpl.MessageState `protogen:"open.v1"`
338	// Token describes the created token.
339	Token *Token `protobuf:"bytes,1,opt,name=token,proto3" json:"token,omitempty"`
340	// Secret is the bearer secret to present as "Authorization: Bearer <secret>".
341	// It is returned once and never stored in clear text by the server.
342	Secret        string `protobuf:"bytes,2,opt,name=secret,proto3" json:"secret,omitempty"`
343	unknownFields protoimpl.UnknownFields
344	sizeCache     protoimpl.SizeCache
345}
346
347func (x *CreateTokenResponse) Reset() {
348	*x = CreateTokenResponse{}
349	mi := &file_ermite_token_proto_msgTypes[2]
350	ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
351	ms.StoreMessageInfo(mi)
352}
353
354func (x *CreateTokenResponse) String() string {
355	return protoimpl.X.MessageStringOf(x)
356}
357
358func (*CreateTokenResponse) ProtoMessage() {}
359
360func (x *CreateTokenResponse) ProtoReflect() protoreflect.Message {
361	mi := &file_ermite_token_proto_msgTypes[2]
362	if x != nil {
363		ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
364		if ms.LoadMessageInfo() == nil {
365			ms.StoreMessageInfo(mi)
366		}
367		return ms
368	}
369	return mi.MessageOf(x)
370}
371
372// Deprecated: Use CreateTokenResponse.ProtoReflect.Descriptor instead.
373func (*CreateTokenResponse) Descriptor() ([]byte, []int) {
374	return file_ermite_token_proto_rawDescGZIP(), []int{2}
375}
376
377func (x *CreateTokenResponse) GetToken() *Token {
378	if x != nil {
379		return x.Token
380	}
381	return nil
382}
383
384func (x *CreateTokenResponse) GetSecret() string {
385	if x != nil {
386		return x.Secret
387	}
388	return ""
389}
390
391// ListTokensRequest selects a page of tokens.
392type ListTokensRequest struct {
393	state protoimpl.MessageState `protogen:"open.v1"`
394	// PageSize is the maximum number of tokens to return. 0 means the server
395	// default; values above the server maximum are lowered to it.
396	PageSize int32 `protobuf:"varint,1,opt,name=page_size,json=pageSize,proto3" json:"page_size,omitempty"`
397	// PageToken is the next_page_token of a previous response. Empty for the
398	// first page.
399	PageToken     string `protobuf:"bytes,2,opt,name=page_token,json=pageToken,proto3" json:"page_token,omitempty"`
400	unknownFields protoimpl.UnknownFields
401	sizeCache     protoimpl.SizeCache
402}
403
404func (x *ListTokensRequest) Reset() {
405	*x = ListTokensRequest{}
406	mi := &file_ermite_token_proto_msgTypes[3]
407	ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
408	ms.StoreMessageInfo(mi)
409}
410
411func (x *ListTokensRequest) String() string {
412	return protoimpl.X.MessageStringOf(x)
413}
414
415func (*ListTokensRequest) ProtoMessage() {}
416
417func (x *ListTokensRequest) ProtoReflect() protoreflect.Message {
418	mi := &file_ermite_token_proto_msgTypes[3]
419	if x != nil {
420		ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
421		if ms.LoadMessageInfo() == nil {
422			ms.StoreMessageInfo(mi)
423		}
424		return ms
425	}
426	return mi.MessageOf(x)
427}
428
429// Deprecated: Use ListTokensRequest.ProtoReflect.Descriptor instead.
430func (*ListTokensRequest) Descriptor() ([]byte, []int) {
431	return file_ermite_token_proto_rawDescGZIP(), []int{3}
432}
433
434func (x *ListTokensRequest) GetPageSize() int32 {
435	if x != nil {
436		return x.PageSize
437	}
438	return 0
439}
440
441func (x *ListTokensRequest) GetPageToken() string {
442	if x != nil {
443		return x.PageToken
444	}
445	return ""
446}
447
448// ListTokensResponse is one page of tokens.
449type ListTokensResponse struct {
450	state protoimpl.MessageState `protogen:"open.v1"`
451	// Tokens are the tokens of this page, newest first.
452	Tokens []*Token `protobuf:"bytes,1,rep,name=tokens,proto3" json:"tokens,omitempty"`
453	// NextPageToken is passed as page_token to get the next page. Empty when
454	// there is no next page.
455	NextPageToken string `protobuf:"bytes,2,opt,name=next_page_token,json=nextPageToken,proto3" json:"next_page_token,omitempty"`
456	unknownFields protoimpl.UnknownFields
457	sizeCache     protoimpl.SizeCache
458}
459
460func (x *ListTokensResponse) Reset() {
461	*x = ListTokensResponse{}
462	mi := &file_ermite_token_proto_msgTypes[4]
463	ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
464	ms.StoreMessageInfo(mi)
465}
466
467func (x *ListTokensResponse) String() string {
468	return protoimpl.X.MessageStringOf(x)
469}
470
471func (*ListTokensResponse) ProtoMessage() {}
472
473func (x *ListTokensResponse) ProtoReflect() protoreflect.Message {
474	mi := &file_ermite_token_proto_msgTypes[4]
475	if x != nil {
476		ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
477		if ms.LoadMessageInfo() == nil {
478			ms.StoreMessageInfo(mi)
479		}
480		return ms
481	}
482	return mi.MessageOf(x)
483}
484
485// Deprecated: Use ListTokensResponse.ProtoReflect.Descriptor instead.
486func (*ListTokensResponse) Descriptor() ([]byte, []int) {
487	return file_ermite_token_proto_rawDescGZIP(), []int{4}
488}
489
490func (x *ListTokensResponse) GetTokens() []*Token {
491	if x != nil {
492		return x.Tokens
493	}
494	return nil
495}
496
497func (x *ListTokensResponse) GetNextPageToken() string {
498	if x != nil {
499		return x.NextPageToken
500	}
501	return ""
502}
503
504// RevokeTokenRequest names the token to revoke.
505type RevokeTokenRequest struct {
506	state protoimpl.MessageState `protogen:"open.v1"`
507	// Id is the Token.id to revoke.
508	Id            string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"`
509	unknownFields protoimpl.UnknownFields
510	sizeCache     protoimpl.SizeCache
511}
512
513func (x *RevokeTokenRequest) Reset() {
514	*x = RevokeTokenRequest{}
515	mi := &file_ermite_token_proto_msgTypes[5]
516	ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
517	ms.StoreMessageInfo(mi)
518}
519
520func (x *RevokeTokenRequest) String() string {
521	return protoimpl.X.MessageStringOf(x)
522}
523
524func (*RevokeTokenRequest) ProtoMessage() {}
525
526func (x *RevokeTokenRequest) ProtoReflect() protoreflect.Message {
527	mi := &file_ermite_token_proto_msgTypes[5]
528	if x != nil {
529		ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
530		if ms.LoadMessageInfo() == nil {
531			ms.StoreMessageInfo(mi)
532		}
533		return ms
534	}
535	return mi.MessageOf(x)
536}
537
538// Deprecated: Use RevokeTokenRequest.ProtoReflect.Descriptor instead.
539func (*RevokeTokenRequest) Descriptor() ([]byte, []int) {
540	return file_ermite_token_proto_rawDescGZIP(), []int{5}
541}
542
543func (x *RevokeTokenRequest) GetId() string {
544	if x != nil {
545		return x.Id
546	}
547	return ""
548}
549
550// RevokeTokenResponse is empty.
551type RevokeTokenResponse struct {
552	state         protoimpl.MessageState `protogen:"open.v1"`
553	unknownFields protoimpl.UnknownFields
554	sizeCache     protoimpl.SizeCache
555}
556
557func (x *RevokeTokenResponse) Reset() {
558	*x = RevokeTokenResponse{}
559	mi := &file_ermite_token_proto_msgTypes[6]
560	ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
561	ms.StoreMessageInfo(mi)
562}
563
564func (x *RevokeTokenResponse) String() string {
565	return protoimpl.X.MessageStringOf(x)
566}
567
568func (*RevokeTokenResponse) ProtoMessage() {}
569
570func (x *RevokeTokenResponse) ProtoReflect() protoreflect.Message {
571	mi := &file_ermite_token_proto_msgTypes[6]
572	if x != nil {
573		ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
574		if ms.LoadMessageInfo() == nil {
575			ms.StoreMessageInfo(mi)
576		}
577		return ms
578	}
579	return mi.MessageOf(x)
580}
581
582// Deprecated: Use RevokeTokenResponse.ProtoReflect.Descriptor instead.
583func (*RevokeTokenResponse) Descriptor() ([]byte, []int) {
584	return file_ermite_token_proto_rawDescGZIP(), []int{6}
585}
586
587var File_ermite_token_proto protoreflect.FileDescriptor
588
589const file_ermite_token_proto_rawDesc = "" +
590	"\n" +
591	"\x12ermite/token.proto\x12\x06ermite\x1a\x1fgoogle/protobuf/timestamp.proto\"\xc7\x02\n" +
592	"\x05Token\x12\x0e\n" +
593	"\x02id\x18\x01 \x01(\tR\x02id\x12\x14\n" +
594	"\x05label\x18\x02 \x01(\tR\x05label\x12%\n" +
595	"\x06scopes\x18\x03 \x03(\x0e2\r.ermite.ScopeR\x06scopes\x12\x14\n" +
596	"\x05repos\x18\x04 \x03(\tR\x05repos\x129\n" +
597	"\n" +
598	"expires_at\x18\x05 \x01(\v2\x1a.google.protobuf.TimestampR\texpiresAt\x129\n" +
599	"\n" +
600	"created_at\x18\x06 \x01(\v2\x1a.google.protobuf.TimestampR\tcreatedAt\x12<\n" +
601	"\flast_used_at\x18\a \x01(\v2\x1a.google.protobuf.TimestampR\n" +
602	"lastUsedAt\x12'\n" +
603	"\x0fbranch_prefixes\x18\b \x03(\tR\x0ebranchPrefixes\"\xcb\x01\n" +
604	"\x12CreateTokenRequest\x12\x14\n" +
605	"\x05label\x18\x01 \x01(\tR\x05label\x12%\n" +
606	"\x06scopes\x18\x02 \x03(\x0e2\r.ermite.ScopeR\x06scopes\x12\x14\n" +
607	"\x05repos\x18\x03 \x03(\tR\x05repos\x129\n" +
608	"\n" +
609	"expires_at\x18\x04 \x01(\v2\x1a.google.protobuf.TimestampR\texpiresAt\x12'\n" +
610	"\x0fbranch_prefixes\x18\x05 \x03(\tR\x0ebranchPrefixes\"R\n" +
611	"\x13CreateTokenResponse\x12#\n" +
612	"\x05token\x18\x01 \x01(\v2\r.ermite.TokenR\x05token\x12\x16\n" +
613	"\x06secret\x18\x02 \x01(\tR\x06secret\"O\n" +
614	"\x11ListTokensRequest\x12\x1b\n" +
615	"\tpage_size\x18\x01 \x01(\x05R\bpageSize\x12\x1d\n" +
616	"\n" +
617	"page_token\x18\x02 \x01(\tR\tpageToken\"c\n" +
618	"\x12ListTokensResponse\x12%\n" +
619	"\x06tokens\x18\x01 \x03(\v2\r.ermite.TokenR\x06tokens\x12&\n" +
620	"\x0fnext_page_token\x18\x02 \x01(\tR\rnextPageToken\"$\n" +
621	"\x12RevokeTokenRequest\x12\x0e\n" +
622	"\x02id\x18\x01 \x01(\tR\x02id\"\x15\n" +
623	"\x13RevokeTokenResponse*\x92\x02\n" +
624	"\x05Scope\x12\x15\n" +
625	"\x11SCOPE_UNSPECIFIED\x10\x00\x12\x13\n" +
626	"\x0fSCOPE_REPO_READ\x10\x01\x12\x14\n" +
627	"\x10SCOPE_REPO_WRITE\x10\x02\x12\x14\n" +
628	"\x10SCOPE_REPO_ADMIN\x10\x03\x12\x12\n" +
629	"\x0eSCOPE_MR_WRITE\x10\x04\x12\x12\n" +
630	"\x0eSCOPE_MR_MERGE\x10\x05\x12\x12\n" +
631	"\x0eSCOPE_CI_WRITE\x10\x06\x12\x17\n" +
632	"\x13SCOPE_SECRETS_WRITE\x10\a\x12\x19\n" +
633	"\x15SCOPE_RUNNER_REGISTER\x10\b\x12\x15\n" +
634	"\x11SCOPE_TOKEN_ADMIN\x10\t\x12\x13\n" +
635	"\x0fSCOPE_MR_REVIEW\x10\n" +
636	"\x12\x15\n" +
637	"\x11SCOPE_ISSUE_WRITE\x10\v2\xe3\x01\n" +
638	"\fTokenService\x12F\n" +
639	"\vCreateToken\x12\x1a.ermite.CreateTokenRequest\x1a\x1b.ermite.CreateTokenResponse\x12C\n" +
640	"\n" +
641	"ListTokens\x12\x19.ermite.ListTokensRequest\x1a\x1a.ermite.ListTokensResponse\x12F\n" +
642	"\vRevokeToken\x12\x1a.ermite.RevokeTokenRequest\x1a\x1b.ermite.RevokeTokenResponseBq\n" +
643	"\n" +
644	"com.ermiteB\n" +
645	"TokenProtoP\x01Z\x1fbnema.dev/ermite-api/gen/ermite\xa2\x02\x03EXX\xaa\x02\x06Ermite\xca\x02\x06Ermite\xe2\x02\x12Ermite\\GPBMetadata\xea\x02\x06Ermiteb\x06proto3"
646
647var (
648	file_ermite_token_proto_rawDescOnce sync.Once
649	file_ermite_token_proto_rawDescData []byte
650)
651
652func file_ermite_token_proto_rawDescGZIP() []byte {
653	file_ermite_token_proto_rawDescOnce.Do(func() {
654		file_ermite_token_proto_rawDescData = protoimpl.X.CompressGZIP(unsafe.Slice(unsafe.StringData(file_ermite_token_proto_rawDesc), len(file_ermite_token_proto_rawDesc)))
655	})
656	return file_ermite_token_proto_rawDescData
657}
658
659var file_ermite_token_proto_enumTypes = make([]protoimpl.EnumInfo, 1)
660var file_ermite_token_proto_msgTypes = make([]protoimpl.MessageInfo, 7)
661var file_ermite_token_proto_goTypes = []any{
662	(Scope)(0),                    // 0: ermite.Scope
663	(*Token)(nil),                 // 1: ermite.Token
664	(*CreateTokenRequest)(nil),    // 2: ermite.CreateTokenRequest
665	(*CreateTokenResponse)(nil),   // 3: ermite.CreateTokenResponse
666	(*ListTokensRequest)(nil),     // 4: ermite.ListTokensRequest
667	(*ListTokensResponse)(nil),    // 5: ermite.ListTokensResponse
668	(*RevokeTokenRequest)(nil),    // 6: ermite.RevokeTokenRequest
669	(*RevokeTokenResponse)(nil),   // 7: ermite.RevokeTokenResponse
670	(*timestamppb.Timestamp)(nil), // 8: google.protobuf.Timestamp
671}
672var file_ermite_token_proto_depIdxs = []int32{
673	0,  // 0: ermite.Token.scopes:type_name -> ermite.Scope
674	8,  // 1: ermite.Token.expires_at:type_name -> google.protobuf.Timestamp
675	8,  // 2: ermite.Token.created_at:type_name -> google.protobuf.Timestamp
676	8,  // 3: ermite.Token.last_used_at:type_name -> google.protobuf.Timestamp
677	0,  // 4: ermite.CreateTokenRequest.scopes:type_name -> ermite.Scope
678	8,  // 5: ermite.CreateTokenRequest.expires_at:type_name -> google.protobuf.Timestamp
679	1,  // 6: ermite.CreateTokenResponse.token:type_name -> ermite.Token
680	1,  // 7: ermite.ListTokensResponse.tokens:type_name -> ermite.Token
681	2,  // 8: ermite.TokenService.CreateToken:input_type -> ermite.CreateTokenRequest
682	4,  // 9: ermite.TokenService.ListTokens:input_type -> ermite.ListTokensRequest
683	6,  // 10: ermite.TokenService.RevokeToken:input_type -> ermite.RevokeTokenRequest
684	3,  // 11: ermite.TokenService.CreateToken:output_type -> ermite.CreateTokenResponse
685	5,  // 12: ermite.TokenService.ListTokens:output_type -> ermite.ListTokensResponse
686	7,  // 13: ermite.TokenService.RevokeToken:output_type -> ermite.RevokeTokenResponse
687	11, // [11:14] is the sub-list for method output_type
688	8,  // [8:11] is the sub-list for method input_type
689	8,  // [8:8] is the sub-list for extension type_name
690	8,  // [8:8] is the sub-list for extension extendee
691	0,  // [0:8] is the sub-list for field type_name
692}
693
694func init() { file_ermite_token_proto_init() }
695func file_ermite_token_proto_init() {
696	if File_ermite_token_proto != nil {
697		return
698	}
699	type x struct{}
700	out := protoimpl.TypeBuilder{
701		File: protoimpl.DescBuilder{
702			GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
703			RawDescriptor: unsafe.Slice(unsafe.StringData(file_ermite_token_proto_rawDesc), len(file_ermite_token_proto_rawDesc)),
704			NumEnums:      1,
705			NumMessages:   7,
706			NumExtensions: 0,
707			NumServices:   1,
708		},
709		GoTypes:           file_ermite_token_proto_goTypes,
710		DependencyIndexes: file_ermite_token_proto_depIdxs,
711		EnumInfos:         file_ermite_token_proto_enumTypes,
712		MessageInfos:      file_ermite_token_proto_msgTypes,
713	}.Build()
714	File_ermite_token_proto = out.File
715	file_ermite_token_proto_goTypes = nil
716	file_ermite_token_proto_depIdxs = nil
717}

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