MemoryUserRepositoryImpl

@Singleton
@Requires(env = ["dev"])
class MemoryUserRepositoryImpl(val repository: InMemoryRepository<UserId, User> = InMemoryRepository()) : MemoryUserRepository

Constructors

Link copied to clipboard
constructor(repository: InMemoryRepository<UserId, User> = InMemoryRepository())

Properties

Link copied to clipboard

Backing in-memory key-value repository used to store User entities by UserId.

Functions

Link copied to clipboard
open override fun delete(entity: User)

Deletes an existing user entity from the in-memory repository.

Link copied to clipboard
open override fun findByEmail(email: String): User?

Finds a user by their email address.

Link copied to clipboard
open override fun findById(id: UserId): User?

Finds a user by its identifier.

Link copied to clipboard
open override fun findByUsername(username: String): User?

Finds a user by their username.

Link copied to clipboard
open override fun save(entity: User)

Persists a new user entity in the in-memory repository.

Link copied to clipboard
open override fun update(entity: User)

Updates an existing user entity in the in-memory repository.