Class CompilationParameters
- Namespace
- OpaDotNet.Compilation.Abstractions
- Assembly
- OpaDotNet.Compilation.Abstractions.dll
Compilation parameters.
public record CompilationParameters : IEquatable<CompilationParameters>
- Inheritance
-
CompilationParameters
- Implements
- Inherited Members
Constructors
CompilationParameters()
public CompilationParameters()
CompilationParameters(CompilationParameters)
protected CompilationParameters(CompilationParameters original)
Parameters
originalCompilationParameters
Properties
CapabilitiesBytes
Capabilities json that defines the built-in functions and other language features that policies may depend on.
public ReadOnlyMemory<byte> CapabilitiesBytes { get; set; }
Property Value
CapabilitiesFilePath
Capabilities file that defines the built-in functions and other language features that policies may depend on. CapabilitiesFilePath overrides any other specified capabilities.
public string? CapabilitiesFilePath { get; set; }
Property Value
CapabilitiesStream
Capabilities json that defines the built-in functions and other language features that policies may depend on.
[Obsolete("Use CompilationParameters.CapabilitiesBytes instead")]
public Stream? CapabilitiesStream { get; init; }
Property Value
CapabilitiesVersion
OPA capabilities version. If set, compiler will merge capabilities of specified version with any additional custom capabilities.
public string? CapabilitiesVersion { get; set; }
Property Value
Debug
If true compiler will log debug information; otherwise false;
public bool Debug { get; set; }
Property Value
DisablePrintStatements
If print statements are not enabled, calls to print() are erased at compile-time
public bool DisablePrintStatements { get; set; }
Property Value
Entrypoints
Which documents (entrypoints) will be queried when asking for policy decisions.
public IReadOnlyList<string>? Entrypoints { get; set; }
Property Value
EqualityContract
protected virtual Type EqualityContract { get; }
Property Value
FollowSymlinks
Follow symlinks in the input set of paths when building the bundle.
public bool FollowSymlinks { get; set; }
Property Value
Ignore
Set file and directory names to ignore during loading (e.g., '.*' excludes hidden files).
public IReadOnlySet<string> Ignore { get; set; }
Property Value
IsBundle
Specifies if compilation source if file or bundle.
public bool IsBundle { get; set; }
Property Value
OutputPath
Path compiler will use to store intermediate compilation artifacts.
public string? OutputPath { get; set; }
Property Value
Remarks
Directory must exist and requires write permissions.
PruneUnused
Exclude dependents of entrypoints.
public bool PruneUnused { get; set; }
Property Value
RegoVersion
Sets OPA features and behaviors that will be enabled by default.
public RegoVersion RegoVersion { get; set; }
Property Value
Revision
Output bundle revision.
public string? Revision { get; set; }
Property Value
Methods
Equals(CompilationParameters?)
public virtual bool Equals(CompilationParameters? other)
Parameters
otherCompilationParameters
Returns
Equals(object?)
public override bool Equals(object? obj)
Parameters
objobject
Returns
GetHashCode()
public override int GetHashCode()
Returns
PrintMembers(StringBuilder)
protected virtual bool PrintMembers(StringBuilder builder)
Parameters
builderStringBuilder
Returns
ToString()
public override string ToString()
Returns
Operators
operator ==(CompilationParameters?, CompilationParameters?)
public static bool operator ==(CompilationParameters? left, CompilationParameters? right)
Parameters
leftCompilationParametersrightCompilationParameters
Returns
operator !=(CompilationParameters?, CompilationParameters?)
public static bool operator !=(CompilationParameters? left, CompilationParameters? right)
Parameters
leftCompilationParametersrightCompilationParameters