pop3

package
v2.0.0+incompatible Latest Latest
Warning

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

Go to latest
Published: May 5, 2018 License: MIT Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Server

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

Server defines an instance of the POP3 server.

func New

func New(pop3Config config.POP3, shutdownChan chan bool, store storage.Store) *Server

New creates a new Server struct.

func (*Server) Drain

func (s *Server) Drain()

Drain causes the caller to block until all active POP3 sessions have finished

func (*Server) Start

func (s *Server) Start(ctx context.Context)

Start the server and listen for connections

type Session

type Session struct {
	*Server // Reference to the server we belong to.
	// contains filtered or unexported fields
}

Session defines an active POP3 session

func NewSession

func NewSession(server *Server, id int, conn net.Conn, logger zerolog.Logger) *Session

NewSession creates a new POP3 session

func (*Session) String

func (s *Session) String() string

type State

type State int

State tracks the current mode of our POP3 state machine

const (
	// AUTHORIZATION state: the client must now identify and authenticate
	AUTHORIZATION State = iota
	// TRANSACTION state: mailbox open, client may now issue commands
	TRANSACTION
	// QUIT state: client requests us to end session
	QUIT
)

func (State) String

func (s State) String() string

Jump to

Keyboard shortcuts

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