Rename ocis single binary commands and flagset

This commit is contained in:
Michael Barz
2020-10-05 21:30:51 +02:00
parent e946819c3a
commit 93138c81ed
40 changed files with 905 additions and 893 deletions

1
.gitignore vendored
View File

@@ -1,5 +1,6 @@
*/coverage.out
/**/config
/**/bin
/**/dist
/hugo

View File

@@ -1,9 +1,9 @@
---
title: "Configuration"
date: "2020-09-21T13:14:56+0200"
date: "2020-10-05T21:19:39+0200"
weight: 20
geekdocRepo: https://github.com/owncloud/ocis
geekdocEditPath: edit/master/docs
geekdocEditPath: edit/master/docs/ocis
geekdocFilePath: configuration.md
---
@@ -43,28 +43,25 @@ ownCloud Infinite Scale Stack
Usage: `ocis [global options] command [command options] [arguments...]`
--config-file | $OCIS_CONFIG_FILE
--config-file | $OCIS_CONFIG_FILE
: Path to config file.
--log-level | $OCIS_LOG_LEVEL
--log-level | $OCIS_LOG_LEVEL
: Set logging level. Default: `info`.
--log-pretty | $OCIS_LOG_PRETTY
--log-pretty | $OCIS_LOG_PRETTY
: Enable pretty logging. Default: `true`.
--log-color | $OCIS_LOG_COLOR
--log-color | $OCIS_LOG_COLOR
: Enable colored logging. Default: `true`.
## Sub Commands
### ocis health
### ocis kill
Check health status
Kill an extension by name
Usage: `ocis health [command options] [arguments...]`
--debug-addr | $OCIS_DEBUG_ADDR
: Address to debug endpoint. Default: `0.0.0.0:9010`.
Usage: `ocis kill [command options] [arguments...]`
### ocis server
@@ -72,42 +69,63 @@ Start fullstack server
Usage: `ocis server [command options] [arguments...]`
--tracing-enabled | $OCIS_TRACING_ENABLED
--tracing-enabled | $OCIS_TRACING_ENABLED
: Enable sending traces.
--tracing-type | $OCIS_TRACING_TYPE
--tracing-type | $OCIS_TRACING_TYPE
: Tracing backend type. Default: `jaeger`.
--tracing-endpoint | $OCIS_TRACING_ENDPOINT
--tracing-endpoint | $OCIS_TRACING_ENDPOINT
: Endpoint for the agent. Default: `localhost:6831`.
--tracing-collector | $OCIS_TRACING_COLLECTOR
--tracing-collector | $OCIS_TRACING_COLLECTOR
: Endpoint for the collector. Default: `http://localhost:14268/api/traces`.
--tracing-service | $OCIS_TRACING_SERVICE
--tracing-service | $OCIS_TRACING_SERVICE
: Service name for tracing. Default: `ocis`.
--debug-addr | $OCIS_DEBUG_ADDR
--debug-addr | $OCIS_DEBUG_ADDR
: Address to bind debug server. Default: `0.0.0.0:9010`.
--debug-token | $OCIS_DEBUG_TOKEN
--debug-token | $OCIS_DEBUG_TOKEN
: Token to grant metrics access.
--debug-pprof | $OCIS_DEBUG_PPROF
--debug-pprof | $OCIS_DEBUG_PPROF
: Enable pprof debugging.
--debug-zpages | $OCIS_DEBUG_ZPAGES
--debug-zpages | $OCIS_DEBUG_ZPAGES
: Enable zpages debugging.
--http-addr | $OCIS_HTTP_ADDR
--http-addr | $OCIS_HTTP_ADDR
: Address to bind http server. Default: `0.0.0.0:9000`.
--http-root | $OCIS_HTTP_ROOT
--http-root | $OCIS_HTTP_ROOT
: Root path of http server. Default: `/`.
--grpc-addr | $OCIS_GRPC_ADDR
--grpc-addr | $OCIS_GRPC_ADDR
: Address to bind grpc server. Default: `0.0.0.0:9001`.
### ocis run
Runs an extension
Usage: `ocis run [command options] [arguments...]`
### ocis health
Check health status
Usage: `ocis health [command options] [arguments...]`
--debug-addr | $OCIS_DEBUG_ADDR
: Address to debug endpoint. Default: `0.0.0.0:9010`.
### ocis list
Lists running ocis extensions
Usage: `ocis list [command options] [arguments...]`
### List of available Extension subcommands
There are more subcommands to start the individual extensions. Please check the documentation about their usage and options in the dedicated section of the documentation.
@@ -116,9 +134,29 @@ There are more subcommands to start the individual extensions. Please check the
Start konnectd server
#### ocis run
#### ocis storage-frontend
Runs an extension
Start storage frontend
#### ocis accounts
Start accounts server
#### ocis storage-storage-root
Start storage root storage
#### ocis storage-gateway
Start storage gateway
#### ocis storage-storage-home
Start storage storage service for home mount
#### ocis storage-storage-public-link
Start storage public link storage
#### ocis store
@@ -128,95 +166,67 @@ Start a go-micro store
Start glauth server
#### ocis ocs
#### ocis storage-auth-bearer
Start ocs server
Start storage auth-bearer service
#### ocis reva-storage-eos-data
#### ocis storage-sharing
Start reva storage data provider for eos mount
#### ocis reva-storage-home-data
Start reva storage data provider for home mount
#### ocis kill
Kill an extension by name
#### ocis proxy
Start proxy server
#### ocis reva-auth-bearer
Start reva auth-bearer service
#### ocis reva-storage-oc-data
Start reva storage data provider for oc mount
#### ocis settings
Start settings server
#### ocis accounts
Start accounts server
#### ocis phoenix
Start phoenix server
#### ocis reva-storage-eos
Start reva storage service for eos mount
#### ocis reva-storage-home
Start reva storage service for home mount
#### ocis reva-storage-oc
Start reva storage service for oc mount
#### ocis reva-storage-root
Start reva root storage
#### ocis reva-gateway
Start reva gateway
#### ocis reva-sharing
Start reva sharing service
#### ocis reva-users
Start reva users service
#### ocis list
Lists running ocis extensions
#### ocis reva-auth-basic
Start reva auth-basic service
#### ocis reva-frontend
Start reva frontend
#### ocis reva-storage-public-link
Start reva public link storage
#### ocis thumbnails
Start thumbnails server
Start storage sharing service
#### ocis webdav
Start webdav server
#### ocis storage-storage-oc-data
Start storage storage data provider for oc mount
#### ocis thumbnails
Start thumbnails server
#### ocis proxy
Start proxy server
#### ocis settings
Start settings server
#### ocis storage-auth-basic
Start storage auth-basic service
#### ocis storage-storage-metadata
Start storage storage service for metadata mount
#### ocis ocs
Start ocs server
#### ocis storage-storage-eos
Start storage storage service for eos mount
#### ocis storage-storage-eos-data
Start storage storage data provider for eos mount
#### ocis storage-storage-home-data
Start storage storage data provider for home mount
#### ocis storage-storage-oc
Start storage storage service for oc mount
#### ocis storage-users
Start storage users service
#### ocis phoenix
Start phoenix server

View File

