Этот коммит содержится в:
Chris
2017-08-28 11:27:18 -05:00
коммит произвёл GitHub
родитель 510b1a18f5
Коммит 6215c9159a
10 изменённых файлов: 404 добавлений и 31 удалений

Просмотреть файл

@@ -1,5 +1,9 @@
package plugin
import (
"net/http"
)
type Hooks interface {
// OnActivate is invoked when the plugin is activated.
OnActivate(API) error
@@ -7,4 +11,11 @@ type Hooks interface {
// 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)
}