Documentation ¶
Index ¶
- Variables
- func WithAuditing(next http.Handler, auditing auditing.Auditing) http.Handler
- func WithAuthentication(next http.Handler, authenticator authenticator.Request) http.Handler
- func WithAuthorization(next http.Handler, authorizers authorizer.Authorizer) http.Handler
- func WithKubeAPIServer(next http.Handler, config *rest.Config) http.Handler
- func WithMulticluster(next http.Handler, clusterClient clusterclient.ClusterClients) http.Handler
- func WithRequestInfo(next http.Handler, resolver request.RequestInfoResolver) http.Handler
- type DynamicResourceHandler
Constants ¶
This section is empty.
Variables ¶
View Source
var NotSupportedVerbError = fmt.Errorf("not supported verb")
Functions ¶
func WithAuthentication ¶
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 ¶
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 ¶
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)
Click to show internal directories.
Click to hide internal directories.