language-avro-0.1.0.0: Language definition and parser for AVRO files.

Safe HaskellNone
LanguageHaskell2010

Language.Avro.Types

Description

Language definition for AVRO (.avdl) files, as defined in http://avro.apache.org/docs/1.8.2/spec.html.

Synopsis

Documentation

data Method Source #

Type for methods/messages that belong to a protocol.

Constructors

Method 

Fields

Instances
Eq Method Source # 
Instance details

Defined in Language.Avro.Types

Methods

(==) :: Method -> Method -> Bool #

(/=) :: Method -> Method -> Bool #

Show Method Source # 
Instance details

Defined in Language.Avro.Types

data Argument Source #

Helper type for the arguments of Method.

Constructors

Argument 

Fields

Instances
Eq Argument Source # 
Instance details

Defined in Language.Avro.Types

Show Argument Source # 
Instance details

Defined in Language.Avro.Types

data ImportType Source #

Type for the possible import types in Protocol.

Instances
Eq ImportType Source # 
Instance details

Defined in Language.Avro.Types

Show ImportType Source # 
Instance details

Defined in Language.Avro.Types

data Annotation Source #

Type for special annotations.

Constructors

Annotation 

Fields

Instances
Eq Annotation Source # 
Instance details

Defined in Language.Avro.Types

Show Annotation Source # 
Instance details

Defined in Language.Avro.Types

newtype Namespace Source #

Newtype for the namespace of methods and protocols.

Constructors

Namespace [Text] 
Instances
Eq Namespace Source # 
Instance details

Defined in Language.Avro.Types

Show Namespace Source # 
Instance details

Defined in Language.Avro.Types

data Protocol Source #

Whole definition of protocol.

Constructors

Protocol 
Instances
Eq Protocol Source # 
Instance details

Defined in Language.Avro.Types

Show Protocol Source # 
Instance details

Defined in Language.Avro.Types

Semigroup Protocol Source # 
Instance details

Defined in Language.Avro.Types

type Schema = Type #

An Avro schema is either

  • A "JSON object in the form {"type":"typeName" ...}
  • A "JSON string, naming a defined type" (basic type without free variables)
  • A "JSON array, representing a union"

N.B. It is possible to create a Haskell value (of Schema type) that is not a valid Avro schema by violating one of the above or one of the conditions called out in validateSchema.