MCPcopy Create free account
hub / github.com/dfinity/orbit / create_registry_entry

Function create_registry_entry

core/control-panel/impl/src/models/registry_entry.rs:614–627  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

612 use uuid::Uuid;
613
614 pub fn create_registry_entry() -> RegistryEntry {
615 RegistryEntry {
616 id: *Uuid::new_v4().as_bytes(),
617 namespace: RegistryEntry::DEFAULT_NAMESPACE.to_string(),
618 name: Uuid::new_v4().to_string().as_str()[..8].to_string(),
619 description: "This is a test entry to the registry.".to_string(),
620 tags: Vec::new(),
621 categories: Vec::new(),
622 value: create_wasm_module_registry_entry_value(),
623 created_at: 0,
624 updated_at: None,
625 metadata: BTreeMap::new(),
626 }
627 }
628
629 pub fn create_wasm_module_registry_entry_value() -> RegistryValue {
630 RegistryValue::WasmModule(WasmModuleRegistryValue {