use std::collections::HashMap;
#[derive(Default, Debug, Clone, PartialEq, Eq)]
pub struct BuildImageOptions {
pub(crate) skip_if_exists: bool,
pub(crate) no_cache: bool,
pub(crate) build_args: HashMap<String, String>,
}
impl BuildImageOptions {
pub fn new() -> Self {
Self::default()
}
pub fn with_skip_if_exists(mut self, skip_if_exists: bool) -> Self {
self.skip_if_exists = skip_if_exists;
self
}
pub fn with_no_cache(mut self, no_cache: bool) -> Self {
self.no_cache = no_cache;
self
}
pub fn with_build_arg(mut self, key: impl Into<String>, value: impl Into<String>) -> Self {
self.build_args.insert(key.into(), value.into());
self
}
pub fn with_build_args(mut self, build_args: HashMap<String, String>) -> Self {
self.build_args = build_args;
self
}
}