diff --git a/extensions/notifications/cmd/notifications/main.go b/extensions/notifications/cmd/notifications/main.go new file mode 100644 index 000000000..1ce61dec5 --- /dev/null +++ b/extensions/notifications/cmd/notifications/main.go @@ -0,0 +1,14 @@ +package main + +import ( + "os" + + "github.com/owncloud/ocis/extensions/notifications/pkg/command" + "github.com/owncloud/ocis/extensions/notifications/pkg/config/defaults" +) + +func main() { + if err := command.Execute(defaults.DefaultConfig()); err != nil { + os.Exit(1) + } +} diff --git a/notifications/pkg/channels/channels.go b/extensions/notifications/pkg/channels/channels.go similarity index 98% rename from notifications/pkg/channels/channels.go rename to extensions/notifications/pkg/channels/channels.go index f13914da4..2d6d9203e 100644 --- a/notifications/pkg/channels/channels.go +++ b/extensions/notifications/pkg/channels/channels.go @@ -9,7 +9,7 @@ import ( groups "github.com/cs3org/go-cs3apis/cs3/identity/group/v1beta1" rpc "github.com/cs3org/go-cs3apis/cs3/rpc/v1beta1" "github.com/cs3org/reva/v2/pkg/rgrpc/todo/pool" - "github.com/owncloud/ocis/notifications/pkg/config" + "github.com/owncloud/ocis/extensions/notifications/pkg/config" "github.com/owncloud/ocis/ocis-pkg/log" "github.com/pkg/errors" ) diff --git a/notifications/pkg/command/health.go b/extensions/notifications/pkg/command/health.go similarity index 83% rename from notifications/pkg/command/health.go rename to extensions/notifications/pkg/command/health.go index 7f2adb85b..bbaffa27e 100644 --- a/notifications/pkg/command/health.go +++ b/extensions/notifications/pkg/command/health.go @@ -1,7 +1,7 @@ package command import ( - "github.com/owncloud/ocis/notifications/pkg/config" + "github.com/owncloud/ocis/extensions/notifications/pkg/config" "github.com/urfave/cli/v2" ) diff --git a/notifications/pkg/command/root.go b/extensions/notifications/pkg/command/root.go similarity index 95% rename from notifications/pkg/command/root.go rename to extensions/notifications/pkg/command/root.go index 805d8cec3..7a38a24d4 100644 --- a/notifications/pkg/command/root.go +++ b/extensions/notifications/pkg/command/root.go @@ -4,7 +4,7 @@ import ( "context" "os" - "github.com/owncloud/ocis/notifications/pkg/config" + "github.com/owncloud/ocis/extensions/notifications/pkg/config" "github.com/owncloud/ocis/ocis-pkg/clihelper" ociscfg "github.com/owncloud/ocis/ocis-pkg/config" "github.com/thejerf/suture/v4" diff --git a/notifications/pkg/command/server.go b/extensions/notifications/pkg/command/server.go similarity index 78% rename from notifications/pkg/command/server.go rename to extensions/notifications/pkg/command/server.go index df4c49b69..ad7eda613 100644 --- a/notifications/pkg/command/server.go +++ b/extensions/notifications/pkg/command/server.go @@ -6,11 +6,11 @@ import ( "github.com/asim/go-micro/plugins/events/natsjs/v4" "github.com/cs3org/reva/v2/pkg/events" "github.com/cs3org/reva/v2/pkg/events/server" - "github.com/owncloud/ocis/notifications/pkg/channels" - "github.com/owncloud/ocis/notifications/pkg/config" - "github.com/owncloud/ocis/notifications/pkg/config/parser" - "github.com/owncloud/ocis/notifications/pkg/logging" - "github.com/owncloud/ocis/notifications/pkg/service" + "github.com/owncloud/ocis/extensions/notifications/pkg/channels" + "github.com/owncloud/ocis/extensions/notifications/pkg/config" + "github.com/owncloud/ocis/extensions/notifications/pkg/config/parser" + "github.com/owncloud/ocis/extensions/notifications/pkg/logging" + "github.com/owncloud/ocis/extensions/notifications/pkg/service" "github.com/urfave/cli/v2" ) diff --git a/notifications/pkg/command/version.go b/extensions/notifications/pkg/command/version.go similarity index 86% rename from notifications/pkg/command/version.go rename to extensions/notifications/pkg/command/version.go index f2d47a569..2b635d640 100644 --- a/notifications/pkg/command/version.go +++ b/extensions/notifications/pkg/command/version.go @@ -1,7 +1,7 @@ package command import ( - "github.com/owncloud/ocis/notifications/pkg/config" + "github.com/owncloud/ocis/extensions/notifications/pkg/config" "github.com/urfave/cli/v2" ) diff --git a/notifications/pkg/config/config.go b/extensions/notifications/pkg/config/config.go similarity index 100% rename from notifications/pkg/config/config.go rename to extensions/notifications/pkg/config/config.go diff --git a/notifications/pkg/config/debug.go b/extensions/notifications/pkg/config/debug.go similarity index 100% rename from notifications/pkg/config/debug.go rename to extensions/notifications/pkg/config/debug.go diff --git a/notifications/pkg/config/defaults/defaultconfig.go b/extensions/notifications/pkg/config/defaults/defaultconfig.go similarity index 94% rename from notifications/pkg/config/defaults/defaultconfig.go rename to extensions/notifications/pkg/config/defaults/defaultconfig.go index c2cfa8334..19c3cc2df 100644 --- a/notifications/pkg/config/defaults/defaultconfig.go +++ b/extensions/notifications/pkg/config/defaults/defaultconfig.go @@ -1,6 +1,6 @@ package defaults -import "github.com/owncloud/ocis/notifications/pkg/config" +import "github.com/owncloud/ocis/extensions/notifications/pkg/config" func FullDefaultConfig() *config.Config { cfg := DefaultConfig() diff --git a/notifications/pkg/config/log.go b/extensions/notifications/pkg/config/log.go similarity index 100% rename from notifications/pkg/config/log.go rename to extensions/notifications/pkg/config/log.go diff --git a/notifications/pkg/config/parser/parse.go b/extensions/notifications/pkg/config/parser/parse.go similarity index 83% rename from notifications/pkg/config/parser/parse.go rename to extensions/notifications/pkg/config/parser/parse.go index 36231a708..2a4876a33 100644 --- a/notifications/pkg/config/parser/parse.go +++ b/extensions/notifications/pkg/config/parser/parse.go @@ -3,8 +3,8 @@ package parser import ( "errors" - "github.com/owncloud/ocis/notifications/pkg/config" - "github.com/owncloud/ocis/notifications/pkg/config/defaults" + "github.com/owncloud/ocis/extensions/notifications/pkg/config" + "github.com/owncloud/ocis/extensions/notifications/pkg/config/defaults" ociscfg "github.com/owncloud/ocis/ocis-pkg/config" "github.com/owncloud/ocis/ocis-pkg/config/envdecode" diff --git a/notifications/pkg/config/service.go b/extensions/notifications/pkg/config/service.go similarity index 100% rename from notifications/pkg/config/service.go rename to extensions/notifications/pkg/config/service.go diff --git a/notifications/pkg/logging/logging.go b/extensions/notifications/pkg/logging/logging.go similarity index 84% rename from notifications/pkg/logging/logging.go rename to extensions/notifications/pkg/logging/logging.go index 039b0451c..72a752311 100644 --- a/notifications/pkg/logging/logging.go +++ b/extensions/notifications/pkg/logging/logging.go @@ -1,7 +1,7 @@ package logging import ( - "github.com/owncloud/ocis/notifications/pkg/config" + "github.com/owncloud/ocis/extensions/notifications/pkg/config" "github.com/owncloud/ocis/ocis-pkg/log" ) diff --git a/notifications/pkg/service/service.go b/extensions/notifications/pkg/service/service.go similarity index 95% rename from notifications/pkg/service/service.go rename to extensions/notifications/pkg/service/service.go index 970052b3d..09414a1b7 100644 --- a/notifications/pkg/service/service.go +++ b/extensions/notifications/pkg/service/service.go @@ -6,7 +6,7 @@ import ( "syscall" "github.com/cs3org/reva/v2/pkg/events" - "github.com/owncloud/ocis/notifications/pkg/channels" + "github.com/owncloud/ocis/extensions/notifications/pkg/channels" "github.com/owncloud/ocis/ocis-pkg/log" ) diff --git a/notifications/cmd/notifications/main.go b/notifications/cmd/notifications/main.go deleted file mode 100644 index 29d60a18b..000000000 --- a/notifications/cmd/notifications/main.go +++ /dev/null @@ -1,14 +0,0 @@ -package main - -import ( - "os" - - "github.com/owncloud/ocis/notifications/pkg/command" - "github.com/owncloud/ocis/notifications/pkg/config/defaults" -) - -func main() { - if err := command.Execute(defaults.DefaultConfig()); err != nil { - os.Exit(1) - } -} diff --git a/ocis-pkg/config/config.go b/ocis-pkg/config/config.go index 09433e5c3..56aee4ab7 100644 --- a/ocis-pkg/config/config.go +++ b/ocis-pkg/config/config.go @@ -11,7 +11,7 @@ import ( idm "github.com/owncloud/ocis/extensions/idm/pkg/config" idp "github.com/owncloud/ocis/extensions/idp/pkg/config" nats "github.com/owncloud/ocis/extensions/nats/pkg/config" - notifications "github.com/owncloud/ocis/notifications/pkg/config" + notifications "github.com/owncloud/ocis/extensions/notifications/pkg/config" ocs "github.com/owncloud/ocis/ocs/pkg/config" proxy "github.com/owncloud/ocis/proxy/pkg/config" settings "github.com/owncloud/ocis/settings/pkg/config" diff --git a/ocis-pkg/config/defaultconfig.go b/ocis-pkg/config/defaultconfig.go index 787287790..4ceba483d 100644 --- a/ocis-pkg/config/defaultconfig.go +++ b/ocis-pkg/config/defaultconfig.go @@ -9,7 +9,7 @@ import ( idm "github.com/owncloud/ocis/extensions/idm/pkg/config/defaults" idp "github.com/owncloud/ocis/extensions/idp/pkg/config/defaults" nats "github.com/owncloud/ocis/extensions/nats/pkg/config/defaults" - notifications "github.com/owncloud/ocis/notifications/pkg/config/defaults" + notifications "github.com/owncloud/ocis/extensions/notifications/pkg/config/defaults" ocs "github.com/owncloud/ocis/ocs/pkg/config/defaults" proxy "github.com/owncloud/ocis/proxy/pkg/config/defaults" settings "github.com/owncloud/ocis/settings/pkg/config/defaults" diff --git a/ocis/pkg/command/notifications.go b/ocis/pkg/command/notifications.go index ec2eb3570..f4108e299 100644 --- a/ocis/pkg/command/notifications.go +++ b/ocis/pkg/command/notifications.go @@ -1,7 +1,7 @@ package command import ( - "github.com/owncloud/ocis/notifications/pkg/command" + "github.com/owncloud/ocis/extensions/notifications/pkg/command" "github.com/owncloud/ocis/ocis-pkg/config" "github.com/owncloud/ocis/ocis-pkg/config/parser" "github.com/owncloud/ocis/ocis/pkg/register" diff --git a/ocis/pkg/runtime/service/service.go b/ocis/pkg/runtime/service/service.go index de569846e..b9a1994a0 100644 --- a/ocis/pkg/runtime/service/service.go +++ b/ocis/pkg/runtime/service/service.go @@ -26,7 +26,7 @@ import ( idm "github.com/owncloud/ocis/extensions/idm/pkg/command" idp "github.com/owncloud/ocis/extensions/idp/pkg/command" nats "github.com/owncloud/ocis/extensions/nats/pkg/command" - notifications "github.com/owncloud/ocis/notifications/pkg/command" + notifications "github.com/owncloud/ocis/extensions/notifications/pkg/command" "github.com/owncloud/ocis/ocis-pkg/config" ociscfg "github.com/owncloud/ocis/ocis-pkg/config" "github.com/owncloud/ocis/ocis-pkg/log"