Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update ocis packages and imports to V2 #3678

Merged
merged 4 commits into from
May 4, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
5 changes: 5 additions & 0 deletions changelog/unreleased/bump-ocis-package-v2.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
Change: Update ocis packages and imports to V2

This needs to be done in preparation for the major version bump in ocis.

https://github.com/owncloud/ocis/pull/3678
4 changes: 2 additions & 2 deletions docs/helpers/adoc-generator.go.tmpl
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ if err != nil {
log.Fatal(err)
}
replacer := strings.NewReplacer(
"github.com/owncloud/ocis/extensions/", "",
"github.com/owncloud/ocis/v2/extensions/", "",
"/pkg/config/defaults", "",
)
var fields []ConfigField
Expand Down Expand Up @@ -95,7 +95,7 @@ func GetAnnotatedVariables(s interface{}) []ConfigField {
// and this should not be an issue then
if !value.IsZero() && value.Elem().CanInterface() {
fields = append(fields, GetAnnotatedVariables(value.Elem().Interface())...)
}
}
case reflect.Struct:
fields = append(fields, GetAnnotatedVariables(value.Interface())...)
}
Expand Down
2 changes: 1 addition & 1 deletion docs/helpers/configenvextractor.go
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ func main() {
log.Fatal(err)
}
replacer := strings.NewReplacer(
"../../", "github.com/owncloud/ocis/",
"../../", "github.com/owncloud/ocis/v2/",
"/defaultconfig.go", "",
)
for i := range paths {
Expand Down
4 changes: 2 additions & 2 deletions docs/helpers/environment-variable-docs-generator.go.tmpl
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ if err != nil {
log.Fatal(err)
}
replacer := strings.NewReplacer(
"github.com/owncloud/ocis/extensions/", "",
"github.com/owncloud/ocis/v2/extensions/", "",
"/pkg/config/defaults", "",
)
var fields []ConfigField
Expand Down Expand Up @@ -84,7 +84,7 @@ func GetAnnotatedVariables(s interface{}) []ConfigField {
// and this should not be an issue then
if !value.IsZero() && value.Elem().CanInterface() {
fields = append(fields, GetAnnotatedVariables(value.Elem().Interface())...)
}
}
case reflect.Struct:
fields = append(fields, GetAnnotatedVariables(value.Interface())...)
}
Expand Down
2 changes: 1 addition & 1 deletion docs/helpers/example-config-generator.go.tmpl
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ import (

func main() {
replacer := strings.NewReplacer(
"github.com/owncloud/ocis/extensions/", "",
"github.com/owncloud/ocis/v2/extensions/", "",
"/pkg/config/defaults", "",
)
cfg := map[string]string{
Expand Down
4 changes: 2 additions & 2 deletions extensions/accounts/cmd/accounts/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@ package main
import (
"os"

"github.com/owncloud/ocis/extensions/accounts/pkg/command"
"github.com/owncloud/ocis/extensions/accounts/pkg/config/defaults"
"github.com/owncloud/ocis/v2/extensions/accounts/pkg/command"
"github.com/owncloud/ocis/v2/extensions/accounts/pkg/config/defaults"
)

func main() {
Expand Down
8 changes: 4 additions & 4 deletions extensions/accounts/pkg/assets/option.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,10 @@ package assets
import (
"net/http"

"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"
"github.com/owncloud/ocis/v2/extensions/accounts"
"github.com/owncloud/ocis/v2/extensions/accounts/pkg/config"
"github.com/owncloud/ocis/v2/ocis-pkg/assetsfs"
"github.com/owncloud/ocis/v2/ocis-pkg/log"
)

// New returns a new http filesystem to serve assets.
Expand Down
8 changes: 4 additions & 4 deletions extensions/accounts/pkg/command/add_account.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,12 @@ package command
import (
"fmt"

accountsmsg "github.com/owncloud/ocis/protogen/gen/ocis/messages/accounts/v0"
accountssvc "github.com/owncloud/ocis/protogen/gen/ocis/services/accounts/v0"
accountsmsg "github.com/owncloud/ocis/v2/protogen/gen/ocis/messages/accounts/v0"
accountssvc "github.com/owncloud/ocis/v2/protogen/gen/ocis/services/accounts/v0"

"github.com/go-micro/plugins/v4/client/grpc"
"github.com/owncloud/ocis/extensions/accounts/pkg/config"
"github.com/owncloud/ocis/extensions/accounts/pkg/flagset"
"github.com/owncloud/ocis/v2/extensions/accounts/pkg/config"
"github.com/owncloud/ocis/v2/extensions/accounts/pkg/flagset"
"github.com/urfave/cli/v2"
)

Expand Down
6 changes: 3 additions & 3 deletions extensions/accounts/pkg/command/health.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,9 @@ 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/owncloud/ocis/v2/extensions/accounts/pkg/config"
"github.com/owncloud/ocis/v2/extensions/accounts/pkg/config/parser"
"github.com/owncloud/ocis/v2/extensions/accounts/pkg/logging"
"github.com/urfave/cli/v2"
)

Expand Down
8 changes: 4 additions & 4 deletions extensions/accounts/pkg/command/inspect_account.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,14 +5,14 @@ import (
"os"
"strconv"

accountsmsg "github.com/owncloud/ocis/protogen/gen/ocis/messages/accounts/v0"
accountssvc "github.com/owncloud/ocis/protogen/gen/ocis/services/accounts/v0"
accountsmsg "github.com/owncloud/ocis/v2/protogen/gen/ocis/messages/accounts/v0"
accountssvc "github.com/owncloud/ocis/v2/protogen/gen/ocis/services/accounts/v0"

"github.com/owncloud/ocis/extensions/accounts/pkg/flagset"
"github.com/owncloud/ocis/v2/extensions/accounts/pkg/flagset"

"github.com/go-micro/plugins/v4/client/grpc"
tw "github.com/olekukonko/tablewriter"
"github.com/owncloud/ocis/extensions/accounts/pkg/config"
"github.com/owncloud/ocis/v2/extensions/accounts/pkg/config"
"github.com/urfave/cli/v2"
)

Expand Down
8 changes: 4 additions & 4 deletions extensions/accounts/pkg/command/list_accounts.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,14 +5,14 @@ import (
"os"
"strconv"

accountsmsg "github.com/owncloud/ocis/protogen/gen/ocis/messages/accounts/v0"
accountssvc "github.com/owncloud/ocis/protogen/gen/ocis/services/accounts/v0"
accountsmsg "github.com/owncloud/ocis/v2/protogen/gen/ocis/messages/accounts/v0"
accountssvc "github.com/owncloud/ocis/v2/protogen/gen/ocis/services/accounts/v0"

"github.com/owncloud/ocis/extensions/accounts/pkg/flagset"
"github.com/owncloud/ocis/v2/extensions/accounts/pkg/flagset"

"github.com/go-micro/plugins/v4/client/grpc"
tw "github.com/olekukonko/tablewriter"
"github.com/owncloud/ocis/extensions/accounts/pkg/config"
"github.com/owncloud/ocis/v2/extensions/accounts/pkg/config"
"github.com/urfave/cli/v2"
)

Expand Down
4 changes: 2 additions & 2 deletions extensions/accounts/pkg/command/rebuild_index.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,10 @@ import (
"context"
"fmt"

accountssvc "github.com/owncloud/ocis/protogen/gen/ocis/services/accounts/v0"
accountssvc "github.com/owncloud/ocis/v2/protogen/gen/ocis/services/accounts/v0"

"github.com/go-micro/plugins/v4/client/grpc"
"github.com/owncloud/ocis/extensions/accounts/pkg/config"
"github.com/owncloud/ocis/v2/extensions/accounts/pkg/config"
"github.com/urfave/cli/v2"
merrors "go-micro.dev/v4/errors"
)
Expand Down
6 changes: 3 additions & 3 deletions extensions/accounts/pkg/command/remove_account.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,12 @@ import (
"fmt"
"os"

accountssvc "github.com/owncloud/ocis/protogen/gen/ocis/services/accounts/v0"
accountssvc "github.com/owncloud/ocis/v2/protogen/gen/ocis/services/accounts/v0"

"github.com/owncloud/ocis/extensions/accounts/pkg/flagset"
"github.com/owncloud/ocis/v2/extensions/accounts/pkg/flagset"

"github.com/go-micro/plugins/v4/client/grpc"
"github.com/owncloud/ocis/extensions/accounts/pkg/config"
"github.com/owncloud/ocis/v2/extensions/accounts/pkg/config"
"github.com/urfave/cli/v2"
)

Expand Down
6 changes: 3 additions & 3 deletions extensions/accounts/pkg/command/root.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,9 @@ import (
"context"
"os"

"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/owncloud/ocis/v2/extensions/accounts/pkg/config"
"github.com/owncloud/ocis/v2/ocis-pkg/clihelper"
ociscfg "github.com/owncloud/ocis/v2/ocis-pkg/config"
"github.com/thejerf/suture/v4"
"github.com/urfave/cli/v2"
)
Expand Down
20 changes: 10 additions & 10 deletions extensions/accounts/pkg/command/server.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,16 +5,16 @@ import (
"fmt"

"github.com/oklog/run"
"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/owncloud/ocis/v2/extensions/accounts/pkg/config"
"github.com/owncloud/ocis/v2/extensions/accounts/pkg/config/parser"
"github.com/owncloud/ocis/v2/extensions/accounts/pkg/logging"
"github.com/owncloud/ocis/v2/extensions/accounts/pkg/metrics"
"github.com/owncloud/ocis/v2/extensions/accounts/pkg/server/debug"
"github.com/owncloud/ocis/v2/extensions/accounts/pkg/server/grpc"
"github.com/owncloud/ocis/v2/extensions/accounts/pkg/server/http"
svc "github.com/owncloud/ocis/v2/extensions/accounts/pkg/service/v0"
"github.com/owncloud/ocis/v2/extensions/accounts/pkg/tracing"
"github.com/owncloud/ocis/v2/ocis-pkg/version"
"github.com/urfave/cli/v2"
)

Expand Down
8 changes: 4 additions & 4 deletions extensions/accounts/pkg/command/update_account.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,13 @@ import (
"errors"
"fmt"

accountsmsg "github.com/owncloud/ocis/protogen/gen/ocis/messages/accounts/v0"
accountssvc "github.com/owncloud/ocis/protogen/gen/ocis/services/accounts/v0"
accountsmsg "github.com/owncloud/ocis/v2/protogen/gen/ocis/messages/accounts/v0"
accountssvc "github.com/owncloud/ocis/v2/protogen/gen/ocis/services/accounts/v0"

"github.com/owncloud/ocis/extensions/accounts/pkg/flagset"
"github.com/owncloud/ocis/v2/extensions/accounts/pkg/flagset"

"github.com/go-micro/plugins/v4/client/grpc"
"github.com/owncloud/ocis/extensions/accounts/pkg/config"
"github.com/owncloud/ocis/v2/extensions/accounts/pkg/config"
"github.com/urfave/cli/v2"
"google.golang.org/genproto/protobuf/field_mask"
)
Expand Down
6 changes: 3 additions & 3 deletions extensions/accounts/pkg/command/version.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,11 @@ import (
"fmt"
"os"

"github.com/owncloud/ocis/ocis-pkg/registry"
"github.com/owncloud/ocis/ocis-pkg/version"
"github.com/owncloud/ocis/v2/ocis-pkg/registry"
"github.com/owncloud/ocis/v2/ocis-pkg/version"

tw "github.com/olekukonko/tablewriter"
"github.com/owncloud/ocis/extensions/accounts/pkg/config"
"github.com/owncloud/ocis/v2/extensions/accounts/pkg/config"
"github.com/urfave/cli/v2"
)

Expand Down
2 changes: 1 addition & 1 deletion extensions/accounts/pkg/config/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ package config
import (
"context"

"github.com/owncloud/ocis/ocis-pkg/shared"
"github.com/owncloud/ocis/v2/ocis-pkg/shared"
)

// Config combines all available configuration parts.
Expand Down
4 changes: 2 additions & 2 deletions extensions/accounts/pkg/config/defaults/defaultconfig.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@ import (
"path"
"strings"

"github.com/owncloud/ocis/extensions/accounts/pkg/config"
"github.com/owncloud/ocis/ocis-pkg/config/defaults"
"github.com/owncloud/ocis/v2/extensions/accounts/pkg/config"
"github.com/owncloud/ocis/v2/ocis-pkg/config/defaults"
)

func FullDefaultConfig() *config.Config {
Expand Down
10 changes: 5 additions & 5 deletions extensions/accounts/pkg/config/parser/parse.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,12 @@ 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/shared"
"github.com/owncloud/ocis/v2/extensions/accounts/pkg/config"
defaults "github.com/owncloud/ocis/v2/extensions/accounts/pkg/config/defaults"
ociscfg "github.com/owncloud/ocis/v2/ocis-pkg/config"
"github.com/owncloud/ocis/v2/ocis-pkg/shared"

"github.com/owncloud/ocis/ocis-pkg/config/envdecode"
"github.com/owncloud/ocis/v2/ocis-pkg/config/envdecode"
)

// ParseConfig loads configuration from known paths.
Expand Down
6 changes: 3 additions & 3 deletions extensions/accounts/pkg/flagset/flagset.go
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
package flagset

import (
accountsmsg "github.com/owncloud/ocis/protogen/gen/ocis/messages/accounts/v0"
accountsmsg "github.com/owncloud/ocis/v2/protogen/gen/ocis/messages/accounts/v0"

"github.com/owncloud/ocis/extensions/accounts/pkg/config"
"github.com/owncloud/ocis/ocis-pkg/flags"
"github.com/owncloud/ocis/v2/extensions/accounts/pkg/config"
"github.com/owncloud/ocis/v2/ocis-pkg/flags"
"github.com/urfave/cli/v2"
)

Expand Down
4 changes: 2 additions & 2 deletions extensions/accounts/pkg/logging/logging.go
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
package logging

import (
"github.com/owncloud/ocis/extensions/accounts/pkg/config"
"github.com/owncloud/ocis/ocis-pkg/log"
"github.com/owncloud/ocis/v2/extensions/accounts/pkg/config"
"github.com/owncloud/ocis/v2/ocis-pkg/log"
)

// LoggerFromConfig initializes a service-specific logger instance.
Expand Down
4 changes: 2 additions & 2 deletions extensions/accounts/pkg/server/debug/option.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@ package debug
import (
"context"

"github.com/owncloud/ocis/extensions/accounts/pkg/config"
"github.com/owncloud/ocis/ocis-pkg/log"
"github.com/owncloud/ocis/v2/extensions/accounts/pkg/config"
"github.com/owncloud/ocis/v2/ocis-pkg/log"
)

// Option defines a single option function.
Expand Down
6 changes: 3 additions & 3 deletions extensions/accounts/pkg/server/debug/server.go
Original file line number Diff line number Diff line change
Expand Up @@ -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/v2/extensions/accounts/pkg/config"
"github.com/owncloud/ocis/v2/ocis-pkg/service/debug"
"github.com/owncloud/ocis/v2/ocis-pkg/version"
)

// Server initializes the debug service and server.
Expand Down
8 changes: 4 additions & 4 deletions extensions/accounts/pkg/server/grpc/option.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,10 @@ package grpc
import (
"context"

"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/owncloud/ocis/v2/extensions/accounts/pkg/config"
"github.com/owncloud/ocis/v2/extensions/accounts/pkg/metrics"
svc "github.com/owncloud/ocis/v2/extensions/accounts/pkg/service/v0"
"github.com/owncloud/ocis/v2/ocis-pkg/log"
"github.com/urfave/cli/v2"
)

Expand Down
6 changes: 3 additions & 3 deletions extensions/accounts/pkg/server/grpc/server.go
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
package grpc

import (
accountssvc "github.com/owncloud/ocis/protogen/gen/ocis/services/accounts/v0"
accountssvc "github.com/owncloud/ocis/v2/protogen/gen/ocis/services/accounts/v0"

"github.com/owncloud/ocis/ocis-pkg/service/grpc"
"github.com/owncloud/ocis/ocis-pkg/version"
"github.com/owncloud/ocis/v2/ocis-pkg/service/grpc"
"github.com/owncloud/ocis/v2/ocis-pkg/version"
)

// Server initializes a new go-micro service ready to run
Expand Down
8 changes: 4 additions & 4 deletions extensions/accounts/pkg/server/http/option.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,10 @@ package http
import (
"context"

"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/owncloud/ocis/v2/extensions/accounts/pkg/config"
"github.com/owncloud/ocis/v2/extensions/accounts/pkg/metrics"
svc "github.com/owncloud/ocis/v2/extensions/accounts/pkg/service/v0"
"github.com/owncloud/ocis/v2/ocis-pkg/log"
"github.com/urfave/cli/v2"
)

Expand Down
Loading