SelectoMix.DomainContractVerification (selecto_mix v0.4.7)

Artifact-first helpers for Selecto domain contract verification.

Summary

Types

verification_error()

@type verification_error() ::
  SelectoMix.DomainExport.artifact_error()
  | :contract_verification_unavailable
  | :invalid_snapshot
  | {:invalid_snapshot_format, term()}
  | {:unsupported_snapshot_version, term()}
  | {:snapshot_read_failed, Path.t(), term()}
  | {:snapshot_decode_failed, Path.t(), term()}
  | {:write_failed, Path.t(), term()}

Functions

diff_snapshot_files(left_path, right_path)

@spec diff_snapshot_files(Path.t(), Path.t()) ::
  {:ok, map()} | {:error, verification_error()}

format_error(reason)

@spec format_error(verification_error() | map()) :: String.t()

snapshot_file(provider_path, opts \\ [])

@spec snapshot_file(
  Path.t(),
  keyword()
) :: {:ok, map()} | {:error, verification_error() | map()}

verify_files(provider_path, consumer_path, opts \\ [])

@spec verify_files(Path.t(), Path.t(), keyword()) ::
  {:ok, map()} | {:error, verification_error() | map()}

write_snapshot_file(provider_path, output_path, opts \\ [])

@spec write_snapshot_file(Path.t(), Path.t(), keyword()) ::
  {:ok, map()} | {:error, verification_error() | map()}