From 0325ab56fb0c9cab09d6eb130e5a10f452a32822 Mon Sep 17 00:00:00 2001 From: Till Faelligen Date: Mon, 1 Jun 2020 17:58:47 +0200 Subject: [PATCH] Add documentation to CreateAccount --- clientapi/auth/storage/accounts/interface.go | 3 +++ 1 file changed, 3 insertions(+) diff --git a/clientapi/auth/storage/accounts/interface.go b/clientapi/auth/storage/accounts/interface.go index a860f809d..4d1941a23 100644 --- a/clientapi/auth/storage/accounts/interface.go +++ b/clientapi/auth/storage/accounts/interface.go @@ -29,6 +29,9 @@ type Database interface { GetProfileByLocalpart(ctx context.Context, localpart string) (*authtypes.Profile, error) SetAvatarURL(ctx context.Context, localpart string, avatarURL string) error SetDisplayName(ctx context.Context, localpart string, displayName string) error + // CreateAccount makes a new account with the given login name and password, and creates an empty profile + // for this account. If no password is supplied, the account will be a passwordless account. If the + // account already exists, it will return nil, ErrUserExists. CreateAccount(ctx context.Context, localpart, plaintextPassword, appserviceID string) (*authtypes.Account, error) CreateGuestAccount(ctx context.Context) (*authtypes.Account, error) UpdateMemberships(ctx context.Context, eventsToAdd []gomatrixserverlib.Event, idsToRemove []string) error