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
+1 -2
View File
@@ -298,8 +298,6 @@ github.com/crewjam/saml v0.4.5/go.mod h1:qCJQpUtZte9R1ZjUBcW8qtCNlinbO363ooNl02S
github.com/cs3org/cato v0.0.0-20200828125504-e418fc54dd5e/go.mod h1:XJEZ3/EQuI3BXTp/6DUzFr850vlxq11I6satRtz0YQ4=
github.com/cs3org/go-cs3apis v0.0.0-20211104090126-8e972dca8304 h1:e/nIPR518vyvrulo9goAZTtYD6gFfu/2/9MDe6mTGcw=
github.com/cs3org/go-cs3apis v0.0.0-20211104090126-8e972dca8304/go.mod h1:UXha4TguuB52H14EMoSsCqDj7k8a/t7g4gVP+bgY5LY=
github.com/cs3org/reva v1.15.1-0.20211118124936-a73b194a134e h1:J1C1rlrSztBAbmufCGlRcsT9WrIP1YNjGwup4ygVUdA=
github.com/cs3org/reva v1.15.1-0.20211118124936-a73b194a134e/go.mod h1:9jmSVOnYv69pYbXfjcboTQaZPwHZ6NSD+2jjE9xx12U=
github.com/cs3org/reva v1.15.1-0.20211119095816-7cfc6d3cc8c2 h1:QjnDztqGCLdYtiw6enAgrWZwc7UaZj7iJeT0L4oyHpk=
github.com/cs3org/reva v1.15.1-0.20211119095816-7cfc6d3cc8c2/go.mod h1:9jmSVOnYv69pYbXfjcboTQaZPwHZ6NSD+2jjE9xx12U=
github.com/cubewise-code/go-mime v0.0.0-20200519001935-8c5762b177d8 h1:Z9lwXumT5ACSmJ7WGnFl+OMLLjpz5uR2fyz7dC255FI=
@@ -807,6 +805,7 @@ github.com/konsorten/go-windows-terminal-sequences v1.0.3/go.mod h1:T0+1ngSBFLxv
github.com/kr/fs v0.1.0/go.mod h1:FFnZGqtBN9Gxj7eW1uZ42v5BccTP0vu6NEaFoC2HwRg=
github.com/kr/logfmt v0.0.0-20140226030751-b84e30acd515/go.mod h1:+0opPa2QZZtGFBFZlji/RkVcI2GknAs/DXo4wKdlNEc=
github.com/kr/pretty v0.1.0/go.mod h1:dAy3ld7l9f0ibDNOQOHHMYYIIbhfbHSm3C4ZsoJORNo=
github.com/kr/pretty v0.2.0/go.mod h1:ipq/a2n7PKx3OHsz4KJII5eveXtPO4qwEXGdVfWzfnI=
github.com/kr/pretty v0.2.1/go.mod h1:ipq/a2n7PKx3OHsz4KJII5eveXtPO4qwEXGdVfWzfnI=
github.com/kr/pretty v0.3.0 h1:WgNl7dwNpEZ6jJ9k1snq4pZsg7DOEN8hP9Xw0Tsjwk0=
github.com/kr/pretty v0.3.0/go.mod h1:640gp4NfQd8pI5XOwp5fnNeVWj67G7CFk/SaSQn7NBk=
+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