uid

package
v0.0.0-...-5584dbf Latest Latest
Warning

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

Go to latest
Published: Nov 21, 2023 License: MIT Imports: 3 Imported by: 0

Documentation

Overview

Package uid contains a simple mapper for UID (an integer value) and the notmuch database ID (a string) and persists it to disk. UID and Validity together must permanently refer to a specific message, otherwise your MUA may be get confused.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Mapper

type Mapper struct {
	Validity uint32
	Next     uint32
	Values   map[string]uint32
	// contains filtered or unexported fields
}

func New

func New(path string) (*Mapper, error)

func (*Mapper) FindOrAdd

func (u *Mapper) FindOrAdd(id string) uint32

func (*Mapper) Flush

func (u *Mapper) Flush() error

func (*Mapper) GetNext

func (u *Mapper) GetNext() uint32

func (*Mapper) GetValidity

func (u *Mapper) GetValidity() uint32

func (*Mapper) Remove

func (u *Mapper) Remove(id string)

Jump to

Keyboard shortcuts

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