//! Wire types shared by the `twice` server and its egui client.
//!
//! Everything a client can send that eventually reaches an argument vector of
//! the `once` CLI is a parsed newtype ([`Host`], [`ImageRef`]) rather than a
//! bare `String`. Parsing happens once, at the HTTP boundary.
pub mod api;
pub mod app;
pub mod job;
pub use api::{
ApiErrorBody, AppsResponse, HealthResponse, InfrastructureSpec, JobsResponse,
UpdateImageRequest,
};
pub use app::{
AppSummary, ContainerName, ContainerState, Host, ImageRef, ImageSource, ImageVersion,
InvalidHost, InvalidImageRef, InvalidImageSource, InvalidImageVersion,
};
pub use job::{JobId, JobKind, JobOutcome, JobView, LogLine, LogStream};
/// Header carrying the shared secret on every authenticated request.
pub const API_KEY_HEADER: &str = "x-api-key";
/// Prefix every route in this crate's API surface lives under.
pub const API_PREFIX: &str = "/api/v1";