View Source AvroEx.Schema (AvroEx v1.2.0)

Link to this section Summary

Link to this section Types

Link to this section Functions

Specs

cast(nil | binary() | maybe_improper_list() | map()) ::
  :error | {:error, any()} | {:ok, binary() | map()}
Link to this function

cast_schema(module, data, fields)

View Source

Specs

cast_schema(atom(), map(), any()) :: {:error, any()} | {:ok, map()}
Link to this function

encodable?(schema, data)

View Source

Specs

encodable?(t(), any()) :: boolean()
Link to this function

encodable?(record, context, bool)

View Source

Specs

encodable?(any(), any(), any()) :: boolean()

Specs

expand(
  binary()
  | %{
      __struct__:
        AvroEx.Schema.Array
        | AvroEx.Schema.Enum
        | AvroEx.Schema.Fixed
        | AvroEx.Schema.Map
        | AvroEx.Schema.Primitive
        | AvroEx.Schema.Record
        | AvroEx.Schema.Union
    },
  AvroEx.Schema.Context.t()
) :: {:ok, any()}
Link to this function

full_name(namespace, name)

View Source

Specs

full_name(namespace(), name()) :: full_name()
Link to this function

full_names(record, parent_namespace \\ nil)

View Source

Specs

Specs

namespace(any()) :: {:ok, any()}
Link to this function

namespace(primitive, parent_namespace)

View Source

Specs

namespace(any(), any()) :: any()
Link to this function

parse(json_schema, context \\ %Context{})

View Source

Specs

parse(json_schema(), AvroEx.Schema.Context.t()) :: {:ok, t()} | {:error, term()}

Specs

parse!(binary()) :: t()