From 4d821cdc9d9970dae5d9c7558eaf3bea10e4e42f Mon Sep 17 00:00:00 2001 From: Christian Richter Date: Tue, 12 Apr 2022 10:13:21 +0200 Subject: [PATCH] refactor graph Signed-off-by: Christian Richter --- {graph => extensions/graph}/.dockerignore | 0 {graph => extensions/graph}/Makefile | 12 ++++++------ {graph => extensions/graph}/cmd/graph/main.go | 4 ++-- .../graph}/docker/Dockerfile.linux.amd64 | 0 .../graph}/docker/Dockerfile.linux.arm | 0 .../graph}/docker/Dockerfile.linux.arm64 | 0 {graph => extensions/graph}/docker/manifest.tmpl | 0 .../graph}/mocks/gateway_client.go | 0 {graph => extensions/graph}/mocks/http_client.go | 0 {graph => extensions/graph}/mocks/publisher.go | 0 {graph => extensions/graph}/pkg/command/health.go | 6 +++--- {graph => extensions/graph}/pkg/command/root.go | 2 +- {graph => extensions/graph}/pkg/command/server.go | 14 +++++++------- {graph => extensions/graph}/pkg/command/version.go | 2 +- {graph => extensions/graph}/pkg/config/config.go | 0 {graph => extensions/graph}/pkg/config/debug.go | 0 .../graph}/pkg/config/defaults/defaultconfig.go | 2 +- {graph => extensions/graph}/pkg/config/http.go | 0 {graph => extensions/graph}/pkg/config/log.go | 0 .../graph}/pkg/config/parser/parse.go | 4 ++-- {graph => extensions/graph}/pkg/config/reva.go | 0 {graph => extensions/graph}/pkg/config/service.go | 0 {graph => extensions/graph}/pkg/config/tracing.go | 0 .../graph}/pkg/identity/backend.go | 0 {graph => extensions/graph}/pkg/identity/cs3.go | 4 ++-- {graph => extensions/graph}/pkg/identity/ldap.go | 4 ++-- .../graph}/pkg/identity/ldap/reconnect.go | 0 .../graph}/pkg/identity/ldap_test.go | 2 +- {graph => extensions/graph}/pkg/logging/logging.go | 2 +- {graph => extensions/graph}/pkg/metrics/metrics.go | 0 {graph => extensions/graph}/pkg/middleware/auth.go | 2 +- .../graph}/pkg/middleware/requireadmin.go | 2 +- .../graph}/pkg/server/debug/option.go | 2 +- .../graph}/pkg/server/debug/server.go | 2 +- .../graph}/pkg/server/http/option.go | 4 ++-- .../graph}/pkg/server/http/server.go | 4 ++-- .../graph}/pkg/service/v0/driveitems.go | 2 +- .../graph}/pkg/service/v0/drives.go | 2 +- .../graph}/pkg/service/v0/drives_test.go | 0 .../graph}/pkg/service/v0/errorcode/errorcode.go | 0 .../graph}/pkg/service/v0/graph.go | 4 ++-- .../graph}/pkg/service/v0/graph_suite_test.go | 0 .../graph}/pkg/service/v0/graph_test.go | 8 ++++---- .../graph}/pkg/service/v0/groups.go | 2 +- .../graph}/pkg/service/v0/instrument.go | 2 +- .../graph}/pkg/service/v0/logging.go | 0 .../graph}/pkg/service/v0/net/headers.go | 0 .../graph}/pkg/service/v0/option.go | 2 +- .../graph}/pkg/service/v0/ordering.go | 0 .../graph}/pkg/service/v0/service.go | 6 +++--- .../graph}/pkg/service/v0/service_test.go | 0 .../graph}/pkg/service/v0/tracing.go | 0 .../graph}/pkg/service/v0/users.go | 4 ++-- {graph => extensions/graph}/pkg/tracing/tracing.go | 2 +- {graph => extensions/graph}/reflex.conf | 0 ocis-pkg/config/config.go | 2 +- ocis-pkg/config/defaultconfig.go | 2 +- ocis/pkg/command/graph.go | 2 +- ocis/pkg/runtime/service/service.go | 2 +- 59 files changed, 58 insertions(+), 58 deletions(-) rename {graph => extensions/graph}/.dockerignore (100%) rename {graph => extensions/graph}/Makefile (82%) rename {graph => extensions/graph}/cmd/graph/main.go (51%) rename {graph => extensions/graph}/docker/Dockerfile.linux.amd64 (100%) rename {graph => extensions/graph}/docker/Dockerfile.linux.arm (100%) rename {graph => extensions/graph}/docker/Dockerfile.linux.arm64 (100%) rename {graph => extensions/graph}/docker/manifest.tmpl (100%) rename {graph => extensions/graph}/mocks/gateway_client.go (100%) rename {graph => extensions/graph}/mocks/http_client.go (100%) rename {graph => extensions/graph}/mocks/publisher.go (100%) rename {graph => extensions/graph}/pkg/command/health.go (84%) rename {graph => extensions/graph}/pkg/command/root.go (95%) rename {graph => extensions/graph}/pkg/command/server.go (81%) rename {graph => extensions/graph}/pkg/command/version.go (95%) rename {graph => extensions/graph}/pkg/config/config.go (100%) rename {graph => extensions/graph}/pkg/config/debug.go (100%) rename {graph => extensions/graph}/pkg/config/defaults/defaultconfig.go (98%) rename {graph => extensions/graph}/pkg/config/http.go (100%) rename {graph => extensions/graph}/pkg/config/log.go (100%) rename {graph => extensions/graph}/pkg/config/parser/parse.go (85%) rename {graph => extensions/graph}/pkg/config/reva.go (100%) rename {graph => extensions/graph}/pkg/config/service.go (100%) rename {graph => extensions/graph}/pkg/config/tracing.go (100%) rename {graph => extensions/graph}/pkg/identity/backend.go (100%) rename {graph => extensions/graph}/pkg/identity/cs3.go (98%) rename {graph => extensions/graph}/pkg/identity/ldap.go (99%) rename {graph => extensions/graph}/pkg/identity/ldap/reconnect.go (100%) rename {graph => extensions/graph}/pkg/identity/ldap_test.go (99%) rename {graph => extensions/graph}/pkg/logging/logging.go (85%) rename {graph => extensions/graph}/pkg/metrics/metrics.go (100%) rename {graph => extensions/graph}/pkg/middleware/auth.go (97%) rename {graph => extensions/graph}/pkg/middleware/requireadmin.go (96%) rename {graph => extensions/graph}/pkg/server/debug/option.go (94%) rename {graph => extensions/graph}/pkg/server/debug/server.go (96%) rename {graph => extensions/graph}/pkg/server/http/option.go (92%) rename {graph => extensions/graph}/pkg/server/http/server.go (92%) rename {graph => extensions/graph}/pkg/service/v0/driveitems.go (99%) rename {graph => extensions/graph}/pkg/service/v0/drives.go (99%) rename {graph => extensions/graph}/pkg/service/v0/drives_test.go (100%) rename {graph => extensions/graph}/pkg/service/v0/errorcode/errorcode.go (100%) rename {graph => extensions/graph}/pkg/service/v0/graph.go (97%) rename {graph => extensions/graph}/pkg/service/v0/graph_suite_test.go (100%) rename {graph => extensions/graph}/pkg/service/v0/graph_test.go (97%) rename {graph => extensions/graph}/pkg/service/v0/groups.go (99%) rename {graph => extensions/graph}/pkg/service/v0/instrument.go (97%) rename {graph => extensions/graph}/pkg/service/v0/logging.go (100%) rename {graph => extensions/graph}/pkg/service/v0/net/headers.go (100%) rename {graph => extensions/graph}/pkg/service/v0/option.go (97%) rename {graph => extensions/graph}/pkg/service/v0/ordering.go (100%) rename {graph => extensions/graph}/pkg/service/v0/service.go (96%) rename {graph => extensions/graph}/pkg/service/v0/service_test.go (100%) rename {graph => extensions/graph}/pkg/service/v0/tracing.go (100%) rename {graph => extensions/graph}/pkg/service/v0/users.go (98%) rename {graph => extensions/graph}/pkg/tracing/tracing.go (90%) rename {graph => extensions/graph}/reflex.conf (100%) diff --git a/graph/.dockerignore b/extensions/graph/.dockerignore similarity index 100% rename from graph/.dockerignore rename to extensions/graph/.dockerignore diff --git a/graph/Makefile b/extensions/graph/Makefile similarity index 82% rename from graph/Makefile rename to extensions/graph/Makefile index 40bb0cacac..df59c1a1d6 100644 --- a/graph/Makefile +++ b/extensions/graph/Makefile @@ -1,27 +1,27 @@ SHELL := bash NAME := graph -include ../.make/recursion.mk +include ../../.make/recursion.mk ############ tooling ############ ifneq (, $(shell which go 2> /dev/null)) # suppress `command not found warnings` for non go targets in CI -include ../.bingo/Variables.mk +include ../../.bingo/Variables.mk endif ############ go tooling ############ -include ../.make/go.mk +include ../../.make/go.mk ############ release ############ -include ../.make/release.mk +include ../../.make/release.mk ############ docs generate ############ -include ../.make/docs.mk +include ../../.make/docs.mk .PHONY: docs-generate docs-generate: config-docs-generate ############ generate ############ -include ../.make/generate.mk +include ../../.make/generate.mk .PHONY: ci-go-generate ci-go-generate: $(MOCKERY) # CI runs ci-node-generate automatically before this target diff --git a/graph/cmd/graph/main.go b/extensions/graph/cmd/graph/main.go similarity index 51% rename from graph/cmd/graph/main.go rename to extensions/graph/cmd/graph/main.go index ddce12e82a..4f4377ad1e 100644 --- a/graph/cmd/graph/main.go +++ b/extensions/graph/cmd/graph/main.go @@ -3,8 +3,8 @@ package main import ( "os" - "github.com/owncloud/ocis/graph/pkg/command" - "github.com/owncloud/ocis/graph/pkg/config/defaults" + "github.com/owncloud/ocis/extensions/graph/pkg/command" + "github.com/owncloud/ocis/extensions/graph/pkg/config/defaults" ) func main() { diff --git a/graph/docker/Dockerfile.linux.amd64 b/extensions/graph/docker/Dockerfile.linux.amd64 similarity index 100% rename from graph/docker/Dockerfile.linux.amd64 rename to extensions/graph/docker/Dockerfile.linux.amd64 diff --git a/graph/docker/Dockerfile.linux.arm b/extensions/graph/docker/Dockerfile.linux.arm similarity index 100% rename from graph/docker/Dockerfile.linux.arm rename to extensions/graph/docker/Dockerfile.linux.arm diff --git a/graph/docker/Dockerfile.linux.arm64 b/extensions/graph/docker/Dockerfile.linux.arm64 similarity index 100% rename from graph/docker/Dockerfile.linux.arm64 rename to extensions/graph/docker/Dockerfile.linux.arm64 diff --git a/graph/docker/manifest.tmpl b/extensions/graph/docker/manifest.tmpl similarity index 100% rename from graph/docker/manifest.tmpl rename to extensions/graph/docker/manifest.tmpl diff --git a/graph/mocks/gateway_client.go b/extensions/graph/mocks/gateway_client.go similarity index 100% rename from graph/mocks/gateway_client.go rename to extensions/graph/mocks/gateway_client.go diff --git a/graph/mocks/http_client.go b/extensions/graph/mocks/http_client.go similarity index 100% rename from graph/mocks/http_client.go rename to extensions/graph/mocks/http_client.go diff --git a/graph/mocks/publisher.go b/extensions/graph/mocks/publisher.go similarity index 100% rename from graph/mocks/publisher.go rename to extensions/graph/mocks/publisher.go diff --git a/graph/pkg/command/health.go b/extensions/graph/pkg/command/health.go similarity index 84% rename from graph/pkg/command/health.go rename to extensions/graph/pkg/command/health.go index 27c8ef9e9a..0de5812985 100644 --- a/graph/pkg/command/health.go +++ b/extensions/graph/pkg/command/health.go @@ -4,9 +4,9 @@ import ( "fmt" "net/http" - "github.com/owncloud/ocis/graph/pkg/config" - "github.com/owncloud/ocis/graph/pkg/config/parser" - "github.com/owncloud/ocis/graph/pkg/logging" + "github.com/owncloud/ocis/extensions/graph/pkg/config" + "github.com/owncloud/ocis/extensions/graph/pkg/config/parser" + "github.com/owncloud/ocis/extensions/graph/pkg/logging" "github.com/urfave/cli/v2" ) diff --git a/graph/pkg/command/root.go b/extensions/graph/pkg/command/root.go similarity index 95% rename from graph/pkg/command/root.go rename to extensions/graph/pkg/command/root.go index 60c389880d..ecfeb2d15d 100644 --- a/graph/pkg/command/root.go +++ b/extensions/graph/pkg/command/root.go @@ -7,7 +7,7 @@ import ( "github.com/owncloud/ocis/ocis-pkg/clihelper" "github.com/thejerf/suture/v4" - "github.com/owncloud/ocis/graph/pkg/config" + "github.com/owncloud/ocis/extensions/graph/pkg/config" ociscfg "github.com/owncloud/ocis/ocis-pkg/config" "github.com/urfave/cli/v2" ) diff --git a/graph/pkg/command/server.go b/extensions/graph/pkg/command/server.go similarity index 81% rename from graph/pkg/command/server.go rename to extensions/graph/pkg/command/server.go index 38c012a20c..c7e3e317a3 100644 --- a/graph/pkg/command/server.go +++ b/extensions/graph/pkg/command/server.go @@ -5,13 +5,13 @@ import ( "fmt" "github.com/oklog/run" - "github.com/owncloud/ocis/graph/pkg/config" - "github.com/owncloud/ocis/graph/pkg/config/parser" - "github.com/owncloud/ocis/graph/pkg/logging" - "github.com/owncloud/ocis/graph/pkg/metrics" - "github.com/owncloud/ocis/graph/pkg/server/debug" - "github.com/owncloud/ocis/graph/pkg/server/http" - "github.com/owncloud/ocis/graph/pkg/tracing" + "github.com/owncloud/ocis/extensions/graph/pkg/config" + "github.com/owncloud/ocis/extensions/graph/pkg/config/parser" + "github.com/owncloud/ocis/extensions/graph/pkg/logging" + "github.com/owncloud/ocis/extensions/graph/pkg/metrics" + "github.com/owncloud/ocis/extensions/graph/pkg/server/debug" + "github.com/owncloud/ocis/extensions/graph/pkg/server/http" + "github.com/owncloud/ocis/extensions/graph/pkg/tracing" "github.com/owncloud/ocis/ocis-pkg/version" "github.com/urfave/cli/v2" ) diff --git a/graph/pkg/command/version.go b/extensions/graph/pkg/command/version.go similarity index 95% rename from graph/pkg/command/version.go rename to extensions/graph/pkg/command/version.go index 8e85a27dd3..d7db81a43c 100644 --- a/graph/pkg/command/version.go +++ b/extensions/graph/pkg/command/version.go @@ -8,7 +8,7 @@ import ( "github.com/owncloud/ocis/ocis-pkg/version" tw "github.com/olekukonko/tablewriter" - "github.com/owncloud/ocis/graph/pkg/config" + "github.com/owncloud/ocis/extensions/graph/pkg/config" "github.com/urfave/cli/v2" ) diff --git a/graph/pkg/config/config.go b/extensions/graph/pkg/config/config.go similarity index 100% rename from graph/pkg/config/config.go rename to extensions/graph/pkg/config/config.go diff --git a/graph/pkg/config/debug.go b/extensions/graph/pkg/config/debug.go similarity index 100% rename from graph/pkg/config/debug.go rename to extensions/graph/pkg/config/debug.go diff --git a/graph/pkg/config/defaults/defaultconfig.go b/extensions/graph/pkg/config/defaults/defaultconfig.go similarity index 98% rename from graph/pkg/config/defaults/defaultconfig.go rename to extensions/graph/pkg/config/defaults/defaultconfig.go index 7ea8774cf0..49cd9916b5 100644 --- a/graph/pkg/config/defaults/defaultconfig.go +++ b/extensions/graph/pkg/config/defaults/defaultconfig.go @@ -3,7 +3,7 @@ package defaults import ( "strings" - "github.com/owncloud/ocis/graph/pkg/config" + "github.com/owncloud/ocis/extensions/graph/pkg/config" ) func DefaultConfig() *config.Config { diff --git a/graph/pkg/config/http.go b/extensions/graph/pkg/config/http.go similarity index 100% rename from graph/pkg/config/http.go rename to extensions/graph/pkg/config/http.go diff --git a/graph/pkg/config/log.go b/extensions/graph/pkg/config/log.go similarity index 100% rename from graph/pkg/config/log.go rename to extensions/graph/pkg/config/log.go diff --git a/graph/pkg/config/parser/parse.go b/extensions/graph/pkg/config/parser/parse.go similarity index 85% rename from graph/pkg/config/parser/parse.go rename to extensions/graph/pkg/config/parser/parse.go index a1892f0950..cf4612cc88 100644 --- a/graph/pkg/config/parser/parse.go +++ b/extensions/graph/pkg/config/parser/parse.go @@ -3,8 +3,8 @@ package parser import ( "errors" - "github.com/owncloud/ocis/graph/pkg/config" - "github.com/owncloud/ocis/graph/pkg/config/defaults" + "github.com/owncloud/ocis/extensions/graph/pkg/config" + "github.com/owncloud/ocis/extensions/graph/pkg/config/defaults" ociscfg "github.com/owncloud/ocis/ocis-pkg/config" "github.com/owncloud/ocis/ocis-pkg/config/envdecode" diff --git a/graph/pkg/config/reva.go b/extensions/graph/pkg/config/reva.go similarity index 100% rename from graph/pkg/config/reva.go rename to extensions/graph/pkg/config/reva.go diff --git a/graph/pkg/config/service.go b/extensions/graph/pkg/config/service.go similarity index 100% rename from graph/pkg/config/service.go rename to extensions/graph/pkg/config/service.go diff --git a/graph/pkg/config/tracing.go b/extensions/graph/pkg/config/tracing.go similarity index 100% rename from graph/pkg/config/tracing.go rename to extensions/graph/pkg/config/tracing.go diff --git a/graph/pkg/identity/backend.go b/extensions/graph/pkg/identity/backend.go similarity index 100% rename from graph/pkg/identity/backend.go rename to extensions/graph/pkg/identity/backend.go diff --git a/graph/pkg/identity/cs3.go b/extensions/graph/pkg/identity/cs3.go similarity index 98% rename from graph/pkg/identity/cs3.go rename to extensions/graph/pkg/identity/cs3.go index ac3aea6d0a..e5c0760a6c 100644 --- a/graph/pkg/identity/cs3.go +++ b/extensions/graph/pkg/identity/cs3.go @@ -10,8 +10,8 @@ import ( "github.com/cs3org/reva/v2/pkg/rgrpc/todo/pool" libregraph "github.com/owncloud/libre-graph-api-go" - "github.com/owncloud/ocis/graph/pkg/config" - "github.com/owncloud/ocis/graph/pkg/service/v0/errorcode" + "github.com/owncloud/ocis/extensions/graph/pkg/config" + "github.com/owncloud/ocis/extensions/graph/pkg/service/v0/errorcode" "github.com/owncloud/ocis/ocis-pkg/log" ) diff --git a/graph/pkg/identity/ldap.go b/extensions/graph/pkg/identity/ldap.go similarity index 99% rename from graph/pkg/identity/ldap.go rename to extensions/graph/pkg/identity/ldap.go index 882ea91af3..afbecb7ed4 100644 --- a/graph/pkg/identity/ldap.go +++ b/extensions/graph/pkg/identity/ldap.go @@ -11,8 +11,8 @@ import ( ldapdn "github.com/libregraph/idm/pkg/ldapdn" libregraph "github.com/owncloud/libre-graph-api-go" - "github.com/owncloud/ocis/graph/pkg/config" - "github.com/owncloud/ocis/graph/pkg/service/v0/errorcode" + "github.com/owncloud/ocis/extensions/graph/pkg/config" + "github.com/owncloud/ocis/extensions/graph/pkg/service/v0/errorcode" "github.com/owncloud/ocis/ocis-pkg/log" ) diff --git a/graph/pkg/identity/ldap/reconnect.go b/extensions/graph/pkg/identity/ldap/reconnect.go similarity index 100% rename from graph/pkg/identity/ldap/reconnect.go rename to extensions/graph/pkg/identity/ldap/reconnect.go diff --git a/graph/pkg/identity/ldap_test.go b/extensions/graph/pkg/identity/ldap_test.go similarity index 99% rename from graph/pkg/identity/ldap_test.go rename to extensions/graph/pkg/identity/ldap_test.go index baf1eae539..13937f66c3 100644 --- a/graph/pkg/identity/ldap_test.go +++ b/extensions/graph/pkg/identity/ldap_test.go @@ -10,7 +10,7 @@ import ( "time" "github.com/go-ldap/ldap/v3" - "github.com/owncloud/ocis/graph/pkg/config" + "github.com/owncloud/ocis/extensions/graph/pkg/config" "github.com/owncloud/ocis/ocis-pkg/log" ) diff --git a/graph/pkg/logging/logging.go b/extensions/graph/pkg/logging/logging.go similarity index 85% rename from graph/pkg/logging/logging.go rename to extensions/graph/pkg/logging/logging.go index daf29f40b8..97179a8ee5 100644 --- a/graph/pkg/logging/logging.go +++ b/extensions/graph/pkg/logging/logging.go @@ -1,7 +1,7 @@ package logging import ( - "github.com/owncloud/ocis/graph/pkg/config" + "github.com/owncloud/ocis/extensions/graph/pkg/config" "github.com/owncloud/ocis/ocis-pkg/log" ) diff --git a/graph/pkg/metrics/metrics.go b/extensions/graph/pkg/metrics/metrics.go similarity index 100% rename from graph/pkg/metrics/metrics.go rename to extensions/graph/pkg/metrics/metrics.go diff --git a/graph/pkg/middleware/auth.go b/extensions/graph/pkg/middleware/auth.go similarity index 97% rename from graph/pkg/middleware/auth.go rename to extensions/graph/pkg/middleware/auth.go index 275db9bc4e..364cc6e3d9 100644 --- a/graph/pkg/middleware/auth.go +++ b/extensions/graph/pkg/middleware/auth.go @@ -6,7 +6,7 @@ import ( "github.com/cs3org/reva/v2/pkg/auth/scope" revactx "github.com/cs3org/reva/v2/pkg/ctx" "github.com/cs3org/reva/v2/pkg/token/manager/jwt" - "github.com/owncloud/ocis/graph/pkg/service/v0/errorcode" + "github.com/owncloud/ocis/extensions/graph/pkg/service/v0/errorcode" "github.com/owncloud/ocis/ocis-pkg/account" "google.golang.org/grpc/metadata" ) diff --git a/graph/pkg/middleware/requireadmin.go b/extensions/graph/pkg/middleware/requireadmin.go similarity index 96% rename from graph/pkg/middleware/requireadmin.go rename to extensions/graph/pkg/middleware/requireadmin.go index 0a8c0db1af..8d637959f8 100644 --- a/graph/pkg/middleware/requireadmin.go +++ b/extensions/graph/pkg/middleware/requireadmin.go @@ -5,7 +5,7 @@ import ( revactx "github.com/cs3org/reva/v2/pkg/ctx" accounts "github.com/owncloud/ocis/extensions/accounts/pkg/service/v0" - "github.com/owncloud/ocis/graph/pkg/service/v0/errorcode" + "github.com/owncloud/ocis/extensions/graph/pkg/service/v0/errorcode" "github.com/owncloud/ocis/ocis-pkg/log" "github.com/owncloud/ocis/ocis-pkg/roles" ) diff --git a/graph/pkg/server/debug/option.go b/extensions/graph/pkg/server/debug/option.go similarity index 94% rename from graph/pkg/server/debug/option.go rename to extensions/graph/pkg/server/debug/option.go index 1a71993add..eaf70143e2 100644 --- a/graph/pkg/server/debug/option.go +++ b/extensions/graph/pkg/server/debug/option.go @@ -3,7 +3,7 @@ package debug import ( "context" - "github.com/owncloud/ocis/graph/pkg/config" + "github.com/owncloud/ocis/extensions/graph/pkg/config" "github.com/owncloud/ocis/ocis-pkg/log" ) diff --git a/graph/pkg/server/debug/server.go b/extensions/graph/pkg/server/debug/server.go similarity index 96% rename from graph/pkg/server/debug/server.go rename to extensions/graph/pkg/server/debug/server.go index 240b1f9362..ae3c1e2dd1 100644 --- a/graph/pkg/server/debug/server.go +++ b/extensions/graph/pkg/server/debug/server.go @@ -4,7 +4,7 @@ import ( "io" "net/http" - "github.com/owncloud/ocis/graph/pkg/config" + "github.com/owncloud/ocis/extensions/graph/pkg/config" "github.com/owncloud/ocis/ocis-pkg/service/debug" "github.com/owncloud/ocis/ocis-pkg/version" ) diff --git a/graph/pkg/server/http/option.go b/extensions/graph/pkg/server/http/option.go similarity index 92% rename from graph/pkg/server/http/option.go rename to extensions/graph/pkg/server/http/option.go index e1404d3744..920c7e4cc9 100644 --- a/graph/pkg/server/http/option.go +++ b/extensions/graph/pkg/server/http/option.go @@ -3,8 +3,8 @@ package http import ( "context" - "github.com/owncloud/ocis/graph/pkg/config" - "github.com/owncloud/ocis/graph/pkg/metrics" + "github.com/owncloud/ocis/extensions/graph/pkg/config" + "github.com/owncloud/ocis/extensions/graph/pkg/metrics" "github.com/owncloud/ocis/ocis-pkg/log" "github.com/urfave/cli/v2" ) diff --git a/graph/pkg/server/http/server.go b/extensions/graph/pkg/server/http/server.go similarity index 92% rename from graph/pkg/server/http/server.go rename to extensions/graph/pkg/server/http/server.go index 0456e1bcb9..b9cfec6568 100644 --- a/graph/pkg/server/http/server.go +++ b/extensions/graph/pkg/server/http/server.go @@ -4,8 +4,8 @@ import ( "github.com/asim/go-micro/plugins/events/natsjs/v4" "github.com/cs3org/reva/v2/pkg/events/server" chimiddleware "github.com/go-chi/chi/v5/middleware" - graphMiddleware "github.com/owncloud/ocis/graph/pkg/middleware" - svc "github.com/owncloud/ocis/graph/pkg/service/v0" + graphMiddleware "github.com/owncloud/ocis/extensions/graph/pkg/middleware" + svc "github.com/owncloud/ocis/extensions/graph/pkg/service/v0" "github.com/owncloud/ocis/ocis-pkg/account" "github.com/owncloud/ocis/ocis-pkg/middleware" "github.com/owncloud/ocis/ocis-pkg/service/http" diff --git a/graph/pkg/service/v0/driveitems.go b/extensions/graph/pkg/service/v0/driveitems.go similarity index 99% rename from graph/pkg/service/v0/driveitems.go rename to extensions/graph/pkg/service/v0/driveitems.go index ce801aaf26..c449f99223 100644 --- a/graph/pkg/service/v0/driveitems.go +++ b/extensions/graph/pkg/service/v0/driveitems.go @@ -15,7 +15,7 @@ import ( "github.com/cs3org/reva/v2/pkg/utils/resourceid" "github.com/go-chi/render" libregraph "github.com/owncloud/libre-graph-api-go" - "github.com/owncloud/ocis/graph/pkg/service/v0/errorcode" + "github.com/owncloud/ocis/extensions/graph/pkg/service/v0/errorcode" ) // GetRootDriveChildren implements the Service interface. diff --git a/graph/pkg/service/v0/drives.go b/extensions/graph/pkg/service/v0/drives.go similarity index 99% rename from graph/pkg/service/v0/drives.go rename to extensions/graph/pkg/service/v0/drives.go index 0c1fda57cf..c4a3b99694 100644 --- a/graph/pkg/service/v0/drives.go +++ b/extensions/graph/pkg/service/v0/drives.go @@ -23,7 +23,7 @@ import ( "github.com/go-chi/chi/v5" "github.com/go-chi/render" libregraph "github.com/owncloud/libre-graph-api-go" - "github.com/owncloud/ocis/graph/pkg/service/v0/errorcode" + "github.com/owncloud/ocis/extensions/graph/pkg/service/v0/errorcode" "github.com/owncloud/ocis/ocis-pkg/service/grpc" v0 "github.com/owncloud/ocis/protogen/gen/ocis/messages/settings/v0" settingssvc "github.com/owncloud/ocis/protogen/gen/ocis/services/settings/v0" diff --git a/graph/pkg/service/v0/drives_test.go b/extensions/graph/pkg/service/v0/drives_test.go similarity index 100% rename from graph/pkg/service/v0/drives_test.go rename to extensions/graph/pkg/service/v0/drives_test.go diff --git a/graph/pkg/service/v0/errorcode/errorcode.go b/extensions/graph/pkg/service/v0/errorcode/errorcode.go similarity index 100% rename from graph/pkg/service/v0/errorcode/errorcode.go rename to extensions/graph/pkg/service/v0/errorcode/errorcode.go diff --git a/graph/pkg/service/v0/graph.go b/extensions/graph/pkg/service/v0/graph.go similarity index 97% rename from graph/pkg/service/v0/graph.go rename to extensions/graph/pkg/service/v0/graph.go index 3d2ef13b89..6389fc7dba 100644 --- a/graph/pkg/service/v0/graph.go +++ b/extensions/graph/pkg/service/v0/graph.go @@ -9,8 +9,8 @@ import ( provider "github.com/cs3org/go-cs3apis/cs3/storage/provider/v1beta1" "github.com/cs3org/reva/v2/pkg/events" "github.com/go-chi/chi/v5" - "github.com/owncloud/ocis/graph/pkg/config" - "github.com/owncloud/ocis/graph/pkg/identity" + "github.com/owncloud/ocis/extensions/graph/pkg/config" + "github.com/owncloud/ocis/extensions/graph/pkg/identity" "github.com/owncloud/ocis/ocis-pkg/log" settingssvc "github.com/owncloud/ocis/protogen/gen/ocis/services/settings/v0" mevents "go-micro.dev/v4/events" diff --git a/graph/pkg/service/v0/graph_suite_test.go b/extensions/graph/pkg/service/v0/graph_suite_test.go similarity index 100% rename from graph/pkg/service/v0/graph_suite_test.go rename to extensions/graph/pkg/service/v0/graph_suite_test.go diff --git a/graph/pkg/service/v0/graph_test.go b/extensions/graph/pkg/service/v0/graph_test.go similarity index 97% rename from graph/pkg/service/v0/graph_test.go rename to extensions/graph/pkg/service/v0/graph_test.go index e63ca3d4e9..fe328d93a6 100644 --- a/graph/pkg/service/v0/graph_test.go +++ b/extensions/graph/pkg/service/v0/graph_test.go @@ -16,10 +16,10 @@ import ( . "github.com/onsi/ginkgo" . "github.com/onsi/gomega" libregraph "github.com/owncloud/libre-graph-api-go" - "github.com/owncloud/ocis/graph/mocks" - "github.com/owncloud/ocis/graph/pkg/config/defaults" - service "github.com/owncloud/ocis/graph/pkg/service/v0" - "github.com/owncloud/ocis/graph/pkg/service/v0/errorcode" + "github.com/owncloud/ocis/extensions/graph/mocks" + "github.com/owncloud/ocis/extensions/graph/pkg/config/defaults" + service "github.com/owncloud/ocis/extensions/graph/pkg/service/v0" + "github.com/owncloud/ocis/extensions/graph/pkg/service/v0/errorcode" "github.com/stretchr/testify/mock" ) diff --git a/graph/pkg/service/v0/groups.go b/extensions/graph/pkg/service/v0/groups.go similarity index 99% rename from graph/pkg/service/v0/groups.go rename to extensions/graph/pkg/service/v0/groups.go index 9e53b8cfd4..363e369363 100644 --- a/graph/pkg/service/v0/groups.go +++ b/extensions/graph/pkg/service/v0/groups.go @@ -11,7 +11,7 @@ import ( "github.com/CiscoM31/godata" libregraph "github.com/owncloud/libre-graph-api-go" - "github.com/owncloud/ocis/graph/pkg/service/v0/errorcode" + "github.com/owncloud/ocis/extensions/graph/pkg/service/v0/errorcode" "github.com/cs3org/reva/v2/pkg/events" "github.com/go-chi/chi/v5" diff --git a/graph/pkg/service/v0/instrument.go b/extensions/graph/pkg/service/v0/instrument.go similarity index 97% rename from graph/pkg/service/v0/instrument.go rename to extensions/graph/pkg/service/v0/instrument.go index 96b0183e55..f651a6f5b0 100644 --- a/graph/pkg/service/v0/instrument.go +++ b/extensions/graph/pkg/service/v0/instrument.go @@ -3,7 +3,7 @@ package svc import ( "net/http" - "github.com/owncloud/ocis/graph/pkg/metrics" + "github.com/owncloud/ocis/extensions/graph/pkg/metrics" ) // NewInstrument returns a service that instruments metrics. diff --git a/graph/pkg/service/v0/logging.go b/extensions/graph/pkg/service/v0/logging.go similarity index 100% rename from graph/pkg/service/v0/logging.go rename to extensions/graph/pkg/service/v0/logging.go diff --git a/graph/pkg/service/v0/net/headers.go b/extensions/graph/pkg/service/v0/net/headers.go similarity index 100% rename from graph/pkg/service/v0/net/headers.go rename to extensions/graph/pkg/service/v0/net/headers.go diff --git a/graph/pkg/service/v0/option.go b/extensions/graph/pkg/service/v0/option.go similarity index 97% rename from graph/pkg/service/v0/option.go rename to extensions/graph/pkg/service/v0/option.go index 39c0765ce1..cf3c993e80 100644 --- a/graph/pkg/service/v0/option.go +++ b/extensions/graph/pkg/service/v0/option.go @@ -4,7 +4,7 @@ import ( "net/http" "github.com/cs3org/reva/v2/pkg/events" - "github.com/owncloud/ocis/graph/pkg/config" + "github.com/owncloud/ocis/extensions/graph/pkg/config" "github.com/owncloud/ocis/ocis-pkg/log" "github.com/owncloud/ocis/ocis-pkg/roles" settingssvc "github.com/owncloud/ocis/protogen/gen/ocis/services/settings/v0" diff --git a/graph/pkg/service/v0/ordering.go b/extensions/graph/pkg/service/v0/ordering.go similarity index 100% rename from graph/pkg/service/v0/ordering.go rename to extensions/graph/pkg/service/v0/ordering.go diff --git a/graph/pkg/service/v0/service.go b/extensions/graph/pkg/service/v0/service.go similarity index 96% rename from graph/pkg/service/v0/service.go rename to extensions/graph/pkg/service/v0/service.go index 7833d4fd66..11fe37c2fe 100644 --- a/graph/pkg/service/v0/service.go +++ b/extensions/graph/pkg/service/v0/service.go @@ -11,9 +11,9 @@ import ( "github.com/go-chi/chi/v5" "github.com/go-chi/chi/v5/middleware" - "github.com/owncloud/ocis/graph/pkg/identity" - "github.com/owncloud/ocis/graph/pkg/identity/ldap" - graphm "github.com/owncloud/ocis/graph/pkg/middleware" + "github.com/owncloud/ocis/extensions/graph/pkg/identity" + "github.com/owncloud/ocis/extensions/graph/pkg/identity/ldap" + graphm "github.com/owncloud/ocis/extensions/graph/pkg/middleware" "github.com/owncloud/ocis/ocis-pkg/account" opkgm "github.com/owncloud/ocis/ocis-pkg/middleware" "github.com/owncloud/ocis/ocis-pkg/roles" diff --git a/graph/pkg/service/v0/service_test.go b/extensions/graph/pkg/service/v0/service_test.go similarity index 100% rename from graph/pkg/service/v0/service_test.go rename to extensions/graph/pkg/service/v0/service_test.go diff --git a/graph/pkg/service/v0/tracing.go b/extensions/graph/pkg/service/v0/tracing.go similarity index 100% rename from graph/pkg/service/v0/tracing.go rename to extensions/graph/pkg/service/v0/tracing.go diff --git a/graph/pkg/service/v0/users.go b/extensions/graph/pkg/service/v0/users.go similarity index 98% rename from graph/pkg/service/v0/users.go rename to extensions/graph/pkg/service/v0/users.go index d124da3fd4..9d5de8244f 100644 --- a/graph/pkg/service/v0/users.go +++ b/extensions/graph/pkg/service/v0/users.go @@ -16,8 +16,8 @@ import ( "github.com/go-chi/chi/v5" "github.com/go-chi/render" libregraph "github.com/owncloud/libre-graph-api-go" - "github.com/owncloud/ocis/graph/pkg/identity" - "github.com/owncloud/ocis/graph/pkg/service/v0/errorcode" + "github.com/owncloud/ocis/extensions/graph/pkg/identity" + "github.com/owncloud/ocis/extensions/graph/pkg/service/v0/errorcode" settings "github.com/owncloud/ocis/protogen/gen/ocis/services/settings/v0" settingssvc "github.com/owncloud/ocis/settings/pkg/service/v0" ) diff --git a/graph/pkg/tracing/tracing.go b/extensions/graph/pkg/tracing/tracing.go similarity index 90% rename from graph/pkg/tracing/tracing.go rename to extensions/graph/pkg/tracing/tracing.go index 3f2d775a51..f43926d8ca 100644 --- a/graph/pkg/tracing/tracing.go +++ b/extensions/graph/pkg/tracing/tracing.go @@ -1,7 +1,7 @@ package tracing import ( - "github.com/owncloud/ocis/graph/pkg/config" + "github.com/owncloud/ocis/extensions/graph/pkg/config" pkgtrace "github.com/owncloud/ocis/ocis-pkg/tracing" "go.opentelemetry.io/otel/trace" ) diff --git a/graph/reflex.conf b/extensions/graph/reflex.conf similarity index 100% rename from graph/reflex.conf rename to extensions/graph/reflex.conf diff --git a/ocis-pkg/config/config.go b/ocis-pkg/config/config.go index 967bdf117f..1877a9cff1 100644 --- a/ocis-pkg/config/config.go +++ b/ocis-pkg/config/config.go @@ -6,8 +6,8 @@ import ( audit "github.com/owncloud/ocis/audit/pkg/config" accounts "github.com/owncloud/ocis/extensions/accounts/pkg/config" glauth "github.com/owncloud/ocis/extensions/glauth/pkg/config" + graph "github.com/owncloud/ocis/extensions/graph/pkg/config" graphExplorer "github.com/owncloud/ocis/graph-explorer/pkg/config" - graph "github.com/owncloud/ocis/graph/pkg/config" idm "github.com/owncloud/ocis/idm/pkg/config" idp "github.com/owncloud/ocis/idp/pkg/config" nats "github.com/owncloud/ocis/nats/pkg/config" diff --git a/ocis-pkg/config/defaultconfig.go b/ocis-pkg/config/defaultconfig.go index cc0d9b6661..e9878e66f5 100644 --- a/ocis-pkg/config/defaultconfig.go +++ b/ocis-pkg/config/defaultconfig.go @@ -4,8 +4,8 @@ import ( audit "github.com/owncloud/ocis/audit/pkg/config/defaults" accounts "github.com/owncloud/ocis/extensions/accounts/pkg/config/defaults" glauth "github.com/owncloud/ocis/extensions/glauth/pkg/config/defaults" + graph "github.com/owncloud/ocis/extensions/graph/pkg/config/defaults" graphExplorer "github.com/owncloud/ocis/graph-explorer/pkg/config/defaults" - graph "github.com/owncloud/ocis/graph/pkg/config/defaults" idm "github.com/owncloud/ocis/idm/pkg/config/defaults" idp "github.com/owncloud/ocis/idp/pkg/config/defaults" nats "github.com/owncloud/ocis/nats/pkg/config/defaults" diff --git a/ocis/pkg/command/graph.go b/ocis/pkg/command/graph.go index 0a663e6db3..836ad44465 100644 --- a/ocis/pkg/command/graph.go +++ b/ocis/pkg/command/graph.go @@ -1,7 +1,7 @@ package command import ( - "github.com/owncloud/ocis/graph/pkg/command" + "github.com/owncloud/ocis/extensions/graph/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 a0bbcba991..35a86f7579 100644 --- a/ocis/pkg/runtime/service/service.go +++ b/ocis/pkg/runtime/service/service.go @@ -21,8 +21,8 @@ import ( accounts "github.com/owncloud/ocis/extensions/accounts/pkg/command" glauth "github.com/owncloud/ocis/extensions/glauth/pkg/command" + graph "github.com/owncloud/ocis/extensions/graph/pkg/command" graphExplorer "github.com/owncloud/ocis/graph-explorer/pkg/command" - graph "github.com/owncloud/ocis/graph/pkg/command" idm "github.com/owncloud/ocis/idm/pkg/command" idp "github.com/owncloud/ocis/idp/pkg/command" nats "github.com/owncloud/ocis/nats/pkg/command"