2022-06-22 09:15:00 +02:00
|
|
|
module docker
|
2022-06-21 15:47:42 +02:00
|
|
|
|
|
|
|
struct DockerError {
|
2022-12-15 11:17:51 +01:00
|
|
|
pub mut:
|
2022-06-21 20:28:25 +02:00
|
|
|
status int [skip]
|
2022-06-21 15:47:42 +02:00
|
|
|
message string
|
|
|
|
}
|
|
|
|
|
|
|
|
fn (err DockerError) code() int {
|
2022-06-21 20:28:25 +02:00
|
|
|
return err.status
|
2022-06-21 15:47:42 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
fn (err DockerError) msg() string {
|
2022-06-21 20:28:25 +02:00
|
|
|
return err.message
|
2022-06-21 15:47:42 +02:00
|
|
|
}
|
|
|
|
|
2022-12-15 11:17:51 +01:00
|
|
|
fn docker_error(status int, message string) DockerError {
|
|
|
|
return DockerError{
|
2022-06-21 20:28:25 +02:00
|
|
|
status: status
|
|
|
|
message: message
|
2022-12-15 11:17:51 +01:00
|
|
|
}
|
2022-06-21 15:47:42 +02:00
|
|
|
}
|