Skip to content

Instantly share code, notes, and snippets.

@yogacp
Last active July 16, 2018 09:07
Show Gist options
  • Save yogacp/d3d55606c31d0f0c52136f36d1eb6f42 to your computer and use it in GitHub Desktop.
Save yogacp/d3d55606c31d0f0c52136f36d1eb6f42 to your computer and use it in GitHub Desktop.
User Login example 1
class LoginContract {
interface View {
fun goToOtpPage(userId: String)
fun showError(message: String)
fun onLoginButtonClicked()
}
interface Presenter {
fun onLoginBtnPressed(username: String, password: String)
fun onLoginSuccess(userid: String)
fun onLoginError(message: String)
}
interface Interactor {
fun login(username: String, password: String)
}
interface InteractorOutput {
fun onLoginSuccess(userId: String)
fun onLoginError(message: String)
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment