avrora v0.11.0 Avrora.Schema.Name View Source

Struct for versioned schema names like io.confluent.Payment:42.

Link to this section Summary

Functions

Parse schema name with optional version, returning struct.

Link to this section Types

Link to this type

t()

View Source
t() :: %Avrora.Schema.Name{name: String.t(), version: nil | integer()}

Link to this section Functions

Link to this function

parse(payload)

View Source
parse(String.t()) :: {:ok, t()} | {:error, term()}

Parse schema name with optional version, returning struct.

Examples

iex> Avrora.Schema.Name.parse("Payment")
{:ok, %Avrora.Schema.Name{name: "Payment", version: nil}}
iex> Avrora.Schema.Name.parse("io.confluent.Payment:42")
{:ok, %Avrora.Schema.Name{name: "io.confluent.Payment", version: 42}}