View Source nova_session behaviour (nova v0.10.1)
Summary
Callbacks
-callback delete_value(SessionId) -> ok | {error, Reason :: atom()} when SessionId :: binary().
-callback delete_value(SessionId, Key) -> ok | {error, Reason :: atom()}
when SessionId :: binary(), Key :: binary().
-callback get_value(SessionId, Key) -> {ok, Value :: any()} | {error, Reason :: atom()}
when SessionId :: binary(), Key :: binary().
-callback set_value(SessionId, Key, Value) -> ok | {error, Reason :: atom()}
when SessionId :: binary(), Key :: binary(), Value :: binary().
Functions
-spec delete(Req :: cowboy_req:req()) -> {ok, Req :: cowboy_req:req()} | {error, Reason :: atom()}.
-spec delete(Req :: cowboy_req:req(), Key :: binary()) -> {ok, Req :: cowboy_req:req()} | {error, Reason :: atom()} | no_return().
-spec get(Req :: cowboy_req:req(), Key :: binary()) -> {ok, Value :: binary()} | {error, Reason :: atom()} | no_return().
-spec set(Req :: cowboy_req:req(), Key :: binary(), Value :: binary()) -> ok | {error, Reason :: atom()} | no_return().