diff options
author | JoramWilander <jwawilander@gmail.com> | 2018-07-10 15:01:43 -0400 |
---|---|---|
committer | JoramWilander <jwawilander@gmail.com> | 2018-07-10 15:01:43 -0400 |
commit | 6c7dc2d29ccac5f9925402f6be1a4c2a3c46c005 (patch) | |
tree | 5564a47257bf6e85aaef711980c5b0fcb4d07dcc /app/plugin/api.go | |
parent | c042ffa460296587579aff54b157a5109e022f7e (diff) | |
parent | 1e1a5e5e85240f25c4faddcb24c5a29a915fe6e4 (diff) | |
download | chat-6c7dc2d29ccac5f9925402f6be1a4c2a3c46c005.tar.gz chat-6c7dc2d29ccac5f9925402f6be1a4c2a3c46c005.tar.bz2 chat-6c7dc2d29ccac5f9925402f6be1a4c2a3c46c005.zip |
Merge branch 'plugins-2'
Diffstat (limited to 'app/plugin/api.go')
-rw-r--r-- | app/plugin/api.go | 45 |
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 -} |