Insider.Redaction.Policy (Insider v0.1.0)

Copy Markdown View Source

A bounded, callback-free redaction policy selected by trusted runtime code.

Summary

Types

rule()

@type rule() :: %{
  id: String.t(),
  path: [segment()],
  sensitivity: atom(),
  action: atom()
}

segment()

@type segment() :: String.t() | non_neg_integer() | :each

t()

@type t() :: %Insider.Redaction.Policy{
  fingerprint: String.t(),
  id: String.t(),
  max_duration_ms: pos_integer(),
  max_input_bytes: pos_integer(),
  max_manifest_records: pos_integer(),
  max_nodes: pos_integer(),
  max_output_bytes: pos_integer(),
  max_width: pos_integer(),
  maximum_sensitivity: atom(),
  rules: %{required(tuple()) => rule()}
}

Functions

new(options)

@spec new(keyword()) :: {:ok, t()} | {:error, Insider.Protocol.Error.t()}