@@ -21,7 +21,7 @@ require (
github.com/owncloud/ocis/konnectd v0.0.0-00010101000000-000000000000
github.com/owncloud/ocis/ocis-phoenix v0.0.0-00010101000000-000000000000
github.com/owncloud/ocis/ocis-pkg v0.1.0
github.com/owncloud/ocis/ocis-reva v0.0.0-00010101000000-000000000000
github.com/owncloud/ocis/storage v0.0.0-00010101000000-000000000000
github.com/owncloud/ocis/ocs v0.0.0-00010101000000-000000000000
github.com/owncloud/ocis/proxy v0.0.0-00010101000000-000000000000
github.com/owncloud/ocis/settings v0.0.0-20200918114005-1a0ddd2190ee
@@ -40,7 +40,7 @@ replace (
github.com/owncloud/ocis/konnectd => ../konnectd
github.com/owncloud/ocis/ocis-phoenix => ../ocis-phoenix
github.com/owncloud/ocis/ocis-pkg => ../ocis-pkg
github.com/owncloud/ocis/ocis-reva => ../ocis-reva
github.com/owncloud/ocis/storage => ../storage
github.com/owncloud/ocis/ocs => ../ocs
github.com/owncloud/ocis/proxy => ../proxy
github.com/owncloud/ocis/settings => ../settings

View File

@@ -868,6 +868,7 @@ github.com/hashicorp/vault/api v1.0.4/go.mod h1:gDcqh3WGcR1cpF5AJz/B1UFheUEneMoI
github.com/hashicorp/vault/sdk v0.1.13/go.mod h1:B+hVj7TpuQY1Y/GPbCpffmgd+tSEwvhkWnjtSYCaS2M=
github.com/hashicorp/yamux v0.0.0-20180604194846-3520598351bb/go.mod h1:+NfK9FKeTrX5uv1uIXGdwYDTeHna2qgaIlx54MXqjAM=
github.com/hashicorp/yamux v0.0.0-20181012175058-2f1d1f20f75d/go.mod h1:+NfK9FKeTrX5uv1uIXGdwYDTeHna2qgaIlx54MXqjAM=
github.com/haya14busa/goverage v0.0.0-20180129164344-eec3514a20b5 h1:FdBGmSkD2QpQzRWup//SGObvWf2nq89zj9+ta9OvI3A=
github.com/haya14busa/goverage v0.0.0-20180129164344-eec3514a20b5/go.mod h1:0YZ2wQSuwviXXXGUiK6zXzskyBLAbLXhamxzcFHSLoM=
github.com/hpcloud/tail v1.0.0 h1:nfCOvKYfkgYP8hkirhJocXT2+zOD8yUNjXaWfTlyFKI=
github.com/hpcloud/tail v1.0.0/go.mod h1:ab1qPbhIpdTxEkNHXyeSf5vhxWSCs/tWer42PpOxQnU=

View File

@@ -48,8 +48,8 @@ func configureProxy(cfg *config.Config) *svcconfig.Config {
cfg.Proxy.Tracing.Service = cfg.Tracing.Service
}
if cfg.Reva.Reva.JWTSecret != "" {
cfg.Proxy.TokenManager.JWTSecret = cfg.Reva.Reva.JWTSecret
if cfg.Storage.Reva.JWTSecret != "" {
cfg.Proxy.TokenManager.JWTSecret = cfg.Storage.Reva.JWTSecret
}
return cfg.Proxy

View File

@@ -1,50 +0,0 @@
// +build !simple
package command
import (
"github.com/micro/cli/v2"
"github.com/owncloud/ocis/ocis-reva/pkg/command"
svcconfig "github.com/owncloud/ocis/ocis-reva/pkg/config"
"github.com/owncloud/ocis/ocis-reva/pkg/flagset"
"github.com/owncloud/ocis/ocis/pkg/config"
"github.com/owncloud/ocis/ocis/pkg/register"
)
// RevaAuthBasicCommand is the entrypoint for the reva-auth-basic command.
func RevaAuthBasicCommand(cfg *config.Config) *cli.Command {
return &cli.Command{
Name: "reva-auth-basic",
Usage: "Start reva auth-basic service",
Category: "Extensions",
Flags: flagset.AuthBasicWithConfig(cfg.Reva),
Action: func(c *cli.Context) error {
scfg := configureRevaAuthBasic(cfg)
return cli.HandleAction(
command.AuthBasic(scfg).Action,
c,
)
},
}
}
func configureRevaAuthBasic(cfg *config.Config) *svcconfig.Config {
cfg.Reva.Log.Level = cfg.Log.Level
cfg.Reva.Log.Pretty = cfg.Log.Pretty
cfg.Reva.Log.Color = cfg.Log.Color
if cfg.Tracing.Enabled {
cfg.Reva.Tracing.Enabled = cfg.Tracing.Enabled
cfg.Reva.Tracing.Type = cfg.Tracing.Type
cfg.Reva.Tracing.Endpoint = cfg.Tracing.Endpoint
cfg.Reva.Tracing.Collector = cfg.Tracing.Collector
cfg.Reva.Tracing.Service = cfg.Tracing.Service
}
return cfg.Reva
}
func init() {
register.AddCommand(RevaAuthBasicCommand)
}

View File

@@ -1,50 +0,0 @@
// +build !simple
package command
import (
"github.com/micro/cli/v2"
"github.com/owncloud/ocis/ocis-reva/pkg/command"
svcconfig "github.com/owncloud/ocis/ocis-reva/pkg/config"
"github.com/owncloud/ocis/ocis-reva/pkg/flagset"
"github.com/owncloud/ocis/ocis/pkg/config"
"github.com/owncloud/ocis/ocis/pkg/register"
)
// RevaAuthBearerCommand is the entrypoint for the reva-auth-bearer command.
func RevaAuthBearerCommand(cfg *config.Config) *cli.Command {
return &cli.Command{
Name: "reva-auth-bearer",
Usage: "Start reva auth-bearer service",
Category: "Extensions",
Flags: flagset.AuthBearerWithConfig(cfg.Reva),
Action: func(c *cli.Context) error {
scfg := configureRevaAuthBearer(cfg)
return cli.HandleAction(
command.AuthBearer(scfg).Action,
c,
)
},
}
}
func configureRevaAuthBearer(cfg *config.Config) *svcconfig.Config {
cfg.Reva.Log.Level = cfg.Log.Level
cfg.Reva.Log.Pretty = cfg.Log.Pretty
cfg.Reva.Log.Color = cfg.Log.Color
if cfg.Tracing.Enabled {
cfg.Reva.Tracing.Enabled = cfg.Tracing.Enabled
cfg.Reva.Tracing.Type = cfg.Tracing.Type
cfg.Reva.Tracing.Endpoint = cfg.Tracing.Endpoint
cfg.Reva.Tracing.Collector = cfg.Tracing.Collector
cfg.Reva.Tracing.Service = cfg.Tracing.Service
}
return cfg.Reva
}
func init() {
register.AddCommand(RevaAuthBearerCommand)
}

View File

@@ -1,50 +0,0 @@
// +build !simple
package command
import (
"github.com/micro/cli/v2"
"github.com/owncloud/ocis/ocis-reva/pkg/command"
svcconfig "github.com/owncloud/ocis/ocis-reva/pkg/config"
"github.com/owncloud/ocis/ocis-reva/pkg/flagset"
"github.com/owncloud/ocis/ocis/pkg/config"
"github.com/owncloud/ocis/ocis/pkg/register"
)
// RevaFrontendCommand is the entrypoint for the reva-frontend command.
func RevaFrontendCommand(cfg *config.Config) *cli.Command {
return &cli.Command{
Name: "reva-frontend",
Usage: "Start reva frontend",
Category: "Extensions",
Flags: flagset.FrontendWithConfig(cfg.Reva),
Action: func(c *cli.Context) error {
scfg := configureRevaFrontend(cfg)
return cli.HandleAction(
command.Frontend(scfg).Action,
c,
)
},
}
}
func configureRevaFrontend(cfg *config.Config) *svcconfig.Config {
cfg.Reva.Log.Level = cfg.Log.Level
cfg.Reva.Log.Pretty = cfg.Log.Pretty
cfg.Reva.Log.Color = cfg.Log.Color
if cfg.Tracing.Enabled {
cfg.Reva.Tracing.Enabled = cfg.Tracing.Enabled
cfg.Reva.Tracing.Type = cfg.Tracing.Type
cfg.Reva.Tracing.Endpoint = cfg.Tracing.Endpoint
cfg.Reva.Tracing.Collector = cfg.Tracing.Collector
cfg.Reva.Tracing.Service = cfg.Tracing.Service
}
return cfg.Reva
}
func init() {
register.AddCommand(RevaFrontendCommand)
}

View File

@@ -1,50 +0,0 @@
// +build !simple
package command
import (
"github.com/micro/cli/v2"
"github.com/owncloud/ocis/ocis-reva/pkg/command"
svcconfig "github.com/owncloud/ocis/ocis-reva/pkg/config"
"github.com/owncloud/ocis/ocis-reva/pkg/flagset"
"github.com/owncloud/ocis/ocis/pkg/config"
"github.com/owncloud/ocis/ocis/pkg/register"
)
// RevaGatewayCommand is the entrypoint for the reva-gateway command.
func RevaGatewayCommand(cfg *config.Config) *cli.Command {
return &cli.Command{
Name: "reva-gateway",
Usage: "Start reva gateway",
Category: "Extensions",
Flags: flagset.GatewayWithConfig(cfg.Reva),
Action: func(c *cli.Context) error {
scfg := configureRevaGateway(cfg)
return cli.HandleAction(
command.Gateway(scfg).Action,
c,
)
},
}
}
func configureRevaGateway(cfg *config.Config) *svcconfig.Config {
cfg.Reva.Log.Level = cfg.Log.Level
cfg.Reva.Log.Pretty = cfg.Log.Pretty
cfg.Reva.Log.Color = cfg.Log.Color
if cfg.Tracing.Enabled {
cfg.Reva.Tracing.Enabled = cfg.Tracing.Enabled
cfg.Reva.Tracing.Type = cfg.Tracing.Type
cfg.Reva.Tracing.Endpoint = cfg.Tracing.Endpoint
cfg.Reva.Tracing.Collector = cfg.Tracing.Collector
cfg.Reva.Tracing.Service = cfg.Tracing.Service
}
return cfg.Reva
}
func init() {
register.AddCommand(RevaGatewayCommand)
}

View File

@@ -1,50 +0,0 @@
// +build !simple
package command
import (
"github.com/micro/cli/v2"
"github.com/owncloud/ocis/ocis-reva/pkg/command"
svcconfig "github.com/owncloud/ocis/ocis-reva/pkg/config"
"github.com/owncloud/ocis/ocis-reva/pkg/flagset"
"github.com/owncloud/ocis/ocis/pkg/config"
"github.com/owncloud/ocis/ocis/pkg/register"
)
// RevaSharingCommand is the entrypoint for the reva-sharing command.
func RevaSharingCommand(cfg *config.Config) *cli.Command {
return &cli.Command{
Name: "reva-sharing",
Usage: "Start reva sharing service",
Category: "Extensions",
Flags: flagset.SharingWithConfig(cfg.Reva),
Action: func(c *cli.Context) error {
scfg := configureRevaSharing(cfg)
return cli.HandleAction(
command.Sharing(scfg).Action,
c,
)
},
}
}
func configureRevaSharing(cfg *config.Config) *svcconfig.Config {
cfg.Reva.Log.Level = cfg.Log.Level
cfg.Reva.Log.Pretty = cfg.Log.Pretty
cfg.Reva.Log.Color = cfg.Log.Color
if cfg.Tracing.Enabled {
cfg.Reva.Tracing.Enabled = cfg.Tracing.Enabled
cfg.Reva.Tracing.Type = cfg.Tracing.Type
cfg.Reva.Tracing.Endpoint = cfg.Tracing.Endpoint
cfg.Reva.Tracing.Collector = cfg.Tracing.Collector
cfg.Reva.Tracing.Service = cfg.Tracing.Service
}
return cfg.Reva
}
func init() {
register.AddCommand(RevaSharingCommand)
}

View File

@@ -1,50 +0,0 @@
// +build !simple
package command
import (
"github.com/micro/cli/v2"
"github.com/owncloud/ocis/ocis-reva/pkg/command"
svcconfig "github.com/owncloud/ocis/ocis-reva/pkg/config"
"github.com/owncloud/ocis/ocis-reva/pkg/flagset"
"github.com/owncloud/ocis/ocis/pkg/config"
"github.com/owncloud/ocis/ocis/pkg/register"
)
// RevaStorageEOSCommand is the entrypoint for the reva-storage-oc command.
func RevaStorageEOSCommand(cfg *config.Config) *cli.Command {
return &cli.Command{
Name: "reva-storage-eos",
Usage: "Start reva storage service for eos mount",
Category: "Extensions",
Flags: flagset.StorageEOSWithConfig(cfg.Reva),
Action: func(c *cli.Context) error {
scfg := configureRevaStorageEOS(cfg)
return cli.HandleAction(
command.StorageEOS(scfg).Action,
c,
)
},
}
}
func configureRevaStorageEOS(cfg *config.Config) *svcconfig.Config {
cfg.Reva.Log.Level = cfg.Log.Level
cfg.Reva.Log.Pretty = cfg.Log.Pretty
cfg.Reva.Log.Color = cfg.Log.Color
if cfg.Tracing.Enabled {
cfg.Reva.Tracing.Enabled = cfg.Tracing.Enabled
cfg.Reva.Tracing.Type = cfg.Tracing.Type
cfg.Reva.Tracing.Endpoint = cfg.Tracing.Endpoint
cfg.Reva.Tracing.Collector = cfg.Tracing.Collector
cfg.Reva.Tracing.Service = cfg.Tracing.Service
}
return cfg.Reva
}
func init() {
register.AddCommand(RevaStorageEOSCommand)
}

View File

@@ -1,50 +0,0 @@
// +build !simple
package command
import (
"github.com/micro/cli/v2"
"github.com/owncloud/ocis/ocis-reva/pkg/command"
svcconfig "github.com/owncloud/ocis/ocis-reva/pkg/config"
"github.com/owncloud/ocis/ocis-reva/pkg/flagset"
"github.com/owncloud/ocis/ocis/pkg/config"
"github.com/owncloud/ocis/ocis/pkg/register"
)
// RevaStorageEOSDataCommand is the entrypoint for the reva-storage-eos-data command.
func RevaStorageEOSDataCommand(cfg *config.Config) *cli.Command {
return &cli.Command{
Name: "reva-storage-eos-data",
Usage: "Start reva storage data provider for eos mount",
Category: "Extensions",
Flags: flagset.StorageEOSDataWithConfig(cfg.Reva),
Action: func(c *cli.Context) error {
scfg := configureRevaStorageEOSData(cfg)
return cli.HandleAction(
command.StorageEOSData(scfg).Action,
c,
)
},
}
}
func configureRevaStorageEOSData(cfg *config.Config) *svcconfig.Config {
cfg.Reva.Log.Level = cfg.Log.Level
cfg.Reva.Log.Pretty = cfg.Log.Pretty
cfg.Reva.Log.Color = cfg.Log.Color
if cfg.Tracing.Enabled {
cfg.Reva.Tracing.Enabled = cfg.Tracing.Enabled
cfg.Reva.Tracing.Type = cfg.Tracing.Type
cfg.Reva.Tracing.Endpoint = cfg.Tracing.Endpoint
cfg.Reva.Tracing.Collector = cfg.Tracing.Collector
cfg.Reva.Tracing.Service = cfg.Tracing.Service
}
return cfg.Reva
}
func init() {
register.AddCommand(RevaStorageEOSDataCommand)
}

View File

@@ -1,50 +0,0 @@
// +build !simple
package command
import (
"github.com/micro/cli/v2"
"github.com/owncloud/ocis/ocis-reva/pkg/command"
svcconfig "github.com/owncloud/ocis/ocis-reva/pkg/config"
"github.com/owncloud/ocis/ocis-reva/pkg/flagset"
"github.com/owncloud/ocis/ocis/pkg/config"
"github.com/owncloud/ocis/ocis/pkg/register"
)
// RevaStorageHomeCommand is the entrypoint for the reva-storage-home command.
func RevaStorageHomeCommand(cfg *config.Config) *cli.Command {
return &cli.Command{
Name: "reva-storage-home",
Usage: "Start reva storage service for home mount",
Category: "Extensions",
Flags: flagset.StorageHomeWithConfig(cfg.Reva),
Action: func(c *cli.Context) error {
scfg := configureRevaStorageHome(cfg)
return cli.HandleAction(
command.StorageHome(scfg).Action,
c,
)
},
}
}
func configureRevaStorageHome(cfg *config.Config) *svcconfig.Config {
cfg.Reva.Log.Level = cfg.Log.Level
cfg.Reva.Log.Pretty = cfg.Log.Pretty
cfg.Reva.Log.Color = cfg.Log.Color
if cfg.Tracing.Enabled {
cfg.Reva.Tracing.Enabled = cfg.Tracing.Enabled
cfg.Reva.Tracing.Type = cfg.Tracing.Type
cfg.Reva.Tracing.Endpoint = cfg.Tracing.Endpoint
cfg.Reva.Tracing.Collector = cfg.Tracing.Collector
cfg.Reva.Tracing.Service = cfg.Tracing.Service
}
return cfg.Reva
}
func init() {
register.AddCommand(RevaStorageHomeCommand)
}

View File

@@ -1,50 +0,0 @@
// +build !simple
package command
import (
"github.com/micro/cli/v2"
"github.com/owncloud/ocis/ocis-reva/pkg/command"
svcconfig "github.com/owncloud/ocis/ocis-reva/pkg/config"
"github.com/owncloud/ocis/ocis-reva/pkg/flagset"
"github.com/owncloud/ocis/ocis/pkg/config"
"github.com/owncloud/ocis/ocis/pkg/register"
)
// RevaStorageHomeDataCommand is the entrypoint for the reva-storage-home-data command.
func RevaStorageHomeDataCommand(cfg *config.Config) *cli.Command {
return &cli.Command{
Name: "reva-storage-home-data",
Usage: "Start reva storage data provider for home mount",
Category: "Extensions",
Flags: flagset.StorageHomeDataWithConfig(cfg.Reva),
Action: func(c *cli.Context) error {
scfg := configureRevaStorageHomeData(cfg)
return cli.HandleAction(
command.StorageHomeData(scfg).Action,
c,
)
},
}
}
func configureRevaStorageHomeData(cfg *config.Config) *svcconfig.Config {
cfg.Reva.Log.Level = cfg.Log.Level
cfg.Reva.Log.Pretty = cfg.Log.Pretty
cfg.Reva.Log.Color = cfg.Log.Color
if cfg.Tracing.Enabled {
cfg.Reva.Tracing.Enabled = cfg.Tracing.Enabled
cfg.Reva.Tracing.Type = cfg.Tracing.Type
cfg.Reva.Tracing.Endpoint = cfg.Tracing.Endpoint
cfg.Reva.Tracing.Collector = cfg.Tracing.Collector
cfg.Reva.Tracing.Service = cfg.Tracing.Service
}
return cfg.Reva
}
func init() {
register.AddCommand(RevaStorageHomeDataCommand)
}

View File

@@ -1,49 +0,0 @@
package command
import (
"github.com/micro/cli/v2"
"github.com/owncloud/ocis/ocis-reva/pkg/command"
svcconfig "github.com/owncloud/ocis/ocis-reva/pkg/config"
"github.com/owncloud/ocis/ocis-reva/pkg/flagset"
"github.com/owncloud/ocis/ocis/pkg/config"
"github.com/owncloud/ocis/ocis/pkg/register"
)
// RevaStorageMetadataCommand is the entrypoint for the reva-storage-metadata command.
func RevaStorageMetadataCommand(cfg *config.Config) *cli.Command {
return &cli.Command{
Name: "reva-storage-metadata",
Usage: "Start reva storage service for metadata mount",
Category: "Extensions",
Flags: flagset.StorageMetadata(cfg.Reva),
Action: func(c *cli.Context) error {
revaStorageMetadataCommand := command.StorageMetadata(configureRevaStorageMetadata(cfg))
if err := revaStorageMetadataCommand.Before(c); err != nil {
return err
}
return cli.HandleAction(revaStorageMetadataCommand.Action, c)
},
}
}
func configureRevaStorageMetadata(cfg *config.Config) *svcconfig.Config {
cfg.Reva.Log.Level = cfg.Log.Level
cfg.Reva.Log.Pretty = cfg.Log.Pretty
cfg.Reva.Log.Color = cfg.Log.Color
if cfg.Tracing.Enabled {
cfg.Reva.Tracing.Enabled = cfg.Tracing.Enabled
cfg.Reva.Tracing.Type = cfg.Tracing.Type
cfg.Reva.Tracing.Endpoint = cfg.Tracing.Endpoint
cfg.Reva.Tracing.Collector = cfg.Tracing.Collector
cfg.Reva.Tracing.Service = cfg.Tracing.Service
}
return cfg.Reva
}
func init() {
register.AddCommand(RevaStorageMetadataCommand)
}

View File

@@ -1,50 +0,0 @@
// +build !simple
package command
import (
"github.com/micro/cli/v2"
"github.com/owncloud/ocis/ocis-reva/pkg/command"
svcconfig "github.com/owncloud/ocis/ocis-reva/pkg/config"
"github.com/owncloud/ocis/ocis-reva/pkg/flagset"
"github.com/owncloud/ocis/ocis/pkg/config"
"github.com/owncloud/ocis/ocis/pkg/register"
)
// RevaStorageOCCommand is the entrypoint for the reva-storage-oc command.
func RevaStorageOCCommand(cfg *config.Config) *cli.Command {
return &cli.Command{
Name: "reva-storage-oc",
Usage: "Start reva storage service for oc mount",
Category: "Extensions",
Flags: flagset.StorageOCWithConfig(cfg.Reva),
Action: func(c *cli.Context) error {
scfg := configureRevaStorageOC(cfg)
return cli.HandleAction(
command.StorageOC(scfg).Action,
c,
)
},
}
}
func configureRevaStorageOC(cfg *config.Config) *svcconfig.Config {
cfg.Reva.Log.Level = cfg.Log.Level
cfg.Reva.Log.Pretty = cfg.Log.Pretty
cfg.Reva.Log.Color = cfg.Log.Color
if cfg.Tracing.Enabled {
cfg.Reva.Tracing.Enabled = cfg.Tracing.Enabled
cfg.Reva.Tracing.Type = cfg.Tracing.Type
cfg.Reva.Tracing.Endpoint = cfg.Tracing.Endpoint
cfg.Reva.Tracing.Collector = cfg.Tracing.Collector
cfg.Reva.Tracing.Service = cfg.Tracing.Service
}
return cfg.Reva
}
func init() {
register.AddCommand(RevaStorageOCCommand)
}

View File

@@ -1,50 +0,0 @@
// +build !simple
package command
import (
"github.com/micro/cli/v2"
"github.com/owncloud/ocis/ocis-reva/pkg/command"
svcconfig "github.com/owncloud/ocis/ocis-reva/pkg/config"
"github.com/owncloud/ocis/ocis-reva/pkg/flagset"
"github.com/owncloud/ocis/ocis/pkg/config"
"github.com/owncloud/ocis/ocis/pkg/register"
)
// RevaStorageOCDataCommand is the entrypoint for the reva-storage-oc-data command.
func RevaStorageOCDataCommand(cfg *config.Config) *cli.Command {
return &cli.Command{
Name: "reva-storage-oc-data",
Usage: "Start reva storage data provider for oc mount",
Category: "Extensions",
Flags: flagset.StorageOCDataWithConfig(cfg.Reva),
Action: func(c *cli.Context) error {
scfg := configureRevaStorageOCData(cfg)
return cli.HandleAction(
command.StorageOCData(scfg).Action,
c,
)
},
}
}
func configureRevaStorageOCData(cfg *config.Config) *svcconfig.Config {
cfg.Reva.Log.Level = cfg.Log.Level
cfg.Reva.Log.Pretty = cfg.Log.Pretty
cfg.Reva.Log.Color = cfg.Log.Color
if cfg.Tracing.Enabled {
cfg.Reva.Tracing.Enabled = cfg.Tracing.Enabled
cfg.Reva.Tracing.Type = cfg.Tracing.Type
cfg.Reva.Tracing.Endpoint = cfg.Tracing.Endpoint
cfg.Reva.Tracing.Collector = cfg.Tracing.Collector
cfg.Reva.Tracing.Service = cfg.Tracing.Service
}
return cfg.Reva
}
func init() {
register.AddCommand(RevaStorageOCDataCommand)
}

View File

@@ -1,50 +0,0 @@
// +build !simple
package command
import (
"github.com/micro/cli/v2"
"github.com/owncloud/ocis/ocis-reva/pkg/command"
svcconfig "github.com/owncloud/ocis/ocis-reva/pkg/config"
"github.com/owncloud/ocis/ocis-reva/pkg/flagset"
"github.com/owncloud/ocis/ocis/pkg/config"
"github.com/owncloud/ocis/ocis/pkg/register"
)
// RevaStoragePublicLinkCommand is the entrypoint for the reva-storage-oc command.
func RevaStoragePublicLinkCommand(cfg *config.Config) *cli.Command {
return &cli.Command{
Name: "reva-storage-public-link",
Usage: "Start reva public link storage",
Category: "Extensions",
Flags: flagset.StoragePublicLink(cfg.Reva),
Action: func(c *cli.Context) error {
scfg := configureRevaStoragePublicLink(cfg)
return cli.HandleAction(
command.StoragePublicLink(scfg).Action,
c,
)
},
}
}
func configureRevaStoragePublicLink(cfg *config.Config) *svcconfig.Config {
cfg.Reva.Log.Level = cfg.Log.Level
cfg.Reva.Log.Pretty = cfg.Log.Pretty
cfg.Reva.Log.Color = cfg.Log.Color
if cfg.Tracing.Enabled {
cfg.Reva.Tracing.Enabled = cfg.Tracing.Enabled
cfg.Reva.Tracing.Type = cfg.Tracing.Type
cfg.Reva.Tracing.Endpoint = cfg.Tracing.Endpoint
cfg.Reva.Tracing.Collector = cfg.Tracing.Collector
cfg.Reva.Tracing.Service = cfg.Tracing.Service
}
return cfg.Reva
}
func init() {
register.AddCommand(RevaStoragePublicLinkCommand)
}

View File

@@ -1,50 +0,0 @@
// +build !simple
package command
import (
"github.com/micro/cli/v2"
"github.com/owncloud/ocis/ocis-reva/pkg/command"
svcconfig "github.com/owncloud/ocis/ocis-reva/pkg/config"
"github.com/owncloud/ocis/ocis-reva/pkg/flagset"
"github.com/owncloud/ocis/ocis/pkg/config"
"github.com/owncloud/ocis/ocis/pkg/register"
)
// RevaStorageRootCommand is the entrypoint for the reva-storage-root command.
func RevaStorageRootCommand(cfg *config.Config) *cli.Command {
return &cli.Command{
Name: "reva-storage-root",
Usage: "Start reva root storage",
Category: "Extensions",
Flags: flagset.StorageRootWithConfig(cfg.Reva),
Action: func(c *cli.Context) error {
scfg := configureRevaStorageRoot(cfg)
return cli.HandleAction(
command.StorageRoot(scfg).Action,
c,
)
},
}
}
func configureRevaStorageRoot(cfg *config.Config) *svcconfig.Config {
cfg.Reva.Log.Level = cfg.Log.Level
cfg.Reva.Log.Pretty = cfg.Log.Pretty
cfg.Reva.Log.Color = cfg.Log.Color
if cfg.Tracing.Enabled {
cfg.Reva.Tracing.Enabled = cfg.Tracing.Enabled
cfg.Reva.Tracing.Type = cfg.Tracing.Type
cfg.Reva.Tracing.Endpoint = cfg.Tracing.Endpoint
cfg.Reva.Tracing.Collector = cfg.Tracing.Collector
cfg.Reva.Tracing.Service = cfg.Tracing.Service
}
return cfg.Reva
}
func init() {
register.AddCommand(RevaStorageRootCommand)
}

View File

@@ -1,50 +0,0 @@
// +build !simple
package command
import (
"github.com/micro/cli/v2"
"github.com/owncloud/ocis/ocis-reva/pkg/command"
svcconfig "github.com/owncloud/ocis/ocis-reva/pkg/config"
"github.com/owncloud/ocis/ocis-reva/pkg/flagset"
"github.com/owncloud/ocis/ocis/pkg/config"
"github.com/owncloud/ocis/ocis/pkg/register"
)
// RevaUsersCommand is the entrypoint for the reva-users command.
func RevaUsersCommand(cfg *config.Config) *cli.Command {
return &cli.Command{
Name: "reva-users",
Usage: "Start reva users service",
Category: "Extensions",
Flags: flagset.UsersWithConfig(cfg.Reva),
Action: func(c *cli.Context) error {
scfg := configureRevaUsers(cfg)
return cli.HandleAction(
command.Users(scfg).Action,
c,
)
},
}
}
func configureRevaUsers(cfg *config.Config) *svcconfig.Config {
cfg.Reva.Log.Level = cfg.Log.Level
cfg.Reva.Log.Pretty = cfg.Log.Pretty
cfg.Reva.Log.Color = cfg.Log.Color
if cfg.Tracing.Enabled {
cfg.Reva.Tracing.Enabled = cfg.Tracing.Enabled
cfg.Reva.Tracing.Type = cfg.Tracing.Type
cfg.Reva.Tracing.Endpoint = cfg.Tracing.Endpoint
cfg.Reva.Tracing.Collector = cfg.Tracing.Collector
cfg.Reva.Tracing.Service = cfg.Tracing.Service
}
return cfg.Reva
}
func init() {
register.AddCommand(RevaUsersCommand)
}

View File

@@ -4,12 +4,12 @@ package command
import (
"github.com/micro/cli/v2"
"github.com/owncloud/ocis/ocis/pkg/config"
"github.com/owncloud/ocis/ocis/pkg/register"
"github.com/owncloud/ocis/ocis/pkg/version"
"github.com/owncloud/ocis/settings/pkg/command"
svcconfig "github.com/owncloud/ocis/settings/pkg/config"
"github.com/owncloud/ocis/settings/pkg/flagset"
"github.com/owncloud/ocis/ocis/pkg/config"
"github.com/owncloud/ocis/ocis/pkg/register"
)
// SettingsCommand is the entry point for the settings command.
@@ -48,8 +48,8 @@ func configureSettings(cfg *config.Config) *svcconfig.Config {
cfg.Settings.Tracing.Service = cfg.Tracing.Service
}
if cfg.Reva.Reva.JWTSecret != "" {
cfg.Settings.TokenManager.JWTSecret = cfg.Reva.Reva.JWTSecret
if cfg.Storage.Reva.JWTSecret != "" {
cfg.Settings.TokenManager.JWTSecret = cfg.Storage.Reva.JWTSecret
}
return cfg.Settings

View File

@@ -0,0 +1,50 @@
// +build !simple
package command
import (
"github.com/micro/cli/v2"
"github.com/owncloud/ocis/ocis/pkg/config"
"github.com/owncloud/ocis/ocis/pkg/register"
"github.com/owncloud/ocis/storage/pkg/command"
svcconfig "github.com/owncloud/ocis/storage/pkg/config"
"github.com/owncloud/ocis/storage/pkg/flagset"
)
// StorageAuthBasicCommand is the entrypoint for the reva-auth-basic command.
func StorageAuthBasicCommand(cfg *config.Config) *cli.Command {
return &cli.Command{
Name: "storage-auth-basic",
Usage: "Start storage auth-basic service",
Category: "Extensions",
Flags: flagset.AuthBasicWithConfig(cfg.Storage),
Action: func(c *cli.Context) error {
scfg := configureStorageAuthBasic(cfg)
return cli.HandleAction(
command.AuthBasic(scfg).Action,
c,
)
},
}
}
func configureStorageAuthBasic(cfg *config.Config) *svcconfig.Config {
cfg.Storage.Log.Level = cfg.Log.Level
cfg.Storage.Log.Pretty = cfg.Log.Pretty
cfg.Storage.Log.Color = cfg.Log.Color
if cfg.Tracing.Enabled {
cfg.Storage.Tracing.Enabled = cfg.Tracing.Enabled
cfg.Storage.Tracing.Type = cfg.Tracing.Type
cfg.Storage.Tracing.Endpoint = cfg.Tracing.Endpoint
cfg.Storage.Tracing.Collector = cfg.Tracing.Collector
cfg.Storage.Tracing.Service = cfg.Tracing.Service
}
return cfg.Storage
}
func init() {
register.AddCommand(StorageAuthBasicCommand)
}

View File

@@ -0,0 +1,50 @@
// +build !simple
package command
import (
"github.com/micro/cli/v2"
"github.com/owncloud/ocis/storage/pkg/command"
svcconfig "github.com/owncloud/ocis/storage/pkg/config"
"github.com/owncloud/ocis/storage/pkg/flagset"
"github.com/owncloud/ocis/ocis/pkg/config"
"github.com/owncloud/ocis/ocis/pkg/register"
)
// StorageAuthBearerCommand is the entrypoint for the reva-auth-bearer command.
func StorageAuthBearerCommand(cfg *config.Config) *cli.Command {
return &cli.Command{
Name: "storage-auth-bearer",
Usage: "Start storage auth-bearer service",
Category: "Extensions",
Flags: flagset.AuthBearerWithConfig(cfg.Storage),
Action: func(c *cli.Context) error {
scfg := configureStorageAuthBearer(cfg)
return cli.HandleAction(
command.AuthBearer(scfg).Action,
c,
)
},
}
}
func configureStorageAuthBearer(cfg *config.Config) *svcconfig.Config {
cfg.Storage.Log.Level = cfg.Log.Level
cfg.Storage.Log.Pretty = cfg.Log.Pretty
cfg.Storage.Log.Color = cfg.Log.Color
if cfg.Tracing.Enabled {
cfg.Storage.Tracing.Enabled = cfg.Tracing.Enabled
cfg.Storage.Tracing.Type = cfg.Tracing.Type
cfg.Storage.Tracing.Endpoint = cfg.Tracing.Endpoint
cfg.Storage.Tracing.Collector = cfg.Tracing.Collector
cfg.Storage.Tracing.Service = cfg.Tracing.Service
}
return cfg.Storage
}
func init() {
register.AddCommand(StorageAuthBearerCommand)
}

View File

@@ -0,0 +1,50 @@
// +build !simple
package command
import (
"github.com/micro/cli/v2"
"github.com/owncloud/ocis/storage/pkg/command"
svcconfig "github.com/owncloud/ocis/storage/pkg/config"
"github.com/owncloud/ocis/storage/pkg/flagset"
"github.com/owncloud/ocis/ocis/pkg/config"
"github.com/owncloud/ocis/ocis/pkg/register"
)
// StorageFrontendCommand is the entrypoint for the reva-frontend command.
func StorageFrontendCommand(cfg *config.Config) *cli.Command {
return &cli.Command{
Name: "storage-frontend",
Usage: "Start storage frontend",
Category: "Extensions",
Flags: flagset.FrontendWithConfig(cfg.Storage),
Action: func(c *cli.Context) error {
scfg := configureStorageFrontend(cfg)
return cli.HandleAction(
command.Frontend(scfg).Action,
c,
)
},
}
}
func configureStorageFrontend(cfg *config.Config) *svcconfig.Config {
cfg.Storage.Log.Level = cfg.Log.Level
cfg.Storage.Log.Pretty = cfg.Log.Pretty
cfg.Storage.Log.Color = cfg.Log.Color
if cfg.Tracing.Enabled {
cfg.Storage.Tracing.Enabled = cfg.Tracing.Enabled
cfg.Storage.Tracing.Type = cfg.Tracing.Type
cfg.Storage.Tracing.Endpoint = cfg.Tracing.Endpoint
cfg.Storage.Tracing.Collector = cfg.Tracing.Collector
cfg.Storage.Tracing.Service = cfg.Tracing.Service
}
return cfg.Storage
}
func init() {
register.AddCommand(StorageFrontendCommand)
}

View File

@@ -0,0 +1,50 @@
// +build !simple
package command
import (
"github.com/micro/cli/v2"
"github.com/owncloud/ocis/storage/pkg/command"
svcconfig "github.com/owncloud/ocis/storage/pkg/config"
"github.com/owncloud/ocis/storage/pkg/flagset"
"github.com/owncloud/ocis/ocis/pkg/config"
"github.com/owncloud/ocis/ocis/pkg/register"
)
// StorageGatewayCommand is the entrypoint for the reva-gateway command.
func StorageGatewayCommand(cfg *config.Config) *cli.Command {
return &cli.Command{
Name: "storage-gateway",
Usage: "Start storage gateway",
Category: "Extensions",
Flags: flagset.GatewayWithConfig(cfg.Storage),
Action: func(c *cli.Context) error {
scfg := configureStorageGateway(cfg)
return cli.HandleAction(
command.Gateway(scfg).Action,
c,
)
},
}
}
func configureStorageGateway(cfg *config.Config) *svcconfig.Config {
cfg.Storage.Log.Level = cfg.Log.Level
cfg.Storage.Log.Pretty = cfg.Log.Pretty
cfg.Storage.Log.Color = cfg.Log.Color
if cfg.Tracing.Enabled {
cfg.Storage.Tracing.Enabled = cfg.Tracing.Enabled
cfg.Storage.Tracing.Type = cfg.Tracing.Type
cfg.Storage.Tracing.Endpoint = cfg.Tracing.Endpoint
cfg.Storage.Tracing.Collector = cfg.Tracing.Collector
cfg.Storage.Tracing.Service = cfg.Tracing.Service
}
return cfg.Storage
}
func init() {
register.AddCommand(StorageGatewayCommand)
}

View File

@@ -0,0 +1,50 @@
// +build !simple
package command
import (
"github.com/micro/cli/v2"
"github.com/owncloud/ocis/storage/pkg/command"
svcconfig "github.com/owncloud/ocis/storage/pkg/config"
"github.com/owncloud/ocis/storage/pkg/flagset"
"github.com/owncloud/ocis/ocis/pkg/config"
"github.com/owncloud/ocis/ocis/pkg/register"
)
// StorageSharingCommand is the entrypoint for the reva-sharing command.
func StorageSharingCommand(cfg *config.Config) *cli.Command {
return &cli.Command{
Name: "storage-sharing",
Usage: "Start storage sharing service",
Category: "Extensions",
Flags: flagset.SharingWithConfig(cfg.Storage),
Action: func(c *cli.Context) error {
scfg := configureStorageSharing(cfg)
return cli.HandleAction(
command.Sharing(scfg).Action,
c,
)
},
}
}
func configureStorageSharing(cfg *config.Config) *svcconfig.Config {
cfg.Storage.Log.Level = cfg.Log.Level
cfg.Storage.Log.Pretty = cfg.Log.Pretty
cfg.Storage.Log.Color = cfg.Log.Color
if cfg.Tracing.Enabled {
cfg.Storage.Tracing.Enabled = cfg.Tracing.Enabled
cfg.Storage.Tracing.Type = cfg.Tracing.Type
cfg.Storage.Tracing.Endpoint = cfg.Tracing.Endpoint
cfg.Storage.Tracing.Collector = cfg.Tracing.Collector
cfg.Storage.Tracing.Service = cfg.Tracing.Service
}
return cfg.Storage
}
func init() {
register.AddCommand(StorageSharingCommand)
}

View File

@@ -0,0 +1,50 @@
// +build !simple
package command
import (
"github.com/micro/cli/v2"
"github.com/owncloud/ocis/ocis/pkg/config"
"github.com/owncloud/ocis/ocis/pkg/register"
"github.com/owncloud/ocis/storage/pkg/command"
svcconfig "github.com/owncloud/ocis/storage/pkg/config"
"github.com/owncloud/ocis/storage/pkg/flagset"
)
// StorageStorageEOSCommand is the entrypoint for the reva-storage-oc command.
func StorageStorageEOSCommand(cfg *config.Config) *cli.Command {
return &cli.Command{
Name: "storage-storage-eos",
Usage: "Start storage storage service for eos mount",
Category: "Extensions",
Flags: flagset.StorageEOSWithConfig(cfg.Storage),
Action: func(c *cli.Context) error {
scfg := configureStorageStorageEOS(cfg)
return cli.HandleAction(
command.StorageEOS(scfg).Action,
c,
)
},
}
}
func configureStorageStorageEOS(cfg *config.Config) *svcconfig.Config {
cfg.Storage.Log.Level = cfg.Log.Level
cfg.Storage.Log.Pretty = cfg.Log.Pretty
cfg.Storage.Log.Color = cfg.Log.Color
if cfg.Tracing.Enabled {
cfg.Storage.Tracing.Enabled = cfg.Tracing.Enabled
cfg.Storage.Tracing.Type = cfg.Tracing.Type
cfg.Storage.Tracing.Endpoint = cfg.Tracing.Endpoint
cfg.Storage.Tracing.Collector = cfg.Tracing.Collector
cfg.Storage.Tracing.Service = cfg.Tracing.Service
}
return cfg.Storage
}
func init() {
register.AddCommand(StorageStorageEOSCommand)
}

View File

@@ -0,0 +1,50 @@
// +build !simple
package command
import (
"github.com/micro/cli/v2"
"github.com/owncloud/ocis/storage/pkg/command"
svcconfig "github.com/owncloud/ocis/storage/pkg/config"
"github.com/owncloud/ocis/storage/pkg/flagset"
"github.com/owncloud/ocis/ocis/pkg/config"
"github.com/owncloud/ocis/ocis/pkg/register"
)
// StorageStorageEOSDataCommand is the entrypoint for the reva-storage-eos-data command.
func StorageStorageEOSDataCommand(cfg *config.Config) *cli.Command {
return &cli.Command{
Name: "storage-storage-eos-data",
Usage: "Start storage storage data provider for eos mount",
Category: "Extensions",
Flags: flagset.StorageEOSDataWithConfig(cfg.Storage),
Action: func(c *cli.Context) error {
scfg := configureStorageStorageEOSData(cfg)
return cli.HandleAction(
command.StorageEOSData(scfg).Action,
c,
)
},
}
}
func configureStorageStorageEOSData(cfg *config.Config) *svcconfig.Config {
cfg.Storage.Log.Level = cfg.Log.Level
cfg.Storage.Log.Pretty = cfg.Log.Pretty
cfg.Storage.Log.Color = cfg.Log.Color
if cfg.Tracing.Enabled {
cfg.Storage.Tracing.Enabled = cfg.Tracing.Enabled
cfg.Storage.Tracing.Type = cfg.Tracing.Type
cfg.Storage.Tracing.Endpoint = cfg.Tracing.Endpoint
cfg.Storage.Tracing.Collector = cfg.Tracing.Collector
cfg.Storage.Tracing.Service = cfg.Tracing.Service
}
return cfg.Storage
}
func init() {
register.AddCommand(StorageStorageEOSDataCommand)
}

View File

@@ -0,0 +1,50 @@
// +build !simple
package command
import (
"github.com/micro/cli/v2"
"github.com/owncloud/ocis/storage/pkg/command"
svcconfig "github.com/owncloud/ocis/storage/pkg/config"
"github.com/owncloud/ocis/storage/pkg/flagset"
"github.com/owncloud/ocis/ocis/pkg/config"
"github.com/owncloud/ocis/ocis/pkg/register"
)
// StorageStorageHomeCommand is the entrypoint for the reva-storage-home command.
func StorageStorageHomeCommand(cfg *config.Config) *cli.Command {
return &cli.Command{
Name: "storage-storage-home",
Usage: "Start storage storage service for home mount",
Category: "Extensions",
Flags: flagset.StorageHomeWithConfig(cfg.Storage),
Action: func(c *cli.Context) error {
scfg := configureStorageStorageHome(cfg)
return cli.HandleAction(
command.StorageHome(scfg).Action,
c,
)
},
}
}
func configureStorageStorageHome(cfg *config.Config) *svcconfig.Config {
cfg.Storage.Log.Level = cfg.Log.Level
cfg.Storage.Log.Pretty = cfg.Log.Pretty
cfg.Storage.Log.Color = cfg.Log.Color
if cfg.Tracing.Enabled {
cfg.Storage.Tracing.Enabled = cfg.Tracing.Enabled
cfg.Storage.Tracing.Type = cfg.Tracing.Type
cfg.Storage.Tracing.Endpoint = cfg.Tracing.Endpoint
cfg.Storage.Tracing.Collector = cfg.Tracing.Collector
cfg.Storage.Tracing.Service = cfg.Tracing.Service
}
return cfg.Storage
}
func init() {
register.AddCommand(StorageStorageHomeCommand)
}

View File

@@ -0,0 +1,50 @@
// +build !simple
package command
import (
"github.com/micro/cli/v2"
"github.com/owncloud/ocis/storage/pkg/command"
svcconfig "github.com/owncloud/ocis/storage/pkg/config"
"github.com/owncloud/ocis/storage/pkg/flagset"
"github.com/owncloud/ocis/ocis/pkg/config"
"github.com/owncloud/ocis/ocis/pkg/register"
)
// StorageStorageHomeDataCommand is the entrypoint for the reva-storage-home-data command.
func StorageStorageHomeDataCommand(cfg *config.Config) *cli.Command {
return &cli.Command{
Name: "storage-storage-home-data",
Usage: "Start storage storage data provider for home mount",
Category: "Extensions",
Flags: flagset.StorageHomeDataWithConfig(cfg.Storage),
Action: func(c *cli.Context) error {
scfg := configureStorageStorageHomeData(cfg)
return cli.HandleAction(
command.StorageHomeData(scfg).Action,
c,
)
},
}
}
func configureStorageStorageHomeData(cfg *config.Config) *svcconfig.Config {
cfg.Storage.Log.Level = cfg.Log.Level
cfg.Storage.Log.Pretty = cfg.Log.Pretty
cfg.Storage.Log.Color = cfg.Log.Color
if cfg.Tracing.Enabled {
cfg.Storage.Tracing.Enabled = cfg.Tracing.Enabled
cfg.Storage.Tracing.Type = cfg.Tracing.Type
cfg.Storage.Tracing.Endpoint = cfg.Tracing.Endpoint
cfg.Storage.Tracing.Collector = cfg.Tracing.Collector
cfg.Storage.Tracing.Service = cfg.Tracing.Service
}
return cfg.Storage
}
func init() {
register.AddCommand(StorageStorageHomeDataCommand)
}

View File

@@ -0,0 +1,49 @@
package command
import (
"github.com/micro/cli/v2"
"github.com/owncloud/ocis/storage/pkg/command"
svcconfig "github.com/owncloud/ocis/storage/pkg/config"
"github.com/owncloud/ocis/storage/pkg/flagset"
"github.com/owncloud/ocis/ocis/pkg/config"
"github.com/owncloud/ocis/ocis/pkg/register"
)
// StorageStorageMetadataCommand is the entrypoint for the reva-storage-metadata command.
func StorageStorageMetadataCommand(cfg *config.Config) *cli.Command {
return &cli.Command{
Name: "storage-storage-metadata",
Usage: "Start storage storage service for metadata mount",
Category: "Extensions",
Flags: flagset.StorageMetadata(cfg.Storage),
Action: func(c *cli.Context) error {
revaStorageMetadataCommand := command.StorageMetadata(configureStorageStorageMetadata(cfg))
if err := revaStorageMetadataCommand.Before(c); err != nil {
return err
}
return cli.HandleAction(revaStorageMetadataCommand.Action, c)
},
}
}
func configureStorageStorageMetadata(cfg *config.Config) *svcconfig.Config {
cfg.Storage.Log.Level = cfg.Log.Level
cfg.Storage.Log.Pretty = cfg.Log.Pretty
cfg.Storage.Log.Color = cfg.Log.Color
if cfg.Tracing.Enabled {
cfg.Storage.Tracing.Enabled = cfg.Tracing.Enabled
cfg.Storage.Tracing.Type = cfg.Tracing.Type
cfg.Storage.Tracing.Endpoint = cfg.Tracing.Endpoint
cfg.Storage.Tracing.Collector = cfg.Tracing.Collector
cfg.Storage.Tracing.Service = cfg.Tracing.Service
}
return cfg.Storage
}
func init() {
register.AddCommand(StorageStorageMetadataCommand)
}

View File

@@ -0,0 +1,50 @@
// +build !simple
package command
import (
"github.com/micro/cli/v2"
"github.com/owncloud/ocis/storage/pkg/command"
svcconfig "github.com/owncloud/ocis/storage/pkg/config"
"github.com/owncloud/ocis/storage/pkg/flagset"
"github.com/owncloud/ocis/ocis/pkg/config"
"github.com/owncloud/ocis/ocis/pkg/register"
)
// StorageStorageOCCommand is the entrypoint for the reva-storage-oc command.
func StorageStorageOCCommand(cfg *config.Config) *cli.Command {
return &cli.Command{
Name: "storage-storage-oc",
Usage: "Start storage storage service for oc mount",
Category: "Extensions",
Flags: flagset.StorageOCWithConfig(cfg.Storage),
Action: func(c *cli.Context) error {
scfg := configureStorageStorageOC(cfg)
return cli.HandleAction(
command.StorageOC(scfg).Action,
c,
)
},
}
}
func configureStorageStorageOC(cfg *config.Config) *svcconfig.Config {
cfg.Storage.Log.Level = cfg.Log.Level
cfg.Storage.Log.Pretty = cfg.Log.Pretty
cfg.Storage.Log.Color = cfg.Log.Color
if cfg.Tracing.Enabled {
cfg.Storage.Tracing.Enabled = cfg.Tracing.Enabled
cfg.Storage.Tracing.Type = cfg.Tracing.Type
cfg.Storage.Tracing.Endpoint = cfg.Tracing.Endpoint
cfg.Storage.Tracing.Collector = cfg.Tracing.Collector
cfg.Storage.Tracing.Service = cfg.Tracing.Service
}
return cfg.Storage
}
func init() {
register.AddCommand(StorageStorageOCCommand)
}

View File

@@ -0,0 +1,50 @@
// +build !simple
package command
import (
"github.com/micro/cli/v2"
"github.com/owncloud/ocis/storage/pkg/command"
svcconfig "github.com/owncloud/ocis/storage/pkg/config"
"github.com/owncloud/ocis/storage/pkg/flagset"
"github.com/owncloud/ocis/ocis/pkg/config"
"github.com/owncloud/ocis/ocis/pkg/register"
)
// StorageStorageOCDataCommand is the entrypoint for the reva-storage-oc-data command.
func StorageStorageOCDataCommand(cfg *config.Config) *cli.Command {
return &cli.Command{
Name: "storage-storage-oc-data",
Usage: "Start storage storage data provider for oc mount",
Category: "Extensions",
Flags: flagset.StorageOCDataWithConfig(cfg.Storage),
Action: func(c *cli.Context) error {
scfg := configureStorageStorageOCData(cfg)
return cli.HandleAction(
command.StorageOCData(scfg).Action,
c,
)
},
}
}
func configureStorageStorageOCData(cfg *config.Config) *svcconfig.Config {
cfg.Storage.Log.Level = cfg.Log.Level
cfg.Storage.Log.Pretty = cfg.Log.Pretty
cfg.Storage.Log.Color = cfg.Log.Color
if cfg.Tracing.Enabled {
cfg.Storage.Tracing.Enabled = cfg.Tracing.Enabled
cfg.Storage.Tracing.Type = cfg.Tracing.Type
cfg.Storage.Tracing.Endpoint = cfg.Tracing.Endpoint
cfg.Storage.Tracing.Collector = cfg.Tracing.Collector
cfg.Storage.Tracing.Service = cfg.Tracing.Service
}
return cfg.Storage
}
func init() {
register.AddCommand(StorageStorageOCDataCommand)
}

View File

@@ -0,0 +1,50 @@
// +build !simple
package command
import (
"github.com/micro/cli/v2"
"github.com/owncloud/ocis/storage/pkg/command"
svcconfig "github.com/owncloud/ocis/storage/pkg/config"
"github.com/owncloud/ocis/storage/pkg/flagset"
"github.com/owncloud/ocis/ocis/pkg/config"
"github.com/owncloud/ocis/ocis/pkg/register"
)
// StorageStoragePublicLinkCommand is the entrypoint for the reva-storage-oc command.
func StorageStoragePublicLinkCommand(cfg *config.Config) *cli.Command {
return &cli.Command{
Name: "storage-storage-public-link",
Usage: "Start storage public link storage",
Category: "Extensions",
Flags: flagset.StoragePublicLink(cfg.Storage),
Action: func(c *cli.Context) error {
scfg := configureStorageStoragePublicLink(cfg)
return cli.HandleAction(
command.StoragePublicLink(scfg).Action,
c,
)
},
}
}
func configureStorageStoragePublicLink(cfg *config.Config) *svcconfig.Config {
cfg.Storage.Log.Level = cfg.Log.Level
cfg.Storage.Log.Pretty = cfg.Log.Pretty
cfg.Storage.Log.Color = cfg.Log.Color
if cfg.Tracing.Enabled {
cfg.Storage.Tracing.Enabled = cfg.Tracing.Enabled
cfg.Storage.Tracing.Type = cfg.Tracing.Type
cfg.Storage.Tracing.Endpoint = cfg.Tracing.Endpoint
cfg.Storage.Tracing.Collector = cfg.Tracing.Collector
cfg.Storage.Tracing.Service = cfg.Tracing.Service
}
return cfg.Storage
}
func init() {
register.AddCommand(StorageStoragePublicLinkCommand)
}

View File

@@ -0,0 +1,50 @@
// +build !simple
package command
import (
"github.com/micro/cli/v2"
"github.com/owncloud/ocis/storage/pkg/command"
svcconfig "github.com/owncloud/ocis/storage/pkg/config"
"github.com/owncloud/ocis/storage/pkg/flagset"
"github.com/owncloud/ocis/ocis/pkg/config"
"github.com/owncloud/ocis/ocis/pkg/register"
)
// StorageStorageRootCommand is the entrypoint for the reva-storage-root command.
func StorageStorageRootCommand(cfg *config.Config) *cli.Command {
return &cli.Command{
Name: "storage-storage-root",
Usage: "Start storage root storage",
Category: "Extensions",
Flags: flagset.StorageRootWithConfig(cfg.Storage),
Action: func(c *cli.Context) error {
scfg := configureStorageStorageRoot(cfg)
return cli.HandleAction(
command.StorageRoot(scfg).Action,
c,
)
},
}
}
func configureStorageStorageRoot(cfg *config.Config) *svcconfig.Config {
cfg.Storage.Log.Level = cfg.Log.Level
cfg.Storage.Log.Pretty = cfg.Log.Pretty
cfg.Storage.Log.Color = cfg.Log.Color
if cfg.Tracing.Enabled {
cfg.Storage.Tracing.Enabled = cfg.Tracing.Enabled
cfg.Storage.Tracing.Type = cfg.Tracing.Type
cfg.Storage.Tracing.Endpoint = cfg.Tracing.Endpoint
cfg.Storage.Tracing.Collector = cfg.Tracing.Collector
cfg.Storage.Tracing.Service = cfg.Tracing.Service
}
return cfg.Storage
}
func init() {
register.AddCommand(StorageStorageRootCommand)
}

View File

@@ -0,0 +1,50 @@
// +build !simple
package command
import (
"github.com/micro/cli/v2"
"github.com/owncloud/ocis/storage/pkg/command"
svcconfig "github.com/owncloud/ocis/storage/pkg/config"
"github.com/owncloud/ocis/storage/pkg/flagset"
"github.com/owncloud/ocis/ocis/pkg/config"
"github.com/owncloud/ocis/ocis/pkg/register"
)
// StorageUsersCommand is the entrypoint for the reva-users command.
func StorageUsersCommand(cfg *config.Config) *cli.Command {
return &cli.Command{
Name: "storage-users",
Usage: "Start storage users service",
Category: "Extensions",
Flags: flagset.UsersWithConfig(cfg.Storage),
Action: func(c *cli.Context) error {
scfg := configureStorageUsers(cfg)
return cli.HandleAction(
command.Users(scfg).Action,
c,
)
},
}
}
func configureStorageUsers(cfg *config.Config) *svcconfig.Config {
cfg.Storage.Log.Level = cfg.Log.Level
cfg.Storage.Log.Pretty = cfg.Log.Pretty
cfg.Storage.Log.Color = cfg.Log.Color
if cfg.Tracing.Enabled {
cfg.Storage.Tracing.Enabled = cfg.Tracing.Enabled
cfg.Storage.Tracing.Type = cfg.Tracing.Type
cfg.Storage.Tracing.Endpoint = cfg.Tracing.Endpoint
cfg.Storage.Tracing.Collector = cfg.Tracing.Collector
cfg.Storage.Tracing.Service = cfg.Tracing.Service
}
return cfg.Storage
}
func init() {
register.AddCommand(StorageUsersCommand)
}

View File

@@ -1,17 +1,17 @@
package config
import (
accounts "github.com/owncloud/ocis/accounts/pkg/config"
glauth "github.com/owncloud/ocis/glauth/pkg/config"
graphExplorer "github.com/owncloud/ocis-graph-explorer/pkg/config"
graph "github.com/owncloud/ocis-graph/pkg/config"
hello "github.com/owncloud/ocis-hello/pkg/config"
accounts "github.com/owncloud/ocis/accounts/pkg/config"
glauth "github.com/owncloud/ocis/glauth/pkg/config"
konnectd "github.com/owncloud/ocis/konnectd/pkg/config"
ocs "github.com/owncloud/ocis/ocs/pkg/config"
phoenix "github.com/owncloud/ocis/ocis-phoenix/pkg/config"
ocs "github.com/owncloud/ocis/ocs/pkg/config"
proxy "github.com/owncloud/ocis/proxy/pkg/config"
reva "github.com/owncloud/ocis/ocis-reva/pkg/config"
settings "github.com/owncloud/ocis/settings/pkg/config"
storage "github.com/owncloud/ocis/storage/pkg/config"
store "github.com/owncloud/ocis/store/pkg/config"
thumbnails "github.com/owncloud/ocis/thumbnails/pkg/config"
webdav "github.com/owncloud/ocis/webdav/pkg/config"
@@ -71,7 +71,7 @@ type Config struct {
OCS *ocs.Config
Phoenix *phoenix.Config
Proxy *proxy.Config
Reva *reva.Config
Storage *storage.Config
Thumbnails *thumbnails.Config
WebDAV *webdav.Config
Settings *settings.Config
@@ -90,7 +90,7 @@ func New() *Config {
OCS: ocs.New(),
Phoenix: phoenix.New(),
WebDAV: webdav.New(),
Reva: reva.New(),
Storage: storage.New(),
GLAuth: glauth.New(),
Proxy: proxy.New(),
Thumbnails: thumbnails.New(),

View File

@@ -38,19 +38,19 @@ var (
"graph-explorer",
"ocs",
"webdav",
"reva-frontend",
"reva-gateway",
"reva-users",
"reva-auth-basic",
"reva-auth-bearer",
"reva-storage-home",
"reva-storage-home-data",
"reva-storage-eos",
"reva-storage-eos-data",
"reva-storage-oc",
"reva-storage-oc-data",
"reva-storage-public-link",
"reva-storage-metadata",
"storage-frontend",
"storage-gateway",
"storage-users",
"storage-auth-basic",
"storage-auth-bearer",
"storage-storage-home",
"storage-storage-home-data",
"storage-storage-eos",
"storage-storage-eos-data",
"storage-storage-oc",
"storage-storage-oc-data",
"storage-storage-public-link",
"storage-storage-metadata",
"glauth",
"konnectd",
"thumbnails",
@@ -59,7 +59,7 @@ var (
// There seem to be a race condition when reva-sharing needs to read the sharing.json file and the parent folder is not present.
dependants = []string{
"accounts",
"reva-sharing",
"storage-sharing",
}
// Maximum number of retries until getting a connection to the rpc runtime service.

View File

@@ -3,7 +3,7 @@ title: "Configuration"
date: "{{ date "2006-01-02T15:04:05-0700" now }}"
weight: 20
geekdocRepo: https://github.com/owncloud/ocis
geekdocEditPath: edit/master/docs
geekdocEditPath: edit/master/docs/ocis
geekdocFilePath: configuration.md
---
{{- define "options"}}
@@ -11,7 +11,7 @@ geekdocFilePath: configuration.md
{{ range $opt := first . }}{{ with list $fnName $opt -}}
{{ $o := last . -}}
{{ if eq $o.FnName $fnName -}}
--{{ $o.Name }} | ${{ index $o.Env 0 }}
--{{ $o.Name }} | ${{ index $o.Env 0 }}
: {{ $o.Usage }}. {{- if $o.Default }} Default: `{{ $o.Default }}`.{{ end }}
{{ end -}}
@@ -66,7 +66,7 @@ Usage: `ocis [global options] command [command options] [arguments...]`
{{ end -}}
{{- range $com := .Commands }}{{ with (list $options $com) -}}
{{- $c := last . }}
{{- if eq $c.Name "server" "health" -}}
{{- if eq $c.Name "server" "health" "kill" "list" "run" -}}
{{- if ne $c.FnName "Simple" -}}
### ocis {{ $c.Name }}
@@ -84,11 +84,11 @@ Usage: `ocis {{ $c.Name }} [command options] [arguments...]`
There are more subcommands to start the individual extensions. Please check the documentation about their usage and options in the dedicated section of the documentation.
{{ range $com := .Commands }}{{ with $com -}}
{{ if and (ne .Name "health") (ne .Name "server") (ne .Name "ocis") -}}
{{ if and (ne .Name "health") (ne .Name "server") (ne .Name "ocis") (ne .Name "kill") (ne .Name "list") (ne .Name "run") -}}
#### ocis {{ .Name }}
{{ .Usage }}
{{ end -}}
{{- end -}}
{{- end -}}
{{- end -}}

View File

@@ -65,7 +65,7 @@ func SharingWithConfig(cfg *config.Config) []cli.Flag {
},
&cli.StringFlag{
Name: "user-json-file",
Value: "/var/tmp/storage/shares.json",
Value: "/var/tmp/ocis/shares.json",
Usage: "file used to persist shares for the UserShareProvider",
EnvVars: []string{"STORAGE_SHARING_USER_JSON_FILE"},
Destination: &cfg.Reva.Sharing.UserJSONFile,