Documentation ¶
Index ¶
- func BuildCompiler(files []string) (*ast.Compiler, error)
- func Detect(url string, dst string) (string, error)
- func Download(ctx context.Context, dst string, urls []string) error
- func ReadFiles(path string) ([]string, error)
- func ReadFilesWithTests(path string) ([]string, error)
- type OCIDetector
- type OCIGetter
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func BuildCompiler ¶
BuildCompiler compiles all of the given Rego policies and returns the Compiler containing the compilation state
func Detect ¶
Detect determines whether a url is a known source url from which we can download files. If a known source is found, the url is formatted, otherwise an error is returned.
func ReadFiles ¶
ReadFiles returns all of the policy files (not including tests) at the given path including its subdirectories.
func ReadFilesWithTests ¶
ReadFilesWithTests returns all of the policies and test files at the given path including its subdirectories. Test files are Rego files that have a suffix of _test.rego
Types ¶
type OCIDetector ¶
type OCIDetector struct{}
OCIDetector implements Detector to detect OCI registry URLs and turn them into URLs that the OCI getter can understand.