structx

package
v1.9.0 Latest Latest
Warning

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

Go to latest
Published: Apr 14, 2024 License: MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func SetZiplistMaxSize added in v1.9.0

func SetZiplistMaxSize(n int)

Types

type Bitmap added in v1.4.0

type Bitmap struct {
	sync.RWMutex
	// contains filtered or unexported fields
}

Bitmap

func NewBitmap added in v1.4.0

func NewBitmap() *Bitmap

func (*Bitmap) Add added in v1.4.0

func (b *Bitmap) Add(items ...uint32) (n int)

Add

func (*Bitmap) And added in v1.4.0

func (b *Bitmap) And(b2 *Bitmap) *Bitmap

And

func (*Bitmap) Clone added in v1.4.0

func (b *Bitmap) Clone() *Bitmap

Clone

func (*Bitmap) Flip added in v1.4.0

func (b *Bitmap) Flip(start, end uint64)

Flip

func (*Bitmap) Len added in v1.4.0

func (b *Bitmap) Len() uint64

Len

func (*Bitmap) MarshalBinary added in v1.4.0

func (b *Bitmap) MarshalBinary() ([]byte, error)

MarshalBinary

func (*Bitmap) Or added in v1.4.0

func (b *Bitmap) Or(b2 *Bitmap) *Bitmap

Or

func (*Bitmap) Remove added in v1.4.0

func (b *Bitmap) Remove(items ...uint32) (n int)

Remove

func (*Bitmap) Test added in v1.4.0

func (b *Bitmap) Test(i uint32) bool

Test

func (*Bitmap) ToArray added in v1.4.0

func (b *Bitmap) ToArray() []uint32

ToArray

func (*Bitmap) UnmarshalBinary added in v1.4.0

func (b *Bitmap) UnmarshalBinary(data []byte) error

UnmarshalBinary

func (*Bitmap) Xor added in v1.4.0

func (b *Bitmap) Xor(b2 *Bitmap) *Bitmap

Xor

type List

type List struct {
	*quicklist.QuickList
}

List based on quicklist.

func NewList

func NewList() *List

type Map

type Map[K comparable, V any] struct {
	*swiss.Map[K, V]
}

Map

func NewMap

func NewMap[K comparable, V any]() Map[K, V]

NewMap

func (*Map[K, V]) MarshalJSON

func (m *Map[K, V]) MarshalJSON() ([]byte, error)

MarshalJSON

func (*Map[K, V]) UnmarshalJSON

func (m *Map[K, V]) UnmarshalJSON(src []byte) error

UnmarshalJSON

type Ordered added in v1.7.3

type Ordered constraints.Ordered

type Set added in v1.4.0

type Set struct {
	mapset.Set[string]
}

Set

func NewSet added in v1.4.0

func NewSet() *Set

NewSet

func (*Set) Clone added in v1.5.0

func (s *Set) Clone() *Set

Clone

func (*Set) Difference added in v1.5.0

func (s *Set) Difference(other *Set)

Difference

func (*Set) Intersect added in v1.5.0

func (s *Set) Intersect(other *Set)

Intersect

func (*Set) Union added in v1.5.0

func (s *Set) Union(other *Set)

Union

type SyncMap

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

SyncMap

func NewSyncMap

func NewSyncMap() (s *SyncMap)

NewSyncMap

func (*SyncMap) Get added in v1.4.0

func (m *SyncMap) Get(key string) ([]byte, bool)

Get

func (*SyncMap) Keys added in v1.4.0

func (m *SyncMap) Keys() (keys []string)

Keys

func (*SyncMap) Len added in v1.4.0

func (m *SyncMap) Len() (n int)

Len

func (*SyncMap) MarshalJSON

func (m *SyncMap) MarshalJSON() ([]byte, error)

MarshalJSON

func (*SyncMap) Remove added in v1.9.0

func (m *SyncMap) Remove(key string) bool

Remove

func (*SyncMap) Set added in v1.4.0

func (m *SyncMap) Set(key string, val []byte)

Set

func (*SyncMap) UnmarshalJSON

func (m *SyncMap) UnmarshalJSON(src []byte) error

UnmarshalJSON

type ZSet

type ZSet[K, S Ordered] struct {
	sync.RWMutex
	// contains filtered or unexported fields
}

ZSet

func NewZSet

func NewZSet[K, S Ordered]() *ZSet[K, S]

NewZSet

func (*ZSet[K, S]) Delete

func (z *ZSet[K, S]) Delete(key K) (s S, ok bool)

Delete

func (*ZSet[K, S]) Get added in v1.4.0

func (z *ZSet[K, S]) Get(key K) (S, bool)

Get

func (*ZSet[K, S]) Incr

func (z *ZSet[K, S]) Incr(key K, incr S) S

Incr

func (*ZSet[K, S]) Iter added in v1.4.0

func (z *ZSet[K, S]) Iter(f func(k K, s S) bool)

Iter iterate all elements by scores.

func (*ZSet[K, S]) Len

func (z *ZSet[K, S]) Len() int

Len

func (*ZSet[K, S]) MarshalJSON added in v1.2.0

func (z *ZSet[K, S]) MarshalJSON() ([]byte, error)

MarshalJSON

func (*ZSet[K, S]) Set

func (z *ZSet[K, S]) Set(key K, score S)

Set upsert value by key.

func (*ZSet[K, S]) UnmarshalJSON added in v1.2.0

func (z *ZSet[K, S]) UnmarshalJSON(src []byte) error

UnmarshalJSON

Jump to

Keyboard shortcuts

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