Versions in this module Expand all Collapse all v1 v1.0.1 Feb 1, 2016 v1.0.0 Jan 31, 2016 Changes in this version + const NameKey + const ParentKey + const PermissionKey + func AllGranted(rbac *RBAC, roles []string, permission string, assert AssertionFunc) bool + func AnyGranted(rbac *RBAC, roles []string, permission string, assert AssertionFunc) bool + func InherCircle(rbac *RBAC) error + type AssertionFunc func(string, string, *RBAC) bool + type BaseRole struct + func (role *BaseRole) AddParent(name string) + func (role *BaseRole) AddPermission(permission string) + func (role *BaseRole) HasPermission(permission string) bool + func (role *BaseRole) Name() string + func (role *BaseRole) Parents() []string + func (role *BaseRole) Permissions() []string + func (role *BaseRole) RemoveParent(name string) + func (role *BaseRole) Reset() + func (role *BaseRole) RevokePermission(permission string) + type Map map[string]RoleMap + type RBAC struct + func New() *RBAC + func NewWithFactory(factory RoleFactoryFunc) *RBAC + func Restore(data Map) *RBAC + func RestoreWithFactory(data Map, factory RoleFactoryFunc) *RBAC + func (rbac *RBAC) Add(name string, permissions []string, parents []string) + func (rbac *RBAC) Dump() Map + func (rbac *RBAC) Get(name string) Role + func (rbac *RBAC) IsGranted(name, permission string, assert AssertionFunc) bool + func (rbac *RBAC) Remove(name string) + func (rbac *RBAC) Set(name string, permissions []string, parents []string) + type Role interface + AddParent func(string) + AddPermission func(string) + HasPermission func(string) bool + Name func() string + Parents func() []string + Permissions func() []string + RemoveParent func(string) + Reset func() + RevokePermission func(string) + func NewBaseRole(rbac *RBAC, name string) Role + type RoleFactoryFunc func(*RBAC, string) Role + type RoleMap map[string][]string + func RoleToMap(role Role) RoleMap Other modules containing this package gopkg.in/mikespook/gorbac.v2