Trait lal::Backend [] [src]

pub trait Backend {
    fn get_versions(&self, name: &str, loc: &str) -> LalResult<Vec<u32>>;
fn get_latest_version(&self, name: &str, loc: &str) -> LalResult<u32>;
fn get_component_info(
        &self,
        name: &str,
        ver: Option<u32>,
        loc: &str
    ) -> LalResult<Component>;
fn publish_artifact(
        &self,
        name: &str,
        version: u32,
        env: &str
    ) -> LalResult<()>;
fn raw_fetch(&self, location: &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 in descending order

Get the latest version of a component

Get the version and location information of a component

If no version is given, figure out what latest is

Publish a release build's ARTIFACT to a specific location

This will publish everything inside the ARTIFACT dir created by lal build -r

Raw fetch of location to a destination

location can be a HTTPS url / a system path / etc (depending on the backend)

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