forked from vieter-v/vieter
Currently broken start of docker wrapper [CI SKIP]
This commit is contained in:
parent
022f8c4fbe
commit
6f86033cd9
6 changed files with 134 additions and 47 deletions
15
src/docker/containers.v
Normal file
15
src/docker/containers.v
Normal 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)
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue