Back to

Package permissions

Latest Go to latest

The latest major version is .

Published: Oct 12, 2020 | License: AGPL-3.0 | Module:



const ContextClaims = "token_claims"

ContextClaims is the key used in echo context to store claims

const ContextPermissionSet = "permissions_set"

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


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

func Routes

func Routes(router *echo.Group)

Routes sets the routing for the permissions service

type APIPermission

type APIPermission struct {

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

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