Versions in this module Expand all Collapse all v0 v0.1.1 Sep 16, 2026 v0.1.0 Sep 16, 2026 Changes in this version + func BindBody(c *Context, dst any) error + func BindPathParams(c *Context, dst any) error + func BindQueryParams(c *Context, dst any) error + func Environment() string + func LoadConfig[T any](environment string, configFS fs.FS) (*T, error) + func MergeFS(roots ...fs.FS) fs.FS + func MergeSpurAssets(hostAssets fs.FS, mounts ...Mount) fs.FS + func MergeSpurManifests(hostManifest assets.Manifest, mounts ...Mount) (assets.Manifest, error) + func MergeSpurViews(hostViews fs.FS, mounts ...Mount) fs.FS + func RegisterSpurJobs(reg *jobs.Registry, mounts ...Mount) + func RegisterSpurRoutes(r *Router, mounts ...Mount) + type AssetsStrategy string + const AssetsStrategyBundler + const AssetsStrategyImportMap + const AssetsStrategyNone + type Binder interface + Bind func(c *Context, target any) error + type Context struct + func (c *Context) Bind(target any) error + func (c *Context) Blob(code int, contentType string, b []byte) error + func (c *Context) Context() context.Context + func (c *Context) Get[T any](key string) T + func (c *Context) HTML(code int, html string) error + func (c *Context) HTMLBlob(code int, blob []byte) error + func (c *Context) JSON(code int, j any) error + func (c *Context) Logger() *slog.Logger + func (c *Context) Render(code int, name string, data any) error + func (c *Context) Request() *http.Request + func (c *Context) Reset(w http.ResponseWriter, r *http.Request) + func (c *Context) Response() http.ResponseWriter + func (c *Context) Set(key string, val any) + func (c *Context) String(code int, s string) error + type DefaultBinder struct + func (d *DefaultBinder) Bind(c *Context, target any) error + type ErrorHandlerFunc func(c *Context, err HTTPError) + type Group struct + func (g *Group) Delete(pattern string, h HandlerFunc) + func (g *Group) Get(pattern string, h HandlerFunc) + func (g *Group) HandleFunc(method, pattern string, h HandlerFunc) + func (g *Group) NewGroup(prefix string, mws ...MiddlewareFunc) *Group + func (g *Group) Patch(pattern string, h HandlerFunc) + func (g *Group) Post(pattern string, h HandlerFunc) + func (g *Group) Put(pattern string, h HandlerFunc) + func (g *Group) Resource(prefix string, r Resource, mw ...MiddlewareFunc) + func (g *Group) Resources(prefix string, r Resources, mw ...MiddlewareFunc) + func (g *Group) Use(mws ...MiddlewareFunc) + func (g *Group) WithGroup(prefix string, fn GroupBuilder, mws ...MiddlewareFunc) + type GroupBuilder func(g *Group) + type HTTPError interface + StatusCode func() int + func NewHTTPError(code int, err error) HTTPError + type HandlerFunc func(c *Context) error + type MiddlewareFunc func(next HandlerFunc) HandlerFunc + type Mount struct + Prefix string + Spur Spur + type Renderer interface + Render func(c *Context, w io.Writer, name string, data any) error + type Resource interface + Create func(c *Context) error + Destroy func(c *Context) error + Edit func(c *Context) error + New func(c *Context) error + Show func(c *Context) error + Update func(c *Context) error + type Resources interface + Index func(c *Context) error + type RouteBuilder func(r *Router) + type Router struct + func (rt *Router) Delete(pattern string, h HandlerFunc) + func (rt *Router) Get(pattern string, h HandlerFunc) + func (rt *Router) HandleFunc(method, pattern string, h HandlerFunc) + func (rt *Router) NewGroup(prefix string, mws ...MiddlewareFunc) *Group + func (rt *Router) Patch(pattern string, h HandlerFunc) + func (rt *Router) Post(pattern string, h HandlerFunc) + func (rt *Router) Put(pattern string, h HandlerFunc) + func (rt *Router) Resource(prefix string, r Resource, mw ...MiddlewareFunc) + func (rt *Router) Resources(prefix string, r Resources, mw ...MiddlewareFunc) + func (rt *Router) ServeHTTP(w http.ResponseWriter, r *http.Request) + func (rt *Router) Use(mws ...MiddlewareFunc) + func (rt *Router) WithGroup(prefix string, fn GroupBuilder, mws ...MiddlewareFunc) + type Runner interface + Run func(ctx context.Context) error + func RegisterSpurRunners(mounts ...Mount) []Runner + type Spur interface + AssetsFS func() fs.FS + Jobs func(r *jobs.Registry) + Routes func(g *Group) + ViewFS func() fs.FS + type Trail struct + Host string + Port int + func New(o *TrailOptions) (*Trail, error) + func (t *Trail) Run() error + func (t *Trail) ServeHTTP(w http.ResponseWriter, r *http.Request) + func (t *Trail) Use(mws ...MiddlewareFunc) + type TrailOptions struct + AssetsFS fs.FS + AssetsStrategy AssetsStrategy + Binder Binder + ConfigFS fs.FS + Context context.Context + ErrorHandler ErrorHandlerFunc + Host string + LayoutName string + Logger *slog.Logger + Port int + Renderer Renderer + RouteBuilder RouteBuilder + Runners []Runner + ViewFS fs.FS + func WithDefaultOptions(opts *TrailOptions) *TrailOptions + type Unmarshaler interface + UnmarshalParam func(value string) error