com.nike.fleam.sqs.instances.RetrievedTime.scala Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of fleam-aws-sqs_2.12 Show documentation
Show all versions of fleam-aws-sqs_2.12 Show documentation
Fleam SQS is a library of classes to aid in processing AWS SQS messages in a functional manner
The newest version!
package com.nike.fleam.sqs
package instances
import ContainsRetrievedMessage.ops._
import RetrievedTime.ops._
/** Copyright 2020-present, Nike, Inc.
* All rights reserved.
*
* This source code is licensed under the MIT license found in
* the LICENSE file in the root directory of this source tree.
**/
trait RetrievedTimeInstances {
implicit val receivedMessageRetrievedTime: RetrievedTime[RetrievedMessage] = RetrievedTime.lift[RetrievedMessage](_.timestamp)
implicit def retrievedTimeFromContainsRetrievedMessage[T: ContainsRetrievedMessage]: RetrievedTime[T] = RetrievedTime.lift[T] {
_.getRetrievedMessage.getRetrievedTime
}
}
object RetrievedTimeInstances extends RetrievedTimeInstances