permission

package
v0.0.0-alpha6 Latest Latest
Warning

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

Go to latest
Published: Oct 5, 2022 License: AGPL-3.0 Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewPermissionRoutes

func NewPermissionRoutes(handler *echo.Group, t services.IPermissionService, l logger.Interface)

NewPermissionRoutes -

Types

type CheckRequest

type CheckRequest struct {
	SchemaVersion utils.Version `json:"schema_version"`
	Entity        tuple.Entity  `json:"entity"`
	Action        string        `json:"action"`
	Subject       tuple.Subject `json:"subject"`
	Depth         int32         `json:"depth"`
}

CheckRequest -

func (CheckRequest) Validate

func (r CheckRequest) Validate() (err error)

Validate -

type CheckResponse

type CheckResponse struct {
	Can            bool        `json:"can"`
	RemainingDepth int32       `json:"remaining_depth"`
	Decisions      interface{} `json:"decisions"`
}

CheckResponse -

type ExpandRequest

type ExpandRequest struct {
	SchemaVersion utils.Version `json:"schema_version"`
	Entity        tuple.Entity  `json:"entity"`
	Action        string        `json:"action"`
}

ExpandRequest -

func (ExpandRequest) Validate

func (r ExpandRequest) Validate() (err error)

Validate -

type ExpandResponse

type ExpandResponse struct {
	Tree commands.IExpandNode `json:"tree"`
}

ExpandResponse -

type LookupQueryRequest

type LookupQueryRequest struct {
	SchemaVersion utils.Version `json:"schema_version"`
	EntityType    string        `json:"entity_type"`
	Action        string        `json:"action"`
	Subject       tuple.Subject `json:"subject"`
}

LookupQueryRequest -

func (LookupQueryRequest) Validate

func (r LookupQueryRequest) Validate() (err error)

Validate -

type LookupQueryResponse

type LookupQueryResponse struct {
	Query string        `json:"query"`
	Args  []interface{} `json:"args"`
}

LookupQueryResponse -

Jump to

Keyboard shortcuts

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