From f9eec3a7047143f1da77b580b6d507d7b39320e8 Mon Sep 17 00:00:00 2001 From: George Sedky Date: Tue, 21 Feb 2023 12:52:57 +0000 Subject: [PATCH] Expose internale packages --- cmd/devx/auth.go | 2 +- cmd/devx/build.go | 2 +- cmd/devx/diff.go | 2 +- cmd/devx/main.go | 2 +- cmd/devx/project.go | 6 +++--- cmd/devx/reserve.go | 2 +- cmd/devx/retire.go | 2 +- cmd/devx/run.go | 2 +- go.mod | 2 +- {internal => pkg}/auth/auth.go | 0 {internal => pkg}/catalog/catalog.go | 6 +++--- {internal => pkg}/client/client.go | 12 ++++++------ {internal => pkg}/drivers/compose.go | 6 +++--- {internal => pkg}/drivers/drivers.go | 4 ++-- {internal => pkg}/drivers/github.go | 6 +++--- {internal => pkg}/drivers/gitlab.go | 6 +++--- {internal => pkg}/drivers/kubernetes.go | 6 +++--- {internal => pkg}/drivers/terraform.go | 6 +++--- {internal => pkg}/gitrepo/git.go | 0 {internal => pkg}/policy/policy.go | 4 ++-- {internal => pkg}/project/project.go | 10 +++++----- {internal => pkg}/stack/stack.go | 6 +++--- {internal => pkg}/stack/stack_test.go | 0 {internal => pkg}/stackbuilder/flow.go | 4 ++-- {internal => pkg}/stackbuilder/flow_test.go | 0 {internal => pkg}/stackbuilder/stackbuilder.go | 4 ++-- {internal => pkg}/taskfile/run.go | 4 ++-- {internal => pkg}/utils/utils.go | 2 +- 28 files changed, 54 insertions(+), 54 deletions(-) rename {internal => pkg}/auth/auth.go (100%) rename {internal => pkg}/catalog/catalog.go (97%) rename {internal => pkg}/client/client.go (96%) rename {internal => pkg}/drivers/compose.go (92%) rename {internal => pkg}/drivers/drivers.go (89%) rename {internal => pkg}/drivers/github.go (92%) rename {internal => pkg}/drivers/gitlab.go (91%) rename {internal => pkg}/drivers/kubernetes.go (95%) rename {internal => pkg}/drivers/terraform.go (92%) rename {internal => pkg}/gitrepo/git.go (100%) rename {internal => pkg}/policy/policy.go (96%) rename {internal => pkg}/project/project.go (98%) rename {internal => pkg}/stack/stack.go (98%) rename {internal => pkg}/stack/stack_test.go (100%) rename {internal => pkg}/stackbuilder/flow.go (98%) rename {internal => pkg}/stackbuilder/flow_test.go (100%) rename {internal => pkg}/stackbuilder/stackbuilder.go (99%) rename {internal => pkg}/taskfile/run.go (97%) rename {internal => pkg}/utils/utils.go (99%) diff --git a/cmd/devx/auth.go b/cmd/devx/auth.go index bb352cb..db29591 100644 --- a/cmd/devx/auth.go +++ b/cmd/devx/auth.go @@ -1,7 +1,7 @@ package main import ( - "devopzilla.com/guku/internal/auth" + "devopzilla.com/guku-devx/pkg/auth" "github.com/spf13/cobra" ) diff --git a/cmd/devx/build.go b/cmd/devx/build.go index 36f5f91..4c68e33 100644 --- a/cmd/devx/build.go +++ b/cmd/devx/build.go @@ -4,7 +4,7 @@ import ( "fmt" "cuelang.org/go/cue/errors" - "devopzilla.com/guku/internal/client" + "devopzilla.com/guku-devx/pkg/client" "github.com/spf13/cobra" ) diff --git a/cmd/devx/diff.go b/cmd/devx/diff.go index a955861..979b3e5 100644 --- a/cmd/devx/diff.go +++ b/cmd/devx/diff.go @@ -4,7 +4,7 @@ import ( "fmt" "cuelang.org/go/cue/errors" - "devopzilla.com/guku/internal/client" + "devopzilla.com/guku-devx/pkg/client" "github.com/spf13/cobra" ) diff --git a/cmd/devx/main.go b/cmd/devx/main.go index 1d5fa3d..e20ff50 100644 --- a/cmd/devx/main.go +++ b/cmd/devx/main.go @@ -5,7 +5,7 @@ import ( "fmt" "os" - "devopzilla.com/guku/internal/auth" + "devopzilla.com/guku-devx/pkg/auth" "github.com/spf13/cobra" ) diff --git a/cmd/devx/project.go b/cmd/devx/project.go index 4a3a30e..3c0f3c8 100644 --- a/cmd/devx/project.go +++ b/cmd/devx/project.go @@ -7,9 +7,9 @@ import ( "github.com/spf13/cobra" "cuelang.org/go/cue/errors" - "devopzilla.com/guku/internal/catalog" - "devopzilla.com/guku/internal/policy" - "devopzilla.com/guku/internal/project" + "devopzilla.com/guku-devx/pkg/catalog" + "devopzilla.com/guku-devx/pkg/policy" + "devopzilla.com/guku-devx/pkg/project" ) var projectCmd = &cobra.Command{ diff --git a/cmd/devx/reserve.go b/cmd/devx/reserve.go index 4d28fb4..9e4ed7c 100644 --- a/cmd/devx/reserve.go +++ b/cmd/devx/reserve.go @@ -1,7 +1,7 @@ package main import ( - "devopzilla.com/guku/internal/client" + "devopzilla.com/guku-devx/pkg/client" "github.com/spf13/cobra" ) diff --git a/cmd/devx/retire.go b/cmd/devx/retire.go index 7bcd207..575252c 100644 --- a/cmd/devx/retire.go +++ b/cmd/devx/retire.go @@ -1,7 +1,7 @@ package main import ( - "devopzilla.com/guku/internal/client" + "devopzilla.com/guku-devx/pkg/client" "github.com/spf13/cobra" ) diff --git a/cmd/devx/run.go b/cmd/devx/run.go index 5535c3a..41f254d 100644 --- a/cmd/devx/run.go +++ b/cmd/devx/run.go @@ -1,7 +1,7 @@ package main import ( - "devopzilla.com/guku/internal/taskfile" + "devopzilla.com/guku-devx/pkg/taskfile" "github.com/spf13/cobra" ) diff --git a/go.mod b/go.mod index 7cf9ffe..4f719b9 100644 --- a/go.mod +++ b/go.mod @@ -1,4 +1,4 @@ -module devopzilla.com/guku +module devopzilla.com/guku-devx go 1.18 diff --git a/internal/auth/auth.go b/pkg/auth/auth.go similarity index 100% rename from internal/auth/auth.go rename to pkg/auth/auth.go diff --git a/internal/catalog/catalog.go b/pkg/catalog/catalog.go similarity index 97% rename from internal/catalog/catalog.go rename to pkg/catalog/catalog.go index da01b56..9f28c3a 100644 --- a/internal/catalog/catalog.go +++ b/pkg/catalog/catalog.go @@ -9,9 +9,9 @@ import ( "cuelang.org/go/cue/format" log "github.com/sirupsen/logrus" - "devopzilla.com/guku/internal/auth" - "devopzilla.com/guku/internal/gitrepo" - "devopzilla.com/guku/internal/utils" + "devopzilla.com/guku-devx/pkg/auth" + "devopzilla.com/guku-devx/pkg/gitrepo" + "devopzilla.com/guku-devx/pkg/utils" ) type CatalogItem struct { diff --git a/internal/client/client.go b/pkg/client/client.go similarity index 96% rename from internal/client/client.go rename to pkg/client/client.go index f8f684a..65e9626 100644 --- a/internal/client/client.go +++ b/pkg/client/client.go @@ -13,12 +13,12 @@ import ( "github.com/go-git/go-git/v5/plumbing" log "github.com/sirupsen/logrus" - "devopzilla.com/guku/internal/auth" - "devopzilla.com/guku/internal/drivers" - "devopzilla.com/guku/internal/project" - "devopzilla.com/guku/internal/stack" - "devopzilla.com/guku/internal/stackbuilder" - "devopzilla.com/guku/internal/utils" + "devopzilla.com/guku-devx/pkg/auth" + "devopzilla.com/guku-devx/pkg/drivers" + "devopzilla.com/guku-devx/pkg/project" + "devopzilla.com/guku-devx/pkg/stack" + "devopzilla.com/guku-devx/pkg/stackbuilder" + "devopzilla.com/guku-devx/pkg/utils" ) func Run(environment string, configDir string, stackPath string, buildersPath string, reserve bool, dryRun bool, server auth.ServerConfig, strict bool, stdout bool) error { diff --git a/internal/drivers/compose.go b/pkg/drivers/compose.go similarity index 92% rename from internal/drivers/compose.go rename to pkg/drivers/compose.go index 4c991d3..fdb4c44 100644 --- a/internal/drivers/compose.go +++ b/pkg/drivers/compose.go @@ -6,9 +6,9 @@ import ( "cuelang.org/go/cue" "cuelang.org/go/encoding/yaml" - "devopzilla.com/guku/internal/stack" - "devopzilla.com/guku/internal/stackbuilder" - "devopzilla.com/guku/internal/utils" + "devopzilla.com/guku-devx/pkg/stack" + "devopzilla.com/guku-devx/pkg/stackbuilder" + "devopzilla.com/guku-devx/pkg/utils" log "github.com/sirupsen/logrus" ) diff --git a/internal/drivers/drivers.go b/pkg/drivers/drivers.go similarity index 89% rename from internal/drivers/drivers.go rename to pkg/drivers/drivers.go index 401b008..3e6eba0 100644 --- a/internal/drivers/drivers.go +++ b/pkg/drivers/drivers.go @@ -2,8 +2,8 @@ package drivers import ( "cuelang.org/go/cue" - "devopzilla.com/guku/internal/stack" - "devopzilla.com/guku/internal/stackbuilder" + "devopzilla.com/guku-devx/pkg/stack" + "devopzilla.com/guku-devx/pkg/stackbuilder" ) type Driver interface { diff --git a/internal/drivers/github.go b/pkg/drivers/github.go similarity index 92% rename from internal/drivers/github.go rename to pkg/drivers/github.go index ef04920..db73a24 100644 --- a/internal/drivers/github.go +++ b/pkg/drivers/github.go @@ -7,9 +7,9 @@ import ( "cuelang.org/go/cue" "cuelang.org/go/encoding/yaml" - "devopzilla.com/guku/internal/stack" - "devopzilla.com/guku/internal/stackbuilder" - "devopzilla.com/guku/internal/utils" + "devopzilla.com/guku-devx/pkg/stack" + "devopzilla.com/guku-devx/pkg/stackbuilder" + "devopzilla.com/guku-devx/pkg/utils" log "github.com/sirupsen/logrus" ) diff --git a/internal/drivers/gitlab.go b/pkg/drivers/gitlab.go similarity index 91% rename from internal/drivers/gitlab.go rename to pkg/drivers/gitlab.go index 7b833e0..f772313 100644 --- a/internal/drivers/gitlab.go +++ b/pkg/drivers/gitlab.go @@ -6,9 +6,9 @@ import ( "cuelang.org/go/cue" "cuelang.org/go/encoding/yaml" - "devopzilla.com/guku/internal/stack" - "devopzilla.com/guku/internal/stackbuilder" - "devopzilla.com/guku/internal/utils" + "devopzilla.com/guku-devx/pkg/stack" + "devopzilla.com/guku-devx/pkg/stackbuilder" + "devopzilla.com/guku-devx/pkg/utils" log "github.com/sirupsen/logrus" ) diff --git a/internal/drivers/kubernetes.go b/pkg/drivers/kubernetes.go similarity index 95% rename from internal/drivers/kubernetes.go rename to pkg/drivers/kubernetes.go index f4dfbf6..e766f40 100644 --- a/internal/drivers/kubernetes.go +++ b/pkg/drivers/kubernetes.go @@ -8,9 +8,9 @@ import ( "cuelang.org/go/cue" "cuelang.org/go/encoding/yaml" - "devopzilla.com/guku/internal/stack" - "devopzilla.com/guku/internal/stackbuilder" - "devopzilla.com/guku/internal/utils" + "devopzilla.com/guku-devx/pkg/stack" + "devopzilla.com/guku-devx/pkg/stackbuilder" + "devopzilla.com/guku-devx/pkg/utils" log "github.com/sirupsen/logrus" ) diff --git a/internal/drivers/terraform.go b/pkg/drivers/terraform.go similarity index 92% rename from internal/drivers/terraform.go rename to pkg/drivers/terraform.go index cfccd10..731a2f7 100644 --- a/internal/drivers/terraform.go +++ b/pkg/drivers/terraform.go @@ -6,9 +6,9 @@ import ( "path" "cuelang.org/go/cue" - "devopzilla.com/guku/internal/stack" - "devopzilla.com/guku/internal/stackbuilder" - "devopzilla.com/guku/internal/utils" + "devopzilla.com/guku-devx/pkg/stack" + "devopzilla.com/guku-devx/pkg/stackbuilder" + "devopzilla.com/guku-devx/pkg/utils" log "github.com/sirupsen/logrus" ) diff --git a/internal/gitrepo/git.go b/pkg/gitrepo/git.go similarity index 100% rename from internal/gitrepo/git.go rename to pkg/gitrepo/git.go diff --git a/internal/policy/policy.go b/pkg/policy/policy.go similarity index 96% rename from internal/policy/policy.go rename to pkg/policy/policy.go index a46491c..f6a34c2 100644 --- a/internal/policy/policy.go +++ b/pkg/policy/policy.go @@ -5,8 +5,8 @@ import ( "cuelang.org/go/cue" "cuelang.org/go/encoding/gocode/gocodec" - "devopzilla.com/guku/internal/auth" - "devopzilla.com/guku/internal/utils" + "devopzilla.com/guku-devx/pkg/auth" + "devopzilla.com/guku-devx/pkg/utils" log "github.com/sirupsen/logrus" ) diff --git a/internal/project/project.go b/pkg/project/project.go similarity index 98% rename from internal/project/project.go rename to pkg/project/project.go index 4b60698..9387c48 100644 --- a/internal/project/project.go +++ b/pkg/project/project.go @@ -14,11 +14,11 @@ import ( "cuelang.org/go/cue" "cuelang.org/go/cue/cuecontext" "cuelang.org/go/cue/format" - "devopzilla.com/guku/internal/auth" - "devopzilla.com/guku/internal/gitrepo" - "devopzilla.com/guku/internal/stack" - "devopzilla.com/guku/internal/stackbuilder" - "devopzilla.com/guku/internal/utils" + "devopzilla.com/guku-devx/pkg/auth" + "devopzilla.com/guku-devx/pkg/gitrepo" + "devopzilla.com/guku-devx/pkg/stack" + "devopzilla.com/guku-devx/pkg/stackbuilder" + "devopzilla.com/guku-devx/pkg/utils" "github.com/go-git/go-billy/v5" "github.com/go-git/go-billy/v5/memfs" "github.com/go-git/go-git/v5" diff --git a/internal/stack/stack.go b/pkg/stack/stack.go similarity index 98% rename from internal/stack/stack.go rename to pkg/stack/stack.go index ae68785..02060b8 100644 --- a/internal/stack/stack.go +++ b/pkg/stack/stack.go @@ -8,9 +8,9 @@ import ( "cuelang.org/go/cue" cueflow "cuelang.org/go/tools/flow" - "devopzilla.com/guku/internal/auth" - "devopzilla.com/guku/internal/gitrepo" - "devopzilla.com/guku/internal/utils" + "devopzilla.com/guku-devx/pkg/auth" + "devopzilla.com/guku-devx/pkg/gitrepo" + "devopzilla.com/guku-devx/pkg/utils" log "github.com/sirupsen/logrus" ) diff --git a/internal/stack/stack_test.go b/pkg/stack/stack_test.go similarity index 100% rename from internal/stack/stack_test.go rename to pkg/stack/stack_test.go diff --git a/internal/stackbuilder/flow.go b/pkg/stackbuilder/flow.go similarity index 98% rename from internal/stackbuilder/flow.go rename to pkg/stackbuilder/flow.go index 5909f64..cf4e5e7 100644 --- a/internal/stackbuilder/flow.go +++ b/pkg/stackbuilder/flow.go @@ -8,8 +8,8 @@ import ( "strings" "cuelang.org/go/cue" - "devopzilla.com/guku/internal/stack" - "devopzilla.com/guku/internal/utils" + "devopzilla.com/guku-devx/pkg/stack" + "devopzilla.com/guku-devx/pkg/utils" log "github.com/sirupsen/logrus" ) diff --git a/internal/stackbuilder/flow_test.go b/pkg/stackbuilder/flow_test.go similarity index 100% rename from internal/stackbuilder/flow_test.go rename to pkg/stackbuilder/flow_test.go diff --git a/internal/stackbuilder/stackbuilder.go b/pkg/stackbuilder/stackbuilder.go similarity index 99% rename from internal/stackbuilder/stackbuilder.go rename to pkg/stackbuilder/stackbuilder.go index 08f0f3b..b446949 100644 --- a/internal/stackbuilder/stackbuilder.go +++ b/pkg/stackbuilder/stackbuilder.go @@ -10,8 +10,8 @@ import ( "cuelang.org/go/cue" "cuelang.org/go/cue/errors" - "devopzilla.com/guku/internal/stack" - "devopzilla.com/guku/internal/utils" + "devopzilla.com/guku-devx/pkg/stack" + "devopzilla.com/guku-devx/pkg/utils" "github.com/schollz/progressbar/v3" log "github.com/sirupsen/logrus" ) diff --git a/internal/taskfile/run.go b/pkg/taskfile/run.go similarity index 97% rename from internal/taskfile/run.go rename to pkg/taskfile/run.go index fdee8f5..5fe1008 100644 --- a/internal/taskfile/run.go +++ b/pkg/taskfile/run.go @@ -10,8 +10,8 @@ import ( "cuelang.org/go/cue" cueyaml "cuelang.org/go/encoding/yaml" - "devopzilla.com/guku/internal/stackbuilder" - "devopzilla.com/guku/internal/utils" + "devopzilla.com/guku-devx/pkg/stackbuilder" + "devopzilla.com/guku-devx/pkg/utils" "mvdan.cc/sh/v3/syntax" diff --git a/internal/utils/utils.go b/pkg/utils/utils.go similarity index 99% rename from internal/utils/utils.go rename to pkg/utils/utils.go index 995ed15..5ebe28e 100644 --- a/internal/utils/utils.go +++ b/pkg/utils/utils.go @@ -21,7 +21,7 @@ import ( "cuelang.org/go/cue/build" "cuelang.org/go/cue/cuecontext" cueload "cuelang.org/go/cue/load" - "devopzilla.com/guku/internal/auth" + "devopzilla.com/guku-devx/pkg/auth" "github.com/go-git/go-billy/v5" log "github.com/sirupsen/logrus" "gopkg.in/yaml.v3"