command

package
v0.17.0 Latest Latest
Warning

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

Go to latest
Published: Jul 7, 2023 License: MIT Imports: 8 Imported by: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

View Source
const SeqNumValueAsterisk = SeqNum(0)

Variables

This section is empty.

Functions

func ParseDate

func ParseDate(p *rfcparser.Parser) (time.Time, error)

func ParseDateDayFixed

func ParseDateDayFixed(p *rfcparser.Parser) (int, error)

func ParseDateMonth

func ParseDateMonth(p *rfcparser.Parser) (time.Month, error)

func ParseDateText

func ParseDateText(p *rfcparser.Parser) (time.Time, error)

func ParseDateTime

func ParseDateTime(p *rfcparser.Parser) (time.Time, error)

func ParseDateYear

func ParseDateYear(p *rfcparser.Parser) (int, error)

func ParseFlag

func ParseFlag(p *rfcparser.Parser) (string, error)

func ParseFlagList

func ParseFlagList(p *rfcparser.Parser) ([]string, error)

func ParseMailbox

func ParseMailbox(p *rfcparser.Parser) (rfcparser.String, error)

ParseMailbox parses a mailbox name as defined in RFC 3501.

func ParseNString

func ParseNString(p *rfcparser.Parser) (rfcparser.String, bool, error)

ParseNString pareses a string or NIL. If NIL was parsed the boolean return is set to false.

func ParseNZNumber

func ParseNZNumber(p *rfcparser.Parser) (int, error)

func ParseTime

func ParseTime(p *rfcparser.Parser) (int, int, int, error)

func ParseZone

func ParseZone(p *rfcparser.Parser) (*time.Location, error)

func TryParseFlagList

func TryParseFlagList(p *rfcparser.Parser) ([]string, bool, error)

Types

type Append

type Append struct {
	Mailbox  string
	Flags    []string
	DateTime time.Time
	Literal  []byte
}

func (Append) HasDateTime

func (l Append) HasDateTime() bool

func (Append) SanitizedString

func (l Append) SanitizedString() string

func (Append) String

func (l Append) String() string

type AppendCommandParser

type AppendCommandParser struct{}

func (AppendCommandParser) FromParser

func (AppendCommandParser) FromParser(p *rfcparser.Parser) (Payload, error)

type BodySection

type BodySection interface {
	String() string
}

type BodySectionHeader

type BodySectionHeader struct{}

func (BodySectionHeader) String

func (b BodySectionHeader) String() string

type BodySectionHeaderFields

type BodySectionHeaderFields struct {
	Negate bool
	Fields []string
}

func (BodySectionHeaderFields) String

func (b BodySectionHeaderFields) String() string

type BodySectionMIME

type BodySectionMIME struct{}

func (BodySectionMIME) String

func (b BodySectionMIME) String() string

type BodySectionPart

type BodySectionPart struct {
	Part    []int
	Section BodySection
}

func (BodySectionPart) String

func (b BodySectionPart) String() string

type BodySectionPartial

type BodySectionPartial struct {
	Offset int64
	Count  int64
}

type BodySectionText

type BodySectionText struct{}

func (BodySectionText) String

func (b BodySectionText) String() string

type Builder

type Builder interface {
	FromParser(p *rfcparser.Parser) (Payload, error)
}

type Capability

type Capability struct{}

func (Capability) SanitizedString

func (l Capability) SanitizedString() string

func (Capability) String

func (l Capability) String() string

type CapabilityCommandParser

type CapabilityCommandParser struct{}

func (CapabilityCommandParser) FromParser

type Check

type Check struct{}

func (Check) SanitizedString

func (l Check) SanitizedString() string

func (Check) String

func (l Check) String() string

type CheckCommandParser

type CheckCommandParser struct{}

func (CheckCommandParser) FromParser

func (CheckCommandParser) FromParser(p *rfcparser.Parser) (Payload, error)

type Close

type Close struct{}

func (Close) SanitizedString

func (l Close) SanitizedString() string

func (Close) String

func (l Close) String() string

type CloseCommandParser

type CloseCommandParser struct{}

