-
Notifications
You must be signed in to change notification settings - Fork 4
Expand file tree
/
Copy pathapps.go
More file actions
35 lines (30 loc) · 869 Bytes
/
apps.go
File metadata and controls
35 lines (30 loc) · 869 Bytes
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
package api
// App is the definition of the app object.
type App struct {
Created string `json:"created"`
ID string `json:"id"`
Owner string `json:"owner"`
Updated string `json:"updated"`
URL string `json:"url"`
UUID string `json:"uuid"`
}
// Apps is the definition of GET /v1/apps/.
type Apps struct {
Count int `json:"count"`
Next int `json:"next"`
Previous int `json:"previous"`
Apps []App `json:"results"`
}
// AppCreateRequest is the definition of POST /v1/apps/.
type AppCreateRequest struct {
ID string `json:"id,omitempty"`
}
// AppRunRequest is the definition of POST /v1/apps/<app id>/run.
type AppRunRequest struct {
Command string `json:"command"`
}
// AppRunResponse is the definition of /v1/apps/<app id>/run.
type AppRunResponse struct {
Output string `json:"output"`
ReturnCode int `json:"rc"`
}