Documentation
¶
Index ¶
Constants ¶
View Source
const ( RoleEditor = "editor" RoleViewer = "viewer" )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Permission ¶
type Permission string
Permission identifies an action that may be granted to a role.
const ( PermRead Permission = "read" PermCreate Permission = "create" PermUpdate Permission = "update" PermDelete Permission = "delete" )
type PermissionError ¶
type PermissionError struct {
Permission Permission
}
func (*PermissionError) Error ¶
func (e *PermissionError) Error() string
type Service ¶
type Service struct{}
Service evaluates role/permission pairs. Unknown roles and permissions deny by default.
func NewService ¶
func NewService() *Service
Click to show internal directories.
Click to hide internal directories.