Skip to content

Instantly share code, notes, and snippets.

@radzserg
Last active January 30, 2017 19:21
Show Gist options
  • Select an option

  • Save radzserg/1a6ce8b8da8cc88d5c1222d09a8f1a52 to your computer and use it in GitHub Desktop.

Select an option

Save radzserg/1a6ce8b8da8cc88d5c1222d09a8f1a52 to your computer and use it in GitHub Desktop.
Behaviour for ES domain models
defmodule App.Es.DocumentBehavior do
@doc """
Build es document body
"""
@callback index() :: string
@doc """
Build es document body
"""
@callback build!(Map, Map) :: Map
@doc """
Build es query
"""
@callback build_query!(Map, Map) :: Map
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment