Back to

Package rest

Latest Go to latest

The highest tagged major version is .

Published: Jul 9, 2019 | License: AGPL-3.0 | Module:


Package rest is a REST gateway to the grpc ACL service


type Handler

type Handler struct {

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

Package Files

Documentation was rendered with GOOS=linux and GOARCH=amd64.

Jump to identifier

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to identifier