Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type API ¶
type API interface {
// LoadPluginConfiguration loads the plugin's configuration. dest should be a pointer to a
// struct that the configuration JSON can be unmarshalled to.
LoadPluginConfiguration(dest interface{}) error
// GetTeamByName gets a team by its name.
GetTeamByName(name string) (*model.Team, *model.AppError)
// GetUserByUsername gets a user by their username.
GetUserByUsername(name string) (*model.User, *model.AppError)
// GetChannelByName gets a channel by its name.
GetChannelByName(name, teamId string) (*model.Channel, *model.AppError)
// CreatePost creates a post.
CreatePost(post *model.Post) (*model.Post, *model.AppError)
}
type Hooks ¶
type Hooks interface {
// OnActivate is invoked when the plugin is activated.
OnActivate(API) error
// OnDeactivate is invoked when the plugin is deactivated. This is the plugin's last chance to
// use the API, and the plugin will be terminated shortly after this invocation.
OnDeactivate() error
// ServeHTTP allows the plugin to implement the http.Handler interface. Requests destined for
// the /plugins/{id} path will be routed to the plugin.
//
// The Mattermost-User-Id header will be present if (and only if) the request is by an
// authenticated user.
ServeHTTP(http.ResponseWriter, *http.Request)
}
type Supervisor ¶
Supervisor provides the interface for an object that controls the execution of a plugin.
Directories
¶
| Path | Synopsis |
|---|---|
|
Package pluginenv provides high level functionality for discovering and launching plugins.
|
Package pluginenv provides high level functionality for discovering and launching plugins. |
Click to show internal directories.
Click to hide internal directories.