Struct lal::Lockfile
[−]
[src]
pub struct Lockfile { pub name: String, pub config: String, pub container: Container, pub environment: String, pub defaultEnv: Option<String>, pub sha: Option<String>, pub version: String, pub tool: String, pub built: Option<String>, pub dependencies: BTreeMap<String, Lockfile>, }
Representation of lockfile.json
Fields
name: String
Name of the component built
config: String
Build configuration used
container: Container
Container and tag used to build
environment: String
Name of the environment for the container at the time
defaultEnv: Option<String>
Name of the default environment set in the manifest
sha: Option<String>
Revision id from version control
version: String
Version of the component built
tool: String
Version of the lal tool
built: Option<String>
Built timestamp
dependencies: BTreeMap<String, Lockfile>
Recursive map of dependencies used
Methods
impl Lockfile
[src]
fn new(
name: &str,
container: &Container,
env: &str,
v: Option<String>,
build_cfg: Option<&str>
) -> Self
[src]
name: &str,
container: &Container,
env: &str,
v: Option<String>,
build_cfg: Option<&str>
) -> Self
Initialize an empty Lockfile with defaults
If no version is given, the version is EXPERIMENTAL-{randhex} for Colony.
fn from_path(lock_path: &PathBuf, name: &str) -> LalResult<Self>
[src]
Opened lockfile at a path
fn release_build() -> LalResult<Self>
[src]
A reader from ARTIFACT directory
fn populate_from_input(self) -> LalResult<Self>
[src]
Read all the lockfiles in INPUT to generate the full lockfile
NB: This currently reads all the lockfiles partially in analyze
,
the re-reads them fully in read_lockfile_from_component
so can be sped up.
fn set_default_env(self, default: String) -> Self
[src]
Attach a default environment to the lockfile
fn attach_revision_id(self, sha: Option<String>) -> Self
[src]
Attach a revision id from source control
fn set_name(self, name: &str) -> Self
[src]
Attach a name to the lockfile
fn write(&self, pth: &Path) -> LalResult<()>
[src]
Write the current Lockfile
struct to a Path
impl Lockfile
[src]
fn find_all_dependency_versions(&self) -> HashMap<String, BTreeSet<String>>
[src]
List all used versions used of each dependency
fn find_all_environments(&self) -> HashMap<String, BTreeSet<String>>
[src]
List all used environments used of each dependency
fn find_all_dependency_names(&self) -> HashMap<String, BTreeSet<String>>
[src]
List all dependency names used by each dependency (not transitively)
impl Lockfile
[src]
Reverse dependency methods
Similar to the above ones - requires a populated lockfile to make sense.
fn get_reverse_deps(&self) -> HashMap<String, BTreeSet<String>>
[src]
List all dependees for each dependency
fn get_reverse_deps_transitively_for(
&self,
component: String
) -> BTreeSet<String>
[src]
&self,
component: String
) -> BTreeSet<String>
List all dependees for a dependency transitively
Trait Implementations
impl Debug for Lockfile
[src]
impl Default for Lockfile
[src]
Generates a temporary empty lockfile for internal analysis