Skip to main content

create_context

Function create_context 

Source
pub async fn create_context(
    contexts_ks: &KeyspaceHandle,
    id: &str,
    name: &str,
) -> Result<ContextRecord, Box<dyn Error>>
Expand description

Create a new top-level application context and store it.

Applies the same validate_slug gate as the authenticated operations::contexts::create_context. Both must, or setup-time callers (setup::from_toml, tee::did_autogen) could persist ids the operator-facing API would later refuse — leaving a deployment whose own CLI rejects a context it already has.