api

package
v0.0.1 Latest Latest
Warning

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

Go to latest
Published: Dec 21, 2023 License: MIT Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Appender

type Appender interface {
	Append(val any) WriteMagicArray
}

type BaseType

type BaseType interface {
	~string | ~int | ~int8 | ~int16 | ~int32 | ~int64 | ~uint | ~uint8 | ~uint16 | ~uint32 | ~uint64 | time.Time
}

type Getter

type Getter interface {
	Get(key interface{}) ZVal
}

type Iterator

type Iterator interface {
	// All The iterate of Array
	NextKV() (ZVal, ZVal)
	FirstKV() (ZVal, ZVal)
	//NextKey() ZVal todo
	NextVal() ZVal
	FirstVal() ZVal
}

type KV

type KV interface {
	Keys() MagicArray
	Values() MagicArray
	IsKeys() bool
}

type Len

type Len interface {
	Len() int
}

type MagicArray

type MagicArray interface {
	Iter() Iterator
	KV
	Len
	Getter
}

type Remover

type Remover interface {
	Remove(key any) (WriteMagicArray, error)
}

type Setter

type Setter interface {
	Set(key interface{}, val interface{}) WriteMagicArray
}

type WriteMagicArray

type WriteMagicArray interface {
	MagicArray
	Setter
	Appender
	Remover
}

type ZVal

type ZVal interface {

	// Compare less=1 equal = 2 large =3 faild = 4
	Int() (int, bool)
	Uint() (uint, bool)
	Compare(val ZVal) bool
	Int64() (int64, bool)
	Uint64() (uint64, bool)
	Int32() (int32, bool)
	Int16() (int16, bool)
	Int8() (int8, bool)
	Uint32() (uint32, bool)
	Uint16() (uint16, bool)
	Uint8() (uint8, bool)
	String() string
	ZVal() ZVal
	Interface() interface{}
	Arr() (MagicArray, bool)
	Kind() uint8
	IsEmpty() bool
	IsNil() bool
	Float32() (float32, bool)
	Float64() (float64, bool)
	Time() (time.Time, bool)
	Bool() (bool, bool)

	MustInt() int
	MustUint() uint
	MustInt32() int32
	MustInt16() int16
	MustInt8() int8
	MustUint32() uint32
	MustUint16() uint16
	MustUint8() uint8
	MustArr() MagicArray
	MustInt64() int64
	MustUint64() uint64
	MustFloat32() float32
	MustFloat64() float64
	MustTime() time.Time
	MustBool() bool
}

Jump to

Keyboard shortcuts

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