Documentation ¶
Index ¶
- type HTMLTemplate
- type Option
- func WithHTMLPreRender(preRender preRenderFunc) Option[*htmltemplate.Template]
- func WithHTMLVars(vars map[string]any) Option[*htmltemplate.Template]
- func WithPreRender[TMPL itmpl](preRender preRenderFunc) Option[TMPL]
- func WithTextPreRender(preRender preRenderFunc) Option[*texttemplate.Template]
- func WithTextVars(vars map[string]any) Option[*texttemplate.Template]
- func WithVars[TMPL itmpl](vars map[string]any) Option[TMPL]
- type Template
- type TextTemplate
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type HTMLTemplate ¶
type HTMLTemplate = Template[*htmltemplate.Template]
func NewHTMLTemplate ¶
func NewHTMLTemplate(name, subject, content string, opts ...Option[*htmltemplate.Template]) (*HTMLTemplate, error)
NewHTMLTemplate returns new template
type Option ¶
type Option[TMPL itmpl] func(*Template[TMPL])
func WithHTMLPreRender ¶
func WithHTMLPreRender(preRender preRenderFunc) Option[*htmltemplate.Template]
func WithHTMLVars ¶
func WithHTMLVars(vars map[string]any) Option[*htmltemplate.Template]
func WithPreRender ¶
func WithPreRender[TMPL itmpl](preRender preRenderFunc) Option[TMPL]
func WithTextPreRender ¶
func WithTextPreRender(preRender preRenderFunc) Option[*texttemplate.Template]
func WithTextVars ¶
func WithTextVars(vars map[string]any) Option[*texttemplate.Template]
type Template ¶
type Template[TMPL itmpl] struct {
// contains filtered or unexported fields
}
Template is the template for the message
type TextTemplate ¶
type TextTemplate = Template[*texttemplate.Template]
func NewTextTemplate ¶
func NewTextTemplate(name, subject, content string, opts ...Option[*texttemplate.Template]) (*TextTemplate, error)
NewTextTemplate returns new template
Click to show internal directories.
Click to hide internal directories.