forked from openshift/origin
-
Notifications
You must be signed in to change notification settings - Fork 0
/
registry.go
21 lines (17 loc) · 1.03 KB
/
registry.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
package clusterrolebinding
import (
apirequest "k8s.io/apiserver/pkg/endpoints/request"
"k8s.io/apiserver/pkg/registry/rest"
authorizationapi "github.com/openshift/origin/pkg/authorization/apis/authorization"
)
// Storage is an interface for a standard REST Storage backend
type Storage interface {
rest.Getter
rest.Lister
rest.CreaterUpdater
rest.GracefulDeleter
// CreateRoleBinding creates a new policyRoleBinding. Skipping the escalation check should only be done during bootstrapping procedures where no users are currently bound.
CreateClusterRoleBindingWithEscalation(ctx apirequest.Context, policyRoleBinding *authorizationapi.ClusterRoleBinding) (*authorizationapi.ClusterRoleBinding, error)
// UpdateRoleBinding updates a policyRoleBinding. Skipping the escalation check should only be done during bootstrapping procedures where no users are currently bound.
UpdateClusterRoleBindingWithEscalation(ctx apirequest.Context, policyRoleBinding *authorizationapi.ClusterRoleBinding) (*authorizationapi.ClusterRoleBinding, bool, error)
}