Namespace org.wasmcloud.interface.keyvalue

Contains(operation)

returns whether the store contains the key

input: String
output: Boolean

Traits

readonly [object]

Del(operation)

Deletes a key, returning true if the key was deleted

input: String
output: Boolean

Get(operation)

Gets a value for a specified key. If the key exists, the return structure contains exists: true and the value, otherwise the return structure contains exists == false.

input: String
output: GetResponse

Traits

readonly [object]

GetResponse(structure)

Response to get request

exists: Boolean whether or not the value existed
value: String the value, if it existed

Increment(operation)

Increments a numeric value, returning the new value

IncrementRequest(structure)

key: String name of value to increment
value: org.wasmcloud.model#I32 amount to add to value

KeyValue(service)

Traits

org.wasmcloud.model#wasmbus [object]

ListAdd(operation)

Append a value onto the end of a list. Returns the new list size

ListAddRequest(structure)

Parameter to ListAdd operation

listName: String name of the list to modify
value: String value to append to the list

ListClear(operation)

Deletes a list and its contents input: list name output: true if the list existed and was deleted

input: String
output: Boolean

ListDel(operation)

Deletes a value from a list. Returns true if the item was removed.

input: ListDelRequest
output: Boolean

ListDelRequest(structure)

Removes an item from the list. If the item occurred more than once, removes only the first item. Returns true if the item was found.

listName: String name of list to modify
value: String

ListRange(operation)

Retrieves a range of values from a list using 0-based indices. Start and end values are inclusive, for example, (0,10) returns 11 items if the list contains at least 11 items. If the stop value is beyond the end of the list, it is treated as the end of the list.

input: ListRangeRequest
output: StringList

ListRangeRequest(structure)

listName: String name of list
start: org.wasmcloud.model#I32 start index of the range, 0-based, inclusive.
stop: org.wasmcloud.model#I32 end index of the range, 0-based, inclusive.

Set(operation)

Sets the value of a key. expires is an optional number of seconds before the value should be automatically deleted, or 0 for no expiration.

input: SetRequest

SetAdd(operation)

Add an item into a set. Returns number of items added (1 or 0)

SetAddRequest(structure)

setName: String name of the set
value: String value to add to the set

SetClear(operation)

clears all values from the set and removes it input: set name output: true if the set existed and was deleted

input: String
output: Boolean

SetDel(operation)

Deletes an item from the set. Returns number of items removed from the set (1 or 0)

SetDelRequest(structure)

setName: String
value: String

SetIntersection(operation)

perform intersection of sets and returns values from the intersection. input: list of sets for performing intersection (at least two) output: values

input: StringList
output: StringList

SetQuery(operation)

Retrieves all items from a set input: String output: set members

input: String
output: StringList

SetRequest(structure)

expires: org.wasmcloud.model#U32 expiration time in seconds 0 for no expiration
key: String the key name to change (or create)
value: String the new value

SetUnion(operation)

perform union of sets and returns values from the union input: list of sets for performing union (at least two) output: union of values

input: StringList
output: StringList

StringList(list)

list of strings

member: String