Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Evaluator ¶
type Evaluator interface { // HasPermission returns true when user has action permission for the resource HasPermission(ctx context.Context, resource types.Resource, action types.Action) bool }
Evaluator the permission evaluator
type Evaluators ¶
type Evaluators []Evaluator
Evaluators evaluator set
func (Evaluators) Add ¶
func (evaluators Evaluators) Add(newEvaluators ...Evaluator) Evaluators
Add adds an evaluator to a given slice of evaluators
func (Evaluators) HasPermission ¶
func (evaluators Evaluators) HasPermission(ctx context.Context, resource types.Resource, action types.Action) bool
HasPermission returns true when one of evaluator has action permission for the resource
Click to show internal directories.
Click to hide internal directories.