Skip to content

Commit

Permalink
Add getter functions for LogEntry fields
Browse files Browse the repository at this point in the history
Signed-off-by: Lily Sturmann <lsturman@redhat.com>
  • Loading branch information
lkatalin committed Oct 20, 2022
1 parent 6bb6fa6 commit 9810220
Showing 1 changed file with 30 additions and 0 deletions.
30 changes: 30 additions & 0 deletions src/rekor/models/log_entry.rs
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,36 @@ pub struct LogEntry {
verification: Verification,
}

impl LogEntry {
pub fn get_uuid(&self) -> &str {
&self.uuid
}

pub fn get_attestation(&self) -> &Option<Attestation> {
&self.attestation
}

pub fn get_body(&self) -> &str {
&self.body
}

pub fn get_time(&self) -> i64 {
self.integrated_time
}

pub fn get_log_id(&self) -> &str {
&self.log_i_d
}

pub fn get_log_index(&self) -> i64 {
self.log_index
}

pub fn get_verification(&self) -> &Verification {
&self.verification
}
}

#[derive(Default, Debug, Clone, PartialEq, Eq, Serialize, Deserialize)]
#[serde(rename_all = "camelCase")]
pub struct Attestation {
Expand Down

0 comments on commit 9810220

Please sign in to comment.