Documentation
¶
Overview ¶
Package burrow is a Go web framework built on chi, Bun/SQLite, and html/template. It provides a modular architecture where features are packaged as "apps" that plug into a shared server.
Getting Started ¶
Create a server, register apps, and run:
srv := burrow.NewServer(
session.New(),
csrf.New(),
myapp.New(),
)
srv.SetLayout(myLayout)
app := &cli.Command{
Name: "mysite",
Flags: srv.Flags(nil),
Action: srv.Run,
}
_ = app.Run(context.Background(), os.Args)
NewServer sorts apps by declared dependencies automatically. The boot sequence runs migrations, calls Register on each app, configures them from CLI/ENV/TOML flags, and starts the HTTP server with graceful shutdown.
Handler Functions ¶
Burrow handlers return an error instead of silently swallowing failures:
func listItems(w http.ResponseWriter, r *http.Request) error {
items, err := fetchItems(r.Context())
if err != nil {
return err // logged and rendered as 500
}
return burrow.JSON(w, http.StatusOK, items)
}
Wrap them with Handle to get a standard http.HandlerFunc:
r.Get("/items", burrow.Handle(listItems))
Return an HTTPError to control the status code and message:
return burrow.NewHTTPError(http.StatusNotFound, "item not found")
Response Helpers ¶
JSON, Text, and HTML write responses with correct Content-Type headers. Render writes pre-rendered template.HTML (useful for HTMX fragments). RenderTemplate executes a named template and wraps it in the layout for full-page requests, or returns the fragment alone for HTMX requests.
Request Binding and Validation ¶
Bind parses a request body (JSON, multipart, or form-encoded) into a struct and validates it using "validate" struct tags. On validation failure it returns a *ValidationError containing per-field errors:
type CreateItem struct {
Name string `form:"name" validate:"required"`
Email string `form:"email" validate:"required,email"`
}
func create(w http.ResponseWriter, r *http.Request) error {
var input CreateItem
if err := burrow.Bind(r, &input); err != nil {
var ve *burrow.ValidationError
if errors.As(err, &ve) {
return burrow.JSON(w, 422, ve.Errors)
}
return err
}
// input is valid
}
Validate can be called standalone on any struct.
App Interface ¶
Every app implements App (Name + Register). Apps gain additional capabilities by implementing optional interfaces:
- Migratable — embedded SQL migration files
- HasRoutes — HTTP route registration on a chi.Router
- HasMiddleware — global middleware
- HasNavItems — main navigation entries
- HasTemplates — .html template files parsed into the global template set
- HasFuncMap — static template functions
- HasRequestFuncMap — per-request template functions
- Configurable — CLI/ENV/TOML flags and configuration
- HasCLICommands — CLI subcommands
- Seedable — database seeding
- HasAdmin — admin panel routes and navigation
- HasStaticFiles — embedded static file assets
- HasTranslations — i18n translation files
- HasDependencies — declared app dependencies for ordering
- HasShutdown — graceful shutdown hooks
Templates ¶
Apps contribute .html files via HasTemplates. All templates are parsed into a single global html/template.Template at boot time. Templates use {{ define "appname/templatename" }} blocks for namespacing. Apps can add template functions via HasFuncMap (static) and HasRequestFuncMap (per-request, e.g. for CSRF tokens or the current user).
Pagination ¶
ParsePageRequest extracts limit and page from the query string. Use ApplyOffset + OffsetResult for offset-based pagination. PageResponse wraps items and pagination metadata for JSON APIs.
Contrib Apps ¶
The contrib/ directory provides reusable apps:
- auth — WebAuthn passkey authentication with recovery codes
- authmail — pluggable email rendering with SMTP backend
- session — cookie-based sessions (gorilla/sessions)
- csrf — CSRF protection (gorilla/csrf)
- i18n — locale detection and translations (go-i18n)
- admin — admin panel with generic CRUD via ModelAdmin
- bootstrap — Bootstrap 5 CSS/JS with dark mode
- bsicons — Bootstrap Icons as inline SVG template functions
- htmx — HTMX asset serving and request/response helpers
- jobs — SQLite-backed in-process job queue with retry
- uploads — pluggable file upload storage
- messages — flash messages via session storage
- ratelimit — per-client token bucket rate limiting
- healthcheck — liveness and readiness probes
- staticfiles — static file serving with content-hashed URLs
Index ¶
- func ApplyOffset(q *bun.SelectQuery, pr PageRequest) *bun.SelectQuery
- func Bind(r *http.Request, v any) error
- func ContextValue[T any](ctx context.Context, key any) (T, bool)
- func CoreFlags(configSource func(key string) cli.ValueSource) []cli.Flag
- func FlagSources(configSource func(key string) cli.ValueSource, envVar, tomlKey string) cli.ValueSourceChain
- func HTML(w http.ResponseWriter, code int, s string) error
- func Handle(fn HandlerFunc) http.HandlerFunc
- func IsLocalhost(host string) bool
- func JSON(w http.ResponseWriter, code int, v any) error
- func Layout(ctx context.Context) string
- func Render(w http.ResponseWriter, r *http.Request, statusCode int, name string, ...) error
- func RenderError(w http.ResponseWriter, r *http.Request, code int, message string)
- func RenderTemplate(w http.ResponseWriter, r *http.Request, statusCode int, name string, ...) errordeprecated
- func RunAppMigrations(ctx context.Context, db *bun.DB, appName string, migrations fs.FS) error
- func TestDB(t *testing.T) *bun.DB
- func TestErrorExecContext(ctx context.Context) context.Context
- func TestErrorExecMiddleware(next http.Handler) http.Handler
- func Text(w http.ResponseWriter, code int, s string) error
- func Validate(v any) error
- func WithAuthChecker(ctx context.Context, checker AuthChecker) context.Context
- func WithContextValue(ctx context.Context, key, val any) context.Context
- func WithLayout(ctx context.Context, name string) context.Context
- func WithNavItems(ctx context.Context, items []NavItem) context.Context
- func WithTemplateExecutor(ctx context.Context, exec TemplateExecutor) context.Context
- type App
- type AppConfig
- type AuthChecker
- type Config
- type Configurable
- type DatabaseConfig
- type FieldError
- type HTTPError
- type HandlerFunc
- type HasAdmin
- type HasCLICommands
- type HasDependencies
- type HasFuncMap
- type HasJobs
- type HasMiddleware
- type HasNavItems
- type HasRequestFuncMap
- type HasRoutes
- type HasShutdown
- type HasStaticFiles
- type HasTemplates
- type HasTranslations
- type I18nConfig
- type JobConfig
- type JobHandlerFunc
- type JobOption
- type Migratable
- type NavItem
- type NavLink
- type PageRequest
- type PageResponse
- type PageResult
- type Queue
- type ReadinessChecker
- type Registry
- func (r *Registry) Add(app App)
- func (r *Registry) AllAdminNavItems() []NavItem
- func (r *Registry) AllCLICommands() []*cli.Command
- func (r *Registry) AllFlags(configSource func(key string) cli.ValueSource) []cli.Flag
- func (r *Registry) AllNavItems() []NavItem
- func (r *Registry) Apps() []App
- func (r *Registry) Configure(cmd *cli.Command) error
- func (r *Registry) Get(name string) (App, bool)
- func (r *Registry) RegisterAll(db *bun.DB) error
- func (r *Registry) RegisterMiddleware(router chi.Router)
- func (r *Registry) RegisterRoutes(router chi.Router)
- func (r *Registry) RunMigrations(ctx context.Context, db *bun.DB) error
- func (r *Registry) Seed(ctx context.Context) error
- func (r *Registry) Shutdown(ctx context.Context) error
- type Seedable
- type Server
- type ServerConfig
- type TLSConfig
- type TemplateExecutor
- type ValidationError
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ApplyOffset ¶
func ApplyOffset(q *bun.SelectQuery, pr PageRequest) *bun.SelectQuery
ApplyOffset applies offset-based pagination to a Bun SelectQuery.
func Bind ¶
Bind parses the request body into the given struct and validates it.
Content-Type dispatch:
- application/json → JSON decoding
- multipart/form-data → multipart parsing + form decoding
- everything else → form-encoded parsing + form decoding
Form decoding uses "form" struct tags (falling back to "json", then field name) and supports all basic types (string, int, bool, float, slices, etc.).
After decoding, Bind calls Validate automatically. If validation fails it returns a *ValidationError with per-field errors. Structs without "validate" tags pass through unchanged.
func ContextValue ¶
ContextValue retrieves a typed value from the context. It is the generic counterpart to WithContextValue, used by contrib app authors to read back app-specific context values with type safety.
func CoreFlags ¶
func CoreFlags(configSource func(key string) cli.ValueSource) []cli.Flag
CoreFlags returns the CLI flags for core framework configuration. If configSource is provided, it is used as an additional value source (e.g. a TOML file sourcer) for each flag.
func FlagSources ¶
func FlagSources(configSource func(key string) cli.ValueSource, envVar, tomlKey string) cli.ValueSourceChain
FlagSources builds a cli.ValueSourceChain from an environment variable and an optional TOML key. If configSource is nil, only the env var is used. This is the standard way for contrib apps to wire up flag sources:
src := burrow.FlagSources(configSource, "MY_ENV_VAR", "app.toml_key")
func HTML ¶
func HTML(w http.ResponseWriter, code int, s string) error
HTML writes an HTML response with the given status code.
func Handle ¶
func Handle(fn HandlerFunc) http.HandlerFunc
Handle converts a HandlerFunc into a standard http.HandlerFunc with centralized error handling.
func IsLocalhost ¶
IsLocalhost checks if the host is a localhost address.
func JSON ¶
func JSON(w http.ResponseWriter, code int, v any) error
JSON writes a JSON response with the given status code.
func Render ¶
func Render(w http.ResponseWriter, r *http.Request, statusCode int, name string, data map[string]any) error
Render executes a named template and writes the result. It applies automatic layout/HTMX logic:
- HTMX request (HX-Request header) → fragment only, no layout
- Normal request + layout name in context → fragment wrapped in layout
- Normal request + no layout → fragment only
func RenderError ¶ added in v0.5.0
RenderError writes an error response. For JSON API requests (Accept: application/json) it returns a JSON object. Otherwise it renders the "error/{code}" template through the standard Render pipeline (with layout wrapping, HTMX support, etc.).
func RunAppMigrations ¶
RunAppMigrations runs all unapplied .up.sql migrations from the given FS for the named app. Migrations are tracked in the _migrations table, namespaced by app name.
func TestDB ¶ added in v0.5.0
TestDB returns an in-memory SQLite database wrapped in a bun.DB. The database is automatically closed when the test finishes.
func TestErrorExecContext ¶ added in v0.5.0
TestErrorExecContext returns a context with a minimal TemplateExecutor that renders error templates as "<code>: <message>". Use this in tests that trigger error responses through Handle or RenderError.
func TestErrorExecMiddleware ¶ added in v0.5.0
TestErrorExecMiddleware is an HTTP middleware that injects TestErrorExecContext into the request context. Use this in tests that need error rendering support.
func Text ¶
func Text(w http.ResponseWriter, code int, s string) error
Text writes a plain text response with the given status code.
func Validate ¶
Validate validates a struct using "validate" struct tags. Returns nil if v is not a struct, has no validate tags, or passes all checks.
func WithAuthChecker ¶ added in v0.4.0
func WithAuthChecker(ctx context.Context, checker AuthChecker) context.Context
WithAuthChecker stores an AuthChecker in the context. This is typically called by auth middleware to make authentication state available to the core template functions without an import cycle.
func WithContextValue ¶
WithContextValue returns a new context with the given key-value pair. This is a convenience wrapper around context.WithValue used primarily by contrib app authors to store app-specific values in the request context. Application developers typically use typed helpers like WithLayout or contrib-specific functions (e.g. csrf.WithToken) instead.
func WithLayout ¶
WithLayout stores the layout template name in the context.
func WithNavItems ¶
WithNavItems stores navigation items in the context.
func WithTemplateExecutor ¶
func WithTemplateExecutor(ctx context.Context, exec TemplateExecutor) context.Context
WithTemplateExecutor stores the template executor in the context.
Types ¶
type App ¶
App is the required interface that all apps must implement. An app has a unique name and a Register method that receives the shared configuration needed to wire into the framework.
type AppConfig ¶
type AppConfig struct {
DB *bun.DB
Registry *Registry
Config *Config
WithLocale func(ctx context.Context, lang string) context.Context
}
AppConfig is passed to each app's Register method, providing access to shared framework resources.
type AuthChecker ¶ added in v0.4.0
AuthChecker provides authentication and authorization checks via closures. This allows the core framework to filter nav items by auth state without importing contrib/auth. Auth apps inject an AuthChecker into the context; the framework reads it when building NavLinks.
type Config ¶
type Config struct {
TLS TLSConfig
Database DatabaseConfig
Server ServerConfig
I18n I18nConfig
}
Config holds core framework configuration.
func (*Config) ResolveBaseURL ¶
ResolveBaseURL computes the base URL from server and TLS config if BaseURL is not explicitly set.
type Configurable ¶
type Configurable interface {
Flags(configSource func(key string) cli.ValueSource) []cli.Flag
Configure(cmd *cli.Command) error
}
Configurable is implemented by apps that define CLI flags and need to read their configuration from the CLI command. The configSource parameter enables TOML file sourcing; it may be nil when only ENV/CLI sources are used.
type DatabaseConfig ¶
type DatabaseConfig struct {
DSN string
}
DatabaseConfig holds database settings.
type FieldError ¶
type FieldError struct {
Field string `json:"field"`
Tag string `json:"tag"`
Param string `json:"param,omitempty"`
Value any `json:"value"`
Message string `json:"message"`
}
FieldError represents a validation failure on a single field.
type HTTPError ¶
HTTPError represents an HTTP error with a status code and message.
func NewHTTPError ¶
NewHTTPError creates a new HTTPError.
type HandlerFunc ¶
type HandlerFunc func(w http.ResponseWriter, r *http.Request) error
HandlerFunc is an HTTP handler that returns an error. Use Handle() to convert it to a standard http.HandlerFunc.
type HasAdmin ¶
HasAdmin is implemented by apps that contribute admin panel routes and navigation items. AdminRoutes receives a chi router already prefixed with /admin and protected by auth middleware.
type HasCLICommands ¶
HasCLICommands is implemented by apps that contribute subcommands.
type HasDependencies ¶
type HasDependencies interface {
Dependencies() []string
}
HasDependencies is implemented by apps that require other apps to be registered first. Dependencies() returns the names of required apps; registration panics if any are missing.
type HasFuncMap ¶
HasFuncMap is implemented by apps that provide static template functions. These are added once at boot time and available in all templates.
type HasJobs ¶
type HasJobs interface {
RegisterJobs(q Queue)
}
HasJobs is implemented by apps that register background job handlers. Called by the Queue implementation during Configure(), before workers start.
type HasMiddleware ¶
HasMiddleware is implemented by apps that contribute HTTP middleware.
type HasNavItems ¶
type HasNavItems interface {
}
HasNavItems is implemented by apps that contribute navigation items.
type HasRequestFuncMap ¶
HasRequestFuncMap is implemented by apps that provide request-scoped template functions (e.g., CSRF tokens, current user, translations). These are added per request via middleware using template.Clone().
type HasShutdown ¶
HasShutdown is implemented by apps that need to perform cleanup during graceful shutdown (e.g., stopping background goroutines, flushing buffers). Called in reverse registration order before the HTTP server stops.
type HasStaticFiles ¶
HasStaticFiles is implemented by apps that contribute static file assets. The returned prefix namespaces the files under the static URL path (e.g., prefix "admin" serves files at /static/admin/...).
type HasTemplates ¶
HasTemplates is implemented by apps that provide HTML template files. The returned fs.FS should contain .html files with {{ define "appname/..." }} blocks. Templates are parsed once at boot time into the global template set.
type HasTranslations ¶
HasTranslations is implemented by apps that contribute translation files. The returned fs.FS must contain a "translations/" directory with TOML files (e.g., "translations/active.en.toml").
type I18nConfig ¶
I18nConfig holds internationalization settings.
type JobConfig ¶
type JobConfig struct {
MaxRetries int
}
JobConfig holds per-handler configuration.
type JobHandlerFunc ¶
JobHandlerFunc is the signature for job handler functions. The context carries a deadline from the worker's shutdown timeout. Payload is the raw JSON bytes that were passed to Enqueue.
type JobOption ¶
type JobOption func(*JobConfig)
JobOption configures job handler registration.
func WithMaxRetries ¶
WithMaxRetries sets the maximum number of retries for a job type.
type Migratable ¶
Migratable is implemented by apps that provide database migrations.
type NavLink ¶ added in v0.4.0
type NavLink struct {
}
NavLink is a template-ready navigation item with pre-computed active state. It is produced by the navLinks template function from the registered NavItems, filtered by the current user's authentication/authorization state.
type PageRequest ¶
type PageRequest struct {
Limit int // items per page (default 20, max 100)
Page int // 1-based page number for offset-based pagination (0 = not used)
}
PageRequest holds pagination parameters parsed from a query string.
func ParsePageRequest ¶
func ParsePageRequest(r *http.Request) PageRequest
ParsePageRequest extracts pagination parameters from the request query string.
func (PageRequest) Offset ¶
func (pr PageRequest) Offset() int
Offset returns the SQL OFFSET for the current page. Page 0 and 1 both return offset 0.
type PageResponse ¶
type PageResponse[T any] struct { Items []T `json:"items"` Pagination PageResult `json:"pagination"` }
PageResponse wraps items with pagination metadata for JSON APIs. Use with OffsetResult to populate the Pagination field:
return burrow.PageResponse[Item]{
Items: items,
Pagination: burrow.OffsetResult(pr, totalCount),
}
type PageResult ¶
type PageResult struct {
HasMore bool `json:"has_more"` // convenience: more pages exist
Page int `json:"page,omitempty"` // current page number (1-based)
TotalPages int `json:"total_pages,omitempty"` // total number of pages
TotalCount int `json:"total_count,omitempty"` // total number of items
}
PageResult holds pagination metadata returned alongside items.
func OffsetResult ¶
func OffsetResult(pr PageRequest, totalCount int) PageResult
OffsetResult builds a PageResult for offset-based pagination.
type Queue ¶
type Queue interface {
Handle(typeName string, fn JobHandlerFunc, opts ...JobOption)
Enqueue(ctx context.Context, typeName string, payload any) (string, error)
EnqueueAt(ctx context.Context, typeName string, payload any, runAt time.Time) (string, error)
Dequeue(ctx context.Context, id string) error
}
Queue provides job handler registration, enqueueing, and cancellation. contrib/jobs provides a SQLite-backed implementation.
type ReadinessChecker ¶ added in v0.4.0
ReadinessChecker is implemented by apps that contribute to the readiness probe. ReadinessCheck returns nil when the app is ready to serve traffic, or an error describing what is not ready.
type Registry ¶
type Registry struct {
// contains filtered or unexported fields
}
Registry holds registered apps in insertion order and provides methods to collect capabilities (routes, middleware, flags, etc.) from all apps. Application code typically does not interact with Registry directly — Server manages it internally. Contrib app authors may use Registry.Get to look up sibling apps during Register.
func (*Registry) Add ¶
Add registers an app. It panics if an app with the same name has already been registered or if a declared dependency is missing (programming errors caught at startup).
func (*Registry) AllAdminNavItems ¶
AllAdminNavItems collects AdminNavItems from all HasAdmin apps and returns them sorted by Position (stable sort preserves insertion order for equal positions).
func (*Registry) AllCLICommands ¶
AllCLICommands collects CLI subcommands from all HasCLICommands apps.
func (*Registry) AllFlags ¶
AllFlags collects CLI flags from all Configurable apps. Pass configSource to enable TOML file sourcing (or nil for ENV-only).
func (*Registry) AllNavItems ¶
AllNavItems collects NavItems from all HasNavItems apps and returns them sorted by Position (stable sort preserves insertion order for equal positions).
func (*Registry) Configure ¶
Configure calls Configure on each Configurable app. It stops and returns on the first error.
func (*Registry) RegisterAll ¶
RegisterAll calls Register on each app in order, passing a partial AppConfig (DB + Registry only, no Config/migrations/seeds). This is a test convenience; the real boot sequence lives in Server.bootstrap().
func (*Registry) RegisterMiddleware ¶
RegisterMiddleware applies middleware from all HasMiddleware apps to the chi router, in app registration order.
func (*Registry) RegisterRoutes ¶
RegisterRoutes calls Routes on each HasRoutes app, allowing apps to register their HTTP handlers.
func (*Registry) RunMigrations ¶
RunMigrations runs migrations for all Migratable apps in registration order.
type Server ¶
type Server struct {
// contains filtered or unexported fields
}
Server is the main framework entry point that orchestrates the full application lifecycle. Typical usage:
- Create with NewServer (registers apps, sorts by dependencies)
- Configure the layout with Server.SetLayout
- Collect CLI flags with Server.Flags
- Start with Server.Run (opens DB, migrates, bootstraps, serves HTTP)
func NewServer ¶
NewServer creates a Server and registers the given apps. Apps are automatically sorted so that dependencies are registered before the apps that need them. The relative order of independent apps is preserved. NewServer panics if a dependency is missing from the input or if there is a dependency cycle.
func (*Server) Flags ¶
Flags returns all CLI flags: core framework flags merged with flags from all Configurable apps. Pass a configSource to enable TOML file sourcing (or nil for ENV-only).
type ServerConfig ¶
type ServerConfig struct {
Host string
BaseURL string
PIDFile string
Port int
MaxBodySize int // in MB
ShutdownTimeout int // in seconds
}
ServerConfig holds HTTP server settings.
type TLSConfig ¶
type TLSConfig struct {
Mode string // auto, acme, selfsigned, manual, off
CertDir string
Email string
CertFile string
KeyFile string
}
TLSConfig holds TLS settings.
type TemplateExecutor ¶
type TemplateExecutor func(r *http.Request, name string, data map[string]any) (template.HTML, error)
TemplateExecutor executes a named template with the given data and returns the rendered HTML. It is stored in the request context by the template middleware and used by RenderTemplate.
func TemplateExec ¶ added in v0.5.0
func TemplateExec(ctx context.Context) TemplateExecutor
TemplateExec retrieves the template executor from the context.
func TemplateExecutorFromContext ¶
func TemplateExecutorFromContext(ctx context.Context) TemplateExecutor
TemplateExecutorFromContext is a deprecated alias for TemplateExec.
type ValidationError ¶
type ValidationError struct {
Errors []FieldError
}
ValidationError is returned by Bind()/Validate() when validation fails.
func (*ValidationError) Error ¶
func (e *ValidationError) Error() string
func (*ValidationError) HasField ¶
func (e *ValidationError) HasField(name string) bool
HasField reports whether the validation error contains a failure for the named field.
func (*ValidationError) Translate ¶
func (e *ValidationError) Translate(ctx context.Context, translateData func(context.Context, string, map[string]any) string)
Translate translates field error messages using the given translation function. The translateData function receives a key and template data, and returns the translated string. Typically called with i18n.TData:
ve.Translate(ctx, i18n.TData)
Source Files
¶
Directories
¶
| Path | Synopsis |
|---|---|
|
contrib
|
|
|
admin
Package admin provides the admin panel coordinator as a burrow contrib app.
|
Package admin provides the admin panel coordinator as a burrow contrib app. |
|
admin/modeladmin
Package modeladmin provides a generic, Django-style ModelAdmin for auto-generating CRUD admin views from Bun models.
|
Package modeladmin provides a generic, Django-style ModelAdmin for auto-generating CRUD admin views from Bun models. |
|
admin/modeladmin/templates
Package templates provides the default HTML template renderer for modeladmin CRUD views.
|
Package templates provides the default HTML template renderer for modeladmin CRUD views. |
|
auth
Package auth provides authentication as a burrow contrib app.
|
Package auth provides authentication as a burrow contrib app. |
|
auth/authtest
Package authtest provides test helpers for creating auth-migrated databases and test users, following the convention of net/http/httptest.
|
Package authtest provides test helpers for creating auth-migrated databases and test users, following the convention of net/http/httptest. |
|
authmail
Package authmail defines the Renderer interface for auth email templates.
|
Package authmail defines the Renderer interface for auth email templates. |
|
authmail/smtpmail
Package smtpmail provides an SMTP-based implementation of auth.EmailService with pluggable email templates via authmail.Renderer.
|
Package smtpmail provides an SMTP-based implementation of auth.EmailService with pluggable email templates via authmail.Renderer. |
|
bootstrap
Package bootstrap provides a design system contrib app using Bootstrap 5, Bootstrap Icons, and htmx.
|
Package bootstrap provides a design system contrib app using Bootstrap 5, Bootstrap Icons, and htmx. |
|
bsicons
Package bsicons provides all Bootstrap Icons as inline SVG template.HTML values.
|
Package bsicons provides all Bootstrap Icons as inline SVG template.HTML values. |
|
bsicons/internal/generate
command
Command generate reads Bootstrap Icons SVG files and outputs a Go source file containing the icon data and named accessor functions.
|
Command generate reads Bootstrap Icons SVG files and outputs a Go source file containing the icon data and named accessor functions. |
|
csrf
Package csrf provides CSRF protection as a burrow contrib app.
|
Package csrf provides CSRF protection as a burrow contrib app. |
|
healthcheck
Package healthcheck provides liveness and readiness probes for burrow.
|
Package healthcheck provides liveness and readiness probes for burrow. |
|
htmx
Package htmx provides request detection and response helpers for htmx, inspired by django-htmx.
|
Package htmx provides request detection and response helpers for htmx, inspired by django-htmx. |
|
jobs
Package jobs provides an in-process, SQLite-backed background job queue as a burrow contrib app.
|
Package jobs provides an in-process, SQLite-backed background job queue as a burrow contrib app. |
|
messages
Package messages provides flash message support as a burrow contrib app.
|
Package messages provides flash message support as a burrow contrib app. |
|
ratelimit
Package ratelimit provides per-client rate limiting as a burrow contrib app.
|
Package ratelimit provides per-client rate limiting as a burrow contrib app. |
|
secure
Package secure provides security response headers as a burrow contrib app.
|
Package secure provides security response headers as a burrow contrib app. |
|
session
Package session provides cookie-based session management as a burrow contrib app.
|
Package session provides cookie-based session management as a burrow contrib app. |
|
staticfiles
Package staticfiles provides static file serving as a burrow contrib app.
|
Package staticfiles provides static file serving as a burrow contrib app. |
|
uploads
Package uploads provides file upload storage as a burrow contrib app.
|
Package uploads provides file upload storage as a burrow contrib app. |
|
example
|
|
|
hello
command
Command hello is a minimal burrow application that serves a single "Hello, World!" page with Bootstrap styling and i18n support.
|
Command hello is a minimal burrow application that serves a single "Hello, World!" page with Bootstrap styling and i18n support. |
|
notes/cmd/server
command
Command server demonstrates how to build an application using the burrow framework with contrib apps.
|
Command server demonstrates how to build an application using the burrow framework with contrib apps. |
|
notes/internal/notes
Package notes is an example custom app demonstrating the burrow framework.
|
Package notes is an example custom app demonstrating the burrow framework. |
|
notes/internal/pages
Package pages provides the example app's static pages (homepage), layout rendering, and icon template functions.
|
Package pages provides the example app's static pages (homepage), layout rendering, and icon template functions. |
|
Package forms provides Django-style form structs for creation, binding, validation, and field metadata extraction.
|
Package forms provides Django-style form structs for creation, binding, validation, and field metadata extraction. |
|
Package i18n provides internationalization as core framework infrastructure.
|
Package i18n provides internationalization as core framework infrastructure. |
|
internal
|
|
|
cryptokey
Package cryptokey provides shared utilities for resolving and decoding hex-encoded 32-byte cryptographic keys used by contrib apps (csrf, session).
|
Package cryptokey provides shared utilities for resolving and decoding hex-encoded 32-byte cryptographic keys used by contrib apps (csrf, session). |