Dovetail v0.0.3 Dovetail.UserStore.PasswordFile
The Dovetail.Usertore.PasswordFile module provides a handler and
functions for interacting with a dovecot password file.
Summary
Functions
Append the user to store. If a user with username already exists
in the store, that users’s info will be replaced with the new user info
Decode the string or password file struct to a list of users. If attempting
to decode a non-existent file, it will return an :ok tuple wrapping an
empty list of users
Encode users into an iolist
Returns a new password file handler for path
Remove users with username from store
Types
Functions
Specs
add(t, Dovetail.User.username) ::
{:ok, t} |
{:error, term}
Append the user to store. If a user with username already exists
in the store, that users’s info will be replaced with the new user info.
This function doesn’t support concurrent use for a common store path.
Specs
decode(String.t | t) ::
{:ok, [Dovetail.User.t]} |
{:error, term}
Decode the string or password file struct to a list of users. If attempting
to decode a non-existent file, it will return an :ok tuple wrapping an
empty list of users.
Specs
remove(t, Dovetail.User.username) ::
{:ok, t} |
{:error, term}
Remove users with username from store.