Documentation ¶
Overview ¶
Minimalistic Pipelined NNTP client.
Index ¶
- Constants
- func FinishDR(dr *fastnntp.DotReader)
- type Connection
- func (c *Connection) Article(args []byte, head, body bool, f func(dr *fastnntp.DotReader, msgid []byte)) (err error)
- func (c *Connection) ArticleInto(args []byte, head, body bool, t io.Writer) (msgid []byte, err error)
- func (c *Connection) Check(msgid []byte) (code int, err error)
- func (c *Connection) Close() (err error)
- func (c *Connection) Group(grp []byte) (num, low, high int64, err error)
- func (c *Connection) ListActive(f func(group []byte, high, low int64, status byte)) (err error)
- func (c *Connection) ListNewsgroups(f func(group []byte, descr []byte)) (err error)
- func (c *Connection) Listgroup(f func(num int64), args interface{}) (err error)
- func (c *Connection) PostOrIhave(msgid []byte, f Posting) (err error)
- func (c *Connection) Takethis(msgid []byte, f Posting) (code int, err error)
- func (c *Connection) Xover(f XoverResp, msgno []byte) (err error)
- type ErrNum
- type Posting
- type UnexpectedCode
- type XoverResp
Constants ¶
View Source
const ( CheckOK = 238 // Send article to be transferred CheckNotPossible = 431 // Transfer not possible; try again later CheckNotWanted = 438 // Article not wanted TakethisOK = 239 TakethisRejected = 439 )
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Connection ¶
type Connection struct {
// contains filtered or unexported fields
}
func NewConnection ¶
func NewConnection(rwc io.ReadWriteCloser) (c *Connection, err error)
func (*Connection) Article ¶
func (c *Connection) Article(args []byte, head, body bool, f func(dr *fastnntp.DotReader, msgid []byte)) (err error)
Submits one of the following commands: ARTICLE, HEAD, BODY or STAT.
func (*Connection) ArticleInto ¶
func (c *Connection) ArticleInto(args []byte, head, body bool, t io.Writer) (msgid []byte, err error)
Submits one of the following commands: ARTICLE, HEAD, BODY or STAT.
func (*Connection) Check ¶
func (c *Connection) Check(msgid []byte) (code int, err error)
Checks whether or not an article is wanted. Requires RFC-4644 (The STREAMING Extension)
func (*Connection) Close ¶
func (c *Connection) Close() (err error)
Closes the connection. Handle with care: Any further attempt to perform a request panics after the connection is closed using Close().
func (*Connection) Group ¶
func (c *Connection) Group(grp []byte) (num, low, high int64, err error)
Selects a newsgroup.
func (*Connection) ListActive ¶
func (c *Connection) ListActive(f func(group []byte, high, low int64, status byte)) (err error)
List all newsgroups.
func (*Connection) ListNewsgroups ¶
func (c *Connection) ListNewsgroups(f func(group []byte, descr []byte)) (err error)
List all newsgroups.
func (*Connection) Listgroup ¶
func (c *Connection) Listgroup(f func(num int64), args interface{}) (err error)
EXPERIMENTAL, MAY CHANGE! Performs the LISTGROUP command.
func (*Connection) PostOrIhave ¶
func (c *Connection) PostOrIhave(msgid []byte, f Posting) (err error)
type UnexpectedCode ¶
func (*UnexpectedCode) Error ¶
func (u *UnexpectedCode) Error() string
Click to show internal directories.
Click to hide internal directories.