rule

package
v1.0.2 Latest Latest
Warning

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

Go to latest
Published: Jan 27, 2022 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ACLValidator

type ACLValidator interface {
	Validate(pnode *ptree.PermNode) (bool, error)
}

ACLValidator interface defines common interface for ACL Validator Validator only validate account/ak with 1~2 level height

type ACLValidatorFactory

type ACLValidatorFactory struct {
}

ACLValidatorFactory create ACLValidator for specified permission model

func (*ACLValidatorFactory) GetACLValidator

func (vf *ACLValidatorFactory) GetACLValidator(pr pb.PermissionRule) (ACLValidator, error)

GetACLValidator returns ACLValidator for specified permission model

type AKSetsValidator

type AKSetsValidator struct{}

AKSetsValidator is Valiator for AkSets permission model

func NewAKSetsValidator

func NewAKSetsValidator() *AKSetsValidator

NewAKSetsValidator return instance of AKSetsValidator

func (*AKSetsValidator) Validate

func (asv *AKSetsValidator) Validate(pnode *ptree.PermNode) (bool, error)

Validate implements the interface of ACLValidator

type ThresholdValidator

type ThresholdValidator struct{}

ThresholdValidator is Valiator for Threshold permission model

func NewThresholdValidator

func NewThresholdValidator() *ThresholdValidator

NewThresholdValidator return instance of ThresholdValidator

func (*ThresholdValidator) Validate

func (tv *ThresholdValidator) Validate(pnode *ptree.PermNode) (bool, error)

Validate implements the interface of ACLValidator

Jump to

Keyboard shortcuts

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