| 192 | } |
| 193 | |
| 194 | type Configuration struct { |
| 195 | ProjectName string `json:"project_name" envconfig:"LEDGERFORGE_PROJECT_NAME"` |
| 196 | BackupDir string `json:"backup_dir" envconfig:"LEDGERFORGE_BACKUP_DIR"` |
| 197 | AwsAccessKeyId string `json:"aws_access_key_id" envconfig:"LEDGERFORGE_AWS_ACCESS_KEY_ID"` |
| 198 | S3Endpoint string `json:"s3_endpoint" envconfig:"LEDGERFORGE_S3_ENDPOINT"` |
| 199 | AwsSecretAccessKey string `json:"aws_secret_access_key" envconfig:"LEDGERFORGE_AWS_SECRET_ACCESS_KEY"` |
| 200 | S3BucketName string `json:"s3_bucket_name" envconfig:"LEDGERFORGE_S3_BUCKET_NAME"` |
| 201 | S3Region string `json:"s3_region" envconfig:"LEDGERFORGE_S3_REGION"` |
| 202 | Server ServerConfig `json:"server"` |
| 203 | DataSource DataSourceConfig `json:"data_source"` |
| 204 | Redis RedisConfig `json:"redis"` |
| 205 | TypeSense TypeSenseConfig `json:"typesense"` |
| 206 | TypeSenseKey string `json:"type_sense_key" envconfig:"LEDGERFORGE_TYPESENSE_KEY"` |
| 207 | TokenizationSecret string `json:"tokenization_secret" envconfig:"LEDGERFORGE_TOKENIZATION_SECRET"` |
| 208 | AccountNumberGeneration AccountNumberGenerationConfig `json:"account_number_generation"` |
| 209 | Notification Notification `json:"notification"` |
| 210 | RateLimit RateLimitConfig `json:"rate_limit"` |
| 211 | EnableTelemetry bool `json:"enable_telemetry" envconfig:"LEDGERFORGE_ENABLE_TELEMETRY"` |
| 212 | TelemetryKey string `json:"telemetry_key" envconfig:"LEDGERFORGE_TELEMETRY_KEY"` |
| 213 | TelemetryEndpoint string `json:"telemetry_endpoint" envconfig:"LEDGERFORGE_TELEMETRY_ENDPOINT"` |
| 214 | EnableObservability bool `json:"enable_observability" envconfig:"LEDGERFORGE_ENABLE_OBSERVABILITY"` |
| 215 | Transaction TransactionConfig `json:"transaction"` |
| 216 | Reconciliation ReconciliationConfig `json:"reconciliation"` |
| 217 | Queue QueueConfig `json:"queue"` |
| 218 | } |
| 219 | |
| 220 | func loadConfigFromFile(file string) error { |
| 221 | var cnf Configuration |
nothing calls this directly
no outgoing calls
no test coverage detected