refactor(core): Make new configs consistent (no-changelog) (#10393)

This commit is contained in:
Iván Ovejero
2024-08-14 11:30:26 +02:00
committed by GitHub
parent e640f1f42c
commit c0811b218a
14 changed files with 40 additions and 40 deletions

View File

@@ -0,0 +1,42 @@
import { Config, Env, Nested } from '../decorators';
@Config
class S3BucketConfig {
/** Name of the n8n bucket in S3-compatible external storage */
@Env('N8N_EXTERNAL_STORAGE_S3_BUCKET_NAME')
name = '';
/** Region of the n8n bucket in S3-compatible external storage @example "us-east-1" */
@Env('N8N_EXTERNAL_STORAGE_S3_BUCKET_REGION')
region = '';
}
@Config
class S3CredentialsConfig {
/** Access key in S3-compatible external storage */
@Env('N8N_EXTERNAL_STORAGE_S3_ACCESS_KEY')
accessKey = '';
/** Access secret in S3-compatible external storage */
@Env('N8N_EXTERNAL_STORAGE_S3_ACCESS_SECRET')
accessSecret = '';
}
@Config
class S3Config {
/** Host of the n8n bucket in S3-compatible external storage @example "s3.us-east-1.amazonaws.com" */
@Env('N8N_EXTERNAL_STORAGE_S3_HOST')
host = '';
@Nested
bucket: S3BucketConfig;
@Nested
credentials: S3CredentialsConfig;
}
@Config
export class ExternalStorageConfig {
@Nested
s3: S3Config;
}