-
Notifications
You must be signed in to change notification settings - Fork 53
/
build.go
62 lines (52 loc) · 1.67 KB
/
build.go
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
package structs
import (
"time"
)
type Build struct {
Id string `json:"id"`
App string `json:"app"`
Description string `json:"description"`
Entrypoint string `json:"entrypoint"`
GitSha string `json:"git-sha"`
Logs string `json:"logs"`
Manifest string `json:"manifest"`
Process string `json:"process"`
Release string `json:"release"`
Reason string `json:"reason"`
Repository string `json:"repository"`
Status string `json:"status"`
Started time.Time `json:"started"`
Ended time.Time `json:"ended"`
Tags map[string]string `json:"-"`
}
type Builds []Build
type BuildCreateOptions struct {
BuildArgs *[]string `flag:"build-args" param:"build-args"`
Description *string `flag:"description,d" param:"description"`
Development *bool `flag:"development" param:"development"`
External *bool `flag:"external" param:"external"`
Manifest *string `flag:"manifest,m" param:"manifest"`
NoCache *bool `flag:"no-cache" param:"no-cache"`
WildcardDomain *bool `flag:"wildcard-domain" param:"wildcard-domain"`
GitSha *string `param:"git-sha"`
}
type BuildListOptions struct {
Limit *int `flag:"limit,l" query:"limit"`
}
type BuildUpdateOptions struct {
Ended *time.Time `param:"ended"`
Entrypoint *string `param:"entrypoint"`
Logs *string `param:"logs"`
Manifest *string `param:"manifest"`
Release *string `param:"release"`
Started *time.Time `param:"started"`
Status *string `param:"status"`
}
func NewBuild(app string) *Build {
return &Build{
App: app,
Id: id("B", 10),
Status: "created",
Tags: map[string]string{},
}
}