-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathtypes.go
72 lines (61 loc) · 2.28 KB
/
types.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
63
64
65
66
67
68
69
70
71
72
package main
import "time"
// Would be nice to be able to do, instead of this:
// httpinternal "github.com/lunarway/release-manager/internal/http"
// Policy
type ListPoliciesResponse struct {
Service string `json:"service,omitempty"`
AutoReleases []AutoReleasePolicy `json:"autoReleases,omitempty"`
BranchRestrictions []BranchRestrictionPolicy `json:"branchRestrictions,omitempty"`
}
type AutoReleasePolicy struct {
ID string `json:"id,omitempty"`
Branch string `json:"branch,omitempty"`
Environment string `json:"environment,omitempty"`
}
type BranchRestrictionPolicy struct {
ID string `json:"id,omitempty"`
Environment string `json:"environment,omitempty"`
BranchRegex string `json:"branchRegex,omitempty"`
}
// describeArtifact
type DescribeArtifactResponse struct {
Service string `json:"service,omitempty"`
Artifacts []Spec `json:"artifacts,omitempty"`
}
type Spec struct {
ID string `json:"id,omitempty"`
Service string `json:"service,omitempty"`
Namespace string `json:"namespace,omitempty"`
Application Repository `json:"application,omitempty"`
CI CI `json:"ci,omitempty"`
Squad string `json:"squad,omitempty"`
Shuttle Shuttle `json:"shuttle,omitempty"`
Stages []Stage `json:"stages,omitempty"`
}
type Repository struct {
Branch string `json:"branch,omitempty"`
SHA string `json:"sha,omitempty"`
AuthorName string `json:"authorName,omitempty"`
AuthorEmail string `json:"authorEmail,omitempty"`
CommitterName string `json:"committerName,omitempty"`
CommitterEmail string `json:"committerEmail,omitempty"`
Message string `json:"message,omitempty"`
Name string `json:"name,omitempty"`
URL string `json:"url,omitempty"`
Provider string `json:"provider,omitempty"`
}
type Shuttle struct {
Plan Repository `json:"plan,omitempty"`
ShuttleVersion string `json:"shuttleVersion,omitempty"`
}
type CI struct {
JobURL string `json:"jobUrl,omitempty"`
Start time.Time `json:"start,omitempty"`
End time.Time `json:"end,omitempty"`
}
type Stage struct {
ID string `json:"id,omitempty"`
Name string `json:"name,omitempty"`
Data interface{} `json:"data,omitempty"`
}