kvs.hrl 462 B

1234567891011121314151617
  1. -ifndef(KVS_HRL).
  2. -define(KVS_HRL, true).
  3. -define(USR_FEED, users).
  4. -define(PRD_FEED, products).
  5. -define(GRP_FEED, groups).
  6. -define(FEED(Type), case Type of user -> ?USR_FEED; product -> ?PRD_FEED; group -> ?GRP_FEED; _-> undefined end).
  7. -define(CONTAINER, id, top, entries_count=0).
  8. -define(ITERATOR(Container), id, container=Container, feed_id, prev, next, feeds=[]).
  9. -record(container, {?CONTAINER}).
  10. -record(iterator, {?ITERATOR(undefined)}).
  11. -endif.