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

Method delete_delegation

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

Delete a certificate and any revocation stored alongside it.

(&self, id: &str)

Source from the content-addressed store, hash-verified

830
831 /// Delete a certificate and any revocation stored alongside it.
832 pub fn delete_delegation(&self, id: &str) -> Result<(), IdentityError> {
833 let path = self.delegation_path(id);
834 if !path.exists() {
835 return Err(IdentityError::DelegationNotFound { id: id.to_string() });
836 }
837 fs::remove_file(path)?;
838 let revocation = self.revocation_path(id);
839 if revocation.exists() {
840 fs::remove_file(revocation)?;
841 }
842 Ok(())
843 }
844
845 /// Store a signed revocation for a delegation.
846 pub fn save_revocation(&self, id: &str, document: &str) -> Result<(), IdentityError> {

Callers 1

Calls 3

delegation_pathMethod · 0.80
revocation_pathMethod · 0.80
existsMethod · 0.45

Tested by 1