fuchsia.stash

PROTOCOLS

ListIterator

Defined in fuchsia.stash/stash.fidl

The iterator returned when a series of keys are being listed. Returns an empty vector when there are no more remaining ListItems.

GetNext

Request

NameType

Response

NameType
keys vector<ListItem>

GetIterator

Defined in fuchsia.stash/stash.fidl

The iterator returned when a series of keys are being read. Returns an empty vector when there are no more remaining KeyValues.

GetNext

Request

NameType

Response

NameType
kvs vector<KeyValue>

StoreAccessor

Defined in fuchsia.stash/stash.fidl

The interface returned when a new accessor is created.

GetValue

Gets a single value from the store.

Request

NameType
key string[256]

Response

NameType
val Value?

SetValue

Sets a single value in the store. Overwrites existing values. Commit() must be called for this change to take effect.

Request

NameType
key string[256]
val Value

DeleteValue

Deletes a single value in the store. Does nothing if the value doesn't exist. Commit() must be called for this change to take effect.

Request

NameType
key string[256]

ListPrefix

Lists all keys under a given prefix.

Request

NameType
prefix string[256]
it request<ListIterator>

GetPrefix

Reads the values of all keys under a given prefix.

Request

NameType
prefix string[256]
it request<GetIterator>

DeletePrefix

Deletes the all keys under a given prefix.

Request

NameType
prefix string[256]

Commit

Atomically causes all of the state modifications that happened in this accessor to take place.

Request

NameType

Flush

Atomically causes all of the state modifications that happened in this accessor to take place, returning only when those modifications were written to disk. This operation is equivalent to Commit. Returns a FlushError if this operations could not be committed.

Request

NameType

Response

NameType
result StoreAccessor_Flush_Result

Store

Defined in fuchsia.stash/stash.fidl

Interface used to interact with a given client's key/value store

Identify

Identify should be called at the beginning of a connection to identify which client service's store is to be accessed. In the future this will be deprecated in favor of component monikers, and each client will only be able to access its own store.

Request

NameType
name string[256]

CreateAccessor

Creates a accessor for interacting with the store. The resulting interface can be used to inspect and modify the state of the store.

Request

NameType
read_only bool
accessor_request request<StoreAccessor>

SecureStore

Defined in fuchsia.stash/stash.fidl

Interface used to interact with a given client's key/value store. The bytes type is disabled in this store.

Identify

Identify should be called at the beginning of a connection to identify which client service's store is to be accessed. In the future this will be deprecated in favor of component monikers, and each client will only be able to access its own store.

Request

NameType
name string[256]

CreateAccessor

Creates a accessor for interacting with the store. The resulting interface can be used to inspect and modify the state of the store.

Request

NameType
read_only bool
accessor_request request<StoreAccessor>

STRUCTS

StoreAccessor_Flush_Response

generated

NameTypeDescriptionDefault

ListItem

Defined in fuchsia.stash/stash.fidl

ListItem is returned when a series of keys are being listed.

NameTypeDescriptionDefault
key string[256] No default
type ValueType No default

KeyValue

Defined in fuchsia.stash/stash.fidl

KeyValue is used when a series of keys are being read, or the default state for the store is being set.

NameTypeDescriptionDefault
key string[256] No default
val Value No default

ENUMS

ValueType

Type: uint8

Defined in fuchsia.stash/stash.fidl

ValueType encodes a type for a field in the store

NameValueDescription
INT_VAL 1
FLOAT_VAL 2
BOOL_VAL 3
STRING_VAL 4
BYTES_VAL 5

FlushError

Type: uint32

Defined in fuchsia.stash/stash.fidl

NameValueDescription
READ_ONLY 1
COMMIT_FAILED 2

UNIONS

StoreAccessor_Flush_Result

generated

NameTypeDescription
response StoreAccessor_Flush_Response
err FlushError

Value

Defined in fuchsia.stash/stash.fidl

Value holds a value for a given key.

NameTypeDescription
intval int64
floatval float64
boolval bool
stringval string[12000]
bytesval fuchsia.mem/Buffer

CONSTANTS

NameValueTypeDescription
MAX_STRING_SIZE 12000 uint64 Strings over 12 kb will be tossed. This number is chosen arbitrarily, if you think it should be higher just ask.
MAX_KEY_SIZE 256 uint64