Avrora.Codec.encode

You're seeing just the callback encode, go back to Avrora.Codec module for more information.
Link to this callback

encode(payload, options)

View Source

Specs

encode(payload :: binary() | map(), options :: keyword(Avrora.Schema.t())) ::
  {:ok, result :: binary()} | {:error, reason :: term()}

Encode the Elixir data into a binary Avro message.

Examples

...> payload = %{"id" => "00000000-0000-0000-0000-000000000000", "amount" => 15.99}
...> {:ok, schema} = Avrora.Resolver.resolve("io.confluent.Payment")
...> Avrora.Codec.Plain.encode(payload, schema: schema)
<<72, 48, 48, 48, 48, 48, 48, 48, 48, 45, 48, 48, 48, 48, 45, 48, 48, 48, 48, 45, 48, 48, 48,
48, 45, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 123, 20, 174, 71, 225, 250, 47, 64>>