Struct wick_package::WickPackage
source · pub struct WickPackage { /* private fields */ }Expand description
Represents a Wick package, including its files and metadata.
Implementations§
source§impl WickPackage
impl WickPackage
sourcepub async fn from_path(
basedir: Option<PathBuf>,
path: &Path
) -> Result<Self, Error>
pub async fn from_path( basedir: Option<PathBuf>, path: &Path ) -> Result<Self, Error>
Creates a new WickPackage from the provided path.
The provided path can be a file or directory. If it is a directory, the WickPackage will be created based on the files within the directory.
sourcepub fn list_files(&self) -> Vec<&PackageFile>
pub fn list_files(&self) -> Vec<&PackageFile>
Returns a list of the files contained within the WickPackage.
sourcepub const fn basedir(&self) -> Option<&PathBuf>
pub const fn basedir(&self) -> Option<&PathBuf>
Return the base directory of the WickPackage if it came from the filesystem.
sourcepub const fn path(&self) -> &PathBuf
pub const fn path(&self) -> &PathBuf
Returns a list of the files contained within the WickPackage.
sourcepub fn registry_reference(&self) -> Option<String>
pub fn registry_reference(&self) -> Option<String>
Returns the reference.
sourcepub fn tagged_reference(&self, tag: &str) -> Option<String>
pub fn tagged_reference(&self, tag: &str) -> Option<String>
Returns an OCI URL with the specified tag.
sourcepub const fn registry(&self) -> Option<&RegistryConfig>
pub const fn registry(&self) -> Option<&RegistryConfig>
Returns the registry configuration.
sourcepub fn registry_mut(&mut self) -> Option<&mut RegistryConfig>
pub fn registry_mut(&mut self) -> Option<&mut RegistryConfig>
Returns a mutable reference to registry configuration.
sourcepub async fn push(
&mut self,
reference: &str,
options: &OciOptions
) -> Result<String, Error>
pub async fn push( &mut self, reference: &str, options: &OciOptions ) -> Result<String, Error>
Pushes the WickPackage to a specified registry using the provided reference, username, and password.
The username and password are optional. If not provided, the function falls back to anonymous authentication.
Trait Implementations§
source§impl Clone for WickPackage
impl Clone for WickPackage
source§fn clone(&self) -> WickPackage
fn clone(&self) -> WickPackage
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more