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
|
# Podman Service Interface
interface io.projectatomic.podman
# Version is the structure returned by GetVersion
type Version (
version: string,
go_version: string,
git_commit: string,
built: int,
os_arch: string
)
type NotImplemented (
comment: string
)
type StringResponse (
message: string
)
# ImageInList describes the structure that is returned in
# ListImages.
type ImageInList (
id: string,
parentId: string,
repoTags: []string,
repoDigests: []string,
created: string,
size: int,
virtualSize: int,
containers: int,
labels: [string]string
)
# ImageHistory describes the returned structure from ImageHistory.
type ImageHistory (
id: string,
created: string,
createdBy: string,
tags: []string,
size: int,
comment: string
)
# ImageSearch is the returned structure for SearchImage. It is returned
# in arrary form.
type ImageSearch (
description: string,
is_official: bool,
is_automated: bool,
name: string,
star_count: int
)
# ListContainer is the returned struct for an individual container
type ListContainerData (
id: string,
image: string,
imageid: string,
command: []string,
createdat: string,
runningfor: string,
status: string,
ports: []ContainerPortMappings,
rootfssize: int,
rwsize: int,
names: string,
labels: [string]string,
mounts: []ContainerMount,
containerrunning: bool,
namespaces: ContainerNameSpace
)
# ContainerStats is the return struct for the stats of a container
type ContainerStats (
id: string,
name: string,
cpu: float,
cpu_nano: int,
system_nano: int,
mem_usage: int,
mem_limit: int,
mem_perc: float,
net_input: int,
net_output: int,
block_output: int,
block_input: int,
pids: int
)
# ContainerMount describes the struct for mounts in a container
type ContainerMount (
destination: string,
type: string,
source: string,
options: []string
)
# ContainerPortMappings describes the struct for portmappings in an existing container
type ContainerPortMappings (
host_port: string,
host_ip: string,
protocol: string,
container_port: string
)
# ContainerNamespace describes the namespace structure for an existing container
type ContainerNameSpace (
user: string,
uts: string,
pidns: string,
pid: string,
cgroup: string,
net: string,
mnt: string,
ipc: string
)
# System
method Ping() -> (ping: StringResponse)
method GetVersion() -> (version: Version)
# Containers
method ListContainers() -> (containers: []ListContainerData)
method GetContainer(name: string) -> (container: ListContainerData)
method CreateContainer() -> (notimplemented: NotImplemented)
method InspectContainer(name: string) -> (container: string)
# TODO: Should this be made into a streaming response as opposed to a one off?
method ListContainerProcesses(name: string, opts: []string) -> (container: []string)
# TODO: Should this be made into a streaming response as opposed to a one off?
method GetContainerLogs(name: string) -> (container: []string)
method ListContainerChanges(name: string) -> (container: [string]string)
# TODO: This should be made into a streaming response
method ExportContainer(name: string, path: string) -> (tarfile: string)
method GetContainerStats(name: string) -> (container: ContainerStats)
method ResizeContainerTty() -> (notimplemented: NotImplemented)
method StartContainer() -> (notimplemented: NotImplemented)
method StopContainer(name: string, timeout: int) -> (container: string)
method RestartContainer(name: string, timeout: int) -> (container: string)
method KillContainer(name: string, signal: int) -> (container: string)
method UpdateContainer() -> (notimplemented: NotImplemented)
method RenameContainer() -> (notimplemented: NotImplemented)
method PauseContainer(name: string) -> (container: string)
method UnpauseContainer(name: string) -> (container: string)
method AttachToContainer() -> (notimplemented: NotImplemented)
method WaitContainer(name: string) -> (exitcode: int)
method RemoveContainer(name: string, force: bool) -> (container: string)
method DeleteStoppedContainers() -> (containers: []string)
# Images
method ListImages() -> (images: []ImageInList)
method BuildImage() -> (notimplemented: NotImplemented)
method CreateImage() -> (notimplemented: NotImplemented)
method InspectImage(name: string) -> (image: string)
method HistoryImage(name: string) -> (history: []ImageHistory)
method PushImage(name: string, tag: string, tlsverify: bool) -> ()
method TagImage(name: string, tagged: string) -> ()
method RemoveImage(name: string, force: bool) -> (image: string)
method SearchImage(name: string, limit: int) -> (images: []ImageSearch)
method DeleteUnusedImages() -> (images: []string)
method CreateFromContainer() -> (notimplemented: NotImplemented)
method ImportImage(source: string, reference: string, message: string, changes: []string) -> (image: string)
method ExportImage(name: string, destination: string, compress: bool) -> ()
method PullImage(name: string) -> (id: string)
# Something failed
error ActionFailed (reason: string)
error ImageNotFound (name: string)
error ContainerNotFound (name: string)
error ErrorOccurred (reason: string)
error RuntimeError (reason: string)
|