Skip to main content

microsandbox_types/
lib.rs

1//! Shared task and wire contract types for microsandbox.
2
3#![warn(missing_docs)]
4
5mod cloud;
6mod domain;
7mod error;
8pub mod modify;
9mod validation;
10
11#[cfg(feature = "ts")]
12pub mod typescript;
13
14//--------------------------------------------------------------------------------------------------
15// Exports
16//--------------------------------------------------------------------------------------------------
17
18pub use cloud::{
19    CloudCreateSandboxRequest, CloudCreateSandboxResponse, CloudErrorBody, CloudErrorDetails,
20    CloudMessageResponse, CloudNetworkSpec, CloudPaginated, CloudRootfsSource,
21    CloudSandboxResources, CloudSandboxRuntimeOptions, CloudSandboxSpec, CloudSandboxStatus,
22};
23pub use domain::{
24    Action, CertCacheConfig, DEFAULT_METRICS_SAMPLE_INTERVAL_MS, DEFAULT_SANDBOX_MEMORY_MIB,
25    DEFAULT_SANDBOX_VCPUS, Destination, DestinationGroup, Direction, DiskImageFormat, DnsConfig,
26    EnvVar, HandoffInit, HostPattern, HostPermissions, InterceptCaConfig, InterfaceOverrides,
27    LogSource, MAX_SECRET_PLACEHOLDER_BYTES, MountOptions, NamedVolumeCreate, NamedVolumeMode,
28    NetworkPolicy, NetworkSpec, OciRootfsSource, Patch, PortProtocol, PortRange, Protocol,
29    PublishedPortSpec, PullPolicy, Rlimit, RlimitResource, RootfsSource, Rule, SandboxLogLevel,
30    SandboxPolicy, SandboxResources, SandboxRuntimeOptions, SandboxSpec, ScopedUpstreamCaCert,
31    ScopedVerifyUpstream, SecretConfigError, SecretEntry, SecretInjection, SecretsConfig,
32    SecurityProfile, SnapshotDestination, SnapshotSpec, StatVirtualization, TlsConfig,
33    ViolationAction, VolumeKind, VolumeMount, VolumeSpec,
34};
35pub use error::{TypesError, TypesResult};
36pub use modify::{
37    ChangeKind, ConfigPlannedChange, ModificationConflict, ModificationDisposition,
38    ModificationPolicy, ModificationWarning, PlannedChange, ResourceConvergenceState, ResourceKind,
39    ResourceResizeStatus, SandboxModificationPatch, SandboxModificationPlan, SecretChangeKind,
40    SecretModificationPatch, SecretPlannedChange, SecretSource,
41};
42pub use validation::{
43    MAX_HOSTNAME_BYTES, MAX_SANDBOX_NAME_BYTES, hostname_from_sandbox_name, validate_hostname,
44    validate_sandbox_name,
45};