-
Notifications
You must be signed in to change notification settings - Fork 7
/
results.go
65 lines (56 loc) · 1.98 KB
/
results.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
package auth
type CommonResp struct {
IsSuccess bool `json:"is_success"`
Message string `json:"message"`
}
type DataPermissions struct {
IsSuccess bool `json:"is_success"`
Message string `json:"message"`
ObjectName string `json:"object_name"`
ObjectType string `json:"object_type"`
Count int `json:"count"`
Privileges []Privilege `json:"privileges"`
}
type Privilege struct {
IsAdmin bool `json:"is_admin"`
UserName string `json:"user_name"`
Privileges []string `json:"privileges"`
}
type QueuePermissions struct {
IsSuccess bool `json:"is_success"`
Message string `json:"message"`
QueueName string `json:"queue_name"`
Privileges []Privilege `json:"privileges"`
}
type DatabasePermissions struct {
IsSuccess bool `json:"is_success"`
Message string `json:"message"`
DatabaseName string `json:"database_name"`
Privileges []Privilege `json:"privileges"`
}
type TablePermissions struct {
IsSuccess bool `json:"is_success"`
Message string `json:"message"`
Privileges []TablePrivilege `json:"privileges"`
}
type TablePrivilege struct {
IsAdmin bool `json:"is_admin"`
// Objects on which a user has permission.
// If the object is in the format of databases.Database name.tables.Table name,
// the user has permission on the database.
// If the object is in the format of databases.Database name.tables.Table namecolumns.Column name,
// the user has permission on the table.
Object string `json:"object"`
Privileges []string `json:"privileges"`
UserName string `json:"user_name"`
}
type TablePermissionsOfUser struct {
IsSuccess bool `json:"is_success"`
Message string `json:"message"`
UserName string `json:"user_name"`
Privileges []TablePrivilegeOfUser `json:"privileges"`
}
type TablePrivilegeOfUser struct {
Object string `json:"object"`
Privileges []string `json:"privileges"`
}