summaryrefslogtreecommitdiffstats
path: root/app/plugin/api.go
diff options
context:
space:
mode:
authorChristopher Speller <crspeller@gmail.com>2018-06-25 12:33:13 -0700
committerGitHub <noreply@github.com>2018-06-25 12:33:13 -0700
commit1e5c432e1029601a664454388ae366ef69618d62 (patch)
treecb9e8bfb66640ac3b29c934bb2c3202d25aeb368 /app/plugin/api.go
parentecefa6cdd1e7376046bbec82c1b47f7756fea646 (diff)
downloadchat-1e5c432e1029601a664454388ae366ef69618d62.tar.gz
chat-1e5c432e1029601a664454388ae366ef69618d62.tar.bz2
chat-1e5c432e1029601a664454388ae366ef69618d62.zip
MM-10702 Moving plugins to use hashicorp go-plugin. (#8978)
* Moving plugins to use hashicorp go-plugin. * Tweaks from feedback.
Diffstat (limited to 'app/plugin/api.go')
-rw-r--r--app/plugin/api.go45
1 files changed, 0 insertions, 45 deletions
diff --git a/app/plugin/api.go b/app/plugin/api.go
deleted file mode 100644
index accff9582..000000000
--- a/app/plugin/api.go
+++ /dev/null
@@ -1,45 +0,0 @@
-// Copyright (c) 2017-present Mattermost, Inc. All Rights Reserved.
-// See License.txt for license information.
-
-package plugin
-
-import (
- "net/http"
-
- "github.com/gorilla/mux"
- "github.com/mattermost/mattermost-server/model"
-)
-
-type API interface {
- // Loads the plugin's configuration
- LoadPluginConfiguration(dest interface{}) error
-
- // The plugin's router
- PluginRouter() *mux.Router
-
- // Gets a team by its name
- GetTeamByName(name string) (*model.Team, *model.AppError)
-
- // Gets a user by its name
- GetUserByName(name string) (*model.User, *model.AppError)
-
- // Gets a channel by its name
- GetChannelByName(teamId, name string) (*model.Channel, *model.AppError)
-
- // Gets a direct message channel
- GetDirectChannel(userId1, userId2 string) (*model.Channel, *model.AppError)
-
- // Creates a post
- CreatePost(post *model.Post) (*model.Post, *model.AppError)
-
- // Get LDAP attributes for a user
- GetLdapUserAttributes(userId string, attributes []string) (map[string]string, *model.AppError)
-
- // Temporary for built-in plugins, copied from api4/context.go ServeHTTP function.
- // If a request has a valid token for an active session, the session is returned otherwise
- // it errors.
- GetSessionFromRequest(r *http.Request) (*model.Session, *model.AppError)
-
- // Returns a localized string. If a request is given, its headers will be used to pick a locale.
- I18n(id string, r *http.Request) string
-}