Documentation
¶
Index ¶
- type KeySplitIndex
- type Node
- func (n *Node[T]) ByPrefix(s string) []T
- func (n *Node[T]) Collect() (values []T)
- func (n *Node[T]) Contains(s string) bool
- func (n *Node[T]) Get(s string) (out T)
- func (n *Node[T]) Remove(s string) (out T)
- func (n *Node[T]) Set(name string, value T)
- func (n *Node[T]) SetValue(value T)
- func (n *Node[T]) UnsetValue()
- func (n *Node[T]) Update(name string, f NodeUpdateFunc[T])
- func (n *Node[T]) Value() (v T)
- type NodeMap
- type NodeUpdateFunc
- type PrefixSuffix
- func (f *PrefixSuffix[T]) ByPrefix(prefix string) []T
- func (f *PrefixSuffix[T]) BySuffix(suffix string) []T
- func (f *PrefixSuffix[T]) Contains(key string) bool
- func (f *PrefixSuffix[T]) Get(key string) T
- func (f *PrefixSuffix[T]) Remove(key string)
- func (f *PrefixSuffix[T]) Set(key string, value T)
- func (f *PrefixSuffix[T]) Update(key string, fn NodeUpdateFunc[T])
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type KeySplitIndex ¶
func (*KeySplitIndex[T]) MarshalJSON ¶
func (n *KeySplitIndex[T]) MarshalJSON() ([]byte, error)
func (*KeySplitIndex[T]) UnmarshalJSON ¶
func (n *KeySplitIndex[T]) UnmarshalJSON(bytes []byte) error
type Node ¶
func (*Node[T]) UnsetValue ¶
func (n *Node[T]) UnsetValue()
func (*Node[T]) Update ¶
func (n *Node[T]) Update(name string, f NodeUpdateFunc[T])
type NodeUpdateFunc ¶
type NodeUpdateFunc[T any] func(current T) (newValue T)
type PrefixSuffix ¶
type PrefixSuffix[T any] struct { // contains filtered or unexported fields }
PrefixSuffix index combines two KeySplitIndexes to simplify indexing and searching by prefix and suffix
func (*PrefixSuffix[T]) ByPrefix ¶
func (f *PrefixSuffix[T]) ByPrefix(prefix string) []T
func (*PrefixSuffix[T]) BySuffix ¶
func (f *PrefixSuffix[T]) BySuffix(suffix string) []T
func (*PrefixSuffix[T]) Contains ¶
func (f *PrefixSuffix[T]) Contains(key string) bool
func (*PrefixSuffix[T]) Get ¶
func (f *PrefixSuffix[T]) Get(key string) T
func (*PrefixSuffix[T]) Remove ¶
func (f *PrefixSuffix[T]) Remove(key string)
func (*PrefixSuffix[T]) Set ¶
func (f *PrefixSuffix[T]) Set(key string, value T)
func (*PrefixSuffix[T]) Update ¶
func (f *PrefixSuffix[T]) Update(key string, fn NodeUpdateFunc[T])
Click to show internal directories.
Click to hide internal directories.