MCPcopy Create free account
hub / github.com/Dstack-TEE/dstack / save_cert_attestation

Method save_cert_attestation

gateway/src/kv/mod.rs:990–1000  ·  view source on GitHub ↗

Save attestation for a domain (saves both latest and history)

(&self, domain: &str, attestation: &CertAttestation)

Source from the content-addressed store, hash-verified

988
989 /// Save attestation for a domain (saves both latest and history)
990 pub fn save_cert_attestation(&self, domain: &str, attestation: &CertAttestation) -> Result<()> {
991 let mut state = self.persistent.write();
992 // Save to history
993 state.put_encoded(
994 keys::cert_attestation_history(domain, attestation.generated_at),
995 attestation,
996 )?;
997 // Update latest
998 state.put_encoded(keys::cert_attestation_latest(domain), attestation)?;
999 Ok(())
1000 }
1001
1002 /// List all attestation history for a domain (sorted by timestamp descending)
1003 pub fn list_cert_attestations(&self, domain: &str) -> Vec<CertAttestation> {

Callers 1

Calls 4

cert_attestation_historyFunction · 0.85
cert_attestation_latestFunction · 0.85
writeMethod · 0.80
put_encodedMethod · 0.80

Tested by

no test coverage detected