nova_session behaviour (NOVA vv0.8.0)

Link to this section Summary

Link to this section Callbacks

Specs

delete_value(SessionId) -> ok | {error, Reason :: atom()} when SessionId :: binary().

Specs

delete_value(SessionId, Key) -> ok | {error, Reason :: atom()}
                when SessionId :: binary(), Key :: binary().

Specs

get_value(SessionId, Key) -> {ok, Value :: any()} | {error, Reason :: atom()}
             when SessionId :: binary(), Key :: binary().

Specs

set_value(SessionId, Key, Value) -> ok | {error, Reason :: atom()}
             when SessionId :: binary(), Key :: binary(), Value :: binary().

Link to this section Functions

Link to this function

delete(NovaHttpState)

Specs

delete(NovaHttpState :: nova:state()) -> {ok, Req :: cowboy_req:req()} | {error, Reason :: atom()}.
Link to this function

delete(NovaHttpState, Key)

Specs

delete(NovaHttpState, Key :: binary()) ->
          {ok, NovaHttpState} | {error, Reason :: atom()} | no_return()
          when NovaHttpState :: nova:state().
Link to this function

generate_session_id()

Link to this function

get(NovaHttpState, Key)

Specs

get(NovaHttpState :: nova:state(), Key :: binary()) ->
       {ok, Value :: binary()} | {error, Reason :: atom()} | no_return().
Link to this function

set(NovaHttpState, Key, Value)

Specs

set(NovaHttpState :: nova:state(), Key :: binary(), Value :: binary()) ->
       ok | {error, Reason :: atom()} | no_return().