Documentation
¶
Index ¶
- type CommandHandler
- type Handler
- type HandlerFunc
- type HandlerMap
- type Plugin
- func (p *Plugin) CreatePost(post *model.Post) (*model.Post, error)
- func (p *Plugin) ExecuteCommand(_ *mattermostPlugin.Context, commandArgs *model.CommandArgs) (*model.CommandResponse, *model.AppError)
- func (p *Plugin) GetConfiguration() *config.Config
- func (p *Plugin) GetSlashCommand() (*model.Command, error)
- func (p *Plugin) GetUsersInChannel(channelID, sortBy string, page, perPage int) ([]*model.User, error)
- func (p *Plugin) KVDelete(key string) *model.AppError
- func (p *Plugin) KVGet(key string) ([]byte, *model.AppError)
- func (p *Plugin) KVSet(key string, value []byte) *model.AppError
- func (p *Plugin) LogDebug(msg string, keyValuePairs ...interface{})
- func (p *Plugin) LogError(msg string, keyValuePairs ...interface{})
- func (p *Plugin) LogInfo(msg string, keyValuePairs ...interface{})
- func (p *Plugin) LogWarn(msg string, keyValuePairs ...interface{})
- func (p *Plugin) NewHandler(args *model.CommandArgs) Handler
- func (p *Plugin) OnActivate() error
- func (p *Plugin) OnConfigurationChange() error
- func (p *Plugin) PublishWebSocketEvent(event string, payload map[string]interface{}, ...)
- func (p *Plugin) SendEphemeralPost(userID string, post *model.Post) *model.Post
- func (p *Plugin) ServeHTTP(_ *mattermostPlugin.Context, w http.ResponseWriter, req *http.Request)
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
}
command stores command specific information
type HandlerFunc ¶
HandlerFunc command handler function type
type HandlerMap ¶
type HandlerMap struct {
// contains filtered or unexported fields
}
HandlerMap map of command handler functions
type Plugin ¶
type Plugin struct { mattermostPlugin.MattermostPlugin // contains filtered or unexported fields }
func NewWithConfig ¶
NewWithConfig creates new plugin object from configuration
func NewWithSplunk ¶
NewWithSplunk creates new plugin object from splunk
func NewWithStore ¶
NewWithStore creates new plugin object from configuration and store object
func (*Plugin) CreatePost ¶
CreatePost creates a new public post
func (*Plugin) ExecuteCommand ¶
func (p *Plugin) ExecuteCommand(_ *mattermostPlugin.Context, commandArgs *model.CommandArgs) (*model.CommandResponse, *model.AppError)
ExecuteCommand hook is called when slash command is submitted
func (*Plugin) GetConfiguration ¶
GetConfiguration retrieves the active Config under lock, making it safe to use concurrently. The active Config may change underneath the client of this method, but the struct returned by this API call is considered immutable.
func (*Plugin) GetSlashCommand ¶
GetSlashCommand returns command to register
func (*Plugin) GetUsersInChannel ¶
func (p *Plugin) GetUsersInChannel(channelID, sortBy string, page, perPage int) ([]*model.User, error)
GetUsersInChannel gets paginated user list for channel
func (*Plugin) KVDelete ¶
KVDelete removes a key-value pair, unique per plugin. Returns nil for non-existent keys.
func (*Plugin) KVGet ¶
KVGet retrieves a value based on the key, unique per plugin. Returns nil for non-existent keys.
func (*Plugin) NewHandler ¶
func (p *Plugin) NewHandler(args *model.CommandArgs) Handler
NewHandler returns new Handler with given dependencies
func (*Plugin) OnActivate ¶
OnActivate called when plugin is activated
func (*Plugin) OnConfigurationChange ¶
OnConfigurationChange is invoked when Config changes may have been made.
func (*Plugin) PublishWebSocketEvent ¶
func (p *Plugin) PublishWebSocketEvent(event string, payload map[string]interface{}, broadcast *model.WebsocketBroadcast)
PublishWebSocketEvent sends broadcast
func (*Plugin) SendEphemeralPost ¶
SendEphemeralPost responds user request with message
func (*Plugin) ServeHTTP ¶
func (p *Plugin) ServeHTTP(_ *mattermostPlugin.Context, w http.ResponseWriter, req *http.Request)