Astarte.Device.InMemoryStorage (astarte_device v1.1.1)
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
fetch(key, state)
Returns the credential from the map.
has_certificate?(state)
Returns true
if the credential storage contains :certificate
, false
otherwise.
has_keypair?(state)
Returns true
if the credential storage contains :private_key
and :csr
, false
otherwise.
init(args)
Initializes the empty map.
save(key, value, state)
Stores the credential in the map.