Documentation ¶
Index ¶
- func AllKeywords(ctx context.Context, fileName, contents string, module *ast.Module) (map[string][]KeywordUse, error)
- func BuiltinCategory(builtin *ast.Builtin) (category string)
- func GetBuiltins() map[string]*ast.Builtin
- func LocationFromPosition(pos types.Position) *ast.Location
- func PositionFromLocation(loc *ast.Location) types.Position
- func QueryRegalBundle(input map[string]any, pq rego.PreparedEvalQuery) (map[string]any, error)
- func SetInputContext(input map[string]any, context map[string]any) map[string]any
- func ToInput(fileURI string, cid clients.Identifier, content string, context map[string]any) (map[string]any, error)
- func UpdateBuiltins(caps *ast.Capabilities)
- type BuiltInCall
- type KeywordUse
- type KeywordUseLocation
- type RuleHeads
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AllKeywords ¶ added in v0.24.0
func AllKeywords(ctx context.Context, fileName, contents string, module *ast.Module) (map[string][]KeywordUse, error)
AllKeywords returns all keywords in the module.
func BuiltinCategory ¶
func GetBuiltins ¶ added in v0.26.0
func LocationFromPosition ¶ added in v0.24.0
func QueryRegalBundle ¶ added in v0.24.0
func SetInputContext ¶ added in v0.24.0
func ToInput ¶ added in v0.24.0
func ToInput( fileURI string, cid clients.Identifier, content string, context map[string]any, ) (map[string]any, error)
ToInput prepares a module with Regal additions to be used as input for evaluation.
func UpdateBuiltins ¶ added in v0.26.0
func UpdateBuiltins(caps *ast.Capabilities)
Update updates the builtins database with the provided capabilities.
Types ¶
type BuiltInCall ¶
func AllBuiltinCalls ¶
func AllBuiltinCalls(module *ast.Module) []BuiltInCall
AllBuiltinCalls returns all built-in calls in the module, excluding operators and any other function identified by an infix.
type KeywordUse ¶ added in v0.24.0
type KeywordUse struct { Name string `json:"name"` Location KeywordUseLocation `json:"location"` }
type KeywordUseLocation ¶ added in v0.24.0
Click to show internal directories.
Click to hide internal directories.