input.go 2.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126
  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 yunionconf
  15. import (
  16. "yunion.io/x/jsonutils"
  17. "yunion.io/x/pkg/util/rbacscope"
  18. "yunion.io/x/onecloud/pkg/apis"
  19. )
  20. type ParameterListInput struct {
  21. apis.ResourceBaseListInput
  22. NamespaceId string `json:"namespace_id"`
  23. // 服务名称或ID
  24. ServiceId string `json:"service_id"`
  25. // Deprecated
  26. // swagger:ignore
  27. Service string `json:"service" yunion-deprecated-by:"service_id"`
  28. // 用户名称或ID
  29. UserId string `json:"user_id"`
  30. // Deprecated
  31. // swagger:ignore
  32. User string `json:"user" yunion-deprecated-by:"user_id"`
  33. // filter by name
  34. Name []string `json:"name"`
  35. }
  36. type ParameterCloneInput struct {
  37. DestNs string `json:"dest_ns"`
  38. DestNsId string `json:"dest_ns_id"`
  39. DestName string `json:"dest_name"`
  40. }
  41. type ScopedPolicyCreateInput struct {
  42. apis.InfrasResourceBaseCreateInput
  43. // 策略类别
  44. Category string `json:"category"`
  45. // 策略定义内容
  46. Policies jsonutils.JSONObject `json:"policies"`
  47. }
  48. type ScopedPolicyUpdateInput struct {
  49. apis.InfrasResourceBaseUpdateInput
  50. // 策略定义内容
  51. Policies jsonutils.JSONObject `json:"policies"`
  52. }
  53. type ScopedPolicyListInput struct {
  54. apis.InfrasResourceBaseListInput
  55. // 策略类别
  56. Category []string `json:"category"`
  57. }
  58. type ScopedPolicyDetails struct {
  59. apis.InfrasResourceBaseDetails
  60. RefCount int `json:"ref_count"`
  61. SScopedPolicy
  62. }
  63. type ScopedPolicyBindingListInput struct {
  64. apis.ResourceBaseListInput
  65. Name []string `json:"name"`
  66. PolicyId string `json:"policy_id"`
  67. DomainId string `json:"domain_id"`
  68. ProjectId string `json:"project_id"`
  69. Category []string `json:"category"`
  70. Effective *bool `json:"effective"`
  71. Scope rbacscope.TRbacScope `json:"scope"`
  72. OrderByScopedpolicy string `json:"order_by_scopedpolicy"`
  73. }
  74. type ScopedPolicyBindingDetails struct {
  75. apis.ResourceBaseDetails
  76. Id string `json:"id"`
  77. PolicyName string `json:"policy_name"`
  78. Category string `json:"category"`
  79. Policies jsonutils.JSONObject `json:"policy"`
  80. ProjectDomain string `json:"project_domain"`
  81. Project string `json:"project"`
  82. SScopedPolicyBinding
  83. }
  84. type ScopedPolicyBindInput struct {
  85. // 绑定范围
  86. Scope rbacscope.TRbacScope `json:"scope"`
  87. // 绑定的目标ID(域或者项目ID)
  88. TargetIds []string `json:"target_ids"`
  89. }