Documentation ¶
Index ¶
- func Escape(v interface{}) string
- func JSONMarshal(v interface{}) string
- func Replace(filename string, tempConfing any) (io.Reader, error)
- func ReplaceV2(filename string, tempConfing any, engFn func(engine *Engine)) ([]byte, error)
- func TimeCurrent() int64
- func Trim(v interface{}) string
- type CommandFunc
- type Content
- type ContentMap
- type Data
- type Delims
- type Engine
- func (cr *Engine) AddFunc(key string, value any) *Engine
- func (cr *Engine) DelFunc(key string) *Engine
- func (cr *Engine) LoadFS(obj fs.FS, patterns ...string) *Engine
- func (cr *Engine) LoadFiles(files ...string) *Engine
- func (cr *Engine) LoadGlob(pattern string) *Engine
- func (cr *Engine) LoadString(str string) *Engine
- func (cr *Engine) OUTPUT(name string, d interface{}) (*Data, error)
- type Format
- func (ft *Format) AddCommand(funcName string, funcCall CommandFunc)
- func (ft *Format) Format(format, appId, filter string, source interface{}, handler HandlerFunc) (*Data, error)
- func (ft *Format) FormatWith(cmdFn CommandFunc, tplName string, source interface{}, handler HandlerFunc) (*Data, error)
- func (ft *Format) Load(path string) error
- func (ft *Format) LoadFS(f fs.FS, patterns ...string)
- func (ft *Format) LoadString(str string)
- func (ft *Format) LoadTemplate(path string)
- type HandlerFunc
- type Item
- type Items
- type Option
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func JSONMarshal ¶ added in v1.20.87
func JSONMarshal(v interface{}) string
func TimeCurrent ¶
func TimeCurrent() int64
Types ¶
type CommandFunc ¶ added in v1.2.23
type CommandFunc func(source interface{}, opt *Option, handler HandlerFunc) error
func Chain ¶
func Chain(handlers ...CommandFunc) CommandFunc
type ContentMap ¶
type Data ¶
type Data struct {
// contains filtered or unexported fields
}
type Engine ¶
type Engine struct { Delims Delims // contains filtered or unexported fields }
func (*Engine) LoadString ¶ added in v1.2.23
type Format ¶
type Format struct {
// contains filtered or unexported fields
}
func (*Format) AddCommand ¶
func (ft *Format) AddCommand(funcName string, funcCall CommandFunc)
func (*Format) Format ¶
func (ft *Format) Format(format, appId, filter string, source interface{}, handler HandlerFunc) (*Data, error)
func (*Format) FormatWith ¶ added in v1.2.23
func (ft *Format) FormatWith(cmdFn CommandFunc, tplName string, source interface{}, handler HandlerFunc) (*Data, error)
func (*Format) LoadString ¶ added in v1.2.23
func (*Format) LoadTemplate ¶
type HandlerFunc ¶ added in v1.2.23
type Item ¶
type Item struct { Xml ContentMap `json:"xml"` Json ContentMap `json:"json"` }
Click to show internal directories.
Click to hide internal directories.