Add strict pipeline and session config loading
This commit is contained in:
@@ -1,15 +1,91 @@
|
||||
package config
|
||||
|
||||
// Config contains loaded pipeline and session configuration.
|
||||
// Config is the resolved combined configuration from pipeline.yml and session.yml.
|
||||
type Config struct {
|
||||
Pipeline *Pipeline
|
||||
Session *Session
|
||||
Pipeline *PipelineConfig
|
||||
Session *SessionConfig
|
||||
PipelinePath string
|
||||
SessionPath string
|
||||
}
|
||||
|
||||
// Pipeline represents durable pipeline-level settings.
|
||||
type Pipeline struct{}
|
||||
|
||||
// Session represents per-session inputs and metadata.
|
||||
type Session struct {
|
||||
SessionID string
|
||||
// PipelineConfig contains durable pipeline-level settings.
|
||||
type PipelineConfig struct {
|
||||
Workspace WorkspaceConfig `yaml:"workspace"`
|
||||
Storage StorageConfig `yaml:"storage"`
|
||||
WhisperX WhisperXConfig `yaml:"whisperx"`
|
||||
Seriatim SeriatimConfig `yaml:"seriatim"`
|
||||
Audita AuditaConfig `yaml:"audita"`
|
||||
Analyzer AnalyzerConfig `yaml:"analyzer"`
|
||||
Notification NotificationConfig `yaml:"notification"`
|
||||
}
|
||||
|
||||
// SessionConfig contains per-session inputs and metadata.
|
||||
type SessionConfig struct {
|
||||
SessionID string `yaml:"session_id"`
|
||||
Campaign string `yaml:"campaign"`
|
||||
Date string `yaml:"date"`
|
||||
Title string `yaml:"title"`
|
||||
Inputs SessionInputsConfig `yaml:"inputs"`
|
||||
}
|
||||
|
||||
// WorkspaceConfig configures local workspace behavior.
|
||||
type WorkspaceConfig struct {
|
||||
Root string `yaml:"root"`
|
||||
}
|
||||
|
||||
// StorageConfig configures storage backends and related parameters.
|
||||
type StorageConfig struct {
|
||||
Backend string `yaml:"backend"`
|
||||
Bucket string `yaml:"bucket"`
|
||||
Prefix string `yaml:"prefix"`
|
||||
}
|
||||
|
||||
// WhisperXConfig configures WhisperX adapter settings.
|
||||
type WhisperXConfig struct {
|
||||
BaseURL string `yaml:"base_url"`
|
||||
Timeout string `yaml:"timeout"`
|
||||
Concurrency int `yaml:"concurrency"`
|
||||
}
|
||||
|
||||
// SeriatimConfig configures seriatim adapter settings.
|
||||
type SeriatimConfig struct {
|
||||
BinaryPath string `yaml:"binary_path"`
|
||||
Timeout string `yaml:"timeout"`
|
||||
Args []string `yaml:"args"`
|
||||
}
|
||||
|
||||
// AuditaConfig configures audita adapter settings.
|
||||
type AuditaConfig struct {
|
||||
BinaryPath string `yaml:"binary_path"`
|
||||
Timeout string `yaml:"timeout"`
|
||||
Args []string `yaml:"args"`
|
||||
}
|
||||
|
||||
// AnalyzerConfig configures analyzer adapter settings.
|
||||
type AnalyzerConfig struct {
|
||||
BinaryPath string `yaml:"binary_path"`
|
||||
Timeout string `yaml:"timeout"`
|
||||
Artifacts ArtifactSettings `yaml:"artifacts"`
|
||||
}
|
||||
|
||||
// NotificationConfig configures notification backend settings.
|
||||
type NotificationConfig struct {
|
||||
Backend string `yaml:"backend"`
|
||||
Recipient string `yaml:"recipient"`
|
||||
Timeout string `yaml:"timeout"`
|
||||
}
|
||||
|
||||
// ArtifactSettings configures generated artifact selection and paths.
|
||||
type ArtifactSettings struct {
|
||||
OutputDir string `yaml:"output_dir"`
|
||||
Types []string `yaml:"types"`
|
||||
}
|
||||
|
||||
// SessionInputsConfig contains per-session input references.
|
||||
type SessionInputsConfig struct {
|
||||
AudioDir string `yaml:"audio_dir"`
|
||||
AudioFiles []string `yaml:"audio_files"`
|
||||
SpeakersFile string `yaml:"speakers_file"`
|
||||
AutocorrectFile string `yaml:"autocorrect_file"`
|
||||
GlossaryFile string `yaml:"glossary_file"`
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user