rest

package
v5.0.0-...-b98a0e9 Latest Latest
Warning

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

Go to latest
Published: Dec 3, 2024 License: AGPL-3.0 Imports: 20 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewHandler

func NewHandler(ctx context.Context) service2.WebHandler

Types

type Handler

type Handler struct {
	resources.ResourceProviderHandler
	// contains filtered or unexported fields
}

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) error

DeleteAcl deletes 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) error

PutAcl puts an acl in storage.

func (*Handler) SearchAcls

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

SearchAcls 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

Directories

Path Synopsis
Package service is a REST gateway to the grpc ACL service
Package service is a REST gateway to the grpc ACL service

Jump to

Keyboard shortcuts

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