n2o_core.hrl 679 B

1234567891011121314151617181920
  1. -ifndef(N2O_CORE).
  2. -define(N2O_CORE, true).
  3. -include("n2o.hrl").
  4. -record(bert, { data :: term() }).
  5. -record(json, { data :: term() }).
  6. -record(binary, { data :: term() }).
  7. -record(default, { data :: term() }).
  8. -record(ok, { data :: term() }).
  9. -record(error, { data :: term() }).
  10. -record(reply, { msg :: n2o(), req :: term(), ctx :: cx() } ).
  11. -record(unknown, { msg :: n2o(), req :: term(), ctx :: cx() } ).
  12. -type n2o() :: #bert{} | #json{} | #binary{} | #default{}.
  13. -type cx() :: #cx{}.
  14. -type formatter() :: binary | json | bert | text | default | atom().
  15. -type response() :: { formatter(), binary() }.
  16. -endif.