package Ġcom . sys data . kt . kt android architecture . use case Ċ Ċ import Ġcom . sys data . kt . kt android architecture . repository . Auth Repository Ċ import Ġcom . sys data . kt . kt android architecture . repository . Auth Repository Impl Ċ import Ġcom . sys data . kt . kt android architecture . repository . model . User Logged Ċ import Ġit . sys data . kt android architecture core . exception . Failure Ċ import Ġit . sys data . kt android architecture core . functional . Either Ċ import Ġit . sys data . kt android architecture core . inter actor . UseCase Ċ Ċ class ĠLogin UseCase ( private Ġval Ġrepo : Auth Repository ) Ġ: ĠUse Case < User Logged , ĠLogin Action Params >() Ġ{ ĊĠĠĠ Ġoverride Ġsuspend Ġfun Ġrun ( params : ĠLogin Action Params ): ĠEither < Failure , ĠUser Logged > Ġ{ ĊĠĠĠĠĠĠĠ Ġreturn Ġtry Ġ{ ĊĠĠĠĠĠĠĠĠĠĠĠ ĠEither . Right ( repo . login ( params . email , Ġparams . password )) ĊĠĠĠĠĠĠĠ Ġ} Ġcatch Ġ( e : ĠException ) Ġ{ ĊĠĠĠĠĠĠĠĠĠĠĠ ĠEither . Left ( Failure . Network Connection ()) ĊĠĠĠĠĠĠĠ Ġ} ĊĠĠĠ Ġ} Ċ }