# avrogen v1.1.0 - Table of Contents

> Generate elixir typedstructs from AVRO schemas.

## Pages

- [Avrogen](readme.md)

## Modules

- [Avrogen](Avrogen.md): Provides functions for encoding and decoding avro records.
- [Avrogen.Avro.Schema](Avrogen.Avro.Schema.md):   The entry point for code generation. It starts by taking a raw schema: JSON matching the
  [specification](https://avro.apache.org/docs/1.11.0/spec.html#schemas).
- [Avrogen.Avro.Schema.CodeGenerator](Avrogen.Avro.Schema.CodeGenerator.md):   Protocol defining how different types representing an Avro schema should contribute
  to the code generation process.

- [Avrogen.Avro.Types.Array](Avrogen.Avro.Types.Array.md):   This type is a representation of the [Avro array type](https://avro.apache.org/docs/1.11.0/spec.html#Arrays).

- [Avrogen.Avro.Types.Enum](Avrogen.Avro.Types.Enum.md):   This type is a representation of the [Avro Enum type](https://avro.apache.org/docs/1.11.0/spec.html#Enums).

- [Avrogen.Avro.Types.Logical](Avrogen.Avro.Types.Logical.md):   This module delegates the parsing logic to the specific Logical types modules.
- [Avrogen.Avro.Types.Logical.BigDecimal](Avrogen.Avro.Types.Logical.BigDecimal.md):   This represents the logical type of the scalable precision [decimal](https://avro.apache.org/docs/1.12.0/specification/#decimal)
  introduced in version 1.12.0
- [Avrogen.Avro.Types.Logical.Date](Avrogen.Avro.Types.Logical.Date.md):   This type represents the [date](https://avro.apache.org/docs/1.11.1/specification/_print/#date)
  type according to the specification.
- [Avrogen.Avro.Types.Logical.DateString](Avrogen.Avro.Types.Logical.DateString.md):   This type actually does not conform to the specification for a date.
- [Avrogen.Avro.Types.Logical.DateTimeString](Avrogen.Avro.Types.Logical.DateTimeString.md):   This type actually does not conform to the specification for a decimal.
- [Avrogen.Avro.Types.Logical.Decimal](Avrogen.Avro.Types.Logical.Decimal.md):   This represents the logical type of the [decimal](https://avro.apache.org/docs/1.11.1/specification/_print/#decimal)
  in the specification
- [Avrogen.Avro.Types.Logical.DecimalString](Avrogen.Avro.Types.Logical.DecimalString.md):   This type actually does not conform to the specification for a decimal.
- [Avrogen.Avro.Types.Logical.DurationString](Avrogen.Avro.Types.Logical.DurationString.md):   This type does not conform to the Avro duration specification.
  The Avro duration specification represents a duration with three unsigned integers: months, days, and milliseconds.
- [Avrogen.Avro.Types.Logical.LocalTimestampMicros](Avrogen.Avro.Types.Logical.LocalTimestampMicros.md):   This type represents the [local-timestamp-micros](https://avro.apache.org/docs/1.11.1/specification/_print/#local-timestamp-microsecond-precision)
  type according to the specification
- [Avrogen.Avro.Types.Logical.LocalTimestampMillis](Avrogen.Avro.Types.Logical.LocalTimestampMillis.md):   This type represents the [local-timestamp-millis](https://avro.apache.org/docs/1.11.1/specification/_print/#local-timestamp-millisecond-precision)
  type according to the specification
- [Avrogen.Avro.Types.Logical.TimeMicros](Avrogen.Avro.Types.Logical.TimeMicros.md):   This type represents the [time-micros](https://avro.apache.org/docs/1.11.1/specification/_print/#time-microsecond-precision)
  type according to the specification
- [Avrogen.Avro.Types.Logical.TimeMillis](Avrogen.Avro.Types.Logical.TimeMillis.md):   This type represents the [time-millis](https://avro.apache.org/docs/1.11.1/specification/_print/#time-millisecond-precision)
  type according to the specification
- [Avrogen.Avro.Types.Logical.TimestampMicros](Avrogen.Avro.Types.Logical.TimestampMicros.md):   This type represents the [timestamp-micros](https://avro.apache.org/docs/1.11.1/specification/#timestamp-microsecond-precision)
  type according to the specification
- [Avrogen.Avro.Types.Logical.TimestampMillis](Avrogen.Avro.Types.Logical.TimestampMillis.md):   This type represents the [timestamp-millis](https://avro.apache.org/docs/1.11.1/specification/_print/#timestamp-millisecond-precision)
  type according to the specification
- [Avrogen.Avro.Types.Logical.UUID](Avrogen.Avro.Types.Logical.UUID.md):   This represents the logical type of the [uuid](https://avro.apache.org/docs/1.11.1/specification/_print/#uuid)
  in the specification.
- [Avrogen.Avro.Types.Map](Avrogen.Avro.Types.Map.md):   This type is a representation of the [Avro map type](https://avro.apache.org/docs/1.11.0/spec.html#Maps).

- [Avrogen.Avro.Types.Primitive](Avrogen.Avro.Types.Primitive.md):   This type is a representation of the [Avro array type](https://avro.apache.org/docs/1.11.0/spec.html#schema_primitive).

- [Avrogen.Avro.Types.Record](Avrogen.Avro.Types.Record.md):   This type is a representation of the [Avro record type](https://avro.apache.org/docs/1.11.0/spec.html#Records).

- [Avrogen.Avro.Types.Record.Field](Avrogen.Avro.Types.Record.Field.md):   This type is a representation of the [Avro record field type](https://avro.apache.org/docs/1.11.0/spec.html#Record).

- [Avrogen.Avro.Types.Reference](Avrogen.Avro.Types.Reference.md):   A reference to an external schema name.

- [Avrogen.Avro.Types.Union](Avrogen.Avro.Types.Union.md):   This type is a representation of the [Avro union type](https://avro.apache.org/docs/1.11.0/spec.html#Unions).
- [Avrogen.Avro.Types.Utils](Avrogen.Avro.Types.Utils.md):   Shared utils for working with Avro schema types

- [Avrogen.AvroModule](Avrogen.AvroModule.md): Behaviour for generated record modules.

- [Avrogen.Decimal.Sigil](Avrogen.Decimal.Sigil.md): Sigil for the `Decimal` type.

- [Avrogen.Schema](Avrogen.Schema.md): Utils for extracting various info from avro schemas.
Schemas can be records or enums.

- [Avrogen.Schema.SchemaModule](Avrogen.Schema.SchemaModule.md): Common behaviour for modules that define avro schemas in code.

- [Avrogen.Schema.SchemaRegistry](Avrogen.Schema.SchemaRegistry.md): Stores avro schemas and corresponding codec functions; provides lookup by
schema name. Initialized on startup with schemas from priv directory.

- [Avrogen.SchemaGenerator](Avrogen.SchemaGenerator.md): Generate avro schemas from .exs files.

- [Avrogen.Types](Avrogen.Types.md): Utils for extracting various info from avro schemas types.

- [Avrogen.Util.Either](Avrogen.Util.Either.md): Fancy implementation of Either monad.

- [Avrogen.Util.FuzzyEnumMatch](Avrogen.Util.FuzzyEnumMatch.md): Fuzzy enum matching.

- [Avrogen.Util.JaroDistance](Avrogen.Util.JaroDistance.md): 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.

- [Avrogen.Util.Random](Avrogen.Util.Random.md): Helper functions for generating random values.

- [Avrogen.Util.Random.Constructors](Avrogen.Util.Random.Constructors.md): 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.
- [Avrogen.Util.TopologicalSort](Avrogen.Util.TopologicalSort.md)
- [Avrogen.Utils.MacroUtils](Avrogen.Utils.MacroUtils.md):   Utilities for working with code generation for the Avro schemas

## Mix Tasks

- [mix compile.avro_code_generator](Mix.Tasks.Compile.AvroCodeGenerator.md): Compiler task to generate elixir code from avro schemas.
- [mix compile.avro_code_generator.manifest](Mix.Tasks.Compile.AvroCodeGenerator.Manifest.md): Manifest file (see above).

- [mix compile.avro_schema_generator](Mix.Tasks.Compile.AvroSchemaGenerator.md): Compiler task to generate avro schemas from templates defined in elixir.
- [mix compile.avro_schema_generator.manifest](Mix.Tasks.Compile.AvroSchemaGenerator.Manifest.md): 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.

- [mix compile.avro_schema_generator.task_summary](Mix.Tasks.Compile.AvroSchemaGenerator.TaskSummary.md): Defines a list of sources (i.e. input files) and targets (i.e. output files) for a given task.

