xmap

package
v0.0.0-...-cb352a8 Latest Latest
Warning

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

Go to latest
Published: Dec 16, 2024 License: Apache-2.0 Imports: 6 Imported by: 3

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Map

type Map[keyT any, valueT any] struct {
	// contains filtered or unexported fields
}

func NewMap

func NewMap[KeyT, ValueT any]() *Map[KeyT, ValueT]

func (*Map[KeyT, ValueT]) Delete

func (m *Map[KeyT, ValueT]) Delete(key KeyT)

func (*Map[keyT, valueT]) ExistKey

func (m *Map[keyT, valueT]) ExistKey(k keyT) bool

func (*Map[keyT, valueT]) Keys

func (m *Map[keyT, valueT]) Keys() []keyT

func (*Map[KeyT, ValueT]) Len

func (m *Map[KeyT, ValueT]) Len() int

func (*Map[KeyT, ValueT]) Load

func (m *Map[KeyT, ValueT]) Load(key KeyT) (ValueT, bool)

func (*Map[KeyT, ValueT]) LoadAndDelete

func (m *Map[KeyT, ValueT]) LoadAndDelete(key KeyT) (ValueT, bool)

func (*Map[KeyT, ValueT]) LoadOrStore

func (m *Map[KeyT, ValueT]) LoadOrStore(key KeyT, value ValueT) (ValueT, bool)

func (*Map[keyT, valueT]) Marshal

func (m *Map[keyT, valueT]) Marshal() []byte

func (*Map[keyT, valueT]) MarshalIndent

func (m *Map[keyT, valueT]) MarshalIndent(prefix, indent string) []byte

func (*Map[keyT, valueT]) Range

func (m *Map[keyT, valueT]) Range(f func(key keyT, value valueT) bool)

func (*Map[KeyT, ValueT]) Reset

func (m *Map[KeyT, ValueT]) Reset()

func (*Map[KeyT, ValueT]) Store

func (m *Map[KeyT, ValueT]) Store(key KeyT, value ValueT)

func (*Map[keyT, valueT]) UnMarshal

func (m *Map[keyT, valueT]) UnMarshal(b []byte) error

type MapAny

type MapAny map[string]interface{}

func (MapAny) Bool

func (m MapAny) Bool(key string, defaultValue ...bool) bool

func (MapAny) Float32

func (m MapAny) Float32(key string, defaultValue ...float32) float32

func (MapAny) Float64

func (m MapAny) Float64(key string, defaultValue ...float64) float64

func (MapAny) Has

func (m MapAny) Has(key string) bool

func (MapAny) HasValue

func (m MapAny) HasValue(val string) bool

func (MapAny) Int

func (m MapAny) Int(key string, defaultValue ...int) int

func (MapAny) Int64

func (m MapAny) Int64(key string, defaultValue ...int64) int64

func (MapAny) Interface

func (m MapAny) Interface(key string) interface{}

func (MapAny) IsEmpty

func (m MapAny) IsEmpty() bool

func (MapAny) Keys

func (m MapAny) Keys() []string

func (MapAny) Load

func (m MapAny) Load(data map[string]string)

func (MapAny) MapAny

func (m MapAny) MapAny(key string) (MapAny, bool)

func (MapAny) MapStringInterface

func (m MapAny) MapStringInterface(key string) map[string]interface{}

func (MapAny) Set

func (m MapAny) Set(key string, val any)

func (MapAny) SliceInterface

func (m MapAny) SliceInterface(key string) ([]interface{}, bool)

func (MapAny) String

func (m MapAny) String(key string, defaultValue ...string) string

type OrderMap

type OrderMap[K comparable, V any] struct {
	*maputil.OrderedMap[K, V]
	// contains filtered or unexported fields
}

func NewOrderMap

func NewOrderMap[K comparable, V any]() *OrderMap[K, V]

func (*OrderMap[KeyT, ValueT]) Delete

func (m *OrderMap[KeyT, ValueT]) Delete(key KeyT)

func (*OrderMap[keyT, valueT]) ExistKey

func (m *OrderMap[keyT, valueT]) ExistKey(k keyT) bool

func (*OrderMap[keyT, valueT]) Keys

func (m *OrderMap[keyT, valueT]) Keys() []keyT

func (*OrderMap[KeyT, ValueT]) Len

func (m *OrderMap[KeyT, ValueT]) Len() int

