utils

package
v0.3.2 Latest Latest
Warning

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

Go to latest
Published: Oct 1, 2026 License: Apache-2.0 Imports: 4 Imported by: ? 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

This section is empty.

Variables

This section is empty.

Functions

func ConstructLineAndColumnData

func ConstructLineAndColumnData(lines []string, lineIndex int, symbol string) (StartEnd, StartEnd)

func GetConditionLineNumber

func GetConditionLineNumber(conditionName string, lines []string) int

func GetExtendedTypeLineNumber

func GetExtendedTypeLineNumber(typeName string, lines []string) int

func GetModuleForObjectTypeRelation

func GetModuleForObjectTypeRelation(typeDef *openfgav1.TypeDefinition, relation string) (string, error)

GetModuleForObjectTypeRelation returns the module for the given object type and relation in that type.

Parameters: - typeDef: A pointer to an openfgav1.TypeDefinition object which contains metadata about the type. - relation: A string representing the relation whose module is to be retrieved.

Returns: - A string representing the module for the given object type and relation. - An error if the relation does not exist.

func GetRelationLineNumber

func GetRelationLineNumber(relation string, lines []string) int

func GetTypeLineNumber

func GetTypeLineNumber(typeName string, lines []string) int

func IsRelationAssignable

func IsRelationAssignable(relDef *openfgav1.Userset) bool

IsRelationAssignable returns true if the relation is assignable, as in the relation definition has a key "this" or any of its children have a key "this".

Types

type StartEnd

type StartEnd struct {
	Start int
	End   int
}

Jump to

Keyboard shortcuts

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