mrperms

package
v0.28.4 Latest Latest
Warning

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

Go to latest
Published: Nov 30, 2024 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AccessControlOptions added in v0.10.0

type AccessControlOptions struct {
	RolesDirPath  string
	RolesFileType string
	Roles         []string
	Privileges    []string
	Permissions   []string
	GuestRole     string // optional
}

AccessControlOptions - опции для создания AccessControl.

type AccessRights added in v0.13.0

type AccessRights interface {
	IsGuestAccess() bool
	CheckPrivilege(name string) bool
	CheckPermission(name string) bool
}

AccessRights - проверка прав доступа конкретного объекта к привилегиям и разрешениям.

type AccessRightsFactory added in v0.18.0

type AccessRightsFactory interface {
	NewAccessRights(members ...string) AccessRights
}

AccessRightsFactory - выдаёт объект AccessRights, который проверяет права доступа для указанных members.

type AppSection added in v0.10.0

type AppSection struct {
	// contains filtered or unexported fields
}

AppSection - comment struct.

func NewAppSection added in v0.10.0

func NewAppSection(opts AppSectionOptions) *AppSection

NewAppSection - создаёт объект AppSection.

func (*AppSection) Audience added in v0.10.0

func (s *AppSection) Audience() string

Audience - comment method.

func (*AppSection) BuildPath added in v0.18.0

func (s *AppSection) BuildPath(methodPath string) string

BuildPath - comment method.

func (*AppSection) Caption added in v0.10.0

func (s *AppSection) Caption() string

Caption - comment method.

func (*AppSection) Privilege added in v0.10.0

func (s *AppSection) Privilege() string

Privilege - comment method.

func (*AppSection) Secret added in v0.10.0

func (s *AppSection) Secret() string

Secret - comment method.

type AppSectionOptions added in v0.10.0

type AppSectionOptions struct {
	Caption      string
	BasePath     string
	Privilege    string
	AuthSecret   string
	AuthAudience string
}

AppSectionOptions - опции для создания AppSection.

type RoleAccessControl added in v0.13.0

type RoleAccessControl struct {
	// contains filtered or unexported fields
}

RoleAccessControl - comment struct.

func NewAccessControl added in v0.10.0

func NewAccessControl(opts AccessControlOptions) (*RoleAccessControl, error)

NewAccessControl - создаёт объект RoleAccessControl.

func (*RoleAccessControl) CheckPermission added in v0.13.0

func (a *RoleAccessControl) CheckPermission(rolesIDs []uint16, name string) bool

CheckPermission - comment method.

func (*RoleAccessControl) CheckPrivilege added in v0.13.0

func (a *RoleAccessControl) CheckPrivilege(rolesIDs []uint16, name string) bool

CheckPrivilege - comment method.

func (*RoleAccessControl) GuestRole added in v0.13.0

func (a *RoleAccessControl) GuestRole() string

GuestRole - comment method.

func (*RoleAccessControl) HasPermission added in v0.13.0

func (a *RoleAccessControl) HasPermission(name string) bool

HasPermission - comment method.

func (*RoleAccessControl) HasPrivilege added in v0.13.0

func (a *RoleAccessControl) HasPrivilege(name string) bool

HasPrivilege - comment method.

func (*RoleAccessControl) NewAccessRights added in v0.13.0

func (a *RoleAccessControl) NewAccessRights(roles ...string) AccessRights

NewAccessRights - comment method.

func (*RoleAccessControl) RegisteredPermissions added in v0.13.0

func (a *RoleAccessControl) RegisteredPermissions() []string

RegisteredPermissions - comment method.

func (*RoleAccessControl) RegisteredPrivileges added in v0.13.0

func (a *RoleAccessControl) RegisteredPrivileges() []string

RegisteredPrivileges - comment method.

func (*RoleAccessControl) RegisteredRoles added in v0.13.0

func (a *RoleAccessControl) RegisteredRoles() []string

RegisteredRoles - comment method.

Jump to

Keyboard shortcuts

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