package bundle
import "github.com/open-policy-agent/opa/bundle"
Package bundle implements bundle loading.
Index ¶
Constants ¶
const ( RegoExt = ".rego" JSONExt = ".json" ManifestExt = ".manifest" DataFileExt = "/data.json" )
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 Read ¶
Read returns a new Bundle loaded from the reader.
func (Bundle) Equal ¶
Equal returns true if this bundle's contents equal the other bundle's contents.
type Manifest ¶
type Manifest struct { Revision string `json:"revision"` }
Manifest represents the manifest from a bundle. The manifest may contain metadata such as the bundle revision.
type ModuleFile ¶
ModuleFile represents a single module contained a bundle.
Source Files ¶
- Version
- v0.8.2
- Published
- Jun 22, 2018
- Platform
- js/wasm
- Imports
- 11 packages
- Last checked
- 25 seconds ago –
Tools for package owners.