Signed-off-by: kjuulh <contact@kjuulh.io>
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
use std::path::PathBuf;
|
||||
use std::{ops::Deref, path::PathBuf};
|
||||
|
||||
#[derive(Clone, Debug)]
|
||||
pub struct CommitArtifact {
|
||||
@@ -33,3 +33,28 @@ impl TryFrom<String> for ArtifactID {
|
||||
Ok(ArtifactID(uuid))
|
||||
}
|
||||
}
|
||||
|
||||
pub struct UploadArtifact {
|
||||
pub file_path: PathBuf,
|
||||
}
|
||||
|
||||
impl From<PathBuf> for UploadArtifact {
|
||||
fn from(value: PathBuf) -> Self {
|
||||
Self { file_path: value }
|
||||
}
|
||||
}
|
||||
|
||||
pub struct UploadArtifactID(uuid::Uuid);
|
||||
impl From<uuid::Uuid> for UploadArtifactID {
|
||||
fn from(value: uuid::Uuid) -> Self {
|
||||
Self(value)
|
||||
}
|
||||
}
|
||||
|
||||
impl Deref for UploadArtifactID {
|
||||
type Target = uuid::Uuid;
|
||||
|
||||
fn deref(&self) -> &Self::Target {
|
||||
&self.0
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user