domain

package
v3.2.2 Latest Latest
Warning

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

Go to latest
Published: Jan 28, 2021 License: MIT Imports: 0 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var PermissionAuthorized = string("PermissionAuthorized")

PermissionAuthorized is the default permission for authorized users

Functions

This section is empty.

Types

type PermissionSet

type PermissionSet interface {
	Permissions() []string
}

PermissionSet is a list of permissions

type Role

type Role interface {
	Label() string
	PermissionSet
}

Role is an interface for available role

func NewRole

func NewRole(label string, permissions []string) Role

NewRole creates instance of Role interface

type StringRole

type StringRole string

StringRole is simple representation of Role interface

func (StringRole) Label

func (r StringRole) Label() string

Label returns the role's label

func (StringRole) Permissions

func (r StringRole) Permissions() []string

Permissions returns the list of role's permissions

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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