func (*OrderMap[KeyT, ValueT]) Load

func (m *OrderMap[KeyT, ValueT]) Load(key KeyT) (ValueT, bool)

func (*OrderMap[KeyT, ValueT]) LoadAndDelete

func (m *OrderMap[KeyT, ValueT]) LoadAndDelete(key KeyT) (ValueT, bool)

func (*OrderMap[KeyT, ValueT]) LoadOrStore

func (m *OrderMap[KeyT, ValueT]) LoadOrStore(key KeyT, value ValueT) (ValueT, bool)

func (*OrderMap[keyT, valueT]) Range

func (m *OrderMap[keyT, valueT]) Range(f func(key keyT, value valueT) bool)

func (*OrderMap[KeyT, ValueT]) Reset

func (m *OrderMap[KeyT, ValueT]) Reset()

func (*OrderMap[KeyT, ValueT]) Store

func (m *OrderMap[KeyT, ValueT]) Store(key KeyT, value ValueT)

type OrderMapSeq

type OrderMapSeq[K comparable, V any] struct {
	*orderedmap.OrderedMap
	// contains filtered or unexported fields
}

func NewOrderMapSeq

func NewOrderMapSeq[K comparable, V any]() *OrderMapSeq[K, V]

func (*OrderMapSeq[KeyT, ValueT]) Delete

func (m *OrderMapSeq[KeyT, ValueT]) Delete(key KeyT)

func (*OrderMapSeq[keyT, valueT]) ExistKey

func (m *OrderMapSeq[keyT, valueT]) ExistKey(k keyT) bool

func (*OrderMapSeq[keyT, valueT]) Keys

func (m *OrderMapSeq[keyT, valueT]) Keys() []string

func (*OrderMapSeq[KeyT, ValueT]) Len

func (m *OrderMapSeq[KeyT, ValueT]) Len() int

func (*OrderMapSeq[KeyT, ValueT]) Load

func (m *OrderMapSeq[KeyT, ValueT]) Load(key KeyT) (ValueT, bool)

func (*OrderMapSeq[KeyT, ValueT]) LoadAndDelete

func (m *OrderMapSeq[KeyT, ValueT]) LoadAndDelete(key KeyT) (ValueT, bool)

func (*OrderMapSeq[KeyT, ValueT]) LoadOrStore

func (m *OrderMapSeq[KeyT, ValueT]) LoadOrStore(key KeyT, value ValueT) (ValueT, bool)

func (*OrderMapSeq[keyT, valueT]) Range

func (m *OrderMapSeq[keyT, valueT]) Range(f func(key string, value valueT) bool)

func (*OrderMapSeq[KeyT, ValueT]) Store

func (m *OrderMapSeq[KeyT, ValueT]) Store(key KeyT, value ValueT)

type SyncMap

type SyncMap[keyT any, valueT any] struct {
	// contains filtered or unexported fields
}

func NewSyncMap

func NewSyncMap[KeyT, ValueT any]() *SyncMap[KeyT, ValueT]

func (*SyncMap[KeyT, ValueT]) Delete

func (m *SyncMap[KeyT, ValueT]) Delete(key KeyT)

func (*SyncMap[keyT, valueT]) ExistKey

func (m *SyncMap[keyT, valueT]) ExistKey(k keyT) bool

func (*SyncMap[keyT, valueT]) Keys

func (m *SyncMap[keyT, valueT]) Keys() []keyT

func (*SyncMap[KeyT, ValueT]) Load

func (m *SyncMap[KeyT, ValueT]) Load(key KeyT) (ValueT, bool)

func (*SyncMap[KeyT, ValueT]) LoadAndDelete

func (m *SyncMap[KeyT, ValueT]) LoadAndDelete(key KeyT) (ValueT, bool)

func (*SyncMap[KeyT, ValueT]) LoadOrStore

func (m *SyncMap[KeyT, ValueT]) LoadOrStore(key KeyT, value ValueT) (ValueT, bool)

func (*SyncMap[keyT, valueT]) Range

func (m *SyncMap[keyT, valueT]) Range(f func(key keyT, value valueT) bool)

func (*SyncMap[KeyT, ValueT]) Reset

func (m *SyncMap[KeyT, ValueT]) Reset()

func (*SyncMap[KeyT, ValueT]) Store

func (m *SyncMap[KeyT, ValueT]) Store(key KeyT, value ValueT)

Jump to

Keyboard shortcuts

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