forked from openshift/origin
/
types.go
31 lines (26 loc) · 884 Bytes
/
types.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
package admission
import (
"github.com/openshift/origin/pkg/authorization/authorizer"
"github.com/openshift/origin/pkg/client"
"github.com/openshift/origin/pkg/project/cache"
)
// WantsOpenshiftClient should be implemented by admission plugins that need
// an Openshift client
type WantsOpenshiftClient interface {
SetOpenshiftClient(client.Interface)
}
// WantsProjectCache should be implemented by admission plugins that need a
// project cache
type WantsProjectCache interface {
SetProjectCache(*cache.ProjectCache)
}
// Validator should be implemented by admission plugins that can validate themselves
// after initialization has happened.
type Validator interface {
Validate() error
}
// WantsAuthorizer should be implemented by admission plugins that
// need access to the Authorizer interface
type WantsAuthorizer interface {
SetAuthorizer(authorizer.Authorizer)
}