Documentation
¶
Overview ¶
Package vukem is a full-stack web framework for Go inspired by Laravel and AdonisJS, built on net/http and the standard library.
Vukem is in its prototype phase; see PLAN.md for the roadmap.
Index ¶
- Constants
- func APIMiddleware(app *App, r *router.Router) error
- func DefaultMiddleware(app *App, r *router.Router) error
- func Main(build BuildFunc) int
- func RunMain(ctx context.Context, args []string, getenv func(string) (string, bool), ...) error
- func ServeOpenAPI(app *App, r *router.Router, path string) *router.Route
- type App
- func (a *App) AddCommand(cmds ...Command)
- func (a *App) AddHealthCheck(name string, check HealthCheck)
- func (a *App) AddRunner(name string, r Runner)
- func (a *App) Addr() string
- func (a *App) Boot(ctx context.Context) error
- func (a *App) Cache() (*cache.Cache, error)
- func (a *App) Commands() []Command
- func (a *App) DB() (*database.DB, error)
- func (a *App) Handler() (http.Handler, error)
- func (a *App) Mailer() (*mail.Mailer, error)
- func (a *App) Migrator() (*schema.Migrator, error)
- func (a *App) Now() time.Time
- func (a *App) OnShutdown(fn func(context.Context) error)
- func (a *App) OpenAPI() (*openapi.Document, error)
- func (a *App) Run(ctx context.Context) error
- func (a *App) Seed(ctx context.Context) error
- func (a *App) Sessions() (*session.Manager, error)
- func (a *App) SetSessionStore(store session.Store)
- func (a *App) Shutdown(ctx context.Context) error
- type Booter
- type BuildFunc
- type CacheConfig
- type Command
- type CommandFunc
- type Config
- type DatabaseConfig
- type HTTPServer
- type HealthCheck
- type Kind
- type KindFilter
- type MailConfig
- type Option
- func WithClock(now func() time.Time) Option
- func WithDatabaseDrivers(drivers ...database.Driver) Option
- func WithEnv(fsys fs.FS, getenv func(string) (string, bool)) Option
- func WithKind(k Kind) Option
- func WithListeners(regs ...events.Registration) Option
- func WithLogOutput(w io.Writer) Option
- func WithLogger(l *slog.Logger) Option
- func WithMailTransport(t mail.Transport) Option
- func WithMigrations(migrations []schema.Migration) Option
- func WithProviders(p ...Provider) Option
- func WithReady(ch chan<- string) Option
- func WithRoutes(fn func(r *router.Router, app *App) error) Option
- func WithRunner(name string, r Runner) Option
- func WithSeeders(seeders ...Seeder) Option
- func WithSource(src *config.Source) Option
- func WithStdout(w io.Writer) Option
- func WithViews(fsys fs.FS) Option
- func WithoutHTTP() Option
- type Provider
- type ProviderFunc
- type Runner
- type RunnerFunc
- type Seeder
- type SeederFunc
- type SessionConfig
- type Shutdowner
- type TelegramConfig
Constants ¶
const ( DefaultReadHeaderTimeout = 10 * time.Second DefaultReadTimeout = 30 * time.Second DefaultWriteTimeout = 60 * time.Second DefaultIdleTimeout = 120 * time.Second DefaultMaxHeaderBytes = 1 << 20 )
Server timeouts applied by NewHTTPServer. Zero timeouts are never used (Slowloris protection, docs/security.md A02).
Variables ¶
This section is empty.
Functions ¶
func APIMiddleware ¶ added in v0.10.0
APIMiddleware installs the stack of JSON-only apps: recover, request id, logging and security headers on the server; the body limit on routes. There are no sessions or CSRF: API clients authenticate with tokens (see auth.TokenGuard), and CORS is configured by the routes.
func DefaultMiddleware ¶
DefaultMiddleware installs Vukem's recommended stacks on r:
- server: Recover, RequestID, Logger, SecureHeaders, MethodOverride;
- router: BodyLimit(10 MiB), sessions, CSRF (CrossOriginProtection, trusted origins from CSRF_TRUSTED_ORIGINS).
It returns configuration errors (insecure production cookies, bad origins) so they fail at boot. Starters call it from bootstrap.
func Main ¶
Main runs the application from os.Args and the process environment and returns the exit code. Use it as: func main() { os.Exit(vukem.Main(bootstrap.New)) }.
func RunMain ¶
func RunMain(ctx context.Context, args []string, getenv func(string) (string, bool), build BuildFunc, opts ...Option, ) error
RunMain is the testable body of main: it builds the app with the given environment and runs the command in args (default "serve").
func ServeOpenAPI ¶ added in v0.15.0
ServeOpenAPI registers GET path (e.g. "/openapi.json") serving the document. In production it registers nothing (and returns nil) unless OPENAPI_IN_PRODUCTION=true: the document maps the whole API surface.
Types ¶
type App ¶
type App struct {
// Config is the core configuration.
Config Config
// Source gives access to every configuration value (for module configs).
Source *config.Source
// Key is the decoded APP_KEY; derive purpose-specific keys from it.
Key config.Key
// Log is the application logger.
Log *slog.Logger
// Kind is the runtime kind (web, console, test).
Kind Kind
// Router holds the HTTP routes; /up is registered by default.
Router *router.Router
// Views renders templates when WithViews was given (nil otherwise).
Views *view.Engine
// Telegram is the Telegram log handler when TELEGRAM_* is set (nil
// otherwise); use it for Contact and Send.
Telegram *telegram.Handler
// Events is the application event bus (WithListeners registers listeners).
Events *events.Bus
// contains filtered or unexported fields
}
App is a Vukem application: configuration, logger, providers and the long-running runners (HTTP server, workers). Services added by providers live in typed fields of the structs that embed or reference the App.
func New ¶
New builds an App: it loads and validates configuration and registers providers. It refuses insecure configuration (see docs/security.md, A02).
func (*App) AddCommand ¶
AddCommand registers commands. Call it from a provider's Register.
func (*App) AddHealthCheck ¶
func (a *App) AddHealthCheck(name string, check HealthCheck)
AddHealthCheck registers a check reported by GET /up?checks=1.
func (*App) Cache ¶ added in v0.11.0
Cache returns the application cache, built from CACHE_* on first use. The database store creates its table if needed.
func (*App) DB ¶
DB opens the default database from DATABASE_URL on first use, adds a "db" health check and closes it on shutdown.
func (*App) Mailer ¶ added in v0.7.0
Mailer returns the app mailer, built from MAIL_* on first use. Views come from the app's view engine (WithViews).
func (*App) OnShutdown ¶
OnShutdown registers fn to run during Shutdown, in reverse registration order, after runners stop and before providers shut down.
func (*App) OpenAPI ¶ added in v0.15.0
OpenAPI returns the OpenAPI 3.1 document of the app's routes (title APP_NAME, version API_VERSION, filtered by OPENAPI_PREFIX).
func (*App) Run ¶
Run boots the app, starts every runner and blocks until ctx is cancelled or a runner fails; then it shuts everything down gracefully within SHUTDOWN_TIMEOUT. A cancelled ctx is a clean exit (nil error).
func (*App) Seed ¶ added in v0.4.0
Seed runs every registered seeder in order; the first error stops it.
func (*App) Sessions ¶
Sessions returns the session manager, building it from SESSION_* on first use. Use SetSessionStore before the first call to change the store.
func (*App) SetSessionStore ¶
SetSessionStore makes sessions server-side with store (call it from a provider's Register, before Sessions is first used).
type Booter ¶
Booter is implemented by providers that need a boot phase. Boot runs after every provider registered.
type CacheConfig ¶ added in v0.11.0
type CacheConfig struct {
// Store is "memory" (default) or "database" (table CACHE_TABLE).
Store string `env:"CACHE_STORE" default:"memory"`
Prefix string `env:"CACHE_PREFIX" default:"vukem:"`
Table string `env:"CACHE_TABLE" default:"cache"`
// MaxEntries bounds the memory store.
MaxEntries int `env:"CACHE_MAX_ENTRIES" default:"10000"`
}
CacheConfig is read from CACHE_* variables.
type Command ¶
type Command interface {
// Name is "namespace:action", e.g. "reports:send".
Name() string
// Description is shown by "list".
Description() string
// Flags defines flags on fs; it may be a no-op.
Flags(fs *flag.FlagSet)
// Run executes the command with the remaining positional args.
Run(ctx context.Context, app *App, args []string) error
}
Command is an application command compiled into the app binary (migrate, queue:work, user commands). The global `vukem` CLI delegates unknown commands to the app binary.
type CommandFunc ¶
type CommandFunc struct {
CommandName string
Desc string
DefineFlags func(fs *flag.FlagSet)
Fn func(ctx context.Context, app *App, args []string) error
}
CommandFunc builds a Command from a function.
func (CommandFunc) Description ¶
func (c CommandFunc) Description() string
Description implements Command.
type Config ¶
type Config struct {
Name string `env:"APP_NAME" default:"Vukem"`
Env config.Env `env:"APP_ENV" default:"development"`
Debug bool `env:"APP_DEBUG"`
URL string `env:"APP_URL" default:"http://localhost:3000"`
Key config.Secret `env:"APP_KEY"`
Host string `env:"HOST" default:"localhost"`
Port int `env:"PORT" default:"3000"`
ShutdownTimeout time.Duration `env:"SHUTDOWN_TIMEOUT" default:"15s"`
LogLevel string `env:"LOG_LEVEL" default:"info"`
LogFormat string `env:"LOG_FORMAT"`
// APIVersion is info.version of the OpenAPI document.
APIVersion string `env:"API_VERSION" default:"1.0.0"`
// OpenAPIPrefix keeps only routes under it in the document (e.g. /api).
OpenAPIPrefix string `env:"OPENAPI_PREFIX"`
// OpenAPIInProduction serves /openapi.json in production too.
OpenAPIInProduction bool `env:"OPENAPI_IN_PRODUCTION"`
}
Config is the core application configuration, loaded from the environment.
func (*Config) IsProduction ¶
IsProduction reports whether APP_ENV is production.
type DatabaseConfig ¶
type DatabaseConfig struct {
URL string `env:"DATABASE_URL" default:"file:storage/database.sqlite"`
MaxOpen int `env:"DB_MAX_OPEN" default:"10"`
MaxIdle int `env:"DB_MAX_IDLE" default:"5"`
}
DatabaseConfig is loaded from DB_* variables.
type HTTPServer ¶
type HTTPServer struct {
Server *http.Server
// ShutdownTimeout bounds the graceful drain of in-flight requests.
ShutdownTimeout time.Duration
// Listener, when set, is used instead of listening on Server.Addr.
Listener net.Listener
// Ready, when set, receives the bound address once listening.
Ready chan<- string
}
HTTPServer runs an *http.Server as a Runner with graceful shutdown.
func NewHTTPServer ¶
func NewHTTPServer(addr string, handler http.Handler) *HTTPServer
NewHTTPServer returns an HTTPServer for handler on addr with secure timeouts.
type HealthCheck ¶
HealthCheck reports whether a dependency (database, cache...) is healthy.
type Kind ¶
type Kind string
Kind is the runtime in which the application is running. Providers can be limited to some kinds (see KindFilter).
type KindFilter ¶
type KindFilter interface {
Kinds() []Kind
}
KindFilter limits a provider to some runtime kinds. Providers that do not implement it run everywhere.
type MailConfig ¶ added in v0.7.0
type MailConfig struct {
// Mailer is "smtp", "resend", "log" or "array" (tests). Production
// must choose explicitly; elsewhere it defaults to "log".
Mailer string `env:"MAIL_MAILER"`
From string `env:"MAIL_FROM" default:"Vukem <hello@example.com>"`
SMTPHost string `env:"SMTP_HOST" default:"localhost"`
SMTPPort int `env:"SMTP_PORT" default:"587"`
SMTPUsername string `env:"SMTP_USERNAME"`
SMTPPassword config.Secret `env:"SMTP_PASSWORD"`
// SMTPInsecure allows servers without STARTTLS (local catchers only).
SMTPInsecure bool `env:"SMTP_INSECURE"`
ResendAPIKey config.Secret `env:"RESEND_API_KEY"`
}
MailConfig is read from MAIL_* (and SMTP_* / RESEND_*) variables.
type Option ¶
type Option func(*options) error
Option configures New.
func WithClock ¶
WithClock sets the clock used by sessions and other time-based features (tests use vukemtest.FakeClock).
func WithDatabaseDrivers ¶
WithDatabaseDrivers makes extra drivers (e.g. postgres.Driver()) available to DB().
func WithListeners ¶ added in v0.11.0
func WithListeners(regs ...events.Registration) Option
WithListeners registers event listeners on App.Events (generated apps pass listeners.All(); vukem make:listener appends there).
func WithLogOutput ¶
WithLogOutput sets where the default logger writes (stderr by default).
func WithLogger ¶
WithLogger sets the logger instead of building one from configuration.
func WithMailTransport ¶ added in v0.7.0
WithMailTransport replaces the transport chosen by MAIL_MAILER.
func WithMigrations ¶
WithMigrations registers the application's migrations used by the migrate commands (migrate, migrate:rollback, migrate:reset, migrate:fresh, migrate:status).
func WithProviders ¶
WithProviders appends providers, registered and booted in order.
func WithRoutes ¶
WithRoutes registers routes (and router middleware) after providers registered, so handlers can use the services they added. An error stops New.
func WithRunner ¶
WithRunner adds a long-running component started by Run.
func WithSeeders ¶ added in v0.4.0
WithSeeders registers the seeders run by `db:seed` (generated apps pass seeders.All()).
func WithSource ¶
WithSource uses an already resolved configuration source.
func WithStdout ¶
WithStdout sets where commands print (os.Stdout by default).
func WithViews ¶
WithViews renders html/template views from fsys (os.DirFS("resources/views") or an embed.FS). Views reload on every request outside production.
func WithoutHTTP ¶
func WithoutHTTP() Option
WithoutHTTP disables the HTTP server runner (workers-only processes).
type Provider ¶
Provider registers services into the App. Register must not perform I/O; use Boot for work that needs other services.
type ProviderFunc ¶
ProviderFunc adapts a function to a Provider with only a Register phase.
type Runner ¶
Runner is a long-running component (HTTP server, queue worker, scheduler). Run blocks until ctx is done or the runner fails, and must return after releasing its resources.
type RunnerFunc ¶
RunnerFunc adapts a function to a Runner.
type Seeder ¶ added in v0.4.0
Seeder fills the database with data (demo content, reference tables). `vukem db:seed` runs every seeder given to WithSeeders, in order.
type SeederFunc ¶ added in v0.4.0
SeederFunc adapts a function to Seeder.
type SessionConfig ¶
type SessionConfig struct {
// Driver is "cookie" (encrypted cookie, default) or "memory"; the
// database driver is installed by the database provider.
Driver string `env:"SESSION_DRIVER" default:"cookie"`
Lifetime time.Duration `env:"SESSION_LIFETIME" default:"24h"`
IdleTimeout time.Duration `env:"SESSION_IDLE_TIMEOUT" default:"2h"`
CookieName string `env:"SESSION_COOKIE" default:"vukem_session"`
// Secure defaults to true in production or when APP_URL is https.
Secure string `env:"SESSION_SECURE" default:"auto"`
}
SessionConfig is loaded from SESSION_* variables.
type Shutdowner ¶
Shutdowner is implemented by providers that release resources. Shutdown runs in reverse provider order.
type TelegramConfig ¶ added in v0.12.0
type TelegramConfig struct {
BotToken config.Secret `env:"TELEGRAM_BOT_TOKEN"`
ChatID string `env:"TELEGRAM_CHAT_ID"`
// MinLevel is debug, info, warn or error (default error).
MinLevel string `env:"TELEGRAM_MIN_LEVEL" default:"error"`
ThreadID int `env:"TELEGRAM_THREAD_ID"`
}
TelegramConfig is read from TELEGRAM_* variables.
Source Files
¶
Directories
¶
| Path | Synopsis |
|---|---|
|
Package api holds REST helpers on top of web and orm: resource transformers, pagination envelopes, allowlisted query conventions (filter, sort, fields, include, pagination) and deprecation headers.
|
Package api holds REST helpers on top of web and orm: resource transformers, pagination envelopes, allowlisted query conventions (filter, sort, fields, include, pagination) and deprecation headers. |
|
Package apidocs serves an API reference for the app's OpenAPI document with Scalar (https://scalar.com).
|
Package apidocs serves an API reference for the app's OpenAPI document with Scalar (https://scalar.com). |
|
Package auth authenticates requests: guards (session for browsers, access tokens for APIs), user providers, middleware and password hashing (auth/hash).
|
Package auth authenticates requests: guards (session for browsers, access tokens for APIs), user providers, middleware and password hashing (auth/hash). |
|
hash
Package hash hashes and verifies passwords: argon2id by default (PHC string format), bcrypt for compatibility.
|
Package hash hashes and verifies passwords: argon2id by default (PHC string format), bcrypt for compatibility. |
|
Package authz decides what an authenticated user may do: gates (named abilities) and policies (abilities on a model type).
|
Package authz decides what an authenticated user may do: gates (named abilities) and policies (abilities on a model type). |
|
Package cache stores values with a TTL behind a Store (memory, database; Redis in drivers/redis).
|
Package cache stores values with a TTL behind a Store (memory, database; Redis in drivers/redis). |
|
cachetest
Package cachetest is the conformance suite every cache.Store passes (memory and database in core, Redis in drivers/redis).
|
Package cachetest is the conformance suite every cache.Store passes (memory and database in core, Redis in drivers/redis). |
|
cmd
|
|
|
vukem
command
Command vukem is the Vukem CLI: generators, the dev server, builds and delegation of app commands to the project's binary.
|
Command vukem is the Vukem CLI: generators, the dev server, builds and delegation of app commands to the project's binary. |
|
Package config loads typed application configuration from environment variables and .env files.
|
Package config loads typed application configuration from environment variables and .env files. |
|
contrib
|
|
|
graphql
module
|
|
|
grpc
module
|
|
|
imaging
module
|
|
|
stripe
module
|
|
|
Package csrf protects state-changing requests from cross-site request forgery using Go's http.CrossOriginProtection (Fetch Metadata and Origin checks, no tokens needed in modern browsers), with an optional session-token fallback for clients that send neither header.
|
Package csrf protects state-changing requests from cross-site request forgery using Go's http.CrossOriginProtection (Fetch Metadata and Origin checks, no tokens needed in modern browsers), with an optional session-token fallback for clients that send neither header. |
|
Package database manages SQL connections for Vukem: dialects, SQLite defaults (WAL, busy timeout, foreign keys, a single-connection writer pool beside a reader pool), PostgreSQL through driver modules, and transactions that roll back on error or panic.
|
Package database manages SQL connections for Vukem: dialects, SQLite defaults (WAL, busy timeout, foreign keys, a single-connection writer pool beside a reader pool), PostgreSQL through driver modules, and transactions that roll back on error or panic. |
|
dbtest
Package dbtest is the database conformance suite: the same schema, ORM, transaction and migration checks run against every dialect (SQLite in core, Postgres and others in their driver modules).
|
Package dbtest is the database conformance suite: the same schema, ORM, transaction and migration checks run against every dialect (SQLite in core, Postgres and others in their driver modules). |
|
drivers
|
|
|
mongo
module
|
|
|
mysql
module
|
|
|
otel
module
|
|
|
postgres
module
|
|
|
redis
module
|
|
|
s3
module
|
|
|
websocket
module
|
|
|
Package errs defines the error values handlers return.
|
Package errs defines the error values handlers return. |
|
Package events dispatches typed events to listeners registered by type.
|
Package events dispatches typed events to listeners registered by type. |
|
Package factory builds models with fake data for tests and seeders:
|
Package factory builds models with fake data for tests and seeders: |
|
Package htmx provides helpers for htmx 4: reading htmx request headers, building response headers, and rendering <hx-partial> and out-of-band fragments.
|
Package htmx provides helpers for htmx 4: reading htmx request headers, building response headers, and rendering <hx-partial> and out-of-band fragments. |
|
Package httpclient builds outbound HTTP clients for URLs that users control (webhooks, link previews, avatars by URL).
|
Package httpclient builds outbound HTTP clients for URLs that users control (webhooks, link previews, avatars by URL). |
|
internal
|
|
|
cli
Package cli implements the global `vukem` command: project scaffolding, generators, the dev server and delegation of app commands to the project's own binary (cmd/app).
|
Package cli implements the global `vukem` command: project scaffolding, generators, the dev server and delegation of app commands to the project's own binary (cmd/app). |
|
codemod
Package codemod edits Go source the way a developer would: it appends an element to the slice literal returned by a known function and adds the imports it needs.
|
Package codemod edits Go source the way a developer would: it appends an element to the slice literal returned by a known function and adds the imports it needs. |
|
naming
Package naming converts identifiers between Go and database/file conventions.
|
Package naming converts identifiers between Go and database/file conventions. |
|
tools/commitlint
command
Command commitlint validates a commit message file against Conventional Commits 1.0.
|
Command commitlint validates a commit message file against Conventional Commits 1.0. |
|
tools/release
command
Command release cuts a release at the end of a PLAN.md task group:
|
Command release cuts a release at the end of a PLAN.md task group: |
|
logging
|
|
|
telegram
Package telegram is a log/slog handler that sends records to Telegram chats, ported from the maintainer's TypeScript telegram-logger.
|
Package telegram is a log/slog handler that sends records to Telegram chats, ported from the maintainer's TypeScript telegram-logger. |
|
Package mail sends email.
|
Package mail sends email. |
|
Package middleware provides Vukem's built-in net/http middleware.
|
Package middleware provides Vukem's built-in net/http middleware. |
|
Package openapi generates an OpenAPI 3.1 document from the router: typed routes (api.Register) are described from their input and output types and `validate` tags; plain routes get a generic entry.
|
Package openapi generates an OpenAPI 3.1 document from the router: typed routes (api.Register) are described from their input and output types and `validate` tags; plain routes get a generic entry. |
|
Package orm is a generic query builder and model mapper over database/sql.
|
Package orm is a generic query builder and model mapper over database/sql. |
|
Package ratelimit limits requests per key (token, user, IP) with GCRA, a smooth token bucket that needs one timestamp per key.
|
Package ratelimit limits requests per key (token, user, IP) with GCRA, a smooth token bucket that needs one timestamp per key. |
|
Package router is a thin layer over net/http.ServeMux (Go 1.22+ patterns) adding route groups, named routes with URL generation, resource controllers and three middleware stacks:
|
Package router is a thin layer over net/http.ServeMux (Go 1.22+ patterns) adding route groups, named routes with URL generation, resource controllers and three middleware stacks: |
|
Package schema builds DDL with a fluent, dialect-aware API (SQLite and PostgreSQL) and runs versioned migrations with batches and checksums.
|
Package schema builds DDL with a fluent, dialect-aware API (SQLite and PostgreSQL) and runs versioned migrations with batches and checksums. |
|
Package security defines the security event dispatched for every security-relevant decision (failed logins, denied authorization, CSRF rejections, rate limits, invalid signatures).
|
Package security defines the security event dispatched for every security-relevant decision (failed logins, denied authorization, CSRF rejections, rate limits, invalid signatures). |
|
Package session provides server-side and cookie sessions with flash messages, old input, regeneration (anti-fixation) and idle/absolute timeouts.
|
Package session provides server-side and cookie sessions with flash messages, old input, regeneration (anti-fixation) and idle/absolute timeouts. |
|
Package signed creates and verifies signed URLs: links that carry an expiry and an HMAC-SHA256 signature over their path and query, for email verification, unsubscribe links or temporary downloads.
|
Package signed creates and verifies signed URLs: links that carry an expiry and an HMAC-SHA256 signature over their path and query, for email verification, unsubscribe links or temporary downloads. |
|
Package social signs users in with OAuth2 / OpenID Connect providers (GitHub, Google, GitLab, Discord, Microsoft and any compliant provider), in the spirit of AdonisJS Ally, using only the standard library.
|
Package social signs users in with OAuth2 / OpenID Connect providers (GitHub, Google, GitLab, Discord, Microsoft and any compliant provider), in the spirit of AdonisJS Ally, using only the standard library. |
|
Package storage reads and writes files on disks: the local filesystem (through os.Root, so paths can never escape the disk) and memory (tests); S3-compatible storage arrives in BETA (drivers/s3).
|
Package storage reads and writes files on disks: the local filesystem (through os.Root, so paths can never escape the disk) and memory (tests); S3-compatible storage arrives in BETA (drivers/s3). |
|
storagetest
Package storagetest is the conformance suite every storage.Disk passes (local and memory in core, S3 in drivers/s3).
|
Package storagetest is the conformance suite every storage.Disk passes (local and memory in core, S3 in drivers/s3). |
|
Package view renders html/template views with layouts, partials and fragments (single blocks, for htmx), plus request-aware helpers: route, asset, csrfField, old, errors, flash and cspNonce.
|
Package view renders html/template views with layouts, partials and fragments (single blocks, for htmx), plus request-aware helpers: route, asset, csrfField, old, errors, flash and cspNonce. |
|
Package vukemtest is Vukem's testing toolkit: boot an app for a test with an isolated in-memory database, send in-process HTTP requests with a fluent client, and assert on responses, sessions and the database.
|
Package vukemtest is Vukem's testing toolkit: boot an app for a test with an isolated in-memory database, send in-process HTTP requests with a fluent client, and assert on responses, sessions and the database. |
|
Package web provides the request context (*Ctx) used by Vukem handlers: request helpers, typed input, responses, and the central error handler.
|
Package web provides the request context (*Ctx) used by Vukem handlers: request helpers, typed input, responses, and the central error handler. |
|
Package webhook verifies signed incoming webhooks (HMAC-SHA256 over the raw body), the scheme used by GitHub, Shopify, Resend/Svix-style providers and your own integrations.
|
Package webhook verifies signed incoming webhooks (HMAC-SHA256 over the raw body), the scheme used by GitHub, Shopify, Resend/Svix-style providers and your own integrations. |
|
Package z parses untrusted input into typed Go values with Zod-inspired schemas, and checks outgoing values against the same contracts.
|
Package z parses untrusted input into typed Go values with Zod-inspired schemas, and checks outgoing values against the same contracts. |