Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AssetFunc ¶
type AssetFunc struct { Router *web.Router `inject:""` Engine *pugjs.Engine `inject:""` BaseURL string `inject:"config:cdn.base_url,optional"` }
AssetFunc returns the proper URL for the asset, either local or via CDN
type CapitalizeFunc ¶
type CapitalizeFunc struct{}
CapitalizeFunc struct
func (*CapitalizeFunc) Func ¶
func (s *CapitalizeFunc) Func(ctx context.Context) interface{}
Func to make titleCase (CapitalizeFunc)
type DebugFunc ¶
type DebugFunc struct{}
DebugFunc renders data as JSON, which allows debugging in templates
type EscapeHTMLFunc ¶ added in v1.0.3
type EscapeHTMLFunc struct{}
EscapeHTMLFunc is exported as a template function
func (*EscapeHTMLFunc) Func ¶ added in v1.0.3
func (f *EscapeHTMLFunc) Func(context.Context) interface{}
Func - templatefunction to escape html strings
type JSON ¶
type JSON struct{}
JSON is our Javascript's JSON equivalent
type Math ¶
type Math struct{}
Math is our Javascript's Math equivalent
type Object ¶
type Object struct{}
Object implementation
type ParseFloat ¶ added in v1.0.5
type ParseFloat struct{}
ParseFloat struct for template function
func (*ParseFloat) Func ¶ added in v1.0.5
func (p *ParseFloat) Func(ctx context.Context) interface{}
Func tries to parse any type into a float64, it is checking for pugjs types and also for regular types
type StartsWithFunc ¶
type StartsWithFunc struct{}
StartsWithFunc struct
func (*StartsWithFunc) Func ¶
func (s *StartsWithFunc) Func(ctx context.Context) interface{}
Func StartsWithFunc
type StriptagsFunc ¶
type StriptagsFunc struct{}
StriptagsFunc provides template function to strip html tags
func (StriptagsFunc) Func ¶
func (df StriptagsFunc) Func(ctx context.Context) interface{}
Func implements the strip tags template function
type TruncateFunc ¶
type TruncateFunc struct{}
TruncateFunc struct
func (*TruncateFunc) Func ¶
func (s *TruncateFunc) Func(ctx context.Context) interface{}
Func TruncateFunc
type TryURLFunc ¶
TryURLFunc allows templates to access the routers `URL` helper method
func (*TryURLFunc) Func ¶
func (u *TryURLFunc) Func(ctx context.Context) interface{}
Func as implementation of url method