package bundle
import "github.com/open-policy-agent/opa/bundle"
Package bundle implements bundle loading.
Index ¶
- Constants
- func Write(w io.Writer, bundle Bundle) error
- type Bundle
- type Manifest
- type ModuleFile
- type Reader
Constants ¶
const (
RegoExt = ".rego"
)
Common file extensions and file names.
Functions ¶
func Write ¶
Write serializes the Bundle and writes it to w.
Types ¶
type Bundle ¶
type Bundle struct { Manifest Manifest Data map[string]interface{} Modules []ModuleFile }
Bundle represents a loaded bundle. The bundle can contain data and policies.
func (Bundle) Equal ¶
Equal returns true if this bundle's contents equal the other bundle's contents.
type Manifest ¶
Manifest represents the manifest from a bundle. The manifest may contain metadata such as the bundle revision.
func (*Manifest) Init ¶
func (m *Manifest) Init()
Init initializes the manifest. If you instantiate a manifest manually, call Init to ensure that the roots are set properly.
type ModuleFile ¶
ModuleFile represents a single module contained a bundle.
type Reader ¶
type Reader struct {
// contains filtered or unexported fields
}
Reader contains the reader to load the bundle from.
func NewReader ¶
NewReader returns a new Reader.
func (*Reader) IncludeManifestInData ¶
IncludeManifestInData sets whether the manifest metadata should be included in the bundle's data.
func (*Reader) Read ¶
Read returns a new Bundle loaded from the reader.
Source Files ¶
- Version
- v0.11.0
- Published
- May 20, 2019
- Platform
- linux/amd64
- Imports
- 12 packages
- Last checked
- 17 minutes ago –
Tools for package owners.