authentication

package
v0.0.8 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Permission

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

func GetPermission

func GetPermission() *Permission

func (*Permission) AddPolicies

func (p *Permission) AddPolicies(rules [][]string) (bool, error)

func (*Permission) AddPolicyForRoleInDomain

func (p *Permission) AddPolicyForRoleInDomain(domain, role, object, action string) (bool, error)

func (*Permission) FilterDataArray

func (p *Permission) FilterDataArray(data []any, actions []string, domain string, roles []string, fieldName string) ([]any, error)

func (*Permission) GetPolicyForObjectInDomain

func (p *Permission) GetPolicyForObjectInDomain(domain, object string) [][]string

func (*Permission) GetPolicyForRoleInDomain

func (p *Permission) GetPolicyForRoleInDomain(domain, role string) ([][]string, error)

func (*Permission) HasPermissionForRoleInDomain

func (p *Permission) HasPermissionForRoleInDomain(domain, role, object, action string) (bool, error)

func (*Permission) RemovePolicies

func (p *Permission) RemovePolicies(rules [][]string) (bool, error)

func (*Permission) RemovePoliciesForObjectInDomain

func (p *Permission) RemovePoliciesForObjectInDomain(domain, object string) (bool, error)

func (*Permission) RemovePolicyForRoleInDomain

func (p *Permission) RemovePolicyForRoleInDomain(domain, role, object, action string) (bool, error)

Jump to

Keyboard shortcuts

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