Fix config variable naming

This commit is contained in:
Benedikt Kulmann
2020-10-01 08:37:09 +02:00
parent 9c64f6a0b5
commit 60a3f3cc6e
6 changed files with 11 additions and 11 deletions
+1 -1
View File
@@ -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
}
+5 -5
View File
@@ -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",
+1 -1
View File
@@ -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"
+2 -2
View File
@@ -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 {
+1 -1
View File
@@ -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",
// },
// },
+1 -1
View File
@@ -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"
)