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

Method list_cert_attestations

gateway/src/admin_service.rs:557–589  ·  view source on GitHub ↗
(
        self,
        request: ListCertAttestationsRequest,
    )

Source from the content-addressed store, hash-verified

555 }
556
557 async fn list_cert_attestations(
558 self,
559 request: ListCertAttestationsRequest,
560 ) -> Result<ListCertAttestationsResponse> {
561 let kv_store = self.state.kv_store();
562
563 let latest = kv_store
564 .get_cert_attestation_latest(&request.domain)
565 .map(|att| CertAttestationInfo {
566 public_key: att.public_key,
567 quote: att.quote,
568 generated_by: att.generated_by,
569 generated_at: att.generated_at,
570 });
571
572 let mut history: Vec<CertAttestationInfo> = kv_store
573 .list_cert_attestations(&request.domain)
574 .into_iter()
575 .map(|att| CertAttestationInfo {
576 public_key: att.public_key,
577 quote: att.quote,
578 generated_by: att.generated_by,
579 generated_at: att.generated_at,
580 })
581 .collect();
582
583 // Apply limit if specified
584 if request.limit > 0 {
585 history.truncate(request.limit as usize);
586 }
587
588 Ok(ListCertAttestationsResponse { latest, history })
589 }
590
591 // ==================== Global Certbot Configuration ====================
592

Callers

nothing calls this directly

Calls 4

kv_storeMethod · 0.80
into_iterMethod · 0.80
truncateMethod · 0.80

Tested by

no test coverage detected