keys

package
v0.5.4 Latest Latest
Warning

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

Go to latest
Published: Oct 5, 2023 License: Apache-2.0 Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ContextToString added in v0.5.0

func ContextToString(context *base.Context) string

ContextToString function takes a Context object and converts it into a string

func GenerateKey added in v0.5.0

func GenerateKey(key *base.PermissionCheckRequest, isRelational bool) string

GenerateKey function takes a PermissionCheckRequest and generates a unique key Key format: check|{tenant_id}|{schema_version}|{snap_token}|{context}|{entity:id#permission(optional_arguments)@subject:id#optional_relation}

func NewCheckEngineWithKeys

func NewCheckEngineWithKeys(checker invoke.Check, schemaReader storage.SchemaReader, cache cache.Cache, l *logger.Logger) invoke.Check

NewCheckEngineWithKeys creates a new instance of EngineKeyManager by initializing an EngineKeys struct with the provided cache.Cache instance.

Types

type CheckEngineWithKeys

type CheckEngineWithKeys struct {
	// contains filtered or unexported fields
}

CheckEngineWithKeys is a struct that holds an instance of a cache.Cache for managing engine keys.

func (*CheckEngineWithKeys) Check

Check performs a permission check for a given request, using the cached results if available.

Jump to

Keyboard shortcuts

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