Versions in this module Expand all Collapse all v1 v1.0.0 Oct 31, 2018 Changes in this version + type ExaminerFunc = func(payload interface{}) bool + type Manager struct + func NewManager() *Manager + func (manager *Manager) Ensure(id string) *Role + func (manager *Manager) Examine(payload interface{}) *ResultSet + func (manager *Manager) Get(id string) *Role + func (manager *Manager) Register(roles ...*Role) (*Manager, error) + type ResultSet struct + Matches map[string]*Role + func NewResultSet(roles ...*Role) *ResultSet + func (result *ResultSet) GetRole(id string) *Role + func (result *ResultSet) Has(right string) bool + func (result *ResultSet) HasAllOf(rights ...string) bool + func (result *ResultSet) HasOneOf(rights ...string) bool + func (result *ResultSet) HasRole(id string) bool + type Role struct + Id string + func NewRole(id string) *Role + func (role *Role) AcquireFrom(roles ...*Role) *Role + func (role *Role) Grant(rights ...string) *Role + func (role *Role) Has(right string) bool + func (role *Role) HasAllOf(rights ...string) bool + func (role *Role) HasOneOf(rights ...string) bool + func (role *Role) Revoke(rights ...string) *Role + func (role *Role) SetExaminer(examiner ExaminerFunc) *Role