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
14 // Image errors
15 ErrImageNotFound = errors.New("image not found")
16 ErrImagePullFailed = errors.New("failed to pull image")
17 ErrInvalidImageFormat = errors.New("invalid image format")
18
19 // Route errors
20 ErrRouteNotFound = errors.New("route not found")
21 ErrRouteExists = errors.New("route already exists")
22 ErrInvalidRoute = errors.New("invalid route configuration")
23 ErrNoTargetAvailable = errors.New("no target available for route")
24
25 // Registry errors
26 ErrManifestNotFound = errors.New("manifest not found")
27 ErrBlobNotFound = errors.New("blob not found")
28 ErrUploadNotFound = errors.New("upload not found")
29 ErrInvalidDigest = errors.New("invalid digest")
30 ErrDigestMismatch = errors.New("digest mismatch")
31 ErrUnauthorized = errors.New("unauthorized")
32
33 // Network errors
34 ErrNetworkNotFound = errors.New("network not found")
35 ErrNetworkExists = errors.New("network already exists")
36
37 // Volume errors
38 ErrVolumeNotFound = errors.New("volume not found")
39 ErrVolumeExists = errors.New("volume already exists")
40
41 // Config errors
42 ErrConfigNotFound = errors.New("configuration not found")
43 ErrInvalidConfig = errors.New("invalid configuration")
44 ErrConfigLoadFailed = errors.New("failed to load configuration")
45
46 // Environment errors
47 ErrEnvFileNotFound = errors.New("environment file not found")
48 ErrSecretNotFound = errors.New("secret not found")
49 ErrProviderNotFound = errors.New("secret provider not found")
50
51 // Authentication errors
52 ErrInvalidToken = errors.New("invalid token")
53 ErrExpiredToken = errors.New("token has expired")
54 ErrRevokedToken = errors.New("token has been revoked")
55 ErrInvalidCredentials = errors.New("invalid credentials")
56 ErrTokenNotFound = errors.New("token not found")
57
58 // Security errors
59 ErrPathTraversal = errors.New("path traversal not allowed")
60 ErrInvalidPath = errors.New("invalid path format")
61 ErrInsufficientScope = errors.New("insufficient scope for operation")
62 ErrInvalidScope = errors.New("invalid scope format")
63)