pub struct ArtifactResponse {
pub id: Uuid,
pub step_id: Uuid,
pub name: String,
pub content_type: String,
pub size_bytes: u64,
pub sha256: String,
pub created_at: DateTime<Utc>,
}Expand description
An artifact as exposed by the REST API.
The storage key is deliberately absent: it is internal plumbing, and callers
address an artifact by (run, step, name) through the download route.
§Examples
use chrono::Utc;
use ironflow_api::entities::ArtifactResponse;
use uuid::Uuid;
let response = ArtifactResponse {
id: Uuid::now_v7(),
step_id: Uuid::now_v7(),
name: "report.html".to_string(),
content_type: "text/html".to_string(),
size_bytes: 142,
sha256: "0".repeat(64),
created_at: Utc::now(),
};
assert_eq!(response.name, "report.html");Fields§
§id: UuidUnique artifact identifier.
step_id: UuidThe step that produced it.
name: StringFile name, unique within the step.
content_type: StringMIME type served on download.
size_bytes: u64Size of the content, in bytes.
sha256: StringLowercase hex SHA-256 of the content.
created_at: DateTime<Utc>When the artifact was recorded.
Trait Implementations§
Source§impl Clone for ArtifactResponse
impl Clone for ArtifactResponse
Source§fn clone(&self) -> ArtifactResponse
fn clone(&self) -> ArtifactResponse
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for ArtifactResponse
impl Debug for ArtifactResponse
Source§impl<'de> Deserialize<'de> for ArtifactResponse
impl<'de> Deserialize<'de> for ArtifactResponse
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl From<Artifact> for ArtifactResponse
impl From<Artifact> for ArtifactResponse
Auto Trait Implementations§
impl Freeze for ArtifactResponse
impl RefUnwindSafe for ArtifactResponse
impl Send for ArtifactResponse
impl Sync for ArtifactResponse
impl Unpin for ArtifactResponse
impl UnsafeUnpin for ArtifactResponse
impl UnwindSafe for ArtifactResponse
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more