|
|
@@ -26,26 +26,31 @@ var _ esv1beta1.SecretsClient = &yandexCloudSecretsClient{}
|
|
|
// Implementation of v1beta1.SecretsClient.
|
|
|
type yandexCloudSecretsClient struct {
|
|
|
secretGetter SecretGetter
|
|
|
+ secretSetter SecretSetter
|
|
|
iamToken string
|
|
|
}
|
|
|
|
|
|
-func (c *yandexCloudSecretsClient) GetAllSecrets(ctx context.Context, ref esv1beta1.ExternalSecretFind) (map[string][]byte, error) {
|
|
|
- // TO be implemented
|
|
|
- return nil, fmt.Errorf("GetAllSecrets not supported")
|
|
|
-}
|
|
|
-
|
|
|
func (c *yandexCloudSecretsClient) GetSecret(ctx context.Context, ref esv1beta1.ExternalSecretDataRemoteRef) ([]byte, error) {
|
|
|
return c.secretGetter.GetSecret(ctx, c.iamToken, ref.Key, ref.Version, ref.Property)
|
|
|
}
|
|
|
|
|
|
+func (c *yandexCloudSecretsClient) SetSecret() error {
|
|
|
+ return fmt.Errorf("not implemented")
|
|
|
+}
|
|
|
+
|
|
|
+func (c *yandexCloudSecretsClient) Validate() (esv1beta1.ValidationResult, error) {
|
|
|
+ return esv1beta1.ValidationResultReady, nil
|
|
|
+}
|
|
|
+
|
|
|
func (c *yandexCloudSecretsClient) GetSecretMap(ctx context.Context, ref esv1beta1.ExternalSecretDataRemoteRef) (map[string][]byte, error) {
|
|
|
return c.secretGetter.GetSecretMap(ctx, c.iamToken, ref.Key, ref.Version)
|
|
|
}
|
|
|
|
|
|
-func (c *yandexCloudSecretsClient) Close(ctx context.Context) error {
|
|
|
- return nil
|
|
|
+func (c *yandexCloudSecretsClient) GetAllSecrets(ctx context.Context, ref esv1beta1.ExternalSecretFind) (map[string][]byte, error) {
|
|
|
+ // TO be implemented
|
|
|
+ return nil, fmt.Errorf("GetAllSecrets not supported")
|
|
|
}
|
|
|
|
|
|
-func (c *yandexCloudSecretsClient) Validate() (esv1beta1.ValidationResult, error) {
|
|
|
- return esv1beta1.ValidationResultReady, nil
|
|
|
+func (c *yandexCloudSecretsClient) Close(ctx context.Context) error {
|
|
|
+ return nil
|
|
|
}
|