Documentation ¶
Overview ¶
Package uidstore provides a concurrency-safe two-way mapping between UIDs used by the UI and arbitrary string keys as used by different mail backends.
Multiple Store instances can safely be created and the UIDs that they generate will be globally unique.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Store ¶
type Store struct {
// contains filtered or unexported fields
}
Store holds a mapping between application keys and globally-unique UIDs.
func (*Store) GetOrInsert ¶
GetOrInsert returns the UID for the provided key. If the key was already present in the store, the same UID value is returned. Otherwise, the key is inserted and the newly generated UID is returned.
Click to show internal directories.
Click to hide internal directories.