package init
import "github.com/open-policy-agent/opa/internal/runtime/init"
Package init is an internal package with helpers for data and policy loading during initialization.
Index ¶
- type BundleLoader
- type Descriptor
- type InsertAndCompileOptions
- type InsertAndCompileResult
- type LoadPathsResult
- func LoadPaths(paths []string, filter loader.Filter, asBundle bool, bvc *bundle.VerificationConfig, skipVerify bool, processAnnotations bool, caps *ast.Capabilities, fsys fs.FS) (*LoadPathsResult, error)
- func LoadPathsForRegoVersion(regoVersion ast.RegoVersion, paths []string, filter loader.Filter, asBundle bool, bvc *bundle.VerificationConfig, skipVerify bool, processAnnotations bool, followSymlinks bool, caps *ast.Capabilities, fsys fs.FS) (*LoadPathsResult, error)
- type WalkPathsResult
Types ¶
type BundleLoader ¶
type BundleLoader struct { DirectoryLoader bundle.DirectoryLoader IsDir bool }
BundleLoader contains information about files in a bundle
type Descriptor ¶
Descriptor contains information about a file
type InsertAndCompileOptions ¶
type InsertAndCompileOptions struct { Store storage.Store Txn storage.Transaction Files loader.Result Bundles map[string]*bundle.Bundle MaxErrors int EnablePrintStatements bool ParserOptions ast.ParserOptions }
InsertAndCompileOptions contains the input for the operation.
type InsertAndCompileResult ¶
InsertAndCompileResult contains the output of the operation.
func InsertAndCompile ¶
func InsertAndCompile(ctx context.Context, opts InsertAndCompileOptions) (*InsertAndCompileResult, error)
InsertAndCompile writes data and policy into the store and returns a compiler for the store contents.
type LoadPathsResult ¶
LoadPathsResult contains the output loading a set of paths.
func LoadPaths ¶
func LoadPaths(paths []string, filter loader.Filter, asBundle bool, bvc *bundle.VerificationConfig, skipVerify bool, processAnnotations bool, caps *ast.Capabilities, fsys fs.FS) (*LoadPathsResult, error)
LoadPaths reads data and policy from the given paths and returns a set of bundles or raw loader file results.
func LoadPathsForRegoVersion ¶
func LoadPathsForRegoVersion(regoVersion ast.RegoVersion, paths []string, filter loader.Filter, asBundle bool, bvc *bundle.VerificationConfig, skipVerify bool, processAnnotations bool, followSymlinks bool, caps *ast.Capabilities, fsys fs.FS) (*LoadPathsResult, error)
type WalkPathsResult ¶
type WalkPathsResult struct { BundlesLoader []BundleLoader FileDescriptors []*Descriptor }
WalkPathsResult contains the output loading a set of paths.
func WalkPaths ¶
WalkPaths reads data and policy from the given paths and returns a set of bundle directory loaders or descriptors that contain information about files.
Source Files ¶
- Version
- v1.4.2 (latest)
- Published
- May 2, 2025
- Platform
- linux/amd64
- Imports
- 11 packages
- Last checked
- 6 hours ago –
Tools for package owners.