Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type InterestLevel ¶
type InterestLevel int
const ( // Used for specific message patterns which determine interest. StronglyInteresting InterestLevel = iota // Used for specific message patterns which determine disinterest. StronglyUninteresting // Interest determined via a heuristic WeaklyInteresting // Disinterest determined via a heuristic WeaklyUninteresting UnknownInterest )
When combining different plugins' interest categorization, we will use these rules (with order preference): 1. any( strongly interesting ) -> stronly interesting 2. not 1. and any( stronly uninteresting ) -> stronly uninteresting 3. not the above and any( weakly interesting ) -> weakly intereting 4. Not the above and any( weakly uninteresting ) -> weakly uninteresting 5. all no opinion -> no opinion
func (InterestLevel) Combine ¶
func (i1 InterestLevel) Combine(i2 InterestLevel) InterestLevel
func (InterestLevel) InverseCombine ¶
func (i1 InterestLevel) InverseCombine(i2 InterestLevel) InterestLevel
Favours the most uncertain answer
type MessageFilter ¶
type Plugin ¶
type Plugin struct { Name string MessageInterest func(*gm.Message, *api.MsgHelper) InterestLevel DetailRequiredForInterest func() api.MessageDetailLevel // int64 is maxMsgs and will be -1 for unlimited OutdatedMessages func(string, *api.MsgHelper, int64) []*gm.Message PrintMessageSummary func([]*gm.Message, *api.MsgHelper) MessageFilters map[string]*MessageFilter }
func LoadPlugins ¶
func LoadPlugins() []*Plugin
type PluginBuilder ¶
type PluginBuilder func() *Plugin
Click to show internal directories.
Click to hide internal directories.