Package

net.psforever

config

Permalink

package config

Visibility
  1. Public
  2. All

Type Members

  1. sealed trait ConfigEntry extends AnyRef

    Permalink
  2. final case class ConfigEntryBool(key: String, default: Boolean, constraints: Constraint[Boolean]*) extends ConfigEntry with Product with Serializable

    Permalink
  3. final case class ConfigEntryFloat(key: String, default: Float, constraints: Constraint[Float]*) extends ConfigEntry with Product with Serializable

    Permalink
  4. final case class ConfigEntryInt(key: String, default: Int, constraints: Constraint[Int]*) extends ConfigEntry with Product with Serializable

    Permalink
  5. final case class ConfigEntryString(key: String, default: String, constraints: Constraint[String]*) extends ConfigEntry with Product with Serializable

    Permalink
  6. final case class ConfigEntryTime(key: String, default: Duration, constraints: Constraint[Duration]*) extends ConfigEntry with Product with Serializable

    Permalink
  7. trait ConfigParser extends AnyRef

    Permalink
  8. case class ConfigSection(name: String, entries: ConfigEntry*) extends Product with Serializable

    Permalink
  9. sealed trait ConfigTypeRequired[-T] extends AnyRef

    Permalink
    Annotations
    @implicitNotFound( "Nothing was inferred" )
  10. case class ConfigValueMapper[T](name: String)(f: (String) ⇒ Option[T]) extends Product with Serializable

    Permalink
  11. case class Constraint[-T](name: Option[String], args: Seq[Any])(f: (T) ⇒ ValidationResult) extends Product with Serializable

    Permalink

    A form constraint.

    A form constraint.

    T

    type of values handled by this constraint

    name

    the constraint name, to be displayed to final user

    args

    the message arguments, to format the constraint name

    f

    the validation function

  12. trait Constraints extends AnyRef

    Permalink

    Defines a set of built-in constraints.

  13. case class Invalid(errors: Seq[ValidationError]) extends ValidationResult with Product with Serializable

    Permalink

    Validation was a failure.

    Validation was a failure.

    errors

    the resulting errors

  14. case class ValidationError(messages: Seq[String], args: Any*) extends Product with Serializable

    Permalink

    A validation error.

    A validation error.

    messages

    the error message, if more then one message is passed it will use the last one

    args

    the error message arguments

  15. sealed trait ValidationResult extends AnyRef

    Permalink

    A validation result.

Value Members

  1. object ConfigTypeRequired

    Permalink
  2. object ConfigValueMapper extends Serializable

    Permalink
  3. object Constraint extends Serializable

    Permalink

    This object provides helpers for creating Constraint values.

    This object provides helpers for creating Constraint values.

    For example:

    val negative = Constraint[Int] {
      case i if i < 0 => Valid
      case _ => Invalid("Must be a negative number.")
    }
  4. object Constraints extends Constraints

    Permalink

    Defines a set of built-in constraints.

  5. object Invalid extends Serializable

    Permalink

    This object provides helper methods to construct Invalid values.

  6. object ParameterValidator

    Permalink
  7. object Valid extends ValidationResult with Product with Serializable

    Permalink

    Validation was a success.

  8. object ValidationError extends Serializable

    Permalink

Ungrouped