Skip to main content

Module file

Module file 

Source
Expand description
  • Identifying file formats based on extensions
  • Validating template file structure

This module is NOT responsible for:

  • Template rendering or variable substitution
  • File I/O operations
  • Template resolution or compilation

§Supported File Types

  • Static files: Direct configuration files (.yml, .yaml, .toml, .tf)
  • Tera templates: Dynamic templates with variable substitution (.yml.tera, .toml.tera, .tf.tera)

§Examples

use torrust_tracker_deployer_lib::domain::template::file::File;

// Create DTO for static YAML file
let static_file = File::new("config/app.yml", "key: value".to_string())?;

// Create DTO for Tera template with YAML output
let template_file = File::new("templates/inventory.yml.tera", "host: {{ vm_ip }}".to_string())?;

Structs§

File
A Data Transfer Object (DTO) representing template file metadata for the deployment system.

Enums§

Engine
Error
Extension
Format