Skip to main content

Crate homecore_api

Crate homecore_api 

Source
Expand description

HOMECORE-API — wire-compat Axum REST + WebSocket port of HA’s API (ADR-130).

Re-exports§

pub use app::build_cors_layer;
pub use app::router;
pub use app::AppState;
pub use error::ApiError;
pub use error::ApiResult;
pub use state::SharedState;
pub use tokens::LongLivedTokenStore;

Modules§

app
Axum router wiring. Mounts the §2.1 P2 routes + the WS endpoint.
auth
Bearer-token auth helper. Validates against the LongLivedTokenStore on SharedState (audit fix HC-01/02).
error
rest
state
tokens
Long-lived bearer-token store.
ws
WebSocket handler — /api/websocket. ADR-130 §2.2 P2 command subset.

Constants§

DEFAULT_PORT