|
int | golioth_lightdb_get_cb (struct golioth_client *client, const uint8_t *path, enum golioth_content_format format, golioth_req_cb_t cb, void *user_data) |
| Get value from Golioth's LightDB (callback based) More...
|
|
int | golioth_lightdb_get (struct golioth_client *client, const uint8_t *path, enum golioth_content_format format, uint8_t *data, size_t *len) |
| Get value from Golioth's LightDB (synchronous, into preallocated buffer) More...
|
|
int | golioth_lightdb_set_cb (struct golioth_client *client, const uint8_t *path, enum golioth_content_format format, const uint8_t *data, size_t data_len, golioth_req_cb_t cb, void *user_data) |
| Set value to Golioth's LightDB (callback based) More...
|
|
int | golioth_lightdb_set (struct golioth_client *client, const uint8_t *path, enum golioth_content_format format, const uint8_t *data, size_t data_len) |
| Set value to Golioth's LightDB (synchronously) More...
|
|
int | golioth_lightdb_observe_cb (struct golioth_client *client, const uint8_t *path, enum golioth_content_format format, golioth_req_cb_t cb, void *user_data) |
| Observe value in Golioth's LightDB (callback based) More...
|
|
int | golioth_lightdb_delete_cb (struct golioth_client *client, const uint8_t *path, golioth_req_cb_t cb, void *user_data) |
| Delete value in Golioth's LightDB (callback based) More...
|
|
int | golioth_lightdb_delete (struct golioth_client *client, const uint8_t *path) |
| Delete value in Golioth's LightDB (synchronous) More...
|
|
Functions for interacting with the Golioth LightDB service
◆ golioth_lightdb_delete()
int golioth_lightdb_delete |
( |
struct golioth_client * |
client, |
|
|
const uint8_t * |
path |
|
) |
| |
Delete value in Golioth's LightDB (synchronous)
Synchronously delete value in Golioth's LightDB.
- Parameters
-
[in] | client | Client instance |
[in] | path | LightDB resource path |
- Return values
-
◆ golioth_lightdb_delete_cb()
Delete value in Golioth's LightDB (callback based)
Asynchronously request to delete value in Golioth's LightDB and let cb
be invoked when server acknowledges it or some error condition happens.
- Warning
- Experimental API
- Parameters
-
[in] | client | Client instance |
[in] | path | LightDB resource path |
[in] | cb | Callback executed on acknowledgment received, timeout or error |
[in] | user_data | User data passed to cb |
- Return values
-
◆ golioth_lightdb_get()
Get value from Golioth's LightDB (synchronous, into preallocated buffer)
Synchronously get value from Golioth's LightDB and store it into preallocated buffer.
- Parameters
-
[in] | client | Client instance |
[in] | path | LightDB resource path |
[in] | format | Requested format of payload |
[in] | data | Buffer for received data |
[in,out] | len | Size of buffer on input, size of response on output |
- Return values
-
◆ golioth_lightdb_get_cb()
Get value from Golioth's LightDB (callback based)
Asynchronously request value from Golioth's LightDB and let cb
be invoked when such value is retrieved or some error condtition happens.
- Warning
- Experimental API
- Parameters
-
[in] | client | Client instance |
[in] | path | LightDB resource path |
[in] | format | Requested format of payload |
[in] | cb | Callback executed on response received, timeout or error |
[in] | user_data | User data passed to cb |
- Return values
-
◆ golioth_lightdb_observe_cb()
Observe value in Golioth's LightDB (callback based)
Asynchronously request to observe value in Golioth's LightDB and let cb
be invoked when such value is retrieved (for the first time or after an update) or some error condition happens.
- Warning
- Experimental API
- Parameters
-
[in] | client | Client instance |
[in] | path | LightDB resource path |
[in] | format | Requested format of payload |
[in] | cb | Callback executed on response received, timeout or error |
[in] | user_data | User data passed to cb |
- Return values
-
◆ golioth_lightdb_set()
Set value to Golioth's LightDB (synchronously)
Synchronously set new value to LightDB.
- Parameters
-
[in] | client | Client instance |
[in] | path | LightDB resource path |
[in] | format | Format of payload |
[in] | data | Payload data |
[in] | data_len | Payload length |
- Return values
-
◆ golioth_lightdb_set_cb()
Set value to Golioth's LightDB (callback based)
Asynchronously request to store new value to LightDB and let cb
be invoked when such value is actually stored or some error condition happens.
- Warning
- Experimental API
- Parameters
-
[in] | client | Client instance |
[in] | path | LightDB resource path |
[in] | format | Requested format of payload |
[in] | data | Pointer to data to be set |
[in] | data_len | Length of data to be set |
[in] | cb | Callback executed on response received, timeout or error |
[in] | user_data | User data passed to cb |
- Return values
-