Documentation ¶
Index ¶
- func CanI(ctx context.Context, verb, resource, namespace, name string) (bool, error)
- func DefaultClientForAuthorization(authorization string) (*rest.Config, *servertypes.Clients, error)
- func GetClaims(ctx context.Context) *types.Claims
- func GetDynamicClient(ctx context.Context) dynamic.Interface
- func GetEventSourceClient(ctx context.Context) eventsource.Interface
- func GetKubeClient(ctx context.Context) kubernetes.Interface
- func GetSensorClient(ctx context.Context) sensor.Interface
- func GetWfClient(ctx context.Context) workflow.Interface
- func NewAuthorizingServerStream(ss grpc.ServerStream, gk Gatekeeper) *authorizingServerStream
- type ClientForAuthorization
- type ContextKey
- type Gatekeeper
- type Mode
- type Modes
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GetEventSourceClient ¶
func GetEventSourceClient(ctx context.Context) eventsource.Interface
func GetKubeClient ¶
func GetKubeClient(ctx context.Context) kubernetes.Interface
func NewAuthorizingServerStream ¶
func NewAuthorizingServerStream(ss grpc.ServerStream, gk Gatekeeper) *authorizingServerStream
Types ¶
type ClientForAuthorization ¶
type ContextKey ¶
type ContextKey string
const ( DynamicKey ContextKey = "dynamic.Interface" WfKey ContextKey = "workflow.Interface" SensorKey ContextKey = "sensor.Interface" EventSourceKey ContextKey = "eventsource.Interface" KubeKey ContextKey = "kubernetes.Interface" ClaimsKey ContextKey = "types.Claims" )
type Gatekeeper ¶
type Gatekeeper interface { ContextWithRequest(ctx context.Context, req interface{}) (context.Context, error) Context(ctx context.Context) (context.Context, error) UnaryServerInterceptor() grpc.UnaryServerInterceptor StreamServerInterceptor() grpc.StreamServerInterceptor }
func NewGatekeeper ¶
func NewGatekeeper(modes Modes, clients *servertypes.Clients, restConfig *rest.Config, ssoIf sso.Interface, clientForAuthorization ClientForAuthorization, namespace string, ssoNamespace string, namespaced bool, cache *cache.ResourceCache) (Gatekeeper, error)
Source Files ¶
Click to show internal directories.
Click to hide internal directories.