func (CloseCommandParser) FromParser

func (CloseCommandParser) FromParser(p *rfcparser.Parser) (Payload, error)

type Command

type Command struct {
	Tag     string
	Payload Payload
}

func (Command) SanitizedString

func (c Command) SanitizedString() string

func (Command) String

func (c Command) String() string

type Copy

type Copy struct {
	SeqSet  []SeqRange
	Mailbox string
}

func (Copy) SanitizedString

func (l Copy) SanitizedString() string

func (Copy) String

func (l Copy) String() string

type CopyCommandParser

type CopyCommandParser struct{}

func (CopyCommandParser) FromParser

func (CopyCommandParser) FromParser(p *rfcparser.Parser) (Payload, error)

type Create

type Create struct {
	Mailbox string
}

func (Create) SanitizedString

func (l Create) SanitizedString() string

func (Create) String

func (l Create) String() string

type CreateCommandParser

type CreateCommandParser struct{}

func (CreateCommandParser) FromParser

func (CreateCommandParser) FromParser(p *rfcparser.Parser) (Payload, error)

type Delete

type Delete struct {
	Mailbox string
}

func (Delete) SanitizedString

func (l Delete) SanitizedString() string

func (Delete) String

func (l Delete) String() string

type DeleteCommandParser

type DeleteCommandParser struct{}

func (DeleteCommandParser) FromParser

func (DeleteCommandParser) FromParser(p *rfcparser.Parser) (Payload, error)

type Done

type Done struct{}

func (Done) SanitizedString

func (l Done) SanitizedString() string

func (Done) String

func (l Done) String() string

type Examine

type Examine struct {
	Mailbox string
}

func (Examine) SanitizedString

func (l Examine) SanitizedString() string

func (Examine) String

func (l Examine) String() string

type ExamineCommandParser

type ExamineCommandParser struct{}

func (ExamineCommandParser) FromParser

type Expunge

type Expunge struct{}

func (Expunge) SanitizedString

func (l Expunge) SanitizedString() string

func (Expunge) String

func (l Expunge) String() string

type ExpungeCommandParser

type ExpungeCommandParser struct{}

func (ExpungeCommandParser) FromParser

type Fetch

type Fetch struct {
	SeqSet     []SeqRange
	Attributes []FetchAttribute
}

func (Fetch) SanitizedString

func (f Fetch) SanitizedString() string

func (Fetch) String

func (f Fetch) String() string

type FetchAttribute

type FetchAttribute interface {
	String() string
}

type FetchAttributeAll

type FetchAttributeAll struct{}

func (FetchAttributeAll) String

func (f FetchAttributeAll) String() string

type FetchAttributeBody

type FetchAttributeBody struct{}

func (FetchAttributeBody) String

func (f FetchAttributeBody) String() string

type FetchAttributeBodySection

type FetchAttributeBodySection struct {
	Section BodySection
	Peek    bool
	Partial *BodySectionPartial
}

func (FetchAttributeBodySection) String

func (f FetchAttributeBodySection) String() string

type FetchAttributeBodyStructure

type FetchAttributeBodyStructure struct{}

func (FetchAttributeBodyStructure) String

type FetchAttributeEnvelope

type FetchAttributeEnvelope struct{}

func (FetchAttributeEnvelope) String

func (f FetchAttributeEnvelope) String() string

type FetchAttributeFast

type FetchAttributeFast struct{}

func (FetchAttributeFast) String

func (f FetchAttributeFast) String() string

type FetchAttributeFlags

type FetchAttributeFlags struct{}

func (FetchAttributeFlags) String

func (f FetchAttributeFlags) String() string

type FetchAttributeFull

type FetchAttributeFull struct{}

func (FetchAttributeFull) String

func (f FetchAttributeFull) String() string

type FetchAttributeInternalDate

type FetchAttributeInternalDate struct{}

func (FetchAttributeInternalDate) String

type FetchAttributeRFC822

type FetchAttributeRFC822 struct{}

func (FetchAttributeRFC822) String

func (f FetchAttributeRFC822) String() string

type FetchAttributeRFC822Header

