Documentation ¶
Overview ¶
Utility that contains methods for dealing with emails.
Index ¶
- Constants
- Variables
- func ExecuteSimpleTemplate(template *template.Template, w http.ResponseWriter, r *http.Request)
- func GetCTPerfEmailHtml(groupName string) string
- func GetFailureEmailHtml(runID string) string
- func GetQualifiedCustomWebpages(customWebpages, benchmarkArgs string) ([]string, error)
- func GetSwarmingLogsLink(runID string) string
- func ParseBoolFormValue(string string) bool
- func ParseEmails(emails string) []string
- func SendEmail(recipients []string, subject, body string) error
- func SendEmailWithMarkup(recipients []string, subject, body, markup string) error
- func SendTaskStartEmail(taskId int64, recipients []string, ...) error
- func SendTasksTerminatedEmail(recipients []string) error
Constants ¶
const ( CHROMIUM_PERF_URI = "chromium_perf/" CHROMIUM_PERF_RUNS_URI = "chromium_perf_runs/" ADD_CHROMIUM_PERF_TASK_POST_URI = "_/add_chromium_perf_task" GET_CHROMIUM_PERF_TASKS_POST_URI = "_/get_chromium_perf_tasks" DELETE_CHROMIUM_PERF_TASK_POST_URI = "_/delete_chromium_perf_task" REDO_CHROMIUM_PERF_TASK_POST_URI = "_/redo_chromium_perf_task" EDIT_CHROMIUM_PERF_TASK_POST_URI = "_/edit_chromium_perf_task" CHROMIUM_ANALYSIS_URI = "chromium_analysis/" CHROMIUM_ANALYSIS_RUNS_URI = "chromium_analysis_runs/" ADD_CHROMIUM_ANALYSIS_TASK_POST_URI = "_/add_chromium_analysis_task" GET_CHROMIUM_ANALYSIS_TASKS_POST_URI = "_/get_chromium_analysis_tasks" DELETE_CHROMIUM_ANALYSIS_TASK_POST_URI = "_/delete_chromium_analysis_task" REDO_CHROMIUM_ANALYSIS_TASK_POST_URI = "_/redo_chromium_analysis_task" EDIT_CHROMIUM_ANALYSIS_TASK_POST_URI = "_/edit_chromium_analysis_task" METRICS_ANALYSIS_URI = "metrics_analysis/" METRICS_ANALYSIS_RUNS_URI = "metrics_analysis_runs/" ADD_METRICS_ANALYSIS_TASK_POST_URI = "_/add_metrics_analysis_task" GET_METRICS_ANALYSIS_TASKS_POST_URI = "_/get_metrics_analysis_tasks" DELETE_METRICS_ANALYSIS_TASK_POST_URI = "_/delete_metrics_analysis_task" REDO_METRICS_ANALYSIS_TASK_POST_URI = "_/redo_metrics_analysis_task" EDIT_METRICS_ANALYSIS_TASK_POST_URI = "_/edit_metrics_analysis_task" ADMIN_TASK_URI = "admin_tasks/" RECREATE_PAGE_SETS_RUNS_URI = "recreate_page_sets_runs/" ADD_RECREATE_PAGE_SETS_TASK_POST_URI = "_/add_recreate_page_sets_task" GET_RECREATE_PAGE_SETS_TASKS_POST_URI = "_/get_recreate_page_sets_tasks" DELETE_RECREATE_PAGE_SETS_TASK_POST_URI = "_/delete_recreate_page_sets_task" REDO_RECREATE_PAGE_SETS_TASK_POST_URI = "_/redo_recreate_page_sets_task" RECREATE_WEBPAGE_ARCHIVES_RUNS_URI = "recreate_webpage_archives_runs/" ADD_RECREATE_WEBPAGE_ARCHIVES_TASK_POST_URI = "_/add_recreate_webpage_archives_task" GET_RECREATE_WEBPAGE_ARCHIVES_TASKS_POST_URI = "_/get_recreate_webpage_archives_tasks" DELETE_RECREATE_WEBPAGE_ARCHIVES_TASK_POST_URI = "_/delete_recreate_webpage_archives_task" REDO_RECREATE_WEBPAGE_ARCHIVES_TASK_POST_URI = "_/redo_recreate_webpage_archives_task" RUNS_HISTORY_URI = "history/" PENDING_TASKS_URI = "queue/" PAGE_SETS_PARAMETERS_POST_URI = "_/page_sets/" CL_DATA_POST_URI = "_/cl_data" BENCHMARKS_PLATFORMS_POST_URI = "_/benchmarks_platforms/" TASK_PRIORITIES_GET_URI = "_/task_priorities/" IS_ADMIN_GET_URI = "_/is_admin/" COMPLETED_TASKS_POST_URL = "_/completed_tasks" RESULTS_URI = "/results/" OAUTH2_CALLBACK_PATH = "/oauth2callback/" MAX_GROUPNAME_LEN = 30 )
URIs for frontend handlers.
Variables ¶
var PreExecuteTemplateHook = func() {}
Function to run before executing a template.
Functions ¶
func ExecuteSimpleTemplate ¶
func GetCTPerfEmailHtml ¶
func GetFailureEmailHtml ¶
func GetSwarmingLogsLink ¶
GetSwarmingLogsLink returns HTML snippet that contains a href to the swarming logs.
func ParseBoolFormValue ¶
Returns true if the string is non-empty, unless strconv.ParseBool parses the string as false.
func ParseEmails ¶
ParseEmails returns an array containing emails from the provided comma separated emails string.
func SendEmailWithMarkup ¶
SendEmailWithMarkup sends an email with the specified header and body to the recipients. It also includes gmail markups. Documentation about markups supported in gmail are here: https://developers.google.com/gmail/markup/ A go-to action example is here: https://developers.google.com/gmail/markup/reference/go-to-action
func SendTaskStartEmail ¶
func SendTasksTerminatedEmail ¶
SendTasksTerminatedEmail informs the recipients that their CT tasks were terminated and that they should reschedule.
Types ¶
This section is empty.