Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ApplyMacros ¶
ApplyMacros applies macros to the input string based on the provided query and plugin context. It replaces the following macros in the input string:
- ${__from}: Replaced with the start time of the query time range.
- ${__timeFrom}: Replaced with the start time of the query time range. ( alias for from macro. also respect local timeShift defined in the panels )
- ${__to}: Replaced with the end time of the query time range.
- ${__timeTo}: Replaced with the end time of the query time range. ( alias for to macro. also respect local timeShift defined in the panels )
- ${__user.name}: Replaced with the name of the plugin context user.
- ${__user.email}: Replaced with the email of the plugin context user.
- ${__user.login}: Replaced with the login of the plugin context user.
Parameters:
- input: The input string to apply macros to.
- query: The data query containing the time range.
- pluginCtx: The plugin context containing the user information.
Returns:
- The input string with macros replaced.
- An error if there was an error applying the macros.
Types ¶
Click to show internal directories.
Click to hide internal directories.