Documentation ¶
Overview ¶
Copyright (c) 2023, donnie <donnie4w@gmail.com> All rights reserved. Use of this source code is governed by a BSD-style license that can be found in the LICENSE file.
github.com/donnie4w/tldb
Copyright (c) 2023, donnie <donnie4w@gmail.com> All rights reserved. Use of this source code is governed by a BSD-style license that can be found in the LICENSE file.
github.com/donnie4w/tldb
Index ¶
- Variables
- func ArrayContain[T int | int8 | int32 | int64 | string](a []T, v T) (b bool)
- func ArrayEqual[T int | int8 | int32 | int64 | string](a, b []T) bool
- func ArraySliceAsc[T int | int8 | int32 | int64 | string](a []T) (_r []T)
- func ArraySub[K int | int8 | int32 | int64 | string](a1, a2 []K) (_r []K)
- func ArraySub2[K int | int8 | int32 | int64 | string](a []K, k K) (_r []K)
- func ArraySubMap[K int | int8 | int32 | int64 | string, V any](a []K, m *MapL[K, V]) (_r []K)
- func ArrayToMap[K int | int8 | int32 | int64 | string, V int8](a []K) (_r *Map[K, V])
- func ArrayToMap2[K int | int8 | int32 | int64 | string, V any](a []K, v V) (_r map[K]V)
- func BytesToInt16(bs []byte) (_r int16)
- func BytesToInt32(bs []byte) (_r int32)
- func BytesToInt64(bs []byte) (_r int64)
- func BytesToIntArray(bs []byte) (data []int64)
- func CRC32(bs []byte) uint32
- func CRC64(bs []byte) uint64
- func CheckGzip(bs []byte) (err error)
- func Concat(ss ...string) string
- func Decode(buf []byte, e any) (err error)
- func Encode(e any) (by []byte, err error)
- func Errors(code sys.ErrCodeType) error
- func Gzip(gzfname, srcfname, dir string) (err error)
- func GzipWrite(bs []byte) (buf bytes.Buffer, err error)
- func Hash(key []byte) uint64
- func Int16ToBytes(n int16) (bs []byte)
- func Int32ToBytes(n int32) (bs []byte)
- func Int64ToBytes(n int64) (bs []byte)
- func IntArrayToBytes(n []int64) []byte
- func IsFileExist(path string) (_r bool)
- func MD5(s string) string
- func Map2SyncMap[K int | int8 | int32 | int64 | string, V any](m1 map[K]V) (m2 *Map[K, V])
- func MapSub[K int | int8 | int32 | int64 | string, V any](m1, m2 *MapL[K, V]) (_r *MapL[K, V])
- func MapToArray[K int | int8 | int32 | int64 | string, V any](m *Map[K, V]) (_r []K)
- func MapToArray2[K int | int8 | int32 | int64 | string, V any](m map[K]V) (_r []K)
- func MatchString(pattern string, s string) bool
- func NewTsLockPool() *_tsLockPool
- func NewTxId() (txid int64)
- func NewUUID() uint32
- func Rand(i int) (_r int)
- func RandStrict(i int64) (_r int64, _err error)
- func ReadFile(path string) (bs []byte, err error)
- func Recovr()
- func SHA1(s string) string
- func SnappyDecode(bs []byte) (_r []byte)
- func SnappyEncode(bs []byte) (_r []byte)
- func SyncMap2Map[K int | int8 | int32 | int64 | string, V any](m1 *Map[K, V]) (m2 map[K]V)
- func TDecode[T thrift.TStruct](bs []byte, ts T) (_r T, err error)
- func TEncode(ts thrift.TStruct) (_r []byte)
- func Time() time.Time
- func TimeNano() int64
- func TimeStr() string
- func TimeStrToTime(s string) (t time.Time, err error)
- func UnGzip(bs []byte) (_bb bytes.Buffer, err error)
- func UnGzipByBytes(bs []byte, f func(bs []byte) bool) (err error)
- func UnGzipByFile(gzfname string, f func(bs []byte) bool)
- func ZlibCz(bs []byte) (_r []byte, err error)
- func ZlibUnCz(bs []byte) (_r []byte, err error)
- type Await
- type LimitLock
- type Numlock
- type Strlock
- type TlLock
- type TsLock
Constants ¶
This section is empty.
Variables ¶
View Source
var BufferPool = gobuffer.NewBufferPool(8)
View Source
var GoPool = gopool.NewPool(200, sys.GOMAXLIMIT)
Functions ¶
func ArraySubMap ¶
func ArrayToMap ¶
func ArrayToMap2 ¶
func BytesToInt16 ¶
func BytesToInt32 ¶
func BytesToInt64 ¶
func BytesToIntArray ¶
func Errors ¶
func Errors(code sys.ErrCodeType) error
func Int16ToBytes ¶
func Int32ToBytes ¶
func Int64ToBytes ¶
func IntArrayToBytes ¶
func IsFileExist ¶
func Map2SyncMap ¶
func MapToArray ¶
func MapToArray2 ¶
func MatchString ¶
func NewTsLockPool ¶
func NewTsLockPool() *_tsLockPool
func RandStrict ¶
func SnappyDecode ¶
func SnappyEncode ¶
func SyncMap2Map ¶
func UnGzipByFile ¶
Types ¶
type Await ¶
type Await[T any] struct { // contains filtered or unexported fields }
*******************************************************
func (*Await[T]) DelAndClose ¶
type LimitLock ¶
type LimitLock struct {
// contains filtered or unexported fields
}
*******************************************************
type Strlock ¶
type Strlock struct {
// contains filtered or unexported fields
}
***************************************************
func NewStrlock ¶
Click to show internal directories.
Click to hide internal directories.