Documentation
¶
Index ¶
Constants ¶
View Source
const ( // Objects for the RBAC policy ObjectAll = "*" ObjectPipeline = "pipeline" ObjectISBSvc = "isbsvc" ObjectEvents = "events" // Resouces for the RBAC policy ResourceAll = "*" ResourceNamespace = "namespace" // MatchAll is a wildcard to match all patterns MatchAll = "*" )
Variables ¶
View Source
var RouteMap = map[string]*RouteInfo{ "GET:/api/v1/sysinfo": newRouteInfo(ObjectPipeline, false), "GET:/api/v1/authinfo": newRouteInfo(ObjectEvents, false), "GET:/api/v1/namespaces": newRouteInfo(ObjectEvents, false), "GET:/api/v1/cluster-summary": newRouteInfo(ObjectPipeline, false), "GET:/api/v1/namespaces/:namespace/pipelines": newRouteInfo(ObjectPipeline, true), "POST:/api/v1/namespaces/:namespace/pipelines": newRouteInfo(ObjectPipeline, true), "GET:/api/v1/namespaces/:namespace/pipelines/:pipeline": newRouteInfo(ObjectPipeline, true), "GET:/api/v1/namespaces/:namespace/pipelines/:pipeline/health": newRouteInfo(ObjectPipeline, true), "PUT:/api/v1/namespaces/:namespace/pipelines/:pipeline": newRouteInfo(ObjectPipeline, true), "DELETE:/api/v1/namespaces/:namespace/pipelines/:pipeline": newRouteInfo(ObjectPipeline, true), "PATCH:/api/v1/namespaces/:namespace/pipelines/:pipeline": newRouteInfo(ObjectPipeline, true), "POST:/api/v1/namespaces/:namespace/isb-services": newRouteInfo(ObjectISBSvc, true), "GET:/api/v1/namespaces/:namespace/isb-services": newRouteInfo(ObjectISBSvc, true), "GET:/api/v1/namespaces/:namespace/isb-services/:isb-service": newRouteInfo(ObjectISBSvc, true), "PUT:/api/v1/namespaces/:namespace/isb-services/:isb-service": newRouteInfo(ObjectISBSvc, true), "DELETE:/api/v1/namespaces/:namespace/isb-services/:isb-service": newRouteInfo(ObjectISBSvc, true), "GET:/api/v1/namespaces/:namespace/pipelines/:pipeline/isbs": newRouteInfo(ObjectPipeline, true), "GET:/api/v1/namespaces/:namespace/pipelines/:pipeline/watermarks": newRouteInfo(ObjectPipeline, true), "PUT:/api/v1/namespaces/:namespace/pipelines/:pipeline/vertices/:vertex": newRouteInfo(ObjectPipeline, true), "GET:/api/v1/namespaces/:namespace/pipelines/:pipeline/vertices/metrics": newRouteInfo(ObjectPipeline, true), "GET:/api/v1/namespaces/:namespace/pipelines/:pipeline/vertices/:vertex/pods": newRouteInfo(ObjectPipeline, true), "GET:/api/v1/metrics/namespaces/:namespace/pods": newRouteInfo(ObjectPipeline, true), "GET:/api/v1/namespaces/:namespace/pods/:pod/logs": newRouteInfo(ObjectPipeline, true), "GET:/api/v1/namespaces/:namespace/events": newRouteInfo(ObjectEvents, true), }
RouteMap is a map of routes to their corresponding RouteInfo objects. This map is used to certain information about the route.
Functions ¶
func ExtractObject ¶
ExtractObject extracts the object from the request.
func ExtractResource ¶
ExtractResource extracts the resource from the request.
func GetEnforcer ¶
GetEnforcer initializes the Casbin Enforcer with the model and policy.
Types ¶
Click to show internal directories.
Click to hide internal directories.