mirror of
https://github.com/opencloud-eu/opencloud.git
synced 2026-04-16 13:27:37 -04:00
Give the ocm storage provider some storage space
This commit is contained in:
@@ -110,7 +110,8 @@ type OCMCore struct {
|
||||
Drivers OCMCoreDrivers `yaml:"drivers"`
|
||||
}
|
||||
type OCMStorageProvider struct {
|
||||
Insecure bool `yaml:"insecure" env:"OCM_OCM_STORAGE_PROVIDER_INSECURE" desc:"Disable TLS certificate validation for the OCM connections. Do not set this in production environments."`
|
||||
Insecure bool `yaml:"insecure" env:"OCM_OCM_STORAGE_PROVIDER_INSECURE" desc:"Disable TLS certificate validation for the OCM connections. Do not set this in production environments."`
|
||||
StorageRoot string `yaml:"insecure" env:"OCM_OCM_STORAGE_PROVIDER_STORAGE_ROOT" desc:"Directory where the ocm storage provider persists its data like tus upload info files."`
|
||||
}
|
||||
|
||||
type OCMCoreDrivers struct {
|
||||
|
||||
@@ -94,7 +94,7 @@ func DefaultConfig() *config.Config {
|
||||
Driver: "json",
|
||||
Drivers: config.OCMInviteManagerDrivers{
|
||||
JSON: config.OCMInviteManagerJSONDriver{
|
||||
File: filepath.Join(defaults.BaseDataPath(), "storage", "ocminvites.json"),
|
||||
File: filepath.Join(defaults.BaseDataPath(), "storage", "ocm", "ocminvites.json"),
|
||||
},
|
||||
},
|
||||
Insecure: false,
|
||||
@@ -102,14 +102,14 @@ func DefaultConfig() *config.Config {
|
||||
OCMProviderAuthorizerDriver: "json",
|
||||
OCMProviderAuthorizerDrivers: config.OCMProviderAuthorizerDrivers{
|
||||
JSON: config.OCMProviderAuthorizerJSONDriver{
|
||||
Providers: filepath.Join(defaults.BaseDataPath(), "storage", "ocmproviders.json"),
|
||||
Providers: filepath.Join(defaults.BaseDataPath(), "storage", "ocm", "ocmproviders.json"),
|
||||
},
|
||||
},
|
||||
OCMShareProvider: config.OCMShareProvider{
|
||||
Driver: "json",
|
||||
Drivers: config.OCMShareProviderDrivers{
|
||||
JSON: config.OCMShareProviderJSONDriver{
|
||||
File: filepath.Join(defaults.BaseDataPath(), "storage", "ocmshares.json"),
|
||||
File: filepath.Join(defaults.BaseDataPath(), "storage", "ocm", "ocmshares.json"),
|
||||
},
|
||||
},
|
||||
Insecure: false,
|
||||
@@ -118,10 +118,14 @@ func DefaultConfig() *config.Config {
|
||||
Driver: "json",
|
||||
Drivers: config.OCMCoreDrivers{
|
||||
JSON: config.OCMCoreJSONDriver{
|
||||
File: filepath.Join(defaults.BaseDataPath(), "storage", "ocmshares.json"),
|
||||
File: filepath.Join(defaults.BaseDataPath(), "storage", "ocm", "ocmshares.json"),
|
||||
},
|
||||
},
|
||||
},
|
||||
OCMStorageProvider: config.OCMStorageProvider{
|
||||
Insecure: false,
|
||||
StorageRoot: filepath.Join(defaults.BaseDataPath(), "storage", "ocm"),
|
||||
},
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -132,7 +132,8 @@ func OCMConfigFromStruct(cfg *config.Config, logger log.Logger) map[string]inter
|
||||
"driver": "ocmreceived",
|
||||
"drivers": map[string]interface{}{
|
||||
"ocmreceived": map[string]interface{}{
|
||||
"insecure": cfg.OCMStorageProvider.Insecure,
|
||||
"insecure": cfg.OCMStorageProvider.Insecure,
|
||||
"storage_root": cfg.OCMStorageProvider.StorageRoot,
|
||||
},
|
||||
},
|
||||
"data_server_url": "http://" + cfg.HTTP.Addr + "/data",
|
||||
|
||||
Reference in New Issue
Block a user