set version and namespace for ocdav service

This commit is contained in:
Willy Kloucek
2022-05-06 15:19:29 +02:00
parent 1912fd601d
commit 72c2775089
3 changed files with 10 additions and 7 deletions

View File

@@ -11,6 +11,7 @@ import (
"github.com/owncloud/ocis/v2/extensions/ocdav/pkg/logging"
"github.com/owncloud/ocis/v2/extensions/ocdav/pkg/server/debug"
"github.com/owncloud/ocis/v2/extensions/ocdav/pkg/tracing"
"github.com/owncloud/ocis/v2/ocis-pkg/version"
"github.com/urfave/cli/v2"
)
@@ -40,6 +41,8 @@ func Server(cfg *config.Config) *cli.Command {
gr.Add(func() error {
s, err := ocdav.Service(
ocdav.Name(cfg.HTTP.Namespace+"."+cfg.Service.Name),
ocdav.Version(version.String),
ocdav.Context(ctx),
ocdav.Logger(logger.Logger),
ocdav.Address(cfg.HTTP.Addr),

View File

@@ -21,7 +21,7 @@ func DefaultConfig() *config.Config {
},
HTTP: config.HTTPConfig{
Addr: "127.0.0.1:0", // :0 to pick any free local port
Namespace: "", //TODO: make this configurable for the reva micro service
Namespace: "com.owncloud.web",
Protocol: "tcp",
Prefix: "",
},

View File

@@ -118,27 +118,27 @@ func DefaultPolicies() []config.Policy {
},
{
Endpoint: "/remote.php/",
Service: "ocdav",
Service: "com.owncloud.web.ocdav",
},
{
Endpoint: "/dav/",
Service: "ocdav",
Service: "com.owncloud.web.ocdav",
},
{
Endpoint: "/webdav/",
Service: "ocdav",
Service: "com.owncloud.web.ocdav",
},
{
Endpoint: "/status.php",
Service: "ocdav",
Service: "com.owncloud.web.ocdav",
},
{
Endpoint: "/index.php/",
Service: "ocdav",
Service: "com.owncloud.web.ocdav",
},
{
Endpoint: "/apps/",
Service: "ocdav",
Service: "com.owncloud.web.ocdav",
},
{
Endpoint: "/data",