-
Notifications
You must be signed in to change notification settings - Fork 3
/
openapi.gen.go
408 lines (345 loc) · 12.7 KB
/
openapi.gen.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
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
// Package api provides primitives to interact with the openapi HTTP API.
//
// Code generated by github.com/deepmap/oapi-codegen version v1.16.2 DO NOT EDIT.
package api
import (
"time"
openapi_types "github.com/oapi-codegen/runtime/types"
)
const (
Pat_basicScopes = "pat_basic.Scopes"
Pat_bearerScopes = "pat_bearer.Scopes"
)
// Defines values for ClientType.
const (
ClientTypeCustom ClientType = "custom"
ClientTypeGo ClientType = "go"
ClientTypeJavascript ClientType = "javascript"
ClientTypePython ClientType = "python"
ClientTypeRuby ClientType = "ruby"
)
// Defines values for CredentialStatus.
const (
Expired CredentialStatus = "expired"
Online CredentialStatus = "online"
Revoked CredentialStatus = "revoked"
)
// Defines values for ServiceServerType.
const (
ServiceServerTypeCaddy ServiceServerType = "caddy"
ServiceServerTypeCustom ServiceServerType = "custom"
ServiceServerTypeDiagnostic ServiceServerType = "diagnostic"
ServiceServerTypeGo ServiceServerType = "go"
ServiceServerTypeJavascript ServiceServerType = "javascript"
ServiceServerTypePython ServiceServerType = "python"
ServiceServerTypeRuby ServiceServerType = "ruby"
)
// AuthCliCodesResponse defines model for auth_cli_codes_response.
type AuthCliCodesResponse struct {
// DeviceCode Unique code associated with origin device for CLI auth flow.
DeviceCode string `json:"device_code"`
// ExpiresIn Number of seconds until device and user codes expire, defaults to 900s (15m).
ExpiresIn int32 `json:"expires_in"`
// Interval Minimum number of seconds to wait before re-polling during CLI auth flow, defaults to 5s.
Interval int32 `json:"interval"`
// UserCode User verification code to be presented for the user to enter into a browser, formed by 8 characters with a hyphen in the middle.
UserCode string `json:"user_code"`
// VerificationUri The URL where the user will need to enter their code to complete the CLI auth flow.
VerificationUri string `json:"verification_uri"`
}
// AuthCliPatTokensResponse defines model for auth_cli_pat_tokens_response.
type AuthCliPatTokensResponse struct {
// PatToken Authenticated token for user API interactions.
PatToken string `json:"pat_token"`
}
// Chain defines model for chain.
type Chain struct {
// Name The name of the chain.
Name string `json:"name"`
Relationships struct {
Org struct {
// Slug A value used as a parameter when referencing this org.
Slug string `json:"slug"`
} `json:"org"`
Realm struct {
// Slug A value used as a parameter when referencing this realm.
Slug string `json:"slug"`
} `json:"realm"`
} `json:"relationships"`
// Slug A value used as a parameter when referencing this chain.
Slug string `json:"slug"`
}
// Client defines model for client.
type Client struct {
// Name A name for the client.
Name string `json:"name"`
Relationships *struct {
Organization *struct {
// Slug A value used as a parameter when referencing this organization.
Slug string `json:"slug"`
} `json:"organization,omitempty"`
Service *struct {
// Slug A value used as a parameter when referencing this service.
Slug string `json:"slug"`
} `json:"service,omitempty"`
} `json:"relationships,omitempty"`
// Slug A value used as a parameter when referencing this client.
Slug string `json:"slug"`
// Type A type for the client.
Type ClientType `json:"type"`
}
// ClientType A type for the client.
type ClientType string
// Credential defines model for credential.
type Credential struct {
// CreatedAt UTC time when credential was created.
CreatedAt time.Time `json:"created_at"`
// Name name of credential
Name string `json:"name"`
// Revision Current revision of credential
Revision int64 `json:"revision"`
// RevokedAt UTC time after which credential will be revoked
RevokedAt *time.Time `json:"revoked_at"`
// Serial serial id for credential
Serial string `json:"serial"`
// SignatureAlgorithm Algorithm used to sign credential
SignatureAlgorithm interface{} `json:"signature_algorithm"`
// Status current status of credential
Status CredentialStatus `json:"status"`
// TextualEncoding base64 textual encoding of credential based on RFC7468
TextualEncoding string `json:"textual_encoding"`
// Uuid uuid for credential
Uuid *openapi_types.UUID `json:"uuid,omitempty"`
// ValidAfter UTC time after which credential will be valid.
ValidAfter time.Time `json:"valid_after"`
// ValidBefore UTC time after which credential will no longer be valid.
ValidBefore time.Time `json:"valid_before"`
}
// CredentialStatus current status of credential
type CredentialStatus string
// Credentials defines model for credentials.
type Credentials struct {
Items []Credential `json:"items"`
}
// Eab defines model for eab.
type Eab struct {
// HmacKey EAB HMAC key
HmacKey string `json:"hmac_key"`
// Kid EAB key identifier
Kid string `json:"kid"`
Relationships struct {
Chain struct {
// Slug A value used as a parameter when referencing this chain.
Slug string `json:"slug"`
} `json:"chain"`
Organization struct {
// Slug A value used as a parameter when referencing this organization.
Slug string `json:"slug"`
} `json:"organization"`
Realm struct {
// Slug A value used as a parameter when referencing this realm.
Slug string `json:"slug"`
} `json:"realm"`
Service struct {
// Slug A value used as a parameter when referencing this service.
Slug string `json:"slug"`
} `json:"service"`
SubCa struct {
// Slug A value used as a parameter when referencing this sub_ca.
Slug string `json:"slug"`
} `json:"sub_ca"`
} `json:"relationships"`
}
// Error defines model for error.
type Error struct {
// Detail A human-readable description of this occurrence of the problem.
Detail string `json:"detail"`
// Status HTTP status code of this occurrence of the problem.
Status int32 `json:"status"`
// Title A human-readable description of this problem type.
Title string `json:"title"`
// Type URI identifying problem.
Type string `json:"type"`
}
// Root defines model for root.
type Root struct {
PersonalOrg struct {
Slug string `json:"slug"`
} `json:"personal_org"`
Whoami string `json:"whoami"`
}
// Service defines model for service.
type Service struct {
// LocalhostPort A port number for use on localhost or null.
LocalhostPort *int `json:"localhost_port"`
// Name A name for the service.
Name string `json:"name"`
Relationships struct {
Organization struct {
// Slug A value used as a parameter when referencing this organization.
Slug string `json:"slug"`
} `json:"organization"`
} `json:"relationships"`
// ServerType A server type for the service.
ServerType ServiceServerType `json:"server_type"`
// Slug A value used as a parameter when referencing this service.
Slug string `json:"slug"`
}
// ServiceServerType A server type for the service.
type ServiceServerType string
// Services defines model for services.
type Services struct {
Items []Service `json:"items"`
}
// PathOrgParam defines model for path_org_param.
type PathOrgParam = string
// PathRealmParam defines model for path_realm_param.
type PathRealmParam = string
// PathServiceParam defines model for path_service_param.
type PathServiceParam = string
// QueryCaParam defines model for query_ca_param.
type QueryCaParam = string
// ServicesXtach200 defines model for services_xtach_200.
type ServicesXtach200 struct {
// Domains A list of domains for this attachment.
Domains []string `json:"domains"`
Relationships struct {
Chain struct {
// Slug A value used as a parameter when referencing this chain.
Slug string `json:"slug"`
} `json:"chain"`
Organization struct {
// Slug A value used as a parameter when referencing this organization.
Slug string `json:"slug"`
} `json:"organization"`
Realm *struct {
// Slug A value used as a parameter when referencing this realm.
Slug string `json:"slug"`
} `json:"realm,omitempty"`
Service struct {
// Slug A value used as a parameter when referencing this services
Slug string `json:"slug"`
} `json:"service"`
SubCa struct {
// Slug A value used as a parameter when referencing this sub_ca
Slug string `json:"slug"`
} `json:"sub_ca"`
} `json:"relationships"`
}
// ServicesXtach defines model for services_xtach.
type ServicesXtach struct {
// Domains A list of domains for this attachment.
Domains []string `json:"domains"`
Relationships struct {
Chain struct {
// Slug A value used as a parameter when referencing this chain.
Slug string `json:"slug"`
} `json:"chain"`
Realm struct {
// Slug A value used as a parameter when referencing this realm.
Slug string `json:"slug"`
} `json:"realm"`
} `json:"relationships"`
}
// CreateEabTokenJSONBody defines parameters for CreateEabToken.
type CreateEabTokenJSONBody struct {
Relationships struct {
Chain struct {
// Slug A value used as a parameter when referencing this chain.
Slug string `json:"slug"`
} `json:"chain"`
Organization struct {
// Slug A value used as a parameter when referencing this organization.
Slug string `json:"slug"`
} `json:"organization"`
Realm struct {
// Slug A value used as a parameter when referencing this realm.
Slug string `json:"slug"`
} `json:"realm"`
Service struct {
// Slug A value used as a parameter when referencing this service.
Slug *string `json:"slug,omitempty"`
} `json:"service,omitempty"`
SubCa struct {
// Slug A value used as a parameter when referencing this sub_ca.
Slug string `json:"slug"`
} `json:"sub_ca"`
} `json:"relationships"`
}
// CreateCliTokenJSONBody defines parameters for CreateCliToken.
type CreateCliTokenJSONBody struct {
// DeviceCode Unique code associated with origin device for CLI auth flow.
DeviceCode string `json:"device_code"`
}
// CreateClientJSONBody defines parameters for CreateClient.
type CreateClientJSONBody struct {
Relationships *struct {
Organization *struct {
Slug string `json:"slug"`
} `json:"organization,omitempty"`
Service *struct {
Slug string `json:"slug"`
} `json:"service,omitempty"`
} `json:"relationships,omitempty"`
ServerType *string `json:"server_type,omitempty"`
Type *string `json:"type,omitempty"`
}
// GetCredentialsParams defines parameters for GetCredentials.
type GetCredentialsParams struct {
// CaParam ca for operation
CaParam *QueryCaParam `form:"ca_param,omitempty" json:"ca_param,omitempty"`
}
// AttachOrgServiceJSONBody defines parameters for AttachOrgService.
type AttachOrgServiceJSONBody struct {
// Domains A list of domains for this attachment.
Domains []string `json:"domains"`
Relationships struct {
Chain struct {
// Slug A value used as a parameter when referencing this chain.
Slug string `json:"slug"`
} `json:"chain"`
Realm struct {
// Slug A value used as a parameter when referencing this realm.
Slug string `json:"slug"`
} `json:"realm"`
} `json:"relationships"`
}
// DetachOrgServiceJSONBody defines parameters for DetachOrgService.
type DetachOrgServiceJSONBody struct {
// Domains A list of domains for this attachment.
Domains []string `json:"domains"`
Relationships struct {
Chain struct {
// Slug A value used as a parameter when referencing this chain.
Slug string `json:"slug"`
} `json:"chain"`
Realm struct {
// Slug A value used as a parameter when referencing this realm.
Slug string `json:"slug"`
} `json:"realm"`
} `json:"relationships"`
}
// CreateServiceJSONBody defines parameters for CreateService.
type CreateServiceJSONBody struct {
LocalhostPort *int `json:"localhost_port,omitempty"`
Name string `json:"name"`
Relationships struct {
Organization struct {
// Slug A value used as a parameter when referencing this organization.
Slug string `json:"slug"`
} `json:"organization"`
} `json:"relationships"`
ServerType string `json:"server_type"`
}
// CreateEabTokenJSONRequestBody defines body for CreateEabToken for application/json ContentType.
type CreateEabTokenJSONRequestBody CreateEabTokenJSONBody
// CreateCliTokenJSONRequestBody defines body for CreateCliToken for application/json ContentType.
type CreateCliTokenJSONRequestBody CreateCliTokenJSONBody
// CreateClientJSONRequestBody defines body for CreateClient for application/json ContentType.
type CreateClientJSONRequestBody CreateClientJSONBody
// AttachOrgServiceJSONRequestBody defines body for AttachOrgService for application/json ContentType.
type AttachOrgServiceJSONRequestBody AttachOrgServiceJSONBody
// DetachOrgServiceJSONRequestBody defines body for DetachOrgService for application/json ContentType.
type DetachOrgServiceJSONRequestBody DetachOrgServiceJSONBody
// CreateServiceJSONRequestBody defines body for CreateService for application/json ContentType.
type CreateServiceJSONRequestBody CreateServiceJSONBody