Last active
March 21, 2017 21:04
-
-
Save emenegro/1923ca5797ce45ebc4f903da9061b405 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
protocol BuildStep { | |
func build() -> OfflineAction | |
} | |
protocol RequestStep { | |
func toCache(_ request: OfflineRequestConvertible) -> DataStep | |
func toGet(_ request: OfflineRequestConvertible) -> GetCommonsStep | |
func toDelete(_ request: OfflineRequestConvertible) -> CommonsStep | |
} | |
protocol DataStep { | |
func data(_ data: Data) -> CacheCommonsStep | |
} | |
protocol CommonsStep: BuildStep { | |
func forId(_ id: String) -> Self | |
func withEncryptionKey(_ encryptionKey: String) -> Self | |
} | |
protocol CacheCommonsStep: CommonsStep { | |
func keepingAliveUntil(_ date: Date) -> Self | |
} | |
protocol GetCommonsStep: CommonsStep { | |
func ifBefore(_ date: Date) -> Self | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment