Documentation
¶
Overview ¶
Package effect runs declarative actions described by world.Action.
Effects are the runtime side of Kiln's "no Go code from the agent" stance: every behavior the agent can author — validators, hooks, computed defaults, audit emits — is one of a closed set of action kinds whose parameters are themselves expressions. effect.Run is the single dispatcher.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type AuditRecord ¶
AuditRecord is what ActionAudit produces.
type EventRecord ¶
EventRecord is what ActionEmitEvent produces.
type Response ¶
Response describes the effect of a handler-style action (e.g. respond_json). It's separate from the side-effect Run path so routes have a clean "produce a response" surface independent of validate/set/audit.
type Scope ¶
type Scope struct {
Entity any
Ctx map[string]any
Result any
Audit func(AuditRecord)
Emit func(EventRecord)
}
Scope is the runtime context an action sees. Entity is the data being operated on (typically map[string]any for create/update, string id for delete). Ctx exposes request-derived values (user, tenant, request). Audit and Emit are hooks the host wires for ActionAudit / ActionEmitEvent.