mirror of
https://github.com/mattermost/mattermost.git
synced 2025-02-25 18:55:24 -06:00
* Adding EnsureBot plugin helper. * Removing unessisary GetBot call. * Moving to own file and error handling cleanup. * Removing patch functionaliy. Plugins should manage their own bot account updates for now. * Adding tests and cleaning up errors. * Modify to not shadow err. * Moving helpers to seperate interface. * Feedback fixes
18 lines
462 B
Go
18 lines
462 B
Go
// Copyright (c) 2015-present Mattermost, Inc. All Rights Reserved.
|
|
// See LICENSE.txt for license information.
|
|
|
|
package plugin
|
|
|
|
import "github.com/mattermost/mattermost-server/model"
|
|
|
|
type Helpers interface {
|
|
// EnsureBot ether returns an existing bot user or creates a bot user with
|
|
// the specifications of the passed bot.
|
|
// Returns the id of the bot created or existing.
|
|
EnsureBot(bot *model.Bot) (string, error)
|
|
}
|
|
|
|
type HelpersImpl struct {
|
|
API API
|
|
}
|