MCPcopy Create free account
hub / github.com/NodeDB-Lab/nodedb / delete_wasm_binary

Function delete_wasm_binary

nodedb/src/control/planner/wasm/store.rs:70–80  ·  view source on GitHub ↗

Delete a WASM binary from the catalog by its content hash.

(
    catalog: &crate::control::security::catalog::types::SystemCatalog,
    hash: &str,
)

Source from the content-addressed store, hash-verified

68
69/// Delete a WASM binary from the catalog by its content hash.
70pub fn delete_wasm_binary(
71 catalog: &crate::control::security::catalog::types::SystemCatalog,
72 hash: &str,
73) -> crate::Result<()> {
74 let key = format!("wasm_module:{hash}");
75 catalog
76 .delete_raw(key.as_bytes())
77 .map_err(|e| crate::Error::Internal {
78 detail: format!("failed to delete WASM binary: {e}"),
79 })
80}

Callers 1

drop_functionFunction · 0.85

Calls 2

delete_rawMethod · 0.80
as_bytesMethod · 0.45

Tested by

no test coverage detected