Help us shape the future of Go! Take the 2026 Go Developer Survey

effector

package
v2.100.2 Latest Latest
Warning

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

Go to latest
Published: Sep 17, 2026 License: Apache-2.0 Imports: 2 Imported by: 0

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, matches []float64, policyIndex int, policyLength int) (Effect, int, 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, matches []float64, policyIndex int, policyLength int) (Effect, int, 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