std

package
v0.0.0-...-36d1133 Latest Latest
Warning

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

Go to latest
Published: Aug 23, 2020 License: MIT Imports: 13 Imported by: 5

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	Funcs   = make(map[string]tinyphp.Func)
	Methods = make(map[string]map[string]tinyphp.Func)
)

Functions

func CallFunc

func CallFunc(store *tinyphp.Store, f interface{}, args []interface{}) (interface{}, error)

func CheckArgsNum

func CheckArgsNum(args []interface{}, min int) error

func IsCallable

func IsCallable(store *tinyphp.Store, f interface{}) (interface{}, error)

func ParseVal

func ParseVal(val interface{}) interface{}

func RegisterDict

func RegisterDict()

func RegisterFunc

func RegisterFunc(name string, f tinyphp.Func) error

func RegisterList

func RegisterList()

func RegisterMath

func RegisterMath()

func RegisterMethod

func RegisterMethod(typ, name string, f tinyphp.Func) error

func RegisterResult

func RegisterResult()

func RegisterString

func RegisterString()

func RegisterTime

func RegisterTime()

Types

type Dict

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

func NewDict

func NewDict() *Dict

func NewDictWithArr

func NewDictWithArr(arr map[string]interface{}) *Dict

func (*Dict) Count

func (d *Dict) Count() int

func (*Dict) Decr

func (d *Dict) Decr(k string) (int, bool)

func (*Dict) Del

func (d *Dict) Del(k string)

func (*Dict) Get

func (d *Dict) Get(k string) interface{}

func (*Dict) Has

func (d *Dict) Has(k string) bool

func (*Dict) Incr

func (d *Dict) Incr(k string) (int, bool)

func (*Dict) MarshalJSON

func (d *Dict) MarshalJSON() ([]byte, error)

func (*Dict) Range

func (d *Dict) Range() interface{}

func (*Dict) Set

func (d *Dict) Set(k string, v interface{})

func (*Dict) TypeName

func (d *Dict) TypeName() string

type List

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

func NewList

func NewList(n int) *List

func NewListWithArr

func NewListWithArr(arr []interface{}) *List

func (*List) Count

func (l *List) Count() int

func (*List) Decr

func (l *List) Decr(k int) (int, bool)

func (*List) Get

func (l *List) Get(k int) interface{}

func (*List) Has

func (l *List) Has(k int) bool

func (*List) Incr

func (l *List) Incr(k int) (int, bool)

func (*List) MarshalJSON

func (l *List) MarshalJSON() ([]byte, error)

func (*List) Pop

func (l *List) Pop() interface{}

func (*List) Push

func (l *List) Push(v ...interface{})

func (*List) Range

func (l *List) Range() interface{}

func (*List) Set

func (l *List) Set(k int, v interface{}) bool

func (*List) Shift

func (l *List) Shift() interface{}

func (*List) TypeName

func (l *List) TypeName() string

func (*List) Unshift

func (l *List) Unshift(v ...interface{})

type Result

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

func NewResult

func NewResult(ok, err interface{}) *Result

func (*Result) GetErr

func (r *Result) GetErr() interface{}

func (*Result) GetOk

func (r *Result) GetOk() interface{}

func (*Result) IsErr

func (r *Result) IsErr() bool

func (*Result) IsOk

func (r *Result) IsOk() bool

func (*Result) MarshalJSON

func (r *Result) MarshalJSON() ([]byte, error)

func (*Result) SetErr

func (r *Result) SetErr(err interface{})

func (*Result) SetOk

func (r *Result) SetOk(ok interface{})

func (*Result) TypeName

func (r *Result) TypeName() string

Jump to

Keyboard shortcuts

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