Documentation ¶
Overview ¶
Package capabilities provides convenient access to OPA capabilities definitions that are embedded within Regal.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func List ¶
List returns a map with keys being Rego engine types, and values being lists of capabilities versions present in the embedded capabilities database for that version. Versions are sorted descending according to semver (e.g. index 0 is the newest version), with version strings that are not valid semver versions sorting after all valid versions strings but otherwise being compared lexicographically.
func Lookup ¶
Lookup attempts to retrieve capabilities from the requested RFC3986 compliant URL.
If the URL scheme is 'http', 'https', or 'file' then the specified document will be retrieved and parsed as JSON using ast.LoadCapabilitiesJSON().
If the URL scheme is 'regal', then Lookup will retrieve the capabilities from Regal's embedded capabilities database. The path for the URL is treated according to the following rules:
'regal://capabilities/default' loads the capabilities from ast.CapabilitiesForThisVersion().
'regal://capabilities/{engine}' loads the latest capabilities for the specified engine, sorted according to semver. Versions that are not valid semver strings are sorted lexicographically, but are always sorted after valid semver strings.
'regal://capabilities/{engine}/{version}' loads the requested capabilities version for the specified engine.
Types ¶
This section is empty.