Created
October 11, 2012 20:45
-
-
Save tohenryliu/3875359 to your computer and use it in GitHub Desktop.
versioning idea
This file contains hidden or 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
package versioning | |
// version 1 defined 2 actions here | |
trait V1 { | |
val SetOptOut = EmailPreferenceActions.SetOptOut | |
val GetSailthruEmail = EmailPreferenceActions.GetSailthruEmail | |
} | |
object V1Api extends V1 | |
// version 2 need to replace SetOptOut with SetOptOutImproved | |
// while keeping the other ones the same as V1 | |
trait V2 extends V1 { | |
override val SetOptOut = EmailPreferenceActions.SetOptOutImproved | |
} | |
object V2Api extends V2 | |
object EmailPreferenceActions { | |
case class SetOptOut ... | |
case class GetSailthruEmail ... | |
case class SetOptOutImproved ... | |
} | |
object EmailPreferenceActionsWithRedis { | |
case class SetOptOutImproved ... | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment