Documentation ¶
Index ¶
- type CommandHandler
- type CommandHandlerFunc
- type Config
- type Plugin
- func (p *Plugin) ExecuteCommand(c *plugin.Context, commandArgs *model.CommandArgs) (*model.CommandResponse, *model.AppError)
- func (p *Plugin) GetLinks() []autolink.Autolink
- func (p *Plugin) IsAuthorizedAdmin(userID string) (bool, error)
- func (p *Plugin) MessageWillBePosted(c *plugin.Context, post *model.Post) (*model.Post, string)
- func (p *Plugin) MessageWillBeUpdated(c *plugin.Context, post *model.Post, _ *model.Post) (*model.Post, string)
- func (p *Plugin) OnActivate() error
- func (p *Plugin) OnConfigurationChange() error
- func (p *Plugin) ProcessPost(c *plugin.Context, post *model.Post) (*model.Post, string)
- func (p *Plugin) SaveLinks(links []autolink.Autolink) error
- func (p *Plugin) ServeHTTP(c *plugin.Context, w http.ResponseWriter, r *http.Request)
- func (p *Plugin) UpdateConfig(f func(conf *Config))
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type CommandHandler ¶
type CommandHandler struct {
// contains filtered or unexported fields
}
func (CommandHandler) Handle ¶
func (ch CommandHandler) Handle(p *Plugin, c *plugin.Context, header *model.CommandArgs, args ...string) *model.CommandResponse
type CommandHandlerFunc ¶
type CommandHandlerFunc func(p *Plugin, c *plugin.Context, header *model.CommandArgs, args ...string) *model.CommandResponse
type Config ¶
type Config struct { EnableAdminCommand bool `json:"enableadmincommand"` EnableOnUpdate bool `json:"enableonupdate"` PluginAdmins string `json:"pluginadmins"` Links []autolink.Autolink `json:"links"` // AdminUserIds is a set of UserIds that are permitted to perform // administrative operations on the plugin configuration (i.e. plugin // admins). On each configuration change the contents of PluginAdmins // config field is parsed into this field. AdminUserIds map[string]struct{} `json:"-"` }
Config from config.json
type Plugin ¶
type Plugin struct { plugin.MattermostPlugin // contains filtered or unexported fields }
Plugin the main struct for everything
func (*Plugin) ExecuteCommand ¶
func (p *Plugin) ExecuteCommand(c *plugin.Context, commandArgs *model.CommandArgs) (*model.CommandResponse, *model.AppError)
func (*Plugin) MessageWillBePosted ¶
MessageWillBePosted is invoked when a message is posted by a user before it is committed to the database.
func (*Plugin) MessageWillBeUpdated ¶
func (p *Plugin) MessageWillBeUpdated(c *plugin.Context, post *model.Post, _ *model.Post) (*model.Post, string)
MessageWillBeUpdated is invoked when a message is updated by a user before it is committed to the database.
func (*Plugin) OnActivate ¶
func (*Plugin) OnConfigurationChange ¶
OnConfigurationChange is invoked when configuration changes may have been made.
func (*Plugin) ProcessPost ¶
func (*Plugin) UpdateConfig ¶
Click to show internal directories.
Click to hide internal directories.