March Docs

API Reference

74 modules

Auth

lib/auth_middleware.march — Session-based authentication for Bastion.

8 functions0 types

Bastion

Bastion — a plug-style HTTP web framework for March.

7 functions1 types

Bastion.Channel

lib/channel.march — Bastion.Channel: connection type and helpers for channel handlers.

8 functions1 types

Bastion.ChannelServer

lib/channel_server.march — WebSocket server for Bastion Channels.

4 functions2 types

Bastion.Cmd

lib/cmd.march — Bastion.Cmd: typed commands from island update functions.

16 functions1 types

Bastion.Dev

lib/dev.march — Bastion.Dev: development-only tools.

7 functions0 types

Bastion.ErrorOverlay

Bastion.ErrorOverlay — dev-mode error overlay.

4 functions0 types

Bastion.Health

lib/health.march — Bastion.Health: built-in health check endpoint.

5 functions1 types

Bastion.Idempotency

lib/idempotency.march — Bastion.Idempotency: idempotency-key middleware.

8 functions1 types

Bastion.IslandServer

lib/island_server.march — Bastion.IslandServer: server-push helpers for islands.

4 functions0 types

Bastion.JS

lib/js.march — Bastion.JS: WASM → JavaScript FFI interface.

17 functions3 types

Bastion.Logger

lib/logger.march — Bastion.Logger

9 functions0 types

Bastion.Metrics

lib/metrics.march — Bastion.Metrics: lightweight request metrics.

7 functions2 types

Bastion.OpenTelemetry

lib/otel.march — Bastion.OpenTelemetry: OTLP HTTP/JSON span exporter.

3 functions1 types

Bastion.PubSub

lib/pubsub.march — In-process publish/subscribe for Bastion.

7 functions0 types

Bastion.Session

Session — cookie-backed session storage for Bastion.

8 functions0 types

Bastion.Telemetry

lib/telemetry.march — Bastion.Telemetry: structured event hooks.

7 functions0 types

Bastion.Telemetry.Aggregator

lib/telemetry_aggregator.march — Bastion.Telemetry.Aggregator

5 functions4 types

Bastion.Upload

lib/upload.march — Bastion.Upload: multipart form-data upload parsing.

4 functions4 types

BastionCSP

BastionCSP: Content Security Policy nonce injection for Bastion web apps.

8 functions0 types

BastionServer

BastionServer — convenience wrappers for starting a Bastion HTTP server.

4 functions0 types

CSRF

CSRF module: Cross-Site Request Forgery protection for Bastion web apps.

8 functions0 types

Cache

lib/cache.march — Cache

8 functions0 types

CmdDepot

lib/cmd_depot.march — Bastion stub for CmdDepot (migration runner)

4 functions0 types

Conn

Bastion.Conn — higher-level helpers for the HttpServer.Conn type.

24 functions0 types

ConnStates

Bastion.ConnStates — phantom type state tags for the typed middleware pipeline.

10 functions8 types

Controller

Bastion.Controller — structured request handling with automatic error recovery.

8 functions1 types

Cors

lib/cors.march — Cors

4 functions1 types

Crypto

lib/crypto.march — Cryptographic primitives for Bastion.

15 functions0 types

Css

Css — inline style helpers for Bastion templates.

1 functions0 types

Depot.Middleware

lib/depot_middleware.march — Depot (PostgreSQL) pool integration for Bastion.

5 functions0 types

ErrorView

Bastion.ErrorView — default HTML error page rendering.

4 functions0 types

FallbackController

Bastion.FallbackController — catch-all error handler for controller actions.

3 functions0 types

Flash

Flash — one-time UI messages persisted in the session across redirects.

6 functions0 types

Forge.Assets

Forge.Assets — forge assets build / deploy / watch

4 functions0 types

Forge.BuildIslands

Forge.BuildIslands — forge bastion.build.islands

4 functions0 types

Forge.Console

Forge.Console — forge bastion.console

2 functions1 types

Forge.DepotMigrate

lib/forge/depot_migrate.march — forge bastion.depot.migrate

1 functions0 types

Forge.DepotMigrations

lib/forge/depot_migrations.march — forge bastion.depot.migrations

1 functions0 types

Forge.DepotReset

lib/forge/depot_reset.march — forge bastion.depot.reset

1 functions0 types

Forge.DepotRollback

lib/forge/depot_rollback.march — forge bastion.depot.rollback

1 functions0 types

Forge.GenAuth

Forge.GenAuth — forge bastion gen auth

57 functions0 types

Forge.GenChannel

Forge.GenChannel — forge bastion.gen.channel <Name>

2 functions0 types

Forge.GenContext

Forge.GenContext — forge bastion.gen.context <Context> <Schema> <table> [field:type ...]

14 functions0 types

Forge.GenHandler

Forge.GenHandler — forge bastion.gen.handler <Name> [action ...]

2 functions0 types

Forge.GenIsland

Forge.GenIsland — forge bastion.gen.island <Name>

2 functions0 types

Forge.GenMigration

Forge.GenMigration — forge bastion.gen.migration <name>

2 functions0 types

Forge.GenSchema

Forge.GenSchema — forge bastion gen schema/json/context

22 functions0 types

Forge.Lower

Forge.Lower — bastion lower CLI subcommand.

4 functions5 types

Forge.New

Forge.New — forge bastion new <name>

2 functions0 types

Forge.Project

Forge.Project — load and represent a Bastion project

1 functions2 types

Forge.Release

lib/forge/release.march — forge bastion.release

2 functions0 types

Forge.Routes

Forge.Routes — forge bastion routes

3 functions1 types

Forge.Scaffold

Forge.Scaffold — forge bastion new <name>

1 functions0 types

Forge.Server

Forge.Server — forge bastion server

2 functions0 types

Form

Form — HTML form rendering helpers and ~H template components.

6 functions0 types

Gate

Gate — changeset-style form validation for Bastion.

17 functions3 types

Hkdf

lib/hkdf.march — HKDF-SHA256 (RFC 5869) key derivation.

3 functions0 types

Html

Html — HTML safety primitives for Bastion templates.

8 functions0 types

IslandAssets

IslandAssets — serves the island client runtime and compiled WASM bundles.

10 functions1 types

IslandCss

Bastion.IslandCss — scoped CSS for WASM islands.

4 functions0 types

IslandSocket

IslandSocket — WebSocket transport for server-side island state management.

19 functions5 types

IslandView

IslandView — template helpers for embedding islands in server-rendered HTML.

17 functions0 types

Islands

Islands — hydration wrappers, registry, and dataflow helpers for Bastion WASM islands.

43 functions7 types

Middleware

Bastion.Middleware — plug-style middleware pipeline composition.

9 functions0 types

RateLimit

lib/rate_limit.march — Sliding window rate limiter for Bastion.

4 functions0 types

Registry

lib/registry.march — Registry

3 functions0 types

Request

Bastion.Request — request inspection and parsing helpers.

12 functions0 types

Response

Bastion.Response — response-building helpers.

20 functions0 types

Router

Bastion.Router — declarative, pattern-matched HTTP routing.

11 functions3 types

SecurityHeaders

lib/security_headers.march — SecurityHeaders

7 functions0 types

Static

Bastion.Static — static file serving middleware and asset tag helpers.

10 functions1 types

Test

Test module: lightweight assertion helpers for in-process testing.

10 functions0 types

TypedMiddleware

Bastion.TypedMiddleware — typed middleware pipeline for Bastion.

19 functions0 types