Skip to content

Commit

Permalink
Move all internal to pkg
Browse files Browse the repository at this point in the history
  • Loading branch information
uvegla committed Feb 6, 2025
1 parent 08f5585 commit 5a0eb00
Show file tree
Hide file tree
Showing 21 changed files with 30 additions and 30 deletions.
4 changes: 2 additions & 2 deletions cmd/fetchkeys/runner.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@ import (
"github.com/giantswarm/micrologger"
"github.com/spf13/cobra"

"github.com/giantswarm/konfigure/internal/sopsenv"
"github.com/giantswarm/konfigure/internal/sopsenv/key"
"github.com/giantswarm/konfigure/pkg/sopsenv"
"github.com/giantswarm/konfigure/pkg/sopsenv/key"
)

type runner struct {
Expand Down
2 changes: 1 addition & 1 deletion cmd/generate/flag.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import (
"github.com/giantswarm/microerror"
"github.com/spf13/cobra"

"github.com/giantswarm/konfigure/internal/sopsenv/key"
"github.com/giantswarm/konfigure/pkg/sopsenv/key"
)

const (
Expand Down
14 changes: 7 additions & 7 deletions cmd/generate/runner.go
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,9 @@ import (
corev1 "k8s.io/api/core/v1"
"sigs.k8s.io/yaml"

"github.com/giantswarm/konfigure/internal/generator"
"github.com/giantswarm/konfigure/internal/meta"
"github.com/giantswarm/konfigure/internal/vaultclient"
"github.com/giantswarm/konfigure/pkg/meta"
"github.com/giantswarm/konfigure/pkg/service"
"github.com/giantswarm/konfigure/pkg/vaultclient"
)

const (
Expand Down Expand Up @@ -72,9 +72,9 @@ func (r *runner) run(ctx context.Context, cmd *cobra.Command, args []string) err
}
}

var gen *generator.Service
var gen *service.Service
{
c := generator.Config{
c := service.Config{
VaultClient: vaultClient,

Log: r.logger,
Expand All @@ -85,13 +85,13 @@ func (r *runner) run(ctx context.Context, cmd *cobra.Command, args []string) err
Verbose: r.flag.Verbose,
}

gen, err = generator.New(c)
gen, err = service.New(c)
if err != nil {
return microerror.Mask(err)
}
}

in := generator.GenerateInput{
in := service.GenerateInput{
App: r.flag.AppName,
Name: addNameSuffix(r.flag.Name),
Namespace: giantswarmNamespace,
Expand Down
16 changes: 8 additions & 8 deletions cmd/kustomizepatch/runner.go
Original file line number Diff line number Diff line change
Expand Up @@ -28,10 +28,10 @@ import (
kyaml "sigs.k8s.io/kustomize/kyaml/yaml"
"sigs.k8s.io/yaml"

"github.com/giantswarm/konfigure/internal/generator"
"github.com/giantswarm/konfigure/internal/meta"
"github.com/giantswarm/konfigure/internal/sopsenv/key"
"github.com/giantswarm/konfigure/internal/vaultclient"
"github.com/giantswarm/konfigure/pkg/meta"
"github.com/giantswarm/konfigure/pkg/service"
"github.com/giantswarm/konfigure/pkg/sopsenv/key"
"github.com/giantswarm/konfigure/pkg/vaultclient"
)

const (
Expand Down Expand Up @@ -161,9 +161,9 @@ func (r *runner) run(items []*kyaml.RNode) ([]*kyaml.RNode, error) {
}
}

var gen *generator.Service
var gen *service.Service
{
c := generator.Config{
c := service.Config{
VaultClient: vaultClient,

Log: r.logger,
Expand All @@ -173,13 +173,13 @@ func (r *runner) run(items []*kyaml.RNode) ([]*kyaml.RNode, error) {
SOPSKeysSource: sopsKeysSource,
}

gen, err = generator.New(c)
gen, err = service.New(c)
if err != nil {
return nil, microerror.Mask(err)
}
}

in := generator.GenerateInput{
in := service.GenerateInput{
App: r.config.AppName,
Name: addNameSuffix(r.config.Name),
Namespace: giantswarmNamespace,
Expand Down
2 changes: 1 addition & 1 deletion pkg/decrypt/vault_decrypter.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import (
"context"
"encoding/base64"

"github.com/giantswarm/konfigure/internal/vaultclient"
"github.com/giantswarm/konfigure/pkg/vaultclient"

"github.com/giantswarm/microerror"
"github.com/giantswarm/valuemodifier/vault/decrypt"
Expand Down
6 changes: 3 additions & 3 deletions pkg/generator/generator_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,9 @@ import (
"strings"
"testing"

"github.com/giantswarm/konfigure/internal/sopsenv"
"github.com/giantswarm/konfigure/internal/sopsenv/key"
"github.com/giantswarm/konfigure/internal/testutils"
"github.com/giantswarm/konfigure/pkg/sopsenv"
"github.com/giantswarm/konfigure/pkg/sopsenv/key"
"github.com/giantswarm/konfigure/pkg/testutils"

"github.com/ghodss/yaml"
"github.com/giantswarm/microerror"
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
2 changes: 1 addition & 1 deletion internal/generator/error.go → pkg/service/error.go
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package generator
package service

import (
"github.com/giantswarm/microerror"
Expand Down
8 changes: 4 additions & 4 deletions internal/generator/service.go → pkg/service/service.go
Original file line number Diff line number Diff line change
@@ -1,20 +1,20 @@
package generator
package service

import (
"context"

"github.com/giantswarm/konfigure/internal/vaultclient"
"github.com/giantswarm/konfigure/pkg/vaultclient"

"github.com/giantswarm/microerror"
"github.com/giantswarm/micrologger"
corev1 "k8s.io/api/core/v1"
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"

"github.com/giantswarm/konfigure/internal/meta"
"github.com/giantswarm/konfigure/internal/sopsenv"
"github.com/giantswarm/konfigure/pkg/decrypt"
"github.com/giantswarm/konfigure/pkg/filesystem"
"github.com/giantswarm/konfigure/pkg/generator"
"github.com/giantswarm/konfigure/pkg/meta"
"github.com/giantswarm/konfigure/pkg/sopsenv"
"github.com/giantswarm/konfigure/pkg/xstrings"
)

Expand Down
File renamed without changes.
File renamed without changes.
2 changes: 1 addition & 1 deletion internal/sopsenv/sopsenv.go → pkg/sopsenv/sopsenv.go
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ import (
"k8s.io/client-go/kubernetes"
ctrl "sigs.k8s.io/controller-runtime"

"github.com/giantswarm/konfigure/internal/sopsenv/key"
"github.com/giantswarm/konfigure/pkg/sopsenv/key"

// GS stuff uses `kgs`-generated kubeconfigs that use
// `oidc` auth provider. This import makes is possible to
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,8 @@ import (
"k8s.io/apimachinery/pkg/runtime"
clientgofake "k8s.io/client-go/kubernetes/fake"

"github.com/giantswarm/konfigure/internal/sopsenv/key"
"github.com/giantswarm/konfigure/internal/testutils"
"github.com/giantswarm/konfigure/pkg/sopsenv/key"
"github.com/giantswarm/konfigure/pkg/testutils"
)

func TestSetups(t *testing.T) {
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.

0 comments on commit 5a0eb00

Please sign in to comment.