All Downloads are FREE. Search and download functionalities are using the official Maven repository.

tasks.fileservice.History.scala Maven / Gradle / Ivy

There is a newer version: 3.0.0-M14
Show newest version
package tasks.fileservice

import com.github.plokhotnyuk.jsoniter_scala.macros._
import com.github.plokhotnyuk.jsoniter_scala.core._

sealed trait HistoryContext
case class HistoryContextImpl(
    task: History.TaskVersion,
    codeVersion: String,
    traceId: Option[String]
) extends HistoryContext

case object NoHistory extends HistoryContext

case class History(self: SharedFile, context: Option[HistoryContext])

object History {

  implicit val ordering: Ordering[History] = Ordering.by(_.self.toString)

  case class TaskVersion(taskID: String, taskVersion: Int)
  object TaskVersion {
    implicit val codec: JsonValueCodec[TaskVersion] = JsonCodecMaker.make

  }

  implicit val codec: JsonValueCodec[History] = JsonCodecMaker.make

}

object HistoryContext {
  implicit val codec: JsonValueCodec[HistoryContext] = JsonCodecMaker.make
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy