Table of Contents

Class BundleManifest

Namespace
OpaDotNet.Compilation.Abstractions
Assembly
OpaDotNet.Compilation.Abstractions.dll

Policy bundle manifest.

public record BundleManifest : IEquatable<BundleManifest>
Inheritance
BundleManifest
Implements
Inherited Members

Constructors

BundleManifest()

public BundleManifest()

BundleManifest(BundleManifest)

protected BundleManifest(BundleManifest original)

Parameters

original BundleManifest

Properties

EqualityContract

protected virtual Type EqualityContract { get; }

Property Value

Type

Metadata

An optional key that contains arbitrary metadata to accompany the bundle. This metadata is available for querying using data.system, along with the rest of the manifest.

[JsonPropertyName("metadata")]
public Dictionary<string, string> Metadata { get; }

Property Value

Dictionary<string, string>

Revision

If the bundle service is capable of serving different revisions of the same bundle, the service should include a top-level revision field containing a string value that identifies the bundle revision.

[JsonPropertyName("revision")]
public string? Revision { get; init; }

Property Value

string

Roots

If you expect to load additional data into OPA from outside the bundle (e.g., via OPA’s HTTP API) you should include a top-level roots field containing of path prefixes that declare the scope of the bundle. If the roots field is not included in the manifest it defaults to [""] which means that ALL data and policy must come from the bundle.

[JsonPropertyName("roots")]
public HashSet<string>? Roots { get; init; }

Property Value

HashSet<string>

Wasm

A list of OPA WebAssembly (Wasm) module files in the bundle along with metadata for how they should be evaluated.

[JsonPropertyName("wasm")]
public HashSet<WasmMetadata> Wasm { get; }

Property Value

HashSet<WasmMetadata>

Methods

Equals(BundleManifest?)

public virtual bool Equals(BundleManifest? other)

Parameters

other BundleManifest

Returns

bool

Equals(object?)

public override bool Equals(object? obj)

Parameters

obj object

Returns

bool

GetHashCode()

public override int GetHashCode()

Returns

int

PrintMembers(StringBuilder)

protected virtual bool PrintMembers(StringBuilder builder)

Parameters

builder StringBuilder

Returns

bool

ToString()

public override string ToString()

Returns

string

Operators

operator ==(BundleManifest?, BundleManifest?)

public static bool operator ==(BundleManifest? left, BundleManifest? right)

Parameters

left BundleManifest
right BundleManifest

Returns

bool

operator !=(BundleManifest?, BundleManifest?)

public static bool operator !=(BundleManifest? left, BundleManifest? right)

Parameters

left BundleManifest
right BundleManifest

Returns

bool