filters

package
v0.0.0-...-e779149 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jul 18, 2023 License: Apache-2.0 Imports: 28 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var NotSupportedVerbError = fmt.Errorf("not supported verb")

Functions

func WithAuditing

func WithAuditing(next http.Handler, auditing auditing.Auditing) http.Handler

func WithAuthentication

func WithAuthentication(next http.Handler, authenticator authenticator.Request) http.Handler

WithAuthentication installs authentication handler to handler chain. The following part is a little bit ugly, WithAuthentication also logs user failed login attempt if using basic auth. But only treats request with requestURI `/oauth/authorize` as login attempt

func WithAuthorization

func WithAuthorization(next http.Handler, authorizers authorizer.Authorizer) http.Handler

WithAuthorization passes all authorized requests on to handler, and returns forbidden error otherwise.

func WithKubeAPIServer

func WithKubeAPIServer(next http.Handler, config *rest.Config) http.Handler

WithKubeAPIServer proxy request to kubernetes service if requests path starts with /api

func WithMulticluster

func WithMulticluster(next http.Handler, clusterClient clusterclient.ClusterClients) http.Handler

WithMulticluster forward request to desired cluster based on request cluster name which included in request path clusters/{cluster}

func WithRequestInfo

func WithRequestInfo(next http.Handler, resolver request.RequestInfoResolver) http.Handler

Types

type DynamicResourceHandler

type DynamicResourceHandler struct {
	v1beta1.ResourceManager
	// contains filtered or unexported fields
}

func NewDynamicResourceHandle

func NewDynamicResourceHandle(serviceErrorHandleFallback restful.ServiceErrorHandleFunction, resourceGetter v1beta1.ResourceManager) *DynamicResourceHandler

func (*DynamicResourceHandler) HandleServiceError

func (d *DynamicResourceHandler) HandleServiceError(serviceError restful.ServiceError, req *restful.Request, w *restful.Response)

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL