Secret.Collection.prototype.search

function search(schema: Secret.Schema, attributes: {String: String}, flags: Secret.SearchFlags, cancellable: Gio.Cancellable, callback: Gio.AsyncReadyCallback): void {
    // Gjs wrapper for secret_collection_search()
}
  

Search for items matching the attributes in the @collection. The attributes should be a table of string keys and string values.

If Secret.SearchFlags.all is set in flags, then all the items matching the search will be returned. Otherwise only the first item will be returned. This is almost always the unlocked item that was most recently stored.

If Secret.SearchFlags.unlock is set in flags, then items will be unlocked if necessary. In either case, locked and unlocked items will match the search and be returned. If the unlock fails, the search does not fail.

If Secret.SearchFlags.load_secrets is set in flags, then the items will have their secret values loaded and available via Secret.Item.prototype.get_secret.

This function returns immediately and completes asynchronously.

schema

the schema for the attributes

attributes

search for items matching these attributes

flags

search option flags

cancellable

optional cancellation object

callback

called when the operation completes