Module m_client_local_storage

Store information in the localStorage on the client.

Copyright © 2019 Marc Worrell

Authors: Marc Worrell (marc@worrell.nl).

Description

Store information in the localStorage on the client.

Data Types

error()

error() = timeout | no_client | invalid_topic | forged | badarg | expired

key()

key() = binary() | atom()

value()

value() = number() | boolean() | binary() | #{key() => value()} | tuple()

Function Index

delete/2
delete/3
device_id/1
get/2
get/3
get_secure/2
put/3
put/4
put_secure/4

Function Details

delete/2

delete(Key::key(), Context::z:context()) -> ok | {error, error()}

delete/3

delete(Key::key(), BridgeTopic::mqtt_sessions:topic(), Context::z:context()) -> ok | {error, error()}

device_id/1

device_id(Context::z:context()) -> {{ok, binary()}, z:context()} | {{error, error()}, z:context()}

get/2

get(Key::key(), Context::z:context()) -> {ok, value()} | {error, error()}

get/3

get(Key::key(), BridgeTopic::mqtt_sessions:topic(), Context::z:context()) -> {ok, value()} | {error, error()}

get_secure/2

get_secure(Key::key(), Context::z:context()) -> ok | {error, error()}

put/3

put(Key::key(), Value::value(), Context::z:context()) -> ok | {error, error()}

put/4

put(Key::key(), Value::value(), BridgeTopic::mqtt_sessions:topic(), Context::z:context()) -> ok | {error, error()}

put_secure/4

put_secure(Key::key(), Value::value(), TTL::pos_integer(), Context::z:context()) -> ok | {error, error()}


Generated by EDoc