Versions in this module Expand all Collapse all v0 v0.10.0 Aug 5, 2026 Changes in this version type ActionSpec + Touches []string type Options + Columns []string v0.9.0 Aug 3, 2026 v0.8.0 Aug 2, 2026 Changes in this version + const Reads v0.7.0 Aug 1, 2026 v0.6.0 Aug 1, 2026 Changes in this version + var ErrBrokerClosed = errors.New("rest: the broker is closed") + func Events(api huma.API, opts EventsOptions) error + func PublishChangesIn[T any](r *sqlb.Registry, p Publisher) error + func PublishChanges[T any](p Publisher) error + type Broker struct + func NewBroker(opts BrokerOptions) *Broker + func (b *Broker) Close() + func (b *Broker) Publish(events ...Event) + func (b *Broker) Subscribe(ctx context.Context, since uint64) (<-chan Delivery, error) + func (b *Broker) Subscribers() int + type BrokerOptions struct + Buffer int + History int + type Change string + const Created + const Deleted + const Updated + type Delivery struct + Event Event + ID uint64 + Reset *Reset + type Event struct + Key string + Op Change + Scope string + Table string + type EventsOptions struct + Description string + Filter func(ctx context.Context, e Event) bool + Heartbeat time.Duration + Path string + Retry time.Duration + Security []map[string][]string + Source Source + Summary string + Tag string type Options + Computed []string + MaxOffset int + type Publisher interface + Publish func(events ...Event) + type Reset struct + Reason string + type Source interface + Subscribe func(ctx context.Context, since uint64) (<-chan Delivery, error) v0.5.0 Jul 31, 2026 Changes in this version + var ErrNoTransaction = errors.New(...) + func Action[T, In any](api huma.API, db sqlb.Executor, opts Options, spec ActionSpec, ...) error + func CollectionAction[In any](api huma.API, db sqlb.Executor, opts Options, spec ActionSpec, ...) error + type ActionSpec struct + Description string + Field string + HasBody bool + Name string + Path string + Summary string + Writes []string v0.4.0 Jul 30, 2026 v0.3.0 Jul 30, 2026 v0.2.0 Jul 30, 2026 Changes in this version + const CRUD + func Must(err error) + func Resource[T any, C CreateBody[T], U UpdateBody](api huma.API, db sqlb.Executor, opts Options) error + type Config struct + Customize func(*huma.Config) + Description string + Title string + Version string + type CreateBody interface + Row func() (*T, error) + type None struct + func (None[T]) Changes() (map[string]any, error) + func (None[T]) Row() (*T, error) + type Op uint8 + const OpCreate + const OpDelete + const OpList + const OpRead + const OpUpdate + func (o Op) Has(op Op) bool + func (o Op) String() string + type Options struct + DefaultPageSize int + Description string + DisableSearch bool + DisableTransactions bool + Expandable []string + MaxFilters int + MaxPageSize int + MaxSortTerms int + Name string + Ops Op + Path string + Security []map[string][]string + Tag string + type Page struct + HasMore bool + Items []row[T] + NextCursor *string + Page int + PerPage int + Total *int64 + type Problem struct + Detail string + Errors []*ProblemDetail + Status int + Title string + Type string + func (e *Problem) ContentType(string) string + func (e *Problem) Error() string + func (e *Problem) GetStatus() int + type ProblemDetail struct + Allowed []string + Location string + Message string + Value any + type Server struct + API huma.API + Handler http.Handler + Mux *http.ServeMux + func NewServer(cfg Config) *Server + type UpdateBody interface + Changes func() (map[string]any, error) v0.1.0 Jul 27, 2026