Skip to main content

sigstore_rekor/
lib.rs

1//! Rekor transparency log client for Sigstore
2//!
3//! This crate provides a client for interacting with Rekor, the Sigstore
4//! transparency log service.
5//!
6//! # Features
7//!
8//! - `cache` - Enable caching support for log info and public key responses.
9//!   When enabled, use [`RekorClientBuilder::with_cache`] to configure a cache adapter.
10//!
11//! # Example
12//!
13//! ```no_run
14//! use sigstore_rekor::RekorClient;
15//!
16//! # async fn example() -> Result<(), sigstore_rekor::Error> {
17//! let client = RekorClient::public();
18//! let log_info = client.get_log_info().await?;
19//! println!("Tree size: {}", log_info.tree_size);
20//! # Ok(())
21//! # }
22//! ```
23//!
24//! With caching enabled:
25//!
26//! ```ignore
27//! use sigstore_rekor::RekorClient;
28//! use sigstore_cache::FileSystemCache;
29//!
30//! let cache = FileSystemCache::default_location()?;
31//! let client = RekorClient::builder("https://rekor.sigstore.dev")
32//!     .with_cache(cache)
33//!     .build();
34//! ```
35
36pub mod body;
37pub mod client;
38pub mod entry;
39pub mod error;
40
41pub use body::RekorEntryBody;
42pub use client::{get_public_log_info, RekorClient, RekorClientBuilder};
43pub use entry::{
44    DsseEntry, DsseEntryV2, HashedRekord, HashedRekordV2, LogEntry, LogInfo, RekorApiVersion,
45    SearchIndex,
46};
47pub use error::{Error, Result};