nntp

package module
v0.0.0-...-af2aeec Latest Latest
Warning

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

Go to latest
Published: Sep 10, 2022 License: MIT Imports: 3 Imported by: 0

README

go nntp

I needed a way to gate some web services into traditional readers. I wrote an NNTP client and server.

I'm still working on coming up with the exact right interfaces, but take a look at the couchserver example to see what it takes to build a custom NNTP server with your own backend.

Documentation

Overview

Package nntp provides base NNTP definitions.

Index

Constants

View Source
const (
	Unknown             = PostingStatus(0)
	PostingPermitted    = PostingStatus('y')
	PostingNotPermitted = PostingStatus('n')
	PostingModerated    = PostingStatus('m')
)

PostingStatus values.

Variables

This section is empty.

Functions

This section is empty.

Types

type Article

type Article struct {
	// The article's headers
	Header textproto.MIMEHeader
	// The article's body
	Body io.Reader
	// Number of bytes in the article body (used by OVER/XOVER)
	Bytes int
	// Number of lines in the article body (used by OVER/XOVER)
	Lines int
}

An Article that may appear in one or more groups.

func (*Article) MessageID

func (a *Article) MessageID() string

MessageID provides convenient access to the article's Message ID.

type Group

type Group struct {
	Name        string
	Description string
	Count       int64
	High        int64
	Low         int64
	Posting     PostingStatus
}

Group represents a usenet newsgroup.

type PostingStatus

type PostingStatus byte

PostingStatus type for groups.

func (PostingStatus) String

func (ps PostingStatus) String() string

Directories

Path Synopsis
Package nntpclient provides an NNTP Client.
Package nntpclient provides an NNTP Client.
examples
Package nntpserver provides everything you need for your own NNTP server.
Package nntpserver provides everything you need for your own NNTP server.

Jump to

Keyboard shortcuts

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