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

Method save_revocation

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

Store a signed revocation for a delegation.

(&self, id: &str, document: &str)

Source from the content-addressed store, hash-verified

910
911 /// Store a signed revocation for a delegation.
912 pub fn save_revocation(&self, id: &str, document: &str) -> Result<(), IdentityError> {
913 let dir = self.delegations_dir();
914 if !dir.exists() {
915 fs::create_dir_all(&dir)?;
916 }
917 fs::write(self.revocation_path(id), document)?;
918 Ok(())
919 }
920
921 /// The stored revocation for a delegation, if one exists.
922 pub fn load_revocation(&self, id: &str) -> Result<Option<String>, IdentityError> {

Calls 4

delegations_dirMethod · 0.80
revocation_pathMethod · 0.80
writeFunction · 0.50
existsMethod · 0.45