nntputil

package
v0.0.0-...-b7fb801 Latest Latest
Warning

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

Go to latest
Published: May 3, 2020 License: GPL-3.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type NNTPClient

type NNTPClient struct {
	MaxScan    int
	SaveMissed bool
	// contains filtered or unexported fields
}

NNTPClient comment

func ConnectAndAuthenticate

func ConnectAndAuthenticate(server, username, password string, useSSL bool) (*NNTPClient, error)

ConnectAndAuthenticate returns a NNTPClient that is authenticated to the server TODO: allow for different SSL configs.

func NewClient

func NewClient(c NNTPConnection) *NNTPClient

NewClient returns a NNTPClient with the given connection and defaults set.

func (*NNTPClient) GroupScanForward

func (n *NNTPClient) GroupScanForward(dbh *db.Handle, group string, limit int) (int, error)

GroupScanForward looks for new messages in a particular Group. Returns the number of articles scanned and if an error was encountered

func (*NNTPClient) Quit

func (n *NNTPClient) Quit()

Quit closes the underlying connection.

type NNTPConnection

type NNTPConnection interface {
	Group(group string) (*nntp.Group, error)
	Overview(begin, end int64) ([]nntp.MessageOverview, error)
	Quit() error
}

NNTPConnection is for creating fakes in testing

Jump to

Keyboard shortcuts

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