1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
use std::path::Path;

use log::info;

use crate::temp_file::TempFile;

#[derive(Debug)]
pub struct HelmValuesFile(TempFile);

impl HelmValuesFile {
    pub fn new(data: &str) -> std::io::Result<Self> {
        info!("Using values \n {}", data);
        Ok(Self(TempFile::new("values.yml", data)?))
    }

    pub fn path(&self) -> &Path {
        self.0.path()
    }
}