Release 0.3.0-alpha.2 #185

Merged
Jef Roosens merged 50 commits from release-0.3.0-alpha.2 into main 2022-05-18 07:56:04 +02:00
Showing only changes of commit 889d5a0884 - Show all commits

View file

@ -9,27 +9,6 @@ struct DockerError {
message string message string
} }
struct Container {
id string [json: Id]
names []string [json: Names]
}
// containers returns a list of all containers.
pub fn (mut d DockerConn) containers() ?[]Container {
d.send_request(Method.get, urllib.parse('/v1.41/containers/json')?)?
head, res := d.read_response()?
if head.status_code != 200 {
data := json.decode(DockerError, res)?
return error(data.message)
}
data := json.decode([]Container, res)?
return data
}
pub struct NewContainer { pub struct NewContainer {
image string [json: Image] image string [json: Image]
entrypoint []string [json: Entrypoint] entrypoint []string [json: Entrypoint]