add version command and add build information to metrics

Signed-off-by: David Christofas <dchristofas@owncloud.com>
This commit is contained in:
David Christofas
2020-09-25 13:31:14 +02:00
parent ff8fc23ce5
commit 0578092c6f
13 changed files with 142 additions and 32 deletions
+32 -5
View File
@@ -137,11 +137,18 @@ func ServerWithConfig(cfg *config.Config) []cli.Flag {
Destination: &cfg.Asset.Path,
},
&cli.StringFlag{
Name: "http-namespace",
Value: "com.owncloud",
Usage: "Set the base namespace for the http namespace",
EnvVars: []string{"PROXY_HTTP_NAMESPACE"},
Destination: &cfg.HTTP.Namespace,
Name: "service-namespace",
Value: "com.owncloud.web",
Usage: "Set the base namespace for the service namespace",
EnvVars: []string{"PROXY_SERVICE_NAMESPACE"},
Destination: &cfg.Service.Namespace,
},
&cli.StringFlag{
Name: "service-name",
Value: "proxy",
Usage: "Service name",
EnvVars: []string{"PROXY_SERVICE_NAME"},
Destination: &cfg.Service.Name,
},
&cli.StringFlag{
Name: "transport-tls-cert",
@@ -204,3 +211,23 @@ func ServerWithConfig(cfg *config.Config) []cli.Flag {
}
}
// ListProxyWithConfig applies the config to the list commands flags.
func ListProxyWithConfig(cfg *config.Config) []cli.Flag {
return []cli.Flag{
&cli.StringFlag{
Name: "service-namespace",
Value: "com.owncloud.web",
Usage: "Set the base namespace for the service namespace",
EnvVars: []string{"PROXY_SERVICE_NAMESPACE"},
Destination: &cfg.Service.Namespace,
},
&cli.StringFlag{
Name: "service-name",
Value: "proxy",
Usage: "Service name",
EnvVars: []string{"PROXY_SERVICE_NAME"},
Destination: &cfg.Service.Name,
},
}
}