permissions

package
v0.0.0-...-4b98c26 Latest Latest
Warning

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

Go to latest
Published: Dec 7, 2021 License: AGPL-3.0 Imports: 18 Imported by: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

View Source
const ContextClaims = "token_claims"

ContextClaims is the key used in echo context to store claims

View Source
const ContextPermissionSet = "permissions_set"

ContextPermissionSet is the key used in echo context to store permissions set

Variables

View Source
var ErrPatchCodeOrSet = echo.NewHTTPError(http.StatusBadRequest,
	"The patch doc should have property 'codes' or 'permissions', not both")

ErrPatchCodeOrSet is returned when an attempt is made to patch both code & set in one request

Functions

func Routes

func Routes(router *echo.Group)

Routes sets the routing for the permissions service

Types

type APIPermission

type APIPermission struct {
	*permission.Permission
	// contains filtered or unexported fields
}

APIPermission is the struct that will be used to serialized a permission to JSON-API

func (*APIPermission) Included

func (p *APIPermission) Included() []jsonapi.Object

Included implements jsonapi.Doc

func (p *APIPermission) Links() *jsonapi.LinksList

Links implements jsonapi.Doc

func (*APIPermission) MarshalJSON

func (p *APIPermission) MarshalJSON() ([]byte, error)

MarshalJSON implements jsonapi.Doc

func (*APIPermission) Relationships

func (p *APIPermission) Relationships() jsonapi.RelationshipMap

Relationships implements jsonapi.Doc

Jump to

Keyboard shortcuts

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