modelgraph

package
v1.22.1 Latest Latest
Warning

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

Go to latest
Published: Oct 28, 2026 License: Apache-2.0 Imports: 17 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

View Source
const CacheKeyPrefix = "WG"

Variables

View Source
var ErrGraphError = errors.New("authorization model graph error")
View Source
var ErrInvalidModel = errors.New("invalid authorization model encountered")
View Source
var ErrModelNotFound = errors.New("authorization model not found")

Functions

func CacheKey added in v1.17.0

func CacheKey(storeID, modelID string) keys.Key

CacheKey returns the cache key for a resolved weighted authorization model graph.

func WildcardRelationReference

func WildcardRelationReference(objectType string) *openfgav1.RelationReference

Types

type AuthorizationModelGraph

type AuthorizationModelGraph struct {
	*authzGraph.WeightedAuthorizationModelGraph
	// contains filtered or unexported fields
}

func (*AuthorizationModelGraph) CanApplyRecursion

func (*AuthorizationModelGraph) FlattenNode

func (m *AuthorizationModelGraph) FlattenNode(node *authzGraph.WeightedAuthorizationModelNode, userType string, hasWildcardRequest bool, skipRecursiveRelation string) ([]*authzGraph.WeightedAuthorizationModelEdge, error)

FlattenNode collapses union/computed/rewrite edges below node into their terminal edges. SkipRecursiveRelation, when non-empty, excludes edges whose RecursiveRelation matches it - this is used by callers that are already handling that specific recursive relation separately (e.g. ResolveRecursive/bottomUp's bottom-up traversal) and must not re-flatten it here. Edges belonging to a *different* recursive relation (e.g. a nested, unrelated recursive relation reached along a non-recursive branch) are always kept, since dropping them would silently discard valid resolution paths.

func (*AuthorizationModelGraph) GetConditions

func (*AuthorizationModelGraph) GetDirectEdgeFromNodeForUserType

func (m *AuthorizationModelGraph) GetDirectEdgeFromNodeForUserType(objectRelation string, userType string) (*authzGraph.WeightedAuthorizationModelEdge, error)

func (*AuthorizationModelGraph) GetModelID

func (m *AuthorizationModelGraph) GetModelID() string

type AuthorizationModelGraphResolver

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

func (*AuthorizationModelGraphResolver) Resolve

Jump to

Keyboard shortcuts

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