LemonGateway.Transports.Webhook.Idempotency (lemon_gateway v0.1.0)

View Source

Idempotency-key reservation and response persistence for webhook submissions.

Summary

Functions

context(conn, payload, integration_id, integration, webhook_config)

@spec context(Plug.Conn.t(), map(), binary(), map(), map()) ::
  {:ok, map() | nil} | {:duplicate, integer(), map()}

store_response(idempotency_ctx, status, payload)

@spec store_response(map() | nil, integer(), map()) :: :ok

store_submission(idempotency_ctx, run_id, session_key, mode)

@spec store_submission(map() | nil, binary(), binary(), atom() | binary()) :: :ok

table()

@spec table() :: atom()