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 18:04:38 +02:00
parent cae6a1c3ac
commit 8752d447c7
12 changed files with 168 additions and 11 deletions
+29 -1
View File
@@ -127,7 +127,14 @@ func ServerWithConfig(cfg *config.Config) []cli.Flag {
Value: "com.owncloud.web",
Usage: "Set the base namespace for service discovery",
EnvVars: []string{"WEBDAV_HTTP_NAMESPACE"},
Destination: &cfg.HTTP.Namespace,
Destination: &cfg.Service.Namespace,
},
&cli.StringFlag{
Name: "service-name",
Value: "webdav",
Usage: "Service name",
EnvVars: []string{"WEBDAV_SERVICE_NAME"},
Destination: &cfg.Service.Name,
},
&cli.StringFlag{
Name: "http-root",
@@ -138,3 +145,24 @@ func ServerWithConfig(cfg *config.Config) []cli.Flag {
},
}
}
// ListWebdavWithConfig applies the config to the list commands flagset.
func ListWebdavWithConfig(cfg *config.Config) []cli.Flag {
return []cli.Flag{
&cli.StringFlag{
Name: "http-namespace",
Value: "com.owncloud.web",
Usage: "Set the base namespace for service discovery",
EnvVars: []string{"WEBDAV_HTTP_NAMESPACE"},
Destination: &cfg.Service.Namespace,
},
&cli.StringFlag{
Name: "service-name",
Value: "webdav",
Usage: "Service name",
EnvVars: []string{"WEBDAV_SERVICE_NAME"},
Destination: &cfg.Service.Name,
},
}
}