type FetchAttributeRFC822Header struct{}

func (FetchAttributeRFC822Header) String

type FetchAttributeRFC822Size

type FetchAttributeRFC822Size struct{}

func (FetchAttributeRFC822Size) String

func (f FetchAttributeRFC822Size) String() string

type FetchAttributeRFC822Text

type FetchAttributeRFC822Text struct{}

func (FetchAttributeRFC822Text) String

func (f FetchAttributeRFC822Text) String() string

type FetchAttributeUID

type FetchAttributeUID struct{}

func (FetchAttributeUID) String

func (f FetchAttributeUID) String() string

type FetchCommandParser

type FetchCommandParser struct{}

func (FetchCommandParser) FromParser

func (FetchCommandParser) FromParser(p *rfcparser.Parser) (Payload, error)

type IDCommandParser

type IDCommandParser struct{}

func (IDCommandParser) FromParser

func (IDCommandParser) FromParser(p *rfcparser.Parser) (Payload, error)

type IDGet

type IDGet struct{}

func (IDGet) SanitizedString

func (l IDGet) SanitizedString() string

func (IDGet) String

func (l IDGet) String() string

type IDSet

type IDSet struct {
	Values map[string]string
}

func (IDSet) SanitizedString

func (l IDSet) SanitizedString() string

func (IDSet) String

func (l IDSet) String() string

type Idle

type Idle struct{}

func (Idle) SanitizedString

func (l Idle) SanitizedString() string

func (Idle) String

func (l Idle) String() string

type IdleCommandParser

type IdleCommandParser struct{}

func (IdleCommandParser) FromParser

func (IdleCommandParser) FromParser(p *rfcparser.Parser) (Payload, error)

type InputCollector

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

func NewInputCollector

func NewInputCollector(source rfcparser.Reader) *InputCollector

func (*InputCollector) Bytes

func (i *InputCollector) Bytes() []byte

func (*InputCollector) Read

func (i *InputCollector) Read(dst []byte) (int, error)

func (*InputCollector) ReadByte

func (i *InputCollector) ReadByte() (byte, error)

func (*InputCollector) ReadBytes

func (i *InputCollector) ReadBytes(delim byte) ([]byte, error)

func (*InputCollector) Reset

func (i *InputCollector) Reset()

func (*InputCollector) SetSource

func (i *InputCollector) SetSource(source rfcparser.Reader)

type LSub

type LSub struct {
	Mailbox     string
	LSubMailbox string
}

func (LSub) SanitizedString

func (l LSub) SanitizedString() string

func (LSub) String

func (l LSub) String() string

type LSubCommandParser

type LSubCommandParser struct{}

func (LSubCommandParser) FromParser

func (LSubCommandParser) FromParser(p *rfcparser.Parser) (Payload, error)

type List

type List struct {
	Mailbox     string
	ListMailbox string
}

func (List) SanitizedString

func (l List) SanitizedString() string

func (List) String

func (l List) String() string

type ListCommandParser

type ListCommandParser struct{}

func (ListCommandParser) FromParser

func (ListCommandParser) FromParser(p *rfcparser.Parser) (Payload, error)

type Login

type Login struct {
	UserID   string
	Password string
}

func (Login) SanitizedString

func (l Login) SanitizedString() string

func (Login) String

func (l Login) String() string

type LoginCommandParser

type LoginCommandParser struct{}

func (LoginCommandParser) FromParser

func (LoginCommandParser) FromParser(p *rfcparser.Parser) (Payload, error)

type Logout

type Logout struct{}

func (Logout) SanitizedString

func (l Logout) SanitizedString() string

func (Logout) String

func (l Logout) String() string

type LogoutCommandParser

type LogoutCommandParser struct{}

func (LogoutCommandParser) FromParser

func (LogoutCommandParser) FromParser(p *rfcparser.Parser) (Payload, error)

type Move

type Move struct {
	SeqSet  []SeqRange
	Mailbox string
}

func (Move) SanitizedString

func (l Move) SanitizedString() string

func (Move) String

func (l Move) String() string

type MoveCommandParser

