Versions in this module Expand all Collapse all v1 v1.164.0 Nov 18, 2026 v1.163.0 Nov 18, 2026 v1.162.2 Nov 16, 2026 v1.162.1 Nov 16, 2026 Changes in this version type Handler + func (h *Handler) Everyone() bool type Patch + Everyone *bool + func (p Patch) CheckWho(h *Handler, adding bool) error v1.162.0 Nov 15, 2026 v1.161.0 Nov 14, 2026 Changes in this version + const Channel + const DecideName + const DefaultMaxAge + const DefaultTimeoutMS + const FailCall + const FailDeny + const FailHold + const FailOriginal + const FailureRetention + const InBody + const InPath + const InQuery + const KindPolicy + const KindTransform + const KindWatch + const MaxTimeoutMS + const MaxWindow + const TransformName + const WatchEntry + var ErrInvalid = errors.New("invalid call handler") + var ErrNotFound = errors.New("no such call handler") + func CheckPolicy(source string) error + func CheckTransform(source string) error + func CheckWatch(source string) error + func ConnectionMatches(pattern, name string) bool + func Contract(kind string) string + func IsKind(name string) bool + func ItemCount(body any, itemsPath string) int + func Lookup(v any, dotted string) any + func Within(ctx context.Context) bool + func WithinHandler(ctx context.Context) context.Context + type Call struct + Arguments map[string]any + Body any + Connection string + Items int + Method string + Operation string + Path string + PathParams map[string]string + Persona string + Query map[string]any + SQL string + Time time.Time + Tool string + User string + Write bool + type Condition struct + Equals string + In string + Name string + type Failure struct + At time.Time + Call map[string]any + DurationMS int + Error string + HandlerID string + ID string + Outcome string + Prints string + User string + Version int + type Handler struct + Args map[string]any + Conditions []Condition + Connection string + CreatedAt time.Time + CreatedBy string + Enabled bool + ID string + ItemsPath string + Kind string + OnFailure string + Operations []string + Order int + Personas []string + Protected []string + ScriptID string + TimeoutMS int + UpdatedAt time.Time + UpdatedBy string + Users []string + Writes map[string]bool + func (h *Handler) IsWrite(c *Call) bool + func (h *Handler) Matches(c *Call) bool + func (h *Handler) Normalize() + func (h *Handler) Validate() error + type Index struct + MaxAge time.Duration + Reader Reader + func (x *Index) Any(connection string) bool + func (x *Index) Load(ctx context.Context) error + func (x *Index) Match(c *Call, kind string) []Handler + func (x *Index) Notify() + func (x *Index) On(connection string) []Handler + type Patch struct + Args map[string]any + Conditions *[]Condition + Connection *string + ItemsPath *string + OnFailure *string + Operations *[]string + Order *int + Personas *[]string + Protected *[]string + TimeoutMS *int + Users *[]string + Writes *map[string]bool + func (p Patch) Apply(h *Handler) + type Reader interface + Enabled func(ctx context.Context) ([]Handler, error) + type Stat struct + Denied int + Errors int + Held int + Matched int + P50MS float64 + P99MS float64 + Queued int + type Statement struct + Connection string + Persona string + SQL string + Tool string + User string + type Store struct + DB *sql.DB + func NewStore(db *sql.DB) *Store + func (s *Store) All(ctx context.Context) ([]Handler, error) + func (s *Store) ByScript(ctx context.Context, scriptID string) ([]Handler, error) + func (s *Store) Count(ctx context.Context, t Tally) (int, error) + func (s *Store) Delete(ctx context.Context, id string) error + func (s *Store) Enabled(ctx context.Context) ([]Handler, error) + func (s *Store) Failures(ctx context.Context, handlerID string, limit int) ([]Failure, error) + func (s *Store) Get(ctx context.Context, id string) (*Handler, error) + func (s *Store) Insert(ctx context.Context, h *Handler) error + func (s *Store) RecordFailure(ctx context.Context, f Failure) error + func (s *Store) Release(ctx context.Context, callID string) error + func (s *Store) SetEnabled(ctx context.Context, id string, enabled bool, by string) error + func (s *Store) SetOrder(ctx context.Context, ids []string, by string) error + func (s *Store) Stats(ctx context.Context, connection string) (map[string]Stat, error) + func (s *Store) Sweep(ctx context.Context, now time.Time) error + func (s *Store) Update(ctx context.Context, h *Handler) error + type Tally struct + Amount int + CallID string + HandlerID string + Key string + Window time.Duration + type TestRequest struct + Arguments map[string]any + At string + Connection string + Persona string + Result any + Tool string + User string