You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Since functions are a key part of making templates simpler to write, we want to add the ability for users of gnorm to implement their own functions to add to the template funcMap. The plugins are simple executables that are run by gnorm, which thus may be written in any language.
Template Function Plugins
Template function plugins are simple executables which implement the following conventions:
Listing available functions
When run with the --list flag, plugins should write a newline-delimited list of supported function names to stdout.
When run with a single argument, the argument is the function name being called. The arguments to the function are passed to the executable's stdin as a JSON encoded array.
On success, a plugin should print the json-encoded results to stdout and exit with an exit code of zero.
On failure (for example, if the arguments passed into the function are not valid for the function), the plugin should print an error to stderr and exit with an exit code of 1.
If more than one argument is passed to the executable (i.e. more than just the function name), or if it is passed a function name that is not supported, the plugin should print an error to stderr and exit with an exit code of 2.
If no arguments are passed to the executable, the executable should print some useful help message to stderr.
The text was updated successfully, but these errors were encountered:
Since functions are a key part of making templates simpler to write, we want to add the ability for users of gnorm to implement their own functions to add to the template funcMap. The plugins are simple executables that are run by gnorm, which thus may be written in any language.
Template Function Plugins
Template function plugins are simple executables which implement the following conventions:
Listing available functions
The text was updated successfully, but these errors were encountered: