Documentation
¶
Overview ¶
nolint: goconst // Validation messages don't need to be constants.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Config ¶
type Config struct {
TemplatePath string // Absolute path to the input Excel template file (.xlsx).
DataSourceRefColumn string // Uppercase Excel column letter indicating the SQL file reference (e.g., "R").
QueriesDir string // Absolute base directory for resolving SQL file paths found in the reference column.
OutputPath string // Absolute path where the generated report will be saved.
Timeout time.Duration // Maximum duration allowed for the entire report generation process.
}
type Generator ¶
type Generator struct {
// contains filtered or unexported fields
}
func NewGenerator ¶
func NewGenerator(source datasource.DataSource, cfg Config, logger *slog.Logger) *Generator
func (*Generator) GenerateReport ¶
GenerateReport orchestrates the report generation: 1. Copies the template to the output path. 2. Opens the copied file. 3. Processes each sheet, looking for SQL references in rows. 4. Fetches data and replaces placeholders. 5. Saves the modified file. Respects context for cancellation/timeouts.
Click to show internal directories.
Click to hide internal directories.