add client4 apis needed for jira plugin (#7292)

Этот коммит содержится в:
Chris
2017-08-28 14:19:00 -05:00
коммит произвёл GitHub
родитель 6215c9159a
Коммит ff50b0e138
5 изменённых файлов: 212 добавлений и 5 удалений

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

@@ -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)
}