Noizu.Entity.Json.Protocol protocol (NoizuLabs Entities v0.2.1)

Define the Noizu.Entity.Json.Protocol used for preparing format style json responses. TODO https://github.com/noizu-labs-scaffolding/entities/issues/2

Summary

Types

t()

All the types that implement this protocol.

Types

protocol_response()

@type protocol_response() ::
  {:error, any()}
  | {:ok, any()}
  | {:omit, any()}
  | restricted()
  | {restricted(), any()}
  | nil

restricted()

@type restricted() :: :"*restricted*"

t()

@type t() :: term()

All the types that implement this protocol.

Functions

embed_field(value, field_settings, term, term_settings, context, options)

@spec embed_field(
  value :: term(),
  field_settings :: term(),
  term :: term(),
  term_settings :: term(),
  context :: term(),
  options :: term()
) :: protocol_response()

prep(term, settings, context, options)

@spec prep(term :: term(), settings :: term(), context :: term(), options :: term()) ::
  protocol_response()