type MoveCommandParser struct{}

func (MoveCommandParser) FromParser

func (MoveCommandParser) FromParser(p *rfcparser.Parser) (Payload, error)

type Noop

type Noop struct{}

func (Noop) SanitizedString

func (l Noop) SanitizedString() string

func (Noop) String

func (l Noop) String() string

type NoopCommandParser

type NoopCommandParser struct{}

func (NoopCommandParser) FromParser

func (NoopCommandParser) FromParser(p *rfcparser.Parser) (Payload, error)

type Parser

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

Parser parses IMAP Commands.

func NewParser

func NewParser(s *rfcparser.Scanner) *Parser

func NewParserWithLiteralContinuationCb

func NewParserWithLiteralContinuationCb(s *rfcparser.Scanner, cb func() error) *Parser

func (*Parser) ConsumeInvalidInput

func (p *Parser) ConsumeInvalidInput() error

ConsumeInvalidInput will consume all remaining scanner input until a new line has been reached.

func (*Parser) LastParsedCommand

func (p *Parser) LastParsedCommand() string

func (*Parser) LastParsedTag

func (p *Parser) LastParsedTag() string

func (*Parser) Parse

func (p *Parser) Parse() (Command, error)

type Payload

type Payload interface {
	String() string

	// SanitizedString should return the command payload with all the sensitive information stripped out.
	SanitizedString() string
}

type Rename

type Rename struct {
	From string
	To   string
}

func (Rename) SanitizedString

func (l Rename) SanitizedString() string

func (Rename) String

func (l Rename) String() string

type RenameCommandParser

type RenameCommandParser struct{}

func (RenameCommandParser) FromParser

func (RenameCommandParser) FromParser(p *rfcparser.Parser) (Payload, error)
type Search struct {
	Charset string
	Keys    []SearchKey
}

func (Search) SanitizedString

func (s Search) SanitizedString() string

func (Search) String

func (s Search) String() string

type SearchCommandParser

type SearchCommandParser struct{}

func (*SearchCommandParser) FromParser

func (scp *SearchCommandParser) FromParser(p *rfcparser.Parser) (Payload, error)

type SearchKey

type SearchKey interface {
	String() string
	SanitizedString() string
}

type SearchKeyAll

type SearchKeyAll struct{}

func (SearchKeyAll) SanitizedString

func (s SearchKeyAll) SanitizedString() string

func (SearchKeyAll) String

func (s SearchKeyAll) String() string

type SearchKeyAnswered

type SearchKeyAnswered struct{}

func (SearchKeyAnswered) SanitizedString

func (s SearchKeyAnswered) SanitizedString() string

func (SearchKeyAnswered) String

func (s SearchKeyAnswered) String() string

type SearchKeyBCC

type SearchKeyBCC struct {
	Value string
}

func (SearchKeyBCC) SanitizedString

func (s SearchKeyBCC) SanitizedString() string

func (SearchKeyBCC) String

func (s SearchKeyBCC) String() string

type SearchKeyBefore

type SearchKeyBefore struct {
	Value time.Time
}

func (SearchKeyBefore) SanitizedString

func (s SearchKeyBefore) SanitizedString() string

func (SearchKeyBefore) String

func (s SearchKeyBefore) String() string

type SearchKeyBody

type SearchKeyBody struct {
	Value string
}

func (SearchKeyBody) SanitizedString

func (s SearchKeyBody) SanitizedString() string

func (SearchKeyBody) String

func (s SearchKeyBody) String() string

type SearchKeyCC

type SearchKeyCC struct {
	Value string
}

func (SearchKeyCC) SanitizedString

func (s SearchKeyCC) SanitizedString() string

func (SearchKeyCC) String

func (s SearchKeyCC) String() string

type SearchKeyDeleted

type SearchKeyDeleted struct{}

func (SearchKeyDeleted) SanitizedString

func (s SearchKeyDeleted) SanitizedString() string

func (SearchKeyDeleted) String

func (s SearchKeyDeleted) String() string

type SearchKeyDraft

type SearchKeyDraft struct{}

func (SearchKeyDraft) SanitizedString

