FriendshipServiceVerticle

constructor(userRepository: UserRepository, friendshipRepository: FriendshipRepository, friendshipRequestRepository: FriendshipRequestRepository, messageRepository: MessageRepository, kafkaProducer: KafkaProducerVerticle, credentials: DatabaseCredentials? = null, shouldConnectToDB: Boolean? = true)

Parameters

userRepository

The repository to interact with the User entity.

friendshipRepository

The repository to interact with the Friendship entity.

friendshipRequestRepository

The repository to interact with the FriendshipRequest entity.

messageRepository

The repository to interact with the Message entity.

credentials

The database credentials to connect to the MySQL database.

shouldConnectToDB

A flag to determine if the service should connect to the database, used for testing purposes.