Skip to main content

Module service

Module service 

Source
Expand description

Shared business logic — framework-agnostic pure functions.

Both the Axum server and Cloudflare Worker call these functions, keeping route handlers as thin adapters.

Structs§

BuiltSessionListQuery
Result of building a session list query from SessionListQuery.
TokenBundle
Pre-computed token bundle returned by prepare_token_bundle.

Enums§

ParamValue
Abstract query parameter value, framework-agnostic.

Functions§

build_session_list_query
Build framework-agnostic SQL + params for paginated session listing.
generate_api_key
Generate a new API key with the osk_ prefix.
prepare_token_bundle
Build a TokenBundle containing a JWT, refresh token, and the auth response.
validate_email
Validate and normalize an email address. Returns the lowercased, trimmed email.
validate_nickname
Validate and normalize a user nickname. Returns the trimmed nickname.
validate_password
Validate a password (8-12 characters).
validate_team_name
Validate and normalize a team name. Returns the trimmed name.