UserService

Service for Users.

Author

Jan Müller
interface UserService

Functions

createUser
Link copied to clipboard
Creates a User. Must validate that the User does not exist and the data is valid. Must hash the password.
abstract suspend fun createUser(partialUser: PartialUser): Result<String>
deleteUserById
Link copied to clipboard
Deletes a User by id. Must validate that the User exists.
abstract suspend fun deleteUserById(id: String): Result<String>
equals
Link copied to clipboard
open operator override fun equals(other: Any?): Boolean
getAllUsers
Link copied to clipboard
Returns all Users.
abstract suspend fun getAllUsers(): Result<List<UserListEntry>>
getUserById
Link copied to clipboard
Returns the User with the given id. Must validate that the User exists.
abstract suspend fun getUserById(id: String): Result<UserProfile>
hashCode
Link copied to clipboard
open override fun hashCode(): Int
login
Link copied to clipboard
Performs a login using the given Credentials. Must validate that the User exists and that the credentials are valid.
abstract suspend fun login(credentials: Credentials): Result<Token>
toString
Link copied to clipboard
open override fun toString(): String
updateUser
Link copied to clipboard
Updates a User. Must validate that the User exists and the data is valid. Must hash the password.
abstract suspend fun updateUser(partialUser: PartialUser): Result<String>

Inheritors

DefaultUserService
Link copied to clipboard