Documentation ¶
Index ¶
- Constants
- func GetPermissionsByRole(role string) (*hashset.Set, error)
- type Handler
- func (handler Handler) ClusterRequired(h httprouter.Handle, route ...string) httprouter.Handle
- func (handler Handler) GetAllowedClusters(r *http.Request) ([]string, bool)
- func (handler Handler) GetAllowedIndices(r *http.Request, clusterID string) ([]string, bool)
- func (handler Handler) GetClusterFilter(r *http.Request, field string) (util.MapStr, bool)
- func (handler Handler) GetCurrentUser(req *http.Request) string
- func (handler Handler) GetCurrentUserClusterIndex(req *http.Request, clusterID string) (bool, []string)
- func (handler Handler) GetCurrentUserIndex(req *http.Request) (bool, map[string][]string)
- func (handler Handler) IndexRequired(h httprouter.Handle, route ...string) httprouter.Handle
- func (handler Handler) IsIndexAllowed(r *http.Request, clusterID string, indexName string) bool
- func (handler Handler) RequireClusterPermission(h httprouter.Handle, permissions ...string) httprouter.Handle
- func (handler Handler) RequireLogin(h httprouter.Handle) httprouter.Handle
- func (handler Handler) RequirePermission(h httprouter.Handle, permissions ...string) httprouter.Handle
- func (handler Handler) ValidateProxyRequest(req *http.Request, clusterID string) (bool, string, error)
- func (handler Handler) WriteError(w http.ResponseWriter, err interface{}, status int)
Constants ¶
View Source
const ( ROLE_GUEST string = "guest" ROLE_ADMIN string = "admin" )
View Source
const ( //GUEST PERMISSION_SNAPSHOT_VIEW string = "view_snapshot" //ADMIN PERMISSION_ADMIN_MINIMAL string = "admin_minimal" )
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Handler ¶
Handler is the object of http handler
func (Handler) ClusterRequired ¶
func (handler Handler) ClusterRequired(h httprouter.Handle, route ...string) httprouter.Handle
func (Handler) GetAllowedClusters ¶
func (Handler) GetAllowedIndices ¶
func (Handler) GetClusterFilter ¶
func (Handler) GetCurrentUserClusterIndex ¶
func (Handler) GetCurrentUserIndex ¶
func (Handler) IndexRequired ¶
func (handler Handler) IndexRequired(h httprouter.Handle, route ...string) httprouter.Handle
func (Handler) IsIndexAllowed ¶
func (Handler) RequireClusterPermission ¶
func (handler Handler) RequireClusterPermission(h httprouter.Handle, permissions ...string) httprouter.Handle
func (Handler) RequireLogin ¶
func (handler Handler) RequireLogin(h httprouter.Handle) httprouter.Handle
func (Handler) RequirePermission ¶
func (handler Handler) RequirePermission(h httprouter.Handle, permissions ...string) httprouter.Handle
func (Handler) ValidateProxyRequest ¶
func (Handler) WriteError ¶ added in v1.27.0
func (handler Handler) WriteError(w http.ResponseWriter, err interface{}, status int)
Click to show internal directories.
Click to hide internal directories.