Skip to content

Commit

Permalink
refactor: move packages into pkg/internal
Browse files Browse the repository at this point in the history
  • Loading branch information
bcho committed Dec 18, 2023
1 parent 3e83c88 commit 53630c2
Show file tree
Hide file tree
Showing 58 changed files with 27 additions and 27 deletions.
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
module github.com/Azure/kubelogin

go 1.18
go 1.21.3

require (
github.com/Azure/azure-sdk-for-go/sdk/azcore v1.8.0
Expand Down
2 changes: 1 addition & 1 deletion pkg/cmd/convert.go
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package cmd

import (
"github.com/Azure/kubelogin/pkg/converter"
"github.com/Azure/kubelogin/pkg/internal/converter"
"github.com/spf13/cobra"
"k8s.io/client-go/tools/clientcmd"
)
Expand Down
2 changes: 1 addition & 1 deletion pkg/cmd/removetokencache.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ package cmd
import (
"os"

"github.com/Azure/kubelogin/pkg/token"
"github.com/Azure/kubelogin/pkg/internal/token"
"github.com/spf13/cobra"
klog "k8s.io/klog/v2"
)
Expand Down
2 changes: 1 addition & 1 deletion pkg/cmd/token.go
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package cmd

import (
"github.com/Azure/kubelogin/pkg/token"
"github.com/Azure/kubelogin/pkg/internal/token"
"github.com/spf13/cobra"
)

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import (
"fmt"
"strings"

"github.com/Azure/kubelogin/pkg/token"
"github.com/Azure/kubelogin/pkg/internal/token"
"k8s.io/client-go/tools/clientcmd"
"k8s.io/client-go/tools/clientcmd/api"
klog "k8s.io/klog/v2"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import (
"path/filepath"
"testing"

"github.com/Azure/kubelogin/pkg/token"
"github.com/Azure/kubelogin/pkg/internal/token"
"github.com/spf13/pflag"
"k8s.io/cli-runtime/pkg/genericclioptions"
"k8s.io/client-go/tools/clientcmd"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ package converter
import (
"fmt"

"github.com/Azure/kubelogin/pkg/token"
"github.com/Azure/kubelogin/pkg/internal/token"
"github.com/spf13/pflag"
"k8s.io/cli-runtime/pkg/genericclioptions"
)
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
2 changes: 1 addition & 1 deletion pkg/pop/msal_test.go → pkg/internal/pop/msal_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import (

"github.com/Azure/azure-sdk-for-go/sdk/azcore"
"github.com/Azure/azure-sdk-for-go/sdk/azcore/cloud"
"github.com/Azure/kubelogin/pkg/testutils"
"github.com/Azure/kubelogin/pkg/internal/testutils"
"github.com/AzureAD/microsoft-authentication-library-for-go/apps/confidential"
"github.com/golang-jwt/jwt/v4"
"github.com/google/uuid"
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ package token
import (
"testing"

"github.com/Azure/kubelogin/pkg/testutils"
"github.com/Azure/kubelogin/pkg/internal/testutils"
)

func TestNewAzureCLITokenEmpty(t *testing.T) {
Expand Down
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import (
"testing"

"github.com/Azure/go-autorest/autorest/adal"
"github.com/Azure/kubelogin/pkg/testutils"
"github.com/Azure/kubelogin/pkg/internal/testutils"
)

func TestNewDeviceCodeTokenProviderEmpty(t *testing.T) {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
package token

//go:generate sh -c "mockgen -destination mock_$GOPACKAGE/execCredentialPlugin.go github.com/Azure/kubelogin/pkg/token ExecCredentialPlugin"
//go:generate sh -c "mockgen -destination mock_$GOPACKAGE/execCredentialPlugin.go github.com/Azure/kubelogin/pkg/internal/token ExecCredentialPlugin"

import (
"fmt"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import (
"time"

"github.com/Azure/go-autorest/autorest/adal"
"github.com/Azure/kubelogin/pkg/token/mock_token"
"github.com/Azure/kubelogin/pkg/internal/token/mock_token"
"github.com/golang/mock/gomock"
)

Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
package token

//go:generate sh -c "mockgen -destination mock_$GOPACKAGE/execCredentialWriter.go github.com/Azure/kubelogin/pkg/token ExecCredentialWriter"
//go:generate sh -c "mockgen -destination mock_$GOPACKAGE/execCredentialWriter.go github.com/Azure/kubelogin/pkg/internal/token ExecCredentialWriter"

import (
"encoding/json"
Expand Down
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import (
"strings"
"testing"

"github.com/Azure/kubelogin/pkg/testutils"
"github.com/Azure/kubelogin/pkg/internal/testutils"
)

func TestNewWorkloadIdentityTokenProviderEmpty(t *testing.T) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ import (
"github.com/Azure/azure-sdk-for-go/sdk/azcore/policy"
"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
"github.com/Azure/go-autorest/autorest/adal"
"github.com/Azure/kubelogin/pkg/pop"
"github.com/Azure/kubelogin/pkg/internal/pop"
)

type InteractiveToken struct {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import (
"testing"

"github.com/Azure/go-autorest/autorest/adal"
"github.com/Azure/kubelogin/pkg/testutils"
"github.com/Azure/kubelogin/pkg/internal/testutils"
"github.com/google/go-cmp/cmp"
)

Expand Down
File renamed without changes.
File renamed without changes.

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

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

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

File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import (
"testing"
"time"

"github.com/Azure/kubelogin/pkg/testutils"
"github.com/Azure/kubelogin/pkg/internal/testutils"
"github.com/google/go-cmp/cmp"
"github.com/spf13/pflag"
)
Expand Down
2 changes: 1 addition & 1 deletion pkg/token/provider.go → pkg/internal/token/provider.go
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
package token

//go:generate sh -c "mockgen -destination mock_$GOPACKAGE/provider.go github.com/Azure/kubelogin/pkg/token TokenProvider"
//go:generate sh -c "mockgen -destination mock_$GOPACKAGE/provider.go github.com/Azure/kubelogin/pkg/internal/token TokenProvider"

import (
"errors"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ package token
import (
"testing"

"github.com/Azure/kubelogin/pkg/testutils"
"github.com/Azure/kubelogin/pkg/internal/testutils"
"github.com/google/go-cmp/cmp"
)

Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import (
"github.com/Azure/azure-sdk-for-go/sdk/azcore"
"github.com/Azure/azure-sdk-for-go/sdk/azcore/cloud"
"github.com/Azure/go-autorest/autorest/adal"
"github.com/Azure/kubelogin/pkg/testutils"
"github.com/Azure/kubelogin/pkg/internal/testutils"
"github.com/golang-jwt/jwt/v5"
"github.com/google/go-cmp/cmp"
"github.com/google/uuid"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ import (
"github.com/Azure/azure-sdk-for-go/sdk/azcore"
"github.com/Azure/azure-sdk-for-go/sdk/azcore/policy"
"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
"github.com/Azure/kubelogin/pkg/pop"
"github.com/Azure/kubelogin/pkg/internal/pop"
"github.com/AzureAD/microsoft-authentication-library-for-go/apps/confidential"
"golang.org/x/crypto/pkcs12"
)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ package token
import (
"testing"

"github.com/Azure/kubelogin/pkg/testutils"
"github.com/Azure/kubelogin/pkg/internal/testutils"
)

func TestMissingCertFile(t *testing.T) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import (
"github.com/Azure/azure-sdk-for-go/sdk/azcore"
"github.com/Azure/azure-sdk-for-go/sdk/azcore/policy"
"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
"github.com/Azure/kubelogin/pkg/pop"
"github.com/Azure/kubelogin/pkg/internal/pop"
"github.com/AzureAD/microsoft-authentication-library-for-go/apps/confidential"
)

Expand Down
File renamed without changes.
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
package token

//go:generate sh -c "mockgen -destination mock_$GOPACKAGE/tokenCache.go github.com/Azure/kubelogin/pkg/token TokenCache"
//go:generate sh -c "mockgen -destination mock_$GOPACKAGE/tokenCache.go github.com/Azure/kubelogin/pkg/internal/token TokenCache"

import (
"os"
Expand Down

0 comments on commit 53630c2

Please sign in to comment.