refactor store
Signed-off-by: Christian Richter <crichter@owncloud.com>
This commit is contained in:
@@ -1,28 +1,28 @@
|
||||
SHELL := bash
|
||||
NAME := store
|
||||
|
||||
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 \
|
||||
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
|
||||
@@ -32,7 +32,7 @@ ci-node-generate:
|
||||
|
||||
|
||||
############ protobuf ############
|
||||
include ../.make/protobuf.mk
|
||||
include ../../.make/protobuf.mk
|
||||
|
||||
.PHONY: protobuf
|
||||
protobuf: buf-generate
|
||||
@@ -3,8 +3,8 @@ package main
|
||||
import (
|
||||
"os"
|
||||
|
||||
"github.com/owncloud/ocis/store/pkg/command"
|
||||
"github.com/owncloud/ocis/store/pkg/config/defaults"
|
||||
"github.com/owncloud/ocis/extensions/store/pkg/command"
|
||||
"github.com/owncloud/ocis/extensions/store/pkg/config/defaults"
|
||||
)
|
||||
|
||||
func main() {
|
||||
@@ -4,9 +4,9 @@ import (
|
||||
"fmt"
|
||||
"net/http"
|
||||
|
||||
"github.com/owncloud/ocis/store/pkg/config"
|
||||
"github.com/owncloud/ocis/store/pkg/config/parser"
|
||||
"github.com/owncloud/ocis/store/pkg/logging"
|
||||
"github.com/owncloud/ocis/extensions/store/pkg/config"
|
||||
"github.com/owncloud/ocis/extensions/store/pkg/config/parser"
|
||||
"github.com/owncloud/ocis/extensions/store/pkg/logging"
|
||||
"github.com/urfave/cli/v2"
|
||||
)
|
||||
|
||||
@@ -4,9 +4,9 @@ import (
|
||||
"context"
|
||||
"os"
|
||||
|
||||
"github.com/owncloud/ocis/extensions/store/pkg/config"
|
||||
"github.com/owncloud/ocis/ocis-pkg/clihelper"
|
||||
ociscfg "github.com/owncloud/ocis/ocis-pkg/config"
|
||||
"github.com/owncloud/ocis/store/pkg/config"
|
||||
"github.com/thejerf/suture/v4"
|
||||
"github.com/urfave/cli/v2"
|
||||
)
|
||||
@@ -6,14 +6,14 @@ import (
|
||||
|
||||
"github.com/oklog/run"
|
||||
|
||||
"github.com/owncloud/ocis/extensions/store/pkg/config"
|
||||
"github.com/owncloud/ocis/extensions/store/pkg/config/parser"
|
||||
"github.com/owncloud/ocis/extensions/store/pkg/logging"
|
||||
"github.com/owncloud/ocis/extensions/store/pkg/metrics"
|
||||
"github.com/owncloud/ocis/extensions/store/pkg/server/debug"
|
||||
"github.com/owncloud/ocis/extensions/store/pkg/server/grpc"
|
||||
"github.com/owncloud/ocis/extensions/store/pkg/tracing"
|
||||
"github.com/owncloud/ocis/ocis-pkg/version"
|
||||
"github.com/owncloud/ocis/store/pkg/config"
|
||||
"github.com/owncloud/ocis/store/pkg/config/parser"
|
||||
"github.com/owncloud/ocis/store/pkg/logging"
|
||||
"github.com/owncloud/ocis/store/pkg/metrics"
|
||||
"github.com/owncloud/ocis/store/pkg/server/debug"
|
||||
"github.com/owncloud/ocis/store/pkg/server/grpc"
|
||||
"github.com/owncloud/ocis/store/pkg/tracing"
|
||||
"github.com/urfave/cli/v2"
|
||||
)
|
||||
|
||||
@@ -8,7 +8,7 @@ import (
|
||||
"github.com/owncloud/ocis/ocis-pkg/version"
|
||||
|
||||
tw "github.com/olekukonko/tablewriter"
|
||||
"github.com/owncloud/ocis/store/pkg/config"
|
||||
"github.com/owncloud/ocis/extensions/store/pkg/config"
|
||||
"github.com/urfave/cli/v2"
|
||||
)
|
||||
|
||||
+1
-1
@@ -3,8 +3,8 @@ package defaults
|
||||
import (
|
||||
"path"
|
||||
|
||||
"github.com/owncloud/ocis/extensions/store/pkg/config"
|
||||
"github.com/owncloud/ocis/ocis-pkg/config/defaults"
|
||||
"github.com/owncloud/ocis/store/pkg/config"
|
||||
)
|
||||
|
||||
func FullDefaultConfig() *config.Config {
|
||||
@@ -3,9 +3,9 @@ package parser
|
||||
import (
|
||||
"errors"
|
||||
|
||||
"github.com/owncloud/ocis/extensions/store/pkg/config"
|
||||
"github.com/owncloud/ocis/extensions/store/pkg/config/defaults"
|
||||
ociscfg "github.com/owncloud/ocis/ocis-pkg/config"
|
||||
"github.com/owncloud/ocis/store/pkg/config"
|
||||
"github.com/owncloud/ocis/store/pkg/config/defaults"
|
||||
|
||||
"github.com/owncloud/ocis/ocis-pkg/config/envdecode"
|
||||
)
|
||||
@@ -1,8 +1,8 @@
|
||||
package logging
|
||||
|
||||
import (
|
||||
"github.com/owncloud/ocis/extensions/store/pkg/config"
|
||||
"github.com/owncloud/ocis/ocis-pkg/log"
|
||||
"github.com/owncloud/ocis/store/pkg/config"
|
||||
)
|
||||
|
||||
// LoggerFromConfig initializes a service-specific logger instance.
|
||||
@@ -3,8 +3,8 @@ package debug
|
||||
import (
|
||||
"context"
|
||||
|
||||
"github.com/owncloud/ocis/extensions/store/pkg/config"
|
||||
"github.com/owncloud/ocis/ocis-pkg/log"
|
||||
"github.com/owncloud/ocis/store/pkg/config"
|
||||
)
|
||||
|
||||
// Option defines a single option function.
|
||||
@@ -4,9 +4,9 @@ import (
|
||||
"io"
|
||||
"net/http"
|
||||
|
||||
"github.com/owncloud/ocis/extensions/store/pkg/config"
|
||||
"github.com/owncloud/ocis/ocis-pkg/service/debug"
|
||||
"github.com/owncloud/ocis/ocis-pkg/version"
|
||||
"github.com/owncloud/ocis/store/pkg/config"
|
||||
)
|
||||
|
||||
// Server initializes the debug service and server.
|
||||
@@ -3,9 +3,9 @@ package grpc
|
||||
import (
|
||||
"context"
|
||||
|
||||
"github.com/owncloud/ocis/extensions/store/pkg/config"
|
||||
"github.com/owncloud/ocis/extensions/store/pkg/metrics"
|
||||
"github.com/owncloud/ocis/ocis-pkg/log"
|
||||
"github.com/owncloud/ocis/store/pkg/config"
|
||||
"github.com/owncloud/ocis/store/pkg/metrics"
|
||||
"github.com/urfave/cli/v2"
|
||||
)
|
||||
|
||||
@@ -1,10 +1,10 @@
|
||||
package grpc
|
||||
|
||||
import (
|
||||
svc "github.com/owncloud/ocis/extensions/store/pkg/service/v0"
|
||||
"github.com/owncloud/ocis/ocis-pkg/service/grpc"
|
||||
"github.com/owncloud/ocis/ocis-pkg/version"
|
||||
storesvc "github.com/owncloud/ocis/protogen/gen/ocis/services/store/v0"
|
||||
svc "github.com/owncloud/ocis/store/pkg/service/v0"
|
||||
)
|
||||
|
||||
// Server initializes a new go-micro service ready to run
|
||||
@@ -1,8 +1,8 @@
|
||||
package service
|
||||
|
||||
import (
|
||||
"github.com/owncloud/ocis/extensions/store/pkg/config"
|
||||
"github.com/owncloud/ocis/ocis-pkg/log"
|
||||
"github.com/owncloud/ocis/store/pkg/config"
|
||||
)
|
||||
|
||||
// Option defines a single option function.
|
||||
@@ -9,10 +9,10 @@ import (
|
||||
|
||||
"github.com/blevesearch/bleve/v2"
|
||||
"github.com/blevesearch/bleve/v2/analysis/analyzer/keyword"
|
||||
"github.com/owncloud/ocis/extensions/store/pkg/config"
|
||||
"github.com/owncloud/ocis/ocis-pkg/log"
|
||||
storemsg "github.com/owncloud/ocis/protogen/gen/ocis/messages/store/v0"
|
||||
storesvc "github.com/owncloud/ocis/protogen/gen/ocis/services/store/v0"
|
||||
"github.com/owncloud/ocis/store/pkg/config"
|
||||
merrors "go-micro.dev/v4/errors"
|
||||
"google.golang.org/protobuf/encoding/protojson"
|
||||
)
|
||||
@@ -1,8 +1,8 @@
|
||||
package tracing
|
||||
|
||||
import (
|
||||
"github.com/owncloud/ocis/extensions/store/pkg/config"
|
||||
pkgtrace "github.com/owncloud/ocis/ocis-pkg/tracing"
|
||||
"github.com/owncloud/ocis/store/pkg/config"
|
||||
"go.opentelemetry.io/otel/trace"
|
||||
)
|
||||
|
||||
@@ -16,7 +16,7 @@ import (
|
||||
proxy "github.com/owncloud/ocis/extensions/proxy/pkg/config"
|
||||
settings "github.com/owncloud/ocis/extensions/settings/pkg/config"
|
||||
storage "github.com/owncloud/ocis/extensions/storage/pkg/config"
|
||||
store "github.com/owncloud/ocis/store/pkg/config"
|
||||
store "github.com/owncloud/ocis/extensions/store/pkg/config"
|
||||
thumbnails "github.com/owncloud/ocis/thumbnails/pkg/config"
|
||||
web "github.com/owncloud/ocis/web/pkg/config"
|
||||
webdav "github.com/owncloud/ocis/webdav/pkg/config"
|
||||
|
||||
@@ -14,7 +14,7 @@ import (
|
||||
proxy "github.com/owncloud/ocis/extensions/proxy/pkg/config/defaults"
|
||||
settings "github.com/owncloud/ocis/extensions/settings/pkg/config/defaults"
|
||||
storage "github.com/owncloud/ocis/extensions/storage/pkg/config/defaults"
|
||||
store "github.com/owncloud/ocis/store/pkg/config/defaults"
|
||||
store "github.com/owncloud/ocis/extensions/store/pkg/config/defaults"
|
||||
thumbnails "github.com/owncloud/ocis/thumbnails/pkg/config/defaults"
|
||||
web "github.com/owncloud/ocis/web/pkg/config/defaults"
|
||||
webdav "github.com/owncloud/ocis/webdav/pkg/config/defaults"
|
||||
|
||||
@@ -1,10 +1,10 @@
|
||||
package command
|
||||
|
||||
import (
|
||||
"github.com/owncloud/ocis/extensions/store/pkg/command"
|
||||
"github.com/owncloud/ocis/ocis-pkg/config"
|
||||
"github.com/owncloud/ocis/ocis-pkg/config/parser"
|
||||
"github.com/owncloud/ocis/ocis/pkg/register"
|
||||
"github.com/owncloud/ocis/store/pkg/command"
|
||||
"github.com/urfave/cli/v2"
|
||||
)
|
||||
|
||||
|
||||
@@ -31,10 +31,10 @@ import (
|
||||
proxy "github.com/owncloud/ocis/extensions/proxy/pkg/command"
|
||||
settings "github.com/owncloud/ocis/extensions/settings/pkg/command"
|
||||
storage "github.com/owncloud/ocis/extensions/storage/pkg/command"
|
||||
store "github.com/owncloud/ocis/extensions/store/pkg/command"
|
||||
"github.com/owncloud/ocis/ocis-pkg/config"
|
||||
ociscfg "github.com/owncloud/ocis/ocis-pkg/config"
|
||||
"github.com/owncloud/ocis/ocis-pkg/log"
|
||||
store "github.com/owncloud/ocis/store/pkg/command"
|
||||
thumbnails "github.com/owncloud/ocis/thumbnails/pkg/command"
|
||||
web "github.com/owncloud/ocis/web/pkg/command"
|
||||
webdav "github.com/owncloud/ocis/webdav/pkg/command"
|
||||
|
||||
Reference in New Issue
Block a user