Skip to content

builder

Structs

  • EventBuilder - Builds signed [ExecutionEvent]s from [AuditPayload]s.

Enums


firma_sidecar::audit::builder::EventBuilder

Section titled “firma_sidecar::audit::builder::EventBuilder”

Struct

Builds signed [ExecutionEvent]s from [AuditPayload]s.

Loaded once at startup with an ECDSA P-256 signing key. Each call to build produces a new event with a UUID v7 identifier, a nanosecond-precision timestamp, and an ECDSA signature covering all preceding fields.

Methods:

  • fn new(pem: &str) -> Result<Self, EventBuilderError> - Creates a new builder from a PEM-encoded ECDSA P-256 private key.
  • fn with_sandbox_id(self: Self, sandbox_id: String) -> Self - Sets the per-run sandbox identity stamped on every emitted
  • fn build(self: &Self, payload: AuditPayload) -> ExecutionEvent - Builds a signed [ExecutionEvent] from an [AuditPayload].

Trait Implementations:

  • Debug
    • fn fmt(self: &Self, f: & mut fmt::Formatter) -> fmt::Result

firma_sidecar::audit::builder::EventBuilderError

Section titled “firma_sidecar::audit::builder::EventBuilderError”

Enum

Errors that can occur when constructing an [EventBuilder].

Variants:

  • InvalidKey(String) - The PEM-encoded signing key could not be parsed.

Traits: Error

Trait Implementations:

  • Debug
    • fn fmt(self: &Self, f: & mut $crate::fmt::Formatter) -> $crate::fmt::Result
  • Display
    • fn fmt(self: &Self, __formatter: & mut ::core::fmt::Formatter) -> ::core::fmt::Result