-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathrequest.go
More file actions
69 lines (57 loc) · 1.49 KB
/
request.go
File metadata and controls
69 lines (57 loc) · 1.49 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
67
68
69
package main
import "github.com/21strive/commonuser"
type NativeRegister struct {
Name string `json:"name"`
Username string `json:"username"`
Email string `json:"email"`
Password string `json:"password"`
Avatar string `json:"avatar"`
commonuser.DeviceInfo
}
type VerifyRegistration struct {
VerificationCode string `json:"verificationCode"`
}
type LoginWithEmail struct {
Email string `json:"email"`
Password string `json:"password"`
commonuser.DeviceInfo
}
type LoginWithUsername struct {
Username string `json:"username"`
Password string `json:"password"`
commonuser.DeviceInfo
}
type AuthWithGoogle struct {
Sub string `json:"sub"`
Email string `json:"email"`
Name string `json:"name"`
commonuser.DeviceInfo
}
type UpdateAccount struct {
Name string `json:"name"`
Username string `json:"username"`
Avatar string `json:"avatar"`
}
type UpdateEmail struct {
NewEmail string `json:"newEmail"`
}
type ValidateUpdateEmail struct {
AccountUUID string `json:"accountUUID"`
Token string `json:"token"`
}
type RevokeUpdateEmail struct {
AccountUUID string `json:"accountUUID"`
RevokeToken string `json:"revokeToken"`
}
type UpdatePassword struct {
OldPassword string `json:"oldPassword"`
NewPassword string `json:"newPassword"`
}
type ForgotPassword struct {
Email string `json:"email"`
}
type ResetPassword struct {
AccountUUID string `json:"accountUUID"`
Token string `json:"token"`
NewPassword string `json:"newPassword" binding:"required,min=8,max=255"`
}