-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathcli_model.go
192 lines (177 loc) · 5.68 KB
/
cli_model.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
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
package main
import (
"time"
)
type User struct {
Id string `json:"id"`
UserName string `json:"username"`
Email string `json:"email"`
Password string `json:"password"`
}
/*type Domain struct {
Id string `json:"id"`
WebsiteId string `json:"websiteId"`
Origin string `json:"origin"`
Name string `json:"name"`
Type string `json:"type"`
Usage float64 `json:"usage"`
}*/
type DomainsResponse struct {
Status int `json:"status"`
Error struct {
Code int `json:"code"`
Description string `json:"description"`
Parameter string `json:"parameter"`
} `json:"error"`
Data struct {
Distributions []Data `json:"distributions"`
} `json:"data"`
}
type DomainRequest struct {
WebsiteId string `json:"websiteId"`
Origin string `json:"origin"`
}
type DomainResponse struct {
Status int `json:"status"`
Error struct {
Code int `json:"code"`
Description string `json:"description"`
Parameter string `json:"parameter"`
} `json:"error"`
Data Data `json:"data"`
}
type UsageResponse struct {
Status int `json:"status"`
Error struct {
Code int `json:"code"`
Description string `json:"description"`
Parameter string `json:"parameter"`
} `json:"error"`
Data struct {
Bandwidth int `json:"bandwidth"`
Requests int `json:"requests"`
Distributions int `json:"distributions"`
} `json:"data"`
}
type UserResponse struct {
Status int `json:"status"`
Error struct {
Code int `json:"code"`
Description string `json:"description"`
Parameter string `json:"parameter"`
} `json:"error"`
Data struct {
ID string `json:"id"`
FirstName string `json:"firstName"`
LastName string `json:"lastName"`
Email string `json:"email"`
Role string `json:"role"`
IsEnterprise int `json:"isEnterprise"`
FeaturePrivateS3 int `json:"featurePrivateS3"`
FeatureTPO int `json:"featureTPO"`
Coupon interface{} `json:"Coupon"`
IsPaymentDetailsEntered bool `json:"isPaymentDetailsEntered"`
IsPasswordEntered bool `json:"isPasswordEntered"`
IsVerified bool `json:"isVerified"`
Plan struct {
ID string `json:"id"`
TeamID string `json:"teamId"`
Tier int `json:"tier"`
Name string `json:"name"`
MaxDistributions int `json:"max_distributions"`
MaxBandwidth int `json:"max_bandwidth"`
MaxRequests int `json:"max_requests"`
Price int `json:"price"`
CreatedAt time.Time `json:"createdAt"`
UpdatedAt time.Time `json:"updatedAt"`
} `json:"Plan"`
} `json:"data"`
}
type TokenSettings struct {
Token string
}
type Response struct {
Data map[string]interface{}
Error map[string]interface{}
}
type ErrorResponse struct {
Status int `json:"status"`
Error struct {
Code int `json:"code"`
Description string `json:"description"`
Parameter string `json:"parameter"`
} `json:"error"`
Data struct {
} `json:"data"`
}
type WebsiteResponse struct {
Status int `json:"status"`
Error interface{} `json:"error"`
Data struct {
WebsiteURL string `json:"websiteUrl"`
WebsiteType string `json:"websiteType"`
WebsiteName string `json:"websiteName"`
ID string `json:"id"`
} `json:"data"`
}
type WebsitesResponse struct {
Status int `json:"status"`
Error struct {
Code int `json:"code"`
Description string `json:"description"`
Parameter string `json:"parameter"`
} `json:"error"`
Data []struct {
WebsiteURL string `json:"websiteUrl"`
WebsiteType string `json:"websiteType"`
WebsiteName string `json:"websiteName"`
ID string `json:"id"`
} `json:"data"`
}
type WebsiteRequest struct {
WebsiteURL string `json:"websiteUrl"`
WebsiteType string `json:"websiteType"`
WebsiteName string `json:"websiteName"`
}
type Data struct {
ID string `json:"id"`
Origin string `json:"origin"`
Name string `json:"name"`
Type string `json:"type"`
Status string `json:"status"`
WebsiteID string `json:"websiteId"`
Region string `json:"region"`
RootPath string `json:"rootPath"`
CNames []string `json:"CNames"`
JsEnabled bool `json:"jsEnabled"`
CSSEnabled bool `json:"cssEnabled"`
ImageEnabled bool `json:"imageEnabled"`
SVGEnabled bool `json:"SVGEnabled"`
FontEnabled bool `json:"fontEnabled"`
ProxyEnabled bool `json:"proxyEnabled"`
CacheControlImmutable bool `json:"cacheControlImmutable"`
GIFEnabled bool `json:"GIFEnabled"`
DefaultCacheTime int `json:"defaultCacheTime"`
Rules []struct {
Pattern string `json:"pattern"`
Actions []string `json:"actions"`
} `json:"rules"`
AutoResize bool `json:"autoResize"`
AutoRotate bool `json:"autoRotate"`
HeifEnabled bool `json:"heifEnabled"`
TextDetection bool `json:"textDetection"`
FaceDetection bool `json:"faceDetection"`
Zopflipng bool `json:"zopflipng"`
ErrorCaching struct {
ServerError map[string]interface{} `json:"serverError"`
ClientError struct {
Default int `json:"default"`
} `json:"clientError"`
} `json:"errorCaching"`
LinkCanonical bool `json:"linkCanonical"`
S3BucketIsOrigin bool `json:"s3BucketIsOrigin"`
S3Bucket struct {
Name string `json:"name"`
Region string `json:"region"`
} `json:"s3Bucket"`
}