Behaviours: watts_persistent.
See also: watts_persistent_leveldb.
convert_result/1* | convert the result to a common return value. |
create_random_uuid/0* | create a random uuid for the credential. |
create_tables/0* | create the needed tables. |
credential_add/5 | store a credential for a user A callback from the watts_persistent behaviour. |
credential_get/1 | get a specific credential. |
credential_get_count/2 | get the number of credentials for a user at a service. |
credential_get_list/1 | get the list of credentials for a user A callback from the watts_persistent behaviour. |
credential_remove/2 | remove a credential of a user A callback from the watts_persistent behaviour. |
initialize/0 | initialize the sqlite database. |
is_ready/0 | return if the database is ready. |
match_spec/2* | match specifications to search within the mnesia database. |
setup_mnesia_if_needed/1* | create the schema for the mnesia database if needed. |
start_mnesia/0* | start the mnesia application. |
stop_mnesia/0* | stop the mnesia application. |
convert_result(X1::tuple()) -> {ok, any()} | {error, Reason::atom()}
convert the result to a common return value
create_random_uuid() -> binary()
create a random uuid for the credential
create_tables() -> ok
create the needed tables
credential_add(UserId::binary(), ServiceId::binary(), Interface::binary(), CredState::any(), AllowNonUniqueStates::boolean()) -> {ok, CredentialID::binary()} | {error, Reason::atom()}
store a credential for a user A callback from the watts_persistent behaviour.
credential_get(CredId::binary()) -> {ok, watts:credential()} | {error, Reason::atom()}
get a specific credential. A callback from the watts_persistent behaviour.
credential_get_count(UserId::binary(), ServiceId::binary()) -> {ok, pos_integer()}
get the number of credentials for a user at a service. A callback from the watts_persistent behaviour.
credential_get_list(UserId::binary()) -> {ok, [watts:credential()]}
get the list of credentials for a user A callback from the watts_persistent behaviour.
credential_remove(UserId::binary(), CredentialId::binary()) -> ok | {error, Reason::atom()}
remove a credential of a user A callback from the watts_persistent behaviour.
initialize() -> ok
initialize the sqlite database. A callback from the watts_persistent behaviour.
is_ready() -> true | {false, Reason::atom()}
return if the database is ready. A callback from the watts_persistent behaviour.
match_spec(CredentialUuid::binary(), UserId::binary() | undefined) -> [tuple()]
match specifications to search within the mnesia database
setup_mnesia_if_needed(X1::boolean()) -> ok
create the schema for the mnesia database if needed
start_mnesia() -> ok
start the mnesia application
stop_mnesia() -> ok
stop the mnesia application
Generated by EDoc