[server] Add struct for fileData config

This commit is contained in:
Neeraj Gupta 2024-08-03 16:06:47 +05:30
parent e32cd7b64c
commit d1dc977d5e
2 changed files with 21 additions and 0 deletions

View File

@ -169,6 +169,15 @@ s3:
# resolved, e.g. when running a local instance, or when using MinIO as a # resolved, e.g. when running a local instance, or when using MinIO as a
# production store. # production store.
#use_path_style_urls: true #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 # Key used for encrypting customer emails before storing them in DB
# #

View File

@ -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"`
}