Documentation
¶
Overview ¶
Package data implements generic data structures and deletion of old data.
Index ¶
- func DecodeEd25519PrivateKey(key string) (ed25519.PrivateKey, error)
- func DecodeEd25519PublicKey(key string) (ed25519.PublicKey, error)
- func EncodeEd25519PrivateKey(key ed25519.PrivateKey) string
- func EncodeEd25519PublicKey(key ed25519.PublicKey) string
- func IsIDValid(u *url.URL) bool
- type GarbageCollector
- type OrderedMap
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func DecodeEd25519PrivateKey ¶ added in v0.19.0
func DecodeEd25519PrivateKey(key string) (ed25519.PrivateKey, error)
DecodeEd25519PrivateKey decodes an Ed25519 private key encoded by EncodeEd25519PrivateKey.
func DecodeEd25519PublicKey ¶ added in v0.19.0
DecodeEd25519PublicKey decodes an Ed25519 public key encoded by EncodeEd25519PublicKey.
func EncodeEd25519PrivateKey ¶ added in v0.19.0
func EncodeEd25519PrivateKey(key ed25519.PrivateKey) string
EncodeEd25519PrivateKey encodes an Ed25519 private key.
func EncodeEd25519PublicKey ¶ added in v0.19.0
EncodeEd25519PublicKey encodes an Ed25519 public key.
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.