Skip to content

fn connect #

fn connect(addr string) ?NntpsStream

Creates an NNTP Stream.

fn new_article #

fn new_article(lines []string) Article

fn new_news_group #

fn new_news_group(group string) NewsGroup

fn split_date #

fn split_date(date_response string) (string, string)

fn trim_group #

fn trim_group(_str string, arr []string) string

struct Article #

struct Article {
pub:
	headers map[string]string
	body    []string
}

struct NewsGroup #

struct NewsGroup {
pub:
	name   string
	high   int
	low    int
	status string
}

struct NntpsStream #

struct NntpsStream {
mut:
	stream &net.TcpConn
}

fn (NntpsStream) article #

fn (mut stream NntpsStream) article() ?Article

The article indicated by the current article number in the currently selected newsgroup is selected.

fn (NntpsStream) article_by_id #

fn (mut stream NntpsStream) article_by_id(id string) ?Article

The article indicated by the article id is selected.

fn (NntpsStream) article_by_number #

fn (mut stream NntpsStream) article_by_number(number int) ?Article

The article indicated by the article number in the currently selected newsgroup is selected.

fn (NntpsStream) body #

fn (mut stream NntpsStream) body() ?[]string

Retrieves the body of the current article number in the currently selected newsgroup.

fn (NntpsStream) body_by_id #

fn (mut stream NntpsStream) body_by_id(id string) ?[]string

Retrieves the body of the article id.

fn (NntpsStream) body_by_number #

fn (mut stream NntpsStream) body_by_number(number int) ?[]string

Retrieves the body of the article number in the currently selected newsgroup.

fn (NntpsStream) capabilities #

fn (mut stream NntpsStream) capabilities() ?[]string

Gives the list of capabilities that the server has.

fn (NntpsStream) date #

fn (mut stream NntpsStream) date() ?string

Retrieves the date as the server sees the date.

fn (NntpsStream) head #

fn (mut stream NntpsStream) head() ?[]string

Retrieves the headers of the current article number in the currently selected newsgroup.

fn (NntpsStream) head_by_id #

fn (mut stream NntpsStream) head_by_id(id string) ?[]string

Retrieves the headers of the article id.

fn (NntpsStream) head_by_number #

fn (mut stream NntpsStream) head_by_number(number int) ?[]string

Retrieves the headers of the article number in the currently selected newsgroup.

fn (NntpsStream) last #

fn (mut stream NntpsStream) last() ?string

Moves the currently selected article number back one

fn (NntpsStream) list #

fn (mut stream NntpsStream) list() ?[]NewsGroup

Lists all of the newgroups on the server.

fn (NntpsStream) group #

fn (mut stream NntpsStream) group(group string) ?

Selects a newsgroup

fn (NntpsStream) help #

fn (mut stream NntpsStream) help() ?[]string

Show the help command given on the server.

fn (NntpsStream) quit #

fn (mut stream NntpsStream) quit() ?

Quits the current session.

fn (NntpsStream) newgroups #

fn (mut stream NntpsStream) newgroups(date string, time string, use_gmt bool) ?[]string

Retrieves a list of newsgroups since the date and time given.

fn (NntpsStream) newnews #

fn (mut stream NntpsStream) newnews(wildmat string, date string, time string, use_gmt bool) ?[]string

Retrieves a list of new news since the date and time given.

fn (NntpsStream) next #

fn (mut stream NntpsStream) next() ?string

Moves the currently selected article number forward one

fn (NntpsStream) post #

fn (mut stream NntpsStream) post(message string) ?

Posts a message to the NNTP server.

fn (NntpsStream) stat #

fn (mut stream NntpsStream) stat() ?string

Gets information about the current article.

fn (NntpsStream) stat_by_id #

fn (mut stream NntpsStream) stat_by_id(id string) ?string

Gets the information about the article id.

fn (NntpsStream) stat_by_number #

fn (mut stream NntpsStream) stat_by_number(number int) ?string

Gets the information about the article number.