param

package
v2.0.0+incompatible Latest Latest
Warning

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

Go to latest
Published: Nov 9, 2019 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

View Source
const (
	EmptyHTML      = template.HTML(``)
	EmptyJS        = template.JS(``)
	EmptyCSS       = template.CSS(``)
	EmptyHTMLAttr  = template.HTMLAttr(``)
	DateTimeLayout = `2006-01-02 15:04:05`
	DateTimeShort  = `2006-01-02 15:04`
	DateLayout     = `2006-01-02`
	TimeLayout     = `15:04:05`
	DateMd         = `01-02`
	DateShort      = `06-01-02`
	TimeShort      = `15:04`
)

Variables

This section is empty.

Functions

func AsBool

func AsBool(val interface{}) bool

func AsBytes

func AsBytes(val interface{}) []byte

func AsCSS

func AsCSS(val interface{}) template.CSS

func AsDateTime

func AsDateTime(val interface{}, layouts ...string) time.Time

func AsFloat32

func AsFloat32(val interface{}) float32

func AsFloat64

func AsFloat64(val interface{}) float64

func AsHTML

func AsHTML(val interface{}) template.HTML

func AsHTMLAttr

func AsHTMLAttr(val interface{}) template.HTMLAttr

func AsInt

func AsInt(val interface{}) int

func AsInt16

func AsInt16(val interface{}) int16

func AsInt32

func AsInt32(val interface{}) int32

func AsInt64

func AsInt64(val interface{}) int64

func AsInt8

func AsInt8(val interface{}) int8

func AsJS

func AsJS(val interface{}) template.JS

func AsString

func AsString(val interface{}) string

func AsTimestamp

func AsTimestamp(val interface{}) time.Time

func AsType

func AsType(typ string, val interface{}) interface{}

func AsUint

func AsUint(val interface{}) uint

func AsUint16

func AsUint16(val interface{}) uint16

func AsUint32

func AsUint32(val interface{}) uint32

func AsUint64

func AsUint64(val interface{}) uint64

func AsUint8

func AsUint8(val interface{}) uint8

func Decr

func Decr(val interface{}, n int64) int64

func Incr

func Incr(val interface{}, n int64) int64

Types

type SafeMap

type SafeMap struct {
	sync.Map
}

func NewMap

func NewMap() *SafeMap

func (*SafeMap) Bool

func (s *SafeMap) Bool(key interface{}, defaults ...interface{}) bool

func (*SafeMap) CSS

func (s *SafeMap) CSS(key interface{}, defaults ...interface{}) template.CSS

func (*SafeMap) DateTime

func (s *SafeMap) DateTime(key interface{}, layouts ...string) time.Time

func (*SafeMap) Decr

func (s *SafeMap) Decr(key interface{}, n int64, defaults ...interface{}) int64

func (*SafeMap) Float32

func (s *SafeMap) Float32(key interface{}, defaults ...interface{}) float32

func (*SafeMap) Float64

func (s *SafeMap) Float64(key interface{}, defaults ...interface{}) float64

func (*SafeMap) Get

func (s *SafeMap) Get(key interface{}, defaults ...interface{}) interface{}

func (*SafeMap) GetOk

func (s *SafeMap) GetOk(key interface{}) (interface{}, bool)

func (*SafeMap) GetOrSet

func (s *SafeMap) GetOrSet(key, value interface{}) (actual interface{}, loaded bool)

func (*SafeMap) HTML

func (s *SafeMap) HTML(key interface{}, defaults ...interface{}) template.HTML

func (*SafeMap) HTMLAttr

func (s *SafeMap) HTMLAttr(key interface{}, defaults ...interface{}) template.HTMLAttr

func (*SafeMap) Has

func (s *SafeMap) Has(key interface{}) bool

func (*SafeMap) Incr

func (s *SafeMap) Incr(key interface{}, n int64, defaults ...interface{}) int64

func (*SafeMap) Int

func (s *SafeMap) Int(key interface{}, defaults ...interface{}) int

func (*SafeMap) Int16

func (s *SafeMap) Int16(key interface{}, defaults ...interface{}) int16

func (*SafeMap) Int32

func (s *SafeMap) Int32(key interface{}, defaults ...interface{}) int32

func (*SafeMap) Int64

func (s *SafeMap) Int64(key interface{}, defaults ...interface{}) int64

func (*SafeMap) Int8

func (s *SafeMap) Int8(key interface{}, defaults ...interface{}) int8

func (*SafeMap) JS

func (s *SafeMap) JS(key interface{}, defaults ...interface{}) template.JS

func (*SafeMap) Set

func (s *SafeMap) Set(key, value interface{})

func (*SafeMap) Split

func (s *SafeMap) Split(key interface{}, sep string, limit ...int) StringSlice

func (*SafeMap) String

func (s *SafeMap) String(key interface{}, defaults ...interface{}) string

func (*SafeMap) Timestamp

func (s *SafeMap) Timestamp(key interface{}, defaults ...interface{}) time.Time

func (*SafeMap) Trim

func (s *SafeMap) Trim(key interface{}, defaults ...interface{}) String

func (*SafeMap) Uint

func (s *SafeMap) Uint(key interface{}, defaults ...interface{}) uint

func (*SafeMap) Uint16

func (s *SafeMap) Uint16(key interface{}, defaults ...interface{}) uint16

func (*SafeMap) Uint32

func (s *SafeMap) Uint32(key interface{}, defaults ...interface{}) uint32

func (*SafeMap) Uint64

func (s *SafeMap) Uint64(key interface{}, defaults ...interface{}) uint64

func (*SafeMap) Uint8

func (s *SafeMap) Uint8(key interface{}, defaults ...interface{}) uint8

type Store

type Store map[string]interface{}

func AsStore

func AsStore(val interface{}) Store

func (Store) Bool

func (s Store) Bool(key string, defaults ...interface{}) bool

func (Store) CSS

func (s Store) CSS(key string, defaults ...interface{}) template.CSS

func (Store) Children

func (s Store) Children(keys ...interface{}) Store

func (Store) Clone

func (s Store) Clone() Store

func (Store) DateTime

func (s Store) DateTime(key string, layouts ...string) time.Time

func (Store) Decr

func (s Store) Decr(key string, n int64, defaults ...interface{}) int64

func (Store) DeepMerge

func (s Store) DeepMerge(source Store)

func (Store) Delete

func (s Store) Delete(keys ...string)

func (Store) Float32

func (s Store) Float32(key string, defaults ...interface{}) float32

func (Store) Float64

func (s Store) Float64(key string, defaults ...interface{}) float64

func (Store) Get

func (s Store) Get(key string, defaults ...interface{}) interface{}

func (Store) HTML

func (s Store) HTML(key string, defaults ...interface{}) template.HTML

func (Store) HTMLAttr

func (s Store) HTMLAttr(key string, defaults ...interface{}) template.HTMLAttr

func (Store) Has

func (s Store) Has(key string) bool

func (Store) Incr

func (s Store) Incr(key string, n int64, defaults ...interface{}) int64

func (Store) Int

func (s Store) Int(key string, defaults ...interface{}) int

func (Store) Int16

func (s Store) Int16(key string, defaults ...interface{}) int16

func (Store) Int32

func (s Store) Int32(key string, defaults ...interface{}) int32

func (Store) Int64

func (s Store) Int64(key string, defaults ...interface{}) int64

func (Store) Int8

func (s Store) Int8(key string, defaults ...interface{}) int8

func (Store) JS

func (s Store) JS(key string, defaults ...interface{}) template.JS

func (Store) MarshalXML

func (s Store) MarshalXML(e *xml.Encoder, start xml.StartElement) error

MarshalXML allows type Store to be used with xml.Marshal

func (Store) Set

func (s Store) Set(key string, value interface{}) Store

func (Store) Split

func (s Store) Split(key string, sep string, limit ...int) StringSlice

func (Store) Store

func (s Store) Store(key string, defaults ...interface{}) Store

func (Store) String

func (s Store) String(key string, defaults ...interface{}) string

func (Store) Timestamp

func (s Store) Timestamp(key string, defaults ...interface{}) time.Time

func (Store) Trim

func (s Store) Trim(key string, defaults ...interface{}) String

func (Store) Uint

