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) Env(key string) (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) FindObjectByField(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) HttpGet(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(s string) (bool, error)
- func (tpl *Template) JiraAssetsSearch(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) 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) 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) 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) 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)
- 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) EscapeString ¶ added in v0.9.11
func (*Template) FindObjectByField ¶ added in v0.11.0
func (*Template) GitlabPipelineVars ¶ added in v0.9.11
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) JiraAssetsSearch ¶ added in v0.11.0
func (*Template) JsonEscape ¶ added in v0.9.11
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) 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.
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.