check

package
v0.6.0-alpha.2 Latest Latest
Warning

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

Go to latest
Published: Apr 29, 2021 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

View Source
const RouteBase = "/check"

Variables

This section is empty.

Functions

This section is empty.

Types

type Engine

type Engine struct {
	// contains filtered or unexported fields
}

func NewEngine

func NewEngine(d EngineDependencies) *Engine

func (*Engine) SubjectIsAllowed

func (e *Engine) SubjectIsAllowed(ctx context.Context, r *relationtuple.InternalRelationTuple) (bool, error)

type EngineDependencies

type EngineDependencies interface {
	relationtuple.ManagerProvider
}

type EngineProvider

type EngineProvider interface {
	PermissionEngine() *Engine
}

type Handler

type Handler struct {
	// contains filtered or unexported fields
}

func NewHandler

func NewHandler(d handlerDependencies) *Handler

func (*Handler) Check

func (h *Handler) Check(ctx context.Context, req *acl.CheckRequest) (*acl.CheckResponse, error)

func (*Handler) RegisterReadGRPC

func (h *Handler) RegisterReadGRPC(s *grpc.Server)

func (*Handler) RegisterReadRoutes

func (h *Handler) RegisterReadRoutes(r *x.ReadRouter)

func (*Handler) RegisterWriteGRPC

func (h *Handler) RegisterWriteGRPC(_ *grpc.Server)

func (*Handler) RegisterWriteRoutes

func (h *Handler) RegisterWriteRoutes(_ *x.WriteRouter)

type RESTResponse

type RESTResponse struct {
	// whether the relation tuple is allowed
	//
	// required: true
	Allowed bool `json:"allowed"`
}

Represents the response for a check request.

The content of the allowed field is mirrored in the HTTP status code.

swagger:model getCheckResponse

Jump to

Keyboard shortcuts

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