Some checks are pending
Backend CI / test (push) Waiting to run
Backend CI / build (push) Blocked by required conditions
Mobile App CI / test (push) Waiting to run
Mobile App CI / build-android (push) Blocked by required conditions
Mobile App CI / build-ios (push) Blocked by required conditions
Web App CI / test (push) Waiting to run
Web App CI / build (push) Blocked by required conditions
Deploy Admin Panel / Deploy Admin Panel (push) Waiting to run
Deploy Admin Panel / Admin Panel Verification (push) Blocked by required conditions
Deploy Mnemo Cards / Deploy Backend (push) Waiting to run
Deploy Mnemo Cards / Deploy Web App (push) Blocked by required conditions
Deploy Mnemo Cards / Final Verification (push) Blocked by required conditions
Deploy Telegram Bot / Deploy Telegram Bot (push) Waiting to run
44 lines
1.3 KiB
Dart
44 lines
1.3 KiB
Dart
/// Configuration for MinIO connection
|
|
class MinioConfig {
|
|
final String endpoint;
|
|
final int port;
|
|
final String accessKey;
|
|
final String secretKey;
|
|
final bool useSSL;
|
|
final String region;
|
|
|
|
// Bucket names
|
|
static const String cardImagesBucket = 'card-images';
|
|
static const String testImagesBucket = 'test-images';
|
|
static const String voiceAudioBucket = 'voice-audio';
|
|
|
|
// Presigned URL expiration (4 hours)
|
|
static const int presignedUrlExpirySeconds = 4 * 60 * 60;
|
|
|
|
MinioConfig({
|
|
required this.endpoint,
|
|
required this.port,
|
|
required this.accessKey,
|
|
required this.secretKey,
|
|
required this.useSSL,
|
|
required this.region,
|
|
});
|
|
|
|
factory MinioConfig.fromEnvironment() {
|
|
return MinioConfig(
|
|
endpoint: const String.fromEnvironment(
|
|
'MINIO_ENDPOINT',
|
|
defaultValue:
|
|
'minio-rsso80cks4ck4oc44s0og80c.147.45.152.129.sslip.io',
|
|
),
|
|
port: const int.fromEnvironment('MINIO_PORT', defaultValue: 443),
|
|
accessKey: const String.fromEnvironment('SERVICE_USER_MINIO'),
|
|
secretKey: const String.fromEnvironment('SERVICE_PASSWORD_MINIO'),
|
|
useSSL: const bool.fromEnvironment('MINIO_USE_SSL', defaultValue: true),
|
|
region: const String.fromEnvironment(
|
|
'MINIO_REGION',
|
|
defaultValue: 'us-east-1',
|
|
),
|
|
);
|
|
}
|
|
}
|