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.