Versions in this module Expand all Collapse all v0 v0.1.1 Jun 25, 2026 Changes in this version + type List struct + Items []T + Meta ListMeta + func NewList[T any](items []T) List[T] + type ListMeta struct + Total int v0.1.0 Jun 25, 2026 Changes in this version + const CodeBadRequest + const CodeConflict + const CodeForbidden + const CodeInternal + const CodeMethodNotAllowed + const CodeNotFound + const CodePayloadTooLarge + const CodeServiceUnavailable + const CodeTimeout + const CodeTooManyRequests + const CodeUnauthorized + const CodeValidation + func Register[Req, Resp any](reg *Registry, a Action[Req, Resp]) + func RequestIDFromContext(ctx context.Context) string + type APIError struct + Code string + Fields []FieldError + Message string + Status int + func (e *APIError) Error() string + type Accepted struct + Body T + type Action struct + Deprecated bool + Description string + Handle func(ctx context.Context, req Req) (Resp, error) + ID string + Method string + Middleware []Middleware + Path string + Security []SecurityRequirement + Statuses []StatusDoc + Summary string + Tags []string + Timeout time.Duration + type Created struct + Body T + type Empty struct + type ErrorMapper func(error) APIError + type FieldError struct + Field string + Message string + type Middleware = func(http.Handler) http.Handler + type Observation struct + ActionID string + Duration time.Duration + Err error + Method string + Path string + RequestID string + Status int + type ObserveFunc func(Observation) + type Option func(*Registry) + func WithErrorMapper(m ErrorMapper) Option + func WithInfo(title, description, version string) Option + func WithMaxBodyBytes(n int64) Option + func WithMethodNotAllowedHandler(h http.Handler) Option + func WithMiddleware(mw ...Middleware) Option + func WithNotFoundHandler(h http.Handler) Option + func WithObserver(fn ObserveFunc) Option + func WithOpenAPIVersion(v string) Option + func WithRequestIDGenerator(gen func() string) Option + func WithSecurity(reqs ...SecurityRequirement) Option + func WithSecurityScheme(name string, scheme SecurityScheme) Option + func WithServers(servers ...Server) Option + func WithStripPrefix(prefix string) Option + type Page struct + HasMore bool + Items []T + NextCursor string + type Registry struct + func NewRegistry(opts ...Option) *Registry + func (r *Registry) Freeze() + func (r *Registry) Handler() http.Handler + func (r *Registry) OpenAPIJSON() []byte + func (r *Registry) OpenAPIYAML() []byte + type Response struct + Body T + Header http.Header + Status int + type SecurityRequirement map[string][]string + type SecurityScheme struct + BearerFormat string + Description string + In string + Name string + Scheme string + Type string + func APIKeyAuth(in, name string) SecurityScheme + func BearerAuth(bearerFormat string) SecurityScheme + type Server struct + Description string + URL string + type StatusDoc struct + Code int + Description string + Error bool + type Validatable interface + Validate func() error