Noizu.Entity.Field.Behaviour behaviour (NoizuLabs Entities v0.2.0)

Link to this section Summary

Link to this section Callbacks

Link to this callback

as_entity(entity, settings, context, options)

@callback as_entity(
  entity :: any(),
  settings :: any(),
  context :: any(),
  options :: any()
) ::
  {:ok, any()} | {:error, any()}
Link to this callback

as_record(entity, settings, context, options)

@callback as_record(
  entity :: any(),
  settings :: any(),
  context :: any(),
  options :: any()
) ::
  {:ok, any()} | {:error, any()}
Link to this callback

delete_record(entity, settings, context, options)

@callback delete_record(
  entity :: any(),
  settings :: any(),
  context :: any(),
  options :: any()
) ::
  {:ok, any()} | {:error, any()}
Link to this callback

ecto_gen_string(any)

@callback ecto_gen_string(any()) :: {:ok, any()} | {:error, any()}
Link to this callback

field_as_record(field, settings, context, options)

@callback field_as_record(
  field :: any(),
  settings :: any(),
  context :: any(),
  options :: any()
) ::
  {:ok, any()} | {:error, any()}
Link to this callback

field_from_record(field, settings, context, options)

@callback field_from_record(
  field :: any(),
  settings :: any(),
  context :: any(),
  options :: any()
) ::
  {:ok, any()} | {:error, any()}
Link to this callback

from_record(entity, settings, context, options)

@callback from_record(
  entity :: any(),
  settings :: any(),
  context :: any(),
  options :: any()
) ::
  {:ok, any()} | {:error, any()}
Link to this callback

persist(entity, action_type, settings, context, options)

@callback persist(
  entity :: any(),
  action_type :: atom(),
  settings :: any(),
  context :: any(),
  options :: any()
) :: any()
@callback stub() :: {:ok, any()} | {:error, any()}
Link to this callback

type__after_delete(entity, settings, context, options)

@callback type__after_delete(
  entity :: any(),
  settings :: any(),
  context :: any(),
  options :: any()
) ::
  {:ok, any()} | {:error, any()}
Link to this callback

type__before_create(entity, settings, context, options)

@callback type__before_create(
  entity :: any(),
  settings :: any(),
  context :: any(),
  options :: any()
) ::
  {:ok, any()} | {:error, any()}
Link to this callback

type__before_update(entity, settings, context, options)

@callback type__before_update(
  entity :: any(),
  settings :: any(),
  context :: any(),
  options :: any()
) ::
  {:ok, any()} | {:error, any()}
Link to this callback

type_as_entity(entity, context, options)

@callback type_as_entity(entity :: any(), context :: any(), options :: any()) ::
  {:ok, any()} | {:error, any()}