Documentation ¶
Index ¶
- Constants
- Variables
- func BaseEditHandler(inner web.ControllerHandlerFunc) web.ControllerHandlerFunc
- func KeyLastTweetID(id string) string
- func KeyLastTweetTime(id string) string
- func RegisterPlugin()
- type ContextKey
- type EditForm
- type Form
- type Plugin
- func (p *Plugin) DisableFeed(elem *mqueue.QueuedElement, err error)
- func (p *Plugin) HandleEdit(w http.ResponseWriter, r *http.Request) (templateData web.TemplateData, err error)
- func (p *Plugin) HandleNew(w http.ResponseWriter, r *http.Request) (web.TemplateData, error)
- func (p *Plugin) HandleRemove(w http.ResponseWriter, r *http.Request) (templateData web.TemplateData, err error)
- func (p *Plugin) HandleTwitter(w http.ResponseWriter, r *http.Request) (web.TemplateData, error)
- func (p *Plugin) InitWeb()
- func (p *Plugin) LoadServerHomeWidget(w http.ResponseWriter, r *http.Request) (web.TemplateData, error)
- func (p *Plugin) OnRemovedPremiumGuild(guildID int64) error
- func (p *Plugin) PluginInfo() *common.PluginInfo
- func (p *Plugin) StartFeed()
- func (p *Plugin) Status() (string, string)
- func (p *Plugin) StopFeed(wg *sync.WaitGroup)
- func (p *Plugin) WebhookAvatar() string
Constants ¶
View Source
const TwitterIcon = `` /* 2546-byte string literal not displayed */
Variables ¶
View Source
var DBSchemas = []string{`
CREATE TABLE IF NOT EXISTS twitter_feeds (
id BIGSERIAL PRIMARY KEY,
guild_id BIGINT NOT NULL,
created_at TIMESTAMP WITH TIME ZONE NOT NULL,
twitter_username TEXT NOT NULL,
twitter_user_id BIGINT NOT NULL,
channel_id BIGINT NOT NULL,
enabled BOOLEAN NOT NULL
);
`, `
CREATE INDEX IF NOT EXISTS twitter_user_id_idx ON twitter_feeds(twitter_user_id);
`, `
ALTER TABLE twitter_feeds ADD COLUMN IF NOT EXISTS include_replies BOOLEAN NOT NULL DEFAULT false;
`, `
ALTER TABLE twitter_feeds ADD COLUMN IF NOT EXISTS include_rt BOOLEAN NOT NULL DEFAULT true;
`,
}
View Source
var PageHTML string
Functions ¶
func BaseEditHandler ¶
func BaseEditHandler(inner web.ControllerHandlerFunc) web.ControllerHandlerFunc
func KeyLastTweetID ¶ added in v2.20.1
func KeyLastTweetTime ¶ added in v2.20.1
func RegisterPlugin ¶
func RegisterPlugin()
Types ¶
type Plugin ¶
func (*Plugin) DisableFeed ¶
func (p *Plugin) DisableFeed(elem *mqueue.QueuedElement, err error)
func (*Plugin) HandleEdit ¶
func (p *Plugin) HandleEdit(w http.ResponseWriter, r *http.Request) (templateData web.TemplateData, err error)
func (*Plugin) HandleNew ¶
func (p *Plugin) HandleNew(w http.ResponseWriter, r *http.Request) (web.TemplateData, error)
func (*Plugin) HandleRemove ¶
func (p *Plugin) HandleRemove(w http.ResponseWriter, r *http.Request) (templateData web.TemplateData, err error)
func (*Plugin) HandleTwitter ¶
func (p *Plugin) HandleTwitter(w http.ResponseWriter, r *http.Request) (web.TemplateData, error)
func (*Plugin) LoadServerHomeWidget ¶
func (p *Plugin) LoadServerHomeWidget(w http.ResponseWriter, r *http.Request) (web.TemplateData, error)
func (*Plugin) OnRemovedPremiumGuild ¶ added in v2.17.0
func (*Plugin) PluginInfo ¶
func (p *Plugin) PluginInfo() *common.PluginInfo
func (*Plugin) WebhookAvatar ¶
Click to show internal directories.
Click to hide internal directories.