View Source parthenon_schema (parthenon v0.9.0)

Link to this section Summary

Link to this section Types

-type encoder() :: fun((binary(), schema_options()) -> supported_types()).
-type schema() :: schema_value().
-type schema_key() :: atom().
-type schema_object() :: #{schema_key() := schema_value()}.
-type schema_options() :: #schema_options{}.
API
-type schema_value() :: encoder() | schema_object() | {map_array, schema()}.
-type supported_types() :: undefined | integer() | float() | binary() | boolean() | [supported_types()].

Link to this section Functions

-spec create(Schema :: binary() | string()) -> {ok, schema()} | {error, term()}.