MCPcopy Create free account
hub / github.com/chirpstack/chirpstack / get

Function get

chirpstack/src/storage/device_keys.rs:56–63  ·  view source on GitHub ↗
(dev_eui: &EUI64)

Source from the content-addressed store, hash-verified

54}
55
56pub async fn get(dev_eui: &EUI64) -> Result<DeviceKeys, Error> {
57 let dk = device_keys::dsl::device_keys
58 .find(&dev_eui)
59 .first(&mut get_async_db_conn().await?)
60 .await
61 .map_err(|e| Error::from_diesel(e, dev_eui.to_string()))?;
62 Ok(dk)
63}
64
65pub async fn update(dk: DeviceKeys) -> Result<DeviceKeys, Error> {
66 let dk: DeviceKeys = diesel::update(device_keys::dsl::device_keys.find(&dk.dev_eui))

Callers 1

test_device_keysFunction · 0.70

Calls 2

to_stringMethod · 0.80
get_async_db_connFunction · 0.70

Tested by 1

test_device_keysFunction · 0.56