func (s SearchKeyDraft) SanitizedString() string

func (SearchKeyDraft) String

func (s SearchKeyDraft) String() string

type SearchKeyFlagged

type SearchKeyFlagged struct{}

func (SearchKeyFlagged) SanitizedString

func (s SearchKeyFlagged) SanitizedString() string

func (SearchKeyFlagged) String

func (s SearchKeyFlagged) String() string

type SearchKeyFrom

type SearchKeyFrom struct {
	Value string
}

func (SearchKeyFrom) SanitizedString

func (s SearchKeyFrom) SanitizedString() string

func (SearchKeyFrom) String

func (s SearchKeyFrom) String() string

type SearchKeyHeader

type SearchKeyHeader struct {
	Field string
	Value string
}

func (SearchKeyHeader) SanitizedString

func (s SearchKeyHeader) SanitizedString() string

func (SearchKeyHeader) String

func (s SearchKeyHeader) String() string

type SearchKeyKeyword

type SearchKeyKeyword struct {
	Value string
}

func (SearchKeyKeyword) SanitizedString

func (s SearchKeyKeyword) SanitizedString() string

func (SearchKeyKeyword) String

func (s SearchKeyKeyword) String() string

type SearchKeyLarger

type SearchKeyLarger struct {
	Value int
}

func (SearchKeyLarger) SanitizedString

func (s SearchKeyLarger) SanitizedString() string

func (SearchKeyLarger) String

func (s SearchKeyLarger) String() string

type SearchKeyList

type SearchKeyList struct {
	Keys []SearchKey
}

func (SearchKeyList) SanitizedString

func (s SearchKeyList) SanitizedString() string

func (SearchKeyList) String

func (s SearchKeyList) String() string

type SearchKeyNew

type SearchKeyNew struct{}

func (SearchKeyNew) SanitizedString

func (s SearchKeyNew) SanitizedString() string

func (SearchKeyNew) String

func (s SearchKeyNew) String() string

type SearchKeyNot

type SearchKeyNot struct {
	Key SearchKey
}

func (SearchKeyNot) SanitizedString

func (s SearchKeyNot) SanitizedString() string

func (SearchKeyNot) String

func (s SearchKeyNot) String() string

type SearchKeyOld

type SearchKeyOld struct{}

func (SearchKeyOld) SanitizedString

func (s SearchKeyOld) SanitizedString() string

func (SearchKeyOld) String

func (s SearchKeyOld) String() string

type SearchKeyOn

type SearchKeyOn struct {
	Value time.Time
}

func (SearchKeyOn) SanitizedString

func (s SearchKeyOn) SanitizedString() string

func (SearchKeyOn) String

func (s SearchKeyOn) String() string

type SearchKeyOr

type SearchKeyOr struct {
	Key1 SearchKey
	Key2 SearchKey
}

func (SearchKeyOr) SanitizedString

func (s SearchKeyOr) SanitizedString() string

func (SearchKeyOr) String

func (s SearchKeyOr) String() string

type SearchKeyRecent

type SearchKeyRecent struct{}

func (SearchKeyRecent) SanitizedString

func (s SearchKeyRecent) SanitizedString() string

func (SearchKeyRecent) String

func (s SearchKeyRecent) String() string

type SearchKeySeen

type SearchKeySeen struct{}

func (SearchKeySeen) SanitizedString

func (s SearchKeySeen) SanitizedString() string

func (SearchKeySeen) String

func (s SearchKeySeen) String() string

type SearchKeySentBefore

type SearchKeySentBefore struct {
	Value time.Time
}

func (SearchKeySentBefore) SanitizedString

func (s SearchKeySentBefore) SanitizedString() string

func (SearchKeySentBefore) String

func (s SearchKeySentBefore) String() string

type SearchKeySentOn

type SearchKeySentOn struct {
	Value time.Time
}

func (SearchKeySentOn) SanitizedString

func (s SearchKeySentOn) SanitizedString() string

func (SearchKeySentOn) String

func (s SearchKeySentOn) String() string

type SearchKeySentSince

