Documentation
¶
Index ¶
- type ITplEngine
- type ResponseData
- type TplEngine
- func (t *TplEngine) Assign(key string, data interface{}) *TplEngine
- func (t *TplEngine) AssignMap(data map[string]interface{}) *TplEngine
- func (t *TplEngine) Display(tpl string)
- func (t *TplEngine) DisplayMulti(tpl string, subTpl []string)
- func (t *TplEngine) NewTemplate(name string) *TplEngine
- func (t *TplEngine) Parse(content string) *TplEngine
- func (t *TplEngine) ParseFiles(tplName ...string) *TplEngine
- func (t *TplEngine) Response(code int, result interface{}, message string)
- func (t *TplEngine) ResponseWithHeader(code int, result interface{}, message string, headerOptions map[string]string)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ITplEngine ¶
type ITplEngine interface {
NewTemplate(string) *TplEngine
Parse(string) *TplEngine
ParseFiles(...string) *TplEngine
AssignMap(map[string]interface{}) *TplEngine
Assign(string, interface{}) *TplEngine
Display(string)
Response(int, interface{}, string)
ResponseWithHeader(int, interface{}, string, map[string]string)
}
type ResponseData ¶
type TplEngine ¶
type TplEngine struct {
TplData map[string]interface{}
W http.ResponseWriter
R *http.Request
Header map[string]string
// contains filtered or unexported fields
}
func NewTplEngine ¶
func NewTplEngine(w http.ResponseWriter, r *http.Request) *TplEngine
func (*TplEngine) DisplayMulti ¶
func (*TplEngine) NewTemplate ¶
func (*TplEngine) ParseFiles ¶
Click to show internal directories.
Click to hide internal directories.