Last active
July 9, 2017 07:30
-
-
Save ericwush/ab766ae06214a7e77f500c9a3038662a to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
... | |
import scalaz.\/ | |
object Models { | |
case class SuccessResponse(payload: JsValue) | |
case class ErrorResponse(message: Message) | |
// it's up to you to define subscription model | |
case class SubscriptionMessage(userId: String) | |
case class ThrowableOrSubscriptionsMessage(disjunction: \/[Exception, SubscriptionMessage]) | |
case class NotificationEvent(eventSubscription: SubscriptionMessage, payload: JsValue) | |
case class RedisPublishMessage(channel: String, message: String) | |
case class RedisSubscribeMessage(channel: Seq[String]) | |
case class RedisUnsubscribeMessage(channel: Seq[String]) | |
... | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment