Versions in this module Expand all Collapse all v0 v0.23.0 Aug 28, 2026 v0.22.0 Aug 28, 2026 v0.21.0 Aug 28, 2026 Changes in this version + type CreateExplicit interface + Explicit func() []string v0.20.0 Aug 26, 2026 Changes in this version + const CRUD + const Reads + var ErrBrokerClosed = errors.New("rest: the broker is closed") + var ErrNoTransaction = errors.New(...) + func ActionReturning[T, In, Out any](api huma.API, db sqlb.Executor, opts Options, spec ActionSpec, ...) error + func Action[T, In any](api huma.API, db sqlb.Executor, opts Options, spec ActionSpec, ...) error + func CollectionActionReturning[In, Out 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 + func Events(api huma.API, opts EventsOptions) error + func Must(err error) + func PublishChanges[T any](r *sqlb.Registry, p Publisher) error + func Query[In, Out any](api huma.API, db sqlb.Executor, opts Options, spec QuerySpec, ...) error + func Resource[T any, C CreateBody[T], U UpdateBody](api huma.API, db sqlb.Executor, opts Options) error + func Serve(ctx context.Context, cfg ServeConfig, mount func(*Server, *sqlb.DB) error) error + type ActionSpec struct + Description string + Field string + HasBody bool + Name string + Path string + Summary string + Touches []string + Writes []string + 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 Config struct + Customize func(*huma.Config) + Description string + Title string + Version string + type CreateBody interface + Row func() (*T, error) + type CreateInput interface + Input func() any + 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 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 OpSingleton + const OpUpdate + func (o Op) Has(op Op) bool + func (o Op) String() string + type Options struct + Columns []string + Computed []string + DefaultPageSize int + DefaultSort []string + Description string + DisableSearch bool + DisableTransactions bool + Expandable []string + MaxFilters int + MaxOffset int + MaxPageSize int + MaxSortTerms int + Name string + Ops Op + Path string + Security []map[string][]string + Tag string + Unscoped []string + type Page struct + HasMore bool + Items rows[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 Publisher interface + Publish func(events ...Event) + type QuerySpec struct + Description string + Field string + HasParams bool + Name string + Path string + Reads []string + Summary string + type Reset struct + Reason string + type ServeConfig struct + Addr string + DSN string + Log *slog.Logger + Middleware func(http.Handler) http.Handler + Migrate func(ctx context.Context, pool *pgxpool.Pool) error + Server Config + ShutdownTimeout time.Duration + type Server struct + API huma.API + Handler http.Handler + Mux *http.ServeMux + func NewServer(cfg Config) *Server + type Source interface + Subscribe func(ctx context.Context, since uint64) (<-chan Delivery, error) + type TxPublisher interface + Record func(ctx context.Context, events ...Event) error + type UpdateBody interface + Changes func() (map[string]any, error) v0.19.0 Aug 26, 2026 v0.18.0 Aug 25, 2026