View Source API Reference avrogen v0.8.5

Modules

Provides functions for encoding and decoding avro records.

The entry point for code generation. It starts by taking a raw schema: JSON matching the specification.

Protocol defining how different types representing an Avro schema should contribute to the code generation process.

This type is a representation of the Avro array type.

This type is a representation of the Avro Enum type.

This module delegates the parsing logic to the specific Logical types modules.

This type represents the date type according to the specification.

This type actually does not conform to the specification for a date.

This type actually does not conform to the specification for a decimal.

This represents the logical type of the decimal in the specification

This type actually does not conform to the specification for a decimal.

This type represents the local-timestamp-micros type according to the specification

This type represents the local-timestamp-millis type according to the specification

This type represents the time-micros type according to the specification

This type represents the time-millis type according to the specification

This type represents the timestamp-micros type according to the specification

This type represents the timestamp-millis type according to the specification

This represents the logical type of the uuid in the specification.

This type is a representation of the Avro map type.

This type is a representation of the Avro array type.

This type is a representation of the Avro record type.

This type is a representation of the Avro record field type.

A reference to an external schema name.

This type is a representation of the Avro union type.

Shared utils for working with Avro schema types

Behaviour for generated record modules.

Sigil for the Decimal type.

Utils for extracting various info from avro schemas. Schemas can be records or enums.

Common behaviour for modules that define avro schemas in code.

Stores avro schemas and corresponding codec functions; provides lookup by schema name. Initialized on startup with schemas from priv directory.

Generate avro schemas from .exs files.

Utils for extracting various info from avro schemas types.

Fancy implementation of Either monad.

Fuzzy enum matching.

This is Elixir's implementation of String.jaro_distance/2 before Elixir 1.17.1, when it was "fixed" for certain edge cases. Unfortunately, that fix broke a common case that we relied on (see issue 31 for examples). The simplest solution is just to keep using the old implementation.

Helper functions for generating random values.

Provides functions that return "constructor functions". A constructor function is a function that expects a rand_state and optional parameters, and, on invocation, returns an updated rand_state and a randomly generated value.

Utilities for working with code generation for the Avro schemas

Mix Tasks

Compiler task to generate elixir code from avro schemas.

Manifest file (see above).

Compiler task to generate avro schemas from templates defined in elixir.

Defines lists of tasks by the filenames of their outputs, and their dependencies (i.e. inputs). In this case, all tasks have one input (the exs schema template file) and one or more outputs (each of the generated avsc files). We also store the task's options, to detect config changes which might affect the output files.

Defines a list of sources (i.e. input files) and targets (i.e. output files) for a given task.