Package codes.grow.packages.vault
Class KvV2
java.lang.Object
codes.grow.packages.vault.KvV2
- All Implemented Interfaces:
Kv
KV version 2 (versioned) mount.
-
Method Summary
Modifier and TypeMethodDescriptiondeleteAsync(String path) Asynchronous delete.deleteMetadataAsync(String path) Asynchronous deleteMetadata.deleteVersionsAsync(String path, List<Integer> versions) Asynchronous deleteVersions.destroyAsync(String path, List<Integer> versions) Asynchronous destroy.Asynchronous list.mount()Returns the mount path.patchAsync(String path, Map<String, ?> data, Integer cas) Asynchronous patch.Asynchronous read.readMetadataAsync(String path) Asynchronous readMetadata.toString()undeleteAsync(String path, List<Integer> versions) Asynchronous undelete.intversion()Returns the KV version.writeAsync(String path, Map<String, ?> data, Integer cas) Asynchronous write.writeMetadataAsync(String path, KvMetadataOptions o) Asynchronous writeMetadata.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface codes.grow.packages.vault.Kv
delete, deleteMetadata, deleteVersions, destroy, list, patch, patch, read, read, readMetadata, undelete, write, write, writeMetadata
-
Method Details
-
mount
Description copied from interface:KvReturns the mount path. -
version
public int version()Returns the KV version.- Returns:
- always 2
-
readAsync
Description copied from interface:KvAsynchronous read. -
writeAsync
public CompletableFuture<Optional<KvVersionMetadata>> writeAsync(String path, Map<String, ?> data, Integer cas) Description copied from interface:KvAsynchronous write.- Specified by:
writeAsyncin interfaceKv- Parameters:
path- secret pathdata- data mapcas- expected current version, or null- Returns:
- a future with the new version metadata
-
patchAsync
public CompletableFuture<KvVersionMetadata> patchAsync(String path, Map<String, ?> data, Integer cas) Description copied from interface:KvAsynchronous patch.- Specified by:
patchAsyncin interfaceKv- Parameters:
path- secret pathdata- fields to mergecas- expected current version, or null- Returns:
- a future with the new version metadata
-
deleteAsync
Description copied from interface:KvAsynchronous delete.- Specified by:
deleteAsyncin interfaceKv- Parameters:
path- secret path- Returns:
- a future completed when done
-
deleteVersionsAsync
Description copied from interface:KvAsynchronous deleteVersions.- Specified by:
deleteVersionsAsyncin interfaceKv- Parameters:
path- secret pathversions- versions- Returns:
- a future completed when done
-
undeleteAsync
Description copied from interface:KvAsynchronous undelete.- Specified by:
undeleteAsyncin interfaceKv- Parameters:
path- secret pathversions- versions- Returns:
- a future completed when done
-
destroyAsync
Description copied from interface:KvAsynchronous destroy.- Specified by:
destroyAsyncin interfaceKv- Parameters:
path- secret pathversions- versions- Returns:
- a future completed when done
-
listAsync
Description copied from interface:KvAsynchronous list. Vault OSS lists have no pagination: every key is returned at once. -
readMetadataAsync
Description copied from interface:KvAsynchronous readMetadata.- Specified by:
readMetadataAsyncin interfaceKv- Parameters:
path- secret path- Returns:
- a future with the metadata
-
writeMetadataAsync
Description copied from interface:KvAsynchronous writeMetadata.- Specified by:
writeMetadataAsyncin interfaceKv- Parameters:
path- secret patho- settings- Returns:
- a future completed when done
-
deleteMetadataAsync
Description copied from interface:KvAsynchronous deleteMetadata.- Specified by:
deleteMetadataAsyncin interfaceKv- Parameters:
path- secret path- Returns:
- a future completed when done
-
toString
-