domain.go 1.6 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364
  1. // Copyright 2019 Yunion
  2. //
  3. // Licensed under the Apache License, Version 2.0 (the "License");
  4. // you may not use this file except in compliance with the License.
  5. // You may obtain a copy of the License at
  6. //
  7. // http://www.apache.org/licenses/LICENSE-2.0
  8. //
  9. // Unless required by applicable law or agreed to in writing, software
  10. // distributed under the License is distributed on an "AS IS" BASIS,
  11. // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  12. // See the License for the specific language governing permissions and
  13. // limitations under the License.
  14. package identity
  15. import "yunion.io/x/onecloud/pkg/apis"
  16. type DomainDetails struct {
  17. apis.StandaloneResourceDetails
  18. IdpResourceInfo
  19. SDomain
  20. DomainUsage
  21. // 归属该域的外部资源统计信息
  22. ExternalResourceInfo
  23. }
  24. type DomainUsage struct {
  25. // 归属域的用户数量
  26. UserCount int `json:"user_count"`
  27. // 归属域的用户组数量
  28. GroupCount int `json:"group_count"`
  29. // 归属域的项目数量
  30. ProjectCount int `json:"project_count"`
  31. // 归属域的角色数量
  32. RoleCount int `json:"role_count"`
  33. // 归属域的权限策略数量
  34. PolicyCount int `json:"policy_count"`
  35. // 归属域的认证源数量
  36. IdpCount int `json:"idp_count"`
  37. }
  38. type DomainUpdateInput struct {
  39. apis.StandaloneResourceBaseUpdateInput
  40. // 显示名
  41. Displayname string `json:"displayname"`
  42. // 是否启用
  43. Enabled *bool `json:"enabled"`
  44. }
  45. type DomainCreateInput struct {
  46. apis.StandaloneResourceCreateInput
  47. // 显示名
  48. Displayname string `json:"displayname"`
  49. // 是否启用
  50. Enabled *bool `json:"enabled"`
  51. }