Files
kubesphere/pkg/componenthelper/auth/rbac/interface.go
KubeSphere CI Bot 447a51f08b feat: kubesphere 4.0 (#6115)
* feat: kubesphere 4.0

Signed-off-by: ci-bot <ci-bot@kubesphere.io>

* feat: kubesphere 4.0

Signed-off-by: ci-bot <ci-bot@kubesphere.io>

---------

Signed-off-by: ci-bot <ci-bot@kubesphere.io>
Co-authored-by: ks-ci-bot <ks-ci-bot@example.com>
Co-authored-by: joyceliu <joyceliu@yunify.com>
2024-09-06 11:05:52 +08:00

31 lines
796 B
Go

/*
* Please refer to the LICENSE file in the root directory of the project.
* https://github.com/kubesphere/kubesphere/blob/master/LICENSE
*/
package rbac
import (
rbacv1 "k8s.io/api/rbac/v1"
"k8s.io/apimachinery/pkg/runtime"
iamv1beta1 "kubesphere.io/api/iam/v1beta1"
)
type RuleOwner interface {
GetObject() runtime.Object
GetNamespace() string
GetName() string
GetLabels() map[string]string
SetLabels(map[string]string)
GetAnnotations() map[string]string
SetAnnotations(map[string]string)
GetRules() []rbacv1.PolicyRule
SetRules([]rbacv1.PolicyRule)
GetRegoPolicy() string
SetRegoPolicy(string)
GetAggregationRule() *iamv1beta1.AggregationRoleTemplates
SetAggregationRule(*iamv1beta1.AggregationRoleTemplates)
DeepCopyRuleOwner() RuleOwner
GetRuleOwnerScope() string
}