Versions in this module Expand all Collapse all v0 v0.271.0 Nov 11, 2026 v0.270.0 Nov 6, 2026 Changes in this version + func JSONWeights(in map[string]int) map[string]int v0.269.0 Nov 5, 2026 Changes in this version + var ErrInvalidModel = errors.New("invalid authorization model") + var ErrNoWeightedGraph = errors.New("weighted graph cannot be built") + func Dependents(m *Model, targets []string) map[string]bool + func NoWeightedGraphReason(err error) (string, bool) + func Unexercised(m *Model, applied []Finding, skipped []string) []string + func UnexercisedByChecks(m *Model, applied []Finding, checks []string) []string + func UnifiedDiff(file, before, after string) string + func Weights(m *Model) (map[string]map[string]int, error) + type Finding struct + After string + Before string + ID string + Key string + Proof string + Reason string + Relation string + Tier Tier + Type string + Weights map[string]int + type FindingKey struct + ID string + N int + Proof string + Relation string + Type string + func Keys(applied []Finding) []FindingKey + func (k FindingKey) String() string + type GatedFinding struct + Gate string + type Lattice struct + func BuildLattice(m *Model) *Lattice + func (l *Lattice) Equivalent(a, b Term) bool + func (l *Lattice) Subset(a, b Term) bool + type Model struct + Proto *openfgav1.AuthorizationModel + func NewModel(p *openfgav1.AuthorizationModel) (*Model, error) + func (m *Model) Clone() *Model + func (m *Model) DSL() (string, error) + func (m *Model) DirectTypes(typ, rel string) []*openfgav1.RelationReference + func (m *Model) Relation(typ, rel string) (*openfgav1.Userset, bool) + type Report struct + Blocked string + Findings []Finding + Gated []GatedFinding + Rewrite *RewriteResult + func Analyze(p *openfgav1.AuthorizationModel) (*Report, error) + type RewriteResult struct + After *Model + Applied []Finding + Before *Model + Blocked string + Gated []GatedFinding + func Rewrite(m *Model) (*RewriteResult, error) + func RewriteSubset(m *Model, accept map[FindingKey]bool) (*RewriteResult, error) + type Term struct + Computed string + Direct string + TTU *struct{ Tupleset, Computed string } + Type string + func TermOf(typ, rel string, us *openfgav1.Userset, md *openfgav1.RelationMetadata) (Term, bool) + type Tier string + const TierCaller + const TierSafe + const TierTuple