Currently broken start of docker wrapper [CI SKIP]

This commit is contained in:
Jef Roosens 2022-02-17 22:00:46 +01:00
parent 022f8c4fbe
commit 6f86033cd9
Signed by untrusted user: Jef Roosens
GPG key ID: B580B976584B5F30
6 changed files with 134 additions and 47 deletions

15
src/docker/containers.v Normal file
View file

@ -0,0 +1,15 @@
module docker
import json
import net.urllib
struct Container {
id string
names []string
}
pub fn containers() ?[]Container {
res := docker.get(urllib.parse('/containers/json') ?) ?
return json.decode([]Container, res.text)
}