From e0705f518288312dc3c7d7d37dbd43d411ff9d82 Mon Sep 17 00:00:00 2001 From: Emmanuel Date: Fri, 29 May 2020 10:50:24 +0200 Subject: [PATCH] Move type to pkg for sharing with external components --- Makefile | 6 +++--- Version | 2 +- internal/services/ldap.go | 2 +- internal/services/provisionner.go | 2 +- internal/services/tokenissuer.go | 2 +- internal/utils/config.go | 2 +- {internal => pkg}/types/types.go | 0 7 files changed, 8 insertions(+), 8 deletions(-) rename {internal => pkg}/types/types.go (100%) diff --git a/Makefile b/Makefile index cc14fa10..7493d68e 100644 --- a/Makefile +++ b/Makefile @@ -14,13 +14,13 @@ codegen: dependency bash hack/update-codegen.sh test: codegen - GOOS=linux GOARCH=amd64 go test ./internal/services ./internal/types ./internal/utils + GOARCH=amd64 go test ./internal/services ./pkg/types ./internal/utils test-only: @echo "-> Test only kubi operator binary" - GOOS=linux GOARCH=amd64 go test ./internal/services ./internal/types ./internal/utils + GOARCH=amd64 go test ./internal/services ./pkg/types ./internal/utils build: test @echo "-> Building kubi operator binary" - GOOS=linux CGO_ENABLED=0 GOARCH=amd64 go build -a -ldflags '-extldflags "-static"' -v -o ./build/kubi -i $(GOPATH)/src/$(REPO)/cmd/main.go + CGO_ENABLED=0 GOARCH=amd64 go build -a -ldflags '-extldflags "-static"' -v -o ./build/kubi -i $(GOPATH)/src/$(REPO)/cmd/main.go diff --git a/Version b/Version index ce6a70b9..2eda823f 100644 --- a/Version +++ b/Version @@ -1 +1 @@ -1.6.0 \ No newline at end of file +1.6.1 \ No newline at end of file diff --git a/internal/services/ldap.go b/internal/services/ldap.go index 321cf5fb..5406be40 100644 --- a/internal/services/ldap.go +++ b/internal/services/ldap.go @@ -3,8 +3,8 @@ package services import ( "errors" "fmt" - "github.com/ca-gip/kubi/internal/types" "github.com/ca-gip/kubi/internal/utils" + "github.com/ca-gip/kubi/pkg/types" "regexp" "strings" ) diff --git a/internal/services/provisionner.go b/internal/services/provisionner.go index e2e21a30..6fbca1f0 100644 --- a/internal/services/provisionner.go +++ b/internal/services/provisionner.go @@ -4,10 +4,10 @@ import ( "errors" "fmt" "github.com/ca-gip/kubi/internal/authprovider" - "github.com/ca-gip/kubi/internal/types" "github.com/ca-gip/kubi/internal/utils" v12 "github.com/ca-gip/kubi/pkg/apis/ca-gip/v1" "github.com/ca-gip/kubi/pkg/generated/clientset/versioned" + "github.com/ca-gip/kubi/pkg/types" corev1 "k8s.io/api/core/v1" v1n "k8s.io/api/networking/v1" "k8s.io/api/rbac/v1" diff --git a/internal/services/tokenissuer.go b/internal/services/tokenissuer.go index 84cfa5a9..b9b854d6 100644 --- a/internal/services/tokenissuer.go +++ b/internal/services/tokenissuer.go @@ -6,8 +6,8 @@ import ( "errors" "fmt" "github.com/ca-gip/kubi/internal/authprovider" - "github.com/ca-gip/kubi/internal/types" "github.com/ca-gip/kubi/internal/utils" + "github.com/ca-gip/kubi/pkg/types" "github.com/dgrijalva/jwt-go" "gopkg.in/yaml.v2" "io" diff --git a/internal/utils/config.go b/internal/utils/config.go index d9b5359a..7e4a73a7 100644 --- a/internal/utils/config.go +++ b/internal/utils/config.go @@ -4,7 +4,7 @@ import ( "crypto/tls" "crypto/x509" "encoding/base64" - "github.com/ca-gip/kubi/internal/types" + "github.com/ca-gip/kubi/pkg/types" "github.com/go-ozzo/ozzo-validation" "github.com/go-ozzo/ozzo-validation/is" "io/ioutil" diff --git a/internal/types/types.go b/pkg/types/types.go similarity index 100% rename from internal/types/types.go rename to pkg/types/types.go