GroupsRepository

A repository managing groups and their members CRUD operations.

Functions

Link copied to clipboard
abstract suspend fun addMember(groupId: GroupId, userId: UserId): Result<Unit>

Adds the given userId to the group with the specified groupId.

Link copied to clipboard
abstract suspend fun getGroupsOf(userId: UserId): Result<Set<GroupId>>
Link copied to clipboard
abstract suspend fun getMembersOf(groupId: GroupId): Result<Set<UserId>>
Link copied to clipboard
abstract suspend fun removeMember(groupId: GroupId, userId: UserId): Result<Unit>

Removes the given userId from the group with the specified groupId.