type SearchKeySentSince struct {
	Value time.Time
}

func (SearchKeySentSince) SanitizedString

func (s SearchKeySentSince) SanitizedString() string

func (SearchKeySentSince) String

func (s SearchKeySentSince) String() string

type SearchKeySeqSet

type SearchKeySeqSet struct {
	SeqSet []SeqRange
}

func (SearchKeySeqSet) SanitizedString

func (s SearchKeySeqSet) SanitizedString() string

func (SearchKeySeqSet) String

func (s SearchKeySeqSet) String() string

type SearchKeySince

type SearchKeySince struct {
	Value time.Time
}

func (SearchKeySince) SanitizedString

func (s SearchKeySince) SanitizedString() string

func (SearchKeySince) String

func (s SearchKeySince) String() string

type SearchKeySmaller

type SearchKeySmaller struct {
	Value int
}

func (SearchKeySmaller) SanitizedString

func (s SearchKeySmaller) SanitizedString() string

func (SearchKeySmaller) String

func (s SearchKeySmaller) String() string

type SearchKeySubject

type SearchKeySubject struct {
	Value string
}

func (SearchKeySubject) SanitizedString

func (s SearchKeySubject) SanitizedString() string

func (SearchKeySubject) String

func (s SearchKeySubject) String() string

type SearchKeyText

type SearchKeyText struct {
	Value string
}

func (SearchKeyText) SanitizedString

func (s SearchKeyText) SanitizedString() string

func (SearchKeyText) String

func (s SearchKeyText) String() string

type SearchKeyTo

type SearchKeyTo struct {
	Value string
}

func (SearchKeyTo) SanitizedString

func (s SearchKeyTo) SanitizedString() string

func (SearchKeyTo) String

func (s SearchKeyTo) String() string

type SearchKeyUID

type SearchKeyUID struct {
	SeqSet []SeqRange
}

func (SearchKeyUID) SanitizedString

func (s SearchKeyUID) SanitizedString() string

func (SearchKeyUID) String

func (s SearchKeyUID) String() string

type SearchKeyUnanswered

type SearchKeyUnanswered struct{}

func (SearchKeyUnanswered) SanitizedString

func (s SearchKeyUnanswered) SanitizedString() string

func (SearchKeyUnanswered) String

func (s SearchKeyUnanswered) String() string

type SearchKeyUndeleted

type SearchKeyUndeleted struct{}

func (SearchKeyUndeleted) SanitizedString

func (s SearchKeyUndeleted) SanitizedString() string

func (SearchKeyUndeleted) String

func (s SearchKeyUndeleted) String() string

type SearchKeyUndraft

type SearchKeyUndraft struct{}

func (SearchKeyUndraft) SanitizedString

func (s SearchKeyUndraft) SanitizedString() string

func (SearchKeyUndraft) String

func (s SearchKeyUndraft) String() string

type SearchKeyUnflagged

type SearchKeyUnflagged struct{}

func (SearchKeyUnflagged) SanitizedString

func (s SearchKeyUnflagged) SanitizedString() string

func (SearchKeyUnflagged) String

func (s SearchKeyUnflagged) String() string

type SearchKeyUnkeyword

type SearchKeyUnkeyword struct {
	Value string
}

func (SearchKeyUnkeyword) SanitizedString

func (s SearchKeyUnkeyword) SanitizedString() string

func (SearchKeyUnkeyword) String

func (s SearchKeyUnkeyword) String() string

type SearchKeyUnseen

type SearchKeyUnseen struct{}

func (SearchKeyUnseen) SanitizedString

func (s SearchKeyUnseen) SanitizedString() string

func (SearchKeyUnseen) String

func (s SearchKeyUnseen) String() string

type Select

type Select struct {
	Mailbox string
}

func (Select) SanitizedString

func (l Select) SanitizedString() string

func (Select) String

func (l Select) String() string

type SelectCommandParser

type SelectCommandParser struct{}

func (SelectCommandParser) FromParser

func (SelectCommandParser) FromParser(p *rfcparser.Parser) (Payload, error)

type SeqNum

type SeqNum int

func ParseSeqNumber

