Documentation
¶
Overview ¶
Package init is an internal package with helpers for data and policy loading during initialization.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type BundleLoader ¶ added in v0.22.0
type BundleLoader struct {
DirectoryLoader bundle.DirectoryLoader
IsDir bool
}
BundleLoader contains information about files in a bundle
type Descriptor ¶ added in v0.22.0
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
}
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.
type WalkPathsResult ¶ added in v0.22.0
type WalkPathsResult struct {
BundlesLoader []BundleLoader
FileDescriptors []*Descriptor
}
WalkPathsResult contains the output loading a set of paths.