AtClient class abstract
Interface for a client application that can communicate with a secondary server.
- Implementers
Constructors
- AtClient()
Properties
- atChops ↔ AtChops?
-
Set an instance of
AtChopsfor data encryption and signing operationsgetter/setter pair - encryptionService → EncryptionService?
-
no setter
- enrollmentId ↔ String?
-
Enrollment id for apkam enrolled clients
getter/setter pair
- enrollmentService ↔ EnrollmentService?
-
getter/setter pair
- hashCode → int
-
The hash code for this object.
no setterinherited
- notificationService ↔ NotificationService
-
getter/setter pair
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- syncService ↔ SyncService
-
getter/setter pair
- telemetry ↔ AtTelemetryService?
-
getter/setter pair
Methods
-
delete(
AtKey key, {bool isDedicated = false, DeleteRequestOptions? deleteRequestOptions}) → Future< bool> -
Delete the
keyfrom user's local secondary and syncs the delete to cloud secondary if client's sync preference is immediate. By default namespace that is used to create the AtClient instance will be appended to the key. phone@alice translates to phone.persona@alice where 'persona' is the namespace. If you want to ignoring the namespace setAtKey.metadata.namespaceAwareto false. -
downloadFile(
String transferId, String? downloadPath}) → Future< List< File> > -
Downloads the list of files for a given
transferIdshared bysharedByAtSignOptionally you can passdownloadPathto download the files. -
get(
AtKey key, {bool isDedicated = false, GetRequestOptions? getRequestOptions}) → Future< AtValue> -
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.isPublicto true. If the key was shared with another atSign set AtKey.sharedWith -
getAtKeys(
{String? regex, bool showHiddenKeys = false, bool useRemoteAtServer = false}) → Future< List< AtKey> > -
Get all the keys stored in user's secondary in AtKey format. If
regexis specified only matching keys are returned. IfsharedByis specified, then gets the keys fromsharedByuser shared with current atClient user. IfsharedWithis specified, then gets the keys shared tosharedWithuser from the current atClient user. -
getCurrentAtSign(
) → String? - Note - this method name is misleading as 'current' implies the atSign could change - but an AtClient should only ever have one atSign.
-
getKeys(
{String? regex, bool showHiddenKeys = false, bool useRemoteAtServer = false}) → Future< List< String> > -
Get all the keys stored in user's secondary in string format. If
regexis specified only matching keys are returned. IfsharedByis specified, then gets the keys fromsharedByuser shared with current atClient user. IfsharedWithis specified, then gets the keys shared tosharedWithuser from the current atClient user. -
getLocalSecondary(
) → LocalSecondary? -
getMeta(
AtKey key) → Future< Metadata?> - Gets the metadata of AtKey.key
-
getOTP(
) → Future< AtResponse> - Returns an OTP (One-Time Password) from the secondary server.
-
getPreferences(
) → AtClientPreference? -
getRemoteSecondary(
) → RemoteSecondary? - Returns a RemoteSecondary to communicate with user's cloud secondary server.
-
getSyncManager(
) → SyncManager? - Deprecated Use AtClient.syncService
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
notify(
AtKey key, String value, OperationEnum operation, {MessageTypeEnum? messageType, PriorityEnum? priority, StrategyEnum? strategy, int? latestN, String? notifier, bool isDedicated = false}) → Future< bool> -
Notifies the AtKey with the
sharedWithuser of the atsign. Optionally, operation, value and metadata can be set along with key to notify. -
notifyAll(
AtKey atKey, String value, OperationEnum operation) → Future< String> -
Notifies the AtKey with the list of
sharedWithuser's of the atsign. Optionally, operation, value and metadata can be set along with the key to notify. -
notifyChange(
NotificationParams notificationParams) → Future< String?> -
Notifies the NotificationParams.atKey to
notificationParams.atKey.sharedWithuser of the atSign. Optionally, operation, value and metadata can be set along with key to notify. -
notifyList(
{String? fromDate, String? toDate, String? regex}) → Future< String> - Returns the list of received notifications of an atsign, Optionally, notifications can be filtered on from date, to date and regular expression
-
notifyStatus(
String notificationId) → Future< String> - Returns the status of the notification
-
put(
AtKey key, dynamic value, {bool isDedicated = false, PutRequestOptions? putRequestOptions}) → Future< bool> -
Updates value of AtKey.key is if it is already present. Otherwise creates a new key. Set AtKey.sharedWith if the key
has to be shared with another atSign. Set
AtKey.metadata.isBinaryif you are updating binary value e.g image,file. By default namespace that is used to create the AtClient instance will be appended to the key. phone@alice will be saved as phone.persona@alice where 'persona' is the namespace. If you want to save by ignoring the namespace setAtKey.metadata.namespaceAwareto false. Additional metadata can be set using AtKey.metadata -
putBinary(
AtKey atKey, List< int> value, {PutRequestOptions? putRequestOptions}) → Future<AtResponse> - Used when storing binary data - e.g. images, files etc. See also AtClient.put and AtClient.putText
-
putMeta(
AtKey key) → Future< bool> -
Updates the metadata of AtKey.key if it is already present. Otherwise creates a new key without a value.
By default namespace that is used to create the AtClient instance will be appended to the key. phone@alice will be saved as
phone.persona@alice where 'persona' is the namespace. If you want to save by ignoring the namespace set
AtKey.metadata.namespaceAwareto false. -
putText(
AtKey atKey, String value, {PutRequestOptions? putRequestOptions}) → Future< AtResponse> - Used to store the textual data into the keystore. Updates value of AtKey.key is if it is already present. Otherwise creates a new key. Set AtKey.sharedWith if the key has to be shared with another atSign. By default namespace that is used to create the AtClient instance will be appended to the key. phone@alice will be saved as phone.persona@alice where 'persona' is the namespace.
-
reuploadFiles(
List< File> files, FileTransferObject fileTransferObject) → Future<List< FileStatus> > -
re uploads file in
fileTransferObject.fileUrlreturns list ofFileStatuswhich contains upload status of each file. -
sendStreamAck(
String streamId, String fileName, int fileLength, String senderAtSign, Function streamCompletionCallBack, Function streamReceiveCallBack) → Future< void> - Sends stream acknowledgement
-
setPreferences(
AtClientPreference preference) → void - Sets the preferences such as sync strategy, storage path etc., for the client.
-
setSPP(
String otp) → Future< AtResponse> - Sets a Semi Permanent Passcode(SPP) in the secondary server key-store. A Semi Permanent Passcode (SPP) is 6 character alpha-numeric for submitting an enrollment request. Only the connections which have access to manage namespace are allowed to set SPP
-
re sends file notifications to
sharedWithAtSignsreturns Map<String, FileTransferObject> which contains transfer status for each atsign. -
startCompactionJob(
{Duration? commitLogCompactionDuration}) → Future< void> - Initiates a compaction job for the commit log.
-
startMonitor(
String privateKey, Function acceptStream, {String? regex}) → Future< void> - Creates a monitor connection to atSign's cloud secondary server.Whenever a notification is created on the server, monitor receives the notification on the client. Optionally a regular expression and be passed to filter the notifications deprecated Use NotificationService.subscribe
-
stopCompactionJob(
) → Future< void> - Stops the commit log compaction job
-
stream(
String filePath, {String namespace}) → Future< AtStreamResponse> -
Streams the file in
filePathtosharedWithatSign. -
toString(
) → String -
A string representation of this object.
inherited
-
uploadFile(
List< File> files, ) → Future<Map< String, FileTransferObject> > -
Uploads list of
filesto filebin and shares the file download url withsharedWithAtSignsreturns map containing key of each sharedWithAtSign and value ofFileTransferObject
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited