-
Notifications
You must be signed in to change notification settings - Fork 8
Expand file tree
/
Copy pathmodel.go
More file actions
66 lines (60 loc) · 2.35 KB
/
Copy pathmodel.go
File metadata and controls
66 lines (60 loc) · 2.35 KB
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
package main
// ConfigsModel ...
type ConfigsModel struct {
AppSlug string
APIToken string
Branch string
Tag string
CommitHash string
CommitMessage string
WorkflowID string
BranchDest string
PullRequestID string
PullRequestRepositoryURL string
PullRequestMergeBranch string
PullRequestHeadBranch string
ExportedVariableNames string
BranchRepoOwner string
BranchDestRepoOwner string
}
// RequestModel ...
type RequestModel struct {
HookInfo HookInfoModel `json:"hook_info"`
BuildParams BuildParamsModel `json:"build_params"`
}
// HookInfoModel ...
type HookInfoModel struct {
Type string `json:"type"`
APIToken string `json:"api_token"`
}
// BuildParamsModel ...
type BuildParamsModel struct {
Branch string `json:"branch"`
Tag string `json:"tag"`
CommitHash string `json:"commit_hash"`
CommitMessage string `json:"commit_message"`
WorkflowID string `json:"workflow_id"`
BranchDest string `json:"branch_dest"`
PullRequestID string `json:"pull_request_id"`
PullRequestRepositoryURL string `json:"pull_request_repository_url"`
PullRequestMergeBranch string `json:"pull_request_merge_branch"`
PullRequestHeadBranch string `json:"pull_request_head_branch"`
Environments []EnvironmentVariableModel `json:"environments"`
BranchDestRepoOwner string `json:"branch_dest_repo_owner"`
BranchRepoOwner string `json:"branch_repo_owner"`
}
// EnvironmentVariableModel ...
type EnvironmentVariableModel struct {
MappedTo string `json:"mapped_to"`
Value string `json:"value"`
IsExpand bool `json:"is_expand"`
}
// ResponseModel ...
type ResponseModel struct {
Status string `json:"message"`
Message string `json:"status"`
BuildSlug string `json:"build_slug"`
BuildNumber int `json:"build_number"`
BuildURL string `json:"build_url"`
TriggeredWorkflow string `json:"triggered_workflow"`
}