mailbox

package
v0.1.1 Latest Latest
Warning

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

Go to latest
Published: Feb 19, 2021 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type MessageSort

type MessageSort struct {
	Messages []api.MailboxMessagesMessage
	// contains filtered or unexported fields
}

MessageSort is a generic message sorter

func NewMessageSort

func NewMessageSort(key bmcrypto.PrivKey, messages []api.MailboxMessagesMessage, field SortField, asc bool) MessageSort

NewMessageSort will create a new sorted based on the given sortfield and ascending/descending order

func (*MessageSort) Len

func (ms *MessageSort) Len() int

Len returns the length of the message slice

func (*MessageSort) Less

func (ms *MessageSort) Less(i, j int) bool

Less will return if message i is less then message j through the sorter function

func (*MessageSort) Swap

func (ms *MessageSort) Swap(i, j int)

Swap will swap two messages in the slice

type SortField

type SortField int

SortField defines which kind of sorting we need to do

const (
	SortDate SortField = iota
	SortFrom
	SortSubject
)

Specific sorting fields

Jump to

Keyboard shortcuts

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