Documentation ¶
Index ¶
- type HtmlTemplate
- type Template
- func (tpl *Template) Compare(v1, v2 interface{}) bool
- func (tpl *Template) Content(s string) (string, error)
- func (tpl *Template) CountOccurrences(list []interface{}) map[string]int
- func (tpl *Template) DateParse(d string) (time.Time, error)
- func (tpl *Template) DurationBetween(start, end time.Time) map[string]int
- func (tpl *Template) Env(key string) (string, error)
- func (tpl *Template) Error(format string, a ...any) (string, error)
- func (tpl *Template) EscapeString(s string) (string, error)
- func (tpl *Template) FindKey(obj interface{}, field string, value interface{}) interface{}
- func (tpl *Template) FindKeys(obj interface{}, field string, value interface{}) []interface{}
- func (tpl *Template) FindObject(obj interface{}, field string, value interface{}) interface{}
- func (tpl *Template) FindObjects(obj interface{}, field string, value interface{}) []interface{}
- func (tpl *Template) FromJson(i interface{}) (interface{}, error)
- func (tpl *Template) GitlabPipelineVars(URL string, token string, projectID int, query string, limit int) string
- func (tpl *Template) Gjson(obj interface{}, path string) (string, error)
- func (tpl *Template) GoogleCalendarDeleteEvents(params map[string]interface{}) ([]byte, error)
- func (tpl *Template) GoogleCalendarGetEvents(params map[string]interface{}) ([]byte, error)
- func (tpl *Template) GoogleCalendarInsertEvent(params map[string]interface{}) ([]byte, error)
- func (tpl *Template) GrafanaCopyDashboard(params map[string]interface{}) ([]byte, error)
- func (tpl *Template) GrafanaCreateDashboard(params map[string]interface{}) ([]byte, error)
- func (tpl *Template) HttpGet(params map[string]interface{}) ([]byte, error)
- func (tpl *Template) HttpGetHeader(params map[string]interface{}) ([]byte, error)
- func (tpl *Template) HttpPost(params map[string]interface{}) ([]byte, error)
- func (tpl *Template) IfDef(i interface{}, def string) (string, error)
- func (tpl *Template) IfElse(o interface{}, vars []interface{}) interface{}
- func (tpl *Template) IfIP(obj interface{}) bool
- func (tpl *Template) IfIPAndPort(obj interface{}) bool
- func (tpl *Template) IsEmpty(v interface{}) (bool, error)
- func (tpl *Template) IsNotEmpty(v interface{}) (bool, error)
- func (tpl *Template) JiraAddComment(params map[string]interface{}) ([]byte, error)
- func (tpl *Template) JiraCreateAsset(params map[string]interface{}) ([]byte, error)
- func (tpl *Template) JiraCreateIssue(params map[string]interface{}) ([]byte, error)
- func (tpl *Template) JiraGetIssueTransition(params map[string]interface{}) ([]byte, error)
- func (tpl *Template) JiraIssueTransition(params map[string]interface{}) ([]byte, error)
- func (tpl *Template) JiraSearchAssets(params map[string]interface{}) ([]byte, error)
- func (tpl *Template) JiraUpdateIssue(params map[string]interface{}) ([]byte, error)
- func (tpl *Template) Join(sep string, a []string) (string, error)
- func (tpl *Template) JsonEscape(s string) (string, error)
- func (tpl *Template) Jsonata(data interface{}, query string) (string, error)
- func (tpl *Template) ListFilesWithModTime(rootDir string) (map[string]string, error)
- func (tpl *Template) LogDebug(obj interface{}, args ...interface{}) (string, error)
- func (tpl *Template) LogError(obj interface{}, args ...interface{}) (string, error)
- func (tpl *Template) LogInfo(obj interface{}, args ...interface{}) (string, error)
- func (tpl *Template) LogWarn(obj interface{}, args ...interface{}) (string, error)
- func (tpl *Template) NowFmt(f string) string
- func (tpl *Template) PagerDutyCreateIncident(params map[string]interface{}) ([]byte, error)
- func (tpl *Template) PagerDutySendNoteToIncident(params map[string]interface{}) ([]byte, error)
- func (tpl *Template) ParserLine() (int, error)
- func (tpl *Template) PrometheusGet(params map[string]interface{}) ([]byte, error)
- func (tpl *Template) RegexFindSubmatch(regex string, s string) []string
- func (tpl *Template) RegexMatch(re, s string) (bool, error)
- func (tpl *Template) RegexMatchFindKey(obj interface{}, field, value string) interface{}
- func (tpl *Template) RegexMatchFindKeys(obj interface{}, field, value string) []interface{}
- func (tpl *Template) RegexMatchObjectByField(obj interface{}, field, value string) interface{}
- func (tpl *Template) RegexReplaceAll(re, pl, s string) (string, error)
- func (tpl *Template) ReplaceAll(f, t, s string) (string, error)
- func (tpl *Template) SSHRun(params map[string]interface{}) (string, error)
- func (tpl *Template) Sleep(ms int) string
- func (tpl *Template) SortOccurrences(occurrences map[string]int, sep string, count int) []string
- func (tpl *Template) Split(sep, s string) ([]string, error)
- func (tpl *Template) TagExists(s, key string) (bool, error)
- func (tpl *Template) TagValue(s, key string) (string, error)
- func (tpl *Template) TemplateRender(name string, obj interface{}) (string, error)
- func (tpl *Template) TemplateRenderFile(path string, obj interface{}) (string, error)
- func (tpl *Template) TimeFormat(s string, format string) (string, error)
- func (tpl *Template) TimeNano(s string) (string, error)
- func (tpl *Template) ToJson(i interface{}) (string, error)
- func (tpl *Template) ToLower(s string) (string, error)
- func (tpl *Template) ToString(i interface{}) (string, error)
- func (tpl *Template) ToTitle(s string) (string, error)
- func (tpl *Template) ToUpper(s string) (string, error)
- func (tpl *Template) URLWait(url string, timeout, retry int, size int64) []byte
- func (tpl *Template) UnescapeString(s string) (string, error)
- func (tpl *Template) VMRestart(params map[string]interface{}) ([]byte, error)
- func (tpl *Template) VMStart(params map[string]interface{}) ([]byte, error)
- func (tpl *Template) VMStatus(params map[string]interface{}) ([]byte, error)
- func (tpl *Template) VMStop(params map[string]interface{}) ([]byte, error)
- type TemplateOptions
- type TextTemplate
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type HtmlTemplate ¶
type HtmlTemplate struct { Template // contains filtered or unexported fields }
func NewHtmlTemplate ¶
func NewHtmlTemplate(options TemplateOptions, logger common.Logger) (*HtmlTemplate, error)
func (*HtmlTemplate) CustomRenderWithOptions ¶ added in v0.4.5
func (tpl *HtmlTemplate) CustomRenderWithOptions(opts TemplateOptions) ([]byte, error)
func (*HtmlTemplate) Render ¶ added in v0.4.5
func (tpl *HtmlTemplate) Render() ([]byte, error)
func (*HtmlTemplate) RenderObject ¶ added in v0.4.6
func (tpl *HtmlTemplate) RenderObject(obj interface{}) ([]byte, error)
type Template ¶
type Template struct {
// contains filtered or unexported fields
}
func (*Template) CountOccurrences ¶ added in v0.15.10
func (*Template) DurationBetween ¶ added in v0.15.11
func (*Template) EscapeString ¶ added in v0.9.11
func (*Template) FindObject ¶ added in v0.14.6
func (*Template) FindObjects ¶ added in v0.14.6
func (*Template) GitlabPipelineVars ¶ added in v0.9.11
func (*Template) GoogleCalendarDeleteEvents ¶ added in v0.13.2
func (*Template) GoogleCalendarGetEvents ¶ added in v0.13.2
func (*Template) GoogleCalendarInsertEvent ¶ added in v0.13.2
func (*Template) GrafanaCopyDashboard ¶ added in v0.14.5
func (*Template) GrafanaCreateDashboard ¶ added in v0.14.5
func (*Template) HttpGetHeader ¶ added in v0.15.11
url, contentType, authorization string, timeout int
func (*Template) IfElse ¶ added in v0.9.11
func (tpl *Template) IfElse(o interface{}, vars []interface{}) interface{}
func (*Template) IfIPAndPort ¶ added in v0.9.11
func (*Template) IsNotEmpty ¶ added in v0.13.8
func (*Template) JiraAddComment ¶ added in v0.14.4
func (*Template) JiraCreateAsset ¶ added in v0.13.7
func (*Template) JiraCreateIssue ¶ added in v0.13.1
func (*Template) JiraGetIssueTransition ¶ added in v0.14.15
func (*Template) JiraIssueTransition ¶ added in v0.14.15
func (*Template) JiraSearchAssets ¶ added in v0.12.0
func (*Template) JiraUpdateIssue ¶ added in v0.14.4
func (*Template) JsonEscape ¶ added in v0.9.11
func (*Template) ListFilesWithModTime ¶ added in v0.15.11
func (*Template) PagerDutyCreateIncident ¶ added in v0.12.1
func (*Template) PagerDutySendNoteToIncident ¶ added in v0.14.4
func (*Template) ParserLine ¶ added in v0.14.13
func (*Template) PrometheusGet ¶ added in v0.14.8
func (*Template) RegexFindSubmatch ¶ added in v0.9.11
func (*Template) RegexMatch ¶ added in v0.9.11
regexMatch returns true or alse if the string matches the given regular expression
func (*Template) RegexMatchFindKey ¶ added in v0.11.0
func (*Template) RegexMatchFindKeys ¶ added in v0.11.0
func (*Template) RegexMatchObjectByField ¶ added in v0.9.11
func (*Template) RegexReplaceAll ¶ added in v0.9.11
regexReplaceAll replaces all occurrences of a regular expression with the given replacement value.
func (*Template) ReplaceAll ¶ added in v0.9.11
replaceAll replaces all occurrences of a value in a string with the given replacement value.
func (*Template) SortOccurrences ¶ added in v0.15.10
func (*Template) TemplateRender ¶ added in v0.14.2
func (*Template) TemplateRenderFile ¶ added in v0.12.2
func (*Template) TimeFormat ¶ added in v0.9.11
func (*Template) ToJson ¶ added in v0.10.4
toJSON converts the given structure into a deeply nested JSON string.
func (*Template) ToLower ¶ added in v0.9.11
toLower converts the given string (usually by a pipe) to lowercase.
func (*Template) ToTitle ¶ added in v0.9.11
toTitle converts the given string (usually by a pipe) to titlecase.
func (*Template) ToUpper ¶ added in v0.9.11
toUpper converts the given string (usually by a pipe) to uppercase.
func (*Template) UnescapeString ¶ added in v0.9.11
type TemplateOptions ¶
type TextTemplate ¶
type TextTemplate struct { Template // contains filtered or unexported fields }
func NewTextTemplate ¶
func NewTextTemplate(options TemplateOptions, logger common.Logger) (*TextTemplate, error)
func (*TextTemplate) CustomRenderWithOptions ¶ added in v0.4.5
func (tpl *TextTemplate) CustomRenderWithOptions(opts TemplateOptions) ([]byte, error)
func (*TextTemplate) Render ¶ added in v0.4.5
func (tpl *TextTemplate) Render() ([]byte, error)
func (*TextTemplate) RenderObject ¶ added in v0.4.6
func (tpl *TextTemplate) RenderObject(obj interface{}) ([]byte, error)
Click to show internal directories.
Click to hide internal directories.