logic

package
v0.0.0-...-c558d71 Latest Latest
Warning

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

Go to latest
Published: Jun 16, 2023 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Engine

type Engine struct {
	Cache      *bigcache.BigCache
	EtcdConfig etcd.Config
	Fga        *openfga.FgaClient
}

func (*Engine) Execute

func (e *Engine) Execute(request map[string]any, namespace models.Namespace, policy []models.Policy) ([]string, error)

Execute takes a request and a policy and returns a list of actions that are allowed

func (*Engine) GetNamespace

func (e *Engine) GetNamespace(namespaceId string) (models.Namespace, error)

GetNamespace Make this a background cached item to put storeIds in cache

func (*Engine) InitialLoad

func (e *Engine) InitialLoad()

func (*Engine) MakeRequest

func (e *Engine) MakeRequest(permissionsRequest models.GetPermissionsRequest) (map[string]any, models.Namespace, error)

func (*Engine) ProcessEngineRequest

func (e *Engine) ProcessEngineRequest(request models.GetPermissionsRequest) ([]string, error)

func (*Engine) RefreshPolicyCache

func (e *Engine) RefreshPolicyCache(namespace string) error

func (*Engine) SaveDocument

func (e *Engine) SaveDocument(document models.Document) error

func (*Engine) SaveNamespace

func (e *Engine) SaveNamespace(namespace models.Namespace) error

func (*Engine) Watcher

func (e *Engine) Watcher()

Jump to

Keyboard shortcuts

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