forked from 1Panel-dev/KubePi
-
Notifications
You must be signed in to change notification settings - Fork 0
/
types.go
47 lines (40 loc) · 1.25 KB
/
types.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
package session
import v1 "k8s.io/api/rbac/v1"
type LoginCredential struct {
Username string `json:"username"`
Email string `json:"email"`
Password string `json:"password"`
AuthMethod string `json:"authMethod"`
}
type MfaCredential struct {
Username string `json:"username"`
Secret string `json:"secret"`
Code string `json:"code"`
}
type PasswordSetter struct {
NewPassword string `json:"newPassword"`
OldPassword string `json:"oldPassword"`
}
type ProfileSetter struct {
NickName string `json:"nickName"`
Email string `json:"email"`
Language string `json:"language"`
}
type UserProfile struct {
Name string `json:"name"`
NickName string `json:"nickName"`
Email string `json:"email"`
Language string `json:"language"`
ResourcePermissions map[string][]string `json:"resourcePermissions"`
IsAdministrator bool `json:"isAdministrator"`
Mfa Mfa `json:"mfa"`
}
type ClusterUserProfile struct {
UserProfile
ClusterRoles []v1.ClusterRole `json:"clusterRoles"`
}
type Mfa struct {
Enable bool `json:"enable"`
Secret string `json:"secret"`
Approved bool `json:"approved"`
}