Documentation
¶
Index ¶
- Constants
- Variables
- func AbsFloat(d float32) float32
- func BytesToInt64(bytes []byte) int64
- func BytesToStr(b []byte) string
- func Ceil(d float32, bit int32) float32
- func CeilInt32(ceil, v int32) (r, o int32)
- func ClampFloat(min, max, v float32) float32
- func ClampInt32(min, max, v int32) int32
- func ConvBigHump(str string) string
- func ConvSmallHump(str string) string
- func ConvUnderline(str string) string
- func CopyBytes(src []byte) []byte
- func Debug(str string, m M)
- func Default[T any]() (v T)
- func DotVec2(l, r Vec2) float32
- func DotVec3(l, r Vec3) float32
- func Error(err *Err)
- func ExeDir() string
- func ExeName() string
- func Fatal(err *Err)
- func FloatMax(l, r float32) float32
- func Floor(d float32, bit int32) float32
- func FloorInt32(floor, v int32) (r, o int32)
- func Fnv32(key string) uint32
- func GenMask(items ...int64) int64
- func GetCaller(skip int) string
- func GetCross(v1, v2, v Vec2) float32
- func GetObjVal[T any](obj *Object, key string) (T, bool)
- func GetStack(skip int) []byte
- func GetTimestamp() string
- func Hex(bytes []byte) string
- func Info(str string, m M)
- func Int64ToBytes(id int64) []byte
- func Int64ToStr(id int64) string
- func Int64sToStrSlice(ids ...int64) []string
- func IsPowerOfTwo(mask int32) bool
- func JsonToM(bytes []byte) (M, *Err)
- func LerpFloat32(from, to, t float32) float32
- func MaskAddItem(item, mask int64) int64
- func MaskDelItem(item, mask int64) int64
- func MaxInt(a, b int) int
- func MaxInt32(a, b int32) int32
- func MaxInt64(a, b int64) int64
- func MergeStr(sep string, nodes ...string) string
- func MergeUInt32(prevId, lastId uint16) uint32
- func MergeUint16(sep string, nodes ...uint16) string
- func MinFloat(l, r float32) float32
- func MinInt32(a, b int32) int32
- func MinInt64(a, b int64) int64
- func NextPowerOfTwo(v uint32) uint32
- func RandStr(n int) string
- func RecycleBytes(bytes []byte)
- func RecycleCounter(c *Counter)
- func Round(d float32, bit int32) float32
- func SetExeDir(dir string)
- func SpawnBytes() []byte
- func SpawnBytesWithLen(l uint32) []byte
- func SplitInt64(sep, str string) ([]int64, error)
- func SplitUInt32(code uint32) (prevId, lastId uint16)
- func SplitUint16(sep, str string) ([]uint16, error)
- func Sqr(x float32) float32
- func Sqrt(v float32) float32
- func StrToBytes(s string) []byte
- func StrToInt64(id string) int64
- func StrToUint16(id string) uint16
- func StrToUint32(id string) uint32
- func StrToUint64(id string) uint64
- func TestMask(item, mask int64) bool
- func Uint16ToStr(id uint16) string
- func Uint32ToStr(id uint32) string
- func Uint64ToStr(id uint64) string
- func Vec2Angle(a, b Vec2) float32
- func Vec2Distance(a, b Vec2) float32
- func Vec2Magnitude(inV Vec2) float32
- func Vec2SqrMagnitude(inV Vec2) float32
- func Vec2TestDis(inV0, inV1 Vec2, inMaxDist float32) bool
- func Vec3Angle(a, b Vec3) float32
- func Vec3Distance(a, b Vec3) float32
- func Vec3Magnitude(inV Vec3) float32
- func Vec3Perp2D(u, v Vec3) float32
- func Vec3SqrMagnitude(inV Vec3) float32
- func Vec3TestDis(inV0, inV1 Vec3, inMaxDist float32) bool
- func Warn(err *Err)
- type AnyBoolToAnyBool
- type AnyBoolToBool
- type AnyErrToBool
- type AnyToAny
- type AnyToAnyBool
- type AnyToBytesError
- type ByteBuffer
- func (b *ByteBuffer) All() []byte
- func (b *ByteBuffer) Available() uint32
- func (b *ByteBuffer) Cap() uint32
- func (b *ByteBuffer) Clone() *ByteBuffer
- func (b *ByteBuffer) CopyBytes() ([]byte, uint32)
- func (b *ByteBuffer) CopyTo(buffer *ByteBuffer) (n int, err error)
- func (b *ByteBuffer) Dispose()
- func (b *ByteBuffer) Length() uint32
- func (b *ByteBuffer) Pos() uint32
- func (b *ByteBuffer) RAvailable() (v []byte)
- func (b *ByteBuffer) RBool() (v bool, err *Err)
- func (b *ByteBuffer) RBools() (v []bool, err *Err)
- func (b *ByteBuffer) RBytes(l uint32) ([]byte, *Err)
- func (b *ByteBuffer) RBytesWithLen() (v []byte, err *Err)
- func (b *ByteBuffer) RFloat32() (v float32, err *Err)
- func (b *ByteBuffer) RFloat32s() (v []float32, err *Err)
- func (b *ByteBuffer) RFloat64() (v float64, err *Err)
- func (b *ByteBuffer) RFloat64s() (v []float64, err *Err)
- func (b *ByteBuffer) RInt16() (v int16, err *Err)
- func (b *ByteBuffer) RInt16s() (v []int16, err *Err)
- func (b *ByteBuffer) RInt32() (v int32, err *Err)
- func (b *ByteBuffer) RInt32s() (v []int32, err *Err)
- func (b *ByteBuffer) RInt64() (v int64, err *Err)
- func (b *ByteBuffer) RInt64s() (v []int64, err *Err)
- func (b *ByteBuffer) RInt8() (v int8, err *Err)
- func (b *ByteBuffer) RInt8s() (v []int8, err *Err)
- func (b *ByteBuffer) RMapInt32() (m map[string]int32, err *Err)
- func (b *ByteBuffer) RMapInt32ToInt32() (m map[int32]int32, err *Err)
- func (b *ByteBuffer) RMapInt32ToInt64() (m map[int32]int64, err *Err)
- func (b *ByteBuffer) RMapInt64() (m map[string]int64, err *Err)
- func (b *ByteBuffer) RMapInt64ToInt32() (m map[int64]int32, err *Err)
- func (b *ByteBuffer) RMapInt64ToInt64() (m map[int64]int64, err *Err)
- func (b *ByteBuffer) RMapStrStr() (m map[string]string, err *Err)
- func (b *ByteBuffer) RString() (v string, err *Err)
- func (b *ByteBuffer) RStringNoLen() (v string)
- func (b *ByteBuffer) RStrings() (v []string, err *Err)
- func (b *ByteBuffer) RUint16() (v uint16, err *Err)
- func (b *ByteBuffer) RUint16s() (v []uint16, err *Err)
- func (b *ByteBuffer) RUint32() (v uint32, err *Err)
- func (b *ByteBuffer) RUint32s() (v []uint32, err *Err)
- func (b *ByteBuffer) RUint64() (v uint64, err *Err)
- func (b *ByteBuffer) RUint64s() (v []uint64, err *Err)
- func (b *ByteBuffer) RUint8() (v uint8, err *Err)
- func (b *ByteBuffer) RUint8s() (v []uint8, err *Err)
- func (b *ByteBuffer) RVec2() (v Vec2, err *Err)
- func (b *ByteBuffer) RVec2s() (v []Vec2, err *Err)
- func (b *ByteBuffer) RVec3() (v Vec3, err *Err)
- func (b *ByteBuffer) RVec3s() (v []Vec3, err *Err)
- func (b *ByteBuffer) Read(p []byte) (n int, err error)
- func (b *ByteBuffer) Reset()
- func (b *ByteBuffer) SetBytes(bytes []byte)
- func (b *ByteBuffer) SetPos(v uint32)
- func (b *ByteBuffer) ToHex() string
- func (b *ByteBuffer) WBool(v bool)
- func (b *ByteBuffer) WBools(v []bool)
- func (b *ByteBuffer) WBytesWithLen(v []byte)
- func (b *ByteBuffer) WFloat32(v float32)
- func (b *ByteBuffer) WFloat32s(v []float32)
- func (b *ByteBuffer) WFloat64(v float64)
- func (b *ByteBuffer) WFloat64s(v []float64)
- func (b *ByteBuffer) WInt16(v int16)
- func (b *ByteBuffer) WInt16s(v []int16)
- func (b *ByteBuffer) WInt32(v int32)
- func (b *ByteBuffer) WInt32s(v []int32)
- func (b *ByteBuffer) WInt64(v int64)
- func (b *ByteBuffer) WInt64s(v []int64)
- func (b *ByteBuffer) WInt8(v int8)
- func (b *ByteBuffer) WInt8s(v []int8)
- func (b *ByteBuffer) WMapInt32(m map[string]int32)
- func (b *ByteBuffer) WMapInt32ToInt32(m map[int32]int32)
- func (b *ByteBuffer) WMapInt32ToInt64(m map[int32]int64)
- func (b *ByteBuffer) WMapInt64(m map[string]int64)
- func (b *ByteBuffer) WMapInt64ToInt32(m map[int64]int32)
- func (b *ByteBuffer) WMapInt64ToInt64(m map[int64]int64)
- func (b *ByteBuffer) WMapStrStr(m map[string]string)
- func (b *ByteBuffer) WString(v string)
- func (b *ByteBuffer) WStringWithLen(v string)
- func (b *ByteBuffer) WStrings(v []string)
- func (b *ByteBuffer) WUint16(v uint16)
- func (b *ByteBuffer) WUint16s(v []uint16)
- func (b *ByteBuffer) WUint32(v uint32)
- func (b *ByteBuffer) WUint32s(v []uint32)
- func (b *ByteBuffer) WUint64(v uint64)
- func (b *ByteBuffer) WUint64s(v []uint64)
- func (b *ByteBuffer) WUint8(v uint8)
- func (b *ByteBuffer) WUint8s(v []uint8)
- func (b *ByteBuffer) WVec2(v Vec2)
- func (b *ByteBuffer) WVec2s(v []Vec2)
- func (b *ByteBuffer) WVec3(v Vec3)
- func (b *ByteBuffer) WVec3s(v []Vec3)
- func (b *ByteBuffer) Write(v []byte) (int, error)
- func (b *ByteBuffer) WriteTo(writer io.Writer) (n int, err error)
- type BytesAnyToError
- type BytesToAnyErr
- type BytesToInt642Err
- type CSet
- func (m CSet[T]) Clear()
- func (m CSet[T]) Count() int64
- func (m CSet[T]) Del(id T)
- func (m CSet[T]) Get(id T) (INumId[T], *Err)
- func (m CSet[T]) GetOrNew(id T, f func() INumId[T]) (item INumId[T], exist bool)
- func (m CSet[T]) Has(id T) (ok bool)
- func (m CSet[T]) Pop(id T) (v INumId[T], exist bool)
- func (m CSet[T]) R(id T, fn func(INumId[T], bool))
- func (m CSet[T]) RAll(fn func(T, INumId[T]))
- func (m CSet[T]) RAny(fn func(T, INumId[T]) bool) bool
- func (m CSet[T]) Set(item INumId[T])
- func (m CSet[T]) TestDel(id T, test func(T, INumId[T]) (del bool, brk bool)) (removed bool)
- func (m CSet[T]) W(id T, fn func(INumId[T], bool))
- func (m CSet[T]) WAll(fn func(T, INumId[T]))
- func (m CSet[T]) WAny(fn func(T, INumId[T]) bool) bool
- type Counter
- type DLink
- func (l *DLink[KT, VT]) Any(fn func(VT) bool)
- func (l *DLink[KT, VT]) Count() int
- func (l *DLink[KT, VT]) Get(key KT) (VT, bool)
- func (l *DLink[KT, VT]) Iter(fn func(VT))
- func (l *DLink[KT, VT]) NewOrUpdate(key KT, update func(VT), new func() VT) (exist bool)
- func (l *DLink[KT, VT]) Pop() (VT, bool)
- func (l *DLink[KT, VT]) Push(val VT) bool
- func (l *DLink[KT, VT]) Remove(val VT)
- func (l *DLink[KT, VT]) RemoveByKey(key KT)
- func (l *DLink[KT, VT]) TestDel(test func(VT) bool) (VT, bool)
- func (l *DLink[KT, VT]) Values() []VT
- type DLinkElem
- type DLinkOption
- type Enable
- type Err
- func (e *Err) AddParam(k string, v any)
- func (e *Err) AddParams(params M)
- func (e *Err) Code() TErrCode
- func (e *Err) GetParam(k string) (v any, ok bool)
- func (e *Err) Params() M
- func (e *Err) Stack() []byte
- func (e *Err) String() string
- func (e *Err) ToBytes() []byte
- func (e *Err) ToError() error
- func (e *Err) UpdateParam(k string, action AnyBoolToAnyBool)
- type Fn
- type FnAny
- type FnBool
- type FnErr
- type FnInt32
- type FnInt64
- type FnInt642Any
- type FnInt642Bool
- type FnInt642Err
- type FnInt643
- type FnInt64Any
- type FnInt64Bool
- type FnInt64Err
- type FnInt64StrBool
- type FnM
- type FnObj
- type FnObjAny
- type FnObjBool
- type FnObjErr
- type FnStr
- type FnStr2Bool
- type FnStrAny
- type FnStrBool
- type FnStrErr
- type FnStrFn
- type FnUint32
- type IIdx
- type INumId
- type IdLink
- type Idx
- type IdxToBool2
- type Int32
- type Int64
- type Int64AnyToBool
- type Link
- type LinkElem
- type M
- type NumId
- type ObjToAny
- type ObjToBool
- type ObjToErr
- type Object
- func (obj *Object) Bool(key string) (bool, bool)
- func (obj *Object) Bools(key string) ([]bool, bool)
- func (obj *Object) Clear()
- func (obj *Object) Float32(key string) (float32, bool)
- func (obj *Object) Float32s(key string) ([]float32, bool)
- func (obj *Object) Float64(key string) (float64, bool)
- func (obj *Object) Float64s(key string) ([]float64, bool)
- func (obj *Object) Get(key string) (v any, ok bool)
- func (obj *Object) Has(key string) (ok bool)
- func (obj *Object) Int(key string) (int, bool)
- func (obj *Object) Int16(key string) (int16, bool)
- func (obj *Object) Int16s(key string) ([]int16, bool)
- func (obj *Object) Int32(key string) (int32, bool)
- func (obj *Object) Int32s(key string) ([]int32, bool)
- func (obj *Object) Int64(key string) (int64, bool)
- func (obj *Object) Int64s(key string) ([]int64, bool)
- func (obj *Object) Int8(key string) (int8, bool)
- func (obj *Object) Int8s(key string) ([]int8, bool)
- func (obj *Object) Ints(key string) ([]int, bool)
- func (obj *Object) M() M
- func (obj *Object) MustBool(key string, def bool) bool
- func (obj *Object) MustBools(key string, def []bool) []bool
- func (obj *Object) MustFloat32(key string, def float32) float32
- func (obj *Object) MustFloat32s(key string, def []float32) []float32
- func (obj *Object) MustFloat64(key string, def float64) float64
- func (obj *Object) MustFloat64s(key string, def []float64) []float64
- func (obj *Object) MustInt(key string, def int) int
- func (obj *Object) MustInt16(key string, def int16) int16
- func (obj *Object) MustInt16s(key string, def []int16) []int16
- func (obj *Object) MustInt32(key string, def int32) int32
- func (obj *Object) MustInt32s(key string, def []int32) []int32
- func (obj *Object) MustInt64(key string, def int64) int64
- func (obj *Object) MustInt64s(key string, def []int64) []int64
- func (obj *Object) MustInt8(key string, def int8) int8
- func (obj *Object) MustInt8s(key string, def []int8) []int8
- func (obj *Object) MustInts(key string, def []int) []int
- func (obj *Object) MustString(key string, def string) string
- func (obj *Object) MustStrings(key string, def []string) []string
- func (obj *Object) MustTime(key string, def *time.Time) *time.Time
- func (obj *Object) MustTimes(key string, def []*time.Time) []*time.Time
- func (obj *Object) MustUint(key string, def uint) uint
- func (obj *Object) MustUint16(key string, def uint16) uint16
- func (obj *Object) MustUint16s(key string, def []uint16) []uint16
- func (obj *Object) MustUint32(key string, def uint32) uint32
- func (obj *Object) MustUint32s(key string, def []uint32) []uint32
- func (obj *Object) MustUint64(key string, def uint64) uint64
- func (obj *Object) MustUint64s(key string, def []uint64) []uint64
- func (obj *Object) MustUint8(key string, def uint8) uint8
- func (obj *Object) MustUint8s(key string, def []uint8) []uint8
- func (obj *Object) MustUints(key string, def []uint) []uint
- func (obj *Object) MustVec2(key string, def Vec2) Vec2
- func (obj *Object) MustVec2s(key string, def []Vec2) []Vec2
- func (obj *Object) MustVec3(key string, def Vec3) Vec3
- func (obj *Object) MustVec3s(key string, def []Vec3) []Vec3
- func (obj *Object) Pop(key string) (v any, ok bool)
- func (obj *Object) Remove(key string)
- func (obj *Object) Replace(key string, val any) (oldVal any, ok bool)
- func (obj *Object) Reset(data M)
- func (obj *Object) Set(key string, val any)
- func (obj *Object) String(key string) (string, bool)
- func (obj *Object) Strings(key string) ([]string, bool)
- func (obj *Object) Time(key string) (*time.Time, bool)
- func (obj *Object) Times(key string) ([]*time.Time, bool)
- func (obj *Object) Uint(key string) (uint, bool)
- func (obj *Object) Uint16(key string) (uint16, bool)
- func (obj *Object) Uint16s(key string) ([]uint16, bool)
- func (obj *Object) Uint32(key string) (uint32, bool)
- func (obj *Object) Uint32s(key string) ([]uint32, bool)
- func (obj *Object) Uint64(key string) (uint64, bool)
- func (obj *Object) Uint64s(key string) ([]uint64, bool)
- func (obj *Object) Uint8(key string) (uint8, bool)
- func (obj *Object) Uint8s(key string) ([]uint8, bool)
- func (obj *Object) Uints(key string) ([]uint, bool)
- func (obj *Object) Update(key string, action AnyToAny) (ok bool)
- func (obj *Object) Vec2(key string) (Vec2, bool)
- func (obj *Object) Vec2s(key string) ([]Vec2, bool)
- func (obj *Object) Vec3(key string) (Vec3, bool)
- func (obj *Object) Vec3s(key string) ([]Vec3, bool)
- type Pool
- type PoolOption
- type Ring
- type RingOption
- type Set
- func (s *Set[T]) Add(item IIdx[T]) *Err
- func (s *Set[T]) Any(fn func(T, IIdx[T]) bool) bool
- func (s *Set[T]) Cap() int64
- func (s *Set[T]) Count() int64
- func (s *Set[T]) Del(key T) (val IIdx[T], exist bool)
- func (s *Set[T]) Get(id T) (IIdx[T], bool)
- func (s *Set[T]) Has(key T) bool
- func (s *Set[T]) Ids() []T
- func (s *Set[T]) Items() []IIdx[T]
- func (s *Set[T]) Iter(fn func(T, IIdx[T]))
- func (s *Set[T]) Replace(oldItem, newItem IIdx[T]) bool
- func (s *Set[T]) ReplaceOrNew(oldItem, newItem IIdx[T])
- func (s *Set[T]) Set(item IIdx[T])
- func (s *Set[T]) TestDel(test func(T, IIdx[T]) (del bool, brk bool))
- type StrToBool
- type StrToBytesErr
- type StrToStr2Err
- type String
- type TErrCode
- type ToAny
- type ToBool
- type ToFnInt64Fn
- type ToInt64
- type ToM
- type Uint32
- type Uint64
- type Vec2
- func MaxVec2(l, r Vec2) Vec2
- func MinVec2(l, r Vec2) Vec2
- func NewVec2(x, y float32) Vec2
- func Vec2Add(v Vec2, val Vec2) Vec2
- func Vec2Div(v Vec2, val float32) Vec2
- func Vec2Mul(v Vec2, val float32) Vec2
- func Vec2Normalize(inV Vec2) Vec2
- func Vec2NormalizeSafe(inV, defaultV Vec2) Vec2
- func Vec2Sub(v1, v2 Vec2) Vec2
- type Vec3
- func MaxVec3(l, r Vec3) Vec3
- func MinVec3(l, r Vec3) Vec3
- func NewVec3(x, y, z float32) Vec3
- func Vec3Abs(v Vec3) Vec3
- func Vec3Add(v1, v2 Vec3) Vec3
- func Vec3Cross(lhs, rhs Vec3) Vec3
- func Vec3Div(v1 Vec3, val float32) Vec3
- func Vec3Lerp(from, to Vec3, t float32) Vec3
- func Vec3Mulf(v1 Vec3, val float32) Vec3
- func Vec3Mulv(v1, data Vec3) Vec3
- func Vec3Neg(v Vec3) Vec3
- func Vec3Normalize(inV Vec3) Vec3
- func Vec3NormalizeSafe(inV, defaultV Vec3) Vec3
- func Vec3Scale(l, r Vec3) Vec3
- func Vec3Sub(v1, v2 Vec3) Vec3
- type VecInt2
Constants ¶
View Source
const ( ColorRed = "\033[31m" ColorGreen = "\033[32m" ColorYellow = "\033[33m" ColorBlue = "\033[34m" ColorPurple = "\033[35m" ColorWhite = "\033[37m" ColorHiRed = "\033[91m" ColorHiGreen = "\033[92m" ColorHiYellow = "\033[93m" ColorHiBlue = "\033[94m" ColorHiPurple = "\033[95m" ColorHiWhite = "\033[97m" ColorReset = "\033[0m" )
View Source
const ( Rad2Deg float32 = 57.29578 Deg2Rad float32 = 0.01745329 HalfPi float32 = 1.5707963267948966 )
Variables ¶
View Source
var Vec2One = Vec2{1, 1}
View Source
var Vec2Zero = Vec2{0, 0}
View Source
var Vec3One = Vec3{1, 1, 1}
View Source
var Vec3Zero = Vec3{0, 0, 0}
Functions ¶
func BytesToInt64 ¶
func BytesToStr ¶
func ClampFloat ¶
func ClampInt32 ¶
func ConvSmallHump ¶
func FloorInt32 ¶
func GetTimestamp ¶
func GetTimestamp() string
func Int64ToBytes ¶
func Int64ToStr ¶
func Int64sToStrSlice ¶
func IsPowerOfTwo ¶
func LerpFloat32 ¶
func MaskAddItem ¶
func MaskDelItem ¶
func MergeUInt32 ¶
func MergeUint16 ¶
func NextPowerOfTwo ¶
func RecycleBytes ¶
func RecycleBytes(bytes []byte)
func RecycleCounter ¶
func RecycleCounter(c *Counter)
func SpawnBytes ¶
func SpawnBytes() []byte
func SpawnBytesWithLen ¶
func SplitInt64 ¶
func SplitUInt32 ¶
func SplitUint16 ¶
func StrToBytes ¶
func StrToInt64 ¶
func StrToUint16 ¶
func StrToUint32 ¶
func StrToUint64 ¶
func Uint16ToStr ¶
func Uint32ToStr ¶
func Uint64ToStr ¶
func Vec2Distance ¶
func Vec2Magnitude ¶
func Vec2SqrMagnitude ¶
func Vec2TestDis ¶
func Vec3Distance ¶
func Vec3Magnitude ¶
func Vec3Perp2D ¶
func Vec3SqrMagnitude ¶
func Vec3TestDis ¶
Types ¶
type AnyBoolToBool ¶
type AnyErrToBool ¶
type AnyToAnyBool ¶
type AnyToBytesError ¶
type ByteBuffer ¶
type ByteBuffer struct {
// contains filtered or unexported fields
}
func NewByteBuffer ¶
func NewByteBuffer() *ByteBuffer
func NewByteBufferWithData ¶
func NewByteBufferWithData(data []byte) *ByteBuffer
func NewByteBufferWithLen ¶
func NewByteBufferWithLen(l uint32) *ByteBuffer
func (*ByteBuffer) All ¶
func (b *ByteBuffer) All() []byte
func (*ByteBuffer) Available ¶
func (b *ByteBuffer) Available() uint32
func (*ByteBuffer) Cap ¶
func (b *ByteBuffer) Cap() uint32
func (*ByteBuffer) Clone ¶
func (b *ByteBuffer) Clone() *ByteBuffer
func (*ByteBuffer) CopyBytes ¶
func (b *ByteBuffer) CopyBytes() ([]byte, uint32)
func (*ByteBuffer) CopyTo ¶
func (b *ByteBuffer) CopyTo(buffer *ByteBuffer) (n int, err error)
func (*ByteBuffer) Dispose ¶
func (b *ByteBuffer) Dispose()
func (*ByteBuffer) Length ¶
func (b *ByteBuffer) Length() uint32
func (*ByteBuffer) Pos ¶
func (b *ByteBuffer) Pos() uint32
func (*ByteBuffer) RBool ¶
func (b *ByteBuffer) RBool() (v bool, err *Err)
func (*ByteBuffer) RBools ¶
func (b *ByteBuffer) RBools() (v []bool, err *Err)
func (*ByteBuffer) RBytesWithLen ¶
func (b *ByteBuffer) RBytesWithLen() (v []byte, err *Err)
func (*ByteBuffer) RFloat32 ¶
func (b *ByteBuffer) RFloat32() (v float32, err *Err)
func (*ByteBuffer) RFloat32s ¶
func (b *ByteBuffer) RFloat32s() (v []float32, err *Err)
func (*ByteBuffer) RFloat64 ¶
func (b *ByteBuffer) RFloat64() (v float64, err *Err)
func (*ByteBuffer) RFloat64s ¶
func (b *ByteBuffer) RFloat64s() (v []float64, err *Err)
func (*ByteBuffer) RInt16 ¶
func (b *ByteBuffer) RInt16() (v int16, err *Err)
func (*ByteBuffer) RInt16s ¶
func (b *ByteBuffer) RInt16s() (v []int16, err *Err)
func (*ByteBuffer) RInt32 ¶
func (b *ByteBuffer) RInt32() (v int32, err *Err)
func (*ByteBuffer) RInt32s ¶
func (b *ByteBuffer) RInt32s() (v []int32, err *Err)
func (*ByteBuffer) RInt64 ¶
func (b *ByteBuffer) RInt64() (v int64, err *Err)
func (*ByteBuffer) RInt64s ¶
func (b *ByteBuffer) RInt64s() (v []int64, err *Err)
func (*ByteBuffer) RInt8 ¶
func (b *ByteBuffer) RInt8() (v int8, err *Err)
func (*ByteBuffer) RInt8s ¶
func (b *ByteBuffer) RInt8s() (v []int8, err *Err)
func (*ByteBuffer) RMapInt32ToInt32 ¶
func (b *ByteBuffer) RMapInt32ToInt32() (m map[int32]int32, err *Err)
func (*ByteBuffer) RMapInt32ToInt64 ¶
func (b *ByteBuffer) RMapInt32ToInt64() (m map[int32]int64, err *Err)
func (*ByteBuffer) RMapInt64ToInt32 ¶
func (b *ByteBuffer) RMapInt64ToInt32() (m map[int64]int32, err *Err)
func (*ByteBuffer) RMapInt64ToInt64 ¶
func (b *ByteBuffer) RMapInt64ToInt64() (m map[int64]int64, err *Err)
func (*ByteBuffer) RMapStrStr ¶
func (b *ByteBuffer) RMapStrStr() (m map[string]string, err *Err)
func (*ByteBuffer) RString ¶
func (b *ByteBuffer) RString() (v string, err *Err)
func (*ByteBuffer) RStringNoLen ¶
func (b *ByteBuffer) RStringNoLen() (v string)
func (*ByteBuffer) RStrings ¶
func (b *ByteBuffer) RStrings() (v []string, err *Err)
func (*ByteBuffer) RUint16 ¶
func (b *ByteBuffer) RUint16() (v uint16, err *Err)
func (*ByteBuffer) RUint16s ¶
func (b *ByteBuffer) RUint16s() (v []uint16, err *Err)
func (*ByteBuffer) RUint32 ¶
func (b *ByteBuffer) RUint32() (v uint32, err *Err)
func (*ByteBuffer) RUint32s ¶
func (b *ByteBuffer) RUint32s() (v []uint32, err *Err)
func (*ByteBuffer) RUint64 ¶
func (b *ByteBuffer) RUint64() (v uint64, err *Err)
func (*ByteBuffer) RUint64s ¶
func (b *ByteBuffer) RUint64s() (v []uint64, err *Err)
func (*ByteBuffer) RUint8 ¶
func (b *ByteBuffer) RUint8() (v uint8, err *Err)
func (*ByteBuffer) RUint8s ¶
func (b *ByteBuffer) RUint8s() (v []uint8, err *Err)
func (*ByteBuffer) RVec2 ¶
func (b *ByteBuffer) RVec2() (v Vec2, err *Err)
func (*ByteBuffer) RVec2s ¶
func (b *ByteBuffer) RVec2s() (v []Vec2, err *Err)
func (*ByteBuffer) RVec3 ¶
func (b *ByteBuffer) RVec3() (v Vec3, err *Err)
func (*ByteBuffer) RVec3s ¶
func (b *ByteBuffer) RVec3s() (v []Vec3, err *Err)
func (*ByteBuffer) Reset ¶
func (b *ByteBuffer) Reset()
func (*ByteBuffer) SetBytes ¶
func (b *ByteBuffer) SetBytes(bytes []byte)
func (*ByteBuffer) SetPos ¶
func (b *ByteBuffer) SetPos(v uint32)
func (*ByteBuffer) ToHex ¶
func (b *ByteBuffer) ToHex() string
func (*ByteBuffer) WBool ¶
func (b *ByteBuffer) WBool(v bool)
func (*ByteBuffer) WBools ¶
func (b *ByteBuffer) WBools(v []bool)
func (*ByteBuffer) WBytesWithLen ¶
func (b *ByteBuffer) WBytesWithLen(v []byte)
func (*ByteBuffer) WFloat32 ¶
func (b *ByteBuffer) WFloat32(v float32)
func (*ByteBuffer) WFloat32s ¶
func (b *ByteBuffer) WFloat32s(v []float32)
func (*ByteBuffer) WFloat64 ¶
func (b *ByteBuffer) WFloat64(v float64)
func (*ByteBuffer) WFloat64s ¶
func (b *ByteBuffer) WFloat64s(v []float64)
func (*ByteBuffer) WInt16 ¶
func (b *ByteBuffer) WInt16(v int16)
func (*ByteBuffer) WInt16s ¶
func (b *ByteBuffer) WInt16s(v []int16)
func (*ByteBuffer) WInt32 ¶
func (b *ByteBuffer) WInt32(v int32)
func (*ByteBuffer) WInt32s ¶
func (b *ByteBuffer) WInt32s(v []int32)
func (*ByteBuffer) WInt64 ¶
func (b *ByteBuffer) WInt64(v int64)
func (*ByteBuffer) WInt64s ¶
func (b *ByteBuffer) WInt64s(v []int64)
func (*ByteBuffer) WInt8 ¶
func (b *ByteBuffer) WInt8(v int8)
func (*ByteBuffer) WInt8s ¶
func (b *ByteBuffer) WInt8s(v []int8)
func (*ByteBuffer) WMapInt32 ¶
func (b *ByteBuffer) WMapInt32(m map[string]int32)
func (*ByteBuffer) WMapInt32ToInt32 ¶
func (b *ByteBuffer) WMapInt32ToInt32(m map[int32]int32)
func (*ByteBuffer) WMapInt32ToInt64 ¶
func (b *ByteBuffer) WMapInt32ToInt64(m map[int32]int64)
func (*ByteBuffer) WMapInt64 ¶
func (b *ByteBuffer) WMapInt64(m map[string]int64)
func (*ByteBuffer) WMapInt64ToInt32 ¶
func (b *ByteBuffer) WMapInt64ToInt32(m map[int64]int32)
func (*ByteBuffer) WMapInt64ToInt64 ¶
func (b *ByteBuffer) WMapInt64ToInt64(m map[int64]int64)
func (*ByteBuffer) WMapStrStr ¶
func (b *ByteBuffer) WMapStrStr(m map[string]string)
func (*ByteBuffer) WString ¶
func (b *ByteBuffer) WString(v string)
func (*ByteBuffer) WStringWithLen ¶
func (b *ByteBuffer) WStringWithLen(v string)
func (*ByteBuffer) WStrings ¶
func (b *ByteBuffer) WStrings(v []string)
func (*ByteBuffer) WUint16 ¶
func (b *ByteBuffer) WUint16(v uint16)
func (*ByteBuffer) WUint16s ¶
func (b *ByteBuffer) WUint16s(v []uint16)
func (*ByteBuffer) WUint32 ¶
func (b *ByteBuffer) WUint32(v uint32)
func (*ByteBuffer) WUint32s ¶
func (b *ByteBuffer) WUint32s(v []uint32)
func (*ByteBuffer) WUint64 ¶
func (b *ByteBuffer) WUint64(v uint64)
func (*ByteBuffer) WUint64s ¶
func (b *ByteBuffer) WUint64s(v []uint64)
func (*ByteBuffer) WUint8 ¶
func (b *ByteBuffer) WUint8(v uint8)
func (*ByteBuffer) WUint8s ¶
func (b *ByteBuffer) WUint8s(v []uint8)
func (*ByteBuffer) WVec2 ¶
func (b *ByteBuffer) WVec2(v Vec2)
func (*ByteBuffer) WVec2s ¶
func (b *ByteBuffer) WVec2s(v []Vec2)
func (*ByteBuffer) WVec3 ¶
func (b *ByteBuffer) WVec3(v Vec3)
func (*ByteBuffer) WVec3s ¶
func (b *ByteBuffer) WVec3s(v []Vec3)
type BytesAnyToError ¶
type BytesToAnyErr ¶
type CSet ¶
type CSet[T NumId] []*idCSetShared[T]
func NewStrCSet ¶
type Counter ¶
type Counter struct {
// contains filtered or unexported fields
}
func SpawnCounter ¶
func SpawnCounter() *Counter
type DLink ¶
type DLink[KT comparable, VT any] struct { // contains filtered or unexported fields }
DLink 双向链表
func NewCLink ¶
func NewCLink[KT comparable](cap int, opts ...DLinkOption[KT, KT]) *DLink[KT, KT]
func NewDLink ¶
func NewDLink[KT comparable, VT any](cap int, opts ...DLinkOption[KT, VT]) *DLink[KT, VT]
func (*DLink[KT, VT]) NewOrUpdate ¶
func (*DLink[KT, VT]) RemoveByKey ¶
func (l *DLink[KT, VT]) RemoveByKey(key KT)
type DLinkOption ¶
type DLinkOption[KT comparable, VT any] func(o *dLinkOption[KT, VT])
func DLinkRecycleElem ¶
func DLinkRecycleElem[KT comparable, VT any](recycle func(*DLinkElem[VT])) DLinkOption[KT, VT]
func DLinkSpawnElem ¶
func DLinkSpawnElem[KT comparable, VT any](spawn func() *DLinkElem[VT]) DLinkOption[KT, VT]
func DLinkValToKey ¶
func DLinkValToKey[KT comparable, VT any](valToKey func(VT) KT) DLinkOption[KT, VT]
type Err ¶
type Err struct {
// contains filtered or unexported fields
}
func (*Err) UpdateParam ¶
func (e *Err) UpdateParam(k string, action AnyBoolToAnyBool)
type FnInt642Any ¶
type FnInt642Bool ¶
type FnInt642Err ¶
type FnInt64Any ¶
func (FnInt64Any) Invoke ¶
func (f FnInt64Any) Invoke(v int64, obj any)
type FnInt64Bool ¶
type FnInt64Err ¶
func (FnInt64Err) Invoke ¶
func (f FnInt64Err) Invoke(v int64, err *Err)
type FnInt64StrBool ¶
type FnStr2Bool ¶
type Int64AnyToBool ¶
type M ¶
func (M) IndentJson ¶
type RingOption ¶
type RingOption[T any] func(o *ringOption[T])
func RingMaxCap ¶
func RingMinCap ¶
func RingRecycle ¶
func RingRecycle[T any](r func([]T)) RingOption[T]
func RingResize ¶
type Set ¶
type Set[T Idx] struct { // contains filtered or unexported fields }
func (*Set[T]) ReplaceOrNew ¶
type StrToBytesErr ¶
type TErrCode ¶
type TErrCode = uint32
const ( EcNil TErrCode = iota EcRecover EcWrong EcBusy EcNotEnough EcUnAuth EcTimeout EcClosed EcOpened EcEmptyPacket EcBadHead EcBadPacket EcExistKey EcNotExistKey EcNotExistCode EcNotExistService EcMarshallErr EcUnmarshallErr EcNotExistType EcIllegalOperation EcIllegalConnection EcTooManyConnection EcNotExistLoaderType EcParamsErr EcParseErr EcIo EcRedisErr EcOutOfRange EcTooLong EcLengthErr EcNotExistAgent EcSendErr EcReceiveErr EcAcceptErr EcConnectErr EcListenErr EcServiceErr EcDbErr EcMax )
type ToFnInt64Fn ¶
type ToFnInt64Fn func() FnStrFn
type VecInt2 ¶
type VecInt2 struct {
X, Y int32
}
func NewVecInt2 ¶
func VecInt2Add ¶
func VecInt2Div ¶
func VecInt2Mul ¶
func VecInt2Sub ¶
Click to show internal directories.
Click to hide internal directories.