modelgraph

package
v1.18.2 Latest Latest
Warning

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

Go to latest
Published: Aug 3, 2026 License: Apache-2.0 Imports: 17 Imported by: 0

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