Skip to content

Commit

Permalink
fix: Ensure APIs can be used by other Go modules
Browse files Browse the repository at this point in the history
The go module versioning rules states that packages with a major version
greater than v1 must have a major version suffix
(https://go.dev/ref/mod#module-path)

Since the latest versions of this project are v4, the module name must
end in `/v4`. Otherwise,

- regular 'go get' will fetch v0.2.3 of this repo
- 'go get ...@v4.18.1' will complain that the module name is invalid.

Signed-off-by: Manuel Hutter <manuel@hutter.io>
  • Loading branch information
mhutter committed Aug 10, 2023
1 parent 8ac2bf6 commit cc5d7e2
Show file tree
Hide file tree
Showing 103 changed files with 201 additions and 201 deletions.
4 changes: 2 additions & 2 deletions apis/appcat/v1/generated.pb.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion apis/exoscale/v1/dbaas_exoscale_kafka.go
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package v1

import (
"github.com/vshn/appcat/apis/v1"
"github.com/vshn/appcat/v4/apis/v1"
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
"k8s.io/apimachinery/pkg/runtime"
)
Expand Down
2 changes: 1 addition & 1 deletion apis/exoscale/v1/dbaas_exoscale_mysql.go
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package v1

import (
"github.com/vshn/appcat/apis/v1"
"github.com/vshn/appcat/v4/apis/v1"
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
"k8s.io/apimachinery/pkg/runtime"
)
Expand Down
2 changes: 1 addition & 1 deletion apis/exoscale/v1/dbaas_exoscale_opensearch.go
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package v1

import (
v1 "github.com/vshn/appcat/apis/v1"
v1 "github.com/vshn/appcat/v4/apis/v1"
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
"k8s.io/apimachinery/pkg/runtime"
)
Expand Down
2 changes: 1 addition & 1 deletion apis/exoscale/v1/dbaas_exoscale_postgresql.go
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package v1

import (
v1 "github.com/vshn/appcat/apis/v1"
v1 "github.com/vshn/appcat/v4/apis/v1"
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
"k8s.io/apimachinery/pkg/runtime"
)
Expand Down
2 changes: 1 addition & 1 deletion apis/exoscale/v1/dbaas_exoscale_redis.go
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package v1

import (
v1 "github.com/vshn/appcat/apis/v1"
v1 "github.com/vshn/appcat/v4/apis/v1"
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
"k8s.io/apimachinery/pkg/runtime"
)
Expand Down
2 changes: 1 addition & 1 deletion apis/exoscale/v1/zz_generated.deepcopy.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion apis/vshn/v1/dbaas_vshn_postgresql.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ package v1

import (
alertmanagerv1alpha1 "github.com/prometheus-operator/prometheus-operator/pkg/apis/monitoring/v1alpha1"
v1 "github.com/vshn/appcat/apis/v1"
v1 "github.com/vshn/appcat/v4/apis/v1"
corev1 "k8s.io/api/core/v1"
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
"k8s.io/apimachinery/pkg/runtime"
Expand Down
2 changes: 1 addition & 1 deletion apis/vshn/v1/dbaas_vshn_redis.go
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package v1

import (
v1 "github.com/vshn/appcat/apis/v1"
v1 "github.com/vshn/appcat/v4/apis/v1"
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
)

Expand Down
2 changes: 1 addition & 1 deletion apis/vshn/v1/zz_generated.deepcopy.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 4 additions & 4 deletions cmd/apiserver.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,10 @@ import (

"github.com/spf13/cobra"
"github.com/spf13/viper"
appcatv1 "github.com/vshn/appcat/apis/appcat/v1"
"github.com/vshn/appcat/pkg/apiserver/appcat"
vshnpostgres "github.com/vshn/appcat/pkg/apiserver/vshn/postgres"
vshnredis "github.com/vshn/appcat/pkg/apiserver/vshn/redis"
appcatv1 "github.com/vshn/appcat/v4/apis/appcat/v1"
"github.com/vshn/appcat/v4/pkg/apiserver/appcat"
vshnpostgres "github.com/vshn/appcat/v4/pkg/apiserver/vshn/postgres"
vshnredis "github.com/vshn/appcat/v4/pkg/apiserver/vshn/redis"
"sigs.k8s.io/apiserver-runtime/pkg/builder"
)

Expand Down
4 changes: 2 additions & 2 deletions cmd/controller.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@ package cmd
import (
"github.com/go-logr/logr"
"github.com/spf13/cobra"
"github.com/vshn/appcat/pkg"
"github.com/vshn/appcat/pkg/controller/postgres"
"github.com/vshn/appcat/v4/pkg"
"github.com/vshn/appcat/v4/pkg/controller/postgres"
"k8s.io/apimachinery/pkg/runtime"
ctrl "sigs.k8s.io/controller-runtime"
"sigs.k8s.io/controller-runtime/pkg/healthz"
Expand Down
12 changes: 6 additions & 6 deletions cmd/grpc.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,12 +8,12 @@ import (
pb "github.com/crossplane/crossplane/apis/apiextensions/fn/proto/v1alpha1"
"github.com/go-logr/logr"
"github.com/spf13/cobra"
"github.com/vshn/appcat/pkg"
"github.com/vshn/appcat/pkg/comp-functions/functions/helper"
"github.com/vshn/appcat/pkg/comp-functions/functions/miniodev"
vpf "github.com/vshn/appcat/pkg/comp-functions/functions/vshn-postgres-func"
"github.com/vshn/appcat/pkg/comp-functions/functions/vshnredis"
"github.com/vshn/appcat/pkg/comp-functions/runtime"
"github.com/vshn/appcat/v4/pkg"
"github.com/vshn/appcat/v4/pkg/comp-functions/functions/helper"
"github.com/vshn/appcat/v4/pkg/comp-functions/functions/miniodev"
vpf "github.com/vshn/appcat/v4/pkg/comp-functions/functions/vshn-postgres-func"
"github.com/vshn/appcat/v4/pkg/comp-functions/functions/vshnredis"
"github.com/vshn/appcat/v4/pkg/comp-functions/runtime"
"google.golang.org/grpc"
"google.golang.org/grpc/codes"
"google.golang.org/grpc/status"
Expand Down
4 changes: 2 additions & 2 deletions cmd/maintenance.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@ import (
"github.com/spf13/cobra"
"github.com/spf13/viper"
"github.com/thediveo/enumflag/v2"
"github.com/vshn/appcat/pkg"
"github.com/vshn/appcat/pkg/maintenance"
"github.com/vshn/appcat/v4/pkg"
"github.com/vshn/appcat/v4/pkg/maintenance"
ctrl "sigs.k8s.io/controller-runtime"
"sigs.k8s.io/controller-runtime/pkg/client"
)
Expand Down
2 changes: 1 addition & 1 deletion cmd/slareport.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import (

"github.com/spf13/cobra"
"github.com/spf13/viper"
"github.com/vshn/appcat/pkg/slareport"
"github.com/vshn/appcat/v4/pkg/slareport"
"sigs.k8s.io/controller-runtime/pkg/log"
)

Expand Down
6 changes: 3 additions & 3 deletions cmd/sliexporter.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@ package cmd
import (
"github.com/go-logr/logr"
"github.com/spf13/cobra"
"github.com/vshn/appcat/pkg"
"github.com/vshn/appcat/pkg/sliexporter"
"github.com/vshn/appcat/pkg/sliexporter/probes"
"github.com/vshn/appcat/v4/pkg"
"github.com/vshn/appcat/v4/pkg/sliexporter"
"github.com/vshn/appcat/v4/pkg/sliexporter/probes"
"k8s.io/apimachinery/pkg/runtime"
"os"
ctrl "sigs.k8s.io/controller-runtime"
Expand Down
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
module github.com/vshn/appcat
module github.com/vshn/appcat/v4

go 1.20

Expand Down
2 changes: 1 addition & 1 deletion main.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import (

"github.com/spf13/cobra"
"github.com/spf13/viper"
"github.com/vshn/appcat/cmd"
"github.com/vshn/appcat/v4/cmd"
)

func init() {
Expand Down
2 changes: 1 addition & 1 deletion pkg/apiserver/appcat/appcat.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ package appcat

import (
crossplane "github.com/crossplane/crossplane/apis/apiextensions/v1"
v1 "github.com/vshn/appcat/apis/appcat/v1"
v1 "github.com/vshn/appcat/v4/apis/appcat/v1"
"k8s.io/apimachinery/pkg/runtime"
genericregistry "k8s.io/apiserver/pkg/registry/generic"
"k8s.io/apiserver/pkg/registry/rest"
Expand Down
4 changes: 2 additions & 2 deletions pkg/apiserver/appcat/appcat_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@ import (
"testing"

crossplanev1 "github.com/crossplane/crossplane/apis/apiextensions/v1"
v1 "github.com/vshn/appcat/apis/appcat/v1"
"github.com/vshn/appcat/test/mocks"
v1 "github.com/vshn/appcat/v4/apis/appcat/v1"
"github.com/vshn/appcat/v4/test/mocks"
"k8s.io/apiserver/pkg/registry/rest"

"github.com/golang/mock/gomock"
Expand Down
2 changes: 1 addition & 1 deletion pkg/apiserver/appcat/delete.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ package appcat

import (
"context"
v1 "github.com/vshn/appcat/apis/appcat/v1"
v1 "github.com/vshn/appcat/v4/apis/appcat/v1"
metainternalversion "k8s.io/apimachinery/pkg/apis/meta/internalversion"

metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
Expand Down
4 changes: 2 additions & 2 deletions pkg/apiserver/appcat/get.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@ package appcat

import (
"context"
v1 "github.com/vshn/appcat/apis/appcat/v1"
"github.com/vshn/appcat/pkg/apiserver"
v1 "github.com/vshn/appcat/v4/apis/appcat/v1"
"github.com/vshn/appcat/v4/pkg/apiserver"
apierrors "k8s.io/apimachinery/pkg/api/errors"
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
"k8s.io/apimachinery/pkg/runtime"
Expand Down
2 changes: 1 addition & 1 deletion pkg/apiserver/appcat/get_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ package appcat

import (
crossplanev1 "github.com/crossplane/crossplane/apis/apiextensions/v1"
v1 "github.com/vshn/appcat/apis/appcat/v1"
v1 "github.com/vshn/appcat/v4/apis/appcat/v1"
apierrors "k8s.io/apimachinery/pkg/api/errors"
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
"k8s.io/apimachinery/pkg/runtime/schema"
Expand Down
4 changes: 2 additions & 2 deletions pkg/apiserver/appcat/list.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@ package appcat
import (
"context"
crossplanev1 "github.com/crossplane/crossplane/apis/apiextensions/v1"
"github.com/vshn/appcat/apis/appcat/v1"
"github.com/vshn/appcat/pkg/apiserver"
"github.com/vshn/appcat/v4/apis/appcat/v1"
"github.com/vshn/appcat/v4/pkg/apiserver"
metainternalversion "k8s.io/apimachinery/pkg/apis/meta/internalversion"
"k8s.io/apimachinery/pkg/labels"
"k8s.io/apimachinery/pkg/runtime"
Expand Down
2 changes: 1 addition & 1 deletion pkg/apiserver/appcat/list_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ package appcat

import (
crossplanev1 "github.com/crossplane/crossplane/apis/apiextensions/v1"
v1 "github.com/vshn/appcat/apis/appcat/v1"
v1 "github.com/vshn/appcat/v4/apis/appcat/v1"
apierrors "k8s.io/apimachinery/pkg/api/errors"
"k8s.io/apimachinery/pkg/runtime/schema"
"k8s.io/apimachinery/pkg/watch"
Expand Down
2 changes: 1 addition & 1 deletion pkg/apiserver/appcat/table.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import (
"fmt"
"time"

v1 "github.com/vshn/appcat/apis/appcat/v1"
v1 "github.com/vshn/appcat/v4/apis/appcat/v1"
"k8s.io/apimachinery/pkg/api/meta"
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
"k8s.io/apimachinery/pkg/runtime"
Expand Down
2 changes: 1 addition & 1 deletion pkg/apiserver/appcat/table_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import (
"context"
"testing"

v1 "github.com/vshn/appcat/apis/appcat/v1"
v1 "github.com/vshn/appcat/v4/apis/appcat/v1"

"github.com/stretchr/testify/assert"
"github.com/stretchr/testify/require"
Expand Down
2 changes: 1 addition & 1 deletion pkg/apiserver/appcat/update.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ package appcat

import (
"context"
v1 "github.com/vshn/appcat/apis/appcat/v1"
v1 "github.com/vshn/appcat/v4/apis/appcat/v1"
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
"k8s.io/apimachinery/pkg/runtime"
"k8s.io/apiserver/pkg/registry/rest"
Expand Down
4 changes: 2 additions & 2 deletions pkg/apiserver/vshn/postgres/backup.go
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
package postgres

import (
"github.com/vshn/appcat/apis/appcat/v1"
vshnv1 "github.com/vshn/appcat/apis/vshn/v1"
"github.com/vshn/appcat/v4/apis/appcat/v1"
vshnv1 "github.com/vshn/appcat/v4/apis/vshn/v1"
"k8s.io/apimachinery/pkg/runtime"
genericregistry "k8s.io/apiserver/pkg/registry/generic"
"k8s.io/apiserver/pkg/registry/rest"
Expand Down
6 changes: 3 additions & 3 deletions pkg/apiserver/vshn/postgres/backup_test.go
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
package postgres

import (
"github.com/vshn/appcat/apis/appcat/v1"
"github.com/vshn/appcat/test/mocks"
"github.com/vshn/appcat/v4/apis/appcat/v1"
"github.com/vshn/appcat/v4/test/mocks"

vshnv1 "github.com/vshn/appcat/apis/vshn/v1"
vshnv1 "github.com/vshn/appcat/v4/apis/vshn/v1"
"k8s.io/apimachinery/pkg/apis/meta/v1/unstructured"
"k8s.io/apimachinery/pkg/runtime"
"k8s.io/apiserver/pkg/registry/rest"
Expand Down
2 changes: 1 addition & 1 deletion pkg/apiserver/vshn/postgres/delete.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ package postgres

import (
"context"
"github.com/vshn/appcat/apis/appcat/v1"
"github.com/vshn/appcat/v4/apis/appcat/v1"
metainternalversion "k8s.io/apimachinery/pkg/apis/meta/internalversion"

metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
Expand Down
4 changes: 2 additions & 2 deletions pkg/apiserver/vshn/postgres/get.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@ package postgres
import (
"context"
"fmt"
"github.com/vshn/appcat/apis/appcat/v1"
"github.com/vshn/appcat/pkg/apiserver"
"github.com/vshn/appcat/v4/apis/appcat/v1"
"github.com/vshn/appcat/v4/pkg/apiserver"
apierrors "k8s.io/apimachinery/pkg/api/errors"
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
"k8s.io/apimachinery/pkg/runtime"
Expand Down
6 changes: 3 additions & 3 deletions pkg/apiserver/vshn/postgres/get_test.go
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
package postgres

import (
"github.com/vshn/appcat/apis/appcat/v1"
vshnv1 "github.com/vshn/appcat/apis/vshn/v1"
"github.com/vshn/appcat/test/mocks"
"github.com/vshn/appcat/v4/apis/appcat/v1"
vshnv1 "github.com/vshn/appcat/v4/apis/vshn/v1"
"github.com/vshn/appcat/v4/test/mocks"
apierrors "k8s.io/apimachinery/pkg/api/errors"
"testing"

Expand Down
4 changes: 2 additions & 2 deletions pkg/apiserver/vshn/postgres/list.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@ import (
"context"
"fmt"

v1 "github.com/vshn/appcat/apis/appcat/v1"
"github.com/vshn/appcat/pkg/apiserver"
v1 "github.com/vshn/appcat/v4/apis/appcat/v1"
"github.com/vshn/appcat/v4/pkg/apiserver"
metainternalversion "k8s.io/apimachinery/pkg/apis/meta/internalversion"
"k8s.io/apimachinery/pkg/runtime"
"k8s.io/apimachinery/pkg/watch"
Expand Down
6 changes: 3 additions & 3 deletions pkg/apiserver/vshn/postgres/list_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@ package postgres

import (
"fmt"
"github.com/vshn/appcat/apis/appcat/v1"
vshnv1 "github.com/vshn/appcat/apis/vshn/v1"
"github.com/vshn/appcat/test/mocks"
"github.com/vshn/appcat/v4/apis/appcat/v1"
vshnv1 "github.com/vshn/appcat/v4/apis/vshn/v1"
"github.com/vshn/appcat/v4/test/mocks"
apierrors "k8s.io/apimachinery/pkg/api/errors"
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
"k8s.io/apimachinery/pkg/runtime/schema"
Expand Down
2 changes: 1 addition & 1 deletion pkg/apiserver/vshn/postgres/sgbackups.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ package postgres
import (
"context"
"fmt"
"github.com/vshn/appcat/apis/appcat/v1"
"github.com/vshn/appcat/v4/apis/appcat/v1"
metainternalversion "k8s.io/apimachinery/pkg/apis/meta/internalversion"
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
"k8s.io/apimachinery/pkg/apis/meta/v1/unstructured"
Expand Down
2 changes: 1 addition & 1 deletion pkg/apiserver/vshn/postgres/sgbackups_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import (
"fmt"
"github.com/golang/mock/gomock"
"github.com/stretchr/testify/assert"
"github.com/vshn/appcat/apis/appcat/v1"
"github.com/vshn/appcat/v4/apis/appcat/v1"
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
"k8s.io/apimachinery/pkg/apis/meta/v1/unstructured"
"k8s.io/apimachinery/pkg/runtime"
Expand Down
2 changes: 1 addition & 1 deletion pkg/apiserver/vshn/postgres/table.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ package postgres
import (
"context"
"fmt"
"github.com/vshn/appcat/apis/appcat/v1"
"github.com/vshn/appcat/v4/apis/appcat/v1"
"k8s.io/apimachinery/pkg/api/meta"
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
"k8s.io/apimachinery/pkg/apis/meta/v1/unstructured"
Expand Down
Loading

0 comments on commit cc5d7e2

Please sign in to comment.