Skip to content

armgit / ente

Public Imported from GitHub
0

πŸ’š End-to-end encrypted cloud for everything.

[server] Add struct for fileData config

Neeraj Guptad1dc977d5e24
diff --git a/server/configurations/local.yaml b/server/configurations/local.yaml
index f392663c0e..52db52ca07 100644
--- a/server/configurations/local.yaml
+++ b/server/configurations/local.yaml
@@ -169,6 +169,15 @@ s3:
# resolved, e.g. when running a local instance, or when using MinIO as a
# production store.
#use_path_style_urls: true
+ #
+ # file-data-storage:
+ # derivedMetadata:
+ # bucket:
+ # replicas: []
+ # img_preview:
+ # bucket:
+ # replicas: []
+
# Key used for encrypting customer emails before storing them in DB
#
diff --git a/server/pkg/utils/s3config/filedata.go b/server/pkg/utils/s3config/filedata.go
new file mode 100644
index 0000000000..8874d18ee2
--- /dev/null
+++ b/server/pkg/utils/s3config/filedata.go
@@ -0,0 +1,12 @@
+package s3config
+
+import "github.com/ente-io/museum/ente"
+
+type ObjectBucketConfig struct {
+ PrimaryBucket string `mapstructure:"primary"`
+ ReplicaBuckets []string `mapstructure:"replicas"`
+}
+
+type FileDataConfig struct {
+ ObjectBucketConfig map[ente.ObjectType]ObjectBucketConfig `mapstructure:"objectBuckets"`
+}