effect

package
v1.9.1 Latest Latest
Warning

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

Go to latest
Published: Jul 4, 2019 License: Apache-2.0 Imports: 1 Imported by: 13

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type DefaultEffector

type DefaultEffector struct {
}

DefaultEffector is default effector for Casbin.

func NewDefaultEffector

func NewDefaultEffector() *DefaultEffector

NewDefaultEffector is the constructor for DefaultEffector.

func (*DefaultEffector) MergeEffects

func (e *DefaultEffector) MergeEffects(expr string, effects []Effect, results []float64) (bool, error)

MergeEffects merges all matching results collected by the enforcer into a single decision.

type Effect

type Effect int

Effect is the result for a policy rule.

const (
	Allow Effect = iota
	Indeterminate
	Deny
)

Values for policy effect.

type Effector

type Effector interface {
	// MergeEffects merges all matching results collected by the enforcer into a single decision.
	MergeEffects(expr string, effects []Effect, results []float64) (bool, error)
}

Effector is the interface for Casbin effectors.

Jump to

Keyboard shortcuts

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