• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

me-viper / OpaDotNet / 11512106788

25 Oct 2024 04:51AM UTC coverage: 84.386%. Remained the same
11512106788

push

github

me-viper
ci: Add CI inputs

1820 of 2364 branches covered (76.99%)

Branch coverage included in aggregate %.

3817 of 4316 relevant lines covered (88.44%)

1737.21 hits per line

Source File
Press 'n' to go to next uncovered line, 'b' for previous

44.44
/src/Compilation.Abstractions/src/BundleManifest.cs
1
using System.Text.Json.Serialization;
2

3
using JetBrains.Annotations;
4

5
namespace OpaDotNet.Compilation.Abstractions;
6

7
/// <summary>
8
/// Policy bundle manifest.
9
/// </summary>
10
[PublicAPI]
11
public record BundleManifest
12
{
13
    /// <summary>
14
    /// If the bundle service is capable of serving different revisions of the same bundle,
15
    /// the service should include a top-level revision field containing a string value that identifies the bundle revision.
16
    /// </summary>
17
    [JsonPropertyName("revision")]
18
    public string? Revision { get; init; }
8✔
19

20
    /// <summary>
21
    /// If you expect to load additional data into OPA from outside the bundle (e.g., via OPA’s HTTP API)
22
    /// you should include a top-level roots field containing of path prefixes that declare the scope of the bundle.
23
    /// If the roots field is not included in the manifest it defaults to [""] which means that ALL data
24
    /// and policy must come from the bundle.
25
    /// </summary>
26
    [JsonPropertyName("roots")]
27
    public HashSet<string>? Roots { get; init; }
4✔
28

29
    /// <summary>
30
    /// A list of OPA WebAssembly (Wasm) module files in the bundle along with metadata for how they should be evaluated.
31
    /// </summary>
32
    [JsonPropertyName("wasm")]
33
    public HashSet<WasmMetadata> Wasm { get; } = new();
6✔
34

35
    /// <summary>
36
    /// An optional key that contains arbitrary metadata to accompany the bundle.
37
    /// This metadata is available for querying using data.system, along with the rest of the manifest.
38
    /// </summary>
39
    [JsonPropertyName("metadata")]
40
    public Dictionary<string, string> Metadata { get; } = new();
8✔
41
}
42

43
/// <summary>
44
/// OPA WebAssembly (Wasm) module files in the bundle.
45
/// </summary>
46
/// <param name="Entrypoint">
47
/// A string path defining what query path the wasm module is built to evaluate.
48
/// Once loaded any usage of this path in a query will use the Wasm module to compute the value.
49
/// </param>
50
/// <param name="Module">A string path to the Wasm module relative to the root of the bundle.</param>
51
[PublicAPI]
52
public record WasmMetadata(
×
53
    [property: JsonPropertyName("entrypoint")]
×
54
    string Entrypoint,
×
55
    [property: JsonPropertyName("module")] string Module
×
56
    );
×
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2025 Coveralls, Inc