Astarte.Device.InMemoryStorage (astarte_device v1.0.0-beta.2)

A simple implementation of the Astarte.Device.CredentialStorage behaviour as an in-memory map.

Note that using this the device will regenerate its credentials and request a new certificate every time since they're not persisted to disk.

Link to this section Summary

Functions

Returns the credential from the map.

Returns true if the credential storage contains :certificate, false otherwise.

Returns true if the credential storage contains :private_key and :csr, false otherwise.

Initializes the empty map.

Stores the credential in the map.

Link to this section Functions

Link to this function

fetch(key, state)

Returns the credential from the map.

Link to this function

has_certificate?(state)

Returns true if the credential storage contains :certificate, false otherwise.

Link to this function

has_keypair?(state)

Returns true if the credential storage contains :private_key and :csr, false otherwise.

Initializes the empty map.

Link to this function

save(key, value, state)

Stores the credential in the map.