Documentation
¶
Index ¶
- Variables
- func AddFuncMap(key string, funname interface{}) error
- func AddTemplateExt(ext string)
- func AssetsCss(src string) template.HTML
- func AssetsJs(src string) template.HTML
- func BuildTemplate(dir string) error
- func Compare(a, b interface{}) (equal bool)
- func Date(t time.Time, format string) string
- func DateFormat(t time.Time, layout string) (datestring string)
- func DateParse(dateString, format string) (time.Time, error)
- func HasTemplateExt(paths string) bool
- func HomeHandler(rw http.ResponseWriter, req *http.Request, conf *core.Config)
- func Html2str(html string) string
- func Htmlquote(src string) string
- func Htmlunquote(src string) string
- func MakeHandler(fn webHandler, conf *core.Config) http.HandlerFunc
- func ParseForm(form url.Values, obj interface{}) error
- func RenderForm(obj interface{}) template.HTML
- func Str2html(raw string) template.HTML
- func Substr(s string, start, length int) string
- func TimeStampFormat(t int64, layout string) (datestring string)
- func TransactionsHandler(rw http.ResponseWriter, req *http.Request, conf *core.Config)
- func UnderscoreSpace(s string) string
- func UrlEncode(s string) string
Constants ¶
This section is empty.
Variables ¶
var ( // beego template caching map and supported template file extensions. BeeTemplates map[string]*template.Template BeeTemplateExt []string TemplateLeft string TemplateRight string )
var FormType = map[string]bool{ "text": true, "textarea": true, "hidden": true, "password": true, }
form types for RenderForm function
var (
Templates map[string]*template.Template
)
Functions ¶
func AddFuncMap ¶
AddFuncMap let user to register a func in the template.
func BuildTemplate ¶
build all template files in a directory. it makes beego can render any template file in view directory.
func Compare ¶
func Compare(a, b interface{}) (equal bool)
Compare is a quick and dirty comparison function. It will convert whatever you give it to strings and see if the two values are equal. Whitespace is trimmed. Used by the template parser as "eq".
func DateFormat ¶
DateFormat takes a time and a layout string and returns a string with the formatted date. Used by the template parser as "dateformat"
func HasTemplateExt ¶
return this path contains supported template extension of beego or not.
func HomeHandler ¶
func MakeHandler ¶
func MakeHandler(fn webHandler, conf *core.Config) http.HandlerFunc
func RenderForm ¶
render object to form html. obj must be a struct pointer.
func TimeStampFormat ¶
TimeStampFormat is a wrapper that convert int64 timestampt to *time.Time and call DateFormat
func TransactionsHandler ¶
func UnderscoreSpace ¶
Types ¶
This section is empty.