Package com.morpheusdata.core.cypher
Interface MorpheusCypherService
-
public interface MorpheusCypherService
This Context deals with interactions related to cyphers. It can normally be accessed via theMorpheusContext
Examples:
morpheusContext.getCypher().getRead(cypherAccess, "somekey", true);
- Since:
- 0.10.0
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description io.reactivex.Single<java.lang.Boolean>
delete(CypherAccess cypherAccess, java.lang.String key)
Delete a cypher keyio.reactivex.Single<java.lang.String>
read(CypherAccess cypherAccess, java.lang.String key)
Read the value for a keyio.reactivex.Single<java.lang.String>
readEncyptionKey(CypherAccess cypherAccess, java.lang.String key)
Read an encryption key valueio.reactivex.Single<java.lang.String>
readPassword(CypherAccess cypherAccess, java.lang.String key)
Read a password valueio.reactivex.Single<java.lang.String>
readUuid(CypherAccess cypherAccess, java.lang.String key)
Read a uuid valueio.reactivex.Single<java.lang.String>
write(CypherAccess cypherAccess, java.lang.String key, java.lang.String value, java.lang.Long leaseTimeout)
Write the value for a key
-
-
-
Method Detail
-
read
io.reactivex.Single<java.lang.String> read(CypherAccess cypherAccess, java.lang.String key)
Read the value for a key- Parameters:
cypherAccess
- CypherAccesskey
- Key to read. Relative path starting with 'secret/', 'key/', or 'password/'- Returns:
- The value for the key
-
write
io.reactivex.Single<java.lang.String> write(CypherAccess cypherAccess, java.lang.String key, java.lang.String value, java.lang.Long leaseTimeout)
Write the value for a key- Parameters:
cypherAccess
- CypherAccesskey
- Key to write. Relative path starting with 'secret/', 'key/', or 'password/'value
- the unencrypted value we wish to write to the cypherleaseTimeout
- the user specified leaseTimeout in milliseconds for when this key will expire. Only used if if CypherAccess does not container a leaseObjectRef- Returns:
- The value written
-
delete
io.reactivex.Single<java.lang.Boolean> delete(CypherAccess cypherAccess, java.lang.String key)
Delete a cypher key- Parameters:
cypherAccess
- CypherAccesskey
- Key to delete. Relative path starting with 'secret/', 'key/', or 'password/'- Returns:
- True if the key and value where deleted
-
readUuid
io.reactivex.Single<java.lang.String> readUuid(CypherAccess cypherAccess, java.lang.String key)
Read a uuid value- Parameters:
cypherAccess
- CypherAccesskey
- Key to read. If the key is not found, a new UUID will be generated, saved, and returned.- Returns:
- The value for the key
-
readEncyptionKey
io.reactivex.Single<java.lang.String> readEncyptionKey(CypherAccess cypherAccess, java.lang.String key)
Read an encryption key value- Parameters:
cypherAccess
- CypherAccesskey
- Key to read.- Returns:
- The value for the key
-
readPassword
io.reactivex.Single<java.lang.String> readPassword(CypherAccess cypherAccess, java.lang.String key)
Read a password value- Parameters:
cypherAccess
- CypherAccesskey
- Key to read- Returns:
- The value for the key
-
-