rego

package
v0.0.0-...-7907c65 Latest Latest
Warning

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

Go to latest
Published: Apr 24, 2024 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrRBAC         = errors.New("GATEKEEPER.REGO.RBAC.ERROR")
	ErrRBACNotAllow = errors.New("GATEKEEPER.REGO.RBAC.NOT_ALLOW.ERROR")
)

Functions

func Memory

func Memory(definitions map[string][]entities.Permission) (storage.Store, error)

Memory is a factory function that returns a storage.Store instance based on the provided definitions.

Types

type Evaluate

type Evaluate func(ectx context.Context, permission *entities.Permission, privileges []entities.Privilege) error

Evaluate is a function that evaluates a permission against a set of privileges

func RBAC

func RBAC(ctx context.Context, definitions map[string][]entities.Permission) (Evaluate, error)

RBAC is a factory function that returns a function that evaluates the given permission and privileges based on RBAC rules.

Jump to

Keyboard shortcuts

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