Merge pull request #3531 from owncloud/refactor-structure-v2

Refactor structure
This commit is contained in:
Jörn Friedrich Dreyer
2022-04-14 12:39:11 +02:00
committed by GitHub
904 changed files with 2546 additions and 2539 deletions
+20 -20
View File
@@ -43,22 +43,22 @@ DEFAULT_NODEJS_VERSION = "14"
config = {
"modules": [
# if you add a module here please also add it to the root level Makefile
"accounts",
"audit",
"glauth",
"graph-explorer",
"graph",
"idp",
"extensions/accounts",
"extensions/audit",
"extensions/glauth",
"extensions/graph-explorer",
"extensions/graph",
"extensions/idp",
"extensions/ocs",
"extensions/proxy",
"extensions/settings",
"extensions/storage",
"extensions/store",
"extensions/thumbnails",
"extensions/web",
"extensions/webdav",
"ocis-pkg",
"ocis",
"ocs",
"proxy",
"settings",
"storage",
"store",
"thumbnails",
"web",
"webdav",
],
"cs3ApiTests": {
"skip": False,
@@ -301,7 +301,7 @@ def testOcisModule(ctx, module):
"commands": [
"mkdir -p cache/checkstyle",
"make -C %s ci-golangci-lint" % (module),
"mv %s/checkstyle.xml cache/checkstyle/%s_checkstyle.xml" % (module, module),
"mv %s/checkstyle.xml cache/checkstyle/$(basename %s)_checkstyle.xml" % (module, module),
],
"volumes": [stepVolumeGo],
},
@@ -311,7 +311,7 @@ def testOcisModule(ctx, module):
"commands": [
"mkdir -p cache/coverage",
"make -C %s test" % (module),
"mv %s/coverage.out cache/coverage/%s_coverage.out" % (module, module),
"mv %s/coverage.out cache/coverage/$(basename %s)_coverage.out" % (module, module),
],
"volumes": [stepVolumeGo],
},
@@ -751,7 +751,7 @@ def accountsUITests(ctx, storage = "ocis", accounts_hash_difficulty = 4):
"LOCAL_UPLOAD_DIR": "/uploads",
"NODE_TLS_REJECT_UNAUTHORIZED": 0,
"WEB_PATH": "/srv/app/web",
"FEATURE_PATH": "/drone/src/accounts/ui/tests/acceptance/features",
"FEATURE_PATH": "/drone/src/extensions/accounts/ui/tests/acceptance/features",
"MIDDLEWARE_HOST": "http://middleware:3000",
},
"commands": [
@@ -762,7 +762,7 @@ def accountsUITests(ctx, storage = "ocis", accounts_hash_difficulty = 4):
"git checkout $WEB_COMMITID",
# TODO: settings/package.json has all the acceptance test dependencies
# they shouldn't be needed since we could also use them from web:/tests/acceptance/package.json
"cd /drone/src/accounts",
"cd /drone/src/extensions/accounts",
"yarn install --immutable",
"make test-acceptance-webui",
],
@@ -815,7 +815,7 @@ def settingsUITests(ctx, storage = "ocis", accounts_hash_difficulty = 4):
"LOCAL_UPLOAD_DIR": "/uploads",
"NODE_TLS_REJECT_UNAUTHORIZED": 0,
"WEB_PATH": "/srv/app/web",
"FEATURE_PATH": "/drone/src/settings/ui/tests/acceptance/features",
"FEATURE_PATH": "/drone/src/extensions/settings/ui/tests/acceptance/features",
"MIDDLEWARE_HOST": "http://middleware:3000",
},
"commands": [
@@ -826,7 +826,7 @@ def settingsUITests(ctx, storage = "ocis", accounts_hash_difficulty = 4):
"git checkout $WEB_COMMITID",
# TODO: settings/package.json has all the acceptance test dependencies
# they shouldn't be needed since we could also use them from web:/tests/acceptance/package.json
"cd /drone/src/settings",
"cd /drone/src/extensions/settings",
"yarn install --immutable",
"make test-acceptance-webui",
],
+4
View File
@@ -1,15 +1,19 @@
*/coverage.out
extensions/*/coverage.out
*/checkstyle.xml
extensions/*/checkstyle.xml
*/package-lock.json
ocis/config/identifier-registration.yaml
*/bin
extensions/*/bin
dist/
/hugo
*.key
*crt
node_modules/
*/assets
extensions/*/assets
ocis/ocis
ocis/cmd/ocis/__debug_bin
ocis/cmd/ocis/config/
+1 -1
View File
@@ -1,6 +1,6 @@
SKIP_CONFIG_DOCS_GENERATE ?= 0
CONFIG_DOCS_BASE_PATH ?= ../docs/extensions
CONFIG_DOCS_BASE_PATH ?= ../../docs/extensions
.PHONY: config-docs-generate
config-docs-generate: #$(FLAEX)
+10 -10
View File
@@ -1,24 +1,24 @@
SHA1_LOCK_FILE := $(abspath $(CURDIR)/../protogen/buf.sha1.lock)
SHA1_LOCK_FILE := $(abspath $(CURDIR)/../../protogen/buf.sha1.lock)
# bingo creates symlinks from the -l option in GOBIN, from where
# we can easily use it with buf. To have the symlinks inside this
# repo and on a known location, we set GOBIN to .bingo in the root
# of the repository (therefore we need to cd ..)
# of the repository (therefore we need to cd ../..)
.PHONY: protoc-deps
protoc-deps: $(BINGO)
@cd .. && GOPATH="" GOBIN=".bingo" $(BINGO) get -l google.golang.org/protobuf/cmd/protoc-gen-go
@cd .. && GOPATH="" GOBIN=".bingo" $(BINGO) get -l github.com/asim/go-micro/cmd/protoc-gen-micro/v4
@cd .. && GOPATH="" GOBIN=".bingo" $(BINGO) get -l github.com/owncloud/protoc-gen-microweb
@cd .. && GOPATH="" GOBIN=".bingo" $(BINGO) get -l github.com/grpc-ecosystem/grpc-gateway/v2/protoc-gen-openapiv2
@cd .. && GOPATH="" GOBIN=".bingo" $(BINGO) get -l github.com/pseudomuto/protoc-gen-doc/cmd/protoc-gen-doc
@cd ../.. && GOPATH="" GOBIN=".bingo" $(BINGO) get -l google.golang.org/protobuf/cmd/protoc-gen-go
@cd ../.. && GOPATH="" GOBIN=".bingo" $(BINGO) get -l github.com/asim/go-micro/cmd/protoc-gen-micro/v4
@cd ../.. && GOPATH="" GOBIN=".bingo" $(BINGO) get -l github.com/owncloud/protoc-gen-microweb
@cd ../.. && GOPATH="" GOBIN=".bingo" $(BINGO) get -l github.com/grpc-ecosystem/grpc-gateway/v2/protoc-gen-openapiv2
@cd ../.. && GOPATH="" GOBIN=".bingo" $(BINGO) get -l github.com/pseudomuto/protoc-gen-doc/cmd/protoc-gen-doc
.PHONY: buf-generate
buf-generate: $(BUF) protoc-deps $(SHA1_LOCK_FILE)
@find $(abspath $(CURDIR)/../protogen/proto/) -type f -print0 | sort -z | xargs -0 sha1sum > buf.sha1.lock.tmp
@find $(abspath $(CURDIR)/../../protogen/proto/) -type f -print0 | sort -z | xargs -0 sha1sum > buf.sha1.lock.tmp
@cmp $(SHA1_LOCK_FILE) buf.sha1.lock.tmp --quiet || $(MAKE) -B $(SHA1_LOCK_FILE)
@rm -f buf.sha1.lock.tmp
$(SHA1_LOCK_FILE):
@echo "generating protobuf content"
cd ../protogen/proto && $(BUF) generate
find $(abspath $(CURDIR)/../protogen/proto/) -type f -print0 | sort -z | xargs -0 sha1sum > $(SHA1_LOCK_FILE)
cd ../../protogen/proto && $(BUF) generate
find $(abspath $(CURDIR)/../../protogen/proto/) -type f -print0 | sort -z | xargs -0 sha1sum > $(SHA1_LOCK_FILE)
+18 -18
View File
@@ -170,11 +170,28 @@ The following sections list the changes for 1.20.0.
Group member remove
https://github.com/owncloud/ocis/pull/3467
# Changelog for [1.19.1] (2022-03-29)
The following sections list the changes for 1.19.1.
[1.19.1]: https://github.com/owncloud/ocis/compare/v1.19.0...v1.19.1
## Summary
* Bugfix - Return correct special item urls: [#3419](https://github.com/owncloud/ocis/pull/3419)
## Details
* Bugfix - Return correct special item urls: [#3419](https://github.com/owncloud/ocis/pull/3419)
URLs for Special items (space image, readme) were broken.
https://github.com/owncloud/ocis/pull/3419
# Changelog for [1.19.0] (2022-03-29)
The following sections list the changes for 1.19.0.
[1.19.0]: https://github.com/owncloud/ocis/compare/v1.19.1...v1.19.0
[1.19.0]: https://github.com/owncloud/ocis/compare/v1.18.0...v1.19.0
## Summary
@@ -343,23 +360,6 @@ The following sections list the changes for 1.19.0.
https://github.com/owncloud/ocis/pull/3291
https://github.com/owncloud/ocis/pull/3375
https://github.com/owncloud/web/releases/tag/v5.3.0
# Changelog for [1.19.1] (2022-03-29)
The following sections list the changes for 1.19.1.
[1.19.1]: https://github.com/owncloud/ocis/compare/v1.18.0...v1.19.1
## Summary
* Bugfix - Return correct special item urls: [#3419](https://github.com/owncloud/ocis/pull/3419)
## Details
* Bugfix - Return correct special item urls: [#3419](https://github.com/owncloud/ocis/pull/3419)
URLs for Special items (space image, readme) were broken.
https://github.com/owncloud/ocis/pull/3419
# Changelog for [1.18.0] (2022-03-03)
The following sections list the changes for 1.18.0.
+15 -15
View File
@@ -16,22 +16,22 @@ L10N_MODULES := $(shell find . -path '*.tx*' -name 'config' | sed 's|/[^/]*$$||'
# if you add a module here please also add it to the .drone.star file
OCIS_MODULES = \
accounts \
audit \
glauth \
graph \
graph-explorer \
idp \
extensions/accounts \
extensions/audit \
extensions/glauth \
extensions/graph \
extensions/graph-explorer \
extensions/idp \
extensions/ocs \
extensions/proxy \
extensions/settings \
extensions/storage \
extensions/store \
extensions/thumbnails \
extensions/web \
extensions/webdav\
ocis \
ocis-pkg \
ocs \
proxy \
settings \
storage \
store \
thumbnails \
web \
webdav
ocis-pkg
# bin file definitions
PHP_CS_FIXER=php -d zend.enable_gc=0 vendor-bin/owncloud-codestyle/vendor/bin/php-cs-fixer
+1
View File
@@ -1,3 +1,4 @@
hugo/
grpc_apis/
mutagen.yml.lock
helpers/output/*
+1 -1
View File
@@ -19,7 +19,7 @@ var targets = map[string]string{
func main() {
fmt.Println("Getting relevant packages")
paths, err := filepath.Glob("../../*/pkg/config/defaults/defaultconfig.go")
paths, err := filepath.Glob("../../extensions/*/pkg/config/defaults/defaultconfig.go")
if err != nil {
log.Fatal(err)
}
@@ -15,7 +15,7 @@ import (
func main() {
replacer := strings.NewReplacer(
"github.com/owncloud/ocis/", "",
"github.com/owncloud/ocis/extensions/", "",
"/pkg/config/defaults", "",
)
cfg := map[string]string{
+1 -1
View File
@@ -28,7 +28,7 @@ if err != nil {
log.Fatal(err)
}
replacer := strings.NewReplacer(
"github.com/owncloud/ocis/", "",
"github.com/owncloud/ocis/extensions/", "",
"/pkg/config/defaults", "",
)
var fields []ConfigField
@@ -1,7 +1,7 @@
SHELL := bash
NAME := accounts
include ../.make/recursion.mk
include ../../.make/recursion.mk
.PHONY: test-acceptance-webui
test-acceptance-webui:
@@ -10,27 +10,27 @@ test-acceptance-webui:
############ 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
############ l10n ############
include ../.make/l10n.mk
include ../../.make/l10n.mk
.PHONY: docs-generate
docs-generate: config-docs-generate \
grpc-docs-generate
############ generate ############
include ../.make/generate.mk
include ../../.make/generate.mk
.PHONY: ci-go-generate
ci-go-generate: protobuf # CI runs ci-node-generate automatically before this target
@@ -49,7 +49,7 @@ node_modules:
@yarn install --immutable 2>&1 >/dev/null
############ protobuf ############
include ../.make/protobuf.mk
include ../../.make/protobuf.mk
.PHONY: protobuf
protobuf: buf-generate
+14
View File
@@ -0,0 +1,14 @@
package main
import (
"os"
"github.com/owncloud/ocis/extensions/accounts/pkg/command"
"github.com/owncloud/ocis/extensions/accounts/pkg/config/defaults"
)
func main() {
if err := command.Execute(defaults.DefaultConfig()); err != nil {
os.Exit(1)
}
}
@@ -3,8 +3,8 @@ package main
import (
"fmt"
accountsdefaults "github.com/owncloud/ocis/accounts/pkg/config/defaults"
idpdefaults "github.com/owncloud/ocis/idp/pkg/config/defaults"
accountsdefaults "github.com/owncloud/ocis/extensions/accounts/pkg/config/defaults"
idpdefaults "github.com/owncloud/ocis/extensions/idp/pkg/config/defaults"
"gopkg.in/yaml.v2"
)
@@ -3,8 +3,8 @@ package assets
import (
"net/http"
"github.com/owncloud/ocis/accounts"
"github.com/owncloud/ocis/accounts/pkg/config"
"github.com/owncloud/ocis/extensions/accounts"
"github.com/owncloud/ocis/extensions/accounts/pkg/config"
"github.com/owncloud/ocis/ocis-pkg/assetsfs"
"github.com/owncloud/ocis/ocis-pkg/log"
)
@@ -7,8 +7,8 @@ import (
accountssvc "github.com/owncloud/ocis/protogen/gen/ocis/services/accounts/v0"
"github.com/asim/go-micro/plugins/client/grpc/v4"
"github.com/owncloud/ocis/accounts/pkg/config"
"github.com/owncloud/ocis/accounts/pkg/flagset"
"github.com/owncloud/ocis/extensions/accounts/pkg/config"
"github.com/owncloud/ocis/extensions/accounts/pkg/flagset"
"github.com/urfave/cli/v2"
)
+53
View File
@@ -0,0 +1,53 @@
package command
import (
"fmt"
"net/http"
"github.com/owncloud/ocis/extensions/accounts/pkg/config"
"github.com/owncloud/ocis/extensions/accounts/pkg/config/parser"
"github.com/owncloud/ocis/extensions/accounts/pkg/logging"
"github.com/urfave/cli/v2"
)
// Health is the entrypoint for the health command.
func Health(cfg *config.Config) *cli.Command {
return &cli.Command{
Name: "health",
Usage: "check health status",
Category: "info",
Before: func(c *cli.Context) error {
return parser.ParseConfig(cfg)
},
Action: func(c *cli.Context) error {
logger := logging.Configure(cfg.Service.Name, cfg.Log)
resp, err := http.Get(
fmt.Sprintf(
"http://%s/healthz",
cfg.Debug.Addr,
),
)
if err != nil {
logger.Fatal().
Err(err).
Msg("Failed to request health check")
}
defer resp.Body.Close()
if resp.StatusCode != http.StatusOK {
logger.Fatal().
Int("code", resp.StatusCode).
Msg("Health seems to be in bad state")
}
logger.Debug().
Int("code", resp.StatusCode).
Msg("Health got a good state")
return nil
},
}
}
@@ -8,11 +8,11 @@ import (
accountsmsg "github.com/owncloud/ocis/protogen/gen/ocis/messages/accounts/v0"
accountssvc "github.com/owncloud/ocis/protogen/gen/ocis/services/accounts/v0"
"github.com/owncloud/ocis/accounts/pkg/flagset"
"github.com/owncloud/ocis/extensions/accounts/pkg/flagset"
"github.com/asim/go-micro/plugins/client/grpc/v4"
tw "github.com/olekukonko/tablewriter"
"github.com/owncloud/ocis/accounts/pkg/config"
"github.com/owncloud/ocis/extensions/accounts/pkg/config"
"github.com/urfave/cli/v2"
)
@@ -8,11 +8,11 @@ import (
accountsmsg "github.com/owncloud/ocis/protogen/gen/ocis/messages/accounts/v0"
accountssvc "github.com/owncloud/ocis/protogen/gen/ocis/services/accounts/v0"
"github.com/owncloud/ocis/accounts/pkg/flagset"
"github.com/owncloud/ocis/extensions/accounts/pkg/flagset"
"github.com/asim/go-micro/plugins/client/grpc/v4"
tw "github.com/olekukonko/tablewriter"
"github.com/owncloud/ocis/accounts/pkg/config"
"github.com/owncloud/ocis/extensions/accounts/pkg/config"
"github.com/urfave/cli/v2"
)
@@ -7,7 +7,7 @@ import (
accountssvc "github.com/owncloud/ocis/protogen/gen/ocis/services/accounts/v0"
"github.com/asim/go-micro/plugins/client/grpc/v4"
"github.com/owncloud/ocis/accounts/pkg/config"
"github.com/owncloud/ocis/extensions/accounts/pkg/config"
"github.com/urfave/cli/v2"
merrors "go-micro.dev/v4/errors"
)
@@ -6,10 +6,10 @@ import (
accountssvc "github.com/owncloud/ocis/protogen/gen/ocis/services/accounts/v0"
"github.com/owncloud/ocis/accounts/pkg/flagset"
"github.com/owncloud/ocis/extensions/accounts/pkg/flagset"
"github.com/asim/go-micro/plugins/client/grpc/v4"
"github.com/owncloud/ocis/accounts/pkg/config"
"github.com/owncloud/ocis/extensions/accounts/pkg/config"
"github.com/urfave/cli/v2"
)
@@ -4,7 +4,7 @@ import (
"context"
"os"
"github.com/owncloud/ocis/accounts/pkg/config"
"github.com/owncloud/ocis/extensions/accounts/pkg/config"
"github.com/owncloud/ocis/ocis-pkg/clihelper"
ociscfg "github.com/owncloud/ocis/ocis-pkg/config"
"github.com/thejerf/suture/v4"
@@ -5,15 +5,15 @@ import (
"fmt"
"github.com/oklog/run"
"github.com/owncloud/ocis/accounts/pkg/config"
"github.com/owncloud/ocis/accounts/pkg/config/parser"
"github.com/owncloud/ocis/accounts/pkg/logging"
"github.com/owncloud/ocis/accounts/pkg/metrics"
"github.com/owncloud/ocis/accounts/pkg/server/debug"
"github.com/owncloud/ocis/accounts/pkg/server/grpc"
"github.com/owncloud/ocis/accounts/pkg/server/http"
svc "github.com/owncloud/ocis/accounts/pkg/service/v0"
"github.com/owncloud/ocis/accounts/pkg/tracing"
"github.com/owncloud/ocis/extensions/accounts/pkg/config"
"github.com/owncloud/ocis/extensions/accounts/pkg/config/parser"
"github.com/owncloud/ocis/extensions/accounts/pkg/logging"
"github.com/owncloud/ocis/extensions/accounts/pkg/metrics"
"github.com/owncloud/ocis/extensions/accounts/pkg/server/debug"
"github.com/owncloud/ocis/extensions/accounts/pkg/server/grpc"
"github.com/owncloud/ocis/extensions/accounts/pkg/server/http"
svc "github.com/owncloud/ocis/extensions/accounts/pkg/service/v0"
"github.com/owncloud/ocis/extensions/accounts/pkg/tracing"
"github.com/owncloud/ocis/ocis-pkg/version"
"github.com/urfave/cli/v2"
)
@@ -7,10 +7,10 @@ import (
accountsmsg "github.com/owncloud/ocis/protogen/gen/ocis/messages/accounts/v0"
accountssvc "github.com/owncloud/ocis/protogen/gen/ocis/services/accounts/v0"
"github.com/owncloud/ocis/accounts/pkg/flagset"
"github.com/owncloud/ocis/extensions/accounts/pkg/flagset"
"github.com/asim/go-micro/plugins/client/grpc/v4"
"github.com/owncloud/ocis/accounts/pkg/config"
"github.com/owncloud/ocis/extensions/accounts/pkg/config"
"github.com/urfave/cli/v2"
"google.golang.org/genproto/protobuf/field_mask"
)
@@ -8,7 +8,7 @@ import (
"github.com/owncloud/ocis/ocis-pkg/version"
tw "github.com/olekukonko/tablewriter"
"github.com/owncloud/ocis/settings/pkg/config"
"github.com/owncloud/ocis/extensions/accounts/pkg/config"
"github.com/urfave/cli/v2"
)
@@ -4,7 +4,7 @@ import (
"path"
"strings"
"github.com/owncloud/ocis/accounts/pkg/config"
"github.com/owncloud/ocis/extensions/accounts/pkg/config"
"github.com/owncloud/ocis/ocis-pkg/config/defaults"
)
@@ -0,0 +1,33 @@
package parser
import (
"errors"
"github.com/owncloud/ocis/extensions/accounts/pkg/config"
defaults "github.com/owncloud/ocis/extensions/accounts/pkg/config/defaults"
ociscfg "github.com/owncloud/ocis/ocis-pkg/config"
"github.com/owncloud/ocis/ocis-pkg/config/envdecode"
)
// ParseConfig loads accounts configuration from known paths.
func ParseConfig(cfg *config.Config) error {
_, err := ociscfg.BindSourcesToStructs(cfg.Service.Name, cfg)
if err != nil {
return err
}
defaults.EnsureDefaults(cfg)
// load all env variables relevant to the config in the current context.
if err := envdecode.Decode(cfg); err != nil {
// no environment variable set for this config is an expected "error"
if !errors.Is(err, envdecode.ErrNoTargetFieldsAreSet) {
return err
}
}
defaults.Sanitize(cfg)
return nil
}
@@ -3,7 +3,7 @@ package flagset
import (
accountsmsg "github.com/owncloud/ocis/protogen/gen/ocis/messages/accounts/v0"
"github.com/owncloud/ocis/accounts/pkg/config"
"github.com/owncloud/ocis/extensions/accounts/pkg/config"
"github.com/owncloud/ocis/ocis-pkg/flags"
"github.com/urfave/cli/v2"
)
@@ -0,0 +1,17 @@
package logging
import (
"github.com/owncloud/ocis/extensions/accounts/pkg/config"
"github.com/owncloud/ocis/ocis-pkg/log"
)
// LoggerFromConfig initializes a service-specific logger instance.
func Configure(name string, cfg *config.Log) log.Logger {
return log.NewLogger(
log.Name(name),
log.Level(cfg.Level),
log.Pretty(cfg.Pretty),
log.Color(cfg.Color),
log.File(cfg.File),
)
}
@@ -0,0 +1,50 @@
package debug
import (
"context"
"github.com/owncloud/ocis/extensions/accounts/pkg/config"
"github.com/owncloud/ocis/ocis-pkg/log"
)
// Option defines a single option function.
type Option func(o *Options)
// Options defines the available options for this package.
type Options struct {
Logger log.Logger
Context context.Context
Config *config.Config
}
// newOptions initializes the available default options.
func newOptions(opts ...Option) Options {
opt := Options{}
for _, o := range opts {
o(&opt)
}
return opt
}
// Logger provides a function to set the logger option.
func Logger(val log.Logger) Option {
return func(o *Options) {
o.Logger = val
}
}
// Context provides a function to set the context option.
func Context(val context.Context) Option {
return func(o *Options) {
o.Context = val
}
}
// Config provides a function to set the config option.
func Config(val *config.Config) Option {
return func(o *Options) {
o.Config = val
}
}
@@ -4,9 +4,9 @@ import (
"io"
"net/http"
"github.com/owncloud/ocis/extensions/accounts/pkg/config"
"github.com/owncloud/ocis/ocis-pkg/service/debug"
"github.com/owncloud/ocis/ocis-pkg/version"
"github.com/owncloud/ocis/settings/pkg/config"
)
// Server initializes the debug service and server.
@@ -3,9 +3,9 @@ package grpc
import (
"context"
"github.com/owncloud/ocis/accounts/pkg/config"
"github.com/owncloud/ocis/accounts/pkg/metrics"
svc "github.com/owncloud/ocis/accounts/pkg/service/v0"
"github.com/owncloud/ocis/extensions/accounts/pkg/config"
"github.com/owncloud/ocis/extensions/accounts/pkg/metrics"
svc "github.com/owncloud/ocis/extensions/accounts/pkg/service/v0"
"github.com/owncloud/ocis/ocis-pkg/log"
"github.com/urfave/cli/v2"
)
@@ -15,13 +15,13 @@ type Option func(o *Options)
// Options defines the available options for this package.
type Options struct {
Name string
Logger log.Logger
Context context.Context
Config *config.Config
Metrics *metrics.Metrics
Flags []cli.Flag
Handler *svc.Service
Name string
Logger log.Logger
Context context.Context
Config *config.Config
Metrics *metrics.Metrics
Flags []cli.Flag
Handler *svc.Service
}
// newOptions initializes the available default options.
@@ -3,9 +3,9 @@ package http
import (
"context"
"github.com/owncloud/ocis/accounts/pkg/config"
"github.com/owncloud/ocis/accounts/pkg/metrics"
svc "github.com/owncloud/ocis/accounts/pkg/service/v0"
"github.com/owncloud/ocis/extensions/accounts/pkg/config"
"github.com/owncloud/ocis/extensions/accounts/pkg/metrics"
svc "github.com/owncloud/ocis/extensions/accounts/pkg/service/v0"
"github.com/owncloud/ocis/ocis-pkg/log"
"github.com/urfave/cli/v2"
)
@@ -15,13 +15,13 @@ type Option func(o *Options)
// Options defines the available options for this package.
type Options struct {
Name string
Logger log.Logger
Context context.Context
Config *config.Config
Metrics *metrics.Metrics
Flags []cli.Flag
Handler *svc.Service
Name string
Logger log.Logger
Context context.Context
Config *config.Config
Metrics *metrics.Metrics
Flags []cli.Flag
Handler *svc.Service
}
// newOptions initializes the available default options.
@@ -5,7 +5,7 @@ import (
"github.com/go-chi/chi/v5"
chimiddleware "github.com/go-chi/chi/v5/middleware"
"github.com/owncloud/ocis/accounts/pkg/assets"
"github.com/owncloud/ocis/extensions/accounts/pkg/assets"
"github.com/owncloud/ocis/ocis-pkg/account"
"github.com/owncloud/ocis/ocis-pkg/cors"
"github.com/owncloud/ocis/ocis-pkg/middleware"
@@ -22,14 +22,14 @@ import (
"github.com/gofrs/uuid"
"github.com/golang/protobuf/ptypes/empty"
fieldmask_utils "github.com/mennanov/fieldmask-utils"
"github.com/owncloud/ocis/accounts/pkg/storage"
accTracing "github.com/owncloud/ocis/accounts/pkg/tracing"
"github.com/owncloud/ocis/extensions/accounts/pkg/storage"
accTracing "github.com/owncloud/ocis/extensions/accounts/pkg/tracing"
"github.com/owncloud/ocis/ocis-pkg/log"
"github.com/owncloud/ocis/ocis-pkg/middleware"
"github.com/owncloud/ocis/ocis-pkg/roles"
"github.com/owncloud/ocis/ocis-pkg/sync"
settingssvc "github.com/owncloud/ocis/protogen/gen/ocis/services/settings/v0"
settings_svc "github.com/owncloud/ocis/settings/pkg/service/v0"
settings_svc "github.com/owncloud/ocis/extensions/settings/pkg/service/v0"
"github.com/rs/zerolog"
merrors "go-micro.dev/v4/errors"
"go-micro.dev/v4/metadata"
@@ -13,13 +13,13 @@ import (
accountssvc "github.com/owncloud/ocis/protogen/gen/ocis/services/accounts/v0"
"github.com/golang/protobuf/ptypes/empty"
config "github.com/owncloud/ocis/accounts/pkg/config/defaults"
config "github.com/owncloud/ocis/extensions/accounts/pkg/config/defaults"
ssvc "github.com/owncloud/ocis/extensions/settings/pkg/service/v0"
olog "github.com/owncloud/ocis/ocis-pkg/log"
"github.com/owncloud/ocis/ocis-pkg/middleware"
"github.com/owncloud/ocis/ocis-pkg/roles"
settingsmsg "github.com/owncloud/ocis/protogen/gen/ocis/messages/settings/v0"
settingssvc "github.com/owncloud/ocis/protogen/gen/ocis/services/settings/v0"
ssvc "github.com/owncloud/ocis/settings/pkg/service/v0"
"github.com/stretchr/testify/assert"
"go-micro.dev/v4/client"
merrors "go-micro.dev/v4/errors"
@@ -10,7 +10,7 @@ import (
"github.com/gofrs/uuid"
"github.com/golang/protobuf/ptypes/empty"
"github.com/owncloud/ocis/accounts/pkg/storage"
"github.com/owncloud/ocis/extensions/accounts/pkg/storage"
merrors "go-micro.dev/v4/errors"
p "google.golang.org/protobuf/proto"
)
@@ -7,7 +7,7 @@ import (
accountsmsg "github.com/owncloud/ocis/protogen/gen/ocis/messages/accounts/v0"
accountssvc "github.com/owncloud/ocis/protogen/gen/ocis/services/accounts/v0"
"github.com/owncloud/ocis/accounts/pkg/storage"
"github.com/owncloud/ocis/extensions/accounts/pkg/storage"
"github.com/owncloud/ocis/ocis-pkg/indexer"
"github.com/owncloud/ocis/ocis-pkg/indexer/config"
@@ -1,7 +1,7 @@
package service
import (
"github.com/owncloud/ocis/accounts/pkg/config"
"github.com/owncloud/ocis/extensions/accounts/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"
@@ -5,10 +5,10 @@ import (
"github.com/owncloud/ocis/ocis-pkg/service/grpc"
ssvc "github.com/owncloud/ocis/extensions/settings/pkg/service/v0"
olog "github.com/owncloud/ocis/ocis-pkg/log"
settingsmsg "github.com/owncloud/ocis/protogen/gen/ocis/messages/settings/v0"
settingssvc "github.com/owncloud/ocis/protogen/gen/ocis/services/settings/v0"
ssvc "github.com/owncloud/ocis/settings/pkg/service/v0"
)
const (
@@ -13,12 +13,12 @@ import (
"github.com/owncloud/ocis/ocis-pkg/service/grpc"
"github.com/owncloud/ocis/accounts/pkg/storage"
"github.com/owncloud/ocis/extensions/accounts/pkg/storage"
"github.com/owncloud/ocis/ocis-pkg/indexer"
idxcfg "github.com/owncloud/ocis/ocis-pkg/indexer/config"
idxerrs "github.com/owncloud/ocis/ocis-pkg/indexer/errors"
"github.com/owncloud/ocis/accounts/pkg/config"
"github.com/owncloud/ocis/extensions/accounts/pkg/config"
"github.com/owncloud/ocis/ocis-pkg/log"
oreg "github.com/owncloud/ocis/ocis-pkg/registry"
"github.com/owncloud/ocis/ocis-pkg/roles"
@@ -15,7 +15,7 @@ import (
"github.com/cs3org/reva/v2/pkg/token"
"github.com/cs3org/reva/v2/pkg/token/manager/jwt"
"github.com/cs3org/reva/v2/pkg/utils"
"github.com/owncloud/ocis/accounts/pkg/config"
"github.com/owncloud/ocis/extensions/accounts/pkg/config"
olog "github.com/owncloud/ocis/ocis-pkg/log"
metadatastorage "github.com/owncloud/ocis/ocis-pkg/metadata_storage"
accountsmsg "github.com/owncloud/ocis/protogen/gen/ocis/messages/accounts/v0"
@@ -10,7 +10,7 @@ import (
accountsmsg "github.com/owncloud/ocis/protogen/gen/ocis/messages/accounts/v0"
"github.com/owncloud/ocis/accounts/pkg/config"
"github.com/owncloud/ocis/extensions/accounts/pkg/config"
olog "github.com/owncloud/ocis/ocis-pkg/log"
)
@@ -1,8 +1,8 @@
package tracing
import (
"github.com/owncloud/ocis/extensions/accounts/pkg/config"
pkgtrace "github.com/owncloud/ocis/ocis-pkg/tracing"
"github.com/owncloud/ocis/proxy/pkg/config"
"go.opentelemetry.io/otel/trace"
)
+6 -6
View File
@@ -1,27 +1,27 @@
SHELL := bash
NAME := audit
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: # CI runs ci-node-generate automatically before this target
+14
View File
@@ -0,0 +1,14 @@
package main
import (
"os"
"github.com/owncloud/ocis/extensions/audit/pkg/command"
"github.com/owncloud/ocis/extensions/audit/pkg/config/defaults"
)
func main() {
if err := command.Execute(defaults.DefaultConfig()); err != nil {
os.Exit(1)
}
}
@@ -1,7 +1,7 @@
package command
import (
"github.com/owncloud/ocis/notifications/pkg/config"
"github.com/owncloud/ocis/extensions/audit/pkg/config"
"github.com/urfave/cli/v2"
)
@@ -4,7 +4,7 @@ import (
"context"
"os"
"github.com/owncloud/ocis/audit/pkg/config"
"github.com/owncloud/ocis/extensions/audit/pkg/config"
"github.com/owncloud/ocis/ocis-pkg/clihelper"
ociscfg "github.com/owncloud/ocis/ocis-pkg/config"
"github.com/thejerf/suture/v4"
@@ -7,11 +7,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/audit/pkg/config"
"github.com/owncloud/ocis/audit/pkg/config/parser"
"github.com/owncloud/ocis/audit/pkg/logging"
svc "github.com/owncloud/ocis/audit/pkg/service"
"github.com/owncloud/ocis/audit/pkg/types"
"github.com/owncloud/ocis/extensions/audit/pkg/config"
"github.com/owncloud/ocis/extensions/audit/pkg/config/parser"
"github.com/owncloud/ocis/extensions/audit/pkg/logging"
svc "github.com/owncloud/ocis/extensions/audit/pkg/service"
"github.com/owncloud/ocis/extensions/audit/pkg/types"
"github.com/urfave/cli/v2"
)
@@ -1,7 +1,7 @@
package command
import (
"github.com/owncloud/ocis/nats/pkg/config"
"github.com/owncloud/ocis/extensions/audit/pkg/config"
"github.com/urfave/cli/v2"
)

Some files were not shown because too many files have changed in this diff Show More