rest_handler.mustache 1.1 KB

1234567891011121314151617181920212223242526272829303132333435363738394041
  1. {{!
  2. * Asterisk -- An open source telephony toolkit.
  3. *
  4. * Copyright (C) 2013, Digium, Inc.
  5. *
  6. * David M. Lee, II <dlee@digium.com>
  7. *
  8. * See http://www.asterisk.org for more information about
  9. * the Asterisk project. Please do not directly contact
  10. * any of the maintainers of this project for assistance;
  11. * the project provides a web site, mailing lists and IRC
  12. * channels for your use.
  13. *
  14. * This program is free software, distributed under the terms of
  15. * the GNU General Public License Version 2. See the LICENSE file
  16. * at the top of the source tree.
  17. }}
  18. {{!
  19. * Recursive partial template to render a rest_handler. Used in
  20. * res_ari_resource.c.mustache.
  21. }}
  22. {{#children}}
  23. {{> rest_handler}}
  24. {{/children}}
  25. /*! \brief REST handler for {{path}} */
  26. static struct stasis_rest_handlers {{full_name}} = {
  27. .path_segment = "{{name}}",
  28. {{#is_wildcard}}
  29. .is_wildcard = 1,
  30. {{/is_wildcard}}
  31. .callbacks = {
  32. {{#operations}}
  33. {{#is_req}}
  34. [{{c_http_method}}] = ast_ari_{{c_name}}_{{c_nickname}}_cb,
  35. {{/is_req}}
  36. {{/operations}}
  37. },
  38. .num_children = {{num_children}},
  39. .children = { {{#children}}&{{full_name}},{{/children}} }
  40. };