maildir

package
v1.1.1 Latest Latest
Warning

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

Go to latest
Published: Apr 18, 2023 License: MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AggregateMailFolders

func AggregateMailFolders(rootMailFolderPath string, inboxFolderName string, aggregator Aggregator) error

func AggregateUsers

func AggregateUsers(users []user.User, maildirName string, inboxFolderName string, aggregator Aggregator) error

func SortByCount

func SortByCount(results []*AggregateResult)

func SortByName

func SortByName(results []*AggregateResult)

func SortByTotalSize

func SortByTotalSize(results []*AggregateResult)

Types

type AggregateResult

type AggregateResult struct {
	Name      string
	Count     int64
	TotalSize int64
}

type Aggregator

type Aggregator interface {
	StartUser(userName string)
	StartMailFolder(mailFolderName string)
	Aggregate(mail mailInfo)
}

type FolderAggregator

type FolderAggregator struct {
	// contains filtered or unexported fields
}

func NewFolderAggregator

func NewFolderAggregator() *FolderAggregator

func (*FolderAggregator) Aggregate

func (a *FolderAggregator) Aggregate(mail mailInfo)

func (*FolderAggregator) Results

func (a *FolderAggregator) Results() []*AggregateResult

func (*FolderAggregator) StartMailFolder

func (a *FolderAggregator) StartMailFolder(mailFolderName string)

func (*FolderAggregator) StartUser

func (a *FolderAggregator) StartUser(userName string)

type MultiAggregator

type MultiAggregator struct {
	// contains filtered or unexported fields
}

func NewMultiAggregator

func NewMultiAggregator(aggregators []Aggregator) *MultiAggregator

func (*MultiAggregator) Aggregate

func (a *MultiAggregator) Aggregate(mail mailInfo)

func (*MultiAggregator) StartMailFolder

func (a *MultiAggregator) StartMailFolder(mailFolderName string)

func (*MultiAggregator) StartUser

func (a *MultiAggregator) StartUser(userName string)

type TimeAggregator

type TimeAggregator struct {
	// contains filtered or unexported fields
}

func NewMonthAggregator

func NewMonthAggregator() *TimeAggregator

func NewYearAggregator

func NewYearAggregator() *TimeAggregator

func (*TimeAggregator) Aggregate

func (a *TimeAggregator) Aggregate(mail mailInfo)

func (*TimeAggregator) Results

func (a *TimeAggregator) Results() []*AggregateResult

func (*TimeAggregator) StartMailFolder

func (a *TimeAggregator) StartMailFolder(mailFolderName string)

func (*TimeAggregator) StartUser

func (a *TimeAggregator) StartUser(userName string)

type UserAggregator

type UserAggregator struct {
	// contains filtered or unexported fields
}

func NewUserAggregator

func NewUserAggregator() *UserAggregator

func (*UserAggregator) Aggregate

func (a *UserAggregator) Aggregate(mail mailInfo)

func (*UserAggregator) Results

func (a *UserAggregator) Results() []*AggregateResult

func (*UserAggregator) StartMailFolder

func (a *UserAggregator) StartMailFolder(mailFolderName string)

func (*UserAggregator) StartUser

func (a *UserAggregator) StartUser(userName string)

Jump to

Keyboard shortcuts

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