mirror of
https://github.com/opencloud-eu/opencloud.git
synced 2026-05-01 00:10:17 -05:00
Fix config variable naming
This commit is contained in:
@@ -75,7 +75,7 @@ type Disk struct {
|
||||
// CS3 is the cs3 implementation of the storage.
|
||||
type CS3 struct {
|
||||
ProviderAddr string
|
||||
DriverURL string
|
||||
DataURL string
|
||||
DataPrefix string
|
||||
}
|
||||
|
||||
|
||||
@@ -108,17 +108,17 @@ func ServerWithConfig(cfg *config.Config) []cli.Flag {
|
||||
},
|
||||
&cli.StringFlag{
|
||||
Name: "storage-cs3-provider-addr",
|
||||
Value: "0.0.0.0:9215",
|
||||
Value: "localhost:9215",
|
||||
Usage: "bind address for the metadata storage provider",
|
||||
EnvVars: []string{"ACCOUNTS_STORAGE_CS3_PROVIDER_ADDR"},
|
||||
Destination: &cfg.Repo.CS3.ProviderAddr,
|
||||
},
|
||||
&cli.StringFlag{
|
||||
Name: "storage-cs3-driver-url",
|
||||
Name: "storage-cs3-data-url",
|
||||
Value: "http://localhost:9216",
|
||||
Usage: "http endpoint of the metadata storage, without trailing slash",
|
||||
EnvVars: []string{"ACCOUNTS_STORAGE_CS3_DRIVER_URL"},
|
||||
Destination: &cfg.Repo.CS3.DriverURL,
|
||||
Usage: "http endpoint of the metadata storage",
|
||||
EnvVars: []string{"ACCOUNTS_STORAGE_CS3_DATA_URL"},
|
||||
Destination: &cfg.Repo.CS3.DataURL,
|
||||
},
|
||||
&cli.StringFlag{
|
||||
Name: "storage-cs3-data-prefix",
|
||||
|
||||
@@ -3,7 +3,6 @@ package service
|
||||
import (
|
||||
"context"
|
||||
"fmt"
|
||||
"github.com/owncloud/ocis/accounts/pkg/storage"
|
||||
"path/filepath"
|
||||
"regexp"
|
||||
"sync"
|
||||
@@ -17,6 +16,7 @@ import (
|
||||
merrors "github.com/micro/go-micro/v2/errors"
|
||||
"github.com/owncloud/ocis/accounts/pkg/proto/v0"
|
||||
"github.com/owncloud/ocis/accounts/pkg/provider"
|
||||
"github.com/owncloud/ocis/accounts/pkg/storage"
|
||||
"github.com/owncloud/ocis/ocis-pkg/roles"
|
||||
settings "github.com/owncloud/ocis/settings/pkg/proto/v0"
|
||||
settings_svc "github.com/owncloud/ocis/settings/pkg/service/v0"
|
||||
|
||||
@@ -218,11 +218,11 @@ func (r CS3Repo) authenticate(ctx context.Context) (token string, err error) {
|
||||
}
|
||||
|
||||
func (r CS3Repo) accountURL(id string) string {
|
||||
return singleJoiningSlash(r.cfg.Repo.CS3.DriverURL, path.Join(r.cfg.Repo.CS3.DataPrefix, accountsFolder, id))
|
||||
return singleJoiningSlash(r.cfg.Repo.CS3.DataURL, path.Join(r.cfg.Repo.CS3.DataPrefix, accountsFolder, id))
|
||||
}
|
||||
|
||||
func (r CS3Repo) groupURL(id string) string {
|
||||
return singleJoiningSlash(r.cfg.Repo.CS3.DriverURL, path.Join(r.cfg.Repo.CS3.DataPrefix, groupsFolder, id))
|
||||
return singleJoiningSlash(r.cfg.Repo.CS3.DataURL, path.Join(r.cfg.Repo.CS3.DataPrefix, groupsFolder, id))
|
||||
}
|
||||
|
||||
func (r CS3Repo) makeRootDirIfNotExist(ctx context.Context, folder string) error {
|
||||
|
||||
@@ -17,7 +17,7 @@ package storage
|
||||
// Repo: config.Repo{
|
||||
// CS3: config.CS3{
|
||||
// ProviderAddr: "0.0.0.0:9215",
|
||||
// DriverURL: "http://localhost:9216",
|
||||
// DataURL: "http://localhost:9216",
|
||||
// DataPrefix: "data",
|
||||
// },
|
||||
// },
|
||||
|
||||
@@ -3,12 +3,12 @@ package storage
|
||||
import (
|
||||
"context"
|
||||
"encoding/json"
|
||||
"github.com/owncloud/ocis/accounts/pkg/config"
|
||||
"io/ioutil"
|
||||
"os"
|
||||
"path/filepath"
|
||||
"sync"
|
||||
|
||||
"github.com/owncloud/ocis/accounts/pkg/config"
|
||||
"github.com/owncloud/ocis/accounts/pkg/proto/v0"
|
||||
olog "github.com/owncloud/ocis/ocis-pkg/log"
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user