-
Notifications
You must be signed in to change notification settings - Fork 0
/
types.gen.go
104 lines (81 loc) · 3.24 KB
/
types.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
// Package api provides primitives to interact with the openapi HTTP API.
//
// Code generated by github.com/deepmap/oapi-codegen version v1.11.1-0.20220629212257-2cf7fcf5b26d DO NOT EDIT.
package api
const (
AuthBearerTokenScopes = "authBearerToken.Scopes"
UnauthBearerTokenScopes = "unauthBearerToken.Scopes"
)
// A problem details response, which occured during processing of a request. (Trying to adhere to RFC 7807)
type ProblemDetails struct {
// Human-readable explanation specific to this occurrence of the problem
Detail string `json:"detail"`
// A URI reference that identifies the specific occurrence of the problem
Instance string `json:"instance"`
// A http status code describing a problem
StatusCode int `json:"status_code"`
// A short, human-readable summary of the problem type
Title string `json:"title"`
}
// LoginResponse defines model for LoginResponse.
type LoginResponse struct {
// An unauthenticated JWT access token needed in 2FA.
UnauthToken string `json:"unauth_token"`
}
// Secret2FAResponse defines model for Secret2FAResponse.
type Secret2FAResponse struct {
QrURI *string `json:"qrURI,omitempty"`
}
// VerifyResponse defines model for VerifyResponse.
type VerifyResponse struct {
// An full access JWT.
AccessToken string `json:"access_token"`
}
// LoginRequest defines model for LoginRequest.
type LoginRequest struct {
// Password of an user account
Password string `json:"password" validate:"required"`
// Username of an user account
Username string `json:"username" validate:"required"`
}
// SignupRequest defines model for SignupRequest.
type SignupRequest struct {
// Email address of a new user account
Email string `json:"email" validate:"required"`
// Password for getting access to the new user account
Password string `json:"password" validate:"required"`
// Username with which new user account will be identified in the system
Username string `json:"username" validate:"required"`
}
// Verify2FARequest defines model for Verify2FARequest.
type Verify2FARequest struct {
// OTP for 2FA
Otp int `json:"otp" validate:"required"`
}
// Verify2FAJSONBody defines parameters for Verify2FA.
type Verify2FAJSONBody struct {
// OTP for 2FA
Otp int `json:"otp" validate:"required"`
}
// LoginJSONBody defines parameters for Login.
type LoginJSONBody struct {
// Password of an user account
Password string `json:"password" validate:"required"`
// Username of an user account
Username string `json:"username" validate:"required"`
}
// SignupJSONBody defines parameters for Signup.
type SignupJSONBody struct {
// Email address of a new user account
Email string `json:"email" validate:"required"`
// Password for getting access to the new user account
Password string `json:"password" validate:"required"`
// Username with which new user account will be identified in the system
Username string `json:"username" validate:"required"`
}
// Verify2FAJSONRequestBody defines body for Verify2FA for application/json ContentType.
type Verify2FAJSONRequestBody Verify2FAJSONBody
// LoginJSONRequestBody defines body for Login for application/json ContentType.
type LoginJSONRequestBody LoginJSONBody
// SignupJSONRequestBody defines body for Signup for application/json ContentType.
type SignupJSONRequestBody SignupJSONBody