diff options
author | Chris <ccbrown112@gmail.com> | 2017-08-28 14:19:00 -0500 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-08-28 14:19:00 -0500 |
commit | ff50b0e1382ba0214300ffb8eb467a78dae5b803 (patch) | |
tree | 4f11789e8b222a42d9074c46341fff6090b313d2 /plugin/api.go | |
parent | 6215c9159acb85033616d2937edf3d87ef7ca79b (diff) | |
download | chat-ff50b0e1382ba0214300ffb8eb467a78dae5b803.tar.gz chat-ff50b0e1382ba0214300ffb8eb467a78dae5b803.tar.bz2 chat-ff50b0e1382ba0214300ffb8eb467a78dae5b803.zip |
add client4 apis needed for jira plugin (#7292)
Diffstat (limited to 'plugin/api.go')
-rw-r--r-- | plugin/api.go | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/plugin/api.go b/plugin/api.go index c62ae0f55..40a551e32 100644 --- a/plugin/api.go +++ b/plugin/api.go @@ -1,7 +1,23 @@ package plugin +import ( + "github.com/mattermost/platform/model" +) + 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) } |