github.com/chnsz/golangsdk@v0.0.0-20240506093406-85a3fbfa605b/openstack/dli/v1/auth/results.go (about) 1 package auth 2 3 type CommonResp struct { 4 IsSuccess bool `json:"is_success"` 5 Message string `json:"message"` 6 } 7 8 type DataPermissions struct { 9 IsSuccess bool `json:"is_success"` 10 Message string `json:"message"` 11 ObjectName string `json:"object_name"` 12 ObjectType string `json:"object_type"` 13 Count int `json:"count"` 14 Privileges []Privilege `json:"privileges"` 15 } 16 17 type Privilege struct { 18 IsAdmin bool `json:"is_admin"` 19 UserName string `json:"user_name"` 20 Privileges []string `json:"privileges"` 21 } 22 23 type QueuePermissions struct { 24 IsSuccess bool `json:"is_success"` 25 Message string `json:"message"` 26 QueueName string `json:"queue_name"` 27 Privileges []Privilege `json:"privileges"` 28 } 29 30 type DatabasePermissions struct { 31 IsSuccess bool `json:"is_success"` 32 Message string `json:"message"` 33 DatabaseName string `json:"database_name"` 34 Privileges []Privilege `json:"privileges"` 35 } 36 37 type TablePermissions struct { 38 IsSuccess bool `json:"is_success"` 39 Message string `json:"message"` 40 Privileges []TablePrivilege `json:"privileges"` 41 } 42 43 type TablePrivilege struct { 44 IsAdmin bool `json:"is_admin"` 45 // Objects on which a user has permission. 46 // If the object is in the format of databases.Database name.tables.Table name, 47 // the user has permission on the database. 48 // If the object is in the format of databases.Database name.tables.Table namecolumns.Column name, 49 // the user has permission on the table. 50 Object string `json:"object"` 51 Privileges []string `json:"privileges"` 52 UserName string `json:"user_name"` 53 } 54 55 type TablePermissionsOfUser struct { 56 IsSuccess bool `json:"is_success"` 57 Message string `json:"message"` 58 UserName string `json:"user_name"` 59 Privileges []TablePrivilegeOfUser `json:"privileges"` 60 } 61 62 type TablePrivilegeOfUser struct { 63 Object string `json:"object"` 64 Privileges []string `json:"privileges"` 65 }