Rename commands and flagset

This commit is contained in:
Michael Barz committed 2020-10-06 13:41:34 +02:00
1 parent 9ff3ffe19f
commit e946819c3a
47 files changed
+471 -471

No files matched your search

+13 -13
View File
@@ -2,7 +2,7 @@ package flagset
import (
"github.com/micro/cli/v2"
"github.com/owncloud/ocis/ocis-reva/pkg/config"
"github.com/owncloud/ocis/storage/pkg/config"
)
// AuthBasicWithConfig applies cfg to the root flagset
@@ -14,7 +14,7 @@ func AuthBasicWithConfig(cfg *config.Config) []cli.Flag {
Name: "debug-addr",
Value: "0.0.0.0:9147",
Usage: "Address to bind debug server",
EnvVars: []string{"REVA_AUTH_BASIC_DEBUG_ADDR"},
EnvVars: []string{"STORAGE_AUTH_BASIC_DEBUG_ADDR"},
Destination: &cfg.Reva.AuthBasic.DebugAddr,
},
@@ -24,14 +24,14 @@ func AuthBasicWithConfig(cfg *config.Config) []cli.Flag {
Name: "auth-driver",
Value: "ldap",
Usage: "auth driver: 'demo', 'json' or 'ldap'",
EnvVars: []string{"REVA_AUTH_DRIVER"},
EnvVars: []string{"STORAGE_AUTH_DRIVER"},
Destination: &cfg.Reva.AuthProvider.Driver,
},
&cli.StringFlag{
Name: "auth-json",
Value: "",
Usage: "Path to users.json file",
EnvVars: []string{"REVA_AUTH_JSON"},
EnvVars: []string{"STORAGE_AUTH_JSON"},
Destination: &cfg.Reva.AuthProvider.JSON,
},
@@ -42,36 +42,36 @@ func AuthBasicWithConfig(cfg *config.Config) []cli.Flag {
&cli.StringFlag{
Name: "network",
Value: "tcp",
Usage: "Network to use for the reva auth-basic service, can be 'tcp', 'udp' or 'unix'",
EnvVars: []string{"REVA_AUTH_BASIC_NETWORK"},
Usage: "Network to use for the storage auth-basic service, can be 'tcp', 'udp' or 'unix'",
EnvVars: []string{"STORAGE_AUTH_BASIC_NETWORK"},
Destination: &cfg.Reva.AuthBasic.Network,
},
&cli.StringFlag{
Name: "protocol",
Value: "grpc",
Usage: "protocol for reva service, can be 'http' or 'grpc'",
EnvVars: []string{"REVA_AUTH_BASIC_PROTOCOL"},
Usage: "protocol for storage service, can be 'http' or 'grpc'",
EnvVars: []string{"STORAGE_AUTH_BASIC_PROTOCOL"},
Destination: &cfg.Reva.AuthBasic.Protocol,
},
&cli.StringFlag{
Name: "addr",
Value: "0.0.0.0:9146",
Usage: "Address to bind reva service",
EnvVars: []string{"REVA_AUTH_BASIC_ADDR"},
Usage: "Address to bind storage service",
EnvVars: []string{"STORAGE_AUTH_BASIC_ADDR"},
Destination: &cfg.Reva.AuthBasic.Addr,
},
&cli.StringFlag{
Name: "url",
Value: "localhost:9146",
Usage: "URL to use for the reva service",
EnvVars: []string{"REVA_AUTH_BASIC_URL"},
Usage: "URL to use for the storage service",
EnvVars: []string{"STORAGE_AUTH_BASIC_URL"},
Destination: &cfg.Reva.AuthBasic.URL,
},
&cli.StringSliceFlag{
Name: "service",
Value: cli.NewStringSlice("authprovider"),
Usage: "--service authprovider [--service otherservice]",
EnvVars: []string{"REVA_AUTH_BASIC_SERVICES"},
EnvVars: []string{"STORAGE_AUTH_BASIC_SERVICES"},
},
}
+17 -17
View File
@@ -2,7 +2,7 @@ package flagset
import (
"github.com/micro/cli/v2"
"github.com/owncloud/ocis/ocis-reva/pkg/config"
"github.com/owncloud/ocis/storage/pkg/config"
)
// AuthBearerWithConfig applies cfg to the root flagset
@@ -14,7 +14,7 @@ func AuthBearerWithConfig(cfg *config.Config) []cli.Flag {
Name: "debug-addr",
Value: "0.0.0.0:9149",
Usage: "Address to bind debug server",
EnvVars: []string{"REVA_AUTH_BEARER_DEBUG_ADDR"},
EnvVars: []string{"STORAGE_AUTH_BEARER_DEBUG_ADDR"},
Destination: &cfg.Reva.AuthBearer.DebugAddr,
},
@@ -24,14 +24,14 @@ func AuthBearerWithConfig(cfg *config.Config) []cli.Flag {
Name: "oidc-issuer",
Value: "https://localhost:9200",
Usage: "OIDC issuer",
EnvVars: []string{"REVA_OIDC_ISSUER"},
EnvVars: []string{"STORAGE_OIDC_ISSUER"},
Destination: &cfg.Reva.OIDC.Issuer,
},
&cli.BoolFlag{
Name: "oidc-insecure",
Value: true,
Usage: "OIDC allow insecure communication",
EnvVars: []string{"REVA_OIDC_INSECURE"},
EnvVars: []string{"STORAGE_OIDC_INSECURE"},
Destination: &cfg.Reva.OIDC.Insecure,
},
&cli.StringFlag{
@@ -40,25 +40,25 @@ func AuthBearerWithConfig(cfg *config.Config) []cli.Flag {
// the user manager needs to take care of the sub to user metadata lookup, which ldap cannot do
// TODO sub is stable and defined as unique.
// AFAICT we want to use the account id from ocis-accounts
// TODO add an ocis middleware to reva that changes the users opaqueid?
// TODO add an ocis middleware to storage that changes the users opaqueid?
// TODO add an ocis-accounts backed user manager
Value: "preferred_username",
Usage: "OIDC id claim",
EnvVars: []string{"REVA_OIDC_ID_CLAIM"},
EnvVars: []string{"STORAGE_OIDC_ID_CLAIM"},
Destination: &cfg.Reva.OIDC.IDClaim,
},
&cli.StringFlag{
Name: "oidc-uid-claim",
Value: "",
Usage: "OIDC uid claim",
EnvVars: []string{"REVA_OIDC_UID_CLAIM"},
EnvVars: []string{"STORAGE_OIDC_UID_CLAIM"},
Destination: &cfg.Reva.OIDC.UIDClaim,
},
&cli.StringFlag{
Name: "oidc-gid-claim",
Value: "",
Usage: "OIDC gid claim",
EnvVars: []string{"REVA_OIDC_GID_CLAIM"},
EnvVars: []string{"STORAGE_OIDC_GID_CLAIM"},
Destination: &cfg.Reva.OIDC.GIDClaim,
},
@@ -69,36 +69,36 @@ func AuthBearerWithConfig(cfg *config.Config) []cli.Flag {
&cli.StringFlag{
Name: "network",
Value: "tcp",
Usage: "Network to use for the reva service, can be 'tcp', 'udp' or 'unix'",
EnvVars: []string{"REVA_AUTH_BEARER_NETWORK"},
Usage: "Network to use for the storage service, can be 'tcp', 'udp' or 'unix'",
EnvVars: []string{"STORAGE_AUTH_BEARER_NETWORK"},
Destination: &cfg.Reva.AuthBearer.Network,
},
&cli.StringFlag{
Name: "protocol",
Value: "grpc",
Usage: "protocol for reva service, can be 'http' or 'grpc'",
EnvVars: []string{"REVA_AUTH_BEARER_PROTOCOL"},
Usage: "protocol for storage service, can be 'http' or 'grpc'",
EnvVars: []string{"STORAGE_AUTH_BEARER_PROTOCOL"},
Destination: &cfg.Reva.AuthBearer.Protocol,
},
&cli.StringFlag{
Name: "addr",
Value: "0.0.0.0:9148",
Usage: "Address to bind reva service",
EnvVars: []string{"REVA_AUTH_BEARER_ADDR"},
Usage: "Address to bind storage service",
EnvVars: []string{"STORAGE_AUTH_BEARER_ADDR"},
Destination: &cfg.Reva.AuthBearer.Addr,
},
&cli.StringFlag{
Name: "url",
Value: "localhost:9148",
Usage: "URL to use for the reva service",
EnvVars: []string{"REVA_AUTH_BEARER_URL"},
Usage: "URL to use for the storage service",
EnvVars: []string{"STORAGE_AUTH_BEARER_URL"},
Destination: &cfg.Reva.AuthBearer.URL,
},
&cli.StringSliceFlag{
Name: "service",
Value: cli.NewStringSlice("authprovider"), // TODO preferences
Usage: "--service authprovider [--service otherservice]",
EnvVars: []string{"REVA_AUTH_BEARER_SERVICES"},
EnvVars: []string{"STORAGE_AUTH_BEARER_SERVICES"},
},
}
+4 -4
View File
@@ -2,7 +2,7 @@ package flagset
import (
"github.com/micro/cli/v2"
"github.com/owncloud/ocis/ocis-reva/pkg/config"
"github.com/owncloud/ocis/storage/pkg/config"
)
// DebugWithConfig applies common debug config cfg to the flagset
@@ -12,19 +12,19 @@ func DebugWithConfig(cfg *config.Config) []cli.Flag {
Name: "debug-token",
Value: "",
Usage: "Token to grant metrics access",
EnvVars: []string{"REVA_DEBUG_TOKEN"},
EnvVars: []string{"STORAGE_DEBUG_TOKEN"},
Destination: &cfg.Debug.Token,
},
&cli.BoolFlag{
Name: "debug-pprof",
Usage: "Enable pprof debugging",
EnvVars: []string{"REVA_DEBUG_PPROF"},
EnvVars: []string{"STORAGE_DEBUG_PPROF"},
Destination: &cfg.Debug.Pprof,
},
&cli.BoolFlag{
Name: "debug-zpages",
Usage: "Enable zpages debugging",
EnvVars: []string{"REVA_DEBUG_ZPAGES"},
EnvVars: []string{"STORAGE_DEBUG_ZPAGES"},
Destination: &cfg.Debug.Zpages,
},
}
+20 -20
View File
@@ -4,7 +4,7 @@ import (
"os"
"github.com/micro/cli/v2"
"github.com/owncloud/ocis/ocis-reva/pkg/config"
"github.com/owncloud/ocis/storage/pkg/config"
)
// DriverEOSWithConfig applies cfg to the root flagset
@@ -15,118 +15,118 @@ func DriverEOSWithConfig(cfg *config.Config) []cli.Flag {
Name: "storage-eos-namespace",
Value: "/eos/dockertest/reva",
Usage: "Namespace for metadata operations",
EnvVars: []string{"REVA_STORAGE_EOS_NAMESPACE"},
EnvVars: []string{"STORAGE_STORAGE_EOS_NAMESPACE"},
Destination: &cfg.Reva.Storages.EOS.Root,
},
&cli.StringFlag{
Name: "storage-eos-shadow-namespace",
// Defaults to path.Join(c.Namespace, ".shadow")
Usage: "Shadow namespace where share references are stored",
EnvVars: []string{"REVA_STORAGE_EOS_SHADOW_NAMESPACE"},
EnvVars: []string{"STORAGE_STORAGE_EOS_SHADOW_NAMESPACE"},
Destination: &cfg.Reva.Storages.EOS.ShadowNamespace,
},
&cli.StringFlag{
Name: "storage-eos-share-folder",
Value: "/Shares",
Usage: "name of the share folder",
EnvVars: []string{"REVA_STORAGE_EOS_SHARE_FOLDER"},
EnvVars: []string{"STORAGE_STORAGE_EOS_SHARE_FOLDER"},
Destination: &cfg.Reva.Storages.EOS.ShareFolder,
},
&cli.StringFlag{
Name: "storage-eos-binary",
Value: "/usr/bin/eos",
Usage: "Location of the eos binary",
EnvVars: []string{"REVA_STORAGE_EOS_BINARY"},
EnvVars: []string{"STORAGE_STORAGE_EOS_BINARY"},
Destination: &cfg.Reva.Storages.EOS.EosBinary,
},
&cli.StringFlag{
Name: "storage-eos-xrdcopy-binary",
Value: "/usr/bin/xrdcopy",
Usage: "Location of the xrdcopy binary",
EnvVars: []string{"REVA_STORAGE_EOS_XRDCOPY_BINARY"},
EnvVars: []string{"STORAGE_STORAGE_EOS_XRDCOPY_BINARY"},
Destination: &cfg.Reva.Storages.EOS.XrdcopyBinary,
},
&cli.StringFlag{
Name: "storage-eos-master-url",
Value: "root://eos-mgm1.eoscluster.cern.ch:1094",
Usage: "URL of the Master EOS MGM",
EnvVars: []string{"REVA_STORAGE_EOS_MASTER_URL"},
EnvVars: []string{"STORAGE_STORAGE_EOS_MASTER_URL"},
Destination: &cfg.Reva.Storages.EOS.MasterURL,
},
&cli.StringFlag{
Name: "storage-eos-slave-url",
Value: "root://eos-mgm1.eoscluster.cern.ch:1094",
Usage: "URL of the Slave EOS MGM",
EnvVars: []string{"REVA_STORAGE_EOS_SLAVE_URL"},
EnvVars: []string{"STORAGE_STORAGE_EOS_SLAVE_URL"},
Destination: &cfg.Reva.Storages.EOS.SlaveURL,
},
&cli.StringFlag{
Name: "storage-eos-cache-directory",
Value: os.TempDir(),
Usage: "Location on the local fs where to store reads",
EnvVars: []string{"REVA_STORAGE_EOS_CACHE_DIRECTORY"},
EnvVars: []string{"STORAGE_STORAGE_EOS_CACHE_DIRECTORY"},
Destination: &cfg.Reva.Storages.EOS.CacheDirectory,
},
&cli.BoolFlag{
Name: "storage-eos-enable-logging",
Usage: "Enables logging of the commands executed",
EnvVars: []string{"REVA_STORAGE_EOS_ENABLE_LOGGING"},
EnvVars: []string{"STORAGE_STORAGE_EOS_ENABLE_LOGGING"},
Destination: &cfg.Reva.Storages.EOS.EnableLogging,
},
&cli.BoolFlag{
Name: "storage-eos-show-hidden-sysfiles",
Usage: "show internal EOS files like .sys.v# and .sys.a# files.",
EnvVars: []string{"REVA_STORAGE_EOS_SHOW_HIDDEN_SYSFILES"},
EnvVars: []string{"STORAGE_STORAGE_EOS_SHOW_HIDDEN_SYSFILES"},
Destination: &cfg.Reva.Storages.EOS.ShowHiddenSysFiles,
},
&cli.BoolFlag{
Name: "storage-eos-force-singleuser-mode",
Usage: "force connections to EOS to use SingleUsername",
EnvVars: []string{"REVA_STORAGE_EOS_FORCE_SINGLEUSER_MODE"},
EnvVars: []string{"STORAGE_STORAGE_EOS_FORCE_SINGLEUSER_MODE"},
Destination: &cfg.Reva.Storages.EOS.ForceSingleUserMode,
},
&cli.BoolFlag{
Name: "storage-eos-use-keytab",
Usage: "authenticate requests by using an EOS keytab",
EnvVars: []string{"REVA_STORAGE_EOS_USE_KEYTAB"},
EnvVars: []string{"STORAGE_STORAGE_EOS_USE_KEYTAB"},
Destination: &cfg.Reva.Storages.EOS.UseKeytab,
},
&cli.BoolFlag{
Name: "storage-eos-enable-home",
Usage: "enable the creation of home directories",
EnvVars: []string{"REVA_STORAGE_EOS_ENABLE_HOME"},
EnvVars: []string{"STORAGE_STORAGE_EOS_ENABLE_HOME"},
Destination: &cfg.Reva.Storages.EOS.EnableHome,
},
&cli.StringFlag{
Name: "storage-eos-sec-protocol",
Usage: "the xrootd security protocol to use between the server and EOS",
EnvVars: []string{"REVA_STORAGE_EOS_SEC_PROTOCOL"},
EnvVars: []string{"STORAGE_STORAGE_EOS_SEC_PROTOCOL"},
Destination: &cfg.Reva.Storages.EOS.SecProtocol,
},
&cli.StringFlag{
Name: "storage-eos-keytab",
Usage: "the location of the keytab to use to authenticate to EOS",
EnvVars: []string{"REVA_STORAGE_EOS_KEYTAB"},
EnvVars: []string{"STORAGE_STORAGE_EOS_KEYTAB"},
Destination: &cfg.Reva.Storages.EOS.Keytab,
},
&cli.StringFlag{
Name: "storage-eos-single-username",
Usage: "the username to use when SingleUserMode is enabled",
EnvVars: []string{"REVA_STORAGE_EOS_SINGLE_USERNAME"},
EnvVars: []string{"STORAGE_STORAGE_EOS_SINGLE_USERNAME"},
Destination: &cfg.Reva.Storages.EOS.SingleUsername,
},
&cli.StringFlag{
Name: "storage-eos-layout",
Value: "{{substr 0 1 .Username}}/{{.Username}}",
Usage: `"layout of the users home dir path on disk, in addition to {{.Username}}, {{.UsernameLower}} and {{.Provider}} also supports prefixing dirs: "{{.UsernamePrefixCount.2}}/{{.UsernameLower}}" will turn "Einstein" into "Ei/Einstein" `,
EnvVars: []string{"REVA_STORAGE_EOS_LAYOUT"},
EnvVars: []string{"STORAGE_STORAGE_EOS_LAYOUT"},
Destination: &cfg.Reva.Storages.EOS.UserLayout,
},
&cli.StringFlag{
Name: "storage-eos-gatewaysvc",
Value: "localhost:9142",
Usage: "URL to use for the reva gateway service",
EnvVars: []string{"REVA_STORAGE_EOS_GATEWAYSVC"},
Usage: "URL to use for the storage gateway service",
EnvVars: []string{"STORAGE_STORAGE_EOS_GATEWAYSVC"},
Destination: &cfg.Reva.Storages.EOS.GatewaySVC,
},
}
+3 -3
View File
@@ -2,7 +2,7 @@ package flagset
import (
"github.com/micro/cli/v2"
"github.com/owncloud/ocis/ocis-reva/pkg/config"
"github.com/owncloud/ocis/storage/pkg/config"
)
// DriverLocalWithConfig applies cfg to the root flagset
@@ -10,9 +10,9 @@ func DriverLocalWithConfig(cfg *config.Config) []cli.Flag {
return []cli.Flag{
&cli.StringFlag{
Name: "storage-local-root",
Value: "/var/tmp/reva/root",
Value: "/var/tmp/ocis/local",
Usage: "the path to the local storage root",
EnvVars: []string{"REVA_STORAGE_LOCAL_ROOT"},
EnvVars: []string{"STORAGE_STORAGE_LOCAL_ROOT"},
Destination: &cfg.Reva.Storages.Local.Root,
},
}
+5 -5
View File
@@ -2,7 +2,7 @@ package flagset
import (
"github.com/micro/cli/v2"
"github.com/owncloud/ocis/ocis-reva/pkg/config"
"github.com/owncloud/ocis/storage/pkg/config"
)
// DriverOCISWithConfig applies cfg to the root flagset
@@ -10,23 +10,23 @@ func DriverOCISWithConfig(cfg *config.Config) []cli.Flag {
return []cli.Flag{
&cli.StringFlag{
Name: "storage-ocis-root",
Value: "/var/tmp/ocis/root",
Value: "/var/tmp/ocis/storage/users",
Usage: "the path to the local storage root",
EnvVars: []string{"REVA_STORAGE_OCIS_ROOT"},
EnvVars: []string{"STORAGE_STORAGE_OCIS_ROOT"},
Destination: &cfg.Reva.Storages.Common.Root,
},
&cli.BoolFlag{
Name: "storage-ocis-enable-home",
Value: false,
Usage: "enable the creation of home storages",
EnvVars: []string{"REVA_STORAGE_OCIS_ENABLE_HOME"},
EnvVars: []string{"STORAGE_STORAGE_OCIS_ENABLE_HOME"},
Destination: &cfg.Reva.Storages.Common.EnableHome,
},
&cli.StringFlag{
Name: "storage-ocis-layout",
Value: "{{.Id.OpaqueId}}",
Usage: `"layout of the users home dir path on disk, in addition to {{.Username}}, {{.Mail}}, {{.Id.OpaqueId}}, {{.Id.Idp}} also supports prefixing dirs: "{{substr 0 1 .Username}}/{{.Username}}" will turn "Einstein" into "Ei/Einstein" `,
EnvVars: []string{"REVA_STORAGE_OCIS_LAYOUT"},
EnvVars: []string{"STORAGE_STORAGE_OCIS_LAYOUT"},
Destination: &cfg.Reva.Storages.Common.UserLayout,
},
}
+10 -10
View File
@@ -2,7 +2,7 @@ package flagset
import (
"github.com/micro/cli/v2"
"github.com/owncloud/ocis/ocis-reva/pkg/config"
"github.com/owncloud/ocis/storage/pkg/config"
)
// DriverOwnCloudWithConfig applies cfg to the root flagset
@@ -10,51 +10,51 @@ func DriverOwnCloudWithConfig(cfg *config.Config) []cli.Flag {
return []cli.Flag{
&cli.StringFlag{
Name: "storage-owncloud-datadir",
Value: "/var/tmp/reva/data",
Value: "/var/tmp/ocis/data",
Usage: "the path to the owncloud data directory",
EnvVars: []string{"REVA_STORAGE_OWNCLOUD_DATADIR"},
EnvVars: []string{"STORAGE_STORAGE_OWNCLOUD_DATADIR"},
Destination: &cfg.Reva.Storages.OwnCloud.Root,
},
&cli.StringFlag{
Name: "storage-owncloud-uploadinfo-dir",
Value: "/var/tmp/reva/uploadinfo",
Value: "/var/tmp/ocis/uploadinfo",
Usage: "the path to the tus upload info directory",
EnvVars: []string{"REVA_STORAGE_OWNCLOUD_UPLOADINFO_DIR"},
EnvVars: []string{"STORAGE_STORAGE_OWNCLOUD_UPLOADINFO_DIR"},
Destination: &cfg.Reva.Storages.OwnCloud.UploadInfoDir,
},
&cli.StringFlag{
Name: "storage-owncloud-share-folder",
Value: "/Shares",
Usage: "name of the shares folder",
EnvVars: []string{"REVA_STORAGE_OWNCLOUD_SHARE_FOLDER"},
EnvVars: []string{"STORAGE_STORAGE_OWNCLOUD_SHARE_FOLDER"},
Destination: &cfg.Reva.Storages.OwnCloud.ShareFolder,
},
&cli.BoolFlag{
Name: "storage-owncloud-scan",
Value: true,
Usage: "scan files on startup to add fileids",
EnvVars: []string{"REVA_STORAGE_OWNCLOUD_SCAN"},
EnvVars: []string{"STORAGE_STORAGE_OWNCLOUD_SCAN"},
Destination: &cfg.Reva.Storages.OwnCloud.Scan,
},
&cli.StringFlag{
Name: "storage-owncloud-redis",
Value: ":6379",
Usage: "the address of the redis server",
EnvVars: []string{"REVA_STORAGE_OWNCLOUD_REDIS_ADDR"},
EnvVars: []string{"STORAGE_STORAGE_OWNCLOUD_REDIS_ADDR"},
Destination: &cfg.Reva.Storages.OwnCloud.Redis,
},
&cli.BoolFlag{
Name: "storage-owncloud-enable-home",
Value: false,
Usage: "enable the creation of home storages",
EnvVars: []string{"REVA_STORAGE_OWNCLOUD_ENABLE_HOME"},
EnvVars: []string{"STORAGE_STORAGE_OWNCLOUD_ENABLE_HOME"},
Destination: &cfg.Reva.Storages.OwnCloud.EnableHome,
},
&cli.StringFlag{
Name: "storage-owncloud-layout",
Value: "{{.Id.OpaqueId}}",
Usage: `"layout of the users home dir path on disk, in addition to {{.Username}}, {{.Mail}}, {{.Id.OpaqueId}}, {{.Id.Idp}} also supports prefixing dirs: "{{substr 0 1 .Username}}/{{.Username}}" will turn "Einstein" into "Ei/Einstein" `,
EnvVars: []string{"REVA_STORAGE_OWNCLOUD_LAYOUT"},
EnvVars: []string{"STORAGE_STORAGE_OWNCLOUD_LAYOUT"},
Destination: &cfg.Reva.Storages.OwnCloud.UserLayout,
},
}
+20 -20
View File
@@ -2,7 +2,7 @@ package flagset
import (
"github.com/micro/cli/v2"
"github.com/owncloud/ocis/ocis-reva/pkg/config"
"github.com/owncloud/ocis/storage/pkg/config"
)
// FrontendWithConfig applies cfg to the root flagset
@@ -14,7 +14,7 @@ func FrontendWithConfig(cfg *config.Config) []cli.Flag {
Name: "debug-addr",
Value: "0.0.0.0:9141",
Usage: "Address to bind debug server",
EnvVars: []string{"REVA_FRONTEND_DEBUG_ADDR"},
EnvVars: []string{"STORAGE_FRONTEND_DEBUG_ADDR"},
Destination: &cfg.Reva.Frontend.DebugAddr,
},
@@ -24,7 +24,7 @@ func FrontendWithConfig(cfg *config.Config) []cli.Flag {
Name: "transfer-secret",
Value: "replace-me-with-a-transfer-secret",
Usage: "Transfer secret for datagateway",
EnvVars: []string{"REVA_TRANSFER_SECRET"},
EnvVars: []string{"STORAGE_TRANSFER_SECRET"},
Destination: &cfg.Reva.TransferSecret,
},
@@ -55,56 +55,56 @@ func FrontendWithConfig(cfg *config.Config) []cli.Flag {
&cli.StringFlag{
Name: "network",
Value: "tcp",
Usage: "Network to use for the reva service, can be 'tcp', 'udp' or 'unix'",
EnvVars: []string{"REVA_FRONTEND_NETWORK"},
Usage: "Network to use for the storage service, can be 'tcp', 'udp' or 'unix'",
EnvVars: []string{"STORAGE_FRONTEND_NETWORK"},
Destination: &cfg.Reva.Frontend.Network,
},
&cli.StringFlag{
Name: "protocol",
Value: "http",
Usage: "protocol for reva service, can be 'http' or 'grpc'",
EnvVars: []string{"REVA_FRONTEND_PROTOCOL"},
Usage: "protocol for storage service, can be 'http' or 'grpc'",
EnvVars: []string{"STORAGE_FRONTEND_PROTOCOL"},
Destination: &cfg.Reva.Frontend.Protocol,
},
&cli.StringFlag{
Name: "addr",
Value: "0.0.0.0:9140",
Usage: "Address to bind reva service",
EnvVars: []string{"REVA_FRONTEND_ADDR"},
Usage: "Address to bind storage service",
EnvVars: []string{"STORAGE_FRONTEND_ADDR"},
Destination: &cfg.Reva.Frontend.Addr,
},
&cli.StringFlag{
Name: "url",
Value: "https://localhost:9200",
Usage: "URL to use for the reva service",
EnvVars: []string{"REVA_FRONTEND_URL"},
Usage: "URL to use for the storage service",
EnvVars: []string{"STORAGE_FRONTEND_URL"},
Destination: &cfg.Reva.Frontend.URL,
},
&cli.StringSliceFlag{
Name: "service",
Value: cli.NewStringSlice("datagateway", "ocdav", "ocs"),
Usage: "--service ocdav [--service ocs]",
EnvVars: []string{"REVA_FRONTEND_SERVICES"},
EnvVars: []string{"STORAGE_FRONTEND_SERVICES"},
},
&cli.StringFlag{
Name: "datagateway-prefix",
Value: "data",
Usage: "datagateway prefix",
EnvVars: []string{"REVA_FRONTEND_DATAGATEWAY_PREFIX"},
EnvVars: []string{"STORAGE_FRONTEND_DATAGATEWAY_PREFIX"},
Destination: &cfg.Reva.Frontend.DatagatewayPrefix,
},
&cli.StringFlag{
Name: "ocdav-prefix",
Value: "",
Usage: "owncloud webdav endpoint prefix",
EnvVars: []string{"REVA_FRONTEND_OCDAV_PREFIX"},
EnvVars: []string{"STORAGE_FRONTEND_OCDAV_PREFIX"},
Destination: &cfg.Reva.Frontend.OCDavPrefix,
},
&cli.StringFlag{
Name: "ocs-prefix",
Value: "ocs",
Usage: "open collaboration services endpoint prefix",
EnvVars: []string{"REVA_FRONTEND_OCS_PREFIX"},
EnvVars: []string{"STORAGE_FRONTEND_OCS_PREFIX"},
Destination: &cfg.Reva.Frontend.OCSPrefix,
},
@@ -113,8 +113,8 @@ func FrontendWithConfig(cfg *config.Config) []cli.Flag {
&cli.StringFlag{
Name: "gateway-url",
Value: "localhost:9142",
Usage: "URL to use for the reva gateway service",
EnvVars: []string{"REVA_GATEWAY_URL"},
Usage: "URL to use for the storage gateway service",
EnvVars: []string{"STORAGE_GATEWAY_URL"},
Destination: &cfg.Reva.Gateway.URL,
},
@@ -123,21 +123,21 @@ func FrontendWithConfig(cfg *config.Config) []cli.Flag {
Name: "upload-disable-tus",
Value: false,
Usage: "Disables TUS upload mechanism",
EnvVars: []string{"REVA_FRONTEND_UPLOAD_DISABLE_TUS"},
EnvVars: []string{"STORAGE_FRONTEND_UPLOAD_DISABLE_TUS"},
Destination: &cfg.Reva.UploadDisableTus,
},
&cli.IntFlag{
Name: "upload-max-chunk-size",
Value: 0,
Usage: "Max chunk size in bytes to advertise to clients through capabilities, or 0 for unlimited",
EnvVars: []string{"REVA_FRONTEND_UPLOAD_MAX_CHUNK_SIZE"},
EnvVars: []string{"STORAGE_FRONTEND_UPLOAD_MAX_CHUNK_SIZE"},
Destination: &cfg.Reva.UploadMaxChunkSize,
},
&cli.StringFlag{
Name: "upload-http-method-override",
Value: "",
Usage: "Specify an HTTP method (ex: POST) that clients should to use when uploading instead of PATCH",
EnvVars: []string{"REVA_FRONTEND_UPLOAD_HTTP_METHOD_OVERRIDE"},
EnvVars: []string{"STORAGE_FRONTEND_UPLOAD_HTTP_METHOD_OVERRIDE"},
Destination: &cfg.Reva.UploadHTTPMethodOverride,
},
}
+50 -50
View File
@@ -2,7 +2,7 @@ package flagset
import (
"github.com/micro/cli/v2"
"github.com/owncloud/ocis/ocis-reva/pkg/config"
"github.com/owncloud/ocis/storage/pkg/config"
)
// GatewayWithConfig applies cfg to the root flagset
@@ -14,7 +14,7 @@ func GatewayWithConfig(cfg *config.Config) []cli.Flag {
Name: "debug-addr",
Value: "0.0.0.0:9143",
Usage: "Address to bind debug server",
EnvVars: []string{"REVA_GATEWAY_DEBUG_ADDR"},
EnvVars: []string{"STORAGE_GATEWAY_DEBUG_ADDR"},
Destination: &cfg.Reva.Gateway.DebugAddr,
},
@@ -24,14 +24,14 @@ func GatewayWithConfig(cfg *config.Config) []cli.Flag {
Name: "transfer-secret",
Value: "replace-me-with-a-transfer-secret",
Usage: "Transfer secret for datagateway",
EnvVars: []string{"REVA_TRANSFER_SECRET"},
EnvVars: []string{"STORAGE_TRANSFER_SECRET"},
Destination: &cfg.Reva.TransferSecret,
},
&cli.IntFlag{
Name: "transfer-expires",
Value: 24 * 60 * 60, // one day
Usage: "Transfer token ttl in seconds",
EnvVars: []string{"REVA_TRANSFER_EXPIRES"},
EnvVars: []string{"STORAGE_TRANSFER_EXPIRES"},
Destination: &cfg.Reva.TransferExpires,
},
@@ -44,43 +44,43 @@ func GatewayWithConfig(cfg *config.Config) []cli.Flag {
&cli.StringFlag{
Name: "network",
Value: "tcp",
Usage: "Network to use for the reva service, can be 'tcp', 'udp' or 'unix'",
EnvVars: []string{"REVA_GATEWAY_NETWORK"},
Usage: "Network to use for the storage service, can be 'tcp', 'udp' or 'unix'",
EnvVars: []string{"STORAGE_GATEWAY_NETWORK"},
Destination: &cfg.Reva.Gateway.Network,
},
&cli.StringFlag{
Name: "protocol",
Value: "grpc",
Usage: "protocol for reva service, can be 'http' or 'grpc'",
EnvVars: []string{"REVA_GATEWAY_PROTOCOL"},
Usage: "protocol for storage service, can be 'http' or 'grpc'",
EnvVars: []string{"STORAGE_GATEWAY_PROTOCOL"},
Destination: &cfg.Reva.Gateway.Protocol,
},
&cli.StringFlag{
Name: "addr",
Value: "0.0.0.0:9142",
Usage: "Address to bind reva service",
EnvVars: []string{"REVA_GATEWAY_ADDR"},
Usage: "Address to bind storage service",
EnvVars: []string{"STORAGE_GATEWAY_ADDR"},
Destination: &cfg.Reva.Gateway.Addr,
},
&cli.StringFlag{
Name: "url",
Value: "localhost:9142",
Usage: "URL to use for the reva service",
EnvVars: []string{"REVA_GATEWAY_URL"},
Usage: "URL to use for the storage service",
EnvVars: []string{"STORAGE_GATEWAY_URL"},
Destination: &cfg.Reva.Gateway.URL,
},
&cli.StringSliceFlag{
Name: "service",
Value: cli.NewStringSlice("gateway", "authregistry", "storageregistry"), // TODO appregistry
Usage: "--service gateway [--service authregistry]",
EnvVars: []string{"REVA_GATEWAY_SERVICES"},
EnvVars: []string{"STORAGE_GATEWAY_SERVICES"},
},
&cli.BoolFlag{
Name: "commit-share-to-storage-grant",
Value: true,
// TODO clarify
Usage: "Commit shares to the share manager",
EnvVars: []string{"REVA_GATEWAY_COMMIT_SHARE_TO_STORAGE_GRANT"},
EnvVars: []string{"STORAGE_GATEWAY_COMMIT_SHARE_TO_STORAGE_GRANT"},
Destination: &cfg.Reva.Gateway.CommitShareToStorageGrant,
},
&cli.BoolFlag{
@@ -88,20 +88,20 @@ func GatewayWithConfig(cfg *config.Config) []cli.Flag {
Value: true,
// TODO clarify
Usage: "Commit shares to the storage",
EnvVars: []string{"REVA_GATEWAY_COMMIT_SHARE_TO_STORAGE_REF"},
EnvVars: []string{"STORAGE_GATEWAY_COMMIT_SHARE_TO_STORAGE_REF"},
Destination: &cfg.Reva.Gateway.CommitShareToStorageRef,
},
&cli.StringFlag{
Name: "share-folder",
Value: "Shares",
Usage: "mount shares in this folder of the home storage provider",
EnvVars: []string{"REVA_GATEWAY_SHARE_FOLDER"},
EnvVars: []string{"STORAGE_GATEWAY_SHARE_FOLDER"},
Destination: &cfg.Reva.Gateway.ShareFolder,
},
&cli.BoolFlag{
Name: "disable-home-creation-on-login",
Usage: "Disable creation of home folder on login",
EnvVars: []string{"REVA_GATEWAY_DISABLE_HOME_CREATION_ON_LOGIN"},
EnvVars: []string{"STORAGE_GATEWAY_DISABLE_HOME_CREATION_ON_LOGIN"},
Destination: &cfg.Reva.Gateway.DisableHomeCreationOnLogin,
},
@@ -113,152 +113,152 @@ func GatewayWithConfig(cfg *config.Config) []cli.Flag {
Name: "storage-registry-driver",
Value: "static",
Usage: "driver of the storage registry",
EnvVars: []string{"REVA_STORAGE_REGISTRY_DRIVER"},
EnvVars: []string{"STORAGE_STORAGE_REGISTRY_DRIVER"},
Destination: &cfg.Reva.StorageRegistry.Driver,
},
&cli.StringSliceFlag{
Name: "storage-registry-rule",
Value: cli.NewStringSlice(),
Usage: `Replaces the generated storage registry rules with this set: --storage-registry-rule "/eos=localhost:9158" [--storage-registry-rule "1284d238-aa92-42ce-bdc4-0b0000009162=localhost:9162"]`,
EnvVars: []string{"REVA_STORAGE_REGISTRY_RULES"},
EnvVars: []string{"STORAGE_STORAGE_REGISTRY_RULES"},
},
&cli.StringFlag{
Name: "storage-home-provider",
Value: "/home",
Usage: "mount point of the storage provider for user homes in the global namespace",
EnvVars: []string{"REVA_STORAGE_HOME_PROVIDER"},
EnvVars: []string{"STORAGE_STORAGE_HOME_PROVIDER"},
Destination: &cfg.Reva.StorageRegistry.HomeProvider,
},
&cli.StringFlag{
Name: "frontend-url",
Value: "https://localhost:9200",
Usage: "URL to use for the reva service",
EnvVars: []string{"REVA_FRONTEND_URL"},
Usage: "URL to use for the storage service",
EnvVars: []string{"STORAGE_FRONTEND_URL"},
Destination: &cfg.Reva.Frontend.URL,
},
&cli.StringFlag{
Name: "datagateway-url",
Value: "https://localhost:9200/data",
Usage: "URL to use for the reva datagateway",
EnvVars: []string{"REVA_DATAGATEWAY_URL"},
Usage: "URL to use for the storage datagateway",
EnvVars: []string{"STORAGE_DATAGATEWAY_URL"},
Destination: &cfg.Reva.DataGateway.URL,
},
&cli.StringFlag{
Name: "users-url",
Value: "localhost:9144",
Usage: "URL to use for the reva service",
EnvVars: []string{"REVA_USERS_URL"},
Usage: "URL to use for the storage service",
EnvVars: []string{"STORAGE_USERS_URL"},
Destination: &cfg.Reva.Users.URL,
},
&cli.StringFlag{
Name: "auth-basic-url",
Value: "localhost:9146",
Usage: "URL to use for the reva service",
EnvVars: []string{"REVA_AUTH_BASIC_URL"},
Usage: "URL to use for the storage service",
EnvVars: []string{"STORAGE_AUTH_BASIC_URL"},
Destination: &cfg.Reva.AuthBasic.URL,
},
&cli.StringFlag{
Name: "auth-bearer-url",
Value: "localhost:9148",
Usage: "URL to use for the reva service",
EnvVars: []string{"REVA_AUTH_BEARER_URL"},
Usage: "URL to use for the storage service",
EnvVars: []string{"STORAGE_AUTH_BEARER_URL"},
Destination: &cfg.Reva.AuthBearer.URL,
},
&cli.StringFlag{
Name: "sharing-url",
Value: "localhost:9150",
Usage: "URL to use for the reva service",
EnvVars: []string{"REVA_SHARING_URL"},
Usage: "URL to use for the storage service",
EnvVars: []string{"STORAGE_SHARING_URL"},
Destination: &cfg.Reva.Sharing.URL,
},
&cli.StringFlag{
Name: "storage-root-url",
Value: "localhost:9152",
Usage: "URL to use for the reva service",
EnvVars: []string{"REVA_STORAGE_ROOT_URL"},
Usage: "URL to use for the storage service",
EnvVars: []string{"STORAGE_STORAGE_ROOT_URL"},
Destination: &cfg.Reva.StorageRoot.URL,
},
&cli.StringFlag{
Name: "storage-root-mount-path",
Value: "/",
Usage: "mount path",
EnvVars: []string{"REVA_STORAGE_ROOT_MOUNT_PATH"},
EnvVars: []string{"STORAGE_STORAGE_ROOT_MOUNT_PATH"},
Destination: &cfg.Reva.StorageRoot.MountPath,
},
&cli.StringFlag{
Name: "storage-root-mount-id",
Value: "1284d238-aa92-42ce-bdc4-0b0000009152",
Usage: "mount id",
EnvVars: []string{"REVA_STORAGE_ROOT_MOUNT_ID"},
EnvVars: []string{"STORAGE_STORAGE_ROOT_MOUNT_ID"},
Destination: &cfg.Reva.StorageRoot.MountID,
},
&cli.StringFlag{
Name: "storage-home-url",
Value: "localhost:9154",
Usage: "URL to use for the reva service",
EnvVars: []string{"REVA_STORAGE_HOME_URL"},
Usage: "URL to use for the storage service",
EnvVars: []string{"STORAGE_STORAGE_HOME_URL"},
Destination: &cfg.Reva.StorageHome.URL,
},
&cli.StringFlag{
Name: "storage-home-mount-path",
Value: "/home",
Usage: "mount path",
EnvVars: []string{"REVA_STORAGE_HOME_MOUNT_PATH"},
EnvVars: []string{"STORAGE_STORAGE_HOME_MOUNT_PATH"},
Destination: &cfg.Reva.StorageHome.MountPath,
},
&cli.StringFlag{
Name: "storage-home-mount-id",
Value: "1284d238-aa92-42ce-bdc4-0b0000009154",
Usage: "mount id",
EnvVars: []string{"REVA_STORAGE_HOME_MOUNT_ID"},
EnvVars: []string{"STORAGE_STORAGE_HOME_MOUNT_ID"},
Destination: &cfg.Reva.StorageHome.MountID,
},
&cli.StringFlag{
Name: "storage-eos-url",
Value: "localhost:9158",
Usage: "URL to use for the reva service",
EnvVars: []string{"REVA_STORAGE_EOS_URL"},
Usage: "URL to use for the storage service",
EnvVars: []string{"STORAGE_STORAGE_EOS_URL"},
Destination: &cfg.Reva.StorageEOS.URL,
},
&cli.StringFlag{
Name: "storage-eos-mount-path",
Value: "/eos",
Usage: "mount path",
EnvVars: []string{"REVA_STORAGE_EOS_MOUNT_PATH"},
EnvVars: []string{"STORAGE_STORAGE_EOS_MOUNT_PATH"},
Destination: &cfg.Reva.StorageEOS.MountPath,
},
&cli.StringFlag{
Name: "storage-eos-mount-id",
Value: "1284d238-aa92-42ce-bdc4-0b0000009158",
Usage: "mount id",
EnvVars: []string{"REVA_STORAGE_EOS_MOUNT_ID"},
EnvVars: []string{"STORAGE_STORAGE_EOS_MOUNT_ID"},
Destination: &cfg.Reva.StorageEOS.MountID,
},
&cli.StringFlag{
Name: "storage-oc-url",
Value: "localhost:9162",
Usage: "URL to use for the reva service",
EnvVars: []string{"REVA_STORAGE_OC_URL"},
Usage: "URL to use for the storage service",
EnvVars: []string{"STORAGE_STORAGE_OC_URL"},
Destination: &cfg.Reva.StorageOC.URL,
},
&cli.StringFlag{
Name: "storage-oc-mount-path",
Value: "/oc",
Usage: "mount path",
EnvVars: []string{"REVA_STORAGE_OC_MOUNT_PATH"},
EnvVars: []string{"STORAGE_STORAGE_OC_MOUNT_PATH"},
Destination: &cfg.Reva.StorageOC.MountPath,
},
&cli.StringFlag{
Name: "storage-oc-mount-id",
Value: "1284d238-aa92-42ce-bdc4-0b0000009162",
Usage: "mount id",
EnvVars: []string{"REVA_STORAGE_OC_MOUNT_ID"},
EnvVars: []string{"STORAGE_STORAGE_OC_MOUNT_ID"},
Destination: &cfg.Reva.StorageOC.MountID,
},
@@ -266,14 +266,14 @@ func GatewayWithConfig(cfg *config.Config) []cli.Flag {
Name: "public-link-url",
Value: "localhost:9178",
Usage: "URL to use for the public links service",
EnvVars: []string{"REVA_STORAGE_PUBLIC_LINK_URL"},
EnvVars: []string{"STORAGE_STORAGE_PUBLIC_LINK_URL"},
Destination: &cfg.Reva.StoragePublicLink.URL,
},
&cli.StringFlag{
Name: "storage-public-link-mount-path",
Value: "/public/",
Usage: "mount path",
EnvVars: []string{"REVA_STORAGE_PUBLIC_LINK_MOUNT_PATH"},
EnvVars: []string{"STORAGE_STORAGE_PUBLIC_LINK_MOUNT_PATH"},
Destination: &cfg.Reva.StoragePublicLink.MountPath,
},
// public-link has no mount id
+2 -2
View File
@@ -2,7 +2,7 @@ package flagset
import (
"github.com/micro/cli/v2"
"github.com/owncloud/ocis/ocis-reva/pkg/config"
"github.com/owncloud/ocis/storage/pkg/config"
)
// HealthWithConfig applies cfg to the health flagset
@@ -12,7 +12,7 @@ func HealthWithConfig(cfg *config.Config) []cli.Flag {
Name: "debug-addr",
Value: "0.0.0.0:9109",
Usage: "Address to debug endpoint",
EnvVars: []string{"REVA_DEBUG_ADDR"},
EnvVars: []string{"STORAGE_DEBUG_ADDR"},
Destination: &cfg.Debug.Addr,
},
}
+19 -19
View File
@@ -2,7 +2,7 @@ package flagset
import (
"github.com/micro/cli/v2"
"github.com/owncloud/ocis/ocis-reva/pkg/config"
"github.com/owncloud/ocis/storage/pkg/config"
)
// LDAPWithConfig applies LDAP cfg to the flagset
@@ -12,79 +12,79 @@ func LDAPWithConfig(cfg *config.Config) []cli.Flag {
Name: "ldap-hostname",
Value: "localhost",
Usage: "LDAP hostname",
EnvVars: []string{"REVA_LDAP_HOSTNAME"},
EnvVars: []string{"STORAGE_LDAP_HOSTNAME"},
Destination: &cfg.Reva.LDAP.Hostname,
},
&cli.IntFlag{
Name: "ldap-port",
Value: 9126,
Usage: "LDAP port",
EnvVars: []string{"REVA_LDAP_PORT"},
EnvVars: []string{"STORAGE_LDAP_PORT"},
Destination: &cfg.Reva.LDAP.Port,
},
&cli.StringFlag{
Name: "ldap-base-dn",
Value: "dc=example,dc=org",
Usage: "LDAP basedn",
EnvVars: []string{"REVA_LDAP_BASE_DN"},
EnvVars: []string{"STORAGE_LDAP_BASE_DN"},
Destination: &cfg.Reva.LDAP.BaseDN,
},
&cli.StringFlag{
Name: "ldap-loginfilter",
Value: "(&(objectclass=posixAccount)(|(cn={{login}})(mail={{login}})))",
Usage: "LDAP login filter",
EnvVars: []string{"REVA_LDAP_LOGINFILTER"},
EnvVars: []string{"STORAGE_LDAP_LOGINFILTER"},
Destination: &cfg.Reva.LDAP.LoginFilter,
},
&cli.StringFlag{
Name: "ldap-userfilter",
Value: "(&(objectclass=posixAccount)(|(ownclouduuid={{.OpaqueId}})(cn={{.OpaqueId}})))",
Usage: "LDAP filter used when getting a user. The CS3 userid properties {{.OpaqueId}} and {{.Idp}} are available.",
EnvVars: []string{"REVA_LDAP_USERFILTER"},
EnvVars: []string{"STORAGE_LDAP_USERFILTER"},
Destination: &cfg.Reva.LDAP.UserFilter,
},
&cli.StringFlag{
Name: "ldap-attributefilter",
Value: "(&(objectclass=posixAccount)({{attr}}={{value}}))",
Usage: "LDAP filter used when searching for a user by claim/attribute. {{attr}} will be replaced with the attribute, {{value}} with the value.",
EnvVars: []string{"REVA_LDAP_ATTRIBUTEFILTER"},
EnvVars: []string{"STORAGE_LDAP_ATTRIBUTEFILTER"},
Destination: &cfg.Reva.LDAP.AttributeFilter,
},
&cli.StringFlag{
Name: "ldap-findfilter",
Value: "(&(objectclass=posixAccount)(|(cn={{query}}*)(displayname={{query}}*)(mail={{query}}*)))",
Usage: "LDAP filter used when searching for recipients. {{query}} will be replaced with the search query",
EnvVars: []string{"REVA_LDAP_FINDFILTER"},
EnvVars: []string{"STORAGE_LDAP_FINDFILTER"},
Destination: &cfg.Reva.LDAP.FindFilter,
},
&cli.StringFlag{
Name: "ldap-groupfilter",
// FIXME the reva implementation needs to use the memberof overlay to get the cn when it only has the uuid,
// FIXME the storage implementation needs to use the memberof overlay to get the cn when it only has the uuid,
// because the ldap schema either uses the dn or the member(of) attributes to establish membership
Value: "(&(objectclass=posixGroup)(ownclouduuid={{.OpaqueId}}*))", // This filter will never work
Usage: "LDAP filter used when getting the groups of a user. The CS3 userid properties {{.OpaqueId}} and {{.Idp}} are available.",
EnvVars: []string{"REVA_LDAP_GROUPFILTER"},
EnvVars: []string{"STORAGE_LDAP_GROUPFILTER"},
Destination: &cfg.Reva.LDAP.GroupFilter,
},
&cli.StringFlag{
Name: "ldap-bind-dn",
Value: "cn=reva,ou=sysusers,dc=example,dc=org",
Usage: "LDAP bind dn",
EnvVars: []string{"REVA_LDAP_BIND_DN"},
EnvVars: []string{"STORAGE_LDAP_BIND_DN"},
Destination: &cfg.Reva.LDAP.BindDN,
},
&cli.StringFlag{
Name: "ldap-bind-password",
Value: "reva",
Usage: "LDAP bind password",
EnvVars: []string{"REVA_LDAP_BIND_PASSWORD"},
EnvVars: []string{"STORAGE_LDAP_BIND_PASSWORD"},
Destination: &cfg.Reva.LDAP.BindPassword,
},
&cli.StringFlag{
Name: "ldap-idp",
Value: "https://localhost:9200",
Usage: "Identity provider to use for users",
EnvVars: []string{"REVA_LDAP_IDP"},
EnvVars: []string{"STORAGE_LDAP_IDP"},
Destination: &cfg.Reva.LDAP.IDP,
},
// ldap dn is always the dn
@@ -92,42 +92,42 @@ func LDAPWithConfig(cfg *config.Config) []cli.Flag {
Name: "ldap-schema-uid",
Value: "ownclouduuid",
Usage: "LDAP schema uid",
EnvVars: []string{"REVA_LDAP_SCHEMA_UID"},
EnvVars: []string{"STORAGE_LDAP_SCHEMA_UID"},
Destination: &cfg.Reva.LDAP.Schema.UID,
},
&cli.StringFlag{
Name: "ldap-schema-mail",
Value: "mail",
Usage: "LDAP schema mail",
EnvVars: []string{"REVA_LDAP_SCHEMA_MAIL"},
EnvVars: []string{"STORAGE_LDAP_SCHEMA_MAIL"},
Destination: &cfg.Reva.LDAP.Schema.Mail,
},
&cli.StringFlag{
Name: "ldap-schema-displayName",
Value: "displayname",
Usage: "LDAP schema displayName",
EnvVars: []string{"REVA_LDAP_SCHEMA_DISPLAYNAME"},
EnvVars: []string{"STORAGE_LDAP_SCHEMA_DISPLAYNAME"},
Destination: &cfg.Reva.LDAP.Schema.DisplayName,
},
&cli.StringFlag{
Name: "ldap-schema-cn",
Value: "cn",
Usage: "LDAP schema cn",
EnvVars: []string{"REVA_LDAP_SCHEMA_CN"},
EnvVars: []string{"STORAGE_LDAP_SCHEMA_CN"},
Destination: &cfg.Reva.LDAP.Schema.CN,
},
&cli.StringFlag{
Name: "ldap-schema-uidnumber",
Value: "uidnumber",
Usage: "LDAP schema uidnumber",
EnvVars: []string{"REVA_LDAP_SCHEMA_UID_NUMBER"},
EnvVars: []string{"STORAGE_LDAP_SCHEMA_UID_NUMBER"},
Destination: &cfg.Reva.LDAP.Schema.UIDNumber,
},
&cli.StringFlag{
Name: "ldap-schema-gidnumber",
Value: "gidnumber",
Usage: "LDAP schema gidnumber",
EnvVars: []string{"REVA_LDAP_SCHEMA_GIDNUMBER"},
EnvVars: []string{"STORAGE_LDAP_SCHEMA_GIDNUMBER"},
Destination: &cfg.Reva.LDAP.Schema.GIDNumber,
},
}
+5 -5
View File
@@ -2,7 +2,7 @@ package flagset
import (
"github.com/micro/cli/v2"
"github.com/owncloud/ocis/ocis-reva/pkg/config"
"github.com/owncloud/ocis/storage/pkg/config"
)
// RootWithConfig applies cfg to the root flagset
@@ -12,26 +12,26 @@ func RootWithConfig(cfg *config.Config) []cli.Flag {
Name: "config-file",
Value: "",
Usage: "Path to config file",
EnvVars: []string{"REVA_CONFIG_FILE"},
EnvVars: []string{"STORAGE_CONFIG_FILE"},
Destination: &cfg.File,
},
&cli.StringFlag{
Name: "log-level",
Value: "info",
Usage: "Set logging level",
EnvVars: []string{"REVA_LOG_LEVEL"},
EnvVars: []string{"STORAGE_LOG_LEVEL"},
Destination: &cfg.Log.Level,
},
&cli.BoolFlag{
Name: "log-pretty",
Usage: "Enable pretty logging",
EnvVars: []string{"REVA_LOG_PRETTY"},
EnvVars: []string{"STORAGE_LOG_PRETTY"},
Destination: &cfg.Log.Pretty,
},
&cli.BoolFlag{
Name: "log-color",
Usage: "Enable colored logging",
EnvVars: []string{"REVA_LOG_COLOR"},
EnvVars: []string{"STORAGE_LOG_COLOR"},
Destination: &cfg.Log.Color,
},
}
+2 -2
View File
@@ -2,7 +2,7 @@ package flagset
import (
"github.com/micro/cli/v2"
"github.com/owncloud/ocis/ocis-reva/pkg/config"
"github.com/owncloud/ocis/storage/pkg/config"
)
// SecretWithConfig applies cfg to the root flagset
@@ -12,7 +12,7 @@ func SecretWithConfig(cfg *config.Config) []cli.Flag {
Name: "jwt-secret",
Value: "Pive-Fumkiu4",
Usage: "Shared jwt secret for reva service communication",
EnvVars: []string{"REVA_JWT_SECRET"},
EnvVars: []string{"STORAGE_JWT_SECRET"},
Destination: &cfg.Reva.JWTSecret,
},
}
+15 -15
View File
@@ -2,7 +2,7 @@ package flagset
import (
"github.com/micro/cli/v2"
"github.com/owncloud/ocis/ocis-reva/pkg/config"
"github.com/owncloud/ocis/storage/pkg/config"
)
// SharingWithConfig applies cfg to the root flagset
@@ -14,7 +14,7 @@ func SharingWithConfig(cfg *config.Config) []cli.Flag {
Name: "debug-addr",
Value: "0.0.0.0:9151",
Usage: "Address to bind debug server",
EnvVars: []string{"REVA_SHARING_DEBUG_ADDR"},
EnvVars: []string{"STORAGE_SHARING_DEBUG_ADDR"},
Destination: &cfg.Reva.Sharing.DebugAddr,
},
@@ -25,56 +25,56 @@ func SharingWithConfig(cfg *config.Config) []cli.Flag {
&cli.StringFlag{
Name: "network",
Value: "tcp",
Usage: "Network to use for the reva service, can be 'tcp', 'udp' or 'unix'",
EnvVars: []string{"REVA_SHARING_NETWORK"},
Usage: "Network to use for the storage service, can be 'tcp', 'udp' or 'unix'",
EnvVars: []string{"STORAGE_SHARING_NETWORK"},
Destination: &cfg.Reva.Sharing.Network,
},
&cli.StringFlag{
Name: "protocol",
Value: "grpc",
Usage: "protocol for reva service, can be 'http' or 'grpc'",
EnvVars: []string{"REVA_SHARING_PROTOCOL"},
Usage: "protocol for storage service, can be 'http' or 'grpc'",
EnvVars: []string{"STORAGE_SHARING_PROTOCOL"},
Destination: &cfg.Reva.Sharing.Protocol,
},
&cli.StringFlag{
Name: "addr",
Value: "0.0.0.0:9150",
Usage: "Address to bind reva service",
EnvVars: []string{"REVA_SHARING_ADDR"},
Usage: "Address to bind storage service",
EnvVars: []string{"STORAGE_SHARING_ADDR"},
Destination: &cfg.Reva.Sharing.Addr,
},
&cli.StringFlag{
Name: "url",
Value: "localhost:9150",
Usage: "URL to use for the reva service",
EnvVars: []string{"REVA_SHARING_URL"},
Usage: "URL to use for the storage service",
EnvVars: []string{"STORAGE_SHARING_URL"},
Destination: &cfg.Reva.Sharing.URL,
},
&cli.StringSliceFlag{
Name: "service",
Value: cli.NewStringSlice("usershareprovider", "publicshareprovider"), // TODO osmshareprovider
Usage: "--service usershareprovider [--service publicshareprovider]",
EnvVars: []string{"REVA_SHARING_SERVICES"},
EnvVars: []string{"STORAGE_SHARING_SERVICES"},
},
&cli.StringFlag{
Name: "user-driver",
Value: "json",
Usage: "driver to use for the UserShareProvider",
EnvVars: []string{"REVA_SHARING_USER_DRIVER"},
EnvVars: []string{"STORAGE_SHARING_USER_DRIVER"},
Destination: &cfg.Reva.Sharing.UserDriver,
},
&cli.StringFlag{
Name: "user-json-file",
Value: "/var/tmp/reva/shares.json",
Value: "/var/tmp/storage/shares.json",
Usage: "file used to persist shares for the UserShareProvider",
EnvVars: []string{"REVA_SHARING_USER_JSON_FILE"},
EnvVars: []string{"STORAGE_SHARING_USER_JSON_FILE"},
Destination: &cfg.Reva.Sharing.UserJSONFile,
},
&cli.StringFlag{
Name: "public-driver",
Value: "json",
Usage: "driver to use for the PublicShareProvider",
EnvVars: []string{"REVA_SHARING_PUBLIC_DRIVER"},
EnvVars: []string{"STORAGE_SHARING_PUBLIC_DRIVER"},
Destination: &cfg.Reva.Sharing.PublicDriver,
},
}
+16 -16
View File
@@ -2,7 +2,7 @@ package flagset
import (
"github.com/micro/cli/v2"
"github.com/owncloud/ocis/ocis-reva/pkg/config"
"github.com/owncloud/ocis/storage/pkg/config"
)
// StorageEOSWithConfig applies cfg to the root flagset
@@ -14,7 +14,7 @@ func StorageEOSWithConfig(cfg *config.Config) []cli.Flag {
Name: "debug-addr",
Value: "0.0.0.0:9159",
Usage: "Address to bind debug server",
EnvVars: []string{"REVA_STORAGE_EOS_DEBUG_ADDR"},
EnvVars: []string{"STORAGE_STORAGE_EOS_DEBUG_ADDR"},
Destination: &cfg.Reva.StorageEOS.DebugAddr,
},
@@ -23,71 +23,71 @@ func StorageEOSWithConfig(cfg *config.Config) []cli.Flag {
&cli.StringFlag{
Name: "network",
Value: "tcp",
Usage: "Network to use for the reva service, can be 'tcp', 'udp' or 'unix'",
EnvVars: []string{"REVA_STORAGE_EOS_NETWORK"},
Usage: "Network to use for the storage service, can be 'tcp', 'udp' or 'unix'",
EnvVars: []string{"STORAGE_STORAGE_EOS_NETWORK"},
Destination: &cfg.Reva.StorageEOS.Network,
},
&cli.StringFlag{
Name: "protocol",
Value: "grpc",
Usage: "protocol for reva service, can be 'http' or 'grpc'",
EnvVars: []string{"REVA_STORAGE_EOS_PROTOCOL"},
Usage: "protocol for storage service, can be 'http' or 'grpc'",
EnvVars: []string{"STORAGE_STORAGE_EOS_PROTOCOL"},
Destination: &cfg.Reva.StorageEOS.Protocol,
},
&cli.StringFlag{
Name: "addr",
Value: "0.0.0.0:9158",
Usage: "Address to bind reva service",
EnvVars: []string{"REVA_STORAGE_EOS_ADDR"},
Usage: "Address to bind storage service",
EnvVars: []string{"STORAGE_STORAGE_EOS_ADDR"},
Destination: &cfg.Reva.StorageEOS.Addr,
},
&cli.StringFlag{
Name: "url",
Value: "localhost:9158",
Usage: "URL to use for the reva service",
EnvVars: []string{"REVA_STORAGE_EOS_URL"},
Usage: "URL to use for the storage service",
EnvVars: []string{"STORAGE_STORAGE_EOS_URL"},
Destination: &cfg.Reva.StorageEOS.URL,
},
&cli.StringSliceFlag{
Name: "service",
Value: cli.NewStringSlice("storageprovider"),
Usage: "--service storageprovider [--service otherservice]",
EnvVars: []string{"REVA_STORAGE_EOS_SERVICES"},
EnvVars: []string{"STORAGE_STORAGE_EOS_SERVICES"},
},
&cli.StringFlag{
Name: "driver",
Value: "eos",
Usage: "storage driver for eos mount: eg. local, eos, owncloud, ocis or s3",
EnvVars: []string{"REVA_STORAGE_EOS_DRIVER"},
EnvVars: []string{"STORAGE_STORAGE_EOS_DRIVER"},
Destination: &cfg.Reva.StorageEOS.Driver,
},
&cli.StringFlag{
Name: "mount-path",
Value: "/eos",
Usage: "mount path",
EnvVars: []string{"REVA_STORAGE_EOS_MOUNT_PATH"},
EnvVars: []string{"STORAGE_STORAGE_EOS_MOUNT_PATH"},
Destination: &cfg.Reva.StorageEOS.MountPath,
},
&cli.StringFlag{
Name: "mount-id",
Value: "1284d238-aa92-42ce-bdc4-0b0000009158",
Usage: "mount id",
EnvVars: []string{"REVA_STORAGE_EOS_MOUNT_ID"},
EnvVars: []string{"STORAGE_STORAGE_EOS_MOUNT_ID"},
Destination: &cfg.Reva.StorageEOS.MountID,
},
&cli.BoolFlag{
Name: "expose-data-server",
Value: false,
Usage: "exposes a dedicated data server",
EnvVars: []string{"REVA_STORAGE_EOS_EXPOSE_DATA_SERVER"},
EnvVars: []string{"STORAGE_STORAGE_EOS_EXPOSE_DATA_SERVER"},
Destination: &cfg.Reva.StorageEOS.ExposeDataServer,
},
&cli.StringFlag{
Name: "data-server-url",
Value: "http://localhost:9160/data",
Usage: "data server url",
EnvVars: []string{"REVA_STORAGE_EOS_DATA_SERVER_URL"},
EnvVars: []string{"STORAGE_STORAGE_EOS_DATA_SERVER_URL"},
Destination: &cfg.Reva.StorageEOS.DataServerURL,
},
}
+18 -18
View File
@@ -2,7 +2,7 @@ package flagset
import (
"github.com/micro/cli/v2"
"github.com/owncloud/ocis/ocis-reva/pkg/config"
"github.com/owncloud/ocis/storage/pkg/config"
)
// StorageEOSDataWithConfig applies cfg to the root flagset
@@ -14,7 +14,7 @@ func StorageEOSDataWithConfig(cfg *config.Config) []cli.Flag {
Name: "debug-addr",
Value: "0.0.0.0:9161",
Usage: "Address to bind debug server",
EnvVars: []string{"REVA_STORAGE_OC_DATA_DEBUG_ADDR"},
EnvVars: []string{"STORAGE_STORAGE_OC_DATA_DEBUG_ADDR"},
Destination: &cfg.Reva.StorageEOSData.DebugAddr,
},
@@ -25,56 +25,56 @@ func StorageEOSDataWithConfig(cfg *config.Config) []cli.Flag {
&cli.StringFlag{
Name: "network",
Value: "tcp",
Usage: "Network to use for the reva service, can be 'tcp', 'udp' or 'unix'",
EnvVars: []string{"REVA_STORAGE_EOS_DATA_NETWORK"},
Usage: "Network to use for the storage service, can be 'tcp', 'udp' or 'unix'",
EnvVars: []string{"STORAGE_STORAGE_EOS_DATA_NETWORK"},
Destination: &cfg.Reva.StorageEOSData.Network,
},
&cli.StringFlag{
Name: "protocol",
Value: "http",
Usage: "protocol for reva service, can be 'http' or 'grpc'",
EnvVars: []string{"REVA_STORAGE_EOS_DATA_PROTOCOL"},
Usage: "protocol for storage service, can be 'http' or 'grpc'",
EnvVars: []string{"STORAGE_STORAGE_EOS_DATA_PROTOCOL"},
Destination: &cfg.Reva.StorageEOSData.Protocol,
},
&cli.StringFlag{
Name: "addr",
Value: "0.0.0.0:9160",
Usage: "Address to bind reva service",
EnvVars: []string{"REVA_STORAGE_EOS_DATA_ADDR"},
Usage: "Address to bind storage service",
EnvVars: []string{"STORAGE_STORAGE_EOS_DATA_ADDR"},
Destination: &cfg.Reva.StorageEOSData.Addr,
},
&cli.StringFlag{
Name: "url",
Value: "localhost:9160",
Usage: "URL to use for the reva service",
EnvVars: []string{"REVA_STORAGE_EOS_DATA_URL"},
Usage: "URL to use for the storage service",
EnvVars: []string{"STORAGE_STORAGE_EOS_DATA_URL"},
Destination: &cfg.Reva.StorageEOSData.URL,
},
&cli.StringSliceFlag{
Name: "service",
Value: cli.NewStringSlice("dataprovider"),
Usage: "--service dataprovider [--service otherservice]",
EnvVars: []string{"REVA_STORAGE_EOS_DATA_SERVICES"},
EnvVars: []string{"STORAGE_STORAGE_EOS_DATA_SERVICES"},
},
&cli.StringFlag{
Name: "driver",
Value: "eos",
Usage: "storage driver for eos data mount: eg. local, eos, owncloud, ocis or s3",
EnvVars: []string{"REVA_STORAGE_EOS_DATA_DRIVER"},
EnvVars: []string{"STORAGE_STORAGE_EOS_DATA_DRIVER"},
Destination: &cfg.Reva.StorageEOSData.Driver,
},
&cli.StringFlag{
Name: "prefix",
Value: "data",
Usage: "prefix for the http endpoint, without leading slash",
EnvVars: []string{"REVA_STORAGE_EOS_DATA_PREFIX"},
EnvVars: []string{"STORAGE_STORAGE_EOS_DATA_PREFIX"},
Destination: &cfg.Reva.StorageEOSData.Prefix,
},
&cli.StringFlag{
Name: "temp-folder",
Value: "/var/tmp/",
Usage: "temp folder",
EnvVars: []string{"REVA_STORAGE_EOS_DATA_TEMP_FOLDER"},
EnvVars: []string{"STORAGE_STORAGE_EOS_DATA_TEMP_FOLDER"},
Destination: &cfg.Reva.StorageEOSData.TempFolder,
},
@@ -83,8 +83,8 @@ func StorageEOSDataWithConfig(cfg *config.Config) []cli.Flag {
&cli.StringFlag{
Name: "gateway-url",
Value: "localhost:9142",
Usage: "URL to use for the reva gateway service",
EnvVars: []string{"REVA_GATEWAY_URL"},
Usage: "URL to use for the storage gateway service",
EnvVars: []string{"STORAGE_GATEWAY_URL"},
Destination: &cfg.Reva.Gateway.URL,
},
@@ -93,8 +93,8 @@ func StorageEOSDataWithConfig(cfg *config.Config) []cli.Flag {
&cli.StringFlag{
Name: "users-url",
Value: "localhost:9144",
Usage: "URL to use for the reva service",
EnvVars: []string{"REVA_USERS_URL"},
Usage: "URL to use for the storage service",
EnvVars: []string{"STORAGE_USERS_URL"},
Destination: &cfg.Reva.Users.URL,
},
}
+19 -19
View File
@@ -2,7 +2,7 @@ package flagset
import (
"github.com/micro/cli/v2"
"github.com/owncloud/ocis/ocis-reva/pkg/config"
"github.com/owncloud/ocis/storage/pkg/config"
)
// StorageHomeWithConfig applies cfg to the root flagset
@@ -14,7 +14,7 @@ func StorageHomeWithConfig(cfg *config.Config) []cli.Flag {
Name: "debug-addr",
Value: "0.0.0.0:9155",
Usage: "Address to bind debug server",
EnvVars: []string{"REVA_STORAGE_HOME_DEBUG_ADDR"},
EnvVars: []string{"STORAGE_STORAGE_HOME_DEBUG_ADDR"},
Destination: &cfg.Reva.StorageHome.DebugAddr,
},
@@ -25,50 +25,50 @@ func StorageHomeWithConfig(cfg *config.Config) []cli.Flag {
&cli.StringFlag{
Name: "network",
Value: "tcp",
Usage: "Network to use for the reva service, can be 'tcp', 'udp' or 'unix'",
EnvVars: []string{"REVA_STORAGE_HOME_NETWORK"},
Usage: "Network to use for the storage service, can be 'tcp', 'udp' or 'unix'",
EnvVars: []string{"STORAGE_STORAGE_HOME_NETWORK"},
Destination: &cfg.Reva.StorageHome.Network,
},
&cli.StringFlag{
Name: "protocol",
Value: "grpc",
Usage: "protocol for reva service, can be 'http' or 'grpc'",
EnvVars: []string{"REVA_STORAGE_HOME_PROTOCOL"},
Usage: "protocol for storage service, can be 'http' or 'grpc'",
EnvVars: []string{"STORAGE_STORAGE_HOME_PROTOCOL"},
Destination: &cfg.Reva.StorageHome.Protocol,
},
&cli.StringFlag{
Name: "addr",
Value: "0.0.0.0:9154",
Usage: "Address to bind reva service",
EnvVars: []string{"REVA_STORAGE_HOME_ADDR"},
Usage: "Address to bind storage service",
EnvVars: []string{"STORAGE_STORAGE_HOME_ADDR"},
Destination: &cfg.Reva.StorageHome.Addr,
},
&cli.StringFlag{
Name: "url",
Value: "localhost:9154",
Usage: "URL to use for the reva service",
EnvVars: []string{"REVA_STORAGE_HOME_URL"},
Usage: "URL to use for the storage service",
EnvVars: []string{"STORAGE_STORAGE_HOME_URL"},
Destination: &cfg.Reva.StorageHome.URL,
},
&cli.StringSliceFlag{
Name: "service",
Value: cli.NewStringSlice("storageprovider"),
Usage: "--service storageprovider [--service otherservice]",
EnvVars: []string{"REVA_STORAGE_HOME_SERVICES"},
EnvVars: []string{"STORAGE_STORAGE_HOME_SERVICES"},
},
&cli.StringFlag{
Name: "driver",
Value: "owncloud",
Usage: "storage driver for home mount: eg. local, eos, owncloud, ocis or s3",
EnvVars: []string{"REVA_STORAGE_HOME_DRIVER"},
EnvVars: []string{"STORAGE_STORAGE_HOME_DRIVER"},
Destination: &cfg.Reva.StorageHome.Driver,
},
&cli.StringFlag{
Name: "mount-path",
Value: "/home",
Usage: "mount path",
EnvVars: []string{"REVA_STORAGE_HOME_MOUNT_PATH"},
EnvVars: []string{"STORAGE_STORAGE_HOME_MOUNT_PATH"},
Destination: &cfg.Reva.StorageHome.MountPath,
},
&cli.StringFlag{
@@ -79,28 +79,28 @@ func StorageHomeWithConfig(cfg *config.Config) []cli.Flag {
// 1284d238-aa92-42ce-bdc4-0b0000009162 for /oc
Value: "1284d238-aa92-42ce-bdc4-0b0000009162", // /oc
Usage: "mount id",
EnvVars: []string{"REVA_STORAGE_HOME_MOUNT_ID"},
EnvVars: []string{"STORAGE_STORAGE_HOME_MOUNT_ID"},
Destination: &cfg.Reva.StorageHome.MountID,
},
&cli.BoolFlag{
Name: "expose-data-server",
Value: false,
Usage: "exposes a dedicated data server",
EnvVars: []string{"REVA_STORAGE_HOME_EXPOSE_DATA_SERVER"},
EnvVars: []string{"STORAGE_STORAGE_HOME_EXPOSE_DATA_SERVER"},
Destination: &cfg.Reva.StorageHome.ExposeDataServer,
},
&cli.StringFlag{
Name: "data-server-url",
Value: "http://localhost:9156/data",
Usage: "data server url",
EnvVars: []string{"REVA_STORAGE_HOME_DATA_SERVER_URL"},
EnvVars: []string{"STORAGE_STORAGE_HOME_DATA_SERVER_URL"},
Destination: &cfg.Reva.StorageHome.DataServerURL,
},
&cli.BoolFlag{
Name: "enable-home",
Value: true,
Usage: "enable the creation of home directories",
EnvVars: []string{"REVA_STORAGE_HOME_ENABLE_HOME"},
EnvVars: []string{"STORAGE_STORAGE_HOME_ENABLE_HOME"},
Destination: &cfg.Reva.Storages.Home.EnableHome,
},
@@ -109,8 +109,8 @@ func StorageHomeWithConfig(cfg *config.Config) []cli.Flag {
&cli.StringFlag{
Name: "users-url",
Value: "localhost:9144",
Usage: "URL to use for the reva service",
EnvVars: []string{"REVA_USERS_URL"},
Usage: "URL to use for the storage service",
EnvVars: []string{"STORAGE_USERS_URL"},
Destination: &cfg.Reva.Users.URL,
},
}
+19 -19
View File
@@ -2,7 +2,7 @@ package flagset
import (
"github.com/micro/cli/v2"
"github.com/owncloud/ocis/ocis-reva/pkg/config"
"github.com/owncloud/ocis/storage/pkg/config"
)
// StorageHomeDataWithConfig applies cfg to the root flagset
@@ -14,7 +14,7 @@ func StorageHomeDataWithConfig(cfg *config.Config) []cli.Flag {
Name: "debug-addr",
Value: "0.0.0.0:9157",
Usage: "Address to bind debug server",
EnvVars: []string{"REVA_STORAGE_HOME_DATA_DEBUG_ADDR"},
EnvVars: []string{"STORAGE_STORAGE_HOME_DATA_DEBUG_ADDR"},
Destination: &cfg.Reva.StorageHomeData.DebugAddr,
},
@@ -25,63 +25,63 @@ func StorageHomeDataWithConfig(cfg *config.Config) []cli.Flag {
&cli.StringFlag{
Name: "network",
Value: "tcp",
Usage: "Network to use for the reva service, can be 'tcp', 'udp' or 'unix'",
EnvVars: []string{"REVA_STORAGE_HOME_DATA_NETWORK"},
Usage: "Network to use for the storage service, can be 'tcp', 'udp' or 'unix'",
EnvVars: []string{"STORAGE_STORAGE_HOME_DATA_NETWORK"},
Destination: &cfg.Reva.StorageHomeData.Network,
},
&cli.StringFlag{
Name: "protocol",
Value: "http",
Usage: "protocol for reva service, can be 'http' or 'grpc'",
EnvVars: []string{"REVA_STORAGE_HOME_DATA_PROTOCOL"},
Usage: "protocol for storage service, can be 'http' or 'grpc'",
EnvVars: []string{"STORAGE_STORAGE_HOME_DATA_PROTOCOL"},
Destination: &cfg.Reva.StorageHomeData.Protocol,
},
&cli.StringFlag{
Name: "addr",
Value: "0.0.0.0:9156",
Usage: "Address to bind reva service",
EnvVars: []string{"REVA_STORAGE_HOME_DATA_ADDR"},
Usage: "Address to bind storage service",
EnvVars: []string{"STORAGE_STORAGE_HOME_DATA_ADDR"},
Destination: &cfg.Reva.StorageHomeData.Addr,
},
&cli.StringFlag{
Name: "url",
Value: "localhost:9156",
Usage: "URL to use for the reva service",
EnvVars: []string{"REVA_STORAGE_HOME_DATA_URL"},
Usage: "URL to use for the storage service",
EnvVars: []string{"STORAGE_STORAGE_HOME_DATA_URL"},
Destination: &cfg.Reva.StorageHomeData.URL,
},
&cli.StringSliceFlag{
Name: "service",
Value: cli.NewStringSlice("dataprovider"),
Usage: "--service dataprovider [--service otherservice]",
EnvVars: []string{"REVA_STORAGE_HOME_DATA_SERVICES"},
EnvVars: []string{"STORAGE_STORAGE_HOME_DATA_SERVICES"},
},
&cli.StringFlag{
Name: "driver",
Value: "owncloud",
Usage: "storage driver for home data mount: eg. local, eos, owncloud, ocis or s3",
EnvVars: []string{"REVA_STORAGE_HOME_DATA_DRIVER"},
EnvVars: []string{"STORAGE_STORAGE_HOME_DATA_DRIVER"},
Destination: &cfg.Reva.StorageHomeData.Driver,
},
&cli.StringFlag{
Name: "prefix",
Value: "data",
Usage: "prefix for the http endpoint, without leading slash",
EnvVars: []string{"REVA_STORAGE_HOME_DATA_PREFIX"},
EnvVars: []string{"STORAGE_STORAGE_HOME_DATA_PREFIX"},
Destination: &cfg.Reva.StorageHomeData.Prefix,
},
&cli.StringFlag{
Name: "temp-folder",
Value: "/var/tmp/",
Usage: "temp folder",
EnvVars: []string{"REVA_STORAGE_HOME_DATA_TEMP_FOLDER"},
EnvVars: []string{"STORAGE_STORAGE_HOME_DATA_TEMP_FOLDER"},
Destination: &cfg.Reva.StorageHomeData.TempFolder,
},
&cli.BoolFlag{
Name: "enable-home",
Value: true,
Usage: "enable the creation of home directories",
EnvVars: []string{"REVA_STORAGE_HOME_ENABLE_HOME"},
EnvVars: []string{"STORAGE_STORAGE_HOME_ENABLE_HOME"},
Destination: &cfg.Reva.Storages.Home.EnableHome,
},
@@ -90,8 +90,8 @@ func StorageHomeDataWithConfig(cfg *config.Config) []cli.Flag {
&cli.StringFlag{
Name: "gateway-url",
Value: "localhost:9142",
Usage: "URL to use for the reva gateway service",
EnvVars: []string{"REVA_GATEWAY_URL"},
Usage: "URL to use for the storage gateway service",
EnvVars: []string{"STORAGE_GATEWAY_URL"},
Destination: &cfg.Reva.Gateway.URL,
},
@@ -100,8 +100,8 @@ func StorageHomeDataWithConfig(cfg *config.Config) []cli.Flag {
&cli.StringFlag{
Name: "users-url",
Value: "localhost:9144",
Usage: "URL to use for the reva service",
EnvVars: []string{"REVA_USERS_URL"},
Usage: "URL to use for the storage service",
EnvVars: []string{"STORAGE_USERS_URL"},
Destination: &cfg.Reva.Users.URL,
},
}
+11 -11
View File
@@ -2,7 +2,7 @@ package flagset
import (
"github.com/micro/cli/v2"
"github.com/owncloud/ocis/ocis-reva/pkg/config"
"github.com/owncloud/ocis/storage/pkg/config"
)
// StorageMetadata applies cfg to the root flagset
@@ -12,56 +12,56 @@ func StorageMetadata(cfg *config.Config) []cli.Flag {
Name: "debug-addr",
Value: "0.0.0.0:9217",
Usage: "Address to bind debug server",
EnvVars: []string{"REVA_STORAGE_METADATA_DEBUG_ADDR"},
EnvVars: []string{"STORAGE_STORAGE_METADATA_DEBUG_ADDR"},
Destination: &cfg.Reva.StorageMetadata.DebugAddr,
},
&cli.StringFlag{
Name: "network",
Value: "tcp",
Usage: "Network to use for the reva service, can be 'tcp', 'udp' or 'unix'",
EnvVars: []string{"REVA_STORAGE_METADATA_NETWORK"},
Usage: "Network to use for the storage service, can be 'tcp', 'udp' or 'unix'",
EnvVars: []string{"STORAGE_STORAGE_METADATA_NETWORK"},
Destination: &cfg.Reva.StorageMetadata.Network,
},
&cli.StringFlag{
Name: "provider-addr",
Value: "0.0.0.0:9215",
Usage: "Address to bind reva service",
EnvVars: []string{"REVA_STORAGE_METADATA_PROVIDER_ADDR"},
Usage: "Address to bind storage service",
EnvVars: []string{"STORAGE_STORAGE_METADATA_PROVIDER_ADDR"},
Destination: &cfg.Reva.StorageMetadata.Addr,
},
&cli.StringFlag{
Name: "data-server-url",
Value: "http://localhost:9216",
Usage: "URL of the data-server the storage-provider uses",
EnvVars: []string{"REVA_STORAGE_METADATA_DATA_SERVER_URL"},
EnvVars: []string{"STORAGE_STORAGE_METADATA_DATA_SERVER_URL"},
Destination: &cfg.Reva.StorageMetadata.DataServerURL,
},
&cli.StringFlag{
Name: "data-server-addr",
Value: "0.0.0.0:9216",
Usage: "Address to bind the metadata data-server to",
EnvVars: []string{"REVA_STORAGE_METADATA_DATA_SERVER_ADDR"},
EnvVars: []string{"STORAGE_STORAGE_METADATA_DATA_SERVER_ADDR"},
Destination: &cfg.Reva.StorageMetadataData.Addr,
},
&cli.StringFlag{
Name: "storage-provider-driver",
Value: "local",
Usage: "storage driver for metadata mount: eg. local, eos, owncloud, ocis or s3",
EnvVars: []string{"REVA_STORAGE_METADATA_PROVIDER_DRIVER"},
EnvVars: []string{"STORAGE_STORAGE_METADATA_PROVIDER_DRIVER"},
Destination: &cfg.Reva.StorageMetadata.Driver,
},
&cli.StringFlag{
Name: "data-provider-driver",
Value: "local",
Usage: "storage driver for data-provider mount: eg. local, eos, owncloud, ocis or s3",
EnvVars: []string{"REVA_STORAGE_METADATA_DATA_PROVIDER_DRIVER"},
EnvVars: []string{"STORAGE_STORAGE_METADATA_DATA_PROVIDER_DRIVER"},
Destination: &cfg.Reva.StorageMetadataData.Driver,
},
&cli.StringFlag{
Name: "storage-root",
Value: "/var/tmp/ocis/metadata",
Usage: "the path to the metadata storage root",
EnvVars: []string{"REVA_STORAGE_METADATA_ROOT"},
EnvVars: []string{"STORAGE_STORAGE_METADATA_ROOT"},
Destination: &cfg.Reva.Storages.Common.Root,
},
}
+18 -18
View File
@@ -2,7 +2,7 @@ package flagset
import (
"github.com/micro/cli/v2"
"github.com/owncloud/ocis/ocis-reva/pkg/config"
"github.com/owncloud/ocis/storage/pkg/config"
)
// StorageOCWithConfig applies cfg to the root flagset
@@ -14,7 +14,7 @@ func StorageOCWithConfig(cfg *config.Config) []cli.Flag {
Name: "debug-addr",
Value: "0.0.0.0:9163",
Usage: "Address to bind debug server",
EnvVars: []string{"REVA_STORAGE_OC_DEBUG_ADDR"},
EnvVars: []string{"STORAGE_STORAGE_OC_DEBUG_ADDR"},
Destination: &cfg.Reva.StorageOC.DebugAddr,
},
@@ -25,71 +25,71 @@ func StorageOCWithConfig(cfg *config.Config) []cli.Flag {
&cli.StringFlag{
Name: "network",
Value: "tcp",
Usage: "Network to use for the reva service, can be 'tcp', 'udp' or 'unix'",
EnvVars: []string{"REVA_STORAGE_OC_NETWORK"},
Usage: "Network to use for the storage service, can be 'tcp', 'udp' or 'unix'",
EnvVars: []string{"STORAGE_STORAGE_OC_NETWORK"},
Destination: &cfg.Reva.StorageOC.Network,
},
&cli.StringFlag{
Name: "protocol",
Value: "grpc",
Usage: "protocol for reva service, can be 'http' or 'grpc'",
EnvVars: []string{"REVA_STORAGE_OC_PROTOCOL"},
Usage: "protocol for storage service, can be 'http' or 'grpc'",
EnvVars: []string{"STORAGE_STORAGE_OC_PROTOCOL"},
Destination: &cfg.Reva.StorageOC.Protocol,
},
&cli.StringFlag{
Name: "addr",
Value: "0.0.0.0:9162",
Usage: "Address to bind reva service",
EnvVars: []string{"REVA_STORAGE_OC_ADDR"},
Usage: "Address to bind storage service",
EnvVars: []string{"STORAGE_STORAGE_OC_ADDR"},
Destination: &cfg.Reva.StorageOC.Addr,
},
&cli.StringFlag{
Name: "url",
Value: "localhost:9162",
Usage: "URL to use for the reva service",
EnvVars: []string{"REVA_STORAGE_OC_URL"},
Usage: "URL to use for the storage service",
EnvVars: []string{"STORAGE_STORAGE_OC_URL"},
Destination: &cfg.Reva.StorageOC.URL,
},
&cli.StringSliceFlag{
Name: "service",
Value: cli.NewStringSlice("storageprovider"),
Usage: "--service storageprovider [--service otherservice]",
EnvVars: []string{"REVA_STORAGE_OC_SERVICES"},
EnvVars: []string{"STORAGE_STORAGE_OC_SERVICES"},
},
&cli.StringFlag{
Name: "driver",
Value: "owncloud",
Usage: "storage driver for oc mount: eg. local, eos, owncloud, ocis or s3",
EnvVars: []string{"REVA_STORAGE_OC_DRIVER"},
EnvVars: []string{"STORAGE_STORAGE_OC_DRIVER"},
Destination: &cfg.Reva.StorageOC.Driver,
},
&cli.StringFlag{
Name: "mount-path",
Value: "/oc",
Usage: "mount path",
EnvVars: []string{"REVA_STORAGE_OC_MOUNT_PATH"},
EnvVars: []string{"STORAGE_STORAGE_OC_MOUNT_PATH"},
Destination: &cfg.Reva.StorageOC.MountPath,
},
&cli.StringFlag{
Name: "mount-id",
Value: "1284d238-aa92-42ce-bdc4-0b0000009162",
Usage: "mount id",
EnvVars: []string{"REVA_STORAGE_OC_MOUNT_ID"},
EnvVars: []string{"STORAGE_STORAGE_OC_MOUNT_ID"},
Destination: &cfg.Reva.StorageOC.MountID,
},
&cli.BoolFlag{
Name: "expose-data-server",
Value: false,
Usage: "exposes a dedicated data server",
EnvVars: []string{"REVA_STORAGE_OC_EXPOSE_DATA_SERVER"},
EnvVars: []string{"STORAGE_STORAGE_OC_EXPOSE_DATA_SERVER"},
Destination: &cfg.Reva.StorageOC.ExposeDataServer,
},
&cli.StringFlag{
Name: "data-server-url",
Value: "http://localhost:9164/data",
Usage: "data server url",
EnvVars: []string{"REVA_STORAGE_OC_DATA_SERVER_URL"},
EnvVars: []string{"STORAGE_STORAGE_OC_DATA_SERVER_URL"},
Destination: &cfg.Reva.StorageOC.DataServerURL,
},
@@ -98,8 +98,8 @@ func StorageOCWithConfig(cfg *config.Config) []cli.Flag {
&cli.StringFlag{
Name: "users-url",
Value: "localhost:9144",
Usage: "URL to use for the reva service",
EnvVars: []string{"REVA_USERS_URL"},
Usage: "URL to use for the storage service",
EnvVars: []string{"STORAGE_USERS_URL"},
Destination: &cfg.Reva.Users.URL,
},
}
+18 -18
View File
@@ -2,7 +2,7 @@ package flagset
import (
"github.com/micro/cli/v2"
"github.com/owncloud/ocis/ocis-reva/pkg/config"
"github.com/owncloud/ocis/storage/pkg/config"
)
// StorageOCDataWithConfig applies cfg to the root flagset
@@ -14,7 +14,7 @@ func StorageOCDataWithConfig(cfg *config.Config) []cli.Flag {
Name: "debug-addr",
Value: "0.0.0.0:9165",
Usage: "Address to bind debug server",
EnvVars: []string{"REVA_STORAGE_OC_DATA_DEBUG_ADDR"},
EnvVars: []string{"STORAGE_STORAGE_OC_DATA_DEBUG_ADDR"},
Destination: &cfg.Reva.StorageOCData.DebugAddr,
},
@@ -25,56 +25,56 @@ func StorageOCDataWithConfig(cfg *config.Config) []cli.Flag {
&cli.StringFlag{
Name: "network",
Value: "tcp",
Usage: "Network to use for the reva service, can be 'tcp', 'udp' or 'unix'",
EnvVars: []string{"REVA_STORAGE_OC_DATA_NETWORK"},
Usage: "Network to use for the storage service, can be 'tcp', 'udp' or 'unix'",
EnvVars: []string{"STORAGE_STORAGE_OC_DATA_NETWORK"},
Destination: &cfg.Reva.StorageOCData.Network,
},
&cli.StringFlag{
Name: "protocol",
Value: "http",
Usage: "protocol for reva service, can be 'http' or 'grpc'",
EnvVars: []string{"REVA_STORAGE_OC_DATA_PROTOCOL"},
Usage: "protocol for storage service, can be 'http' or 'grpc'",
EnvVars: []string{"STORAGE_STORAGE_OC_DATA_PROTOCOL"},
Destination: &cfg.Reva.StorageOCData.Protocol,
},
&cli.StringFlag{
Name: "addr",
Value: "0.0.0.0:9164",
Usage: "Address to bind reva service",
EnvVars: []string{"REVA_STORAGE_OC_DATA_ADDR"},
Usage: "Address to bind storage service",
EnvVars: []string{"STORAGE_STORAGE_OC_DATA_ADDR"},
Destination: &cfg.Reva.StorageOCData.Addr,
},
&cli.StringFlag{
Name: "url",
Value: "localhost:9164",
Usage: "URL to use for the reva service",
EnvVars: []string{"REVA_STORAGE_OC_DATA_URL"},
Usage: "URL to use for the storage service",
EnvVars: []string{"STORAGE_STORAGE_OC_DATA_URL"},
Destination: &cfg.Reva.StorageOCData.URL,
},
&cli.StringSliceFlag{
Name: "service",
Value: cli.NewStringSlice("dataprovider"),
Usage: "--service dataprovider [--service otherservice]",
EnvVars: []string{"REVA_STORAGE_OC_DATA_SERVICES"},
EnvVars: []string{"STORAGE_STORAGE_OC_DATA_SERVICES"},
},
&cli.StringFlag{
Name: "driver",
Value: "owncloud",
Usage: "storage driver for oc data mount: eg. local, eos, owncloud, ocis or s3",
EnvVars: []string{"REVA_STORAGE_OC_DATA_DRIVER"},
EnvVars: []string{"STORAGE_STORAGE_OC_DATA_DRIVER"},
Destination: &cfg.Reva.StorageOCData.Driver,
},
&cli.StringFlag{
Name: "prefix",
Value: "data",
Usage: "prefix for the http endpoint, without leading slash",
EnvVars: []string{"REVA_STORAGE_OC_DATA_PREFIX"},
EnvVars: []string{"STORAGE_STORAGE_OC_DATA_PREFIX"},
Destination: &cfg.Reva.StorageOCData.Prefix,
},
&cli.StringFlag{
Name: "temp-folder",
Value: "/var/tmp/",
Usage: "temp folder",
EnvVars: []string{"REVA_STORAGE_OC_DATA_TEMP_FOLDER"},
EnvVars: []string{"STORAGE_STORAGE_OC_DATA_TEMP_FOLDER"},
Destination: &cfg.Reva.StorageOCData.TempFolder,
},
@@ -83,8 +83,8 @@ func StorageOCDataWithConfig(cfg *config.Config) []cli.Flag {
&cli.StringFlag{
Name: "gateway-url",
Value: "localhost:9142",
Usage: "URL to use for the reva gateway service",
EnvVars: []string{"REVA_GATEWAY_URL"},
Usage: "URL to use for the storage gateway service",
EnvVars: []string{"STORAGE_GATEWAY_URL"},
Destination: &cfg.Reva.Gateway.URL,
},
@@ -93,8 +93,8 @@ func StorageOCDataWithConfig(cfg *config.Config) []cli.Flag {
&cli.StringFlag{
Name: "users-url",
Value: "localhost:9144",
Usage: "URL to use for the reva service",
EnvVars: []string{"REVA_USERS_URL"},
Usage: "URL to use for the storage service",
EnvVars: []string{"STORAGE_USERS_URL"},
Destination: &cfg.Reva.Users.URL,
},
}
+13 -13
View File
@@ -2,7 +2,7 @@ package flagset
import (
"github.com/micro/cli/v2"
"github.com/owncloud/ocis/ocis-reva/pkg/config"
"github.com/owncloud/ocis/storage/pkg/config"
)
// StoragePublicLink applies cfg to the root flagset
@@ -13,36 +13,36 @@ func StoragePublicLink(cfg *config.Config) []cli.Flag {
Name: "debug-addr",
Value: "0.0.0.0:9179",
Usage: "Address to bind debug server",
EnvVars: []string{"REVA_STORAGE_PUBLIC_LINK_DEBUG_ADDR"},
EnvVars: []string{"STORAGE_STORAGE_PUBLIC_LINK_DEBUG_ADDR"},
Destination: &cfg.Reva.StoragePublicLink.DebugAddr,
},
&cli.StringFlag{
Name: "network",
Value: "tcp",
Usage: "Network to use for the reva service, can be 'tcp', 'udp' or 'unix'",
EnvVars: []string{"REVA_STORAGE_PUBLIC_LINK_NETWORK"},
Usage: "Network to use for the storage service, can be 'tcp', 'udp' or 'unix'",
EnvVars: []string{"STORAGE_STORAGE_PUBLIC_LINK_NETWORK"},
Destination: &cfg.Reva.StoragePublicLink.Network,
},
&cli.StringFlag{
Name: "protocol",
Value: "grpc",
Usage: "protocol for reva service, can be 'http' or 'grpc'",
EnvVars: []string{"REVA_STORAGE_PUBLIC_LINK_PROTOCOL"},
Usage: "protocol for storage service, can be 'http' or 'grpc'",
EnvVars: []string{"STORAGE_STORAGE_PUBLIC_LINK_PROTOCOL"},
Destination: &cfg.Reva.StoragePublicLink.Protocol,
},
&cli.StringFlag{
Name: "addr",
Value: "0.0.0.0:9178",
Usage: "Address to bind reva service",
EnvVars: []string{"REVA_STORAGE_PUBLIC_LINK_ADDR"},
Usage: "Address to bind storage service",
EnvVars: []string{"STORAGE_STORAGE_PUBLIC_LINK_ADDR"},
Destination: &cfg.Reva.StoragePublicLink.Addr,
},
&cli.StringFlag{
Name: "url",
Value: "localhost:9178",
Usage: "Address to bind reva service",
EnvVars: []string{"REVA_STORAGE_PUBLIC_LINK_URL"},
Usage: "Address to bind storage service",
EnvVars: []string{"STORAGE_STORAGE_PUBLIC_LINK_URL"},
Destination: &cfg.Reva.StoragePublicLink.URL,
},
@@ -50,15 +50,15 @@ func StoragePublicLink(cfg *config.Config) []cli.Flag {
Name: "mount-path",
Value: "/public/",
Usage: "mount path",
EnvVars: []string{"REVA_STORAGE_PUBLIC_LINK_MOUNT_PATH"},
EnvVars: []string{"STORAGE_STORAGE_PUBLIC_LINK_MOUNT_PATH"},
Destination: &cfg.Reva.StoragePublicLink.MountPath,
},
&cli.StringFlag{
Name: "gateway-url",
Value: "localhost:9142",
Usage: "URL to use for the reva gateway service",
EnvVars: []string{"REVA_GATEWAY_URL"},
Usage: "URL to use for the storage gateway service",
EnvVars: []string{"STORAGE_GATEWAY_URL"},
Destination: &cfg.Reva.Gateway.URL,
},
}
+16 -16
View File
@@ -2,7 +2,7 @@ package flagset
import (
"github.com/micro/cli/v2"
"github.com/owncloud/ocis/ocis-reva/pkg/config"
"github.com/owncloud/ocis/storage/pkg/config"
)
// StorageRootWithConfig applies cfg to the root flagset
@@ -14,7 +14,7 @@ func StorageRootWithConfig(cfg *config.Config) []cli.Flag {
Name: "debug-addr",
Value: "0.0.0.0:9153",
Usage: "Address to bind debug server",
EnvVars: []string{"REVA_STORAGE_ROOT_DEBUG_ADDR"},
EnvVars: []string{"STORAGE_STORAGE_ROOT_DEBUG_ADDR"},
Destination: &cfg.Reva.StorageRoot.DebugAddr,
},
@@ -25,70 +25,70 @@ func StorageRootWithConfig(cfg *config.Config) []cli.Flag {
&cli.StringFlag{
Name: "network",
Value: "tcp",
Usage: "Network to use for the reva service, can be 'tcp', 'udp' or 'unix'",
EnvVars: []string{"REVA_STORAGE_ROOT_NETWORK"},
Usage: "Network to use for the storage service, can be 'tcp', 'udp' or 'unix'",
EnvVars: []string{"STORAGE_STORAGE_ROOT_NETWORK"},
Destination: &cfg.Reva.StorageRoot.Network,
},
&cli.StringFlag{
Name: "protocol",
Value: "grpc",
Usage: "protocol for reva service, can be 'http' or 'grpc'",
EnvVars: []string{"REVA_STORAGE_ROOT_PROTOCOL"},
Usage: "protocol for storage service, can be 'http' or 'grpc'",
EnvVars: []string{"STORAGE_STORAGE_ROOT_PROTOCOL"},
Destination: &cfg.Reva.StorageRoot.Protocol,
},
&cli.StringFlag{
Name: "addr",
Value: "0.0.0.0:9152",
Usage: "Address to bind reva service",
EnvVars: []string{"REVA_STORAGE_ROOT_ADDR"},
Usage: "Address to bind storage service",
EnvVars: []string{"STORAGE_STORAGE_ROOT_ADDR"},
Destination: &cfg.Reva.StorageRoot.Addr,
},
&cli.StringFlag{
Name: "url",
Value: "localhost:9152",
Usage: "URL to use for the reva service",
EnvVars: []string{"REVA_STORAGE_ROOT_URL"},
Usage: "URL to use for the storage service",
EnvVars: []string{"STORAGE_STORAGE_ROOT_URL"},
Destination: &cfg.Reva.StorageRoot.URL,
},
&cli.StringSliceFlag{
Name: "service",
Value: cli.NewStringSlice("storageprovider"),
Usage: "--service storageprovider [--service otherservice]",
EnvVars: []string{"REVA_STORAGE_ROOT_SERVICES"},
EnvVars: []string{"STORAGE_STORAGE_ROOT_SERVICES"},
},
&cli.StringFlag{
Name: "driver",
Value: "local",
Usage: "storage driver for root mount: eg. local, eos, owncloud, ocis or s3",
EnvVars: []string{"REVA_STORAGE_ROOT_DRIVER"},
EnvVars: []string{"STORAGE_STORAGE_ROOT_DRIVER"},
Destination: &cfg.Reva.StorageRoot.Driver,
},
&cli.StringFlag{
Name: "mount-path",
Value: "/",
Usage: "mount path",
EnvVars: []string{"REVA_STORAGE_ROOT_MOUNT_PATH"},
EnvVars: []string{"STORAGE_STORAGE_ROOT_MOUNT_PATH"},
Destination: &cfg.Reva.StorageRoot.MountPath,
},
&cli.StringFlag{
Name: "mount-id",
Value: "123e4567-e89b-12d3-a456-426655440001",
Usage: "mount id",
EnvVars: []string{"REVA_STORAGE_ROOT_MOUNT_ID"},
EnvVars: []string{"STORAGE_STORAGE_ROOT_MOUNT_ID"},
Destination: &cfg.Reva.StorageRoot.MountID,
},
&cli.BoolFlag{
Name: "expose-data-server",
Usage: "exposes a dedicated data server",
EnvVars: []string{"REVA_STORAGE_ROOT_EXPOSE_DATA_SERVER"},
EnvVars: []string{"STORAGE_STORAGE_ROOT_EXPOSE_DATA_SERVER"},
Destination: &cfg.Reva.StorageRoot.ExposeDataServer,
},
&cli.StringFlag{
Name: "data-server-url",
Value: "",
Usage: "data server url",
EnvVars: []string{"REVA_STORAGE_ROOT_DATA_SERVER_URL"},
EnvVars: []string{"STORAGE_STORAGE_ROOT_DATA_SERVER_URL"},
Destination: &cfg.Reva.StorageRoot.DataServerURL,
},
}
+7 -7
View File
@@ -2,7 +2,7 @@ package flagset
import (
"github.com/micro/cli/v2"
"github.com/owncloud/ocis/ocis-reva/pkg/config"
"github.com/owncloud/ocis/storage/pkg/config"
)
// TracingWithConfig applies cfg to the root flagset
@@ -12,35 +12,35 @@ func TracingWithConfig(cfg *config.Config) []cli.Flag {
&cli.BoolFlag{
Name: "tracing-enabled",
Usage: "Enable sending traces",
EnvVars: []string{"REVA_TRACING_ENABLED"},
EnvVars: []string{"STORAGE_TRACING_ENABLED"},
Destination: &cfg.Tracing.Enabled,
},
&cli.StringFlag{
Name: "tracing-type",
Value: "jaeger",
Usage: "Tracing backend type",
EnvVars: []string{"REVA_TRACING_TYPE"},
EnvVars: []string{"STORAGE_TRACING_TYPE"},
Destination: &cfg.Tracing.Type,
},
&cli.StringFlag{
Name: "tracing-endpoint",
Value: "",
Usage: "Endpoint for the agent",
EnvVars: []string{"REVA_TRACING_ENDPOINT"},
EnvVars: []string{"STORAGE_TRACING_ENDPOINT"},
Destination: &cfg.Tracing.Endpoint,
},
&cli.StringFlag{
Name: "tracing-collector",
Value: "",
Usage: "Endpoint for the collector",
EnvVars: []string{"REVA_TRACING_COLLECTOR"},
EnvVars: []string{"STORAGE_TRACING_COLLECTOR"},
Destination: &cfg.Tracing.Collector,
},
&cli.StringFlag{
Name: "tracing-service",
Value: "reva",
Value: "storage",
Usage: "Service name for tracing",
EnvVars: []string{"REVA_TRACING_SERVICE"},
EnvVars: []string{"STORAGE_TRACING_SERVICE"},
Destination: &cfg.Tracing.Service,
},
}
+23 -23
View File
@@ -2,7 +2,7 @@ package flagset
import (
"github.com/micro/cli/v2"
"github.com/owncloud/ocis/ocis-reva/pkg/config"
"github.com/owncloud/ocis/storage/pkg/config"
)
// UsersWithConfig applies cfg to the root flagset
@@ -14,7 +14,7 @@ func UsersWithConfig(cfg *config.Config) []cli.Flag {
Name: "debug-addr",
Value: "0.0.0.0:9145",
Usage: "Address to bind debug server",
EnvVars: []string{"REVA_SHARING_DEBUG_ADDR"},
EnvVars: []string{"STORAGE_SHARING_DEBUG_ADDR"},
Destination: &cfg.Reva.Users.DebugAddr,
},
@@ -25,50 +25,50 @@ func UsersWithConfig(cfg *config.Config) []cli.Flag {
&cli.StringFlag{
Name: "network",
Value: "tcp",
Usage: "Network to use for the reva service, can be 'tcp', 'udp' or 'unix'",
EnvVars: []string{"REVA_USERS_NETWORK"},
Usage: "Network to use for the storage service, can be 'tcp', 'udp' or 'unix'",
EnvVars: []string{"STORAGE_USERS_NETWORK"},
Destination: &cfg.Reva.Users.Network,
},
&cli.StringFlag{
Name: "protocol",
Value: "grpc",
Usage: "protocol for reva service, can be 'http' or 'grpc'",
EnvVars: []string{"REVA_USERS_PROTOCOL"},
Usage: "protocol for storage service, can be 'http' or 'grpc'",
EnvVars: []string{"STORAGE_USERS_PROTOCOL"},
Destination: &cfg.Reva.Users.Protocol,
},
&cli.StringFlag{
Name: "addr",
Value: "0.0.0.0:9144",
Usage: "Address to bind reva service",
EnvVars: []string{"REVA_USERS_ADDR"},
Usage: "Address to bind storage service",
EnvVars: []string{"STORAGE_USERS_ADDR"},
Destination: &cfg.Reva.Users.Addr,
},
&cli.StringFlag{
Name: "url",
Value: "localhost:9144",
Usage: "URL to use for the reva service",
EnvVars: []string{"REVA_USERS_URL"},
Usage: "URL to use for the storage service",
EnvVars: []string{"STORAGE_USERS_URL"},
Destination: &cfg.Reva.Users.URL,
},
&cli.StringSliceFlag{
Name: "service",
Value: cli.NewStringSlice("userprovider"), // TODO preferences
Usage: "--service userprovider [--service otherservice]",
EnvVars: []string{"REVA_USERS_SERVICES"},
EnvVars: []string{"STORAGE_USERS_SERVICES"},
},
&cli.StringFlag{
Name: "driver",
Value: "ldap",
Usage: "user driver: 'demo', 'json', 'ldap', or 'rest'",
EnvVars: []string{"REVA_USERS_DRIVER"},
EnvVars: []string{"STORAGE_USERS_DRIVER"},
Destination: &cfg.Reva.Users.Driver,
},
&cli.StringFlag{
Name: "json-config",
Value: "",
Usage: "Path to users.json file",
EnvVars: []string{"REVA_USERS_JSON"},
EnvVars: []string{"STORAGE_USERS_JSON"},
Destination: &cfg.Reva.Users.JSON,
},
@@ -78,70 +78,70 @@ func UsersWithConfig(cfg *config.Config) []cli.Flag {
Name: "rest-client-id",
Value: "",
Usage: "User rest driver Client ID",
EnvVars: []string{"REVA_REST_CLIENT_ID"},
EnvVars: []string{"STORAGE_REST_CLIENT_ID"},
Destination: &cfg.Reva.UserRest.ClientID,
},
&cli.StringFlag{
Name: "rest-client-secret",
Value: "",
Usage: "User rest driver Client Secret",
EnvVars: []string{"REVA_REST_CLIENT_SECRET"},
EnvVars: []string{"STORAGE_REST_CLIENT_SECRET"},
Destination: &cfg.Reva.UserRest.ClientSecret,
},
&cli.StringFlag{
Name: "rest-redis-address",
Value: "localhost:6379",
Usage: "Address for redis server",
EnvVars: []string{"REVA_REST_REDIS_ADDRESS"},
EnvVars: []string{"STORAGE_REST_REDIS_ADDRESS"},
Destination: &cfg.Reva.UserRest.RedisAddress,
},
&cli.StringFlag{
Name: "rest-redis-username",
Value: "",
Usage: "Username for redis server",
EnvVars: []string{"REVA_REST_REDIS_USERNAME"},
EnvVars: []string{"STORAGE_REST_REDIS_USERNAME"},
Destination: &cfg.Reva.UserRest.RedisUsername,
},
&cli.StringFlag{
Name: "rest-redis-password",
Value: "",
Usage: "Password for redis server",
EnvVars: []string{"REVA_REST_REDIS_PASSWORD"},
EnvVars: []string{"STORAGE_REST_REDIS_PASSWORD"},
Destination: &cfg.Reva.UserRest.RedisPassword,
},
&cli.IntFlag{
Name: "rest-user-groups-cache-expiration",
Value: 5,
Usage: "Time in minutes for redis cache expiration.",
EnvVars: []string{"REVA_REST_CACHE_EXPIRATION"},
EnvVars: []string{"STORAGE_REST_CACHE_EXPIRATION"},
Destination: &cfg.Reva.UserRest.UserGroupsCacheExpiration,
},
&cli.StringFlag{
Name: "rest-id-provider",
Value: "",
Usage: "The OIDC Provider",
EnvVars: []string{"REVA_REST_ID_PROVIDER"},
EnvVars: []string{"STORAGE_REST_ID_PROVIDER"},
Destination: &cfg.Reva.UserRest.IDProvider,
},
&cli.StringFlag{
Name: "rest-api-base-url",
Value: "",
Usage: "Base API Endpoint",
EnvVars: []string{"REVA_REST_API_BASE_URL"},
EnvVars: []string{"STORAGE_REST_API_BASE_URL"},
Destination: &cfg.Reva.UserRest.APIBaseURL,
},
&cli.StringFlag{
Name: "rest-oidc-token-endpoint",
Value: "",
Usage: "Endpoint to generate token to access the API",
EnvVars: []string{"REVA_REST_OIDC_TOKEN_ENDPOINT"},
EnvVars: []string{"STORAGE_REST_OIDC_TOKEN_ENDPOINT"},
Destination: &cfg.Reva.UserRest.OIDCTokenEndpoint,
},
&cli.StringFlag{
Name: "rest-target-api",
Value: "",
Usage: "The target application",
EnvVars: []string{"REVA_REST_TARGET_API"},
EnvVars: []string{"STORAGE_REST_TARGET_API"},
Destination: &cfg.Reva.UserRest.TargetAPI,
},
}