Wardrik. Operations. Triggers
(wardrik v0.1.0-rc.1)
Copy Markdown
Operations on an agent's triggers: setting, removing, and delivering webhooks.
Summary
Functions
Passes a webhook request to the agent's trigger. The trigger checks the request first.
Removes one of the agent's triggers. Returns the removed trigger.
Sets one of the agent's triggers, and saves it in the agent's definition.
Functions
@spec deliver(Wardrik.Scope.t(), map()) :: {:ok, nil} | {:error, Wardrik.Error.t()}
Passes a webhook request to the agent's trigger. The trigger checks the request first.
@spec remove(Wardrik.Scope.t(), map()) :: {:ok, map()} | {:error, Wardrik.Error.t()}
Removes one of the agent's triggers. Returns the removed trigger.
@spec set(Wardrik.Scope.t(), map()) :: {:ok, map()} | {:error, Wardrik.Error.t()}
Sets one of the agent's triggers, and saves it in the agent's definition.