Rename commands and flagset
This commit is contained in:
@@ -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,
|
||||
},
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user