DripDrop.HttpHooks (DripDrop v0.1.0)

Copy Markdown View Source

Context for HTTP hooks.

Summary

Functions

Creates an HTTP hook for a sequence.

Deprecated unscoped listing. Use list_http_hooks/2 with an explicit tenant key.

Lists HTTP hooks for a sequence and explicit tenant scope, ordered by key.

Executes a hook with test data and stores the redacted test result.

Updates an HTTP hook.

Functions

create_http_hook(sequence_id, attrs)

@spec create_http_hook(Ecto.UUID.t(), map()) ::
  {:ok, Ecto.Schema.t()} | {:error, Ecto.Changeset.t()}

Creates an HTTP hook for a sequence.

list_http_hooks(sequence_id)

@spec list_http_hooks(Ecto.UUID.t()) :: no_return()

Deprecated unscoped listing. Use list_http_hooks/2 with an explicit tenant key.

list_http_hooks(sequence_id, tenant_key)

@spec list_http_hooks(Ecto.UUID.t(), binary() | nil) :: [Ecto.Schema.t()]

Lists HTTP hooks for a sequence and explicit tenant scope, ordered by key.

test_http_hook(hook_id, test_data)

@spec test_http_hook(Ecto.UUID.t(), map()) :: {:ok, term()} | {:error, term()}

Executes a hook with test data and stores the redacted test result.

update_http_hook(hook, attrs)

@spec update_http_hook(Ecto.Schema.t(), map()) ::
  {:ok, Ecto.Schema.t()} | {:error, Ecto.Changeset.t()}

Updates an HTTP hook.