Class LocalStorageSecretClient

java.lang.Object
io.datarouter.secret.client.local.LocalStorageSecretClient
All Implemented Interfaces:
SecretClient

public class LocalStorageSecretClient
extends java.lang.Object
implements SecretClient
This is an implementation of SecretClient that stores all Secrets in a local plaintext properties file. It is only suitable for local development work, since all storage is plaintext.
  • Nested Class Summary

    Nested classes/interfaces inherited from interface io.datarouter.secret.client.SecretClient

    SecretClient.SecretClientSupplier
  • Constructor Summary

    Constructors 
    Constructor Description
    LocalStorageSecretClient​(LocalStorageConfig config)  
  • Method Summary

    Modifier and Type Method Description
    void create​(Secret secret)
    write the specified Secret to the secret storage for the first time
    void delete​(java.lang.String name)
    delete the named Secret from the secret storage
    java.util.List<java.lang.String> listNames​(java.util.Optional<java.lang.String> exclusivePrefix)
    returns the full Secret names that start with exclusive prefix
    Secret read​(java.lang.String name)
    read the Secret with the given name and return a Secret
    void update​(Secret secret)
    update the current value of the Secret in the secret storage

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

    Methods inherited from interface io.datarouter.secret.client.SecretClient

    create, update, validateName, validateSecret