funcs

package
v1.5.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Dec 16, 2018 License: MIT Imports: 23 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Add

func Add(a, b interface{}) (int64, error)

func Asset

func Asset(assetsHostname, url string) string

func CamelCase

func CamelCase(s string) string

func ComponentParam

func ComponentParam(c *ComponentInstance, name string, value interface{}) string

func DateFormat

func DateFormat(t time.Time, lang, layout string) string

func Development

func Development() bool

func Dict

func Dict(values ...interface{}) (map[string]interface{}, error)

func Div

func Div(a, b int) int

func EndComponent

func EndComponent(c *ComponentInstance) (template.HTML, error)

func Even

func Even(n int) bool

func GenRange

func GenRange(n, start int64) []int64

func GetVar

func GetVar(v *Var) interface{}

func HasPrefix

func HasPrefix(s, prefix string) bool

func Include added in v1.5.0

func Include(path string) (string, error)

func JSON

func JSON(obj interface{}) (string, error)

func Join

func Join(chain []string, sep string) string

func Last

func Last(index int, list interface{}) bool

func Limit

func Limit(max int, slice interface{}) interface{}

func Mod

func Mod(n, m int) int

func MsgFormat

func MsgFormat(lang, format string, params ...interface{}) (string, error)

func Nl2Br

func Nl2Br(text string) template.HTML

func NoSpaces

func NoSpaces(s string) string

func Odd

func Odd(n int) bool

func Percentage

func Percentage(old, current int64) int64

func Price

func Price(value int32) string

func ProtoDateFormat

func ProtoDateFormat(lang, layout string, t *pbdatetime.Date) string

func RandID

func RandID(prefix string) string

func RandItem

func RandItem(slice interface{}) interface{}

func Rev added in v1.2.0

func Rev(url string) string

func SafeCSS added in v1.3.0

func SafeCSS(s ...string) (template.CSS, error)

func SafeHTML

func SafeHTML(s ...string) (template.HTML, error)

func SafeJavascript

func SafeJavascript(s ...string) (template.JS, error)

func SafeURL

func SafeURL(s ...string) (template.URL, error)

func SetVar

func SetVar(v *Var, value interface{}) string

func Shuffle

func Shuffle(slice interface{}) interface{}

func Slice

func Slice(min, max int, slice interface{}) interface{}

func Thumbnail

func Thumbnail(servingURL string, strFlags string) (string, error)

func Times

func Times(a, b int64) int64

func TimestampFormat added in v1.1.0

func TimestampFormat(lang, layout string, timestamp *pbtimestamp.Timestamp) string

func Translate

func Translate(lang, format string) string

func Trio

func Trio(n int) bool

func Vue

func Vue(obj interface{}) (template.JS, error)

Types

type ComponentInstance

type ComponentInstance struct {
	// contains filtered or unexported fields
}

func Component

func Component(name string) *ComponentInstance

type ComponentInstanceParam

type ComponentInstanceParam struct {
	// contains filtered or unexported fields
}

type Var

type Var struct {
	// contains filtered or unexported fields
}

func NewVar

func NewVar(value interface{}) *Var

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL