rule

package
v0.0.0-...-d9e9996 Latest Latest
Warning

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

Go to latest
Published: Oct 27, 2019 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, msg []byte) (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, msg []byte) (bool, error)

Validate implements the interface of ACLValidator

type NullValidator

type NullValidator struct{}

NullValidator is Valiator for Null permission model

func NewNullValidator

func NewNullValidator() *NullValidator

NewNullValidator return instance of NullValidator

func (*NullValidator) Validate

func (nv *NullValidator) Validate(pnode *ptree.PermNode, msg []byte) (bool, error)

Validate always return true for NullValidator

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, msg []byte) (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