Class MemorySecretClient
java.lang.Object
io.datarouter.secret.client.memory.MemorySecretClient
- All Implemented Interfaces:
SecretClient
public class MemorySecretClient extends java.lang.Object implements SecretClient
-
Nested Class Summary
Nested classes/interfaces inherited from interface io.datarouter.secret.client.SecretClient
SecretClient.SecretClientSupplier -
Constructor Summary
Constructors Constructor Description MemorySecretClient()MemorySecretClient(java.util.Map<java.lang.String,java.lang.String> secrets) -
Method Summary
Modifier and Type Method Description voidcreate(Secret secret)write the specifiedSecretto the secret storage for the first timevoiddelete(java.lang.String name)delete the namedSecretfrom the secret storagejava.util.List<java.lang.String>listNames(java.util.Optional<java.lang.String> exclusivePrefix)returns the fullSecretnames that start with exclusive prefixSecretread(java.lang.String name)voidupdate(Secret secret)update the current value of theSecretin the secret storageMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface io.datarouter.secret.client.SecretClient
create, update, validateName, validateSecret
-
Constructor Details
-
MemorySecretClient
public MemorySecretClient() -
MemorySecretClient
public MemorySecretClient(java.util.Map<java.lang.String,java.lang.String> secrets)
-
-
Method Details
-
create
Description copied from interface:SecretClientwrite the specifiedSecretto the secret storage for the first time- Specified by:
createin interfaceSecretClient
-
read
Description copied from interface:SecretClient- Specified by:
readin interfaceSecretClient
-
listNames
public final java.util.List<java.lang.String> listNames(java.util.Optional<java.lang.String> exclusivePrefix)Description copied from interface:SecretClientreturns the fullSecretnames that start with exclusive prefix- Specified by:
listNamesin interfaceSecretClient
-
update
Description copied from interface:SecretClientupdate the current value of theSecretin the secret storage- Specified by:
updatein interfaceSecretClient
-
delete
public final void delete(java.lang.String name)Description copied from interface:SecretClientdelete the namedSecretfrom the secret storage- Specified by:
deletein interfaceSecretClient
-