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 the | |
import org.bson.codecs.configuration.CodecRegistries.fromRegistries | |
import org.mongodb.scala.MongoClient.DEFAULT_CODEC_REGISTRY | |
import org.mongodb.scala.bson.BsonInt64 | |
import org.mongodb.scala.{Document, MongoClient} | |
import scala.concurrent.Await | |
import scala.concurrent.ExecutionContext.Implicits.global | |
import scala.concurrent.duration._ |
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
input { | |
# ... | |
} | |
output { | |
elasticsearch { | |
index => "transactions" | |
document_id => "%{id}" | |
action => update | |
hosts => "es" | |
} |
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
trait PrettyPrinted[A] extends (A => String) | |
object PrettyPrinted { | |
def apply[A](f: A => String): PrettyPrinted[A] = f(_) | |
} | |
trait Printable[A] { | |
implicit def printer: PrettyPrinted[A] | |
} |
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 example.dsl | |
import scala.language.implicitConversions | |
case class Card(number: String, firstName: String, lastName: String) | |
case class User(username: String, email: String) | |
case class AntiFraudInput(card: Card, user: User, amount: Double) |
NewerOlder