Interface SecretManagerClient

  • All Known Implementing Classes:
    DefaultSecretManagerClient

    public interface SecretManagerClient
    This interface is intended to abstract interactions with SecretManagerServiceClient, and instead of returning Google's ApiFuture transform it on reactive extensions.
    Since:
    3.4.0
    Author:
    Vinicius Carvalho
    • Field Summary

      Fields 
      Modifier and Type Field Description
      static java.lang.String LATEST  
    • Method Summary

      All Methods Instance Methods Abstract Methods 
      Modifier and Type Method Description
      io.reactivex.Maybe<VersionedSecret> getSecret​(java.lang.String secretId)
      Fetches a secret from the Secret Manager storage using the `gcp.projectId` project, and "latest" as the version.
      io.reactivex.Maybe<VersionedSecret> getSecret​(java.lang.String secretId, java.lang.String version)
      Fetches a secret from the Secret Manager storage using the `gcp.projectId` project.
      io.reactivex.Maybe<VersionedSecret> getSecret​(java.lang.String secretId, java.lang.String version, java.lang.String projectId)
      Fetches a secret from the Secret Manager storage.
    • Method Detail

      • getSecret

        io.reactivex.Maybe<VersionedSecret> getSecret​(java.lang.String secretId)
        Fetches a secret from the Secret Manager storage using the `gcp.projectId` project, and "latest" as the version.
        Parameters:
        secretId - - name of the secret
        Returns:
        String value of the secret or empty
      • getSecret

        io.reactivex.Maybe<VersionedSecret> getSecret​(java.lang.String secretId,
                                                      java.lang.String version)
        Fetches a secret from the Secret Manager storage using the `gcp.projectId` project.
        Parameters:
        secretId - - name of the secret
        version - - version of the secret
        Returns:
        String value of the secret or empty
      • getSecret

        io.reactivex.Maybe<VersionedSecret> getSecret​(java.lang.String secretId,
                                                      java.lang.String version,
                                                      java.lang.String projectId)
        Fetches a secret from the Secret Manager storage.
        Parameters:
        secretId - - name of the secret
        version - - version of the secret
        projectId - - project identifier
        Returns:
        String value of the secret or empty