add missing commands and unify service / namespace options

This commit is contained in:
Willy Kloucek
2022-01-03 07:49:23 +01:00
parent de87f3160d
commit 6206fe2398
66 changed files with 515 additions and 218 deletions
+10 -10
View File
@@ -18,15 +18,15 @@ type Debug struct {
// GRPC defines the available grpc configuration.
type GRPC struct {
Addr string `ocisConfig:"addr"`
Root string `ocisConfig:"root"`
Addr string `ocisConfig:"addr"`
Root string `ocisConfig:"root"`
Namespace string `ocisConfig:"namespace"`
}
// Service defines the available service configuration.
type Service struct {
Name string `ocisConfig:"name"`
Namespace string `ocisConfig:"namespace"`
Version string `ocisConfig:"version"`
Name string `ocisConfig:"name"`
Version string `ocisConfig:"version"`
}
// Tracing defines the available tracing configuration.
@@ -67,7 +67,11 @@ func DefaultConfig() *Config {
Zpages: false,
},
GRPC: GRPC{
Addr: "127.0.0.1:9460",
Addr: "127.0.0.1:9460",
Namespace: "com.owncloud.api",
},
Service: Service{
Name: "store",
},
Tracing: Tracing{
Enabled: false,
@@ -77,10 +81,6 @@ func DefaultConfig() *Config {
Service: "store",
},
Datapath: path.Join(defaults.BaseDataPath(), "store"),
Service: Service{
Name: "store",
Namespace: "com.owncloud.api",
},
}
}
+2 -2
View File
@@ -66,14 +66,14 @@ func structMappings(cfg *Config) []shared.EnvBinding {
},
{
EnvVars: []string{"STORE_GRPC_NAMESPACE"},
Destination: &cfg.Service.Namespace,
Destination: &cfg.GRPC.Namespace,
},
{
EnvVars: []string{"STORE_GRPC_ADDR"},
Destination: &cfg.GRPC.Addr,
},
{
EnvVars: []string{"STORE_NAME"},
EnvVars: []string{"STORE_SERVICE_NAME"},
Destination: &cfg.Service.Name,
},
{