60 lines
1.7 KiB
C#
60 lines
1.7 KiB
C#
// <copyright file="FacetEntry.cs" company="StellaOps">
|
|
// Copyright (c) StellaOps. Licensed under BUSL-1.1.
|
|
// </copyright>
|
|
|
|
using System.Collections.Immutable;
|
|
|
|
namespace StellaOps.Facet;
|
|
|
|
/// <summary>
|
|
/// A sealed facet entry within a <see cref="FacetSeal"/>.
|
|
/// </summary>
|
|
public sealed record FacetEntry
|
|
{
|
|
/// <summary>
|
|
/// Gets the facet identifier (e.g., "os-packages-dpkg", "lang-deps-npm").
|
|
/// </summary>
|
|
public required string FacetId { get; init; }
|
|
|
|
/// <summary>
|
|
/// Gets the human-readable name.
|
|
/// </summary>
|
|
public required string Name { get; init; }
|
|
|
|
/// <summary>
|
|
/// Gets the category for grouping.
|
|
/// </summary>
|
|
public required FacetCategory Category { get; init; }
|
|
|
|
/// <summary>
|
|
/// Gets the selectors used to identify files in this facet.
|
|
/// </summary>
|
|
public required ImmutableArray<string> Selectors { get; init; }
|
|
|
|
/// <summary>
|
|
/// Gets the Merkle root of all files in this facet.
|
|
/// </summary>
|
|
/// <remarks>
|
|
/// Format: "sha256:{hex}" computed from sorted file entries.
|
|
/// </remarks>
|
|
public required string MerkleRoot { get; init; }
|
|
|
|
/// <summary>
|
|
/// Gets the number of files in this facet.
|
|
/// </summary>
|
|
public required int FileCount { get; init; }
|
|
|
|
/// <summary>
|
|
/// Gets the total bytes across all files.
|
|
/// </summary>
|
|
public required long TotalBytes { get; init; }
|
|
|
|
/// <summary>
|
|
/// Gets the optional individual file entries (for detailed audit).
|
|
/// </summary>
|
|
/// <remarks>
|
|
/// May be null for compact seals that only store Merkle roots.
|
|
/// </remarks>
|
|
public ImmutableArray<FacetFileEntry>? Files { get; init; }
|
|
}
|