Packages

A modular first authentication base

Current section

Files

Jump to
gauth src gauth@user@creation@simple.erl
Raw

src/gauth@user@creation@simple.erl

-module(gauth@user@creation@simple).
-compile([no_auto_import, nowarn_unused_vars, nowarn_unused_function, nowarn_nomatch]).
-export([new/0]).
-if(?OTP_RELEASE >= 27).
-define(MODULEDOC(Str), -moduledoc(Str)).
-define(DOC(Str), -doc(Str)).
-else.
-define(MODULEDOC(Str), -compile([])).
-define(DOC(Str), -compile([])).
-endif.
-file("src\\gauth\\user\\creation\\simple.gleam", 18).
?DOC(" Creates a stub user\n").
-spec create_user(binary()) -> gauth@user:user(integer()).
create_user(Name) ->
{user, 0, Name}.
-file("src\\gauth\\user\\creation\\simple.gleam", 24).
?DOC(
" Returns a UserCreationService that blindly instantiates a user with the provided name.\n"
" Is only indended for development purposes as no data is persisted.\n"
).
-spec new() -> gauth@user@creation:user_creation_service(integer()).
new() ->
_pipe = fun create_user/1,
{user_creation_service, _pipe, [], [], []}.