bundle

package
v1.0.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Dec 20, 2024 License: Apache-2.0 Imports: 2 Imported by: 28

Documentation

Overview

Deprecated: This package is intended for older projects transitioning from OPA v0.x and will remain for the lifetime of OPA v1.x, but its use is not recommended. For newer features and behaviours, such as defaulting to the Rego v1 syntax, use the corresponding components in the github.com/open-policy-agent/opa/v1 package instead. See https://www.openpolicyagent.org/docs/latest/v0-compatibility/ for more information.

Package bundle implements bundle loading.

Index

Constants

View Source
const Name = v1.Name

Name identifies the plugin on manager.

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config = v1.Config

Config represents the configuration of the plugin. The Config can define a single bundle source or a map of `Source` objects defining where/how to download bundles. The older single bundle configuration is deprecated and will be removed in the future in favor of the `Bundles` map.

func ParseBundlesConfig added in v0.13.0

func ParseBundlesConfig(config []byte, services []string) (*Config, error)

ParseBundlesConfig validates the config and injects default values for the defined `bundles`. This expects a map of bundle names to resource configurations.

func ParseConfig added in v0.10.2

func ParseConfig(config []byte, services []string) (*Config, error)

ParseConfig validates the config and injects default values. This is for the legacy single bundle configuration. This will add the bundle to the `Bundles` map to provide compatibility with newer clients. Deprecated: Use `ParseBundlesConfig` with `bundles` OPA config option instead

type ConfigBuilder added in v0.22.0

type ConfigBuilder = v1.ConfigBuilder

ConfigBuilder assists in the construction of the plugin configuration.

func NewConfigBuilder added in v0.22.0

func NewConfigBuilder() *ConfigBuilder

NewConfigBuilder returns a new ConfigBuilder to build and parse the bundle config

type Error added in v1.0.0

type Error = v1.Error

func NewBundleError added in v1.0.0

func NewBundleError(bundleName string, cause error) Error

type Errors added in v1.0.0

type Errors = v1.Errors

Errors represents a list of errors that occurred during a bundle load enriched by the bundle name.

type Loader added in v0.32.0

type Loader = v1.Loader

Loader defines the interface that the bundle plugin uses to control bundle loading via HTTP, disk, etc.

type Plugin

type Plugin = v1.Plugin

Plugin implements bundle activation.

func Lookup added in v0.10.2

func Lookup(manager *plugins.Manager) *Plugin

Lookup returns the bundle plugin registered with the manager.

func New

func New(parsedConfig *Config, manager *plugins.Manager) *Plugin

New returns a new Plugin with the given config.

type Source added in v0.13.0

type Source = v1.Source

Source is a configured bundle source to download bundles from

type Status

type Status = v1.Status

Status represents the status of processing a bundle.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL