This repository has been archived by the owner on Oct 2, 2022. It is now read-only.
generated from ContainerSSH/library-template
-
Notifications
You must be signed in to change notification settings - Fork 1
/
codes.go
187 lines (138 loc) · 9.09 KB
/
codes.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
package docker
// The ContainerSSH Docker module failed to read from the ContainerSSH agent. This
// is most likely because the ContainerSSH guest agent is not present in the guest image, but agent support is
// enabled.
const EFailedAgentRead = "DOCKER_AGENT_READ_FAILED"
// The ContainerSSH Docker module attempted to close the output (stdout and
// stderr) for writing but failed to do so.
const EFailedOutputCloseWriting = "DOCKER_CLOSE_OUTPUT_FAILED"
// The ContainerSSH Docker module attempted to close the input (stdin) for
// reading but failed to do so.
const EFailedInputCloseWriting = "DOCKER_CLOSE_INPUT_FAILED"
// The ContainerSSH Docker module detected a configuration error. Please check your
// configuration.
const EConfigError = "DOCKER_CONFIG_ERROR"
// The ContainerSSH Docker module is attaching to a container in session mode.
const MContainerAttach = "DOCKER_CONTAINER_ATTACH"
// The ContainerSSH Docker module has failed to attach to a container in
// session mode.
const EFailedContainerAttach = "DOCKER_CONTAINER_ATTACH_FAILED"
// The ContainerSSH Docker module is creating a container.
const MContainerCreate = "DOCKER_CONTAINER_CREATE"
// The ContainerSSH Docker module failed to create a container. This may be a
// temporary and retried or a permanent error message. Check the log message for details.
const EFailedContainerCreate = "DOCKER_CONTAINER_CREATE_FAILED"
// The ContainerSSH Docker module is starting the previously-created container.
const MContainerStart = "DOCKER_CONTAINER_START"
// The ContainerSSH docker module failed to start the container. This message
// can either be temporary and retried or permanent. Check the log message for details.
const EFailedContainerStart = "DOCKER_CONTAINER_START_FAILED"
// The ContainerSSH Docker module is stopping the container.
const MContainerStop = "DOCKER_CONTAINER_STOP"
// The ContainerSSH Docker module failed to stop the container. This message can
// be either temporary and retried or permanent. Check the log message for details.
const EContainerStopFailed = "DOCKER_CONTAINER_STOP_FAILED"
// The ContainerSSH Docker module os removing the container.
const MContainerRemove = "DOCKER_CONTAINER_REMOVE"
// The ContainerSSH Docker module could not remove the container. This message may be temporary and retried or
// permanent. Check the log message for details.
const EFailedContainerRemove = "DOCKER_CONTAINER_REMOVE_FAILED"
// The ContainerSSH Docker module has successfully removed the container.
const MContainerRemoveSuccessful = "DOCKER_CONTAINER_REMOVE_SUCCESSFUL"
// The ContainerSSH Docker module is sending a signal to the container.
const MContainerSignal = "DOCKER_CONTAINER_SIGNAL"
// The ContainerSSH Docker module has failed to send a signal to the
// container.
const EFailedContainerSignal = "DOCKER_CONTAINER_SIGNAL_FAILED"
// The ContainerSSH Docker module is shutting down a container.
const EShuttingDown = "DOCKER_CONTAINER_SHUTTING_DOWN"
// The ContainerSSH Docker module is creating an execution. This may be in connection mode, or
// it may be the module internally using the exec mechanism to deliver a payload into the container.
const MExec = "DOCKER_EXEC"
// The ContainerSSH Docker module is attaching to the previously-created execution.
const MExecAttach = "DOCKER_EXEC_ATTACH"
// The ContainerSSH Docker module could not attach to the previously-created
// execution.
const EFailedExecAttach = "DOCKER_EXEC_ATTACH_FAILED"
// The ContainerSSH Docker module is creating an execution.
const MExecCreate = "DOCKER_EXEC_CREATE"
// The ContainerSSH Docker module has failed to create an execution. This can be
// temporary and retried or permanent. See the error message for details.
const EFailedExecCreate = "DOCKER_EXEC_CREATE_FAILED"
// The ContainerSSH Docker module has failed to read the process ID from the
// [ContainerSSH Guest Agent](https://github.com/containerssh/agent). This is most likely because the guest image
// does not contain the guest agent, but guest agent support has been enabled.
const EFailedPIDRead = "DOCKER_EXEC_PID_READ_FAILED"
// The ContainerSSH Docker module is resizing the console.
const MResizing = "DOCKER_EXEC_RESIZE"
// The ContainerSSH Docker module failed to resize the console.
const EFailedResize = "DOCKER_EXEC_RESIZE_FAILED"
// The ContainerSSH Docker module is delivering a signal in container mode.
const MExecSignal = "DOCKER_EXEC_SIGNAL"
// The ContainerSSH Docker module failed to deliver a signal.
const EFailedExecSignal = "DOCKER_EXEC_SIGNAL_FAILED"
// The ContainerSSH Docker module failed to deliver a signal because
// [ContainerSSH Guest Agent](https://github.com/containerssh/agent) support is disabled.
const ECannotSendSignalNoAgent = "DOCKER_EXEC_SIGNAL_FAILED_NO_AGENT"
// The ContainerSSH Docker module successfully delivered the requested signal.
const MExecSignalSuccessful = "DOCKER_EXEC_SIGNAL_SUCCESSFUL"
// The ContainerSSH Docker module is fetching the exit code from the program.
const MExitCode = "DOCKER_EXIT_CODE"
// The ContainerSSH Docker module could not fetch the exit code from the program because the container is
// restarting. This is typically a misconfiguration as ContainerSSH containers should not automatically restart.
const EContainerRestarting = "DOCKER_EXIT_CODE_CONTAINER_RESTARTING"
// The ContainerSSH Docker module has failed to fetch the exit code of the
// program.
const EFetchingExitCodeFailed = "DOCKER_EXIT_CODE_FAILED"
// The ContainerSSH Docker module has received a negative exit code from Docker. This should never happen and is
// most likely a bug.
const ENegativeExitCode = "DOCKER_EXIT_CODE_NEGATIVE"
// The ContainerSSH Docker module could not fetch the program exit code because the
// program is still running. This error may be temporary and retried or permanent.
const EStillRunning = "DOCKER_EXIT_CODE_STILL_RUNNING"
// The ContainerSSH Docker module is listing the locally present container images to
// determine if the specified container image needs to be pulled.
const MImageList = "DOCKER_IMAGE_LISTING"
// The ContainerSSH Docker module failed to list the images present in the local Docker daemon. This is used to
// determine if the image needs to be pulled. This can be because the Docker daemon is not reachable, the
// certificate is invalid, or there is something else interfering with listing the images.
const EFailedImageList = "DOCKER_IMAGE_LISTING_FAILED"
// The ContainerSSH Docker module is pulling the container image.
const MImagePull = "DOCKER_IMAGE_PULL"
// The ContainerSSH Docker module failed to pull the specified container image. This can be because of connection
// issues to the Docker daemon, or because the Docker daemon itself can't pull the image. If you don't intend to
// have the image pulled you should set the `ImagePullPolicy` to `Never`. See the
// [Docker documentation](https://containerssh.io/reference/upcoming/docker) for details.
const EFailedImagePull = "DOCKER_IMAGE_PULL_FAILED"
// The ContainerSSH Docker module is checking if an image pull is needed.
const MImagePullNeeded = "DOCKER_IMAGE_PULL_NEEDED_CHECKING"
// The ContainerSSH Docker module can't execute the request because the
// program is already running. This is a client error.
const EProgramAlreadyRunning = "DOCKER_PROGRAM_ALREADY_RUNNING"
// The ContainerSSH Docker module can't deliver a signal because no PID has been
// recorded. This is most likely because guest agent support is disabled.
const EFailedSignalNoPID = "DOCKER_SIGNAL_FAILED_NO_PID"
// The ContainerSSH Docker module failed to stream stdin to the Docker engine.
const EFailedInputStream = "DOCKER_STREAM_INPUT_FAILED"
// The ContainerSSH Docker module failed to stream stdout and stderr from the
// Docker engine.
const EFailedOutputStream = "DOCKER_STREAM_OUTPUT_FAILED"
// The ContainerSSH Docker module is not configured to run the requested
// subsystem.
const ESubsystemNotSupported = "DOCKER_SUBSYSTEM_NOT_SUPPORTED"
// The [ContainerSSH Guest Agent](https://github.com/containerssh/agent) has been
// disabled, which is strongly discouraged. ContainerSSH requires the guest agent to be installed in the container
// image to facilitate all SSH features. Disabling the guest agent will result in breaking the expectations a user
// has towards an SSH server. We provide the ability to disable guest agent support only for cases where the guest
// agent binary cannot be installed in the image at all.
const EGuestAgentDisabled = "DOCKER_GUEST_AGENT_DISABLED"
// This message indicates that you are still using the deprecated DockerRun backend. This backend
// doesn't support all safety and functionality improvements and will be removed in the future. Please
// read the [deprecation notice for a migration guide](https://containerssh.io/deprecations/dockerrun)
const EDockerRun = "DOCKERRUN_DEPRECATED"
// This message indicates that the user tried to execute a program, but program
// execution is disabled in the legacy DockerRun configuration.
const EProgramExecutionDisabled = "DOCKERRUN_EXEC_DISABLED"
// This message indicates that the user requested an action that can only be performed when
// a program is running, but there is currently no program running.
const EProgramNotRunning = "DOCKER_PROGRAM_NOT_RUNNING"