Documentation
¶
Index ¶
- Variables
- func New() bbs.BBS
- func Setup(name, desc, realtimePath string)
- type Board
- type Boards
- type Catalog
- type Fourchan
- func (f *Fourchan) BoardList(m bbs.ListCommand) (blm bbs.BoardListMessage, err error)
- func (f *Fourchan) Get(m bbs.GetCommand) (tm bbs.ThreadMessage, err error)
- func (f *Fourchan) Hello() bbs.HelloMessage
- func (f *Fourchan) IsLoggedIn() bool
- func (f *Fourchan) List(m bbs.ListCommand) (lm bbs.ListMessage, err error)
- func (f *Fourchan) LogIn(m bbs.LoginCommand) bool
- func (f *Fourchan) LogOut(m bbs.LogoutCommand) bbs.OKMessage
- func (f *Fourchan) Post(m bbs.PostCommand) (pm bbs.OKMessage, err error)
- func (f *Fourchan) Register(m bbs.RegisterCommand) (okm bbs.OKMessage, err error)
- func (f *Fourchan) Reply(m bbs.ReplyCommand) (ok bbs.OKMessage, err error)
- type FourchanPost
- type Page
- type Thread
Constants ¶
This section is empty.
Variables ¶
View Source
var Hello = bbs.HelloMessage{ Command: "hello", Name: "Fourchan relay", ProtocolVersion: 0, Description: "4chan -> BBS Relay", Options: []string{"imageboard", "readonly", "boards"}, Access: bbs.AccessInfo{ GuestCommands: []string{"hello", "get", "list"}, }, Formats: []string{"html", "text"}, Lists: []string{"thread", "board"}, ServerVersion: "4chan-relay 0.1", }
Functions ¶
Types ¶
type Board ¶
type Fourchan ¶
type Fourchan struct {
}
func (*Fourchan) BoardList ¶
func (f *Fourchan) BoardList(m bbs.ListCommand) (blm bbs.BoardListMessage, err error)
func (*Fourchan) Get ¶
func (f *Fourchan) Get(m bbs.GetCommand) (tm bbs.ThreadMessage, err error)
func (*Fourchan) Hello ¶
func (f *Fourchan) Hello() bbs.HelloMessage
func (*Fourchan) IsLoggedIn ¶
func (*Fourchan) List ¶
func (f *Fourchan) List(m bbs.ListCommand) (lm bbs.ListMessage, err error)
type FourchanPost ¶
type FourchanPost struct {
Number int `json:"no"`
ReplyTo int `json:"resto"`
Sticky int `json:"sticky,omitempty"`
Closed int `json:"closed,omitempty"`
Date string `json:"now"`
Timestamp int `json:"time"`
Name string `json:"name,omitempty"` //username
Tripcode string `json:"trip,omitempty"`
ID string `json:"id,omitempty"` //user ID
Capcode string `json:"capcode,omitempty"`
CountryName string `json:"country_name,omitempty"`
Email string `json:"email,omitempty"`
Subject string `json:"sub,omitempty"`
Text string `json:"com,omitempty"` //HTML
FileTime uint64 `json:"tim,omitempty"`
FileExt string `json:"ext,omitempty"`
FileDeleted int `json:"filedeleted,omitempty"`
Spoiler int `json:"spoiler,omitempty"`
OmitedPosts int `json:"omitted_posts,omitempty"`
OmittedImages int `json:"omitted_images,omitempty"`
Replies int `json:"replies,omitempty"`
Images int `json:"images,omitempty"`
}
type Page ¶
type Page struct {
Number int `json:"page"`
Threads []*FourchanPost `json:"threads"`
}
type Thread ¶
type Thread struct {
Posts []*FourchanPost `json:"posts"`
}
Click to show internal directories.
Click to hide internal directories.