func (s Store) Uint(key string, defaults ...interface{}) uint

func (Store) Uint16

func (s Store) Uint16(key string, defaults ...interface{}) uint16

func (Store) Uint32

func (s Store) Uint32(key string, defaults ...interface{}) uint32

func (Store) Uint64

func (s Store) Uint64(key string, defaults ...interface{}) uint64

func (Store) Uint8

func (s Store) Uint8(key string, defaults ...interface{}) uint8

type String

type String string

func Trim

func Trim(val interface{}) String

func (String) Bool

func (p String) Bool() bool

func (String) DateTime

func (p String) DateTime(layouts ...string) time.Time

func (String) Float32

func (p String) Float32() float32

func (String) Float64

func (p String) Float64() float64

func (String) Int

func (p String) Int() int

func (String) Int32

func (p String) Int32() int32

func (String) Int64

func (p String) Int64() int64

func (String) Interface

func (p String) Interface() interface{}

func (String) Raw

func (p String) Raw() string

func (String) Split

func (p String) Split(sep string, limit ...int) StringSlice

func (String) String

func (p String) String() string

func (String) Timestamp

func (p String) Timestamp() time.Time

func (String) Trim

func (p String) Trim() String

func (String) Uint

func (p String) Uint() uint

func (String) Uint32

func (p String) Uint32() uint32

func (String) Uint64

func (p String) Uint64() uint64

type StringMap

type StringMap map[string]String

func ToStringMap

func ToStringMap(m map[string]string) StringMap

func (StringMap) Bool

func (p StringMap) Bool(key string) bool

func (StringMap) DateTime

func (p StringMap) DateTime(key string) time.Time

func (StringMap) Float32

func (p StringMap) Float32(key string) float32

func (StringMap) Float64

func (p StringMap) Float64(key string) float64

func (StringMap) Int

func (p StringMap) Int(key string) int

func (StringMap) Int32

func (p StringMap) Int32(key string) int32

func (StringMap) Int64

func (p StringMap) Int64(key string) int64

func (StringMap) Interface

func (p StringMap) Interface(key string) interface{}

func (StringMap) Interfaces

func (p StringMap) Interfaces() map[string]interface{}

func (StringMap) Raw

func (p StringMap) Raw(key string) string

func (StringMap) Split

func (p StringMap) Split(key string, sep string, limit ...int) StringSlice

func (StringMap) String

func (p StringMap) String(key string) string

func (StringMap) Timestamp

func (p StringMap) Timestamp(key string) time.Time

func (StringMap) Uint

func (p StringMap) Uint(key string) uint

func (StringMap) Uint32

func (p StringMap) Uint32(key string) uint32

func (StringMap) Uint64

func (p StringMap) Uint64(key string) uint64

type StringSlice

type StringSlice []string

func Split

func Split(val interface{}, sep string, limit ...int) StringSlice

func (StringSlice) Bool

func (p StringSlice) Bool(filters ...func(int, bool) bool) []bool

func (StringSlice) Float32

func (p StringSlice) Float32(filters ...func(int, float32) bool) []float32

func (StringSlice) Float64

func (p StringSlice) Float64(filters ...func(int, float64) bool) []float64

func (StringSlice) HasValue

func (p StringSlice) HasValue(v interface{}) bool

func (StringSlice) Int

func (p StringSlice) Int(filters ...func(int, int) bool) []int

func (StringSlice) Int32

func (p StringSlice) Int32(filters ...func(int, int32) bool) []int32

func (StringSlice) Int64

func (p StringSlice) Int64(filters ...func(int, int64) bool) []int64

func (StringSlice) Interface

func (p StringSlice) Interface(filters ...func(int, string) bool) []interface{}

func (StringSlice) Join

func (p StringSlice) Join(sep string) string

func (StringSlice) String

func (p StringSlice) String() []string

func (StringSlice) Uint

func (p StringSlice) Uint(filters ...func(int, uint) bool) []uint

func (StringSlice) Uint32

func (p StringSlice) Uint32(filters ...func(int, uint32) bool) []uint32

func (StringSlice) Uint64

func (p StringSlice) Uint64(filters ...func(int, uint64) bool) []uint64

Jump to

Keyboard shortcuts

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