maildir

package
v0.0.0-...-722e3d4 Latest Latest
Warning

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

Go to latest
Published: Dec 30, 2019 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	// ErrCannotParse is ...
	ErrCannotParse = errors.New("cannot parse")
)

Functions

func IsMaildir

func IsMaildir(path string) bool

IsMaildir is ...

func SortID

func SortID(ids []ID)

SortID is ...

func SortKey

func SortKey(ks []Key)

SortKey is ...

Types

type FlagType

type FlagType uint8

FlagType is ...

const (

	// FlagTypeExperimental is ...
	FlagTypeExperimental FlagType
	// FlagTypeNormal is ...
	FlagTypeNormal
)

type ID

type ID struct {
	UNIXSeq     uint
	Boot        uint
	Urandom     uint
	Inode       uint
	Dev         uint
	MicroSecond uint
	PID         uint
	Seq         uint
}

ID is ...

func ParseID

func ParseID(str string) (ID, error)

ParseID is ..

type Key

type Key struct {
	Raw        string
	Second     uint
	DeliveryID ID
	HostName   string
	Params     map[string]string
	FlagType   FlagType
	Flags      []string
	// contains filtered or unexported fields
}

Key is ...

func ParseKey

func ParseKey(str string) (Key, error)

ParseKey is ..

func (Key) String

func (k Key) String() string

type Mail

type Mail struct {
	Key     Key
	Message *mail.Message
}

Mail is ...

type Maildir

type Maildir struct {
	Path string
}

Maildir is ...

func New

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

New is ...

func (Maildir) Keys

func (md Maildir) Keys(s SubDir) ([]Key, error)

Keys is ...

func (Maildir) Mail

func (md Maildir) Mail(key Key) (*Mail, error)

Mail is ...

func (Maildir) Mails

func (md Maildir) Mails(s SubDir) ([]Mail, error)

Mails is ...

type SubDir

type SubDir uint8

SubDir is the subdirectory name.

const (
	// SubDirUnknown is unknown directory.
	SubDirUnknown SubDir = iota
	// SubDirCur is the cur sub directory.
	SubDirCur
	// SubDirNew is the new sub directory.
	SubDirNew
	// SubDirTmp is the tmp sub directory.
	SubDirTmp
)

func NewSubDir

func NewSubDir(str string) SubDir

NewSubDir is create SubDir instance.

func (SubDir) String

func (s SubDir) String() string

String is ...

Jump to

Keyboard shortcuts

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