Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type DefaultTemplateLoader ¶
type DefaultTemplateLoader struct {
// contains filtered or unexported fields
}
func (*DefaultTemplateLoader) Load ¶
func (l *DefaultTemplateLoader) Load(tplType RenderType) string
type EmailRender ¶
type EmailRender struct { }
func NewEmailRenderer ¶
func NewEmailRenderer() *EmailRender
type NotifyRender ¶
type NotifyRender struct { }
func NewNotifyRenderer ¶
func NewNotifyRenderer() *NotifyRender
type RenderStrategy ¶
type RenderType ¶
type RenderType string
const ( TYPE_EMAIL RenderType = "email" TYPE_NOTIFY RenderType = "notify" )
type Renderer ¶
type Renderer struct {
// contains filtered or unexported fields
}
func NewRenderer ¶
func NewRenderer(dao *dao.Dao, renderType RenderType, defaultTemplateLoader TemplateLoader) *Renderer
type TemplateLoader ¶
type TemplateLoader interface {
Load(tplType RenderType) string
}
func NewFileLoader ¶
func NewFileLoader(tplName string) TemplateLoader
Creates a new default template loader
tplName parameter is the template name, if tplName is empty, it will load the default template, or you can specify a custom template name. it will load the template from internal or external, first look up external, then internal.
Click to show internal directories.
Click to hide internal directories.