Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ContextToString ¶ added in v0.5.0
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 ¶
func (c *CheckEngineWithKeys) Check(ctx context.Context, request *base.PermissionCheckRequest) (response *base.PermissionCheckResponse, err error)
Check performs a permission check for a given request, using the cached results if available.
Click to show internal directories.
Click to hide internal directories.