Packages

p

com.twitter.scrooge

thrift_validation

package thrift_validation

Ordering
  1. Alphabetic
Visibility
  1. Public
  2. All

Type Members

  1. abstract class BaseValidator extends AnyRef

    An interface to define APIs for default validations (depend on com.twitter.util.validation.ScalaValidator) and custom validations.

  2. trait ThriftConstraintValidator[T, A >: Int with Long with Double with Short with Byte with String] extends AnyRef

    The trait to define a ThriftConstraintValidator, this is used in ThriftValidatorto validate annotations on Thrift IDL.

    The trait to define a ThriftConstraintValidator, this is used in ThriftValidatorto validate annotations on Thrift IDL.

    T

    The type of the field to be validated.

    A

    The type of the annotation value to be validated against.

    Note

    A must be a super type of Int, Long, Double, Short, Byte, or String.

  3. final case class ThriftValidationException(endpoint: String, requestClazz: Class[_], validationViolations: Set[ThriftValidationViolation]) extends RuntimeException with Product with Serializable

    An exception which is used to communicate when a thrift_validation has failed with the respective ThriftValidationViolation

    An exception which is used to communicate when a thrift_validation has failed with the respective ThriftValidationViolation

    endpoint

    thrift method the invalid request tries to reach

    requestClazz

    the type of request that was passed in

    validationViolations

    all violations collected while deserializing the thrift object

  4. case class ThriftValidationViolation(fieldName: String, fieldValue: Any, violationMessage: String) extends Product with Serializable

    To store the data for failed validations.

    To store the data for failed validations.

    fieldName

    the name of the field being validated.

    fieldValue

    the value of the field being validated.

    violationMessage

    the validation failure message.

  5. abstract class ThriftValidator extends BaseValidator

    Implement this class to define a validator with custom validations.

Value Members

  1. object DefaultAnnotations
  2. object ThriftValidationException extends Serializable
  3. object ThriftValidator

Ungrouped