SanityWebhookPlug.Handler behaviour (sanity_webhook_plug v0.1.0)

Behaviour for handling webhooks from SanityWebhookPlug

Link to this section Summary

Callbacks

Handle inauthentic or erroneous webhooks

Handle authenticity-validated webhooks

Link to this section Types

@type error() :: String.t() | term()
@type params() :: map()

Link to this section Callbacks

Link to this callback

handle_error(t, error)

@callback handle_error(Plug.Conn.t(), error()) :: Plug.Conn.t()

Handle inauthentic or erroneous webhooks

Link to this callback

handle_event(t, params)

@callback handle_event(Plug.Conn.t(), params()) :: Plug.Conn.t()

Handle authenticity-validated webhooks