diff --git a/pkg/cmd/convert.go b/pkg/cmd/convert.go index 286d6503..ff945784 100644 --- a/pkg/cmd/convert.go +++ b/pkg/cmd/convert.go @@ -1,13 +1,13 @@ 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" ) -// NewConvertCmd provides a cobra command for convert sub command -func NewConvertCmd() *cobra.Command { +// newConvertCmd provides a cobra command for convert sub command +func newConvertCmd() *cobra.Command { o := converter.New() cmd := &cobra.Command{ diff --git a/pkg/cmd/removetokencache.go b/pkg/cmd/removetokencache.go index 5eb21573..d8f4bb1a 100644 --- a/pkg/cmd/removetokencache.go +++ b/pkg/cmd/removetokencache.go @@ -3,13 +3,13 @@ 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" ) -// NewRemoveTokenCacheCmd provides a cobra command for removing token cache sub command -func NewRemoveTokenCacheCmd() *cobra.Command { +// newRemoveTokenCacheCmd provides a cobra command for removing token cache sub command +func newRemoveTokenCacheCmd() *cobra.Command { var tokenCacheDir string cmd := &cobra.Command{ diff --git a/pkg/cmd/root.go b/pkg/cmd/root.go index 9b9773c9..fc838355 100644 --- a/pkg/cmd/root.go +++ b/pkg/cmd/root.go @@ -17,9 +17,9 @@ func NewRootCmd(version string) *cobra.Command { }, } - cmd.AddCommand(NewConvertCmd()) - cmd.AddCommand(NewTokenCmd()) - cmd.AddCommand(NewRemoveTokenCacheCmd()) + cmd.AddCommand(newConvertCmd()) + cmd.AddCommand(newTokenCmd()) + cmd.AddCommand(newRemoveTokenCacheCmd()) return cmd } diff --git a/pkg/cmd/token.go b/pkg/cmd/token.go index 8aacb237..cd407bc0 100644 --- a/pkg/cmd/token.go +++ b/pkg/cmd/token.go @@ -1,12 +1,12 @@ package cmd import ( - "github.com/Azure/kubelogin/pkg/token" + "github.com/Azure/kubelogin/pkg/internal/token" "github.com/spf13/cobra" ) -// NewTokenCmd provides a cobra command for convert sub command -func NewTokenCmd() *cobra.Command { +// newTokenCmd provides a cobra command for convert sub command +func newTokenCmd() *cobra.Command { o := token.NewOptions() cmd := &cobra.Command{ diff --git a/pkg/converter/convert.go b/pkg/internal/converter/convert.go similarity index 99% rename from pkg/converter/convert.go rename to pkg/internal/converter/convert.go index 6202658e..0d263020 100644 --- a/pkg/converter/convert.go +++ b/pkg/internal/converter/convert.go @@ -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" diff --git a/pkg/converter/convert_test.go b/pkg/internal/converter/convert_test.go similarity index 99% rename from pkg/converter/convert_test.go rename to pkg/internal/converter/convert_test.go index ccff5580..e15cfc75 100644 --- a/pkg/converter/convert_test.go +++ b/pkg/internal/converter/convert_test.go @@ -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" diff --git a/pkg/converter/options.go b/pkg/internal/converter/options.go similarity index 96% rename from pkg/converter/options.go rename to pkg/internal/converter/options.go index 7390b9a5..322c4720 100644 --- a/pkg/converter/options.go +++ b/pkg/internal/converter/options.go @@ -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" ) diff --git a/pkg/converter/options_test.go b/pkg/internal/converter/options_test.go similarity index 100% rename from pkg/converter/options_test.go rename to pkg/internal/converter/options_test.go diff --git a/pkg/pop/authnscheme.go b/pkg/internal/pop/authnscheme.go similarity index 100% rename from pkg/pop/authnscheme.go rename to pkg/internal/pop/authnscheme.go diff --git a/pkg/pop/authnscheme_test.go b/pkg/internal/pop/authnscheme_test.go similarity index 100% rename from pkg/pop/authnscheme_test.go rename to pkg/internal/pop/authnscheme_test.go diff --git a/pkg/pop/msal.go b/pkg/internal/pop/msal.go similarity index 100% rename from pkg/pop/msal.go rename to pkg/internal/pop/msal.go diff --git a/pkg/pop/msal_test.go b/pkg/internal/pop/msal_test.go similarity index 98% rename from pkg/pop/msal_test.go rename to pkg/internal/pop/msal_test.go index 4523e27c..039115eb 100644 --- a/pkg/pop/msal_test.go +++ b/pkg/internal/pop/msal_test.go @@ -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" diff --git a/pkg/pop/poptoken.go b/pkg/internal/pop/poptoken.go similarity index 100% rename from pkg/pop/poptoken.go rename to pkg/internal/pop/poptoken.go diff --git a/pkg/pop/poptoken_test.go b/pkg/internal/pop/poptoken_test.go similarity index 100% rename from pkg/pop/poptoken_test.go rename to pkg/internal/pop/poptoken_test.go diff --git a/pkg/pop/testdata/AcquirePoPTokenConfidentialFromBadSecretVCR.yaml b/pkg/internal/pop/testdata/AcquirePoPTokenConfidentialFromBadSecretVCR.yaml similarity index 100% rename from pkg/pop/testdata/AcquirePoPTokenConfidentialFromBadSecretVCR.yaml rename to pkg/internal/pop/testdata/AcquirePoPTokenConfidentialFromBadSecretVCR.yaml diff --git a/pkg/pop/testdata/AcquirePoPTokenConfidentialWithSecretVCR.yaml b/pkg/internal/pop/testdata/AcquirePoPTokenConfidentialWithSecretVCR.yaml similarity index 100% rename from pkg/pop/testdata/AcquirePoPTokenConfidentialWithSecretVCR.yaml rename to pkg/internal/pop/testdata/AcquirePoPTokenConfidentialWithSecretVCR.yaml diff --git a/pkg/testutils/govcrutils.go b/pkg/internal/testutils/govcrutils.go similarity index 100% rename from pkg/testutils/govcrutils.go rename to pkg/internal/testutils/govcrutils.go diff --git a/pkg/testutils/testutils.go b/pkg/internal/testutils/testutils.go similarity index 100% rename from pkg/testutils/testutils.go rename to pkg/internal/testutils/testutils.go diff --git a/pkg/testutils/testutils_test.go b/pkg/internal/testutils/testutils_test.go similarity index 100% rename from pkg/testutils/testutils_test.go rename to pkg/internal/testutils/testutils_test.go diff --git a/pkg/token/README.MD b/pkg/internal/token/README.MD similarity index 100% rename from pkg/token/README.MD rename to pkg/internal/token/README.MD diff --git a/pkg/token/azurecli.go b/pkg/internal/token/azurecli.go similarity index 100% rename from pkg/token/azurecli.go rename to pkg/internal/token/azurecli.go diff --git a/pkg/token/azurecli_test.go b/pkg/internal/token/azurecli_test.go similarity index 96% rename from pkg/token/azurecli_test.go rename to pkg/internal/token/azurecli_test.go index 546903fd..f92707cb 100644 --- a/pkg/token/azurecli_test.go +++ b/pkg/internal/token/azurecli_test.go @@ -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) { diff --git a/pkg/token/devicecode.go b/pkg/internal/token/devicecode.go similarity index 100% rename from pkg/token/devicecode.go rename to pkg/internal/token/devicecode.go diff --git a/pkg/token/devicecode_test.go b/pkg/internal/token/devicecode_test.go similarity index 95% rename from pkg/token/devicecode_test.go rename to pkg/internal/token/devicecode_test.go index 2cbe7f92..9f4505dc 100644 --- a/pkg/token/devicecode_test.go +++ b/pkg/internal/token/devicecode_test.go @@ -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) { diff --git a/pkg/token/execCredentialPlugin.go b/pkg/internal/token/execCredentialPlugin.go similarity index 97% rename from pkg/token/execCredentialPlugin.go rename to pkg/internal/token/execCredentialPlugin.go index bb258b99..4490ed13 100644 --- a/pkg/token/execCredentialPlugin.go +++ b/pkg/internal/token/execCredentialPlugin.go @@ -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" diff --git a/pkg/token/execCredentialPlugin_test.go b/pkg/internal/token/execCredentialPlugin_test.go similarity index 98% rename from pkg/token/execCredentialPlugin_test.go rename to pkg/internal/token/execCredentialPlugin_test.go index a5e4ec66..091c4969 100644 --- a/pkg/token/execCredentialPlugin_test.go +++ b/pkg/internal/token/execCredentialPlugin_test.go @@ -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" ) diff --git a/pkg/token/execCredentialWriter.go b/pkg/internal/token/execCredentialWriter.go similarity index 96% rename from pkg/token/execCredentialWriter.go rename to pkg/internal/token/execCredentialWriter.go index 6e124b97..ce8137c7 100644 --- a/pkg/token/execCredentialWriter.go +++ b/pkg/internal/token/execCredentialWriter.go @@ -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" diff --git a/pkg/token/execCredentialWriter_test.go b/pkg/internal/token/execCredentialWriter_test.go similarity index 100% rename from pkg/token/execCredentialWriter_test.go rename to pkg/internal/token/execCredentialWriter_test.go diff --git a/pkg/token/federatedIdentity.go b/pkg/internal/token/federatedIdentity.go similarity index 100% rename from pkg/token/federatedIdentity.go rename to pkg/internal/token/federatedIdentity.go diff --git a/pkg/token/federatedIdentity_test.go b/pkg/internal/token/federatedIdentity_test.go similarity index 98% rename from pkg/token/federatedIdentity_test.go rename to pkg/internal/token/federatedIdentity_test.go index 97a93000..3e3816e0 100644 --- a/pkg/token/federatedIdentity_test.go +++ b/pkg/internal/token/federatedIdentity_test.go @@ -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) { diff --git a/pkg/token/interactive.go b/pkg/internal/token/interactive.go similarity index 98% rename from pkg/token/interactive.go rename to pkg/internal/token/interactive.go index e5857eed..bf00943a 100644 --- a/pkg/token/interactive.go +++ b/pkg/internal/token/interactive.go @@ -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 { diff --git a/pkg/token/interactive_test.go b/pkg/internal/token/interactive_test.go similarity index 97% rename from pkg/token/interactive_test.go rename to pkg/internal/token/interactive_test.go index cb6b3bba..aaf2f32c 100644 --- a/pkg/token/interactive_test.go +++ b/pkg/internal/token/interactive_test.go @@ -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" ) diff --git a/pkg/token/manualtoken.go b/pkg/internal/token/manualtoken.go similarity index 100% rename from pkg/token/manualtoken.go rename to pkg/internal/token/manualtoken.go diff --git a/pkg/token/manualtoken_test.go b/pkg/internal/token/manualtoken_test.go similarity index 100% rename from pkg/token/manualtoken_test.go rename to pkg/internal/token/manualtoken_test.go diff --git a/pkg/token/mock_token/execCredentialWriter.go b/pkg/internal/token/mock_token/execCredentialWriter.go similarity index 94% rename from pkg/token/mock_token/execCredentialWriter.go rename to pkg/internal/token/mock_token/execCredentialWriter.go index f7ebde2d..e4e9c466 100644 --- a/pkg/token/mock_token/execCredentialWriter.go +++ b/pkg/internal/token/mock_token/execCredentialWriter.go @@ -1,5 +1,5 @@ // Code generated by MockGen. DO NOT EDIT. -// Source: github.com/Azure/kubelogin/pkg/token (interfaces: ExecCredentialWriter) +// Source: github.com/Azure/kubelogin/pkg/internal/token (interfaces: ExecCredentialWriter) // Package mock_token is a generated GoMock package. package mock_token diff --git a/pkg/token/mock_token/provider.go b/pkg/internal/token/mock_token/provider.go similarity index 94% rename from pkg/token/mock_token/provider.go rename to pkg/internal/token/mock_token/provider.go index 4218a76c..f42f0ea9 100644 --- a/pkg/token/mock_token/provider.go +++ b/pkg/internal/token/mock_token/provider.go @@ -1,5 +1,5 @@ // Code generated by MockGen. DO NOT EDIT. -// Source: github.com/Azure/kubelogin/pkg/token (interfaces: TokenProvider) +// Source: github.com/Azure/kubelogin/pkg/internal/token (interfaces: TokenProvider) // Package mock_token is a generated GoMock package. package mock_token diff --git a/pkg/token/mock_token/tokenCache.go b/pkg/internal/token/mock_token/tokenCache.go similarity index 95% rename from pkg/token/mock_token/tokenCache.go rename to pkg/internal/token/mock_token/tokenCache.go index f19a153d..f4014287 100644 --- a/pkg/token/mock_token/tokenCache.go +++ b/pkg/internal/token/mock_token/tokenCache.go @@ -1,5 +1,5 @@ // Code generated by MockGen. DO NOT EDIT. -// Source: github.com/Azure/kubelogin/pkg/token (interfaces: TokenCache) +// Source: github.com/Azure/kubelogin/pkg/internal/token (interfaces: TokenCache) // Package mock_token is a generated GoMock package. package mock_token diff --git a/pkg/token/msi.go b/pkg/internal/token/msi.go similarity index 100% rename from pkg/token/msi.go rename to pkg/internal/token/msi.go diff --git a/pkg/token/options.go b/pkg/internal/token/options.go similarity index 100% rename from pkg/token/options.go rename to pkg/internal/token/options.go diff --git a/pkg/token/options_test.go b/pkg/internal/token/options_test.go similarity index 99% rename from pkg/token/options_test.go rename to pkg/internal/token/options_test.go index ed493b6f..bc6c127b 100644 --- a/pkg/token/options_test.go +++ b/pkg/internal/token/options_test.go @@ -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" ) diff --git a/pkg/token/provider.go b/pkg/internal/token/provider.go similarity index 97% rename from pkg/token/provider.go rename to pkg/internal/token/provider.go index 5eaacb7d..fc506d27 100644 --- a/pkg/token/provider.go +++ b/pkg/internal/token/provider.go @@ -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" diff --git a/pkg/token/provider_test.go b/pkg/internal/token/provider_test.go similarity index 99% rename from pkg/token/provider_test.go rename to pkg/internal/token/provider_test.go index 9a329cfa..20168fa7 100644 --- a/pkg/token/provider_test.go +++ b/pkg/internal/token/provider_test.go @@ -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" ) diff --git a/pkg/token/ropc.go b/pkg/internal/token/ropc.go similarity index 100% rename from pkg/token/ropc.go rename to pkg/internal/token/ropc.go diff --git a/pkg/token/serviceprincipaltoken.go b/pkg/internal/token/serviceprincipaltoken.go similarity index 100% rename from pkg/token/serviceprincipaltoken.go rename to pkg/internal/token/serviceprincipaltoken.go diff --git a/pkg/token/serviceprincipaltoken_legacy.go b/pkg/internal/token/serviceprincipaltoken_legacy.go similarity index 100% rename from pkg/token/serviceprincipaltoken_legacy.go rename to pkg/internal/token/serviceprincipaltoken_legacy.go diff --git a/pkg/token/serviceprincipaltoken_legacy_test.go b/pkg/internal/token/serviceprincipaltoken_legacy_test.go similarity index 100% rename from pkg/token/serviceprincipaltoken_legacy_test.go rename to pkg/internal/token/serviceprincipaltoken_legacy_test.go diff --git a/pkg/token/serviceprincipaltoken_test.go b/pkg/internal/token/serviceprincipaltoken_test.go similarity index 99% rename from pkg/token/serviceprincipaltoken_test.go rename to pkg/internal/token/serviceprincipaltoken_test.go index 866a7a9f..a3392002 100644 --- a/pkg/token/serviceprincipaltoken_test.go +++ b/pkg/internal/token/serviceprincipaltoken_test.go @@ -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" diff --git a/pkg/token/serviceprincipaltokencertificate.go b/pkg/internal/token/serviceprincipaltokencertificate.go similarity index 99% rename from pkg/token/serviceprincipaltokencertificate.go rename to pkg/internal/token/serviceprincipaltokencertificate.go index 219f702f..6010a595 100644 --- a/pkg/token/serviceprincipaltokencertificate.go +++ b/pkg/internal/token/serviceprincipaltokencertificate.go @@ -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" ) diff --git a/pkg/token/serviceprincipaltokencertificate_test.go b/pkg/internal/token/serviceprincipaltokencertificate_test.go similarity index 93% rename from pkg/token/serviceprincipaltokencertificate_test.go rename to pkg/internal/token/serviceprincipaltokencertificate_test.go index b5f04ccf..68f64ed3 100644 --- a/pkg/token/serviceprincipaltokencertificate_test.go +++ b/pkg/internal/token/serviceprincipaltokencertificate_test.go @@ -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) { diff --git a/pkg/token/serviceprincipaltokensecret.go b/pkg/internal/token/serviceprincipaltokensecret.go similarity index 98% rename from pkg/token/serviceprincipaltokensecret.go rename to pkg/internal/token/serviceprincipaltokensecret.go index 398a88e0..458dccf8 100644 --- a/pkg/token/serviceprincipaltokensecret.go +++ b/pkg/internal/token/serviceprincipaltokensecret.go @@ -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" ) diff --git a/pkg/token/testdata/ServicePrincipalPoPTokenFromBadSecretVCR.yaml b/pkg/internal/token/testdata/ServicePrincipalPoPTokenFromBadSecretVCR.yaml similarity index 100% rename from pkg/token/testdata/ServicePrincipalPoPTokenFromBadSecretVCR.yaml rename to pkg/internal/token/testdata/ServicePrincipalPoPTokenFromBadSecretVCR.yaml diff --git a/pkg/token/testdata/ServicePrincipalPoPTokenFromCertVCR.yaml b/pkg/internal/token/testdata/ServicePrincipalPoPTokenFromCertVCR.yaml similarity index 100% rename from pkg/token/testdata/ServicePrincipalPoPTokenFromCertVCR.yaml rename to pkg/internal/token/testdata/ServicePrincipalPoPTokenFromCertVCR.yaml diff --git a/pkg/token/testdata/ServicePrincipalPoPTokenFromSecretVCR.yaml b/pkg/internal/token/testdata/ServicePrincipalPoPTokenFromSecretVCR.yaml similarity index 100% rename from pkg/token/testdata/ServicePrincipalPoPTokenFromSecretVCR.yaml rename to pkg/internal/token/testdata/ServicePrincipalPoPTokenFromSecretVCR.yaml diff --git a/pkg/token/testdata/ServicePrincipalTokenFromBadSecretVCR.yaml b/pkg/internal/token/testdata/ServicePrincipalTokenFromBadSecretVCR.yaml similarity index 100% rename from pkg/token/testdata/ServicePrincipalTokenFromBadSecretVCR.yaml rename to pkg/internal/token/testdata/ServicePrincipalTokenFromBadSecretVCR.yaml diff --git a/pkg/token/testdata/ServicePrincipalTokenFromCertVCR.yaml b/pkg/internal/token/testdata/ServicePrincipalTokenFromCertVCR.yaml similarity index 100% rename from pkg/token/testdata/ServicePrincipalTokenFromCertVCR.yaml rename to pkg/internal/token/testdata/ServicePrincipalTokenFromCertVCR.yaml diff --git a/pkg/token/testdata/ServicePrincipalTokenFromSecretVCR.yaml b/pkg/internal/token/testdata/ServicePrincipalTokenFromSecretVCR.yaml similarity index 100% rename from pkg/token/testdata/ServicePrincipalTokenFromSecretVCR.yaml rename to pkg/internal/token/testdata/ServicePrincipalTokenFromSecretVCR.yaml diff --git a/pkg/token/testdata/testCert.pfx b/pkg/internal/token/testdata/testCert.pfx similarity index 100% rename from pkg/token/testdata/testCert.pfx rename to pkg/internal/token/testdata/testCert.pfx diff --git a/pkg/token/tokenCache.go b/pkg/internal/token/tokenCache.go similarity index 93% rename from pkg/token/tokenCache.go rename to pkg/internal/token/tokenCache.go index bc9f1457..4d703dc7 100644 --- a/pkg/token/tokenCache.go +++ b/pkg/internal/token/tokenCache.go @@ -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"