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
val flowtoTest = Flow[Int].map(identity) | |
val elOsito = Source.single(1) | |
.via(flowtoTest) | |
.toMat(sinkToTest)(Keep.right) | |
.run() | |
elOsito.onComplete { | |
case Success(Done) => println("Hola wacho") | |
case Failure(err) => println(s"te mataron por gato ${err.getMessage}") |
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
def getUser(id: Long): Future[User] = ??? | |
/** | |
* this is for pussies developers | |
* @param ids | |
* @return | |
*/ | |
def getUsersBy(ids: Future[List[Long]]): Future[List[User]] = | |
for { | |
xs <- ids |
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
package service | |
import akka.actor.{ ActorLogging, Actor } | |
import api.Marshalling | |
import domain.{ CPTag, Note, Notification, Capture, User } | |
import org.joda.time.DateTime | |
import spray.json.ProductFormats | |
import core.DatabaseCfg._ | |
import slick.driver.PostgresDriver.api._ | |
import akka.pattern.pipe |
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
package com.capture.api.users | |
import io.gatling.core.Predef._ | |
import io.gatling.http.Predef._ | |
import Settings._ | |
class OrganizationSimulation extends BaseSimulation{ | |
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
package api | |
import akka.actor.ActorSystem | |
import core.DefaultTimeout | |
import core.auth.authentication | |
import domain.User | |
import service.{ DeleteUser, GetUserById, SaveUser, UserFormat } | |
import spray.routing.Directives | |
import akka.pattern.ask | |
import spray.http.StatusCodes._ |
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
package controllers | |
import auth.OAuthDataHandler | |
import core.models._ | |
import play.Logger | |
import play.api._ | |
import play.api.mvc._ | |
import play.api.mvc.Results._ | |
import play.api.libs.json._ |