Documentation ¶
Index ¶
- Constants
- func AdminSetup(s *LoggingServeMux)
- func GatewaySetup(s *LoggingServeMux)
- func MchSetup(s *LoggingServeMux)
- func PrintTitle(w http.ResponseWriter, r *http.Request)
- func ServerSetup(s *LoggingServeMux, relaynum int)
- func ThreadSetup(s *LoggingServeMux)
- type AdminCGIConfig
- type CGIConfig
- type DeleteRecord
- type GatewayConfig
- type GatewayLink
- type Item
- type ListItem
- type LoggingServeMux
- type MchConfig
- type Menubar
- type RSS
- type ServerConfig
- type ThreadCGIConfig
Constants ¶
const AdminURL = "/admin.cgi"
AdminURL is the url to admin.cgi
const GatewayURL = "/gateway.cgi"
GatewayURL is the url to gateway.cgi
const ServerURL = "/server.cgi"
ServerURL is the url to server.cgi
const ThreadURL = "/thread.cgi"
ThreadURL is the url to thread.cgi
Variables ¶
This section is empty.
Functions ¶
func GatewaySetup ¶
func GatewaySetup(s *LoggingServeMux)
GatewaySetup setups handlers for gateway.cgi
func PrintTitle ¶
func PrintTitle(w http.ResponseWriter, r *http.Request)
PrintTitle renders list of newer thread in the disk for the top page
func ServerSetup ¶
func ServerSetup(s *LoggingServeMux, relaynum int)
ServerSetup setups handlers for server.cgi
Types ¶
type AdminCGIConfig ¶
type AdminCGIConfig struct { AdminSID string NodeManager *node.Manager Htemplate *util.Htemplate UserTag *thread.UserTag SuggestedTagTable *thread.SuggestedTagTable RecentList *thread.RecentList Myself *node.Myself }
AdminCGIConfig is config for AdminCGI struct.
var AdminCfg *AdminCGIConfig
AdminCfg is config for AdminCFG struct. it must be setted before using.
type CGIConfig ¶
type CGIConfig struct { FileDir string Docroot string MaxConnection int ServerName string ReAdminStr string ReFriendStr string ReVisitorStr string Htemplate *util.Htemplate UserTag *thread.UserTag SuggestedTagTable *thread.SuggestedTagTable Version string EnableEmbed bool }
CGIConfig is config for CGI struct.
var CGICfg *CGIConfig
CGICfg is cfg for CGI struct. it must be set before using.
type DeleteRecord ¶
type DeleteRecord struct { Message message AdminCGI string Datfile string Records []*thread.Record Sid string }
DeleteRecord is for renderring confirmation to a delete record.
type GatewayConfig ¶
type GatewayConfig struct { RSSRange int64 Motd string TopRecentRange int64 RunDir string ServerName string Enable2ch bool RecentList *thread.RecentList Ttemplate *util.Ttemplate }
GatewayConfig is config for gatewayCGI struct.
var GatewayCfg *GatewayConfig
GatewayCfg is config for gatewayCGI struct. it must be setted beforehand.
type GatewayLink ¶
type GatewayLink struct { Message message CGIname string Command string Description string // contains filtered or unexported fields }
GatewayLink is a struct for gateway_link.txt
type Item ¶
type Item struct { Title string Link string Description string Creator string Date int64 Content string Subject []string // contains filtered or unexported fields }
Item represents RSS contents.
type ListItem ¶
type ListItem struct { Cache *thread.Cache CacheSize int64 Title string Tags thread.Tagslice Target string Remove bool IsAdmin bool StrOpts string GatewayCGI string ThreadURL string Message message CacheInfo *thread.CacheInfo // contains filtered or unexported fields }
ListItem is for list_item.txt
type LoggingServeMux ¶
LoggingServeMux is ServerMux with logging
func NewLoggingServeMux ¶
func NewLoggingServeMux() *LoggingServeMux
NewLoggingServeMux returns loggingServeMux obj.
func (*LoggingServeMux) RegistCompressHandler ¶
func (s *LoggingServeMux) RegistCompressHandler(path string, fn func(w http.ResponseWriter, r *http.Request))
RegistCompressHandler registers fn to s after registering CompressHandler with path.
func (*LoggingServeMux) RegisterPprof ¶
func (s *LoggingServeMux) RegisterPprof()
RegisterPprof registers pprof relates funcs to s.
func (*LoggingServeMux) ServeHTTP ¶
func (s *LoggingServeMux) ServeHTTP(w http.ResponseWriter, r *http.Request)
ServeHTTP just calles http.ServeMux.ServeHTTP after logging.
type MchConfig ¶
type MchConfig struct { Motd string RecentList *thread.RecentList DatakeyTable *mch.DatakeyTable UpdateQue *thread.UpdateQue }
MchConfig is config for mchCGI struct.
var MchCfg *MchConfig
MchCfg is config for mchCGI struct. mut be setted beforehand.
type Menubar ¶
type Menubar struct { GatewayLink GatewayCGI string Message message ID string RSS string IsAdmin bool IsFriend bool }
Menubar is var set for menubar.txt
type RSS ¶
type RSS struct { Encode string Lang string Title string Link string Description string Feeds []*Item URI string XSL string // contains filtered or unexported fields }
RSS represents RSS info.
type ServerConfig ¶
type ServerConfig struct { RecentRange int64 Motd string NodeManager *node.Manager InitNode *util.ConfList UpdateQue *thread.UpdateQue RecentList *thread.RecentList }
ServerConfig is config for serverCGI struct.
var ServerCfg *ServerConfig
ServerCfg is config for serverCGI struct. must set beforehand.
type ThreadCGIConfig ¶
type ThreadCGIConfig struct { ThreadPageSize int DefaultThumbnailSize string RecordLimit int ForceThumbnail bool Htemplate *util.Htemplate UpdateQue *thread.UpdateQue }
ThreadCGIConfig is config for threadCGI struct.
var ThreadCfg *ThreadCGIConfig
ThreadCfg is config for threadCGI struct. must set beforehand.