{"modulePath":"github.com/nmintoh/dserver","version":"v5.11.1+incompatible","isLatest":true,"isStandardLibrary":false,"goos":"all","goarch":"all","docs":"# package plugin\n\nThe plugin package is used by Mattermost server plugins written in go. It also enables the Mattermost server to manage and interact with the running plugin environment.\n\nNote that this package exports a large number of types prefixed with Z\\_. These are public only to allow their use with Hashicorp's go-plugin (and net/rpc). Do not use these directly.\n\n## Constants\n\n```go\nconst (\n\tOnActivateId            = 0\n\tOnDeactivateId          = 1\n\tServeHTTPId             = 2\n\tOnConfigurationChangeId = 3\n\tExecuteCommandId        = 4\n\tMessageWillBePostedId   = 5\n\tMessageWillBeUpdatedId  = 6\n\tMessageHasBeenPostedId  = 7\n\tMessageHasBeenUpdatedId = 8\n\tUserHasJoinedChannelId  = 9\n\tUserHasLeftChannelId    = 10\n\tUserHasJoinedTeamId     = 11\n\tUserHasLeftTeamId       = 12\n\tChannelHasBeenCreatedId = 13\n\tFileWillBeUploadedId    = 14\n\tUserWillLogInId         = 15\n\tUserHasLoggedInId       = 16\n\tUserHasBeenCreatedId    = 17\n\tTotalHooksId            = iota\n)\n```\nThese assignments are part of the wire protocol used to trigger hook events in plugins.\n\nFeel free to add more, but do not change existing assignments. Follow the naming convention of \\\u003cHookName\u003eId as the autogenerated glue code depends on that.\n\n```go\nconst (\n\tMinIdLength  = 3\n\tMaxIdLength  = 190\n\tValidIdRegex = `^[a-zA-Z0-9-_\\.]+$`\n)\n```\n\n## Functions\n\n```go\nfunc ClientMain(pluginImplementation interface{})\n```\nStarts the serving of a Mattermost plugin over net/rpc. gRPC is not yet supported.\n\nCall this when your plugin is ready to start.\n\n```go\nfunc IsValidId(id string) bool\n```\nIsValidId verifies that the plugin id has a minimum length of 3, maximum length of 190, and contains only alphanumeric characters, dashes, underscores and periods.\n\nThese constraints are necessary since the plugin id is used as part of a filesystem path.\n\n## Types\n\n```go\ntype API interface {\n\t// LoadPluginConfiguration loads the plugin's configuration. dest should be a pointer to a\n\t// struct that the configuration JSON can be unmarshalled to.\n\tLoadPluginConfiguration(dest interface{}) error\n\n\t// RegisterCommand registers a custom slash command. When the command is triggered, your plugin\n\t// can fulfill it via the ExecuteCommand hook.\n\tRegisterCommand(command *model.Command) error\n\n\t// UnregisterCommand unregisters a command previously registered via RegisterCommand.\n\tUnregisterCommand(teamId, trigger string) error\n\n\t// GetSession returns the session object for the Session ID\n\tGetSession(sessionId string) (*model.Session, *model.AppError)\n\n\t// GetConfig fetches the currently persisted config\n\tGetConfig() *model.Config\n\n\t// SaveConfig sets the given config and persists the changes\n\tSaveConfig(config *model.Config) *model.AppError\n\n\t// GetPluginConfig fetches the currently persisted config of plugin\n\t//\n\t// Minimum server version: 5.6\n\tGetPluginConfig() map[string]interface{}\n\n\t// SavePluginConfig sets the given config for plugin and persists the changes\n\t//\n\t// Minimum server version: 5.6\n\tSavePluginConfig(config map[string]interface{}) *model.AppError\n\n\t// GetBundlePath returns the absolute path where the plugin's bundle was unpacked.\n\t//\n\t// Minimum server version: 5.10\n\tGetBundlePath() (string, error)\n\n\t// GetLicense returns the current license used by the Mattermost server. Returns nil if the\n\t// the server does not have a license.\n\t//\n\t// Minimum server version: 5.10\n\tGetLicense() *model.License\n\n\t// GetServerVersion return the current Mattermost server version\n\t//\n\t// Minimum server version: 5.4\n\tGetServerVersion() string\n\n\t// GetSystemInstallDate returns the time that Mattermost was first installed and ran.\n\t//\n\t// Minimum server version: 5.10\n\tGetSystemInstallDate() (int64, *model.AppError)\n\n\t// GetDiagnosticId returns a unique identifier used by the server for diagnostic reports.\n\t//\n\t// Minimum server version: 5.10\n\tGetDiagnosticId() string\n\n\t// CreateUser creates a user.\n\tCreateUser(user *model.User) (*model.User, *model.AppError)\n\n\t// DeleteUser deletes a user.\n\tDeleteUser(userId string) *model.AppError\n\n\t// GetUsers a list of users based on search options.\n\t//\n\t// Minimum server version: 5.10\n\tGetUsers(options *model.UserGetOptions) ([]*model.User, *model.AppError)\n\n\t// GetUser gets a user.\n\tGetUser(userId string) (*model.User, *model.AppError)\n\n\t// GetUserByEmail gets a user by their email address.\n\tGetUserByEmail(email string) (*model.User, *model.AppError)\n\n\t// GetUserByUsername gets a user by their username.\n\tGetUserByUsername(name string) (*model.User, *model.AppError)\n\n\t// GetUsersByUsernames gets users by their usernames.\n\t//\n\t// Minimum server version: 5.6\n\tGetUsersByUsernames(usernames []string) ([]*model.User, *model.AppError)\n\n\t// GetUsersInTeam gets users in team.\n\t//\n\t// Minimum server version: 5.6\n\tGetUsersInTeam(teamId string, page int, perPage int) ([]*model.User, *model.AppError)\n\n\t// GetTeamIcon gets the team icon.\n\t//\n\t// Minimum server version: 5.6\n\tGetTeamIcon(teamId string) ([]byte, *model.AppError)\n\n\t// SetTeamIcon sets the team icon.\n\t//\n\t// Minimum server version: 5.6\n\tSetTeamIcon(teamId string, data []byte) *model.AppError\n\n\t// RemoveTeamIcon removes the team icon.\n\t//\n\t// Minimum server version: 5.6\n\tRemoveTeamIcon(teamId string) *model.AppError\n\n\t// UpdateUser updates a user.\n\tUpdateUser(user *model.User) (*model.User, *model.AppError)\n\n\t// GetUserStatus will get a user's status.\n\tGetUserStatus(userId string) (*model.Status, *model.AppError)\n\n\t// GetUserStatusesByIds will return a list of user statuses based on the provided slice of user IDs.\n\tGetUserStatusesByIds(userIds []string) ([]*model.Status, *model.AppError)\n\n\t// UpdateUserStatus will set a user's status until the user, or another integration/plugin, sets it back to online.\n\t// The status parameter can be: \"online\", \"away\", \"dnd\", or \"offline\".\n\tUpdateUserStatus(userId, status string) (*model.Status, *model.AppError)\n\n\t// UpdateUserActive deactivates or reactivates an user.\n\t//\n\t// Minimum server version: 5.8\n\tUpdateUserActive(userId string, active bool) *model.AppError\n\n\t// GetUsersInChannel returns a page of users in a channel. Page counting starts at 0.\n\t// The sortBy parameter can be: \"username\" or \"status\".\n\t//\n\t// Minimum server version: 5.6\n\tGetUsersInChannel(channelId, sortBy string, page, perPage int) ([]*model.User, *model.AppError)\n\n\t// GetLDAPUserAttributes will return LDAP attributes for a user.\n\t// The attributes parameter should be a list of attributes to pull.\n\t// Returns a map with attribute names as keys and the user's attributes as values.\n\t// Requires an enterprise license, LDAP to be configured and for the user to use LDAP as an authentication method.\n\t//\n\t// Minimum server version: 5.3\n\tGetLDAPUserAttributes(userId string, attributes []string) (map[string]string, *model.AppError)\n\n\t// CreateTeam creates a team.\n\tCreateTeam(team *model.Team) (*model.Team, *model.AppError)\n\n\t// DeleteTeam deletes a team.\n\tDeleteTeam(teamId string) *model.AppError\n\n\t// GetTeam gets all teams.\n\tGetTeams() ([]*model.Team, *model.AppError)\n\n\t// GetTeam gets a team.\n\tGetTeam(teamId string) (*model.Team, *model.AppError)\n\n\t// GetTeamByName gets a team by its name.\n\tGetTeamByName(name string) (*model.Team, *model.AppError)\n\n\t// GetTeamsUnreadForUser gets the unread message and mention counts for each team to which the given user belongs.\n\t//\n\t// Minimum server version: 5.6\n\tGetTeamsUnreadForUser(userId string) ([]*model.TeamUnread, *model.AppError)\n\n\t// UpdateTeam updates a team.\n\tUpdateTeam(team *model.Team) (*model.Team, *model.AppError)\n\n\t// SearchTeams search a team.\n\t//\n\t// Minimum server version: 5.8\n\tSearchTeams(term string) ([]*model.Team, *model.AppError)\n\n\t// GetTeamsForUser returns list of teams of given user ID.\n\t//\n\t// Minimum server version: 5.6\n\tGetTeamsForUser(userId string) ([]*model.Team, *model.AppError)\n\n\t// CreateTeamMember creates a team membership.\n\tCreateTeamMember(teamId, userId string) (*model.TeamMember, *model.AppError)\n\n\t// CreateTeamMember creates a team membership for all provided user ids.\n\tCreateTeamMembers(teamId string, userIds []string, requestorId string) ([]*model.TeamMember, *model.AppError)\n\n\t// DeleteTeamMember deletes a team membership.\n\tDeleteTeamMember(teamId, userId, requestorId string) *model.AppError\n\n\t// GetTeamMembers returns the memberships of a specific team.\n\tGetTeamMembers(teamId string, page, perPage int) ([]*model.TeamMember, *model.AppError)\n\n\t// GetTeamMember returns a specific membership.\n\tGetTeamMember(teamId, userId string) (*model.TeamMember, *model.AppError)\n\n\t// GetTeamMembersForUser returns all team memberships for a user.\n\t//\n\t// Minimum server version: 5.10\n\tGetTeamMembersForUser(userId string, page int, perPage int) ([]*model.TeamMember, *model.AppError)\n\n\t// UpdateTeamMemberRoles updates the role for a team membership.\n\tUpdateTeamMemberRoles(teamId, userId, newRoles string) (*model.TeamMember, *model.AppError)\n\n\t// CreateChannel creates a channel.\n\tCreateChannel(channel *model.Channel) (*model.Channel, *model.AppError)\n\n\t// DeleteChannel deletes a channel.\n\tDeleteChannel(channelId string) *model.AppError\n\n\t// GetPublicChannelsForTeam gets a list of all channels.\n\tGetPublicChannelsForTeam(teamId string, page, perPage int) ([]*model.Channel, *model.AppError)\n\n\t// GetChannel gets a channel.\n\tGetChannel(channelId string) (*model.Channel, *model.AppError)\n\n\t// GetChannelByName gets a channel by its name, given a team id.\n\tGetChannelByName(teamId, name string, includeDeleted bool) (*model.Channel, *model.AppError)\n\n\t// GetChannelByNameForTeamName gets a channel by its name, given a team name.\n\tGetChannelByNameForTeamName(teamName, channelName string, includeDeleted bool) (*model.Channel, *model.AppError)\n\n\t// GetChannelsForTeamForUser gets a list of channels for given user ID in given team ID.\n\t//\n\t// Minimum server version: 5.6\n\tGetChannelsForTeamForUser(teamId, userId string, includeDeleted bool) ([]*model.Channel, *model.AppError)\n\n\t// GetChannelStats gets statistics for a channel.\n\t//\n\t// Minimum server version: 5.6\n\tGetChannelStats(channelId string) (*model.ChannelStats, *model.AppError)\n\n\t// GetDirectChannel gets a direct message channel.\n\t// If the channel does not exist it will create it.\n\tGetDirectChannel(userId1, userId2 string) (*model.Channel, *model.AppError)\n\n\t// GetGroupChannel gets a group message channel.\n\t// If the channel does not exist it will create it.\n\tGetGroupChannel(userIds []string) (*model.Channel, *model.AppError)\n\n\t// UpdateChannel updates a channel.\n\tUpdateChannel(channel *model.Channel) (*model.Channel, *model.AppError)\n\n\t// SearchChannels returns the channels on a team matching the provided search term.\n\t//\n\t// Minimum server version: 5.6\n\tSearchChannels(teamId string, term string) ([]*model.Channel, *model.AppError)\n\n\t// SearchUsers returns a list of users based on some search criteria.\n\t//\n\t// Minimum server version: 5.6\n\tSearchUsers(search *model.UserSearch) ([]*model.User, *model.AppError)\n\n\t// SearchPostsInTeam returns a list of posts in a specific team that match the given params.\n\t//\n\t// Minimum server version: 5.10\n\tSearchPostsInTeam(teamId string, paramsList []*model.SearchParams) ([]*model.Post, *model.AppError)\n\n\t// AddChannelMember creates a channel membership for a user.\n\tAddChannelMember(channelId, userId string) (*model.ChannelMember, *model.AppError)\n\n\t// GetChannelMember gets a channel membership for a user.\n\tGetChannelMember(channelId, userId string) (*model.ChannelMember, *model.AppError)\n\n\t// GetChannelMembers gets a channel membership for all users.\n\t//\n\t// Minimum server version: 5.6\n\tGetChannelMembers(channelId string, page, perPage int) (*model.ChannelMembers, *model.AppError)\n\n\t// GetChannelMembersByIds gets a channel membership for a particular User\n\t//\n\t// Minimum server version: 5.6\n\tGetChannelMembersByIds(channelId string, userIds []string) (*model.ChannelMembers, *model.AppError)\n\n\t// GetChannelMembersForUser returns all channel memberships on a team for a user.\n\t//\n\t// Minimum server version: 5.10\n\tGetChannelMembersForUser(teamId, userId string, page, perPage int) ([]*model.ChannelMember, *model.AppError)\n\n\t// UpdateChannelMemberRoles updates a user's roles for a channel.\n\tUpdateChannelMemberRoles(channelId, userId, newRoles string) (*model.ChannelMember, *model.AppError)\n\n\t// UpdateChannelMemberNotifications updates a user's notification properties for a channel.\n\tUpdateChannelMemberNotifications(channelId, userId string, notifications map[string]string) (*model.ChannelMember, *model.AppError)\n\n\t// DeleteChannelMember deletes a channel membership for a user.\n\tDeleteChannelMember(channelId, userId string) *model.AppError\n\n\t// CreatePost creates a post.\n\tCreatePost(post *model.Post) (*model.Post, *model.AppError)\n\n\t// AddReaction add a reaction to a post.\n\t//\n\t// Minimum server version: 5.3\n\tAddReaction(reaction *model.Reaction) (*model.Reaction, *model.AppError)\n\n\t// RemoveReaction remove a reaction from a post.\n\t//\n\t// Minimum server version: 5.3\n\tRemoveReaction(reaction *model.Reaction) *model.AppError\n\n\t// GetReaction get the reactions of a post.\n\t//\n\t// Minimum server version: 5.3\n\tGetReactions(postId string) ([]*model.Reaction, *model.AppError)\n\n\t// SendEphemeralPost creates an ephemeral post.\n\tSendEphemeralPost(userId string, post *model.Post) *model.Post\n\n\t// UpdateEphemeralPost updates an ephemeral message previously sent to the user.\n\t// EXPERIMENTAL: This API is experimental and can be changed without advance notice.\n\tUpdateEphemeralPost(userId string, post *model.Post) *model.Post\n\n\t// DeleteEphemeralPost deletes an ephemeral message previously sent to the user.\n\t// EXPERIMENTAL: This API is experimental and can be changed without advance notice.\n\tDeleteEphemeralPost(userId string, post *model.Post)\n\n\t// DeletePost deletes a post.\n\tDeletePost(postId string) *model.AppError\n\n\t// GetPostThread gets a post with all the other posts in the same thread.\n\t//\n\t// Minimum server version: 5.6\n\tGetPostThread(postId string) (*model.PostList, *model.AppError)\n\n\t// GetPost gets a post.\n\tGetPost(postId string) (*model.Post, *model.AppError)\n\n\t// GetPostsSince gets posts created after a specified time as Unix time in milliseconds.\n\t//\n\t// Minimum server version: 5.6\n\tGetPostsSince(channelId string, time int64) (*model.PostList, *model.AppError)\n\n\t// GetPostsAfter gets a page of posts that were posted after the post provided.\n\t//\n\t// Minimum server version: 5.6\n\tGetPostsAfter(channelId, postId string, page, perPage int) (*model.PostList, *model.AppError)\n\n\t// GetPostsBefore gets a page of posts that were posted before the post provided.\n\t//\n\t// Minimum server version: 5.6\n\tGetPostsBefore(channelId, postId string, page, perPage int) (*model.PostList, *model.AppError)\n\n\t// GetPostsForChannel gets a list of posts for a channel.\n\t//\n\t// Minimum server version: 5.6\n\tGetPostsForChannel(channelId string, page, perPage int) (*model.PostList, *model.AppError)\n\n\t// GetTeamStats gets a team's statistics\n\t//\n\t// Minimum server version: 5.8\n\tGetTeamStats(teamId string) (*model.TeamStats, *model.AppError)\n\n\t// UpdatePost updates a post.\n\tUpdatePost(post *model.Post) (*model.Post, *model.AppError)\n\n\t// GetProfileImage gets user's profile image.\n\t//\n\t// Minimum server version: 5.6\n\tGetProfileImage(userId string) ([]byte, *model.AppError)\n\n\t// SetProfileImage sets a user's profile image.\n\t//\n\t// Minimum server version: 5.6\n\tSetProfileImage(userId string, data []byte) *model.AppError\n\n\t// GetEmojiList returns a page of custom emoji on the system.\n\t//\n\t// The sortBy parameter can be: \"name\".\n\t//\n\t// Minimum server version: 5.6\n\tGetEmojiList(sortBy string, page, perPage int) ([]*model.Emoji, *model.AppError)\n\n\t// GetEmojiByName gets an emoji by it's name.\n\t//\n\t// Minimum server version: 5.6\n\tGetEmojiByName(name string) (*model.Emoji, *model.AppError)\n\n\t// GetEmoji returns a custom emoji based on the emojiId string.\n\t//\n\t// Minimum server version: 5.6\n\tGetEmoji(emojiId string) (*model.Emoji, *model.AppError)\n\n\t// CopyFileInfos duplicates the FileInfo objects referenced by the given file ids,\n\t// recording the given user id as the new creator and returning the new set of file ids.\n\t//\n\t// The duplicate FileInfo objects are not initially linked to a post, but may now be passed\n\t// to CreatePost. Use this API to duplicate a post and its file attachments without\n\t// actually duplicating the uploaded files.\n\tCopyFileInfos(userId string, fileIds []string) ([]string, *model.AppError)\n\n\t// GetFileInfo gets a File Info for a specific fileId\n\t//\n\t// Minimum server version: 5.3\n\tGetFileInfo(fileId string) (*model.FileInfo, *model.AppError)\n\n\t// GetFile gets content of a file by it's ID\n\t//\n\t// Minimum Server version: 5.8\n\tGetFile(fileId string) ([]byte, *model.AppError)\n\n\t// GetFileLink gets the public link to a file by fileId.\n\t//\n\t// Minimum server version: 5.6\n\tGetFileLink(fileId string) (string, *model.AppError)\n\n\t// ReadFileAtPath reads the file from the backend for a specific path\n\t//\n\t// Minimum server version: 5.3\n\tReadFile(path string) ([]byte, *model.AppError)\n\n\t// GetEmojiImage returns the emoji image.\n\t//\n\t// Minimum server version: 5.6\n\tGetEmojiImage(emojiId string) ([]byte, string, *model.AppError)\n\n\t// UploadFile will upload a file to a channel using a multipart request, to be later attached to a post.\n\t//\n\t// Minimum server version: 5.6\n\tUploadFile(data []byte, channelId string, filename string) (*model.FileInfo, *model.AppError)\n\n\t// OpenInteractiveDialog will open an interactive dialog on a user's client that\n\t// generated the trigger ID. Used with interactive message buttons, menus\n\t// and slash commands.\n\t//\n\t// Minimum server version: 5.6\n\tOpenInteractiveDialog(dialog model.OpenDialogRequest) *model.AppError\n\n\t// GetPlugins will return a list of plugin manifests for currently active plugins.\n\t//\n\t// Minimum server version: 5.6\n\tGetPlugins() ([]*model.Manifest, *model.AppError)\n\n\t// EnablePlugin will enable an plugin installed.\n\t//\n\t// Minimum server version: 5.6\n\tEnablePlugin(id string) *model.AppError\n\n\t// DisablePlugin will disable an enabled plugin.\n\t//\n\t// Minimum server version: 5.6\n\tDisablePlugin(id string) *model.AppError\n\n\t// RemovePlugin will disable and delete a plugin.\n\t//\n\t// Minimum server version: 5.6\n\tRemovePlugin(id string) *model.AppError\n\n\t// GetPluginStatus will return the status of a plugin.\n\t//\n\t// Minimum server version: 5.6\n\tGetPluginStatus(id string) (*model.PluginStatus, *model.AppError)\n\n\t// KVSet will store a key-value pair, unique per plugin.\n\tKVSet(key string, value []byte) *model.AppError\n\n\t// KVSet will store a key-value pair, unique per plugin with an expiry time\n\t//\n\t// Minimum server version: 5.6\n\tKVSetWithExpiry(key string, value []byte, expireInSeconds int64) *model.AppError\n\n\t// KVGet will retrieve a value based on the key. Returns nil for non-existent keys.\n\tKVGet(key string) ([]byte, *model.AppError)\n\n\t// KVDelete will remove a key-value pair. Returns nil for non-existent keys.\n\tKVDelete(key string) *model.AppError\n\n\t// KVDeleteAll will remove all key-value pairs for a plugin.\n\t//\n\t// Minimum server version: 5.6\n\tKVDeleteAll() *model.AppError\n\n\t// KVList will list all keys for a plugin.\n\t//\n\t// Minimum server version: 5.6\n\tKVList(page, perPage int) ([]string, *model.AppError)\n\n\t// PublishWebSocketEvent sends an event to WebSocket connections.\n\t// event is the type and will be prepended with \"custom_\u003cpluginid\u003e_\".\n\t// payload is the data sent with the event. Interface values must be primitive Go types or mattermost-server/model types.\n\t// broadcast determines to which users to send the event.\n\tPublishWebSocketEvent(event string, payload map[string]interface{}, broadcast *model.WebsocketBroadcast)\n\n\t// HasPermissionTo check if the user has the permission at system scope.\n\t//\n\t// Minimum server version: 5.3\n\tHasPermissionTo(userId string, permission *model.Permission) bool\n\n\t// HasPermissionToTeam check if the user has the permission at team scope.\n\t//\n\t// Minimum server version: 5.3\n\tHasPermissionToTeam(userId, teamId string, permission *model.Permission) bool\n\n\t// HasPermissionToChannel check if the user has the permission at channel scope.\n\t//\n\t// Minimum server version: 5.3\n\tHasPermissionToChannel(userId, channelId string, permission *model.Permission) bool\n\n\t// LogDebug writes a log message to the Mattermost server log file.\n\t// Appropriate context such as the plugin name will already be added as fields so plugins\n\t// do not need to add that info.\n\t// keyValuePairs should be primitive go types or other values that can be encoded by encoding/gob\n\tLogDebug(msg string, keyValuePairs ...interface{})\n\n\t// LogInfo writes a log message to the Mattermost server log file.\n\t// Appropriate context such as the plugin name will already be added as fields so plugins\n\t// do not need to add that info.\n\t// keyValuePairs should be primitive go types or other values that can be encoded by encoding/gob\n\tLogInfo(msg string, keyValuePairs ...interface{})\n\n\t// LogError writes a log message to the Mattermost server log file.\n\t// Appropriate context such as the plugin name will already be added as fields so plugins\n\t// do not need to add that info.\n\t// keyValuePairs should be primitive go types or other values that can be encoded by encoding/gob\n\tLogError(msg string, keyValuePairs ...interface{})\n\n\t// LogWarn writes a log message to the Mattermost server log file.\n\t// Appropriate context such as the plugin name will already be added as fields so plugins\n\t// do not need to add that info.\n\t// keyValuePairs should be primitive go types or other values that can be encoded by encoding/gob\n\tLogWarn(msg string, keyValuePairs ...interface{})\n\n\t// SendMail sends an email to a specific address\n\t//\n\t// Minimum server version: 5.7\n\tSendMail(to, subject, htmlBody string) *model.AppError\n\n\t// CreateBot creates the given bot and corresponding user.\n\t//\n\t// Minimum server version: 5.10\n\tCreateBot(bot *model.Bot) (*model.Bot, *model.AppError)\n\n\t// PatchBot applies the given patch to the bot and corresponding user.\n\t//\n\t// Minimum server version: 5.10\n\tPatchBot(botUserId string, botPatch *model.BotPatch) (*model.Bot, *model.AppError)\n\n\t// GetBot returns the given bot.\n\t//\n\t// Minimum server version: 5.10\n\tGetBot(botUserId string, includeDeleted bool) (*model.Bot, *model.AppError)\n\n\t// GetBots returns the requested page of bots.\n\t//\n\t// Minimum server version: 5.10\n\tGetBots(options *model.BotGetOptions) ([]*model.Bot, *model.AppError)\n\n\t// UpdateBotActive marks a bot as active or inactive, along with its corresponding user.\n\t//\n\t// Minimum server version: 5.10\n\tUpdateBotActive(botUserId string, active bool) (*model.Bot, *model.AppError)\n\n\t// PermanentDeleteBot permanently deletes a bot and its corresponding user.\n\t//\n\t// Minimum server version: 5.10\n\tPermanentDeleteBot(botUserId string) *model.AppError\n}\n```\nThe API can be used to retrieve data or perform actions on behalf of the plugin. Most methods have direct counterparts in the REST API and very similar behavior.\n\nPlugins obtain access to the API by embedding MattermostPlugin and accessing the API member directly.\n\n```go\ntype Context struct {\n\tSessionId      string\n\tRequestId      string\n\tIpAddress      string\n\tAcceptLanguage string\n\tUserAgent      string\n}\n```\nContext passes through metadata about the request or hook event. For requests this is built in app/plugin\\_requests.go For hooks, app.PluginContext() is called.\n\n```go\ntype Environment struct {\n\t// contains filtered or unexported fields\n}\n```\nEnvironment represents the execution environment of active plugins.\n\nIt is meant for use by the Mattermost server to manipulate, interact with and report on the set of active plugins.\n\n```go\nfunc NewEnvironment(newAPIImpl apiImplCreatorFunc, pluginDir string, webappPluginDir string, logger *mlog.Logger) (*Environment, error)\n```\n\n```go\nfunc (env *Environment) Activate(id string) (manifest *model.Manifest, activated bool, reterr error)\n```\n\n```go\nfunc (env *Environment) Active() []*model.BundleInfo\n```\nReturns a list of all currently active plugins within the environment.\n\n```go\nfunc (env *Environment) Available() ([]*model.BundleInfo, error)\n```\nReturns a list of all plugins within the environment.\n\n```go\nfunc (env *Environment) Deactivate(id string) bool\n```\nDeactivates the plugin with the given id.\n\n```go\nfunc (env *Environment) HooksForPlugin(id string) (Hooks, error)\n```\nHooksForPlugin returns the hooks API for the plugin with the given id.\n\nConsider using RunMultiPluginHook instead.\n\n```go\nfunc (env *Environment) IsActive(id string) bool\n```\nIsActive returns true if the plugin with the given id is active.\n\n```go\nfunc (env *Environment) RunMultiPluginHook(hookRunnerFunc func(hooks Hooks) bool, hookId int)\n```\nRunMultiPluginHook invokes hookRunnerFunc for each plugin that implements the given hookId.\n\nIf hookRunnerFunc returns false, iteration will not continue. The iteration order among active plugins is not specified.\n\n```go\nfunc (env *Environment) Shutdown()\n```\nShutdown deactivates all plugins and gracefully shuts down the environment.\n\n```go\nfunc (env *Environment) Statuses() (model.PluginStatuses, error)\n```\nStatuses returns a list of plugin statuses representing the state of every plugin\n\n```go\ntype ErrorString struct {\n\tErr string\n}\n```\nErrorString is a fallback for sending unregistered implementations of the error interface across rpc. For example, the errorString type from the github.com/pkg/errors package cannot be registered since it is not exported, but this precludes common error handling paradigms. ErrorString merely preserves the string description of the error, while satisfying the error interface itself to allow other registered types (such as model.AppError) to be sent unmodified.\n\n```go\nfunc (e ErrorString) Error() string\n```\n\n```go\ntype Hooks interface {\n\t// OnActivate is invoked when the plugin is activated. If an error is returned, the plugin\n\t// will be terminated. The plugin will not receive hooks until after OnActivate returns\n\t// without error.\n\tOnActivate() error\n\n\t// Implemented returns a list of hooks that are implemented by the plugin.\n\t// Plugins do not need to provide an implementation. Any given will be ignored.\n\tImplemented() ([]string, error)\n\n\t// OnDeactivate is invoked when the plugin is deactivated. This is the plugin's last chance to\n\t// use the API, and the plugin will be terminated shortly after this invocation. The plugin\n\t// will stop receiving hooks just prior to this method being called.\n\tOnDeactivate() error\n\n\t// OnConfigurationChange is invoked when configuration changes may have been made. Any\n\t// returned error is logged, but does not stop the plugin. You must be prepared to handle\n\t// a configuration failure gracefully.\n\tOnConfigurationChange() error\n\n\t// ServeHTTP allows the plugin to implement the http.Handler interface. Requests destined for\n\t// the /plugins/{id} path will be routed to the plugin.\n\t//\n\t// The Mattermost-User-Id header will be present if (and only if) the request is by an\n\t// authenticated user.\n\tServeHTTP(c *Context, w http.ResponseWriter, r *http.Request)\n\n\t// ExecuteCommand executes a command that has been previously registered via the RegisterCommand\n\t// API.\n\tExecuteCommand(c *Context, args *model.CommandArgs) (*model.CommandResponse, *model.AppError)\n\n\t// UserHasBeenCreated is invoked after a user was created.\n\t//\n\t// Minimum server version: 5.10\n\tUserHasBeenCreated(c *Context, user *model.User)\n\n\t// UserWillLogIn before the login of the user is returned. Returning a non empty string will reject the login event.\n\t// If you don't need to reject the login event, see UserHasLoggedIn\n\tUserWillLogIn(c *Context, user *model.User) string\n\n\t// UserHasLoggedIn is invoked after a user has logged in.\n\tUserHasLoggedIn(c *Context, user *model.User)\n\n\t// MessageWillBePosted is invoked when a message is posted by a user before it is committed\n\t// to the database. If you also want to act on edited posts, see MessageWillBeUpdated.\n\t//\n\t// To reject a post, return an non-empty string describing why the post was rejected.\n\t// To modify the post, return the replacement, non-nil *model.Post and an empty string.\n\t// To allow the post without modification, return a nil *model.Post and an empty string.\n\t//\n\t// If you don't need to modify or reject posts, use MessageHasBeenPosted instead.\n\t//\n\t// Note that this method will be called for posts created by plugins, including the plugin that\n\t// created the post.\n\tMessageWillBePosted(c *Context, post *model.Post) (*model.Post, string)\n\n\t// MessageWillBeUpdated is invoked when a message is updated by a user before it is committed\n\t// to the database. If you also want to act on new posts, see MessageWillBePosted.\n\t// Return values should be the modified post or nil if rejected and an explanation for the user.\n\t// On rejection, the post will be kept in its previous state.\n\t//\n\t// If you don't need to modify or rejected updated posts, use MessageHasBeenUpdated instead.\n\t//\n\t// Note that this method will be called for posts updated by plugins, including the plugin that\n\t// updated the post.\n\tMessageWillBeUpdated(c *Context, newPost, oldPost *model.Post) (*model.Post, string)\n\n\t// MessageHasBeenPosted is invoked after the message has been committed to the database.\n\t// If you need to modify or reject the post, see MessageWillBePosted\n\t// Note that this method will be called for posts created by plugins, including the plugin that\n\t// created the post.\n\tMessageHasBeenPosted(c *Context, post *model.Post)\n\n\t// MessageHasBeenUpdated is invoked after a message is updated and has been updated in the database.\n\t// If you need to modify or reject the post, see MessageWillBeUpdated\n\t// Note that this method will be called for posts created by plugins, including the plugin that\n\t// created the post.\n\tMessageHasBeenUpdated(c *Context, newPost, oldPost *model.Post)\n\n\t// ChannelHasBeenCreated is invoked after the channel has been committed to the database.\n\tChannelHasBeenCreated(c *Context, channel *model.Channel)\n\n\t// UserHasJoinedChannel is invoked after the membership has been committed to the database.\n\t// If actor is not nil, the user was invited to the channel by the actor.\n\tUserHasJoinedChannel(c *Context, channelMember *model.ChannelMember, actor *model.User)\n\n\t// UserHasLeftChannel is invoked after the membership has been removed from the database.\n\t// If actor is not nil, the user was removed from the channel by the actor.\n\tUserHasLeftChannel(c *Context, channelMember *model.ChannelMember, actor *model.User)\n\n\t// UserHasJoinedTeam is invoked after the membership has been committed to the database.\n\t// If actor is not nil, the user was added to the team by the actor.\n\tUserHasJoinedTeam(c *Context, teamMember *model.TeamMember, actor *model.User)\n\n\t// UserHasLeftTeam is invoked after the membership has been removed from the database.\n\t// If actor is not nil, the user was removed from the team by the actor.\n\tUserHasLeftTeam(c *Context, teamMember *model.TeamMember, actor *model.User)\n\n\t// FileWillBeUploaded is invoked when a file is uploaded, but before it is committed to backing store.\n\t// Read from file to retrieve the body of the uploaded file.\n\t//\n\t// To reject a file upload, return an non-empty string describing why the file was rejected.\n\t// To modify the file, write to the output and/or return a non-nil *model.FileInfo, as well as an empty string.\n\t// To allow the file without modification, do not write to the output and return a nil *model.FileInfo and an empty string.\n\t//\n\t// Note that this method will be called for files uploaded by plugins, including the plugin that uploaded the post.\n\t// FileInfo.Size will be automatically set properly if you modify the file.\n\tFileWillBeUploaded(c *Context, info *model.FileInfo, file io.Reader, output io.Writer) (*model.FileInfo, string)\n}\n```\nHooks describes the methods a plugin may implement to automatically receive the corresponding event.\n\nA plugin only need implement the hooks it cares about. The MattermostPlugin provides some default implementations for convenience but may be overridden.\n\n```go\ntype MattermostPlugin struct {\n\t// API exposes the plugin api, and becomes available just prior to the OnActive hook.\n\tAPI API\n}\n```\n\n```go\nfunc (p *MattermostPlugin) SetAPI(api API)\n```\nSetAPI persists the given API interface to the plugin. It is invoked just prior to the OnActivate hook, exposing the API for use by the plugin.\n\n```go\ntype Z_AddChannelMemberArgs struct {\n\tA string\n\tB string\n}\n```\n\n```go\ntype Z_AddChannelMemberReturns struct {\n\tA *model.ChannelMember\n\tB *model.AppError\n}\n```\n\n```go\ntype Z_AddReactionArgs struct {\n\tA *model.Reaction\n}\n```\n\n```go\ntype Z_AddReactionReturns struct {\n\tA *model.Reaction\n\tB *model.AppError\n}\n```\n\n```go\ntype Z_ChannelHasBeenCreatedArgs struct {\n\tA *Context\n\tB *model.Channel\n}\n```\n\n```go\ntype Z_ChannelHasBeenCreatedReturns struct {\n}\n```\n\n```go\ntype Z_CopyFileInfosArgs struct {\n\tA string\n\tB []string\n}\n```\n\n```go\ntype Z_CopyFileInfosReturns struct {\n\tA []string\n\tB *model.AppError\n}\n```\n\n```go\ntype Z_CreateBotArgs struct {\n\tA *model.Bot\n}\n```\n\n```go\ntype Z_CreateBotReturns struct {\n\tA *model.Bot\n\tB *model.AppError\n}\n```\n\n```go\ntype Z_CreateChannelArgs struct {\n\tA *model.Channel\n}\n```\n\n```go\ntype Z_CreateChannelReturns struct {\n\tA *model.Channel\n\tB *model.AppError\n}\n```\n\n```go\ntype Z_CreatePostArgs struct {\n\tA *model.Post\n}\n```\n\n```go\ntype Z_CreatePostReturns struct {\n\tA *model.Post\n\tB *model.AppError\n}\n```\n\n```go\ntype Z_CreateTeamArgs struct {\n\tA *model.Team\n}\n```\n\n```go\ntype Z_CreateTeamMemberArgs struct {\n\tA string\n\tB string\n}\n```\n\n```go\ntype Z_CreateTeamMemberReturns struct {\n\tA *model.TeamMember\n\tB *model.AppError\n}\n```\n\n```go\ntype Z_CreateTeamMembersArgs struct {\n\tA string\n\tB []string\n\tC string\n}\n```\n\n```go\ntype Z_CreateTeamMembersReturns struct {\n\tA []*model.TeamMember\n\tB *model.AppError\n}\n```\n\n```go\ntype Z_CreateTeamReturns struct {\n\tA *model.Team\n\tB *model.AppError\n}\n```\n\n```go\ntype Z_CreateUserArgs struct {\n\tA *model.User\n}\n```\n\n```go\ntype Z_CreateUserReturns struct {\n\tA *model.User\n\tB *model.AppError\n}\n```\n\n```go\ntype Z_DeleteChannelArgs struct {\n\tA string\n}\n```\n\n```go\ntype Z_DeleteChannelMemberArgs struct {\n\tA string\n\tB string\n}\n```\n\n```go\ntype Z_DeleteChannelMemberReturns struct {\n\tA *model.AppError\n}\n```\n\n```go\ntype Z_DeleteChannelReturns struct {\n\tA *model.AppError\n}\n```\n\n```go\ntype Z_DeleteEphemeralPostArgs struct {\n\tA string\n\tB *model.Post\n}\n```\n\n```go\ntype Z_DeleteEphemeralPostReturns struct {\n}\n```\n\n```go\ntype Z_DeletePostArgs struct {\n\tA string\n}\n```\n\n```go\ntype Z_DeletePostReturns struct {\n\tA *model.AppError\n}\n```\n\n```go\ntype Z_DeleteTeamArgs struct {\n\tA string\n}\n```\n\n```go\ntype Z_DeleteTeamMemberArgs struct {\n\tA string\n\tB string\n\tC string\n}\n```\n\n```go\ntype Z_DeleteTeamMemberReturns struct {\n\tA *model.AppError\n}\n```\n\n```go\ntype Z_DeleteTeamReturns struct {\n\tA *model.AppError\n}\n```\n\n```go\ntype Z_DeleteUserArgs struct {\n\tA string\n}\n```\n\n```go\ntype Z_DeleteUserReturns struct {\n\tA *model.AppError\n}\n```\n\n```go\ntype Z_DisablePluginArgs struct {\n\tA string\n}\n```\n\n```go\ntype Z_DisablePluginReturns struct {\n\tA *model.AppError\n}\n```\n\n```go\ntype Z_EnablePluginArgs struct {\n\tA string\n}\n```\n\n```go\ntype Z_EnablePluginReturns struct {\n\tA *model.AppError\n}\n```\n\n```go\ntype Z_ExecuteCommandArgs struct {\n\tA *Context\n\tB *model.CommandArgs\n}\n```\n\n```go\ntype Z_ExecuteCommandReturns struct {\n\tA *model.CommandResponse\n\tB *model.AppError\n}\n```\n\n```go\ntype Z_FileWillBeUploadedArgs struct {\n\tA                     *Context\n\tB                     *model.FileInfo\n\tUploadedFileStream    uint32\n\tReplacementFileStream uint32\n}\n```\n\n```go\ntype Z_FileWillBeUploadedReturns struct {\n\tA *model.FileInfo\n\tB string\n}\n```\n\n```go\ntype Z_GetBotArgs struct {\n\tA string\n\tB bool\n}\n```\n\n```go\ntype Z_GetBotReturns struct {\n\tA *model.Bot\n\tB *model.AppError\n}\n```\n\n```go\ntype Z_GetBotsArgs struct {\n\tA *model.BotGetOptions\n}\n```\n\n```go\ntype Z_GetBotsReturns struct {\n\tA []*model.Bot\n\tB *model.AppError\n}\n```\n\n```go\ntype Z_GetBundlePathArgs struct {\n}\n```\n\n```go\ntype Z_GetBundlePathReturns struct {\n\tA string\n\tB error\n}\n```\n\n```go\ntype Z_GetChannelArgs struct {\n\tA string\n}\n```\n\n```go\ntype Z_GetChannelByNameArgs struct {\n\tA string\n\tB string\n\tC bool\n}\n```\n\n```go\ntype Z_GetChannelByNameForTeamNameArgs struct {\n\tA string\n\tB string\n\tC bool\n}\n```\n\n```go\ntype Z_GetChannelByNameForTeamNameReturns struct {\n\tA *model.Channel\n\tB *model.AppError\n}\n```\n\n```go\ntype Z_GetChannelByNameReturns struct {\n\tA *model.Channel\n\tB *model.AppError\n}\n```\n\n```go\ntype Z_GetChannelMemberArgs struct {\n\tA string\n\tB string\n}\n```\n\n```go\ntype Z_GetChannelMemberReturns struct {\n\tA *model.ChannelMember\n\tB *model.AppError\n}\n```\n\n```go\ntype Z_GetChannelMembersArgs struct {\n\tA string\n\tB int\n\tC int\n}\n```\n\n```go\ntype Z_GetChannelMembersByIdsArgs struct {\n\tA string\n\tB []string\n}\n```\n\n```go\ntype Z_GetChannelMembersByIdsReturns struct {\n\tA *model.ChannelMembers\n\tB *model.AppError\n}\n```\n\n```go\ntype Z_GetChannelMembersForUserArgs struct {\n\tA string\n\tB string\n\tC int\n\tD int\n}\n```\n\n```go\ntype Z_GetChannelMembersForUserReturns struct {\n\tA []*model.ChannelMember\n\tB *model.AppError\n}\n```\n\n```go\ntype Z_GetChannelMembersReturns struct {\n\tA *model.ChannelMembers\n\tB *model.AppError\n}\n```\n\n```go\ntype Z_GetChannelReturns struct {\n\tA *model.Channel\n\tB *model.AppError\n}\n```\n\n```go\ntype Z_GetChannelStatsArgs struct {\n\tA string\n}\n```\n\n```go\ntype Z_GetChannelStatsReturns struct {\n\tA *model.ChannelStats\n\tB *model.AppError\n}\n```\n\n```go\ntype Z_GetChannelsForTeamForUserArgs struct {\n\tA string\n\tB string\n\tC bool\n}\n```\n\n```go\ntype Z_GetChannelsForTeamForUserReturns struct {\n\tA []*model.Channel\n\tB *model.AppError\n}\n```\n\n```go\ntype Z_GetConfigArgs struct {\n}\n```\n\n```go\ntype Z_GetConfigReturns struct {\n\tA *model.Config\n}\n```\n\n```go\ntype Z_GetDiagnosticIdArgs struct {\n}\n```\n\n```go\ntype Z_GetDiagnosticIdReturns struct {\n\tA string\n}\n```\n\n```go\ntype Z_GetDirectChannelArgs struct {\n\tA string\n\tB string\n}\n```\n\n```go\ntype Z_GetDirectChannelReturns struct {\n\tA *model.Channel\n\tB *model.AppError\n}\n```\n\n```go\ntype Z_GetEmojiArgs struct {\n\tA string\n}\n```\n\n```go\ntype Z_GetEmojiByNameArgs struct {\n\tA string\n}\n```\n\n```go\ntype Z_GetEmojiByNameReturns struct {\n\tA *model.Emoji\n\tB *model.AppError\n}\n```\n\n```go\ntype Z_GetEmojiImageArgs struct {\n\tA string\n}\n```\n\n```go\ntype Z_GetEmojiImageReturns struct {\n\tA []byte\n\tB string\n\tC *model.AppError\n}\n```\n\n```go\ntype Z_GetEmojiListArgs struct {\n\tA string\n\tB int\n\tC int\n}\n```\n\n```go\ntype Z_GetEmojiListReturns struct {\n\tA []*model.Emoji\n\tB *model.AppError\n}\n```\n\n```go\ntype Z_GetEmojiReturns struct {\n\tA *model.Emoji\n\tB *model.AppError\n}\n```\n\n```go\ntype Z_GetFileArgs struct {\n\tA string\n}\n```\n\n```go\ntype Z_GetFileInfoArgs struct {\n\tA string\n}\n```\n\n```go\ntype Z_GetFileInfoReturns struct {\n\tA *model.FileInfo\n\tB *model.AppError\n}\n```\n\n```go\ntype Z_GetFileLinkArgs struct {\n\tA string\n}\n```\n\n```go\ntype Z_GetFileLinkReturns struct {\n\tA string\n\tB *model.AppError\n}\n```\n\n```go\ntype Z_GetFileReturns struct {\n\tA []byte\n\tB *model.AppError\n}\n```\n\n```go\ntype Z_GetGroupChannelArgs struct {\n\tA []string\n}\n```\n\n```go\ntype Z_GetGroupChannelReturns struct {\n\tA *model.Channel\n\tB *model.AppError\n}\n```\n\n```go\ntype Z_GetLDAPUserAttributesArgs struct {\n\tA string\n\tB []string\n}\n```\n\n```go\ntype Z_GetLDAPUserAttributesReturns struct {\n\tA map[string]string\n\tB *model.AppError\n}\n```\n\n```go\ntype Z_GetLicenseArgs struct {\n}\n```\n\n```go\ntype Z_GetLicenseReturns struct {\n\tA *model.License\n}\n```\n\n```go\ntype Z_GetPluginConfigArgs struct {\n}\n```\n\n```go\ntype Z_GetPluginConfigReturns struct {\n\tA map[string]interface{}\n}\n```\n\n```go\ntype Z_GetPluginStatusArgs struct {\n\tA string\n}\n```\n\n```go\ntype Z_GetPluginStatusReturns struct {\n\tA *model.PluginStatus\n\tB *model.AppError\n}\n```\n\n```go\ntype Z_GetPluginsArgs struct {\n}\n```\n\n```go\ntype Z_GetPluginsReturns struct {\n\tA []*model.Manifest\n\tB *model.AppError\n}\n```\n\n```go\ntype Z_GetPostArgs struct {\n\tA string\n}\n```\n\n```go\ntype Z_GetPostReturns struct {\n\tA *model.Post\n\tB *model.AppError\n}\n```\n\n```go\ntype Z_GetPostThreadArgs struct {\n\tA string\n}\n```\n\n```go\ntype Z_GetPostThreadReturns struct {\n\tA *model.PostList\n\tB *model.AppError\n}\n```\n\n```go\ntype Z_GetPostsAfterArgs struct {\n\tA string\n\tB string\n\tC int\n\tD int\n}\n```\n\n```go\ntype Z_GetPostsAfterReturns struct {\n\tA *model.PostList\n\tB *model.AppError\n}\n```\n\n```go\ntype Z_GetPostsBeforeArgs struct {\n\tA string\n\tB string\n\tC int\n\tD int\n}\n```\n\n```go\ntype Z_GetPostsBeforeReturns struct {\n\tA *model.PostList\n\tB *model.AppError\n}\n```\n\n```go\ntype Z_GetPostsForChannelArgs struct {\n\tA string\n\tB int\n\tC int\n}\n```\n\n```go\ntype Z_GetPostsForChannelReturns struct {\n\tA *model.PostList\n\tB *model.AppError\n}\n```\n\n```go\ntype Z_GetPostsSinceArgs struct {\n\tA string\n\tB int64\n}\n```\n\n```go\ntype Z_GetPostsSinceReturns struct {\n\tA *model.PostList\n\tB *model.AppError\n}\n```\n\n```go\ntype Z_GetProfileImageArgs struct {\n\tA string\n}\n```\n\n```go\ntype Z_GetProfileImageReturns struct {\n\tA []byte\n\tB *model.AppError\n}\n```\n\n```go\ntype Z_GetPublicChannelsForTeamArgs struct {\n\tA string\n\tB int\n\tC int\n}\n```\n\n```go\ntype Z_GetPublicChannelsForTeamReturns struct {\n\tA []*model.Channel\n\tB *model.AppError\n}\n```\n\n```go\ntype Z_GetReactionsArgs struct {\n\tA string\n}\n```\n\n```go\ntype Z_GetReactionsReturns struct {\n\tA []*model.Reaction\n\tB *model.AppError\n}\n```\n\n```go\ntype Z_GetServerVersionArgs struct {\n}\n```\n\n```go\ntype Z_GetServerVersionReturns struct {\n\tA string\n}\n```\n\n```go\ntype Z_GetSessionArgs struct {\n\tA string\n}\n```\n\n```go\ntype Z_GetSessionReturns struct {\n\tA *model.Session\n\tB *model.AppError\n}\n```\n\n```go\ntype Z_GetSystemInstallDateArgs struct {\n}\n```\n\n```go\ntype Z_GetSystemInstallDateReturns struct {\n\tA int64\n\tB *model.AppError\n}\n```\n\n```go\ntype Z_GetTeamArgs struct {\n\tA string\n}\n```\n\n```go\ntype Z_GetTeamByNameArgs struct {\n\tA string\n}\n```\n\n```go\ntype Z_GetTeamByNameReturns struct {\n\tA *model.Team\n\tB *model.AppError\n}\n```\n\n```go\ntype Z_GetTeamIconArgs struct {\n\tA string\n}\n```\n\n```go\ntype Z_GetTeamIconReturns struct {\n\tA []byte\n\tB *model.AppError\n}\n```\n\n```go\ntype Z_GetTeamMemberArgs struct {\n\tA string\n\tB string\n}\n```\n\n```go\ntype Z_GetTeamMemberReturns struct {\n\tA *model.TeamMember\n\tB *model.AppError\n}\n```\n\n```go\ntype Z_GetTeamMembersArgs struct {\n\tA string\n\tB int\n\tC int\n}\n```\n\n```go\ntype Z_GetTeamMembersForUserArgs struct {\n\tA string\n\tB int\n\tC int\n}\n```\n\n```go\ntype Z_GetTeamMembersForUserReturns struct {\n\tA []*model.TeamMember\n\tB *model.AppError\n}\n```\n\n```go\ntype Z_GetTeamMembersReturns struct {\n\tA []*model.TeamMember\n\tB *model.AppError\n}\n```\n\n```go\ntype Z_GetTeamReturns struct {\n\tA *model.Team\n\tB *model.AppError\n}\n```\n\n```go\ntype Z_GetTeamStatsArgs struct {\n\tA string\n}\n```\n\n```go\ntype Z_GetTeamStatsReturns struct {\n\tA *model.TeamStats\n\tB *model.AppError\n}\n```\n\n```go\ntype Z_GetTeamsArgs struct {\n}\n```\n\n```go\ntype Z_GetTeamsForUserArgs struct {\n\tA string\n}\n```\n\n```go\ntype Z_GetTeamsForUserReturns struct {\n\tA []*model.Team\n\tB *model.AppError\n}\n```\n\n```go\ntype Z_GetTeamsReturns struct {\n\tA []*model.Team\n\tB *model.AppError\n}\n```\n\n```go\ntype Z_GetTeamsUnreadForUserArgs struct {\n\tA string\n}\n```\n\n```go\ntype Z_GetTeamsUnreadForUserReturns struct {\n\tA []*model.TeamUnread\n\tB *model.AppError\n}\n```\n\n```go\ntype Z_GetUserArgs struct {\n\tA string\n}\n```\n\n```go\ntype Z_GetUserByEmailArgs struct {\n\tA string\n}\n```\n\n```go\ntype Z_GetUserByEmailReturns struct {\n\tA *model.User\n\tB *model.AppError\n}\n```\n\n```go\ntype Z_GetUserByUsernameArgs struct {\n\tA string\n}\n```\n\n```go\ntype Z_GetUserByUsernameReturns struct {\n\tA *model.User\n\tB *model.AppError\n}\n```\n\n```go\ntype Z_GetUserReturns struct {\n\tA *model.User\n\tB *model.AppError\n}\n```\n\n```go\ntype Z_GetUserStatusArgs struct {\n\tA string\n}\n```\n\n```go\ntype Z_GetUserStatusReturns struct {\n\tA *model.Status\n\tB *model.AppError\n}\n```\n\n```go\ntype Z_GetUserStatusesByIdsArgs struct {\n\tA []string\n}\n```\n\n```go\ntype Z_GetUserStatusesByIdsReturns struct {\n\tA []*model.Status\n\tB *model.AppError\n}\n```\n\n```go\ntype Z_GetUsersArgs struct {\n\tA *model.UserGetOptions\n}\n```\n\n```go\ntype Z_GetUsersByUsernamesArgs struct {\n\tA []string\n}\n```\n\n```go\ntype Z_GetUsersByUsernamesReturns struct {\n\tA []*model.User\n\tB *model.AppError\n}\n```\n\n```go\ntype Z_GetUsersInChannelArgs struct {\n\tA string\n\tB string\n\tC int\n\tD int\n}\n```\n\n```go\ntype Z_GetUsersInChannelReturns struct {\n\tA []*model.User\n\tB *model.AppError\n}\n```\n\n```go\ntype Z_GetUsersInTeamArgs struct {\n\tA string\n\tB int\n\tC int\n}\n```\n\n```go\ntype Z_GetUsersInTeamReturns struct {\n\tA []*model.User\n\tB *model.AppError\n}\n```\n\n```go\ntype Z_GetUsersReturns struct {\n\tA []*model.User\n\tB *model.AppError\n}\n```\n\n```go\ntype Z_HasPermissionToArgs struct {\n\tA string\n\tB *model.Permission\n}\n```\n\n```go\ntype Z_HasPermissionToChannelArgs struct {\n\tA string\n\tB string\n\tC *model.Permission\n}\n```\n\n```go\ntype Z_HasPermissionToChannelReturns struct {\n\tA bool\n}\n```\n\n```go\ntype Z_HasPermissionToReturns struct {\n\tA bool\n}\n```\n\n```go\ntype Z_HasPermissionToTeamArgs struct {\n\tA string\n\tB string\n\tC *model.Permission\n}\n```\n\n```go\ntype Z_HasPermissionToTeamReturns struct {\n\tA bool\n}\n```\n\n```go\ntype Z_KVDeleteAllArgs struct {\n}\n```\n\n```go\ntype Z_KVDeleteAllReturns struct {\n\tA *model.AppError\n}\n```\n\n```go\ntype Z_KVDeleteArgs struct {\n\tA string\n}\n```\n\n```go\ntype Z_KVDeleteReturns struct {\n\tA *model.AppError\n}\n```\n\n```go\ntype Z_KVGetArgs struct {\n\tA string\n}\n```\n\n```go\ntype Z_KVGetReturns struct {\n\tA []byte\n\tB *model.AppError\n}\n```\n\n```go\ntype Z_KVListArgs struct {\n\tA int\n\tB int\n}\n```\n\n```go\ntype Z_KVListReturns struct {\n\tA []string\n\tB *model.AppError\n}\n```\n\n```go\ntype Z_KVSetArgs struct {\n\tA string\n\tB []byte\n}\n```\n\n```go\ntype Z_KVSetReturns struct {\n\tA *model.AppError\n}\n```\n\n```go\ntype Z_KVSetWithExpiryArgs struct {\n\tA string\n\tB []byte\n\tC int64\n}\n```\n\n```go\ntype Z_KVSetWithExpiryReturns struct {\n\tA *model.AppError\n}\n```\n\n```go\ntype Z_LoadPluginConfigurationArgsArgs struct {\n}\n```\n\n```go\ntype Z_LoadPluginConfigurationArgsReturns struct {\n\tA []byte\n}\n```\n\n```go\ntype Z_LogDebugArgs struct {\n\tA string\n\tB []interface{}\n}\n```\n\n```go\ntype Z_LogDebugReturns struct {\n}\n```\n\n```go\ntype Z_LogErrorArgs struct {\n\tA string\n\tB []interface{}\n}\n```\n\n```go\ntype Z_LogErrorReturns struct {\n}\n```\n\n```go\ntype Z_LogInfoArgs struct {\n\tA string\n\tB []interface{}\n}\n```\n\n```go\ntype Z_LogInfoReturns struct {\n}\n```\n\n```go\ntype Z_LogWarnArgs struct {\n\tA string\n\tB []interface{}\n}\n```\n\n```go\ntype Z_LogWarnReturns struct {\n}\n```\n\n```go\ntype Z_MessageHasBeenPostedArgs struct {\n\tA *Context\n\tB *model.Post\n}\n```\n\n```go\ntype Z_MessageHasBeenPostedReturns struct {\n}\n```\n\n```go\ntype Z_MessageHasBeenUpdatedArgs struct {\n\tA *Context\n\tB *model.Post\n\tC *model.Post\n}\n```\n\n```go\ntype Z_MessageHasBeenUpdatedReturns struct {\n}\n```\n\n```go\ntype Z_MessageWillBePostedArgs struct {\n\tA *Context\n\tB *model.Post\n}\n```\n\n```go\ntype Z_MessageWillBePostedReturns struct {\n\tA *model.Post\n\tB string\n}\n```\n\n```go\ntype Z_MessageWillBeUpdatedArgs struct {\n\tA *Context\n\tB *model.Post\n\tC *model.Post\n}\n```\n\n```go\ntype Z_MessageWillBeUpdatedReturns struct {\n\tA *model.Post\n\tB string\n}\n```\n\n```go\ntype Z_OnActivateArgs struct {\n\tAPIMuxId uint32\n}\n```\n\n```go\ntype Z_OnActivateReturns struct {\n\tA error\n}\n```\n\n```go\ntype Z_OnConfigurationChangeArgs struct {\n}\n```\n\n```go\ntype Z_OnConfigurationChangeReturns struct {\n\tA error\n}\n```\n\n```go\ntype Z_OnDeactivateArgs struct {\n}\n```\n\n```go\ntype Z_OnDeactivateReturns struct {\n\tA error\n}\n```\n\n```go\ntype Z_OpenInteractiveDialogArgs struct {\n\tA model.OpenDialogRequest\n}\n```\n\n```go\ntype Z_OpenInteractiveDialogReturns struct {\n\tA *model.AppError\n}\n```\n\n```go\ntype Z_PatchBotArgs struct {\n\tA string\n\tB *model.BotPatch\n}\n```\n\n```go\ntype Z_PatchBotReturns struct {\n\tA *model.Bot\n\tB *model.AppError\n}\n```\n\n```go\ntype Z_PermanentDeleteBotArgs struct {\n\tA string\n}\n```\n\n```go\ntype Z_PermanentDeleteBotReturns struct {\n\tA *model.AppError\n}\n```\n\n```go\ntype Z_PublishWebSocketEventArgs struct {\n\tA string\n\tB map[string]interface{}\n\tC *model.WebsocketBroadcast\n}\n```\n\n```go\ntype Z_PublishWebSocketEventReturns struct {\n}\n```\n\n```go\ntype Z_ReadFileArgs struct {\n\tA string\n}\n```\n\n```go\ntype Z_ReadFileReturns struct {\n\tA []byte\n\tB *model.AppError\n}\n```\n\n```go\ntype Z_RegisterCommandArgs struct {\n\tA *model.Command\n}\n```\n\n```go\ntype Z_RegisterCommandReturns struct {\n\tA error\n}\n```\n\n```go\ntype Z_RemovePluginArgs struct {\n\tA string\n}\n```\n\n```go\ntype Z_RemovePluginReturns struct {\n\tA *model.AppError\n}\n```\n\n```go\ntype Z_RemoveReactionArgs struct {\n\tA *model.Reaction\n}\n```\n\n```go\ntype Z_RemoveReactionReturns struct {\n\tA *model.AppError\n}\n```\n\n```go\ntype Z_RemoveTeamIconArgs struct {\n\tA string\n}\n```\n\n```go\ntype Z_RemoveTeamIconReturns struct {\n\tA *model.AppError\n}\n```\n\n```go\ntype Z_SaveConfigArgs struct {\n\tA *model.Config\n}\n```\n\n```go\ntype Z_SaveConfigReturns struct {\n\tA *model.AppError\n}\n```\n\n```go\ntype Z_SavePluginConfigArgs struct {\n\tA map[string]interface{}\n}\n```\n\n```go\ntype Z_SavePluginConfigReturns struct {\n\tA *model.AppError\n}\n```\n\n```go\ntype Z_SearchChannelsArgs struct {\n\tA string\n\tB string\n}\n```\n\n```go\ntype Z_SearchChannelsReturns struct {\n\tA []*model.Channel\n\tB *model.AppError\n}\n```\n\n```go\ntype Z_SearchPostsInTeamArgs struct {\n\tA string\n\tB []*model.SearchParams\n}\n```\n\n```go\ntype Z_SearchPostsInTeamReturns struct {\n\tA []*model.Post\n\tB *model.AppError\n}\n```\n\n```go\ntype Z_SearchTeamsArgs struct {\n\tA string\n}\n```\n\n```go\ntype Z_SearchTeamsReturns struct {\n\tA []*model.Team\n\tB *model.AppError\n}\n```\n\n```go\ntype Z_SearchUsersArgs struct {\n\tA *model.UserSearch\n}\n```\n\n```go\ntype Z_SearchUsersReturns struct {\n\tA []*model.User\n\tB *model.AppError\n}\n```\n\n```go\ntype Z_SendEphemeralPostArgs struct {\n\tA string\n\tB *model.Post\n}\n```\n\n```go\ntype Z_SendEphemeralPostReturns struct {\n\tA *model.Post\n}\n```\n\n```go\ntype Z_SendMailArgs struct {\n\tA string\n\tB string\n\tC string\n}\n```\n\n```go\ntype Z_SendMailReturns struct {\n\tA *model.AppError\n}\n```\n\n```go\ntype Z_ServeHTTPArgs struct {\n\tResponseWriterStream uint32\n\tRequest              *http.Request\n\tContext              *Context\n\tRequestBodyStream    uint32\n}\n```\n\n```go\ntype Z_SetProfileImageArgs struct {\n\tA string\n\tB []byte\n}\n```\n\n```go\ntype Z_SetProfileImageReturns struct {\n\tA *model.AppError\n}\n```\n\n```go\ntype Z_SetTeamIconArgs struct {\n\tA string\n\tB []byte\n}\n```\n\n```go\ntype Z_SetTeamIconReturns struct {\n\tA *model.AppError\n}\n```\n\n```go\ntype Z_UnregisterCommandArgs struct {\n\tA string\n\tB string\n}\n```\n\n```go\ntype Z_UnregisterCommandReturns struct {\n\tA error\n}\n```\n\n```go\ntype Z_UpdateBotActiveArgs struct {\n\tA string\n\tB bool\n}\n```\n\n```go\ntype Z_UpdateBotActiveReturns struct {\n\tA *model.Bot\n\tB *model.AppError\n}\n```\n\n```go\ntype Z_UpdateChannelArgs struct {\n\tA *model.Channel\n}\n```\n\n```go\ntype Z_UpdateChannelMemberNotificationsArgs struct {\n\tA string\n\tB string\n\tC map[string]string\n}\n```\n\n```go\ntype Z_UpdateChannelMemberNotificationsReturns struct {\n\tA *model.ChannelMember\n\tB *model.AppError\n}\n```\n\n```go\ntype Z_UpdateChannelMemberRolesArgs struct {\n\tA string\n\tB string\n\tC string\n}\n```\n\n```go\ntype Z_UpdateChannelMemberRolesReturns struct {\n\tA *model.ChannelMember\n\tB *model.AppError\n}\n```\n\n```go\ntype Z_UpdateChannelReturns struct {\n\tA *model.Channel\n\tB *model.AppError\n}\n```\n\n```go\ntype Z_UpdateEphemeralPostArgs struct {\n\tA string\n\tB *model.Post\n}\n```\n\n```go\ntype Z_UpdateEphemeralPostReturns struct {\n\tA *model.Post\n}\n```\n\n```go\ntype Z_UpdatePostArgs struct {\n\tA *model.Post\n}\n```\n\n```go\ntype Z_UpdatePostReturns struct {\n\tA *model.Post\n\tB *model.AppError\n}\n```\n\n```go\ntype Z_UpdateTeamArgs struct {\n\tA *model.Team\n}\n```\n\n```go\ntype Z_UpdateTeamMemberRolesArgs struct {\n\tA string\n\tB string\n\tC string\n}\n```\n\n```go\ntype Z_UpdateTeamMemberRolesReturns struct {\n\tA *model.TeamMember\n\tB *model.AppError\n}\n```\n\n```go\ntype Z_UpdateTeamReturns struct {\n\tA *model.Team\n\tB *model.AppError\n}\n```\n\n```go\ntype Z_UpdateUserActiveArgs struct {\n\tA string\n\tB bool\n}\n```\n\n```go\ntype Z_UpdateUserActiveReturns struct {\n\tA *model.AppError\n}\n```\n\n```go\ntype Z_UpdateUserArgs struct {\n\tA *model.User\n}\n```\n\n```go\ntype Z_UpdateUserReturns struct {\n\tA *model.User\n\tB *model.AppError\n}\n```\n\n```go\ntype Z_UpdateUserStatusArgs struct {\n\tA string\n\tB string\n}\n```\n\n```go\ntype Z_UpdateUserStatusReturns struct {\n\tA *model.Status\n\tB *model.AppError\n}\n```\n\n```go\ntype Z_UploadFileArgs struct {\n\tA []byte\n\tB string\n\tC string\n}\n```\n\n```go\ntype Z_UploadFileReturns struct {\n\tA *model.FileInfo\n\tB *model.AppError\n}\n```\n\n```go\ntype Z_UserHasBeenCreatedArgs struct {\n\tA *Context\n\tB *model.User\n}\n```\n\n```go\ntype Z_UserHasBeenCreatedReturns struct {\n}\n```\n\n```go\ntype Z_UserHasJoinedChannelArgs struct {\n\tA *Context\n\tB *model.ChannelMember\n\tC *model.User\n}\n```\n\n```go\ntype Z_UserHasJoinedChannelReturns struct {\n}\n```\n\n```go\ntype Z_UserHasJoinedTeamArgs struct {\n\tA *Context\n\tB *model.TeamMember\n\tC *model.User\n}\n```\n\n```go\ntype Z_UserHasJoinedTeamReturns struct {\n}\n```\n\n```go\ntype Z_UserHasLeftChannelArgs struct {\n\tA *Context\n\tB *model.ChannelMember\n\tC *model.User\n}\n```\n\n```go\ntype Z_UserHasLeftChannelReturns struct {\n}\n```\n\n```go\ntype Z_UserHasLeftTeamArgs struct {\n\tA *Context\n\tB *model.TeamMember\n\tC *model.User\n}\n```\n\n```go\ntype Z_UserHasLeftTeamReturns struct {\n}\n```\n\n```go\ntype Z_UserHasLoggedInArgs struct {\n\tA *Context\n\tB *model.User\n}\n```\n\n```go\ntype Z_UserHasLoggedInReturns struct {\n}\n```\n\n```go\ntype Z_UserWillLogInArgs struct {\n\tA *Context\n\tB *model.User\n}\n```\n\n```go\ntype Z_UserWillLogInReturns struct {\n\tA string\n}\n```\n\n","path":"github.com/nmintoh/dserver/plugin","name":"plugin","synopsis":"The plugin package is used by Mattermost server plugins written in go.","isRedistributable":true}
