SkillKit.Hooks.Handler behaviour (SkillKit v0.1.0)

Copy Markdown View Source

Behaviour for hook handler implementations.

Each handler type (command, http, etc.) implements this behaviour. Handlers receive a config map (from YAML) and a context map (from the hook event) and return a gate decision.

Summary

Types

result()

@type result() :: :ok | {:deny, term()} | {:pending, term()}

Callbacks

execute(config, context)

@callback execute(config :: map(), context :: map()) :: result()