Skip to content

Instantly share code, notes, and snippets.

View joan38's full-sized avatar

Joan Goyeau joan38

View GitHub Profile
import scala.concurrent.Future
import org.eclipse.jgit.api.errors.RefNotFoundException
import com.drivetribe.orchestra.Dsl._
import com.drivetribe.orchestra.filesystem.{Directory, LocalFile}
import org.eclipse.jgit.transport.UsernamePasswordCredentialsProvider
import org.eclipse.jgit.api.Git
import com.drivetribe.orchestra.github.{GitRef, Repository}
def apply[ParamValues <: Product](paramValues: TupledValues): CronTrigger[ParamValues] = ...
// No Params
def apply(): CronTrigger[HNil] = ...
// One param
def apply[ParamValue](value: ParamValue): CronTrigger[ParamValue :: HNil] = ...
// Multi param
def apply[TupledValues <: Product, ParamValues <: HList](paramValues: TupledValues)(
implicit tupleToHList: Generic.Aux[TupledValues, ParamValues]
): CronTrigger[ParamValues] = ...
case object HNil extends HList
case class HCon[+H, +T <: HList](head: H, tail: T) extends HList
case class PodsOperations() extends Creatable[Pod] {
implicit protected val resourceEncoder: Encoder[Pod] = implicitly[Encoder[Int]]
}
case class PodsOperations() extends Creatable[Pod]
trait Creatable[Resource] {
implicit protected val resourceEncoder: Encoder[Resource]
def create(resource: Resource): Unit = ...
}
trait Creatable[Resource](implicit resourceEncoder: Encoder[Resource]) {
def create(resource: Resource): Unit = ...
}
trait Creatable[Resource: Encoder] {
def create(resource: Resource): Unit = ...
}