save progress
This commit is contained in:
59
src/__Libraries/StellaOps.Facet/FacetEntry.cs
Normal file
59
src/__Libraries/StellaOps.Facet/FacetEntry.cs
Normal file
@@ -0,0 +1,59 @@
|
||||
// <copyright file="FacetEntry.cs" company="StellaOps">
|
||||
// Copyright (c) StellaOps. Licensed under AGPL-3.0-or-later.
|
||||
// </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; }
|
||||
}
|
||||
Reference in New Issue
Block a user