Skip to main content

Crate ograf_core

Crate ograf_core 

Source
Expand description

The pure OGraf-spec Core server: graphics, renderers, actions, and the renderer WebSocket protocol. Knows nothing about zones, API keys, or admin accounts — every access decision is delegated to whatever access::AccessControl implementation the binary wires in (Dependency Inversion principle). A consumer that wants no access control at all can use access::AllowAllAccessControl.

Modules§

access
Dependency Inversion seam: Core defines what access control it needs, never how it’s decided. Consumers can provide their own implementation; AllowAllAccessControl is a trivial one for anyone who wants no restriction at all.
config
error
handlers
models
protocol
Wire protocol types for OGraf v1 Server API — messages sent between server and renderer over WebSocket. These types define the JSON structure on the wire; server-internal bookkeeping lives in models.
renderer_ws
store

Structs§

AppState
Router
The router type for composing handlers and services.

Functions§

build_router
Builds the /ograf/v1/* API router plus the internal graphic-asset route used by the renderer HTML — everything a consumer needs to nest under its own top-level router alongside its own admin routes. Static file serving (/renderer, admin UI) and CORS/tracing layers are the binary’s own concern, not Core’s.