1
0
Fork 0
mirror of https://github.com/external-secrets/external-secrets.git synced 2024-12-14 11:57:59 +00:00

Merge pull request #967 from external-secrets/chore/force-intf-valid

chore: force interface validation
This commit is contained in:
paul-the-alien[bot] 2022-04-07 16:16:52 +00:00 committed by GitHub
commit 005a7130fc
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
14 changed files with 55 additions and 3 deletions

View file

@ -31,6 +31,10 @@ const (
defaultAPIUrl = "https://api.akeyless.io"
)
// https://github.com/external-secrets/external-secrets/issues/644
var _ esv1beta1.SecretsClient = &Akeyless{}
var _ esv1beta1.Provider = &Provider{}
// Provider satisfies the provider interface.
type Provider struct{}

View file

@ -51,6 +51,10 @@ type Client struct {
accessKey []byte
}
// https://github.com/external-secrets/external-secrets/issues/644
var _ esv1beta1.SecretsClient = &KeyManagementService{}
var _ esv1beta1.Provider = &KeyManagementService{}
type KeyManagementService struct {
Client SMInterface
}

View file

@ -31,6 +31,9 @@ import (
"github.com/external-secrets/external-secrets/pkg/utils"
)
// https://github.com/external-secrets/external-secrets/issues/644
var _ esv1beta1.SecretsClient = &ParameterStore{}
// ParameterStore is a provider for AWS ParameterStore.
type ParameterStore struct {
sess *session.Session

View file

@ -29,6 +29,9 @@ import (
"github.com/external-secrets/external-secrets/pkg/utils"
)
// https://github.com/external-secrets/external-secrets/issues/644
var _ esv1beta1.Provider = &Provider{}
// Provider satisfies the provider interface.
type Provider struct{}

View file

@ -32,6 +32,9 @@ import (
"github.com/external-secrets/external-secrets/pkg/utils"
)
// https://github.com/external-secrets/external-secrets/issues/644
var _ esv1beta1.SecretsClient = &SecretsManager{}
// SecretsManager is a provider for AWS SecretsManager.
type SecretsManager struct {
sess *session.Session

View file

@ -79,6 +79,10 @@ const (
errMissingSAAnnotation = "missing service account annotation: %s"
)
// https://github.com/external-secrets/external-secrets/issues/644
var _ esv1beta1.SecretsClient = &Azure{}
var _ esv1beta1.Provider = &Azure{}
// interface to keyvault.BaseClient.
type SecretClient interface {
GetKey(ctx context.Context, vaultBaseURL string, keyName string, keyVersion string) (result keyvault.KeyBundle, err error)

View file

@ -41,9 +41,8 @@ import (
)
const (
CloudPlatformRole = "https://www.googleapis.com/auth/cloud-platform"
defaultVersion = "latest"
CloudPlatformRole = "https://www.googleapis.com/auth/cloud-platform"
defaultVersion = "latest"
errGCPSMStore = "received invalid GCPSM SecretStore resource"
errUnableGetCredentials = "unable to get credentials: %w"
errClientClose = "unable to close SecretManager client: %w"
@ -84,6 +83,10 @@ type GoogleSecretManagerClient interface {
*/
var useMu = sync.Mutex{}
// https://github.com/external-secrets/external-secrets/issues/644
var _ esv1beta1.SecretsClient = &ProviderGCP{}
var _ esv1beta1.Provider = &ProviderGCP{}
// ProviderGCP is a provider for GCP Secret Manager.
type ProviderGCP struct {
projectID string

View file

@ -41,6 +41,10 @@ const (
errJSONSecretUnmarshal = "unable to unmarshal secret: %w"
)
// https://github.com/external-secrets/external-secrets/issues/644
var _ esv1beta1.SecretsClient = &Gitlab{}
var _ esv1beta1.Provider = &Gitlab{}
type Client interface {
GetVariable(pid interface{}, key string, opt *gitlab.GetProjectVariableOptions, options ...gitlab.RequestOptionFunc) (*gitlab.ProjectVariable, *gitlab.Response, error)
}

View file

@ -47,6 +47,10 @@ const (
errJSONSecretUnmarshal = "unable to unmarshal secret: %w"
)
// https://github.com/external-secrets/external-secrets/issues/644
var _ esv1beta1.SecretsClient = &providerIBM{}
var _ esv1beta1.Provider = &providerIBM{}
type SecretManagerClient interface {
GetSecret(getSecretOptions *sm.GetSecretOptions) (result *sm.GetSecret, response *core.DetailedResponse, err error)
}

View file

@ -41,6 +41,10 @@ const (
errEmptyKey = "key %s found but empty"
)
// https://github.com/external-secrets/external-secrets/issues/644
var _ esv1beta1.SecretsClient = &ProviderKubernetes{}
var _ esv1beta1.Provider = &ProviderKubernetes{}
type KClient interface {
Get(ctx context.Context, name string, opts metav1.GetOptions) (*corev1.Secret, error)
}

View file

@ -52,6 +52,10 @@ const (
errUnexpectedContent = "unexpected secret bundle content"
)
// https://github.com/external-secrets/external-secrets/issues/644
var _ esv1beta1.SecretsClient = &VaultManagementService{}
var _ esv1beta1.Provider = &VaultManagementService{}
type VaultManagementService struct {
Client VMInterface
vault string

View file

@ -103,6 +103,10 @@ const (
errInvalidTokenRef = "invalid Auth.TokenSecretRef: %w"
)
// https://github.com/external-secrets/external-secrets/issues/644
var _ esv1beta1.SecretsClient = &client{}
var _ esv1beta1.Provider = &connector{}
type Client interface {
NewRequest(method, requestPath string) *vault.Request
RawRequestWithContext(ctx context.Context, r *vault.Request) (*vault.Response, error)

View file

@ -37,6 +37,10 @@ import (
"github.com/external-secrets/external-secrets/pkg/template/v2"
)
// https://github.com/external-secrets/external-secrets/issues/644
var _ esv1beta1.SecretsClient = &WebHook{}
var _ esv1beta1.Provider = &Provider{}
// Provider satisfies the provider interface.
type Provider struct{}

View file

@ -45,6 +45,10 @@ type iamTokenKey struct {
privateKeyHash string
}
// https://github.com/external-secrets/external-secrets/issues/644
var _ esv1beta1.SecretsClient = &lockboxSecretsClient{}
var _ esv1beta1.Provider = &lockboxProvider{}
// lockboxProvider is a provider for Yandex Lockbox.
type lockboxProvider struct {
yandexCloudCreator client.YandexCloudCreator