Trait lal::Backend [] [src]

pub trait Backend {
    fn get_versions(&self, name: &str, loc: Option<&str>) -> LalResult<Vec<u32>>;
fn get_latest_version(
        &self,
        name: &str,
        loc: Option<&str>
    ) -> LalResult<u32>;
fn get_tarball_url(
        &self,
        name: &str,
        version: Option<u32>,
        loc: Option<&str>
    ) -> LalResult<Component>;
fn upload_artifact_dir(
        &self,
        name: &str,
        version: u32,
        env: Option<&str>
    ) -> LalResult<()>;
fn raw_download(&self, url: &str, dest: &PathBuf) -> LalResult<()>;
fn get_cache_dir(&self) -> String; }

Properties a storage backend of artifacts should have

We are not really relying on Artifactory specific quirks in our default usage so that in case it fails it can be switched over. We do rely on there being a basic API that can implement this trait though.

Required Methods

Get a list of versions for a component

Get the latest version of a component

Get the tarball url of a Component in a backend location If no version is given, return latest

Publish a release build (ARTIFACT dir) to a specific location

Raw dowlnload of a url to a destination

Return the base directory to be used to dump cached downloads This has to be in here for CachedBackend to have a straight dependency

Implementors