Pristine.Core.EndpointMetadata (Pristine v0.4.0)

Copy Markdown View Source

Internal endpoint metadata contract used by the request pipeline.

This struct carries the normalized request metadata that survives the streamlined public runtime boundary.

Summary

Types

t()

@type t() :: %Pristine.Core.EndpointMetadata{
  body_type: String.t() | atom() | nil,
  circuit_breaker: String.t() | nil,
  content_type: String.t() | nil,
  headers: map(),
  id: String.t() | atom() | nil,
  idempotency: boolean() | nil,
  idempotency_header: String.t() | nil,
  method: String.t() | atom() | nil,
  path: String.t() | nil,
  query: map(),
  rate_limit: String.t() | nil,
  request: term(),
  resource: String.t() | nil,
  response: term(),
  response_unwrap: String.t() | nil,
  retry: String.t() | nil,
  security: [map()] | nil,
  telemetry: term(),
  timeout: non_neg_integer() | nil,
  transform: keyword() | map() | nil
}

Functions

from_operation(operation, opts \\ [])

@spec from_operation(Pristine.Operation.t(), keyword()) :: t()

from_request_spec(request_spec, opts \\ [])

@spec from_request_spec(map(), keyword()) :: t()