MCPcopy Create free account
hub / github.com/atomicdotdev/atomic / load_delegation

Method load_delegation

atomic-identity/src/store.rs:855–861  ·  view source on GitHub ↗

Load a delegation certificate by base32 id.

(&self, id: &str)

Source from the content-addressed store, hash-verified

853
854 /// Load a delegation certificate by base32 id.
855 pub fn load_delegation(&self, id: &str) -> Result<String, IdentityError> {
856 let path = self.delegation_path(id);
857 if !path.exists() {
858 return Err(IdentityError::DelegationNotFound { id: id.to_string() });
859 }
860 Ok(fs::read_to_string(path)?)
861 }
862
863 /// Is a certificate stored under this id?
864 pub fn delegation_exists(&self, id: &str) -> bool {

Calls 2

delegation_pathMethod · 0.80
existsMethod · 0.45

Tested by 1