func ParseSeqNumber(p *rfcparser.Parser) (SeqNum, error)

func (SeqNum) IsAsterisk

func (s SeqNum) IsAsterisk() bool

func (SeqNum) String

func (s SeqNum) String() string

type SeqRange

type SeqRange struct {
	Begin SeqNum
	End   SeqNum
}

func ParseSeqRange

func ParseSeqRange(p *rfcparser.Parser) (SeqRange, error)

func ParseSeqSet

func ParseSeqSet(p *rfcparser.Parser) ([]SeqRange, error)

func (SeqRange) String

func (s SeqRange) String() string

type StartTLS

type StartTLS struct{}

func (StartTLS) SanitizedString

func (l StartTLS) SanitizedString() string

func (StartTLS) String

func (l StartTLS) String() string

type StartTLSCommandParser

type StartTLSCommandParser struct{}

func (StartTLSCommandParser) FromParser

type Status

type Status struct {
	Mailbox    string
	Attributes []StatusAttribute
}

func (Status) SanitizedString

func (s Status) SanitizedString() string

func (Status) String

func (s Status) String() string

type StatusAttribute

type StatusAttribute int
const (
	StatusAttributeMessages StatusAttribute = iota
	StatusAttributeRecent
	StatusAttributeUIDNext
	StatusAttributeUIDValidity
	StatusAttributeUnseen
)

func (StatusAttribute) String

func (s StatusAttribute) String() string

type StatusCommandParser

type StatusCommandParser struct{}

func (StatusCommandParser) FromParser

func (StatusCommandParser) FromParser(p *rfcparser.Parser) (Payload, error)

type Store

type Store struct {
	SeqSet []SeqRange
	Action StoreAction
	Flags  []string
	Silent bool
}

func (Store) SanitizedString

func (s Store) SanitizedString() string

func (Store) String

func (s Store) String() string

type StoreAction

type StoreAction int
const (
	StoreActionAddFlags StoreAction = iota
	StoreActionRemFlags
	StoreActionSetFlags
)

func (StoreAction) String

func (s StoreAction) String() string

type StoreCommandParser

type StoreCommandParser struct{}

func (StoreCommandParser) FromParser

func (StoreCommandParser) FromParser(p *rfcparser.Parser) (Payload, error)

type Subscribe

type Subscribe struct {
	Mailbox string
}

func (Subscribe) SanitizedString

func (l Subscribe) SanitizedString() string

func (Subscribe) String

func (l Subscribe) String() string

type SubscribeCommandParser

type SubscribeCommandParser struct{}

func (SubscribeCommandParser) FromParser

type UID

type UID struct {
	Command Payload
}

func (UID) SanitizedString

func (l UID) SanitizedString() string

func (UID) String

func (l UID) String() string

type UIDCommandParser

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

func NewUIDCommandParser

func NewUIDCommandParser() *UIDCommandParser

func (*UIDCommandParser) FromParser

func (u *UIDCommandParser) FromParser(p *rfcparser.Parser) (Payload, error)

type UIDExpunge

type UIDExpunge struct {
	SeqSet []SeqRange
}

func (UIDExpunge) SanitizedString

func (l UIDExpunge) SanitizedString() string

func (UIDExpunge) String

func (l UIDExpunge) String() string

type UIDExpungeCommandParser

type UIDExpungeCommandParser struct{}

func (UIDExpungeCommandParser) FromParser

type Unselect

type Unselect struct{}

func (Unselect) SanitizedString

func (l Unselect) SanitizedString() string

func (Unselect) String

func (l Unselect) String() string

type UnselectCommandParser

type UnselectCommandParser struct{}

func (UnselectCommandParser) FromParser

type Unsubscribe

type Unsubscribe struct {
	Mailbox string
}

func (Unsubscribe) SanitizedString

func (l Unsubscribe) SanitizedString() string

func (Unsubscribe) String

func (l Unsubscribe) String() string

type UnsubscribeCommandParser

type UnsubscribeCommandParser struct{}

func (UnsubscribeCommandParser) FromParser

Jump to

Keyboard shortcuts

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