rest

package
v2.2.0-rc4+incompatible Latest Latest
Warning

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

Go to latest
Published: Jan 25, 2021 License: AGPL-3.0 Imports: 22 Imported by: 0

Documentation

Overview

Package rest is a REST gateway to the grpc ACL service

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Handler

type Handler struct {
	resources.ResourceProviderHandler
}

Handler for the rest package

func (*Handler) CheckNode

func (a *Handler) CheckNode(ctx context.Context, nodeID string, action *idm.ACLAction) error

CheckNode uses AccessList object to analyze the current ACLs of the target node

func (*Handler) CheckRole

func (a *Handler) CheckRole(ctx context.Context, roleID string) error

CheckRole loads a role and its Policies to check wether this role can be edited in the current context

func (*Handler) DeleteAcl

func (a *Handler) DeleteAcl(req *restful.Request, rsp *restful.Response)

Delete an acl from storage

func (*Handler) Filter

func (a *Handler) Filter() func(string) string

Filter returns a function to filter the swagger path

func (*Handler) PutAcl

func (a *Handler) PutAcl(req *restful.Request, rsp *restful.Response)

Put an acl in storage

func (*Handler) SearchAcls

func (a *Handler) SearchAcls(req *restful.Request, rsp *restful.Response)

Search uses a stream to search in the acls

func (*Handler) SwaggerTags

func (a *Handler) SwaggerTags() []string

SwaggerTags list the names of the service tags declared in the swagger json implemented by this service

func (*Handler) WriteAllowed

func (a *Handler) WriteAllowed(ctx context.Context, acl *idm.ACL) error

WriteAllowed returns an error if the Write permission is not present in an acl

Jump to

Keyboard shortcuts

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