-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmodels.go
99 lines (85 loc) · 3.16 KB
/
models.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
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
package vercel_client
type errorResponse struct {
Error *errorContent `json:"error"`
}
type errorContent struct {
Code string `json:"code"`
Message string `json:"message"`
}
type GetProjectsResponse struct {
Project []*Project `json:"project"`
}
type Project struct {
Id string `json:"id"`
Name string `json:"name"`
Framework string `json:"framework"`
RootDirectory string `json:"rootDirectory"`
NodeVersion string `json:"nodeVersion"`
AccountId string `json:"accountId"`
UpdatedAt int64 `json:"updatedAt"`
CreatedAt int64 `json:"createdAt"`
Alias []*Domain `json:"alias"`
Link *RepositoryLink `json:"link"`
BuildCommand string `json:"buildCommand"`
OutputDirectory string `json:"outputDirectory"`
CommandForIgnoringBuildStep string `json:"commandForIgnoringBuildStep,omitempty"`
}
type RepositoryLink struct {
Type string `json:"type"`
Repo string `json:"repo"`
Org string `json:"org"`
}
type CreateProjectOptions struct {
Name string
Framework string
RepositoryType string
RepositoryName string
RootDirectory string
BuildCommand string
OutputDirectory string
CommandForIgnoringBuildStep string
}
type CreateProjectRequest struct {
Name string `json:"name"`
Framework *string `json:"framework"`
RootDirectory *string `json:"rootDirectory"`
GitRepository *GitRepositoryRequest `json:"gitRepository,omitempty"`
BuildCommand string `json:"buildCommand,omitempty"`
OutputDirectory string `json:"outputDirectory,omitempty"`
CommandForIgnoringBuildStep string `json:"commandForIgnoringBuildStep,omitempty"`
}
type GitRepositoryRequest struct {
Type string `json:"type"`
Repo string `json:"repo"`
}
type UpdateProjectRequest struct {
Framework *string `json:"framework"`
RootDirectory *string `json:"rootDirectory"`
BuildCommand *string `json:"buildCommand"`
OutputDirectory *string `json:"outputDirectory"`
CommandForIgnoringBuildStep string `json:"commandForIgnoringBuildStep"`
}
type CreateProjectEnvRequest struct {
Type string `json:"type"`
Key string `json:"key"`
Value string `json:"value"`
Target []string `json:"target"`
}
type GetProjectEnvsResponse struct {
Envs []*ProjectEnv `json:"envs"`
}
type ProjectEnv struct {
Id string `json:"id"`
Type string `json:"type"`
Key string `json:"key"`
Value string `json:"value"`
Target []string `json:"target"`
}
type Domain struct {
Domain string `json:"domain"`
Redirect string `json:"redirect"`
}
type CreateDomainRequest struct {
Domain string `json:"domain"`
Redirect string `json:"redirect"`
}