remove s3 from client

This commit is contained in:
2026-02-15 11:41:05 +01:00
parent 5892ac2a2e
commit 8b592db3dd
10 changed files with 291 additions and 582 deletions

View File

@@ -9,7 +9,6 @@ import (
)
// Config holds client-side configuration for connecting to the backup server.
// Note: Storage type is determined by the server, not the client.
type Config struct {
// ClientID is the unique identifier for this client
ClientID string `json:"client_id"`
@@ -21,16 +20,6 @@ type Config struct {
LocalDataset string `json:"local_dataset"`
// Compress enables LZ4 compression for transfers
Compress bool `json:"compress"`
// S3Endpoint is the S3 endpoint URL (optional, for direct S3 uploads)
S3Endpoint string `json:"s3_endpoint"`
// S3Region is the AWS region
S3Region string `json:"s3_region"`
// S3Bucket is the S3 bucket name
S3Bucket string `json:"s3_bucket"`
// S3AccessKey is the AWS access key
S3AccessKey string `json:"s3_access_key"`
// S3SecretKey is the AWS secret key
S3SecretKey string `json:"s3_secret_key"`
}
// LoadConfig loads client configuration from environment variables and .env file.
@@ -42,14 +31,9 @@ func LoadConfig() *Config {
return &Config{
ClientID: getEnv("CLIENT_ID", "client1"),
APIKey: getEnv("API_KEY", "secret123"),
ServerURL: getEnv("SERVER_URL", "http://backup-server:8080"),
ServerURL: getEnv("SERVER_URL", "http://localhost:8080"),
LocalDataset: getEnv("LOCAL_DATASET", "tank/data"),
Compress: getEnv("COMPRESS", "true") == "true",
S3Endpoint: getEnv("S3_ENDPOINT", ""),
S3Region: getEnv("S3_REGION", "us-east-1"),
S3Bucket: getEnv("S3_BUCKET", "zfs-backups"),
S3AccessKey: getEnv("S3_ACCESS_KEY", ""),
S3SecretKey: getEnv("S3_SECRET_KEY", ""),
}
}