scala.build.options.publish.Signer.scala Maven / Gradle / Ivy
package scala.build.options.publish
import scala.build.Positioned
import scala.build.errors.MalformedInputError
sealed abstract class Signer extends Product with Serializable
object Signer {
case object Gpg extends Signer
case object BouncyCastle extends Signer
def parse(input: Positioned[String]): Either[MalformedInputError, Signer] =
input.value match {
case "gpg" => Right(Signer.Gpg)
case "bc" | "bouncycastle" => Right(Signer.BouncyCastle)
case _ => Left(new MalformedInputError("signer", input.value, "gpg|bc", input.positions))
}
}
© 2015 - 2024 Weber Informatics LLC | Privacy Policy