Documentation ¶
Overview ¶
Package nntpclient provides an NNTP Client.
Index ¶
- type Client
- func (c *Client) Article(specifier string) (int64, string, io.Reader, error)
- func (c *Client) Authenticate(user, pass string) (msg string, err error)
- func (c *Client) Body(specifier string) (int64, string, io.Reader, error)
- func (c *Client) Close() error
- func (c *Client) Command(cmd string, expectCode int) (int, string, error)
- func (c *Client) Group(name string) (rv nntp.Group, err error)
- func (c *Client) Head(specifier string) (int64, string, io.Reader, error)
- func (c *Client) List(sub string) (rv []nntp.Group, err error)
- func (c *Client) MultilineCommand(cmd string, expectCode int) (int, []string, error)
- func (c *Client) Post(r io.Reader) error
- func (c *Client) XOver(specifier string, compress bool) (<-chan Overview, error)
- type Overview
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Client ¶
type Client struct { Banner string // contains filtered or unexported fields }
Client is an NNTP client.
func (*Client) Authenticate ¶
Authenticate against an NNTP server using authinfo user/pass
func (*Client) Command ¶
Command sends a low-level command and get a response.
This will return an error if the code doesn't match the expectCode prefix. For example, if you specify "200", the response code MUST be 200 or you'll get an error. If you specify "2", any code from 200 (inclusive) to 300 (exclusive) will be success. An expectCode of -1 disables this behavior.
func (*Client) MultilineCommand ¶
type Overview ¶
type Overview struct { Headers textproto.MIMEHeader Err error }
Click to show internal directories.
Click to hide internal directories.