Documentation ¶
Index ¶
- func Inst() common.SendingService
- type BaseState
- func (b BaseState) Check(line []byte, cmd []byte, cmdLen int) bool
- func (b BaseState) GetError() *StateError
- func (b BaseState) GetId() uint
- func (b BaseState) GetNext() State
- func (b BaseState) GetPossibles() []State
- func (b BaseState) IsUseCurrent() bool
- func (b BaseState) Read(conn *textproto.Conn) []byte
- func (b *BaseState) SetEvent(event *Event)
- func (b *BaseState) SetId(id uint)
- func (b *BaseState) SetNext(next State)
- func (b *BaseState) SetPossibles(possibles []State)
- type Code
- type Config
- type ConnectState
- type DataState
- type EhloState
- type Event
- type InputState
- type MailState
- type NoopState
- type QuitState
- type RcptState
- type Recipient
- type RsetState
- type Service
- type State
- type StateError
- type StateStatus
- type StateStatuses
- type VrfyState
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Inst ¶
func Inst() common.SendingService
Types ¶
type BaseState ¶
type BaseState struct {
// contains filtered or unexported fields
}
func (BaseState) GetError ¶
func (b BaseState) GetError() *StateError
func (BaseState) GetPossibles ¶
func (BaseState) IsUseCurrent ¶
func (*BaseState) SetPossibles ¶
type Code ¶
type Code int
const ( StatusCode Code = 211 HelpCode Code = 214 ReadyCode Code = 220 CloseCode Code = 221 CompleteCode Code = 250 ForwardCode Code = 251 AttemptDeliveryCode Code = 252 StartInputCode Code = 354 NotAvailableCode Code = 421 AbortedCode Code = 451 NotTakenCode Code = 452 UnableAcceptParamsCode Code = 455 SyntaxErrorCode Code = 500 SyntaxParamErrorCode Code = 501 NotImplementedCode Code = 502 BadSequenceCode Code = 503 ParamNotImplementedCode Code = 504 UserNotFoundCode Code = 550 UserNotLocalCode Code = 551 ExceededStorageCode Code = 552 NameNotAllowedCode Code = 553 TransactionFailedCode Code = 554 ParamsNotRecognizedCode Code = 555 )
func (Code) GetFormattedName ¶
type ConnectState ¶
type ConnectState struct {
BaseState
}
func (*ConnectState) GetCmd ¶
func (c *ConnectState) GetCmd() ([]byte, int)
func (*ConnectState) Process ¶
func (c *ConnectState) Process(line []byte) StateStatus
func (*ConnectState) Write ¶
func (c *ConnectState) Write(conn *textproto.Conn)
type DataState ¶
type DataState struct {
BaseState
}
func (*DataState) Process ¶
func (d *DataState) Process(line []byte) StateStatus
type EhloState ¶
type EhloState struct { BaseState // contains filtered or unexported fields }
func (*EhloState) Process ¶
func (e *EhloState) Process(line []byte) StateStatus
type InputState ¶
type InputState struct {
BaseState
}
func (*InputState) GetCmd ¶
func (i *InputState) GetCmd() ([]byte, int)
func (*InputState) Process ¶
func (i *InputState) Process(line []byte) StateStatus
func (*InputState) Write ¶
func (i *InputState) Write(conn *textproto.Conn)
type MailState ¶
type MailState struct {
BaseState
}
func (*MailState) Process ¶
func (m *MailState) Process(line []byte) StateStatus
type NoopState ¶
type NoopState struct {
BaseState
}
func (NoopState) IsUseCurrent ¶
func (*NoopState) Process ¶
func (n *NoopState) Process(line []byte) StateStatus
type QuitState ¶
type QuitState struct {
BaseState
}
func (*QuitState) Process ¶
func (q *QuitState) Process(line []byte) StateStatus
type RcptState ¶
type RcptState struct {
BaseState
}
func (*RcptState) Process ¶
func (r *RcptState) Process(line []byte) StateStatus
type RsetState ¶
type RsetState struct {
BaseState
}
func (*RsetState) Process ¶
func (r *RsetState) Process(line []byte) StateStatus
type State ¶
type State interface { SetEvent(*Event) GetNext() State SetNext(State) GetPossibles() []State SetPossibles([]State) Read(*textproto.Conn) []byte Process([]byte) StateStatus Write(*textproto.Conn) GetId() uint SetId(uint) IsUseCurrent() bool GetCmd() ([]byte, int) Check([]byte, []byte, int) bool GetError() *StateError }
type StateError ¶
type StateError struct {
// contains filtered or unexported fields
}
type StateStatus ¶
type StateStatus int
const ( FailureStatus StateStatus = iota + 1 ReadStatus WriteStatus PossibleStatus QuitStatus )
type StateStatuses ¶
type StateStatuses chan StateStatus
func (StateStatuses) Add ¶
func (s StateStatuses) Add(status StateStatus)
type VrfyState ¶
type VrfyState struct {
BaseState
}
func (VrfyState) IsUseCurrent ¶
func (*VrfyState) Process ¶
func (v *VrfyState) Process(line []byte) StateStatus
Click to show internal directories.
Click to hide internal directories.