Documentation ¶
Index ¶
- Variables
- func AppendFactory(parameters []core.Value) core.Filter
- func Capitalize(input interface{}, data map[string]interface{}) interface{}
- func CapitalizeFactory(parameters []core.Value) core.Filter
- func DateFactory(parameters []core.Value) core.Filter
- func DebugFactory(parameter []core.Value) core.Filter
- func DefaultFactory(parameters []core.Value) core.Filter
- func DivideByFactory(parameters []core.Value) core.Filter
- func Downcase(input interface{}, data map[string]interface{}) interface{}
- func DowncaseFactory(parameters []core.Value) core.Filter
- func Escape(input interface{}, data map[string]interface{}) interface{}
- func EscapeFactory(parameters []core.Value) core.Filter
- func EscapeOnce(input interface{}, data map[string]interface{}) interface{}
- func EscapeOnceFactory(parameters []core.Value) core.Filter
- func First(input interface{}, data map[string]interface{}) interface{}
- func FirstFactory(parameters []core.Value) core.Filter
- func JoinFactory(parameters []core.Value) core.Filter
- func Last(input interface{}, data map[string]interface{}) interface{}
- func LastFactory(parameters []core.Value) core.Filter
- func MinusFactory(parameters []core.Value) core.Filter
- func ModuloFactory(parameters []core.Value) core.Filter
- func NewLineToBrFactory(parameters []core.Value) core.Filter
- func Noop(input interface{}, data map[string]interface{}) interface{}
- func PlusFactory(parameters []core.Value) core.Filter
- func PrependFactory(parameters []core.Value) core.Filter
- func RemoveFactory(parameters []core.Value) core.Filter
- func RemoveFirstFactory(parameters []core.Value) core.Filter
- func ReplaceFactory(parameters []core.Value) core.Filter
- func ReplaceFirstFactory(parameters []core.Value) core.Filter
- func Reverse(input interface{}, data map[string]interface{}) interface{}
- func ReverseFactory(parameters []core.Value) core.Filter
- func Size(input interface{}, data map[string]interface{}) interface{}
- func SizeFactory(parameters []core.Value) core.Filter
- func Sort(input interface{}, data map[string]interface{}) interface{}
- func SortFactory(parameters []core.Value) core.Filter
- func SplitFactory(parameters []core.Value) core.Filter
- func StripHtmlFactory(parameters []core.Value) core.Filter
- func StripNewLinesFactory(parameters []core.Value) core.Filter
- func TimesFactory(parameters []core.Value) core.Filter
- func TruncateFactory(parameters []core.Value) core.Filter
- func TruncateWordsFactory(parameters []core.Value) core.Filter
- func Upcase(input interface{}, data map[string]interface{}) interface{}
- func UpcaseFactory(parameters []core.Value) core.Filter
- type AppendFilter
- type DateFilter
- type DebugFilter
- type DefaultFilter
- type DynamicDivideByFilter
- type DynamicMinusFilter
- type DynamicModuloFilter
- type DynamicPlusFilter
- type DynamicTimesFilter
- type FloatPlusFilter
- type FloatTimesFilter
- type IntModuloFilter
- type IntPlusFilter
- type IntTimesFilter
- type JoinFilter
- type PrependFilter
- type ReplaceFilter
- type ReplacePattern
- type SortableObject
- type SortableObjects
- type SplitFilter
- type TruncateFilter
- type TruncateWordsFilter
Constants ¶
This section is empty.
Variables ¶
var (
EmptyValue = &core.StaticStringValue{""}
)
Functions ¶
func AppendFactory ¶
Creates an append filter
func Capitalize ¶
func Capitalize(input interface{}, data map[string]interface{}) interface{}
Capitalizes words in the input sentence
func CapitalizeFactory ¶
Creates a capitalize filter
func DefaultFactory ¶
Creates a default filter
func Downcase ¶
func Downcase(input interface{}, data map[string]interface{}) interface{}
convert an input string to lowercase
func DowncaseFactory ¶
Creates a downcase filter
func EscapeFactory ¶
Creates an escape filter
func EscapeOnce ¶
func EscapeOnce(input interface{}, data map[string]interface{}) interface{}
Escapes html that hasn't already been escaped
func EscapeOnceFactory ¶
creates an escapeonce filter
func First ¶
func First(input interface{}, data map[string]interface{}) interface{}
get the first element of the passed in array
func Last ¶
func Last(input interface{}, data map[string]interface{}) interface{}
get the last element of the passed in array
func Noop ¶
func Noop(input interface{}, data map[string]interface{}) interface{}
a noop filter which returns the input as-is mostly used internally when the parameters don't make sense
func PrependFactory ¶
Creates an prepend filter
func Reverse ¶
func Reverse(input interface{}, data map[string]interface{}) interface{}
reverses an array
func ReverseFactory ¶
Creates a reverse filter
func Size ¶
func Size(input interface{}, data map[string]interface{}) interface{}
Gets the size of a string or array
func TruncateFactory ¶
Creates an truncate filter
func TruncateWordsFactory ¶
Creates an truncatewords filter
Types ¶
type AppendFilter ¶
type AppendFilter struct {
// contains filtered or unexported fields
}
func (*AppendFilter) Append ¶
func (a *AppendFilter) Append(input interface{}, data map[string]interface{}) interface{}
type DateFilter ¶
type DateFilter struct {
// contains filtered or unexported fields
}
func (*DateFilter) ToString ¶
func (d *DateFilter) ToString(input interface{}, data map[string]interface{}) interface{}
type DebugFilter ¶
type DebugFilter struct {
// contains filtered or unexported fields
}
func (*DebugFilter) Debug ¶
func (f *DebugFilter) Debug(input interface{}, data map[string]interface{}) interface{}
type DefaultFilter ¶
type DefaultFilter struct {
// contains filtered or unexported fields
}
func (*DefaultFilter) Default ¶
func (d *DefaultFilter) Default(input interface{}, data map[string]interface{}) interface{}
type DynamicDivideByFilter ¶
type DynamicDivideByFilter struct {
// contains filtered or unexported fields
}
func (*DynamicDivideByFilter) DivideBy ¶
func (t *DynamicDivideByFilter) DivideBy(input interface{}, data map[string]interface{}) interface{}
type DynamicMinusFilter ¶
type DynamicMinusFilter struct {
// contains filtered or unexported fields
}
func (*DynamicMinusFilter) Minus ¶
func (p *DynamicMinusFilter) Minus(input interface{}, data map[string]interface{}) interface{}
type DynamicModuloFilter ¶
type DynamicModuloFilter struct {
// contains filtered or unexported fields
}
func (*DynamicModuloFilter) Mod ¶
func (m *DynamicModuloFilter) Mod(input interface{}, data map[string]interface{}) interface{}
type DynamicPlusFilter ¶
type DynamicPlusFilter struct {
// contains filtered or unexported fields
}
func (*DynamicPlusFilter) Plus ¶
func (p *DynamicPlusFilter) Plus(input interface{}, data map[string]interface{}) interface{}
type DynamicTimesFilter ¶
type DynamicTimesFilter struct {
// contains filtered or unexported fields
}
func (*DynamicTimesFilter) Times ¶
func (t *DynamicTimesFilter) Times(input interface{}, data map[string]interface{}) interface{}
type FloatPlusFilter ¶
type FloatPlusFilter struct {
// contains filtered or unexported fields
}
Plus filter for float parameter
func (*FloatPlusFilter) Plus ¶
func (p *FloatPlusFilter) Plus(input interface{}, data map[string]interface{}) interface{}
type FloatTimesFilter ¶
type FloatTimesFilter struct {
// contains filtered or unexported fields
}
func (*FloatTimesFilter) Times ¶
func (t *FloatTimesFilter) Times(input interface{}, data map[string]interface{}) interface{}
Multiples two numbers
type IntModuloFilter ¶
type IntModuloFilter struct {
// contains filtered or unexported fields
}
Plus filter for integer parameter
func (*IntModuloFilter) Mod ¶
func (m *IntModuloFilter) Mod(input interface{}, data map[string]interface{}) interface{}
type IntPlusFilter ¶
type IntPlusFilter struct {
// contains filtered or unexported fields
}
Plus filter for integer parameter
func (*IntPlusFilter) Plus ¶
func (p *IntPlusFilter) Plus(input interface{}, data map[string]interface{}) interface{}
type IntTimesFilter ¶
type IntTimesFilter struct {
// contains filtered or unexported fields
}
func (*IntTimesFilter) Times ¶
func (t *IntTimesFilter) Times(input interface{}, data map[string]interface{}) interface{}
Multiples two numbers
type JoinFilter ¶
type JoinFilter struct {
// contains filtered or unexported fields
}
func (*JoinFilter) Join ¶
func (f *JoinFilter) Join(input interface{}, data map[string]interface{}) interface{}
join elements of the array with certain character between them
type PrependFilter ¶
type PrependFilter struct {
// contains filtered or unexported fields
}
func (*PrependFilter) Prepend ¶
func (a *PrependFilter) Prepend(input interface{}, data map[string]interface{}) interface{}
type ReplaceFilter ¶
type ReplaceFilter struct {
// contains filtered or unexported fields
}
func (*ReplaceFilter) Replace ¶
func (r *ReplaceFilter) Replace(input interface{}, data map[string]interface{}) interface{}
type ReplacePattern ¶
type ReplacePattern struct {
// contains filtered or unexported fields
}
Used by other filters
func (*ReplacePattern) Replace ¶
func (r *ReplacePattern) Replace(input interface{}, data map[string]interface{}) interface{}
type SortableObject ¶
type SortableObject struct { Underlying interface{} AsString string }
type SortableObjects ¶
type SortableObjects []*SortableObject
func (SortableObjects) Len ¶
func (s SortableObjects) Len() int
func (SortableObjects) Less ¶
func (s SortableObjects) Less(i, j int) bool
func (SortableObjects) Swap ¶
func (s SortableObjects) Swap(i, j int)
type SplitFilter ¶
type SplitFilter struct {
// contains filtered or unexported fields
}
func (*SplitFilter) Split ¶
func (f *SplitFilter) Split(input interface{}, data map[string]interface{}) interface{}
splits a value on the given value and returns an array
type TruncateFilter ¶
type TruncateFilter struct {
// contains filtered or unexported fields
}
func (*TruncateFilter) Truncate ¶
func (t *TruncateFilter) Truncate(input interface{}, data map[string]interface{}) interface{}
type TruncateWordsFilter ¶
type TruncateWordsFilter struct {
// contains filtered or unexported fields
}
func (*TruncateWordsFilter) Truncate ¶
func (t *TruncateWordsFilter) Truncate(input interface{}, data map[string]interface{}) interface{}
Source Files ¶
- append.go
- capitalize.go
- date.go
- debug.go
- default.go
- divideby.go
- downcase.go
- escape.go
- escapeonce.go
- first.go
- join.go
- last.go
- minus.go
- modulo.go
- newlinetobr.go
- noop.go
- plus.go
- prepend.go
- remove.go
- removefirst.go
- replace.go
- replacefirst.go
- replacepattern.go
- reverse.go
- size.go
- sort.go
- split.go
- striphtml.go
- stripnewlines.go
- times.go
- truncate.go
- truncatewords.go
- upcase.go