funcs

package
v1.8.0 Latest Latest
Warning

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

Go to latest
Published: Jan 30, 2019 License: MIT Imports: 25 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var EuropeMadrid *time.Location

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

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 Madrid

func Madrid(value interface{}) (time.Time, error)

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 Now

func Now() time.Time

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

func Rev(url string) string

func SafeCSS

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 TimeFormat

func TimeFormat(layout string, t time.Time) string

func Times

func Times(a, b int64) int64

func TimestampFormat

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

func Timezone

func Timezone(timezone string, t time.Time) (time.Time, error)

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