introduce AlternativeID attribute, which needs some explanation

This commit is contained in:
A.Unger
2021-11-19 16:21:55 +01:00
parent 2601efb9fe
commit f64ca1f6ba
5 changed files with 8 additions and 4 deletions
+4 -2
View File
@@ -219,9 +219,9 @@ func rules(cfg *config.Config, logger log.Logger) map[string]map[string]interfac
}
// generate rules based on default config
return map[string]map[string]interface{}{
ret := map[string]map[string]interface{}{
cfg.Reva.StorageHome.MountPath: {"address": cfg.Reva.StorageHome.Endpoint},
cfg.Reva.StorageHome.MountID: {"address": cfg.Reva.StorageHome.Endpoint},
cfg.Reva.StorageHome.AlternativeID: {"address": cfg.Reva.StorageHome.Endpoint},
cfg.Reva.StorageUsers.MountPath: {"address": cfg.Reva.StorageUsers.Endpoint},
cfg.Reva.StorageUsers.MountID + ".*": {"address": cfg.Reva.StorageUsers.Endpoint},
cfg.Reva.StoragePublicLink.MountPath: {"address": cfg.Reva.StoragePublicLink.Endpoint},
@@ -229,6 +229,8 @@ func rules(cfg *config.Config, logger log.Logger) map[string]map[string]interfac
// public link storage returns the mount id of the actual storage
// medatada storage not part of the global namespace
}
return ret
}
func mimetypes(cfg *config.Config, logger log.Logger) []map[string]interface{} {
+3
View File
@@ -196,6 +196,7 @@ type StoragePort struct {
Driver string `ocisConfig:"driver"`
MountPath string `ocisConfig:"mount_path"`
MountID string `ocisConfig:"mount_id"`
AlternativeID string `ocisConfig:"alternative_id"`
ExposeDataServer bool `ocisConfig:"expose_data_server"`
// url the data gateway will use to route requests
DataServerURL string `ocisConfig:"data_server_url"`
@@ -867,6 +868,7 @@ func DefaultConfig() *Config {
Driver: "ocis",
ReadOnly: false,
MountPath: "/home",
AlternativeID: "1284d238-aa92-42ce-bdc4-0b0000009154",
MountID: "1284d238-aa92-42ce-bdc4-0b0000009157",
DataServerURL: "http://localhost:9155/data",
HTTPPrefix: "data",
@@ -897,6 +899,7 @@ func DefaultConfig() *Config {
GRPCAddr: "127.0.0.1:9178",
},
MountPath: "/public",
MountID: "e1a73ede-549b-4226-abdf-40e69ca8230d",
},
PublicShareProviderAddr: "",
UserProviderAddr: "",
View File