Skip to main content Link Search Menu Expand Document (external link)

5.1 InitUser


InitUser(username string, password string) (userdataptr *User, err error)

Creates a new User struct and returns a pointer to it. The User struct should include all data required by the client to operate on behalf of the user.

Returns an error if:

  1. A user with the same username exists.
  2. An empty username is provided.

Parameters

username (string), password (string)

Return

userdataptr (*User), err (error)


Do not forget that your design must satisfy all requirements, including:
  • The client application must not use the local filesystem.
  • Users can have multiple active user sessions at once.