Documentation ¶
Index ¶
- type AccessControl
- type AccessControlOptions
- type AccessRights
- type AppSection
- type AppSectionOptions
- type RoleAccessControl
- func (a *RoleAccessControl) CheckPermission(rolesIDs []uint16, name string) bool
- func (a *RoleAccessControl) CheckPrivilege(rolesIDs []uint16, name string) bool
- func (a *RoleAccessControl) GuestRole() string
- func (a *RoleAccessControl) HasPermission(name string) bool
- func (a *RoleAccessControl) HasPrivilege(name string) bool
- func (a *RoleAccessControl) NewAccessRights(roles ...string) AccessRights
- func (a *RoleAccessControl) RegisteredPermissions() []string
- func (a *RoleAccessControl) RegisteredPrivileges() []string
- func (a *RoleAccessControl) RegisteredRoles() []string
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AccessControl ¶ added in v0.10.0
type AccessControlOptions ¶ added in v0.10.0
type AccessRights ¶ added in v0.13.0
type AppSection ¶ added in v0.10.0
type AppSection interface { Caption() string Path(actionPath string) string Privilege() string Secret() string Audience() string }
func NewAppSection ¶ added in v0.10.0
func NewAppSection(opts AppSectionOptions) AppSection
type AppSectionOptions ¶ added in v0.10.0
type RoleAccessControl ¶ added in v0.13.0
type RoleAccessControl struct {
// contains filtered or unexported fields
}
func NewAccessControl ¶ added in v0.10.0
func NewAccessControl(opts AccessControlOptions) (*RoleAccessControl, error)
func (*RoleAccessControl) CheckPermission ¶ added in v0.13.0
func (a *RoleAccessControl) CheckPermission(rolesIDs []uint16, name string) bool
func (*RoleAccessControl) CheckPrivilege ¶ added in v0.13.0
func (a *RoleAccessControl) CheckPrivilege(rolesIDs []uint16, name string) bool
func (*RoleAccessControl) GuestRole ¶ added in v0.13.0
func (a *RoleAccessControl) GuestRole() string
func (*RoleAccessControl) HasPermission ¶ added in v0.13.0
func (a *RoleAccessControl) HasPermission(name string) bool
func (*RoleAccessControl) HasPrivilege ¶ added in v0.13.0
func (a *RoleAccessControl) HasPrivilege(name string) bool
func (*RoleAccessControl) NewAccessRights ¶ added in v0.13.0
func (a *RoleAccessControl) NewAccessRights(roles ...string) AccessRights
func (*RoleAccessControl) RegisteredPermissions ¶ added in v0.13.0
func (a *RoleAccessControl) RegisteredPermissions() []string
func (*RoleAccessControl) RegisteredPrivileges ¶ added in v0.13.0
func (a *RoleAccessControl) RegisteredPrivileges() []string
func (*RoleAccessControl) RegisteredRoles ¶ added in v0.13.0
func (a *RoleAccessControl) RegisteredRoles() []string
Click to show internal directories.
Click to hide internal directories.