Documentation ¶
Overview ¶
Package data implements generic data structures and deletion of old data.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func IsIDValid ¶
IsIDValid determines whether or not a URL can be a valid actor, object or activity ID.
func ParsePrivateKey ¶
ParsePrivateKey parses private keys.
Types ¶
type GarbageCollector ¶
type OrderedMap ¶
type OrderedMap[TK comparable, TV any] map[TK]valueAndIndex[TV]
OrderedMap is a map that maintains insertion order. Listing of keys (using OrderedMap.Keys) iterates over keys and allocates memory.
func (OrderedMap[TK, TV]) All ¶
func (m OrderedMap[TK, TV]) All() iter.Seq2[TK, TV]
All iterates over key/value pairs in the map. All calls OrderedMap.Keys, therefore it allocates memory.
func (OrderedMap[TK, TV]) CollectKeys ¶
func (m OrderedMap[TK, TV]) CollectKeys() []TK
CollectKeys returns a new slice of keys in the map.
func (OrderedMap[TK, TV]) Contains ¶
func (m OrderedMap[TK, TV]) Contains(key TK) bool
Contains determines if the map contains a key.
func (OrderedMap[TK, TV]) Keys ¶
func (m OrderedMap[TK, TV]) Keys() iter.Seq[TK]
Keys iterates over keys in the map. It allocates memory.
func (OrderedMap[TK, TV]) Store ¶
func (m OrderedMap[TK, TV]) Store(key TK, value TV)
Store adds a key/value pair to the map if the map doesn't contain it already.
func (OrderedMap[TK, TV]) Values ¶
func (m OrderedMap[TK, TV]) Values() iter.Seq[TV]
Values iterates over values in the map. Values calls OrderedMap.Keys, therefore it allocates memory.