Documentation ¶
Overview ¶
Package loader contains utilities for loading files into OPA.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CleanPath ¶ added in v0.5.9
CleanPath returns the normalized version of a path that can be used as an identifier.
func Paths ¶
Paths returns a sorted list of files contained at path. If recurse is true and path is a directory, then Paths will walk the directory structure recursively and list files at each level.
func SplitPrefix ¶
SplitPrefix returns a tuple specifying the document prefix and the file path.
Types ¶
type Filter ¶ added in v0.8.2
Filter defines the interface for filtering files during loading. If the filter returns true, the file should be excluded from the result.
func GlobExcludeName ¶ added in v0.8.2
GlobExcludeName excludes files and directories whose names do not match the shell style pattern at minDepth or greater.
type Result ¶
type Result struct { Documents map[string]interface{} Modules map[string]*RegoFile // contains filtered or unexported fields }
Result represents the result of successfully loading zero or more files.