avrora v0.1.0-beta Avrora.Name View Source

A wrapper around versioned name the schema. It can handle names like io.confluent.Payment and io.confluent.Payment:42 by using : as a delimiter.

Link to this section Summary

Functions

Parses given name and plits it on name + version by a : delimiter.

Link to this section Types

Link to this type

t() View Source
t() :: %Avrora.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()}

Parses given name and plits it on name + version by a : delimiter.

Examples

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