Skip to main content

ChartFile

Type Alias ChartFile 

Source
pub type ChartFile = RenderedFile;
Expand description

One file in the rendered chart — (path, contents) pair every render_chart_for_servico-rendered lareira-<nome> chart-tree leaf lands at (Chart.yaml, values.yaml, README.md).

Type-aliased to the canonical caixa_core::RenderedFile so the substrate-side “one rendered leaf artifact” shape lives at one struct definition across every per-target renderer — the peer [caixa_flux::BundleFile] alias resolves to the same canonical, so a future rebrand on either axis (a per-artifact hash / provenance field addition, a per-artifact write-mode discriminator once per-cluster-writer sandboxing lands) lands at one caixa-core pub struct RenderedFile edit and reaches both crates by construction. Prior to this lift both crates carried an inline pub struct <Xxx>File { pub path: PathBuf, pub contents: String } with identical #[derive(Debug, Clone, PartialEq, Eq)] shapes and no per-type impls; a future per-target renderer (caixa-otel, the future mesh.pleme.io/v1alpha1/Aplicacao CR materializer, the future per-Supervisor reconciler renderer) would have carried a third and fourth clone of the same record. Type aliases preserve every existing struct-literal construction site (ChartFile { path, contents }), every field-access site (f.path, f.contents), and every derive-fed navigator by construction — Rust type aliases inherit the aliased type’s #[derive]-generated Debug/Clone/PartialEq/Eq impls with no per-alias glue.

Aliased Type§

pub struct ChartFile {
    pub path: PathBuf,
    pub contents: String,
}

Fields§

§path: PathBuf

Sandboxed relative path the substrate writes the artifact under (relative to the renderer-chosen output root). Substrate-canonical filename constants ([FLUX_GITREPOSITORY_YAML_FILENAME] / [FLUX_HELMRELEASE_YAML_FILENAME] / [FLUX_KUSTOMIZATION_YAML_FILENAME] for the caixa-flux [cluster_bundle] Flux v2 CR trio, [HELM_CHART_YAML_FILENAME] / [HELM_VALUES_YAML_FILENAME] for the caixa-helm lareira-<nome> chart directory) source every path today.

§contents: String

The rendered byte contents — a pre-serialized UTF-8 body every downstream writer (caixa-flux::cluster_bundle’s per-GitRepository/HelmRelease/Kustomization YAML emit, caixa-helm::render_chart_for_servico’s per-Chart.yaml/ values.yaml/README.md chart-directory emit) hands to std::fs::write verbatim under the paired [Self::path].