errors.go RawHistoryFolder

1package domain
2
3import "errors"
4
5// Domain errors represent business-level errors that can occur in the system.
6// These errors are used across layers to communicate specific failure conditions.
7var (
8	// Container errors
9	ErrContainerNotFound   = errors.New("container not found")
10	ErrContainerExists     = errors.New("container already exists")
11	ErrContainerNotRunning = errors.New("container is not running")
12	ErrContainerRunning    = errors.New("container is already running")
13	ErrContainerExited     = errors.New("container exited")
14	// ErrRuntimeUnsupported wraps device-bearing create failures on
15	// engines that cannot serve CDI device requests. It fails closed:
16	// Gordon never retries without devices.
17	ErrRuntimeUnsupported = errors.New("runtime does not support CDI device requests")
18
19	// Image errors
20	ErrImageNotFound      = errors.New("image not found")
21	ErrImagePullFailed    = errors.New("failed to pull image")
22	ErrInvalidImageFormat = errors.New("invalid image format")
23
24	// Route errors
25	ErrRouteNotFound      = errors.New("route not found")
26	ErrRouteExists        = errors.New("route already exists")
27	ErrInvalidRoute       = errors.New("invalid route configuration")
28	ErrNoRouteForImage    = errors.New("no route configured for image")
29	ErrRouteDomainEmpty   = errors.New("route domain cannot be empty")
30	ErrRouteImageEmpty    = errors.New("route image cannot be empty")
31	ErrRouteDomainInvalid = errors.New("route domain is not a valid public hostname")
32	ErrNoTargetAvailable  = errors.New("no target available for route")
33
34	// Registry errors
35	ErrManifestNotFound   = errors.New("manifest not found")
36	ErrBlobNotFound       = errors.New("blob not found")
37	ErrUploadNotFound     = errors.New("upload not found")
38	ErrInvalidDigest      = errors.New("invalid digest")
39	ErrDigestMismatch     = errors.New("digest mismatch")
40	ErrUnauthorized       = errors.New("unauthorized")
41	ErrBlobSizeExceeded   = errors.New("blob size exceeds maximum")
42	ErrExecOutputExceeded = errors.New("container exec output exceeds maximum")
43	// ErrManifestBlobUnknown marks a manifest that references config or
44	// layer content the repository never completed an upload for.
45	ErrManifestBlobUnknown = errors.New("manifest references a blob the repository does not own")
46
47	// Network errors
48	ErrNetworkNotFound = errors.New("network not found")
49	ErrNetworkExists   = errors.New("network already exists")
50
51	// Volume errors
52	ErrVolumeNotFound            = errors.New("volume not found")
53	ErrVolumeExists              = errors.New("volume already exists")
54	ErrVolumeBackupUnavailable   = errors.New("volume backup service unavailable")
55	ErrVolumeOwnershipUnverified = errors.New("volume ownership cannot be verified")
56
57	// Preview errors
58	ErrPreviewNotFound = errors.New("preview not found")
59
60	// Config errors
61	ErrTrafficGraphRequired = errors.New("traffic graph is required")
62	ErrClientHelloTooLarge  = errors.New("client hello exceeds maximum")
63	ErrConfigNotFound       = errors.New("configuration not found")
64	ErrInvalidConfig        = errors.New("invalid configuration")
65	ErrConfigLoadFailed     = errors.New("failed to load configuration")
66	ErrInvalidDomainPattern = errors.New("invalid domain pattern")
67	ErrRouteConflict        = errors.New("route conflicts with existing configuration")
68
69	// App manifest errors
70	ErrInvalidAppSpec = errors.New("invalid app manifest")
71	// ErrInvalidNetworkProbe wraps malformed bounded container-network
72	// readiness requests. It is distinct from ErrInvalidAppSpec: the
73	// manifest may be valid while one probe request is not.
74	ErrInvalidNetworkProbe = errors.New("invalid network probe request")
75	// ErrNetworkProbeCleanup marks a helper that could not be force-removed.
76	// Callers must fail immediately rather than create another helper.
77	ErrNetworkProbeCleanup = errors.New("network probe helper cleanup failed")
78	// ErrBindPolicy wraps administrative bind policy violations. It is
79	// distinct from ErrInvalidAppSpec: the manifest may be valid while the
80	// installation policy refuses to serve it.
81	ErrBindPolicy = errors.New("bind policy violation")
82	// ErrDevicePolicy wraps administrative device policy violations. It is
83	// distinct from ErrInvalidAppSpec: the manifest may be valid while the
84	// installation policy refuses to serve it.
85	ErrDevicePolicy = errors.New("device policy violation")
86	// ErrRuntimeGuard wraps app container configs refused by the runtime
87	// guard: host or shared namespaces, host paths passed as volume
88	// names, or binds overlapping Gordon's own sensitive paths.
89	ErrRuntimeGuard = errors.New("runtime guard violation")
90
91	// App state errors
92	ErrAppStateIO           = errors.New("app state storage failure")
93	ErrAppStateCorrupt      = errors.New("app state is corrupt")
94	ErrAppStateIncompatible = errors.New("app state format is not supported by this binary")
95	ErrAppStateConflict     = errors.New("app state conflict")
96	// ErrAppNotFound marks a lifecycle mutation of a name that has no
97	// live app identity at all. It is distinct from a missing revision
98	// or operation on a known app.
99	ErrAppNotFound             = errors.New("app not found")
100	ErrAppRevisionNotFound     = errors.New("app revision not found")
101	ErrAppIntentNotFound       = errors.New("app apply intent not found")
102	ErrAppOperationNotFound    = errors.New("app operation not found")
103	ErrAppReservationConflict  = errors.New("listener reservation conflict")
104	ErrAppTrafficProjection    = errors.New("app traffic projection failed")
105	ErrAppImageUnresolvable    = errors.New("image reference unresolvable")
106	ErrAppImageNotAllowed      = errors.New("image reference not allowed by installation policy")
107	ErrAppSecretMissing        = errors.New("required app secret missing")
108	ErrAppUnmanagedImageVolume = errors.New("image declares unmanaged volume")
109	// ErrAppServiceScope marks an app-wide mutation of a multi-service app
110	// that named neither one service nor all of them.
111	ErrAppServiceScope = errors.New("app service scope required")
112	// ErrPruneDisabled means prune could not establish a safe scope for
113	// the requested operation at all (for example, its protection or
114	// runtime ports are not wired). It is never returned merely because
115	// app state exists: protected and unknown candidates are reported
116	// per candidate and do not fail the operation.
117	ErrPruneDisabled = errors.New("pruning unavailable: cannot establish a safe prune scope")
118
119	// Environment errors
120	ErrEnvFileNotFound             = errors.New("environment file not found")
121	ErrSecretNotFound              = errors.New("secret not found")
122	ErrSecretsAlreadyExist         = errors.New("secrets already exist")
123	ErrProviderNotFound            = errors.New("secret provider not found")
124	ErrAttachmentOwnershipMismatch = errors.New("attachment ownership mismatch")
125	ErrReadinessLogSizeExceeded    = errors.New("readiness log exceeds maximum")
126
127	// Authentication errors
128	ErrInvalidToken       = errors.New("invalid token")
129	ErrExpiredToken       = errors.New("token has expired")
130	ErrRevokedToken       = errors.New("token has been revoked")
131	ErrInvalidCredentials = errors.New("invalid credentials")
132	ErrTokenNotFound      = errors.New("token not found")
133
134	// Security errors
135	ErrPathTraversal        = errors.New("path traversal not allowed")
136	ErrInvalidPath          = errors.New("invalid path format")
137	ErrInsufficientScope    = errors.New("insufficient scope for operation")
138	ErrInvalidScope         = errors.New("invalid scope format")
139	ErrSSRFBlocked          = errors.New("request to internal/blocked network not allowed")
140	ErrInvalidEnvKey        = errors.New("invalid environment variable key")
141	ErrEnvContainsSecretRef = errors.New("environment file contains secret reference")
142	ErrLongLivedToken       = errors.New("long-lived tokens must be exchanged via /auth/token")
143
144	// Remote errors
145	ErrEmptyRemoteName       = errors.New("remote name must not be empty")
146	ErrInvalidRemoteNameChar = errors.New("remote name contains invalid characters")
147	ErrConsecutiveDots       = errors.New("remote name must not contain consecutive dots")
148	ErrPassUnavailable       = errors.New("pass is not available")
149	ErrRemoteNotFound        = errors.New("remote not found")
150
151	// Attachment errors
152	ErrAttachmentNotFound    = errors.New("attachment not found")
153	ErrAttachmentExists      = errors.New("attachment already exists")
154	ErrAttachmentImageEmpty  = errors.New("attachment image cannot be empty")
155	ErrAttachmentTargetEmpty = errors.New("attachment target (domain or group) cannot be empty")
156	ErrAttachmentNotDeployed = errors.New("configured attachment is not deployed; run gordon deploy to create it")
157
158	// TLS / ACME errors
159	ErrACMEDisabled              = errors.New("acme disabled")
160	ErrACMEEmailRequired         = errors.New("acme email required")
161	ErrACMEChallengeInvalid      = errors.New("acme challenge invalid")
162	ErrDNSConfigInvalid          = errors.New("dns configuration invalid")
163	ErrCloudflareTokenMissing    = errors.New("cloudflare api token missing")
164	ErrCertificateStoreRequired  = errors.New("certificate store required")
165	ErrCertificateIssuerRequired = errors.New("certificate issuer required")
166	ErrRouteSourceRequired       = errors.New("route source required")
167	ErrHTTPChallengeSinkRequired = errors.New("http challenge sink required")
168	ErrTLSRouteNotCovered        = errors.New("tls route not covered by public certificate")
169
170	// Traffic errors
171	ErrTrafficStatusUnavailable = errors.New("traffic status unavailable")
172)

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 7

Tags 106

↑↓ moveenter openesc close