Archived
1
0
This repository has been archived on 2023-08-12. You can view files and clone it, but cannot push or open issues or pull requests.
nntpchan/contrib/backends/srndv2/src/srnd/frontend.go

43 lines
746 B
Go
Raw Normal View History

//
// frontend.go
// srnd frontend interfaces
//
//
package srnd
const BumpLimit = 300
// ( message-id, references, newsgroup )
type frontendPost [3]string
func (p frontendPost) MessageID() string {
return p[0]
}
func (p frontendPost) Reference() string {
return p[1]
}
func (p frontendPost) Newsgroup() string {
return p[2]
}
// frontend interface for any type of frontend
type Frontend interface {
2017-09-26 18:50:14 +05:00
// handle new post from nntpd
HandleNewPost(p frontendPost)
// run mainloop
Mainloop()
// do we want posts from a newsgroup?
AllowNewsgroup(group string) bool
// trigger a manual regen of indexes for a root post
Regen(msg ArticleEntry)
2017-09-26 18:50:14 +05:00
2017-04-04 16:48:45 +05:00
// regenerate on mod event
RegenOnModEvent(newsgroup, msgid, root string, page int)
}