get abstract method
- AtKey key, {
- bool isDedicated = false,
- GetRequestOptions? getRequestOptions,
Get the value of AtKey.key from user's cloud secondary if AtKey.sharedBy is set. Otherwise looks up the key from local secondary.
If the key was stored with public access, set AtKey.metadata.isPublic
to true. If the key was shared with another atSign set AtKey.sharedWith
isDedicated
is currently ignored and will be removed in next major version
e.g alice is current atsign
llookup:phone@alice
var atKey = AtKey()..key='phone'
get(atKey);
llookup:public:phone@alice
var metaData = Metadata()..isPublic=true;
var atKey = AtKey()..key='phone'
..metadata=metaData
get(atKey);
lookup:phone@bob
var metaData = Metadata()..sharedWith='@bob';
var key = AtKey()..key='phone'
..metadata=metaData
get(key);
llookup:@alice:phone.persona@alice
var key = AtKey()..key='phone'
..sharedWith='@alice'
get(key);
llookup:@alice:phone@alice
var metaData = Metadata()..namespaceAware=false
var key = AtKey()..key='phone'
..sharedWith='@alice'
get(key);
plookup public phone number of @bob
plookup:phone@bob
var metadata = Metadata()..isPublic=true;
var publicPhoneKey = AtKey()..key = 'phone'
..sharedBy = '@bob'
..metadata = metadata;
get(publicPhoneKey);
@alice : update:@bob:phone.personal@alice
@bob : lookup:phone.persona@alice
var key = AtKey()..key='phone'
..sharedBy='@bob';
get(key);
lookup:public:phone@alice
var metaData = Metadata()..isPublic=true
..namespaceAware='false'
var key = AtKey()..key='phone'
..metadata=metaData
get(key);
Throws AtKeyException for the invalid key formed
Throws AtDecryptionException if fails to decrypt the value
Throws AtPrivateKeyNotFoundException if the encryption private key is not found to decrypt the value
Throws AtPublicKeyChangeException if the encryption public key used encrypt the value is different from the current encryption public key(at the time of decryption)
Throws SharedKeyNotFoundException if the shared key to decrypt the value is not found
Throws SelfKeyNotFoundException if the self encryption key is not found.
Throws AtClientException if the cloud secondary is invalid or not reachable
Implementation
Future<AtValue> get(AtKey key,
{bool isDedicated = false, GetRequestOptions? getRequestOptions});