2020-02-13 13:26:58 +01:00
// Copyright (c) 2015-present Mattermost, Inc. All Rights Reserved.
// See LICENSE.txt for license information.
2020-03-05 14:46:08 +01:00
// Code generated by "make app-layers"
2020-02-13 13:26:58 +01:00
// DO NOT EDIT
package app
import (
2021-06-09 11:11:46 -05:00
"archive/zip"
2020-02-13 13:26:58 +01:00
"bytes"
"context"
"crypto/ecdsa"
"io"
"mime/multipart"
"net/http"
"net/url"
2021-04-06 10:39:48 -04:00
"reflect"
2020-02-13 13:26:58 +01:00
"time"
2023-06-11 10:54:35 +05:30
"github.com/mattermost/mattermost/server/public/model"
"github.com/mattermost/mattermost/server/public/plugin"
"github.com/mattermost/mattermost/server/public/shared/i18n"
"github.com/mattermost/mattermost/server/public/shared/mlog"
2023-09-05 09:47:30 +02:00
"github.com/mattermost/mattermost/server/public/shared/request"
2023-06-11 10:54:35 +05:30
"github.com/mattermost/mattermost/server/public/shared/timezones"
"github.com/mattermost/mattermost/server/v8/channels/app/platform"
"github.com/mattermost/mattermost/server/v8/channels/audit"
"github.com/mattermost/mattermost/server/v8/channels/store"
"github.com/mattermost/mattermost/server/v8/einterfaces"
"github.com/mattermost/mattermost/server/v8/platform/services/httpservice"
"github.com/mattermost/mattermost/server/v8/platform/services/imageproxy"
"github.com/mattermost/mattermost/server/v8/platform/services/remotecluster"
"github.com/mattermost/mattermost/server/v8/platform/services/searchengine"
"github.com/mattermost/mattermost/server/v8/platform/shared/filestore"
2020-02-13 13:26:58 +01:00
)
// AppIface is extracted from App struct and contains all it's exported methods. It's provided to allow partial interface passing and app layers creation.
type AppIface interface {
2020-04-09 11:08:39 +03:00
// @openTracingParams args
2023-10-30 16:33:37 +01:00
ExecuteCommand ( c request . CTX , args * model . CommandArgs ) ( * model . CommandResponse , * model . AppError )
2021-02-05 11:22:27 +01:00
// @openTracingParams teamID
2020-03-05 14:46:08 +01:00
// previous ListCommands now ListAutocompleteCommands
2021-02-26 08:12:49 +01:00
ListAutocompleteCommands ( teamID string , T i18n . TranslateFunc ) ( [ ] * model . Command , * model . AppError )
2021-02-05 11:22:27 +01:00
// @openTracingParams teamID, skipSlackParsing
2022-08-02 20:48:54 +05:30
CreateCommandPost ( c request . CTX , post * model . Post , teamID string , response * model . CommandResponse , skipSlackParsing bool ) ( * model . Post , * model . AppError )
2021-04-02 14:33:23 +05:30
// AddChannelMember adds a user to a channel. It is a wrapper over AddUserToChannel.
2022-07-14 12:01:29 +03:00
AddChannelMember ( c request . CTX , userID string , channel * model . Channel , opts ChannelMemberOpts ) ( * model . ChannelMember , * model . AppError )
2020-03-05 14:46:08 +01:00
// AddCursorIdsForPostList adds NextPostId and PrevPostId as cursor to the PostList.
// The conditional blocks ensure that it sets those cursor IDs immediately as afterPost, beforePost or empty,
// and only query to database whenever necessary.
2021-03-05 09:46:36 +02:00
AddCursorIdsForPostList ( originalList * model . PostList , afterPost , beforePost string , since int64 , page , perPage int , collapsedThreads bool )
2020-03-05 14:46:08 +01:00
// AddPublicKey will add plugin public key to the config. Overwrites the previous file
AddPublicKey ( name string , key io . Reader ) * model . AppError
2021-04-02 14:33:23 +05:30
// AddUserToChannel adds a user to a given channel.
2022-07-14 12:01:29 +03:00
AddUserToChannel ( c request . CTX , user * model . User , channel * model . Channel , skipTeamMemberIntegrityCheck bool ) ( * model . ChannelMember , * model . AppError )
2020-03-05 14:46:08 +01:00
// Caller must close the first return value
2023-07-19 13:01:39 -07:00
ExportFileReader ( path string ) ( filestore . ReadCloseSeeker , * model . AppError )
// Caller must close the first return value
2021-03-02 14:37:21 +01:00
FileReader ( path string ) ( filestore . ReadCloseSeeker , * model . AppError )
2020-03-05 14:46:08 +01:00
// ChannelMembersMinusGroupMembers returns the set of users in the given channel minus the set of users in the given
// groups.
//
// The result can be used, for example, to determine the set of users who would be removed from a channel if the
// channel were group-constrained with the given groups.
ChannelMembersMinusGroupMembers ( channelID string , groupIDs [ ] string , page , perPage int ) ( [ ] * model . UserWithGroups , int64 , * model . AppError )
2021-05-04 12:37:36 -04:00
// ChannelMembersToAdd returns a slice of UserChannelIDPair that need newly created memberships
// based on the groups configurations. The returned list can be optionally scoped to a single given channel.
//
// Typically since will be the last successful group sync time.
// If includeRemovedMembers is true, then channel members who left or were removed from the channel will
// be included; otherwise, they will be excluded.
ChannelMembersToAdd ( since int64 , channelID * string , includeRemovedMembers bool ) ( [ ] * model . UserChannelIDPair , * model . AppError )
2021-03-22 14:02:16 -04:00
// CheckProviderAttributes returns the empty string if the patch can be applied without
// overriding attributes set by the user's login provider; otherwise, the name of the offending
// field is returned.
2023-10-30 16:33:37 +01:00
CheckProviderAttributes ( c request . CTX , user * model . User , patch * model . UserPatch ) string
2023-10-17 11:55:41 -03:00
// CommandsForTeam returns all the plugin commands for the given team.
2023-03-22 17:22:27 -04:00
CommandsForTeam ( teamID string ) [ ] * model . Command
2022-09-28 22:22:53 +05:30
// ComputeLastAccessibleFileTime updates cache with CreateAt time of the last accessible file as per the cloud plan's limit.
// Use GetLastAccessibleFileTime() to access the result.
ComputeLastAccessibleFileTime ( ) error
2022-07-06 11:56:39 +05:30
// ComputeLastAccessiblePostTime updates cache with CreateAt time of the last accessible post as per the cloud plan's limit.
// Use GetLastAccessiblePostTime() to access the result.
2022-07-07 15:01:50 -05:00
ComputeLastAccessiblePostTime ( ) error
2020-07-17 10:00:43 +03:00
// ConvertBotToUser converts a bot to user.
2022-07-28 10:04:21 +05:30
ConvertBotToUser ( c request . CTX , bot * model . Bot , userPatch * model . UserPatch , sysadmin bool ) ( * model . User , * model . AppError )
2020-03-05 14:46:08 +01:00
// ConvertUserToBot converts a user to bot.
2024-03-11 20:24:35 +08:00
ConvertUserToBot ( rctx request . CTX , user * model . User ) ( * model . Bot , * model . AppError )
2022-11-29 11:47:51 -05:00
// Create/ Update a subscription history event
SendSubscriptionHistoryEvent ( userID string ) ( * model . SubscriptionHistory , error )
2020-03-05 14:46:08 +01:00
// CreateBot creates the given bot and corresponding user.
2024-03-11 20:24:35 +08:00
CreateBot ( rctx request . CTX , bot * model . Bot ) ( * model . Bot , * model . AppError )
2020-04-09 11:08:39 +03:00
// CreateChannelScheme creates a new Scheme of scope channel and assigns it to the channel.
2022-07-14 12:01:29 +03:00
CreateChannelScheme ( c request . CTX , channel * model . Channel ) ( * model . Scheme , * model . AppError )
2020-03-05 14:46:08 +01:00
// CreateDefaultMemberships adds users to teams and channels based on their group memberships and how those groups
// are configured to sync with teams and channels for group members on or after the given timestamp.
2021-05-04 12:37:36 -04:00
// If includeRemovedMembers is true, then members who left or were removed from a team/channel will
// be re-added; otherwise, they will not be re-added.
2023-10-30 16:33:37 +01:00
CreateDefaultMemberships ( c request . CTX , params model . CreateDefaultMembershipParams ) error
2020-03-05 14:46:08 +01:00
// CreateGuest creates a guest and sets several fields of the returned User struct to
// their zero values.
2022-07-28 10:04:21 +05:30
CreateGuest ( c request . CTX , user * model . User ) ( * model . User , * model . AppError )
2020-03-05 14:46:08 +01:00
// CreateUser creates a user and sets several fields of the returned User struct to
// their zero values.
2022-07-28 10:04:21 +05:30
CreateUser ( c request . CTX , user * model . User ) ( * model . User , * model . AppError )
2020-03-05 14:46:08 +01:00
// Creates and stores FileInfos for a post created before the FileInfos table existed.
2023-11-07 10:04:16 +01:00
MigrateFilenamesToFileInfos ( rctx request . CTX , post * model . Post ) [ ] * model . FileInfo
2020-03-05 14:46:08 +01:00
// DefaultChannelNames returns the list of system-wide default channel names.
//
// By default the list will be (not necessarily in this order):
2022-08-18 11:01:37 +02:00
//
2020-03-05 14:46:08 +01:00
// ['town-square', 'off-topic']
2022-08-18 11:01:37 +02:00
//
2020-03-05 14:46:08 +01:00
// However, if TeamSettings.ExperimentalDefaultChannels contains a list of channels then that list will replace
// 'off-topic' and be included in the return results in addition to 'town-square'. For example:
2020-04-09 11:08:39 +03:00
//
2022-08-18 11:01:37 +02:00
// ['town-square', 'game-of-thrones', 'wow']
2022-07-14 12:01:29 +03:00
DefaultChannelNames ( c request . CTX ) [ ] string
2020-04-09 11:08:39 +03:00
// DeleteChannelScheme deletes a channels scheme and sets its SchemeId to nil.
2022-07-14 12:01:29 +03:00
DeleteChannelScheme ( c request . CTX , channel * model . Channel ) ( * model . Channel , * model . AppError )
2020-03-05 14:46:08 +01:00
// DeleteGroupConstrainedMemberships deletes team and channel memberships of users who aren't members of the allowed
// groups of all group-constrained teams and channels.
2023-10-30 16:33:37 +01:00
DeleteGroupConstrainedMemberships ( c request . CTX ) error
2023-05-18 23:44:12 +05:30
// DeletePersistentNotification stops the persistent notifications.
DeletePersistentNotification ( c request . CTX , post * model . Post ) * model . AppError
2020-03-05 14:46:08 +01:00
// DeletePublicKey will delete plugin public key from the config.
DeletePublicKey ( name string ) * model . AppError
2022-01-19 23:37:27 -05:00
// DemoteUserToGuest Convert user's roles and all his membership's roles from
2020-03-05 14:46:08 +01:00
// regular user roles to guest roles.
2023-10-30 16:33:37 +01:00
DemoteUserToGuest ( c request . CTX , user * model . User ) * model . AppError
2024-04-11 11:10:25 -04:00
// DetachPlugin allows the server to bind to an existing plugin instance launched elsewhere.
DetachPlugin ( pluginId string ) * model . AppError
2020-03-05 14:46:08 +01:00
// DisablePlugin will set the config for an installed plugin to disabled, triggering deactivation if active.
// Notifies cluster peers through config change.
DisablePlugin ( id string ) * model . AppError
// DoPermissionsMigrations execute all the permissions migrations need by the current version.
2020-03-23 13:44:20 -04:00
DoPermissionsMigrations ( ) error
2020-03-05 14:46:08 +01:00
// EnablePlugin will set the config for an installed plugin to enabled, triggering asynchronous
// activation if inactive anywhere in the cluster.
// Notifies cluster peers through config change.
EnablePlugin ( id string ) * model . AppError
2022-06-22 14:06:00 +05:30
// EnsureBot provides similar functionality with the plugin-api BotService. It doesn't accept
// any ensureBotOptions hence it is not required for now.
2024-02-15 13:01:44 +01:00
EnsureBot ( rctx request . CTX , pluginID string , bot * model . Bot ) ( string , error )
2020-03-05 14:46:08 +01:00
// Expand announcements in incoming webhooks from Slack. Those announcements
// can be found in the text attribute, or in the pretext, text, title and value
// attributes of the attachment structure. The Slack attachment structure is
// documented here: https://api.slack.com/docs/attachments
ProcessSlackAttachments ( attachments [ ] * model . SlackAttachment ) [ ] * model . SlackAttachment
2020-05-06 15:41:10 -04:00
// ExtendSessionExpiryIfNeeded extends Session.ExpiresAt based on session lengths in config.
// A new ExpiresAt is only written if enough time has elapsed since last update.
// Returns true only if the session was extended.
2023-11-14 13:34:47 +01:00
ExtendSessionExpiryIfNeeded ( rctx request . CTX , session * model . Session ) bool
2020-03-05 14:46:08 +01:00
// FillInPostProps should be invoked before saving posts to fill in properties such as
// channel_mentions.
//
// If channel is nil, FillInPostProps will look up the channel corresponding to the post.
2022-07-14 12:01:29 +03:00
FillInPostProps ( c request . CTX , post * model . Post , channel * model . Channel ) * model . AppError
2020-03-05 14:46:08 +01:00
// FilterNonGroupChannelMembers returns the subset of the given user IDs of the users who are not members of groups
// associated to the channel excluding bots
2021-02-05 11:22:27 +01:00
FilterNonGroupChannelMembers ( userIDs [ ] string , channel * model . Channel ) ( [ ] string , error )
2020-03-05 14:46:08 +01:00
// FilterNonGroupTeamMembers returns the subset of the given user IDs of the users who are not members of groups
// associated to the team excluding bots.
2021-02-05 11:22:27 +01:00
FilterNonGroupTeamMembers ( userIDs [ ] string , team * model . Team ) ( [ ] string , error )
2020-03-05 14:46:08 +01:00
// GetAllLdapGroupsPage retrieves all LDAP groups under the configured base DN using the default or configured group
// filter.
2023-11-03 08:06:16 +01:00
GetAllLdapGroupsPage ( rctx request . CTX , page int , perPage int , opts model . LdapGroupSearchOpts ) ( [ ] * model . Group , int , * model . AppError )
2020-03-05 14:46:08 +01:00
// GetBot returns the given bot.
2024-03-11 20:24:35 +08:00
GetBot ( rctx request . CTX , botUserId string , includeDeleted bool ) ( * model . Bot , * model . AppError )
2020-03-05 14:46:08 +01:00
// GetBots returns the requested page of bots.
2024-03-11 20:24:35 +08:00
GetBots ( rctx request . CTX , options * model . BotGetOptions ) ( model . BotList , * model . AppError )
2020-03-05 14:46:08 +01:00
// GetChannelGroupUsers returns the users who are associated to the channel via GroupChannels and GroupMembers.
GetChannelGroupUsers ( channelID string ) ( [ ] * model . User , * model . AppError )
2020-04-09 11:08:39 +03:00
// GetChannelModerationsForChannel Gets a channels ChannelModerations from either the higherScoped roles or from the channel scheme roles.
2022-07-14 12:01:29 +03:00
GetChannelModerationsForChannel ( c request . CTX , channel * model . Channel ) ( [ ] * model . ChannelModeration , * model . AppError )
2020-03-05 14:46:08 +01:00
// GetClusterPluginStatuses returns the status for plugins installed anywhere in the cluster.
GetClusterPluginStatuses ( ) ( model . PluginStatuses , * model . AppError )
// GetConfigFile proxies access to the given configuration file to the underlying config store.
GetConfigFile ( name string ) ( [ ] byte , error )
2021-08-16 19:46:44 +02:00
// GetEmojiStaticURL returns a relative static URL for system default emojis,
2020-03-05 14:46:08 +01:00
// and the API route for custom ones. Errors if not found or if custom and deleted.
2022-11-03 08:54:59 +01:00
GetEmojiStaticURL ( c request . CTX , emojiName string ) ( string , * model . AppError )
2020-03-05 14:46:08 +01:00
// GetEnvironmentConfig returns a map of configuration keys whose values have been overridden by an environment variable.
2021-04-06 10:39:48 -04:00
// If filter is not nil and returns false for a struct field, that field will be omitted.
2022-07-05 09:46:50 +03:00
GetEnvironmentConfig ( filter func ( reflect . StructField ) bool ) map [ string ] any
2022-09-28 22:22:53 +05:30
// GetFileInfosForPost also returns firstInaccessibleFileTime based on cloud plan's limit.
2023-11-07 10:04:16 +01:00
GetFileInfosForPost ( rctx request . CTX , postID string , fromMaster bool , includeDeleted bool ) ( [ ] * model . FileInfo , int64 , * model . AppError )
2020-07-16 12:37:26 -04:00
// GetFilteredUsersStats is used to get a count of users based on the set of filters supported by UserCountOptions.
GetFilteredUsersStats ( options * model . UserCountOptions ) ( * model . UsersStats , * model . AppError )
2020-05-29 10:46:52 -04:00
// GetGroupsByTeam returns the paged list and the total count of group associated to the given team.
2021-02-05 11:22:27 +01:00
GetGroupsByTeam ( teamID string , opts model . GroupSearchOpts ) ( [ ] * model . GroupWithSchemeAdmin , int , * model . AppError )
2020-04-28 12:52:43 +02:00
// GetKnownUsers returns the list of user ids of users with any direct
// relationship with a user. That means any user sharing any channel, including
// direct and group channels.
GetKnownUsers ( userID string ) ( [ ] string , * model . AppError )
2024-03-21 08:48:24 -04:00
// GetLRUSessions returns the Least Recently Used sessions for userID, skipping over the newest 'offset'
// number of sessions. E.g., if userID has 100 sessions, offset 98 will return the oldest 2 sessions.
GetLRUSessions ( c request . CTX , userID string , limit uint64 , offset uint64 ) ( [ ] * model . Session , * model . AppError )
2022-09-28 22:22:53 +05:30
// GetLastAccessibleFileTime returns CreateAt time(from cache) of the last accessible post as per the cloud limit
GetLastAccessibleFileTime ( ) ( int64 , * model . AppError )
2022-07-06 11:56:39 +05:30
// GetLastAccessiblePostTime returns CreateAt time(from cache) of the last accessible post as per the cloud limit
GetLastAccessiblePostTime ( ) ( int64 , * model . AppError )
2020-03-05 14:46:08 +01:00
// GetLdapGroup retrieves a single LDAP group by the given LDAP group id.
2023-11-03 08:06:16 +01:00
GetLdapGroup ( rctx request . CTX , ldapGroupID string ) ( * model . Group , * model . AppError )
2020-03-05 14:46:08 +01:00
// GetMarketplacePlugins returns a list of plugins from the marketplace-server,
// and plugins that are installed locally.
GetMarketplacePlugins ( filter * model . MarketplacePluginFilter ) ( [ ] * model . MarketplacePlugin , * model . AppError )
// GetPluginStatus returns the status for a plugin installed on this server.
GetPluginStatus ( id string ) ( * model . PluginStatus , * model . AppError )
// GetPluginStatuses returns the status for plugins installed on this server.
GetPluginStatuses ( ) ( model . PluginStatuses , * model . AppError )
// GetPluginsEnvironment returns the plugin environment for use if plugins are enabled and
// initialized.
//
// To get the plugins environment when the plugins are disabled, manually acquire the plugins
// lock instead.
GetPluginsEnvironment ( ) * plugin . Environment
2022-07-06 11:56:39 +05:30
// GetPostsByIds response bool value indicates, if the post is inaccessible due to cloud plan's limit.
2022-07-25 16:01:59 -05:00
GetPostsByIds ( postIDs [ ] string ) ( [ ] * model . Post , int64 , * model . AppError )
2022-06-03 11:48:29 +05:30
// GetPostsUsage returns the total posts count rounded down to the most
// significant digit
2022-05-17 17:00:40 +05:30
GetPostsUsage ( ) ( int64 , * model . AppError )
2020-10-07 17:46:07 +03:00
// GetProductNotices is called from the frontend to fetch the product notices that are relevant to the caller
2023-10-30 16:33:37 +01:00
GetProductNotices ( c request . CTX , userID , teamID string , client model . NoticeClientType , clientVersion string , locale string ) ( model . NoticeMessages , * model . AppError )
2024-01-15 14:29:45 -07:00
// GetProfileImagePaths returns the paths to the profile images for the given user IDs if such a profile image exists.
GetProfileImagePath ( user * model . User ) ( string , * model . AppError )
2020-03-05 14:46:08 +01:00
// GetPublicKey will return the actual public key saved in the `name` file.
GetPublicKey ( name string ) ( [ ] byte , * model . AppError )
// GetSanitizedConfig gets the configuration for a system admin without any secrets.
GetSanitizedConfig ( ) * model . Config
2020-04-09 11:08:39 +03:00
// GetSchemeRolesForChannel Checks if a channel or its team has an override scheme for channel roles and returns the scheme roles or default channel roles.
2022-07-14 12:01:29 +03:00
GetSchemeRolesForChannel ( c request . CTX , channelID string ) ( guestRoleName string , userRoleName string , adminRoleName string , err * model . AppError )
2020-05-06 15:41:10 -04:00
// GetSessionLengthInMillis returns the session length, in milliseconds,
// based on the type of session (Mobile, SSO, Web/LDAP).
GetSessionLengthInMillis ( session * model . Session ) int64
2022-06-03 11:48:29 +05:30
// GetStorageUsage returns the sum of files' sizes stored on this instance
GetStorageUsage ( ) ( int64 , * model . AppError )
2020-05-21 12:24:56 +04:00
// GetSuggestions returns suggestions for user input.
2023-10-30 16:33:37 +01:00
GetSuggestions ( c request . CTX , commandArgs * model . CommandArgs , commands [ ] * model . Command , roleID string ) [ ] model . AutocompleteSuggestion
2020-03-05 14:46:08 +01:00
// GetTeamGroupUsers returns the users who are associated to the team via GroupTeams and GroupMembers.
GetTeamGroupUsers ( teamID string ) ( [ ] * model . User , * model . AppError )
2020-04-09 11:08:39 +03:00
// GetTeamSchemeChannelRoles Checks if a team has an override scheme and returns the scheme channel role names or default channel role names.
2022-07-14 12:01:29 +03:00
GetTeamSchemeChannelRoles ( c request . CTX , teamID string ) ( guestRoleName string , userRoleName string , adminRoleName string , err * model . AppError )
2020-03-05 14:46:08 +01:00
// GetTotalUsersStats is used for the DM list total
GetTotalUsersStats ( viewRestrictions * model . ViewUsersRestrictions ) ( * model . UsersStats , * model . AppError )
2022-08-18 11:01:37 +02:00
// GetUserStatusesByIds used by apiV4
GetUserStatusesByIds ( userIDs [ ] string ) ( [ ] * model . Status , * model . AppError )
2021-04-01 13:44:56 -04:00
// HasRemote returns whether a given channelID is present in the channel remotes or not.
HasRemote ( channelID string , remoteID string ) ( bool , error )
2020-04-23 13:16:18 +05:30
// HubRegister registers a connection to a hub.
2022-10-06 11:04:21 +03:00
HubRegister ( webConn * platform . WebConn )
2020-04-23 13:16:18 +05:30
// HubUnregister unregisters a connection from a hub.
2022-10-06 11:04:21 +03:00
HubUnregister ( webConn * platform . WebConn )
2023-08-08 18:29:57 -03:00
// InstallPlugin unpacks and installs a plugin but does not enable or activate it unless the the
// plugin was already enabled.
2020-03-05 14:46:08 +01:00
InstallPlugin ( pluginFile io . ReadSeeker , replace bool ) ( * model . Manifest , * model . AppError )
2020-07-22 18:48:46 -04:00
// LogAuditRec logs an audit record using default LvlAuditCLI.
2023-11-14 13:34:47 +01:00
LogAuditRec ( rctx request . CTX , rec * audit . Record , err error )
2020-04-09 11:08:39 +03:00
// LogAuditRecWithLevel logs an audit record using specified Level.
2023-11-14 13:34:47 +01:00
LogAuditRecWithLevel ( rctx request . CTX , rec * audit . Record , level mlog . Level , err error )
2020-04-09 11:08:39 +03:00
// MakeAuditRecord creates a audit record pre-populated with defaults.
2023-11-14 13:34:47 +01:00
MakeAuditRecord ( rctx request . CTX , event string , initialStatus string ) * audit . Record
2020-03-05 14:46:08 +01:00
// MarkChanelAsUnreadFromPost will take a post and set the channel as unread from that one.
2022-07-14 12:01:29 +03:00
MarkChannelAsUnreadFromPost ( c request . CTX , postID string , userID string , collapsedThreadsSupported bool ) ( * model . ChannelUnreadAt , * model . AppError )
2020-08-12 18:29:58 +02:00
// MentionsToPublicChannels returns all the mentions to public channels,
// linking them to their channels
2022-07-14 12:01:29 +03:00
MentionsToPublicChannels ( c request . CTX , message , teamID string ) model . ChannelMentionMap
2020-08-12 18:29:58 +02:00
// MentionsToTeamMembers returns all the @ mentions found in message that
// belong to users in the specified team, linking them to their users
2022-08-02 20:48:54 +05:30
MentionsToTeamMembers ( c request . CTX , message , teamID string ) model . UserMentionMap
2020-06-22 16:57:49 +03:00
// MoveChannel method is prone to data races if someone joins to channel during the move process. However this
2020-12-01 17:27:05 +02:00
// function is only exposed to sysadmins and the possibility of this edge case is relatively small.
2022-07-14 12:01:29 +03:00
MoveChannel ( c request . CTX , team * model . Team , channel * model . Channel , user * model . User ) * model . AppError
2020-06-17 14:47:54 -04:00
// NotifySessionsExpired is called periodically from the job server to notify any mobile sessions that have expired.
2022-02-14 18:21:18 +01:00
NotifySessionsExpired ( ) error
2024-01-16 09:48:51 -05:00
// OnSharedChannelsAttachmentSyncMsg is called by the Shared Channels service for a registered plugin when a file attachment
// needs to be synchronized.
OnSharedChannelsAttachmentSyncMsg ( fi * model . FileInfo , post * model . Post , rc * model . RemoteCluster ) error
// OnSharedChannelsPing is called by the Shared Channels service for a registered plugin to check that the plugin
Shared channels plugin APIs for MS Teams plugin (#25805)
New plugin APIs and hooks for accessing Shared Channels service via plugin.
- RegisterPluginForSharedChannels(opts model.RegisterPluginOpts) (remoteID string, err error)
- UnregisterPluginForSharedChannels(pluginID string) error
- ShareChannel(sc *model.SharedChannel) (*model.SharedChannel, error)
- UpdateSharedChannel(sc *model.SharedChannel) (*model.SharedChannel, error)
- UnshareChannel(channelID string) (unshared bool, err error)
- UpdateSharedChannelCursor(channelID, remoteID string, cusror model.GetPostsSinceForSyncCursor) error
- SyncSharedChannel(channelID string) error
- InviteRemoteToChannel(channelID string, remoteID string, userID string) error
- UninviteRemoteFromChannel(channelID string, remoteID string) error
Hooks
- OnSharedChannelsSyncMsg(msg *model.SyncMsg, rc *model.RemoteCluster) (model.SyncResponse, error)
- OnSharedChannelsPing(rc *model.RemoteCluster) bool
2023-12-22 17:00:27 -05:00
// is still responding and has a connection to any upstream services it needs (e.g. MS Graph API).
OnSharedChannelsPing ( rc * model . RemoteCluster ) bool
2024-01-16 09:48:51 -05:00
// OnSharedChannelsProfileImageSyncMsg is called by the Shared Channels service for a registered plugin when a user's
// profile image needs to be synchronized.
OnSharedChannelsProfileImageSyncMsg ( user * model . User , rc * model . RemoteCluster ) error
Shared channels plugin APIs for MS Teams plugin (#25805)
New plugin APIs and hooks for accessing Shared Channels service via plugin.
- RegisterPluginForSharedChannels(opts model.RegisterPluginOpts) (remoteID string, err error)
- UnregisterPluginForSharedChannels(pluginID string) error
- ShareChannel(sc *model.SharedChannel) (*model.SharedChannel, error)
- UpdateSharedChannel(sc *model.SharedChannel) (*model.SharedChannel, error)
- UnshareChannel(channelID string) (unshared bool, err error)
- UpdateSharedChannelCursor(channelID, remoteID string, cusror model.GetPostsSinceForSyncCursor) error
- SyncSharedChannel(channelID string) error
- InviteRemoteToChannel(channelID string, remoteID string, userID string) error
- UninviteRemoteFromChannel(channelID string, remoteID string) error
Hooks
- OnSharedChannelsSyncMsg(msg *model.SyncMsg, rc *model.RemoteCluster) (model.SyncResponse, error)
- OnSharedChannelsPing(rc *model.RemoteCluster) bool
2023-12-22 17:00:27 -05:00
// OnSharedChannelsSyncMsg is called by the Shared Channels service for a registered plugin when there is new content
// that needs to be synchronized.
OnSharedChannelsSyncMsg ( msg * model . SyncMsg , rc * model . RemoteCluster ) ( model . SyncResponse , error )
2020-03-05 14:46:08 +01:00
// OverrideIconURLIfEmoji changes the post icon override URL prop, if it has an emoji icon,
// so that it points to the URL (relative) of the emoji - static if emoji is default, /api if custom.
2022-11-03 08:54:59 +01:00
OverrideIconURLIfEmoji ( c request . CTX , post * model . Post )
2020-03-05 14:46:08 +01:00
// PatchBot applies the given patch to the bot and corresponding user.
2023-12-04 18:34:57 +01:00
PatchBot ( rctx request . CTX , botUserId string , botPatch * model . BotPatch ) ( * model . Bot , * model . AppError )
2020-04-09 11:08:39 +03:00
// PatchChannelModerationsForChannel Updates a channels scheme roles based on a given ChannelModerationPatch, if the permissions match the higher scoped role the scheme is deleted.
2022-07-14 12:01:29 +03:00
PatchChannelModerationsForChannel ( c request . CTX , channel * model . Channel , channelModerationsPatch [ ] * model . ChannelModerationPatch ) ( [ ] * model . ChannelModeration , * model . AppError )
2020-03-05 14:46:08 +01:00
// Perform an HTTP POST request to an integration's action endpoint.
// Caller must consume and close returned http.Response as necessary.
// For internal requests, requests are routed directly to a plugin ServerHTTP hook
2023-10-30 16:33:37 +01:00
DoActionRequest ( c request . CTX , rawURL string , body [ ] byte ) ( * http . Response , * model . AppError )
2020-03-05 14:46:08 +01:00
// PermanentDeleteBot permanently deletes a bot and its corresponding user.
2024-03-11 20:24:35 +08:00
PermanentDeleteBot ( rctx request . CTX , botUserId string ) * model . AppError
MM-32950: Reliable WebSockets: Basic single server (#17406)
* MM-32950: Reliable WebSockets: Basic single server
This PR adds reliable websocket support for a single server.
Below is a brief overview of the three states of a connection:
Normal:
- All messages are routed via web hub.
- Each web conn has a send queue to which it gets pushed.
- A message gets pulled from the queue, and before it
gets written to the wire, it is added to the dead queue.
Disconnect:
- Hub Unregister gets called, where the connection is just
marked as inactive. And new messages keep getting pushed
to the send queue.
If it gets full, the channel is closed and the conn gets removed
from conn index.
Reconnect:
- We query the hub for the connection ID, and get back the
queues.
- We construct a WebConn reusing the old queues, or a fresh one
depending on whether the connection ID was found or not.
- Now there is a tricky bit here which needs to be carefully processed.
On register, we would always send the hello message in the send queue.
But we cannot do that now because the send queue might already have messages.
Therefore, we don't send the hello message from web hub, if we reuse a connection.
Instead, we move that logic to the web conn write pump. We check if
the sequence number is in dead queue, and if it is, then we drain
the dead queue, and start consuming from the active queue.
No hello message is sent here.
But if the message does not exist in the dead queue, and the sequence number
is actually something that should have existed, then we set
a new connction id and clear the dead queue, and send a hello message.
The client, on receiving a new connection id will automatically
set its sequence number to 0, and make the sync API calls to manage
any lost data.
https://mattermost.atlassian.net/browse/MM-32590
```release-note
NONE
```
* gofmt
* Add EnableReliableWebSockets to the client config
* Refactoring isInDeadQueue
* Passing index to drainDeadQueue
* refactoring webconn
* fix pointer
* review comments
* simplify hasMsgLoss
* safety comment
* fix test
* Trigger CI
* Trigger CI
Co-authored-by: Devin Binnie <devin.binnie@mattermost.com>
Co-authored-by: Mattermod <mattermod@users.noreply.github.com>
2021-04-26 19:51:25 +05:30
// PopulateWebConnConfig checks if the connection id already exists in the hub,
// and if so, accordingly populates the other fields of the webconn.
2022-10-06 11:04:21 +03:00
PopulateWebConnConfig ( s * model . Session , cfg * platform . WebConnConfig , seqVal string ) ( * platform . WebConnConfig , error )
2022-01-19 23:37:27 -05:00
// PromoteGuestToUser Convert user's roles and all his membership's roles from
2020-03-05 14:46:08 +01:00
// guest roles to regular user roles.
2023-10-30 16:33:37 +01:00
PromoteGuestToUser ( c request . CTX , user * model . User , requestorId string ) * model . AppError
2024-04-11 11:10:25 -04:00
// ReattachPlugin allows the server to bind to an existing plugin instance launched elsewhere.
ReattachPlugin ( manifest * model . Manifest , pluginReattachConfig * model . PluginReattachConfig ) * model . AppError
2022-08-08 16:52:31 +03:00
// Removes a listener function by the unique ID returned when AddConfigListener was called
RemoveConfigListener ( id string )
2020-03-05 14:46:08 +01:00
// RenameChannel is used to rename the channel Name and the DisplayName fields
2022-07-14 12:01:29 +03:00
RenameChannel ( c request . CTX , channel * model . Channel , newChannelName string , newDisplayName string ) ( * model . Channel , * model . AppError )
2020-03-05 14:46:08 +01:00
// RenameTeam is used to rename the team Name and the DisplayName fields
RenameTeam ( team * model . Team , newTeamName string , newDisplayName string ) ( * model . Team , * model . AppError )
2023-05-18 23:44:12 +05:30
// ResolvePersistentNotification stops the persistent notifications, if a loggedInUserID(except the post owner) reacts, reply or ack on the post.
// Post-owner can only delete the original post to stop the notifications.
ResolvePersistentNotification ( c request . CTX , post * model . Post , loggedInUserID string ) * model . AppError
2020-03-05 14:46:08 +01:00
// RevokeSessionsFromAllUsers will go through all the sessions active
// in the server and revoke them
RevokeSessionsFromAllUsers ( ) * model . AppError
// SaveConfig replaces the active configuration, optionally notifying cluster peers.
2021-05-21 09:04:39 +02:00
SaveConfig ( newCfg * model . Config , sendConfigChangeClusterMessage bool ) ( * model . Config , * model . Config , * model . AppError )
2020-03-05 14:46:08 +01:00
// SearchAllChannels returns a list of channels, the total count of the results of the search (if the paginate search option is true), and an error.
2022-07-14 12:01:29 +03:00
SearchAllChannels ( c request . CTX , term string , opts model . ChannelSearchOpts ) ( model . ChannelListWithTeamData , int64 , * model . AppError )
2020-03-05 14:46:08 +01:00
// SearchAllTeams returns a team list and the total count of the results
SearchAllTeams ( searchOpts * model . TeamSearch ) ( [ ] * model . Team , int64 , * model . AppError )
2020-12-03 16:02:43 -05:00
// SendNoCardPaymentFailedEmail
SendNoCardPaymentFailedEmail ( ) * model . AppError
2022-07-12 23:26:48 +05:30
// SessionHasPermissionToChannels returns true only if user has access to all channels.
2022-07-14 12:01:29 +03:00
SessionHasPermissionToChannels ( c request . CTX , session model . Session , channelIDs [ ] string , permission * model . Permission ) bool
2020-03-05 14:46:08 +01:00
// SessionHasPermissionToManageBot returns nil if the session has access to manage the given bot.
// This function deviates from other authorization checks in returning an error instead of just
// a boolean, allowing the permission failure to be exposed with more granularity.
2024-03-11 20:24:35 +08:00
SessionHasPermissionToManageBot ( rctx request . CTX , session model . Session , botUserId string ) * model . AppError
2022-07-12 23:26:48 +05:30
// SessionHasPermissionToTeams returns true only if user has access to all teams.
2022-07-14 12:01:29 +03:00
SessionHasPermissionToTeams ( c request . CTX , session model . Session , teamIDs [ ] string , permission * model . Permission ) bool
2020-05-19 08:25:52 -06:00
// SessionIsRegistered determines if a specific session has been registered
SessionIsRegistered ( session model . Session ) bool
2022-04-28 17:31:35 -04:00
// SetSessionExpireInHours sets the session's expiry the specified number of hours
2020-08-04 16:10:37 -04:00
// relative to either the session creation date or the current time, depending
// on the `ExtendSessionOnActivity` config setting.
2022-04-28 17:31:35 -04:00
SetSessionExpireInHours ( session * model . Session , hours int )
2021-06-17 00:08:26 +05:30
// SetStatusDoNotDisturbTimed takes endtime in unix epoch format in UTC
// and sets status of given userId to dnd which will be restored back after endtime
SetStatusDoNotDisturbTimed ( userId string , endtime int64 )
2020-03-05 14:46:08 +01:00
// SetStatusLastActivityAt sets the last activity at for a user on the local app server and updates
// status to away if needed. Used by the WS to set status to away if an 'online' device disconnects
// while an 'away' device is still connected
2021-02-05 11:22:27 +01:00
SetStatusLastActivityAt ( userID string , activityAt int64 )
2021-05-04 12:37:36 -04:00
// SyncLdap starts an LDAP sync job.
// If includeRemovedMembers is true, then members who left or were removed from a team/channel will
// be re-added; otherwise, they will not be re-added.
2023-10-30 16:33:37 +01:00
SyncLdap ( c request . CTX , includeRemovedMembers bool )
2020-03-05 14:46:08 +01:00
// SyncPlugins synchronizes the plugins installed locally
// with the plugin bundles available in the file store.
SyncPlugins ( ) * model . AppError
// SyncRolesAndMembership updates the SchemeAdmin status and membership of all of the members of the given
// syncable.
2022-08-05 08:49:01 +05:30
SyncRolesAndMembership ( c request . CTX , syncableID string , syncableType model . GroupSyncableType , includeRemovedMembers bool )
Shared channels plugin APIs for MS Teams plugin (#25805)
New plugin APIs and hooks for accessing Shared Channels service via plugin.
- RegisterPluginForSharedChannels(opts model.RegisterPluginOpts) (remoteID string, err error)
- UnregisterPluginForSharedChannels(pluginID string) error
- ShareChannel(sc *model.SharedChannel) (*model.SharedChannel, error)
- UpdateSharedChannel(sc *model.SharedChannel) (*model.SharedChannel, error)
- UnshareChannel(channelID string) (unshared bool, err error)
- UpdateSharedChannelCursor(channelID, remoteID string, cusror model.GetPostsSinceForSyncCursor) error
- SyncSharedChannel(channelID string) error
- InviteRemoteToChannel(channelID string, remoteID string, userID string) error
- UninviteRemoteFromChannel(channelID string, remoteID string) error
Hooks
- OnSharedChannelsSyncMsg(msg *model.SyncMsg, rc *model.RemoteCluster) (model.SyncResponse, error)
- OnSharedChannelsPing(rc *model.RemoteCluster) bool
2023-12-22 17:00:27 -05:00
// SyncSharedChannel forces a shared channel to send any changed content to all remote clusters.
SyncSharedChannel ( channelID string ) error
2020-03-05 14:46:08 +01:00
// SyncSyncableRoles updates the SchemeAdmin field value of the given syncable's members based on the configuration of
// the member's group memberships and the configuration of those groups to the syncable. This method should only
// be invoked on group-synced (aka group-constrained) syncables.
SyncSyncableRoles ( syncableID string , syncableType model . GroupSyncableType ) * model . AppError
// TeamMembersMinusGroupMembers returns the set of users on the given team minus the set of users in the given
// groups.
//
// The result can be used, for example, to determine the set of users who would be removed from a team if the team
// were group-constrained with the given groups.
TeamMembersMinusGroupMembers ( teamID string , groupIDs [ ] string , page , perPage int ) ( [ ] * model . UserWithGroups , int64 , * model . AppError )
2021-05-04 12:37:36 -04:00
// TeamMembersToAdd returns a slice of UserTeamIDPair that need newly created memberships
// based on the groups configurations. The returned list can be optionally scoped to a single given team.
//
// Typically since will be the last successful group sync time.
// If includeRemovedMembers is true, then team members who left or were removed from the team will
// be included; otherwise, they will be excluded.
TeamMembersToAdd ( since int64 , teamID * string , includeRemovedMembers bool ) ( [ ] * model . UserTeamIDPair , * model . AppError )
2020-03-05 14:46:08 +01:00
// This function migrates the default built in roles from code/config to the database.
DoAdvancedPermissionsMigration ( )
2021-02-01 15:18:52 -05:00
// This function zip's up all the files in fileDatas array and then saves it to the directory specified with the specified zip file name
// Ensure the zip file name ends with a .zip
2021-03-02 14:37:21 +01:00
CreateZipFileAndAddFiles ( fileBackend filestore . FileBackend , fileDatas [ ] model . FileData , zipFileName , directory string ) error
2020-03-05 14:46:08 +01:00
// This to be used for places we check the users password when they are already logged in
2023-11-08 14:39:09 +01:00
DoubleCheckPassword ( rctx request . CTX , user * model . User , password string ) * model . AppError
2020-03-05 14:46:08 +01:00
// UpdateBotActive marks a bot as active or inactive, along with its corresponding user.
2024-03-11 20:24:35 +08:00
UpdateBotActive ( rctx request . CTX , botUserId string , active bool ) ( * model . Bot , * model . AppError )
2020-03-05 14:46:08 +01:00
// UpdateBotOwner changes a bot's owner to the given value.
2024-03-11 20:24:35 +08:00
UpdateBotOwner ( rctx request . CTX , botUserId , newOwnerId string ) ( * model . Bot , * model . AppError )
2020-03-05 14:46:08 +01:00
// UpdateChannel updates a given channel by its Id. It also publishes the CHANNEL_UPDATED event.
2022-07-14 12:01:29 +03:00
UpdateChannel ( c request . CTX , channel * model . Channel ) ( * model . Channel , * model . AppError )
2020-04-09 11:08:39 +03:00
// UpdateChannelScheme saves the new SchemeId of the channel passed.
2022-07-14 12:01:29 +03:00
UpdateChannelScheme ( c request . CTX , channel * model . Channel ) ( * model . Channel , * model . AppError )
2021-06-17 00:08:26 +05:30
// UpdateDNDStatusOfUsers is a recurring task which is started when server starts
// which unsets dnd status of users if needed and saves and broadcasts it
UpdateDNDStatusOfUsers ( )
2020-10-07 17:46:07 +03:00
// UpdateProductNotices is called periodically from a scheduled worker to fetch new notices and update the cache
UpdateProductNotices ( ) * model . AppError
Shared channels plugin APIs for MS Teams plugin (#25805)
New plugin APIs and hooks for accessing Shared Channels service via plugin.
- RegisterPluginForSharedChannels(opts model.RegisterPluginOpts) (remoteID string, err error)
- UnregisterPluginForSharedChannels(pluginID string) error
- ShareChannel(sc *model.SharedChannel) (*model.SharedChannel, error)
- UpdateSharedChannel(sc *model.SharedChannel) (*model.SharedChannel, error)
- UnshareChannel(channelID string) (unshared bool, err error)
- UpdateSharedChannelCursor(channelID, remoteID string, cusror model.GetPostsSinceForSyncCursor) error
- SyncSharedChannel(channelID string) error
- InviteRemoteToChannel(channelID string, remoteID string, userID string) error
- UninviteRemoteFromChannel(channelID string, remoteID string) error
Hooks
- OnSharedChannelsSyncMsg(msg *model.SyncMsg, rc *model.RemoteCluster) (model.SyncResponse, error)
- OnSharedChannelsPing(rc *model.RemoteCluster) bool
2023-12-22 17:00:27 -05:00
// UpdateSharedChannelCursor updates the cursor for the specified channelID and remoteID.
// This can be used to manually set the point of last sync, either forward to skip older posts,
// or backward to re-sync history.
// This call by itself does not force a re-sync - a change to channel contents or a call to
// SyncSharedChannel are needed to force a sync.
UpdateSharedChannelCursor ( channelID , remoteID string , cursor model . GetPostsSinceForSyncCursor ) error
2020-10-07 17:46:07 +03:00
// UpdateViewedProductNotices is called from the frontend to mark a set of notices as 'viewed' by user
2021-02-05 11:22:27 +01:00
UpdateViewedProductNotices ( userID string , noticeIds [ ] string ) * model . AppError
2020-10-07 17:46:07 +03:00
// UpdateViewedProductNoticesForNewUser is called when new user is created to mark all current notices for this
// user as viewed in order to avoid showing them imminently on first login
2021-02-05 11:22:27 +01:00
UpdateViewedProductNoticesForNewUser ( userID string )
2020-04-23 13:16:18 +05:30
// UpdateWebConnUserActivity sets the LastUserActivityAt of the hub for the given session.
UpdateWebConnUserActivity ( session model . Session , activityAt int64 )
2020-03-05 14:46:08 +01:00
// UploadFile uploads a single file in form of a completely constructed byte array for a channel.
2022-08-02 20:48:54 +05:30
UploadFile ( c request . CTX , data [ ] byte , channelID string , filename string ) ( * model . FileInfo , * model . AppError )
2020-03-05 14:46:08 +01:00
// UploadFileX uploads a single file as specified in t. It applies the upload
// constraints, executes plugins and image processing logic as needed. It
// returns a filled-out FileInfo and an optional error. A plugin may reject the
// upload, returning a rejection error. In this case FileInfo would have
// contained the last "good" FileInfo before the execution of that plugin.
2023-10-30 16:33:37 +01:00
UploadFileX ( c request . CTX , channelID , name string , input io . Reader , opts ... func ( * UploadFileTask ) ) ( * model . FileInfo , * model . AppError )
2020-03-05 14:46:08 +01:00
// UserIsInAdminRoleGroup returns true at least one of the user's groups are configured to set the members as
// admins in the given syncable.
UserIsInAdminRoleGroup ( userID , syncableID string , syncableType model . GroupSyncableType ) ( bool , * model . AppError )
2023-01-30 16:19:27 +01:00
// ValidateUserPermissionsOnChannels filters channelIds based on whether userId is authorized to manage channel members. Unauthorized channels are removed from the returned list.
ValidateUserPermissionsOnChannels ( c request . CTX , userId string , channelIds [ ] string ) [ ] string
2020-03-05 14:46:08 +01:00
// VerifyPlugin checks that the given signature corresponds to the given plugin and matches a trusted certificate.
VerifyPlugin ( plugin , signature io . ReadSeeker ) * model . AppError
2023-12-11 15:27:34 -05:00
// validateMoveOrCopy performs validation on a provided post list to determine
// if all permissions are in place to allow the for the posts to be moved or
// copied.
ValidateMoveOrCopy ( c request . CTX , wpl * model . WranglerPostList , originalChannel * model . Channel , targetChannel * model . Channel , user * model . User ) error
2020-02-13 13:26:58 +01:00
AccountMigration ( ) einterfaces . AccountMigrationInterface
2021-02-05 11:22:27 +01:00
ActivateMfa ( userID , token string ) * model . AppError
2023-04-14 14:28:50 +05:30
ActiveSearchBackend ( ) string
2021-04-20 13:16:40 -04:00
AddChannelsToRetentionPolicy ( policyID string , channelIDs [ ] string ) * model . AppError
2020-02-13 13:26:58 +01:00
AddConfigListener ( listener func ( * model . Config , * model . Config ) ) string
2022-07-14 12:01:29 +03:00
AddDirectChannels ( c request . CTX , teamID string , user * model . User ) * model . AppError
2020-09-14 12:53:42 -06:00
AddLdapPrivateCertificate ( fileData * multipart . FileHeader ) * model . AppError
AddLdapPublicCertificate ( fileData * multipart . FileHeader ) * model . AppError
2024-03-13 10:26:06 +05:30
AddLicenseListener ( listener func ( oldLicense , newLicense * model . License ) ) string
2021-04-01 13:44:56 -04:00
AddRemoteCluster ( rc * model . RemoteCluster ) ( * model . RemoteCluster , * model . AppError )
2020-02-13 13:26:58 +01:00
AddSamlIdpCertificate ( fileData * multipart . FileHeader ) * model . AppError
AddSamlPrivateCertificate ( fileData * multipart . FileHeader ) * model . AppError
AddSamlPublicCertificate ( fileData * multipart . FileHeader ) * model . AppError
AddSessionToCache ( session * model . Session )
2022-08-05 08:49:01 +05:30
AddTeamMember ( c request . CTX , teamID , userID string ) ( * model . TeamMember , * model . AppError )
2023-10-30 16:33:37 +01:00
AddTeamMemberByInviteId ( c request . CTX , inviteId , userID string ) ( * model . TeamMember , * model . AppError )
AddTeamMemberByToken ( c request . CTX , userID , tokenID string ) ( * model . TeamMember , * model . AppError )
AddTeamMembers ( c request . CTX , teamID string , userIDs [ ] string , userRequestorId string , graceful bool ) ( [ ] * model . TeamMemberWithError , * model . AppError )
2021-04-20 13:16:40 -04:00
AddTeamsToRetentionPolicy ( policyID string , teamIDs [ ] string ) * model . AppError
2022-08-05 08:49:01 +05:30
AddUserToTeam ( c request . CTX , teamID string , userID string , userRequestorId string ) ( * model . Team , * model . TeamMember , * model . AppError )
2023-10-30 16:33:37 +01:00
AddUserToTeamByInviteId ( c request . CTX , inviteId string , userID string ) ( * model . Team , * model . TeamMember , * model . AppError )
AddUserToTeamByTeamId ( c request . CTX , teamID string , user * model . User ) * model . AppError
AddUserToTeamByToken ( c request . CTX , userID string , tokenID string ) ( * model . Team , * model . TeamMember , * model . AppError )
2020-05-19 08:25:52 -06:00
AdjustImage ( file io . Reader ) ( * bytes . Buffer , * model . AppError )
2022-05-24 09:16:24 -04:00
AdjustInProductLimits ( limits * model . ProductLimits , subscription * model . Subscription ) * model . AppError
AdjustTeamsFromProductLimits ( teamLimits * model . TeamsLimits ) * model . AppError
2023-10-30 16:33:37 +01:00
AllowOAuthAppAccessToUser ( c request . CTX , userID string , authRequest * model . AuthorizeRequest ) ( string , * model . AppError )
2020-09-15 21:28:25 +02:00
AppendFile ( fr io . Reader , path string ) ( int64 , * model . AppError )
2020-02-13 13:26:58 +01:00
AsymmetricSigningKey ( ) * ecdsa . PrivateKey
2023-10-30 16:33:37 +01:00
AttachCloudSessionCookie ( c request . CTX , w http . ResponseWriter , r * http . Request )
2021-02-25 20:22:27 +01:00
AttachDeviceId ( sessionID string , deviceID string , expiresAt int64 ) * model . AppError
2023-10-30 16:33:37 +01:00
AttachSessionCookies ( c request . CTX , w http . ResponseWriter , r * http . Request )
AuthenticateUserForLogin ( c request . CTX , id , loginId , password , mfaToken , cwsToken string , ldapOnly bool ) ( user * model . User , err * model . AppError )
AuthorizeOAuthUser ( c request . CTX , w http . ResponseWriter , r * http . Request , service , code , state , redirectURI string ) ( io . ReadCloser , string , map [ string ] string , * model . User , * model . AppError )
2022-07-14 12:01:29 +03:00
AutocompleteChannels ( c request . CTX , userID , term string ) ( model . ChannelListWithTeamData , * model . AppError )
AutocompleteChannelsForSearch ( c request . CTX , teamID string , userID string , term string ) ( model . ChannelList , * model . AppError )
AutocompleteChannelsForTeam ( c request . CTX , teamID , userID , term string ) ( model . ChannelList , * model . AppError )
2023-12-04 18:34:57 +01:00
AutocompleteUsersInChannel ( rctx request . CTX , teamID string , channelID string , term string , options * model . UserSearchOptions ) ( * model . UserAutocompleteInChannel , * model . AppError )
AutocompleteUsersInTeam ( rctx request . CTX , teamID string , term string , options * model . UserSearchOptions ) ( * model . UserAutocompleteInTeam , * model . AppError )
2022-08-02 20:48:54 +05:30
BuildPostReactions ( ctx request . CTX , postID string ) ( * [ ] ReactionImportData , * model . AppError )
2022-07-14 12:01:29 +03:00
BuildPushNotificationMessage ( c request . CTX , contentsConfig string , post * model . Post , user * model . User , channel * model . Channel , channelName string , senderName string , explicitMention bool , channelWideMention bool , replyToThreadType string ) ( * model . PushNotification , * model . AppError )
2020-02-13 13:26:58 +01:00
BuildSamlMetadataObject ( idpMetadata [ ] byte ) ( * model . SamlMetadataResponse , * model . AppError )
2023-01-10 09:57:02 +05:30
BulkExport ( ctx request . CTX , writer io . Writer , outPath string , job * model . Job , opts model . BulkExportOpts ) * model . AppError
2023-10-30 16:33:37 +01:00
BulkImport ( c request . CTX , jsonlReader io . Reader , attachmentsReader * zip . Reader , dryRun bool , workers int ) ( * model . AppError , int )
2024-04-03 09:04:33 +05:30
BulkImportWithPath ( c request . CTX , jsonlReader io . Reader , attachmentsReader * zip . Reader , dryRun , extractContent bool , workers int , importPath string ) ( * model . AppError , int )
2022-09-02 13:52:48 +03:00
CanNotifyAdmin ( trial bool ) bool
2023-10-30 16:33:37 +01:00
CancelJob ( c request . CTX , jobId string ) * model . AppError
2020-02-13 13:26:58 +01:00
ChannelMembersToRemove ( teamID * string ) ( [ ] * model . ChannelMember , * model . AppError )
2021-11-12 10:35:14 +05:30
Channels ( ) * Channels
2021-04-01 13:44:56 -04:00
CheckCanInviteToSharedChannel ( channelId string ) error
2020-02-13 13:26:58 +01:00
CheckForClientSideCert ( r * http . Request ) ( string , string , string )
2021-06-06 18:40:22 +03:00
CheckIntegrity ( ) <- chan model . IntegrityCheckResult
2020-12-20 12:53:07 +01:00
CheckMandatoryS3Fields ( settings * model . FileSettings ) * model . AppError
2023-11-08 14:39:09 +01:00
CheckPasswordAndAllCriteria ( rctx request . CTX , user * model . User , password string , mfaToken string ) * model . AppError
2024-02-16 23:12:49 +07:00
CheckPostReminders ( rctx request . CTX )
2020-02-13 13:26:58 +01:00
CheckRolesExist ( roleNames [ ] string ) * model . AppError
2023-11-08 14:39:09 +01:00
CheckUserAllAuthenticationCriteria ( rctx request . CTX , user * model . User , mfaToken string ) * model . AppError
CheckUserMfa ( rctx request . CTX , user * model . User , token string ) * model . AppError
CheckUserPostflightAuthenticationCriteria ( rctx request . CTX , user * model . User ) * model . AppError
CheckUserPreflightAuthenticationCriteria ( rctx request . CTX , user * model . User , mfaToken string ) * model . AppError
2022-10-06 11:04:21 +03:00
CheckWebConn ( userID , connectionID string ) * platform . CheckConnResult
2024-01-19 15:22:17 -05:00
CleanupReportChunks ( format string , prefix string , numberOfChunks int ) * model . AppError
2022-08-05 08:49:01 +05:30
ClearChannelMembersCache ( c request . CTX , channelID string ) error
2023-11-29 17:07:54 +01:00
ClearLatestVersionCache ( rctx request . CTX )
2020-02-13 13:26:58 +01:00
ClearSessionCacheForAllUsers ( )
ClearSessionCacheForAllUsersSkipClusterSend ( )
2021-02-05 11:22:27 +01:00
ClearSessionCacheForUser ( userID string )
ClearSessionCacheForUserSkipClusterSend ( userID string )
2022-08-05 08:49:01 +05:30
ClearTeamMembersCache ( teamID string ) error
2020-02-13 13:26:58 +01:00
ClientConfig ( ) map [ string ] string
ClientConfigHash ( ) string
2020-09-28 12:18:47 -04:00
Cloud ( ) einterfaces . CloudInterface
2020-02-13 13:26:58 +01:00
Cluster ( ) einterfaces . ClusterInterface
2021-02-25 20:22:27 +01:00
CompareAndDeletePluginKey ( pluginID string , key string , oldValue [ ] byte ) ( bool , * model . AppError )
CompareAndSetPluginKey ( pluginID string , key string , oldValue , newValue [ ] byte ) ( bool , * model . AppError )
2024-01-19 15:22:17 -05:00
CompileReportChunks ( format string , prefix string , numberOfChunks int , headers [ ] string ) * model . AppError
2023-10-30 16:33:37 +01:00
CompleteOAuth ( c request . CTX , service string , body io . ReadCloser , teamID string , props map [ string ] string , tokenUser * model . User ) ( * model . User , * model . AppError )
CompleteOnboarding ( c request . CTX , request * model . CompleteOnboardingRequest ) * model . AppError
CompleteSwitchWithOAuth ( c request . CTX , service string , userData io . Reader , email string , tokenUser * model . User ) ( * model . User , * model . AppError )
2020-02-13 13:26:58 +01:00
Compliance ( ) einterfaces . ComplianceInterface
Config ( ) * model . Config
2023-09-19 18:11:34 +05:30
ConvertGroupMessageToChannel ( c request . CTX , convertedByUserId string , gmConversionRequest * model . GroupMessageConversionRequestBody ) ( * model . Channel , * model . AppError )
2023-12-04 18:34:57 +01:00
CopyFileInfos ( rctx request . CTX , userID string , fileIDs [ ] string ) ( [ ] string , * model . AppError )
2023-12-11 15:27:34 -05:00
CopyWranglerPostlist ( c request . CTX , wpl * model . WranglerPostList , targetChannel * model . Channel ) ( * model . Post , * model . AppError )
2022-07-14 12:01:29 +03:00
CreateChannel ( c request . CTX , channel * model . Channel , addMember bool ) ( * model . Channel , * model . AppError )
2024-03-12 22:36:05 +08:00
CreateChannelBookmark ( c request . CTX , newBookmark * model . ChannelBookmark , connectionId string ) ( * model . ChannelBookmarkWithFileInfo , * model . AppError )
2022-07-14 12:01:29 +03:00
CreateChannelWithUser ( c request . CTX , channel * model . Channel , userID string ) ( * model . Channel , * model . AppError )
2020-02-13 13:26:58 +01:00
CreateCommand ( cmd * model . Command ) ( * model . Command , * model . AppError )
2021-02-05 11:22:27 +01:00
CreateCommandWebhook ( commandID string , args * model . CommandArgs ) ( * model . CommandWebhook , * model . AppError )
2022-11-03 08:54:59 +01:00
CreateEmoji ( c request . CTX , sessionUserId string , emoji * model . Emoji , multiPartImageData * multipart . Form ) ( * model . Emoji , * model . AppError )
2020-02-13 13:26:58 +01:00
CreateGroup ( group * model . Group ) ( * model . Group , * model . AppError )
2022-07-14 12:01:29 +03:00
CreateGroupChannel ( c request . CTX , userIDs [ ] string , creatorId string ) ( * model . Channel , * model . AppError )
2022-02-17 12:34:39 -05:00
CreateGroupWithUserIds ( group * model . GroupWithUserIds ) ( * model . Group , * model . AppError )
2020-02-13 13:26:58 +01:00
CreateIncomingWebhookForChannel ( creatorId string , channel * model . Channel , hook * model . IncomingWebhook ) ( * model . IncomingWebhook , * model . AppError )
2023-10-30 16:33:37 +01:00
CreateJob ( c request . CTX , job * model . Job ) ( * model . Job , * model . AppError )
2020-02-13 13:26:58 +01:00
CreateOAuthApp ( app * model . OAuthApp ) ( * model . OAuthApp , * model . AppError )
CreateOAuthStateToken ( extra string ) ( * model . Token , * model . AppError )
2023-10-30 16:33:37 +01:00
CreateOAuthUser ( c request . CTX , service string , userData io . Reader , teamID string , tokenUser * model . User ) ( * model . User , * model . AppError )
2020-02-13 13:26:58 +01:00
CreateOutgoingWebhook ( hook * model . OutgoingWebhook ) ( * model . OutgoingWebhook , * model . AppError )
2021-02-05 11:22:27 +01:00
CreatePasswordRecoveryToken ( userID , email string ) ( * model . Token , * model . AppError )
2022-07-14 12:01:29 +03:00
CreatePost ( c request . CTX , post * model . Post , channel * model . Channel , triggerWebhooks , setOnline bool ) ( savedPost * model . Post , err * model . AppError )
2022-08-01 13:48:45 +05:30
CreatePostAsUser ( c request . CTX , post * model . Post , currentSessionId string , setOnline bool ) ( * model . Post , * model . AppError )
2023-02-03 10:56:47 +02:00
CreatePostMissingChannel ( c request . CTX , post * model . Post , triggerWebhooks bool , setOnline bool ) ( * model . Post , * model . AppError )
2021-04-20 13:16:40 -04:00
CreateRetentionPolicy ( policy * model . RetentionPolicyWithTeamAndChannelIDs ) ( * model . RetentionPolicyWithTeamAndChannelCounts , * model . AppError )
2020-02-13 13:26:58 +01:00
CreateRole ( role * model . Role ) ( * model . Role , * model . AppError )
2024-02-09 11:17:28 -05:00
CreateSamlRelayToken ( extra string ) ( * model . Token , * model . AppError )
2020-02-13 13:26:58 +01:00
CreateScheme ( scheme * model . Scheme ) ( * model . Scheme , * model . AppError )
2023-10-30 16:33:37 +01:00
CreateSession ( c request . CTX , session * model . Session ) ( * model . Session , * model . AppError )
2022-07-14 12:01:29 +03:00
CreateSidebarCategory ( c request . CTX , userID , teamID string , newCategory * model . SidebarCategoryWithChannels ) ( * model . SidebarCategoryWithChannels , * model . AppError )
2022-08-17 13:36:36 +05:30
CreateTeam ( c request . CTX , team * model . Team ) ( * model . Team , * model . AppError )
2023-10-30 16:33:37 +01:00
CreateTeamWithUser ( c request . CTX , team * model . Team , userID string ) ( * model . Team , * model . AppError )
2021-02-05 11:22:27 +01:00
CreateTermsOfService ( text , userID string ) ( * model . TermsOfService , * model . AppError )
2022-07-14 12:01:29 +03:00
CreateUploadSession ( c request . CTX , us * model . UploadSession ) ( * model . UploadSession , * model . AppError )
2020-02-13 13:26:58 +01:00
CreateUserAccessToken ( token * model . UserAccessToken ) ( * model . UserAccessToken , * model . AppError )
2022-07-28 10:04:21 +05:30
CreateUserAsAdmin ( c request . CTX , user * model . User , redirect string ) ( * model . User , * model . AppError )
CreateUserFromSignup ( c request . CTX , user * model . User , redirect string ) ( * model . User , * model . AppError )
CreateUserWithInviteId ( c request . CTX , user * model . User , inviteId , redirect string ) ( * model . User , * model . AppError )
CreateUserWithToken ( c request . CTX , user * model . User , token * model . Token ) ( * model . User , * model . AppError )
2022-07-14 12:01:29 +03:00
CreateWebhookPost ( c request . CTX , userID string , channel * model . Channel , text , overrideUsername , overrideIconURL , overrideIconEmoji string , props model . StringInterface , postType string , postRootId string ) ( * model . Post , * model . AppError )
2020-10-03 03:38:35 -06:00
DBHealthCheckDelete ( ) error
DBHealthCheckWrite ( ) error
2020-02-13 13:26:58 +01:00
DataRetention ( ) einterfaces . DataRetentionInterface
2023-10-30 16:33:37 +01:00
DeactivateGuests ( c request . CTX ) * model . AppError
2021-02-05 11:22:27 +01:00
DeactivateMfa ( userID string ) * model . AppError
2023-10-30 16:33:37 +01:00
DeauthorizeOAuthAppForUser ( c request . CTX , userID , appID string ) * model . AppError
DeleteAcknowledgementForPost ( c request . CTX , postID , userID string ) * model . AppError
2020-02-13 13:26:58 +01:00
DeleteAllExpiredPluginKeys ( ) * model . AppError
2021-02-25 20:22:27 +01:00
DeleteAllKeysForPlugin ( pluginID string ) * model . AppError
2023-11-29 21:37:16 +05:30
DeleteBrandImage ( rctx request . CTX ) * model . AppError
2022-07-14 12:01:29 +03:00
DeleteChannel ( c request . CTX , channel * model . Channel , userID string ) * model . AppError
2024-03-12 22:36:05 +08:00
DeleteChannelBookmark ( bookmarkId , connectionId string ) ( * model . ChannelBookmarkWithFileInfo , * model . AppError )
2021-02-05 11:22:27 +01:00
DeleteCommand ( commandID string ) * model . AppError
2023-11-30 10:45:32 -05:00
DeleteDraft ( rctx request . CTX , draft * model . Draft , connectionID string ) * model . AppError
2022-11-03 08:54:59 +01:00
DeleteEmoji ( c request . CTX , emoji * model . Emoji ) * model . AppError
2021-02-25 20:22:27 +01:00
DeleteEphemeralPost ( userID , postID string )
2021-02-09 11:58:31 +01:00
DeleteExport ( name string ) * model . AppError
2020-02-13 13:26:58 +01:00
DeleteGroup ( groupID string ) ( * model . Group , * model . AppError )
DeleteGroupMember ( groupID string , userID string ) ( * model . GroupMember , * model . AppError )
2022-02-17 12:34:39 -05:00
DeleteGroupMembers ( groupID string , userIDs [ ] string ) ( [ ] * model . GroupMember , * model . AppError )
2020-02-13 13:26:58 +01:00
DeleteGroupSyncable ( groupID string , syncableID string , syncableType model . GroupSyncableType ) ( * model . GroupSyncable , * model . AppError )
2021-02-05 11:22:27 +01:00
DeleteIncomingWebhook ( hookID string ) * model . AppError
2021-02-25 20:22:27 +01:00
DeleteOAuthApp ( appID string ) * model . AppError
2021-02-05 11:22:27 +01:00
DeleteOutgoingWebhook ( hookID string ) * model . AppError
2021-02-25 20:22:27 +01:00
DeletePluginKey ( pluginID string , key string ) * model . AppError
2022-07-14 12:01:29 +03:00
DeletePost ( c request . CTX , postID , deleteByID string ) ( * model . Post , * model . AppError )
2024-01-03 12:25:53 -05:00
DeletePreferences ( c request . CTX , userID string , preferences model . Preferences ) * model . AppError
2023-10-30 16:33:37 +01:00
DeleteReactionForPost ( c request . CTX , reaction * model . Reaction ) * model . AppError
2021-04-01 13:44:56 -04:00
DeleteRemoteCluster ( remoteClusterId string ) ( bool , * model . AppError )
2021-04-20 13:16:40 -04:00
DeleteRetentionPolicy ( policyID string ) * model . AppError
2020-02-13 13:26:58 +01:00
DeleteScheme ( schemeId string ) ( * model . Scheme , * model . AppError )
2021-04-01 13:44:56 -04:00
DeleteSharedChannelRemote ( id string ) ( bool , error )
2022-07-14 12:01:29 +03:00
DeleteSidebarCategory ( c request . CTX , userID , teamID , categoryId string ) * model . AppError
2020-02-13 13:26:58 +01:00
DeleteToken ( token * model . Token ) * model . AppError
2023-11-07 21:25:52 +03:00
DisableAutoResponder ( rctx request . CTX , userID string , asAdmin bool ) * model . AppError
2023-10-30 16:33:37 +01:00
DisableUserAccessToken ( c request . CTX , token * model . UserAccessToken ) * model . AppError
2020-02-13 13:26:58 +01:00
DoAppMigrations ( )
2022-09-02 13:52:48 +03:00
DoCheckForAdminNotifications ( trial bool ) * model . AppError
2023-12-18 16:07:00 +01:00
DoCommandRequest ( rctx request . CTX , cmd * model . Command , p url . Values ) ( * model . Command , * model . CommandResponse , * model . AppError )
2020-02-13 13:26:58 +01:00
DoEmojisPermissionsMigration ( )
DoGuestRolesCreationMigration ( )
2023-10-30 16:33:37 +01:00
DoLocalRequest ( c request . CTX , rawURL string , body [ ] byte ) ( * http . Response , * model . AppError )
2023-11-06 12:26:17 +01:00
DoLogin ( c request . CTX , w http . ResponseWriter , r * http . Request , user * model . User , deviceID string , isMobile , isOAuthUser , isSaml bool ) ( * model . Session , * model . AppError )
2023-10-30 16:33:37 +01:00
DoPostActionWithCookie ( c request . CTX , postID , actionId , userID , selectedOption string , cookie * model . PostActionCookie ) ( string , * model . AppError )
2024-01-11 13:07:41 -05:00
DoSubscriptionRenewalCheck ( )
2020-08-21 16:49:31 -04:00
DoSystemConsoleRolesCreationMigration ( )
2024-04-03 09:04:33 +05:30
DoUploadFile ( c request . CTX , now time . Time , rawTeamId string , rawChannelId string , rawUserId string , rawFilename string , data [ ] byte , extractContent bool ) ( * model . FileInfo , * model . AppError )
DoUploadFileExpectModification ( c request . CTX , now time . Time , rawTeamId string , rawChannelId string , rawUserId string , rawFilename string , data [ ] byte , extractContent bool ) ( * model . FileInfo , [ ] byte , * model . AppError )
2020-02-13 13:26:58 +01:00
DownloadFromURL ( downloadURL string ) ( [ ] byte , error )
2023-10-30 16:33:37 +01:00
EnableUserAccessToken ( c request . CTX , token * model . UserAccessToken ) * model . AppError
2022-07-05 09:46:50 +03:00
EnvironmentConfig ( filter func ( reflect . StructField ) bool ) map [ string ] any
2023-07-19 13:01:39 -07:00
ExportFileBackend ( ) filestore . FileBackend
ExportFileExists ( path string ) ( bool , * model . AppError )
ExportFileModTime ( path string ) ( time . Time , * model . AppError )
2020-02-13 13:26:58 +01:00
ExportPermissions ( w io . Writer ) error
2023-10-23 20:25:40 +02:00
ExtractContentFromFileInfo ( rctx request . CTX , fileInfo * model . FileInfo ) error
2020-02-13 13:26:58 +01:00
FetchSamlMetadataFromIdp ( url string ) ( [ ] byte , * model . AppError )
2022-03-03 12:22:10 +05:30
FileBackend ( ) filestore . FileBackend
2020-02-13 13:26:58 +01:00
FileExists ( path string ) ( bool , * model . AppError )
2021-01-25 10:40:30 +01:00
FileModTime ( path string ) ( time . Time , * model . AppError )
2020-12-03 11:38:00 +01:00
FileSize ( path string ) ( int64 , * model . AppError )
2022-07-14 12:01:29 +03:00
FillInChannelProps ( c request . CTX , channel * model . Channel ) * model . AppError
FillInChannelsProps ( c request . CTX , channelList model . ChannelList ) * model . AppError
2023-10-11 13:08:55 +02:00
FilterUsersByVisible ( c request . CTX , viewer * model . User , otherUsers [ ] * model . User ) ( [ ] * model . User , * model . AppError )
2020-02-13 13:26:58 +01:00
FindTeamByName ( name string ) bool
2023-02-09 02:08:33 +05:00
FinishSendAdminNotifyPost ( trial bool , now int64 , pluginBasedData map [ string ] [ ] * model . NotifyAdminData )
2023-09-19 08:49:51 +02:00
GenerateAndSaveDesktopToken ( createAt int64 , user * model . User ) ( * string , * model . AppError )
2021-02-05 11:22:27 +01:00
GenerateMfaSecret ( userID string ) ( * model . MfaSecret , * model . AppError )
2023-07-19 13:01:39 -07:00
GeneratePresignURLForExport ( name string ) ( * model . PresignURLResponse , * model . AppError )
2020-02-13 13:26:58 +01:00
GeneratePublicLink ( siteURL string , info * model . FileInfo ) string
2023-10-30 16:33:37 +01:00
GenerateSupportPacket ( c request . CTX ) [ ] model . FileData
2022-11-24 02:41:23 +02:00
GetAcknowledgementsForPost ( postID string ) ( [ ] * model . PostAcknowledgement , * model . AppError )
GetAcknowledgementsForPostList ( postList * model . PostList ) ( map [ string ] [ ] * model . PostAcknowledgement , * model . AppError )
2020-02-13 13:26:58 +01:00
GetActivePluginManifests ( ) ( [ ] * model . Manifest , * model . AppError )
2022-07-14 12:01:29 +03:00
GetAllChannels ( c request . CTX , page , perPage int , opts model . ChannelSearchOpts ) ( model . ChannelListWithTeamData , * model . AppError )
GetAllChannelsCount ( c request . CTX , opts model . ChannelSearchOpts ) ( int64 , * model . AppError )
2020-02-13 13:26:58 +01:00
GetAllPrivateTeams ( ) ( [ ] * model . Team , * model . AppError )
GetAllPublicTeams ( ) ( [ ] * model . Team , * model . AppError )
2021-04-01 13:44:56 -04:00
GetAllRemoteClusters ( filter model . RemoteClusterQueryFilter ) ( [ ] * model . RemoteCluster , * model . AppError )
2021-11-08 16:38:41 +03:00
GetAllRoles ( ) ( [ ] * model . Role , * model . AppError )
2020-02-13 13:26:58 +01:00
GetAllTeams ( ) ( [ ] * model . Team , * model . AppError )
2021-04-20 13:16:40 -04:00
GetAllTeamsPage ( offset int , limit int , opts * model . TeamSearch ) ( [ ] * model . Team , * model . AppError )
GetAllTeamsPageWithCount ( offset int , limit int , opts * model . TeamSearch ) ( * model . TeamsWithCount , * model . AppError )
2024-03-11 17:57:27 +05:30
GetAnalytics ( rctx request . CTX , name string , teamID string ) ( model . AnalyticsRows , * model . AppError )
2024-04-08 11:09:00 +02:00
GetAnalyticsForSupportPacket ( rctx request . CTX ) ( model . AnalyticsRows , * model . AppError )
2022-03-15 16:39:23 +03:00
GetAppliedSchemaMigrations ( ) ( [ ] model . AppliedMigration , * model . AppError )
2023-11-14 13:34:47 +01:00
GetAudits ( rctx request . CTX , userID string , limit int ) ( model . Audits , * model . AppError )
GetAuditsPage ( rctx request . CTX , userID string , page int , perPage int ) ( model . Audits , * model . AppError )
2023-10-30 16:33:37 +01:00
GetAuthorizationCode ( c request . CTX , w http . ResponseWriter , r * http . Request , service string , props map [ string ] string , loginHint string ) ( string , * model . AppError )
2021-02-05 11:22:27 +01:00
GetAuthorizedAppsForUser ( userID string , page , perPage int ) ( [ ] * model . OAuthApp , * model . AppError )
2024-03-12 22:36:05 +08:00
GetBookmark ( bookmarkId string , includeDeleted bool ) ( * model . ChannelBookmarkWithFileInfo , * model . AppError )
2023-11-29 21:37:16 +05:30
GetBrandImage ( rctx request . CTX ) ( [ ] byte , * model . AppError )
2021-02-25 20:22:27 +01:00
GetBulkReactionsForPosts ( postIDs [ ] string ) ( map [ string ] [ ] * model . Reaction , * model . AppError )
2022-07-14 12:01:29 +03:00
GetChannel ( c request . CTX , channelID string ) ( * model . Channel , * model . AppError )
2024-03-12 22:36:05 +08:00
GetChannelBookmarks ( channelId string , since int64 ) ( [ ] * model . ChannelBookmarkWithFileInfo , * model . AppError )
2022-07-14 12:01:29 +03:00
GetChannelByName ( c request . CTX , channelName , teamID string , includeDeleted bool ) ( * model . Channel , * model . AppError )
GetChannelByNameForTeamName ( c request . CTX , channelName , teamName string , includeDeleted bool ) ( * model . Channel , * model . AppError )
GetChannelCounts ( c request . CTX , teamID string , userID string ) ( * model . ChannelCounts , * model . AppError )
GetChannelFileCount ( c request . CTX , channelID string ) ( int64 , * model . AppError )
GetChannelGuestCount ( c request . CTX , channelID string ) ( int64 , * model . AppError )
GetChannelMember ( c request . CTX , channelID string , userID string ) ( * model . ChannelMember , * model . AppError )
GetChannelMemberCount ( c request . CTX , channelID string ) ( int64 , * model . AppError )
GetChannelMembersByIds ( c request . CTX , channelID string , userIDs [ ] string ) ( model . ChannelMembers , * model . AppError )
GetChannelMembersForUser ( c request . CTX , teamID string , userID string ) ( model . ChannelMembers , * model . AppError )
GetChannelMembersForUserWithPagination ( c request . CTX , userID string , page , perPage int ) ( [ ] * model . ChannelMember , * model . AppError )
GetChannelMembersPage ( c request . CTX , channelID string , page , perPage int ) ( model . ChannelMembers , * model . AppError )
GetChannelMembersTimezones ( c request . CTX , channelID string ) ( [ ] string , * model . AppError )
GetChannelMembersWithTeamDataForUserWithPagination ( c request . CTX , userID string , page , perPage int ) ( model . ChannelMembersWithTeamData , * model . AppError )
GetChannelPinnedPostCount ( c request . CTX , channelID string ) ( int64 , * model . AppError )
2021-04-20 13:16:40 -04:00
GetChannelPoliciesForUser ( userID string , offset , limit int ) ( * model . RetentionPolicyForChannelList , * model . AppError )
2022-07-14 12:01:29 +03:00
GetChannelUnread ( c request . CTX , channelID , userID string ) ( * model . ChannelUnread , * model . AppError )
GetChannels ( c request . CTX , channelIDs [ ] string ) ( [ ] * model . Channel , * model . AppError )
GetChannelsByNames ( c request . CTX , channelNames [ ] string , teamID string ) ( [ ] * model . Channel , * model . AppError )
2021-04-20 13:16:40 -04:00
GetChannelsForRetentionPolicy ( policyID string , offset , limit int ) ( * model . ChannelsWithCount , * model . AppError )
2020-02-13 13:26:58 +01:00
GetChannelsForScheme ( scheme * model . Scheme , offset int , limit int ) ( model . ChannelList , * model . AppError )
GetChannelsForSchemePage ( scheme * model . Scheme , page int , perPage int ) ( model . ChannelList , * model . AppError )
2022-07-14 12:01:29 +03:00
GetChannelsForTeamForUser ( c request . CTX , teamID string , userID string , opts * model . ChannelSearchOpts ) ( model . ChannelList , * model . AppError )
GetChannelsForUser ( c request . CTX , userID string , includeDeleted bool , lastDeleteAt , pageSize int , fromChannelID string ) ( model . ChannelList , * model . AppError )
2023-07-19 08:15:27 +02:00
GetChannelsMemberCount ( c request . CTX , channelIDs [ ] string ) ( map [ string ] int64 , * model . AppError )
2022-07-14 12:01:29 +03:00
GetChannelsUserNotIn ( c request . CTX , teamID string , userID string , offset int , limit int ) ( model . ChannelList , * model . AppError )
2020-11-23 14:34:10 -05:00
GetCloudSession ( token string ) ( * model . Session , * model . AppError )
2020-02-13 13:26:58 +01:00
GetClusterId ( ) string
2023-11-29 17:07:54 +01:00
GetClusterStatus ( rctx request . CTX ) [ ] * model . ClusterInfo
2021-02-05 11:22:27 +01:00
GetCommand ( commandID string ) ( * model . Command , * model . AppError )
2021-05-19 08:45:03 -04:00
GetCommonTeamIDsForTwoUsers ( userID , otherUserID string ) ( [ ] string , * model . AppError )
2020-02-13 13:26:58 +01:00
GetComplianceFile ( job * model . Compliance ) ( [ ] byte , * model . AppError )
GetComplianceReport ( reportId string ) ( * model . Compliance , * model . AppError )
GetComplianceReports ( page , perPage int ) ( model . Compliances , * model . AppError )
GetCookieDomain ( ) string
2021-11-10 17:11:20 +01:00
GetCustomStatus ( userID string ) ( * model . CustomStatus , * model . AppError )
2020-02-13 13:26:58 +01:00
GetDefaultProfileImage ( user * model . User ) ( [ ] byte , * model . AppError )
2022-07-14 12:01:29 +03:00
GetDeletedChannels ( c request . CTX , teamID string , offset int , limit int , userID string ) ( model . ChannelList , * model . AppError )
2022-11-24 05:21:40 +02:00
GetDraft ( userID , channelID , rootID string ) ( * model . Draft , * model . AppError )
2023-11-07 10:04:16 +01:00
GetDraftsForUser ( rctx request . CTX , userID , teamID string ) ( [ ] * model . Draft , * model . AppError )
2023-02-07 15:30:37 +01:00
GetEditHistoryForPost ( postID string ) ( [ ] * model . Post , * model . AppError )
2022-11-03 08:54:59 +01:00
GetEmoji ( c request . CTX , emojiId string ) ( * model . Emoji , * model . AppError )
GetEmojiByName ( c request . CTX , emojiName string ) ( * model . Emoji , * model . AppError )
GetEmojiImage ( c request . CTX , emojiId string ) ( [ ] byte , string , * model . AppError )
GetEmojiList ( c request . CTX , page , perPage int , sort string ) ( [ ] * model . Emoji , * model . AppError )
2023-11-07 10:04:16 +01:00
GetFile ( rctx request . CTX , fileID string ) ( [ ] byte , * model . AppError )
GetFileInfo ( rctx request . CTX , fileID string ) ( * model . FileInfo , * model . AppError )
GetFileInfos ( rctx request . CTX , page , perPage int , opt * model . GetFileInfosOptions ) ( [ ] * model . FileInfo , * model . AppError )
GetFileInfosForPostWithMigration ( rctx request . CTX , postID string , includeDeleted bool ) ( [ ] * model . FileInfo , * model . AppError )
2021-02-05 11:22:27 +01:00
GetFlaggedPosts ( userID string , offset int , limit int ) ( * model . PostList , * model . AppError )
2021-02-25 20:22:27 +01:00
GetFlaggedPostsForChannel ( userID , channelID string , offset int , limit int ) ( * model . PostList , * model . AppError )
2021-02-05 11:22:27 +01:00
GetFlaggedPostsForTeam ( userID , teamID string , offset int , limit int ) ( * model . PostList , * model . AppError )
2021-04-20 13:16:40 -04:00
GetGlobalRetentionPolicy ( ) ( * model . GlobalRetentionPolicy , * model . AppError )
2022-10-25 11:54:51 -04:00
GetGroup ( id string , opts * model . GetGroupOpts , viewRestrictions * model . ViewUsersRestrictions ) ( * model . Group , * model . AppError )
2020-05-12 08:35:03 -07:00
GetGroupByName ( name string , opts model . GroupSearchOpts ) ( * model . Group , * model . AppError )
2020-02-13 13:26:58 +01:00
GetGroupByRemoteID ( remoteID string , groupSource model . GroupSource ) ( * model . Group , * model . AppError )
2022-07-14 12:01:29 +03:00
GetGroupChannel ( c request . CTX , userIDs [ ] string ) ( * model . Channel , * model . AppError )
2022-10-25 11:54:51 -04:00
GetGroupMemberCount ( groupID string , viewRestrictions * model . ViewUsersRestrictions ) ( int64 , * model . AppError )
2020-02-13 13:26:58 +01:00
GetGroupMemberUsers ( groupID string ) ( [ ] * model . User , * model . AppError )
2022-10-25 11:54:51 -04:00
GetGroupMemberUsersPage ( groupID string , page int , perPage int , viewRestrictions * model . ViewUsersRestrictions ) ( [ ] * model . User , int , * model . AppError )
2022-12-15 14:20:36 -05:00
GetGroupMemberUsersSortedPage ( groupID string , page int , perPage int , viewRestrictions * model . ViewUsersRestrictions , teammateNameDisplay string ) ( [ ] * model . User , int , * model . AppError )
2023-09-19 18:11:34 +05:30
GetGroupMessageMembersCommonTeams ( c request . CTX , channelID string ) ( [ ] * model . Team , * model . AppError )
2020-02-13 13:26:58 +01:00
GetGroupSyncable ( groupID string , syncableID string , syncableType model . GroupSyncableType ) ( * model . GroupSyncable , * model . AppError )
GetGroupSyncables ( groupID string , syncableType model . GroupSyncableType ) ( [ ] * model . GroupSyncable , * model . AppError )
2022-10-25 11:54:51 -04:00
GetGroups ( page , perPage int , opts model . GroupSearchOpts , viewRestrictions * model . ViewUsersRestrictions ) ( [ ] * model . Group , * model . AppError )
2021-02-05 11:22:27 +01:00
GetGroupsAssociatedToChannelsByTeam ( teamID string , opts model . GroupSearchOpts ) ( map [ string ] [ ] * model . GroupWithSchemeAdmin , * model . AppError )
2021-02-25 20:22:27 +01:00
GetGroupsByChannel ( channelID string , opts model . GroupSearchOpts ) ( [ ] * model . GroupWithSchemeAdmin , int , * model . AppError )
2020-02-13 13:26:58 +01:00
GetGroupsByIDs ( groupIDs [ ] string ) ( [ ] * model . Group , * model . AppError )
GetGroupsBySource ( groupSource model . GroupSource ) ( [ ] * model . Group , * model . AppError )
2021-03-23 10:32:54 +01:00
GetGroupsByUserId ( userID string ) ( [ ] * model . Group , * model . AppError )
2022-10-06 11:04:21 +03:00
GetHubForUserId ( userID string ) * platform . Hub
2021-02-05 11:22:27 +01:00
GetIncomingWebhook ( hookID string ) ( * model . IncomingWebhook , * model . AppError )
GetIncomingWebhooksForTeamPage ( teamID string , page , perPage int ) ( [ ] * model . IncomingWebhook , * model . AppError )
GetIncomingWebhooksForTeamPageByUser ( teamID string , userID string , page , perPage int ) ( [ ] * model . IncomingWebhook , * model . AppError )
2020-02-13 13:26:58 +01:00
GetIncomingWebhooksPage ( page , perPage int ) ( [ ] * model . IncomingWebhook , * model . AppError )
2021-02-05 11:22:27 +01:00
GetIncomingWebhooksPageByUser ( userID string , page , perPage int ) ( [ ] * model . IncomingWebhook , * model . AppError )
2023-10-30 16:33:37 +01:00
GetJob ( c request . CTX , id string ) ( * model . Job , * model . AppError )
GetJobsByType ( c request . CTX , jobType string , offset int , limit int ) ( [ ] * model . Job , * model . AppError )
GetJobsByTypePage ( c request . CTX , jobType string , page int , perPage int ) ( [ ] * model . Job , * model . AppError )
GetJobsByTypes ( c request . CTX , jobTypes [ ] string , offset int , limit int ) ( [ ] * model . Job , * model . AppError )
GetJobsByTypesPage ( c request . CTX , jobType [ ] string , page int , perPage int ) ( [ ] * model . Job , * model . AppError )
2020-02-13 13:26:58 +01:00
GetLatestTermsOfService ( ) ( * model . TermsOfService , * model . AppError )
2023-11-29 17:07:54 +01:00
GetLatestVersion ( rctx request . CTX , latestVersionUrl string ) ( * model . GithubReleaseInfo , * model . AppError )
GetLogs ( rctx request . CTX , page , perPage int ) ( [ ] string , * model . AppError )
GetLogsSkipSend ( rctx request . CTX , page , perPage int , logFilter * model . LogFilter ) ( [ ] string , * model . AppError )
2023-11-06 12:26:17 +01:00
GetMemberCountsByGroup ( rctx request . CTX , channelID string , includeTimezones bool ) ( [ ] * model . ChannelMemberCountByGroup , * model . AppError )
2024-03-07 22:27:08 +06:00
GetMessageForNotification ( post * model . Post , teamName , siteUrl string , translateFunc i18n . TranslateFunc ) string
2022-11-03 08:54:59 +01:00
GetMultipleEmojiByName ( c request . CTX , names [ ] string ) ( [ ] * model . Emoji , * model . AppError )
2024-03-11 17:57:27 +05:30
GetNewUsersForTeamPage ( rctx request . CTX , teamID string , page , perPage int , asAdmin bool , viewRestrictions * model . ViewUsersRestrictions ) ( [ ] * model . User , * model . AppError )
2021-03-05 09:46:36 +02:00
GetNextPostIdFromPostList ( postList * model . PostList , collapsedThreads bool ) string
2020-02-13 13:26:58 +01:00
GetNotificationNameFormat ( user * model . User ) string
2022-07-14 12:01:29 +03:00
GetNumberOfChannelsOnTeam ( c request . CTX , teamID string ) ( int , * model . AppError )
2023-10-30 16:33:37 +01:00
GetOAuthAccessTokenForCodeFlow ( c request . CTX , clientId , grantType , redirectURI , code , secret , refreshToken string ) ( * model . AccessResponse , * model . AppError )
GetOAuthAccessTokenForImplicitFlow ( c request . CTX , userID string , authRequest * model . AuthorizeRequest ) ( * model . Session , * model . AppError )
2021-02-25 20:22:27 +01:00
GetOAuthApp ( appID string ) ( * model . OAuthApp , * model . AppError )
2020-02-13 13:26:58 +01:00
GetOAuthApps ( page , perPage int ) ( [ ] * model . OAuthApp , * model . AppError )
2021-02-05 11:22:27 +01:00
GetOAuthAppsByCreator ( userID string , page , perPage int ) ( [ ] * model . OAuthApp , * model . AppError )
GetOAuthCodeRedirect ( userID string , authRequest * model . AuthorizeRequest ) ( string , * model . AppError )
2023-10-30 16:33:37 +01:00
GetOAuthImplicitRedirect ( c request . CTX , userID string , authRequest * model . AuthorizeRequest ) ( string , * model . AppError )
GetOAuthLoginEndpoint ( c request . CTX , w http . ResponseWriter , r * http . Request , service , teamID , action , redirectTo , loginHint string , isMobile bool , desktopToken string ) ( string , * model . AppError )
GetOAuthSignupEndpoint ( c request . CTX , w http . ResponseWriter , r * http . Request , service , teamID string , desktopToken string ) ( string , * model . AppError )
2020-02-13 13:26:58 +01:00
GetOAuthStateToken ( token string ) ( * model . Token , * model . AppError )
2022-02-15 17:46:03 -06:00
GetOnboarding ( ) ( * model . System , * model . AppError )
2021-10-15 19:57:05 +05:30
GetOpenGraphMetadata ( requestURL string ) ( [ ] byte , error )
2022-07-14 12:01:29 +03:00
GetOrCreateDirectChannel ( c request . CTX , userID , otherUserID string , channelOptions ... model . ChannelOption ) ( * model . Channel , * model . AppError )
2022-12-30 13:11:17 -05:00
GetOrCreateTrueUpReviewStatus ( ) ( * model . TrueUpReviewStatus , * model . AppError )
2021-02-05 11:22:27 +01:00
GetOutgoingWebhook ( hookID string ) ( * model . OutgoingWebhook , * model . AppError )
2021-02-25 20:22:27 +01:00
GetOutgoingWebhooksForChannelPageByUser ( channelID string , userID string , page , perPage int ) ( [ ] * model . OutgoingWebhook , * model . AppError )
2021-02-05 11:22:27 +01:00
GetOutgoingWebhooksForTeamPage ( teamID string , page , perPage int ) ( [ ] * model . OutgoingWebhook , * model . AppError )
GetOutgoingWebhooksForTeamPageByUser ( teamID string , userID string , page , perPage int ) ( [ ] * model . OutgoingWebhook , * model . AppError )
2020-02-13 13:26:58 +01:00
GetOutgoingWebhooksPage ( page , perPage int ) ( [ ] * model . OutgoingWebhook , * model . AppError )
2021-02-05 11:22:27 +01:00
GetOutgoingWebhooksPageByUser ( userID string , page , perPage int ) ( [ ] * model . OutgoingWebhook , * model . AppError )
2020-02-13 13:26:58 +01:00
GetPasswordRecoveryToken ( token string ) ( * model . Token , * model . AppError )
2022-07-14 12:01:29 +03:00
GetPermalinkPost ( c request . CTX , postID string , userID string ) ( * model . PostList , * model . AppError )
GetPinnedPosts ( c request . CTX , channelID string ) ( * model . PostList , * model . AppError )
2021-02-25 20:22:27 +01:00
GetPluginKey ( pluginID string , key string ) ( [ ] byte , * model . AppError )
2020-02-13 13:26:58 +01:00
GetPlugins ( ) ( * model . PluginsResponse , * model . AppError )
2021-03-05 09:46:36 +02:00
GetPostAfterTime ( channelID string , time int64 , collapsedThreads bool ) ( * model . Post , * model . AppError )
GetPostIdAfterTime ( channelID string , time int64 , collapsedThreads bool ) ( string , * model . AppError )
GetPostIdBeforeTime ( channelID string , time int64 , collapsedThreads bool ) ( string , * model . AppError )
2022-07-14 12:01:29 +03:00
GetPostIfAuthorized ( c request . CTX , postID string , session * model . Session , includeDeleted bool ) ( * model . Post , * model . AppError )
2022-12-05 16:04:44 +02:00
GetPostInfo ( c request . CTX , postID string ) ( * model . PostInfo , * model . AppError )
2022-03-24 12:51:41 +05:30
GetPostThread ( postID string , opts model . GetPostsOptions , userID string ) ( * model . PostList , * model . AppError )
2021-02-25 20:22:27 +01:00
GetPosts ( channelID string , offset int , limit int ) ( * model . PostList , * model . AppError )
2020-02-13 13:26:58 +01:00
GetPostsAfterPost ( options model . GetPostsOptions ) ( * model . PostList , * model . AppError )
GetPostsAroundPost ( before bool , options model . GetPostsOptions ) ( * model . PostList , * model . AppError )
GetPostsBeforePost ( options model . GetPostsOptions ) ( * model . PostList , * model . AppError )
2021-02-25 20:22:27 +01:00
GetPostsEtag ( channelID string , collapsedThreads bool ) string
2022-07-14 12:01:29 +03:00
GetPostsForChannelAroundLastUnread ( c request . CTX , channelID , userID string , limitBefore , limitAfter int , skipFetchThreads bool , collapsedThreads , collapsedThreadsExtended bool ) ( * model . PostList , * model . AppError )
2020-02-13 13:26:58 +01:00
GetPostsPage ( options model . GetPostsOptions ) ( * model . PostList , * model . AppError )
GetPostsSince ( options model . GetPostsSinceOptions ) ( * model . PostList , * model . AppError )
2024-01-03 12:25:53 -05:00
GetPreferenceByCategoryAndNameForUser ( c request . CTX , userID string , category string , preferenceName string ) ( * model . Preference , * model . AppError )
GetPreferenceByCategoryForUser ( c request . CTX , userID string , category string ) ( model . Preferences , * model . AppError )
GetPreferencesForUser ( c request . CTX , userID string ) ( model . Preferences , * model . AppError )
2021-03-05 09:46:36 +02:00
GetPrevPostIdFromPostList ( postList * model . PostList , collapsedThreads bool ) string
2022-11-23 21:08:21 +02:00
GetPriorityForPost ( postId string ) ( * model . PostPriority , * model . AppError )
GetPriorityForPostList ( list * model . PostList ) ( map [ string ] * model . PostPriority , * model . AppError )
2022-07-14 12:01:29 +03:00
GetPrivateChannelsForTeam ( c request . CTX , teamID string , offset int , limit int ) ( model . ChannelList , * model . AppError )
2020-02-13 13:26:58 +01:00
GetProfileImage ( user * model . User ) ( [ ] byte , bool , * model . AppError )
2022-07-14 12:01:29 +03:00
GetPublicChannelsByIdsForTeam ( c request . CTX , teamID string , channelIDs [ ] string ) ( model . ChannelList , * model . AppError )
GetPublicChannelsForTeam ( c request . CTX , teamID string , offset int , limit int ) ( model . ChannelList , * model . AppError )
2021-02-25 20:22:27 +01:00
GetReactionsForPost ( postID string ) ( [ ] * model . Reaction , * model . AppError )
2024-03-11 17:57:27 +05:30
GetRecentlyActiveUsersForTeam ( rctx request . CTX , teamID string ) ( map [ string ] * model . User , * model . AppError )
GetRecentlyActiveUsersForTeamPage ( rctx request . CTX , teamID string , page , perPage int , asAdmin bool , viewRestrictions * model . ViewUsersRestrictions ) ( [ ] * model . User , * model . AppError )
2021-04-01 13:44:56 -04:00
GetRemoteCluster ( remoteClusterId string ) ( * model . RemoteCluster , * model . AppError )
GetRemoteClusterForUser ( remoteID string , userID string ) ( * model . RemoteCluster , * model . AppError )
GetRemoteClusterService ( ) ( remotecluster . RemoteClusterServiceIFace , * model . AppError )
GetRemoteClusterSession ( token string , remoteId string ) ( * model . Session , * model . AppError )
2021-04-20 13:16:40 -04:00
GetRetentionPolicies ( offset , limit int ) ( * model . RetentionPolicyWithTeamAndChannelCountsList , * model . AppError )
GetRetentionPoliciesCount ( ) ( int64 , * model . AppError )
GetRetentionPolicy ( policyID string ) ( * model . RetentionPolicyWithTeamAndChannelCounts , * model . AppError )
2020-02-13 13:26:58 +01:00
GetRole ( id string ) ( * model . Role , * model . AppError )
2021-04-21 18:01:02 +03:00
GetRoleByName ( ctx context . Context , name string ) ( * model . Role , * model . AppError )
2020-02-13 13:26:58 +01:00
GetRolesByNames ( names [ ] string ) ( [ ] * model . Role , * model . AppError )
GetSamlCertificateStatus ( ) * model . SamlCertificateStatus
2024-02-09 11:17:28 -05:00
GetSamlEmailToken ( token string ) ( * model . Token , * model . AppError )
2023-10-30 16:33:37 +01:00
GetSamlMetadata ( c request . CTX ) ( string , * model . AppError )
2021-08-16 19:46:44 +02:00
GetSamlMetadataFromIdp ( idpMetadataURL string ) ( * model . SamlMetadataResponse , * model . AppError )
2021-06-18 19:25:03 +03:00
GetSanitizeOptions ( asAdmin bool ) map [ string ] bool
2020-02-13 13:26:58 +01:00
GetScheme ( id string ) ( * model . Scheme , * model . AppError )
GetSchemeByName ( name string ) ( * model . Scheme , * model . AppError )
2021-02-05 11:22:27 +01:00
GetSchemeRolesForTeam ( teamID string ) ( string , string , string , * model . AppError )
2020-02-13 13:26:58 +01:00
GetSchemes ( scope string , offset int , limit int ) ( [ ] * model . Scheme , * model . AppError )
GetSchemesPage ( scope string , page int , perPage int ) ( [ ] * model . Scheme , * model . AppError )
GetSession ( token string ) ( * model . Session , * model . AppError )
2023-10-30 16:33:37 +01:00
GetSessionById ( c request . CTX , sessionID string ) ( * model . Session , * model . AppError )
GetSessions ( c request . CTX , userID string ) ( [ ] * model . Session , * model . AppError )
2021-04-01 13:44:56 -04:00
GetSharedChannel ( channelID string ) ( * model . SharedChannel , error )
GetSharedChannelRemote ( id string ) ( * model . SharedChannelRemote , error )
GetSharedChannelRemoteByIds ( channelID string , remoteID string ) ( * model . SharedChannelRemote , error )
GetSharedChannelRemotes ( opts model . SharedChannelRemoteFilterOpts ) ( [ ] * model . SharedChannelRemote , error )
GetSharedChannelRemotesStatus ( channelID string ) ( [ ] * model . SharedChannelRemoteStatus , error )
GetSharedChannels ( page int , perPage int , opts model . SharedChannelFilterOpts ) ( [ ] * model . SharedChannel , * model . AppError )
GetSharedChannelsCount ( opts model . SharedChannelFilterOpts ) ( int64 , error )
2022-07-14 12:01:29 +03:00
GetSidebarCategories ( c request . CTX , userID string , opts * store . SidebarCategorySearchOpts ) ( * model . OrderedSidebarCategories , * model . AppError )
GetSidebarCategoriesForTeamForUser ( c request . CTX , userID , teamID string ) ( * model . OrderedSidebarCategories , * model . AppError )
GetSidebarCategory ( c request . CTX , categoryId string ) ( * model . SidebarCategoryWithChannels , * model . AppError )
GetSidebarCategoryOrder ( c request . CTX , userID , teamID string ) ( [ ] string , * model . AppError )
2022-06-06 13:29:42 +05:30
GetSinglePost ( postID string , includeDeleted bool ) ( * model . Post , * model . AppError )
2020-02-13 13:26:58 +01:00
GetSiteURL ( ) string
2021-02-05 11:22:27 +01:00
GetStatus ( userID string ) ( * model . Status , * model . AppError )
GetStatusFromCache ( userID string ) * model . Status
2024-02-16 23:12:49 +07:00
GetSystemBot ( rctx request . CTX ) ( * model . Bot , * model . AppError )
2021-02-05 11:22:27 +01:00
GetTeam ( teamID string ) ( * model . Team , * model . AppError )
2020-02-13 13:26:58 +01:00
GetTeamByInviteId ( inviteId string ) ( * model . Team , * model . AppError )
GetTeamByName ( name string ) ( * model . Team , * model . AppError )
GetTeamIcon ( team * model . Team ) ( [ ] byte , * model . AppError )
GetTeamIdFromQuery ( query url . Values ) ( string , * model . AppError )
2023-10-11 13:08:55 +02:00
GetTeamMember ( c request . CTX , teamID , userID string ) ( * model . TeamMember , * model . AppError )
2021-02-05 11:22:27 +01:00
GetTeamMembers ( teamID string , offset int , limit int , teamMembersGetOptions * model . TeamMembersGetOptions ) ( [ ] * model . TeamMember , * model . AppError )
GetTeamMembersByIds ( teamID string , userIDs [ ] string , restrictions * model . ViewUsersRestrictions ) ( [ ] * model . TeamMember , * model . AppError )
2023-10-11 13:08:55 +02:00
GetTeamMembersForUser ( c request . CTX , userID string , excludeTeamID string , includeDeleted bool ) ( [ ] * model . TeamMember , * model . AppError )
2021-02-05 11:22:27 +01:00
GetTeamMembersForUserWithPagination ( userID string , page , perPage int ) ( [ ] * model . TeamMember , * model . AppError )
2021-04-20 13:16:40 -04:00
GetTeamPoliciesForUser ( userID string , offset , limit int ) ( * model . RetentionPolicyForTeamList , * model . AppError )
2021-02-05 11:22:27 +01:00
GetTeamStats ( teamID string , restrictions * model . ViewUsersRestrictions ) ( * model . TeamStats , * model . AppError )
GetTeamUnread ( teamID , userID string ) ( * model . TeamUnread , * model . AppError )
2022-04-11 20:51:33 +05:30
GetTeams ( teamIDs [ ] string ) ( [ ] * model . Team , * model . AppError )
2021-04-20 13:16:40 -04:00
GetTeamsForRetentionPolicy ( policyID string , offset , limit int ) ( * model . TeamsWithCount , * model . AppError )
2020-02-13 13:26:58 +01:00
GetTeamsForScheme ( scheme * model . Scheme , offset int , limit int ) ( [ ] * model . Team , * model . AppError )
GetTeamsForSchemePage ( scheme * model . Scheme , page int , perPage int ) ( [ ] * model . Team , * model . AppError )
2021-02-05 11:22:27 +01:00
GetTeamsForUser ( userID string ) ( [ ] * model . Team , * model . AppError )
2021-07-22 10:24:20 -04:00
GetTeamsUnreadForUser ( excludeTeamId string , userID string , includeCollapsedThreads bool ) ( [ ] * model . TeamUnread , * model . AppError )
2022-05-31 15:06:54 -04:00
GetTeamsUsage ( ) ( * model . TeamsUsage , * model . AppError )
2020-02-13 13:26:58 +01:00
GetTermsOfService ( id string ) ( * model . TermsOfService , * model . AppError )
2022-11-09 12:16:20 +04:00
GetThreadForUser ( threadMembership * model . ThreadMembership , extended bool ) ( * model . ThreadResponse , * model . AppError )
2021-06-14 12:33:08 -04:00
GetThreadMembershipForUser ( userId , threadId string ) ( * model . ThreadMembership , * model . AppError )
2021-02-05 11:22:27 +01:00
GetThreadMembershipsForUser ( userID , teamID string ) ( [ ] * model . ThreadMembership , error )
GetThreadsForUser ( userID , teamID string , options model . GetUserThreadsOpts ) ( * model . Threads , * model . AppError )
2021-10-05 10:50:02 +03:00
GetTokenById ( token string ) ( * model . Token , * model . AppError )
2022-12-29 14:27:45 -06:00
GetTrueUpProfile ( ) ( map [ string ] any , error )
2022-12-13 11:47:05 -06:00
GetUploadSession ( c request . CTX , uploadId string ) ( * model . UploadSession , * model . AppError )
2021-02-05 11:22:27 +01:00
GetUploadSessionsForUser ( userID string ) ( [ ] * model . UploadSession , * model . AppError )
GetUser ( userID string ) ( * model . User , * model . AppError )
GetUserAccessToken ( tokenID string , sanitize bool ) ( * model . UserAccessToken , * model . AppError )
2020-02-13 13:26:58 +01:00
GetUserAccessTokens ( page , perPage int ) ( [ ] * model . UserAccessToken , * model . AppError )
2021-02-05 11:22:27 +01:00
GetUserAccessTokensForUser ( userID string , page , perPage int ) ( [ ] * model . UserAccessToken , * model . AppError )
2020-02-13 13:26:58 +01:00
GetUserByAuth ( authData * string , authService string ) ( * model . User , * model . AppError )
GetUserByEmail ( email string ) ( * model . User , * model . AppError )
2023-08-14 17:54:10 +02:00
GetUserByRemoteID ( remoteID string ) ( * model . User , * model . AppError )
2020-02-13 13:26:58 +01:00
GetUserByUsername ( username string ) ( * model . User , * model . AppError )
2024-01-10 09:08:23 -05:00
GetUserCountForReport ( filter * model . UserReportOptions ) ( * int64 , * model . AppError )
2023-10-30 16:33:37 +01:00
GetUserForLogin ( c request . CTX , id , loginId string ) ( * model . User , * model . AppError )
2023-12-21 18:30:19 +05:30
GetUserLimits ( ) ( * model . UserLimits , * model . AppError )
2021-02-05 11:22:27 +01:00
GetUserTermsOfService ( userID string ) ( * model . UserTermsOfService , * model . AppError )
2022-05-06 21:53:29 +05:30
GetUsers ( userIDs [ ] string ) ( [ ] * model . User , * model . AppError )
2023-10-30 16:33:37 +01:00
GetUsersByGroupChannelIds ( c request . CTX , channelIDs [ ] string , asAdmin bool ) ( map [ string ] [ ] * model . User , * model . AppError )
2021-02-05 11:22:27 +01:00
GetUsersByIds ( userIDs [ ] string , options * store . UserGetByIdsOpts ) ( [ ] * model . User , * model . AppError )
2020-02-13 13:26:58 +01:00
GetUsersByUsernames ( usernames [ ] string , asAdmin bool , viewRestrictions * model . ViewUsersRestrictions ) ( [ ] * model . User , * model . AppError )
GetUsersEtag ( restrictionsHash string ) string
2023-12-08 10:30:08 -05:00
GetUsersForReporting ( filter * model . UserReportOptions ) ( [ ] * model . UserReport , * model . AppError )
2022-05-06 21:53:29 +05:30
GetUsersFromProfiles ( options * model . UserGetOptions ) ( [ ] * model . User , * model . AppError )
2020-09-16 11:04:17 +03:00
GetUsersInChannel ( options * model . UserGetOptions ) ( [ ] * model . User , * model . AppError )
2022-06-30 09:20:14 -07:00
GetUsersInChannelByAdmin ( options * model . UserGetOptions ) ( [ ] * model . User , * model . AppError )
2020-09-16 11:04:17 +03:00
GetUsersInChannelByStatus ( options * model . UserGetOptions ) ( [ ] * model . User , * model . AppError )
GetUsersInChannelMap ( options * model . UserGetOptions , asAdmin bool ) ( map [ string ] * model . User , * model . AppError )
GetUsersInChannelPage ( options * model . UserGetOptions , asAdmin bool ) ( [ ] * model . User , * model . AppError )
2022-06-30 09:20:14 -07:00
GetUsersInChannelPageByAdmin ( options * model . UserGetOptions , asAdmin bool ) ( [ ] * model . User , * model . AppError )
2020-09-16 11:04:17 +03:00
GetUsersInChannelPageByStatus ( options * model . UserGetOptions , asAdmin bool ) ( [ ] * model . User , * model . AppError )
2020-02-13 13:26:58 +01:00
GetUsersInTeam ( options * model . UserGetOptions ) ( [ ] * model . User , * model . AppError )
2021-02-05 11:22:27 +01:00
GetUsersInTeamEtag ( teamID string , restrictionsHash string ) string
2020-02-13 13:26:58 +01:00
GetUsersInTeamPage ( options * model . UserGetOptions , asAdmin bool ) ( [ ] * model . User , * model . AppError )
2021-02-25 20:22:27 +01:00
GetUsersNotInChannel ( teamID string , channelID string , groupConstrained bool , offset int , limit int , viewRestrictions * model . ViewUsersRestrictions ) ( [ ] * model . User , * model . AppError )
GetUsersNotInChannelMap ( teamID string , channelID string , groupConstrained bool , offset int , limit int , asAdmin bool , viewRestrictions * model . ViewUsersRestrictions ) ( map [ string ] * model . User , * model . AppError )
GetUsersNotInChannelPage ( teamID string , channelID string , groupConstrained bool , page int , perPage int , asAdmin bool , viewRestrictions * model . ViewUsersRestrictions ) ( [ ] * model . User , * model . AppError )
2022-10-25 11:54:51 -04:00
GetUsersNotInGroupPage ( groupID string , page int , perPage int , viewRestrictions * model . ViewUsersRestrictions ) ( [ ] * model . User , * model . AppError )
2021-02-05 11:22:27 +01:00
GetUsersNotInTeam ( teamID string , groupConstrained bool , offset int , limit int , viewRestrictions * model . ViewUsersRestrictions ) ( [ ] * model . User , * model . AppError )
GetUsersNotInTeamEtag ( teamID string , restrictionsHash string ) string
GetUsersNotInTeamPage ( teamID string , groupConstrained bool , page int , perPage int , asAdmin bool , viewRestrictions * model . ViewUsersRestrictions ) ( [ ] * model . User , * model . AppError )
2020-02-13 13:26:58 +01:00
GetUsersPage ( options * model . UserGetOptions , asAdmin bool ) ( [ ] * model . User , * model . AppError )
2022-02-10 15:36:14 -05:00
GetUsersWithInvalidEmails ( page int , perPage int ) ( [ ] * model . User , * model . AppError )
2020-02-13 13:26:58 +01:00
GetUsersWithoutTeam ( options * model . UserGetOptions ) ( [ ] * model . User , * model . AppError )
GetUsersWithoutTeamPage ( options * model . UserGetOptions , asAdmin bool ) ( [ ] * model . User , * model . AppError )
GetVerifyEmailToken ( token string ) ( * model . Token , * model . AppError )
2023-10-11 13:08:55 +02:00
GetViewUsersRestrictions ( c request . CTX , userID string ) ( * model . ViewUsersRestrictions , * model . AppError )
2020-02-13 13:26:58 +01:00
HTTPService ( ) httpservice . HTTPService
2022-08-02 20:48:54 +05:30
HandleCommandResponse ( c request . CTX , command * model . Command , args * model . CommandArgs , response * model . CommandResponse , builtIn bool ) ( * model . CommandResponse , * model . AppError )
HandleCommandResponsePost ( c request . CTX , command * model . Command , args * model . CommandArgs , response * model . CommandResponse , builtIn bool ) ( * model . Post , * model . AppError )
2023-10-30 16:33:37 +01:00
HandleCommandWebhook ( c request . CTX , hookID string , response * model . CommandResponse ) * model . AppError
2023-11-07 10:04:16 +01:00
HandleImages ( rctx request . CTX , previewPathList [ ] string , thumbnailPathList [ ] string , fileData [ ] [ ] byte )
2023-10-30 16:33:37 +01:00
HandleIncomingWebhook ( c request . CTX , hookID string , req * model . IncomingWebhookRequest ) * model . AppError
2020-02-13 13:26:58 +01:00
HandleMessageExportConfig ( cfg * model . Config , appCfg * model . Config )
HasPermissionTo ( askingUserId string , permission * model . Permission ) bool
2022-07-14 12:01:29 +03:00
HasPermissionToChannel ( c request . CTX , askingUserId string , channelID string , permission * model . Permission ) bool
2023-10-11 13:08:55 +02:00
HasPermissionToChannelByPost ( c request . CTX , askingUserId string , postID string , permission * model . Permission ) bool
2022-07-14 12:01:29 +03:00
HasPermissionToReadChannel ( c request . CTX , userID string , channel * model . Channel ) bool
2023-10-11 13:08:55 +02:00
HasPermissionToTeam ( c request . CTX , askingUserId string , teamID string , permission * model . Permission ) bool
2021-02-05 11:22:27 +01:00
HasPermissionToUser ( askingUserId string , userID string ) bool
2021-04-01 13:44:56 -04:00
HasSharedChannel ( channelID string ) ( bool , error )
2023-11-14 09:12:04 -05:00
IPFiltering ( ) einterfaces . IPFilteringInterface
2020-02-13 13:26:58 +01:00
ImageProxy ( ) * imageproxy . ImageProxy
ImageProxyAdder ( ) func ( string ) string
2020-04-09 11:08:39 +03:00
ImageProxyRemover ( ) ( f func ( string ) string )
2020-02-13 13:26:58 +01:00
ImportPermissions ( jsonl io . Reader ) error
2023-10-30 16:33:37 +01:00
InitPlugins ( c request . CTX , pluginDir , webappPluginDir string )
InvalidateAllEmailInvites ( c request . CTX ) * model . AppError
InvalidateAllResendInviteEmailJobs ( c request . CTX ) * model . AppError
2021-02-05 11:22:27 +01:00
InvalidateCacheForUser ( userID string )
2023-05-15 11:28:54 -06:00
InvalidatePasswordRecoveryTokensForUser ( userID string ) * model . AppError
2021-02-05 11:22:27 +01:00
InviteGuestsToChannels ( teamID string , guestsInvite * model . GuestsInvite , senderId string ) * model . AppError
InviteGuestsToChannelsGracefully ( teamID string , guestsInvite * model . GuestsInvite , senderId string ) ( [ ] * model . EmailInviteWithError , * model . AppError )
InviteNewUsersToTeam ( emailList [ ] string , teamID , senderId string ) * model . AppError
2022-04-08 12:20:44 -05:00
InviteNewUsersToTeamGracefully ( memberInvite * model . MemberInvite , teamID , senderId string , reminderInterval string ) ( [ ] * model . EmailInviteWithError , * model . AppError )
2024-02-09 10:47:12 -05:00
InviteRemoteToChannel ( channelID , remoteID , userID string , shareIfNotShared bool ) error
2022-07-14 12:01:29 +03:00
IsCRTEnabledForUser ( c request . CTX , userID string ) bool
2023-04-18 13:58:33 +02:00
IsConfigReadOnly ( ) bool
2020-02-13 13:26:58 +01:00
IsFirstUserAccount ( ) bool
IsLeader ( ) bool
2023-11-08 14:39:09 +01:00
IsPasswordValid ( rctx request . CTX , password string ) * model . AppError
2023-05-18 23:44:12 +05:30
IsPersistentNotificationsEnabled ( ) bool
2020-02-13 13:26:58 +01:00
IsPhase2MigrationCompleted ( ) * model . AppError
2023-01-25 10:24:01 -07:00
IsPluginActive ( pluginName string ) ( bool , error )
2023-05-18 23:44:12 +05:30
IsPostPriorityEnabled ( ) bool
2020-02-13 13:26:58 +01:00
IsUserSignUpAllowed ( ) * model . AppError
2022-07-14 12:01:29 +03:00
JoinChannel ( c request . CTX , channel * model . Channel , userID string ) * model . AppError
JoinDefaultChannels ( c request . CTX , teamID string , user * model . User , shouldBeAdmin bool , userRequestorId string ) * model . AppError
2022-07-28 10:04:21 +05:30
JoinUserToTeam ( c request . CTX , team * model . Team , user * model . User , userRequestorId string ) ( * model . TeamMember , * model . AppError )
2020-02-13 13:26:58 +01:00
Ldap ( ) einterfaces . LdapInterface
2022-07-14 12:01:29 +03:00
LeaveChannel ( c request . CTX , channelID string , userID string ) * model . AppError
2022-08-05 08:49:01 +05:30
LeaveTeam ( c request . CTX , team * model . Team , user * model . User , requestorId string ) * model . AppError
2021-11-08 11:57:22 +05:30
License ( ) * model . License
2020-02-13 13:26:58 +01:00
LimitedClientConfig ( ) map [ string ] string
2021-02-26 08:12:49 +01:00
ListAllCommands ( teamID string , T i18n . TranslateFunc ) ( [ ] * model . Command , * model . AppError )
2020-02-13 13:26:58 +01:00
ListDirectory ( path string ) ( [ ] string , * model . AppError )
2022-03-15 12:57:29 +01:00
ListDirectoryRecursively ( path string ) ( [ ] string , * model . AppError )
2023-07-19 13:01:39 -07:00
ListExportDirectory ( path string ) ( [ ] string , * model . AppError )
2021-02-09 11:58:31 +01:00
ListExports ( ) ( [ ] string , * model . AppError )
2020-12-03 11:38:00 +01:00
ListImports ( ) ( [ ] string , * model . AppError )
2021-02-25 20:22:27 +01:00
ListPluginKeys ( pluginID string , page , perPage int ) ( [ ] string , * model . AppError )
2021-02-05 11:22:27 +01:00
ListTeamCommands ( teamID string ) ( [ ] * model . Command , * model . AppError )
2020-02-13 13:26:58 +01:00
Log ( ) * mlog . Logger
2023-10-30 16:33:37 +01:00
LoginByOAuth ( c request . CTX , service string , userData io . Reader , teamID string , tokenUser * model . User ) ( * model . User , * model . AppError )
2023-07-10 10:18:55 +05:30
MarkChannelsAsViewed ( c request . CTX , channelIDs [ ] string , userID string , currentSessionId string , collapsedThreadsSupported , isCRTEnabled bool ) ( map [ string ] int64 , * model . AppError )
2020-02-13 13:26:58 +01:00
MaxPostSize ( ) int
MessageExport ( ) einterfaces . MessageExportInterface
Metrics ( ) einterfaces . MetricsInterface
2023-10-30 16:33:37 +01:00
MigrateIdLDAP ( c request . CTX , toAttribute string ) * model . AppError
2020-02-13 13:26:58 +01:00
MoveCommand ( team * model . Team , command * model . Command ) * model . AppError
MoveFile ( oldPath , newPath string ) * model . AppError
2023-12-11 15:27:34 -05:00
MoveThread ( c request . CTX , postID string , sourceChannelID , channelID string , user * model . User ) * model . AppError
2023-10-30 16:33:37 +01:00
NewPluginAPI ( c request . CTX , manifest * model . Manifest ) plugin . API
2020-02-13 13:26:58 +01:00
Notification ( ) einterfaces . NotificationInterface
NotificationsLog ( ) * mlog . Logger
2022-12-13 13:36:18 -06:00
NotifySelfHostedSignupProgress ( progress string , userId string )
2021-04-14 14:59:26 -04:00
NotifySharedChannelUserUpdate ( user * model . User )
2020-02-13 13:26:58 +01:00
OpenInteractiveDialog ( request model . OpenDialogRequest ) * model . AppError
OriginChecker ( ) func ( * http . Request ) bool
2023-12-26 10:46:20 +01:00
OutgoingOAuthConnections ( ) einterfaces . OutgoingOAuthConnectionInterface
2022-07-14 12:01:29 +03:00
PatchChannel ( c request . CTX , channel * model . Channel , patch * model . ChannelPatch , userID string ) ( * model . Channel , * model . AppError )
2024-01-11 13:24:52 -05:00
PatchChannelMembersNotifyProps ( c request . CTX , members [ ] * model . ChannelMemberIdentifier , notifyProps map [ string ] string ) ( [ ] * model . ChannelMember , * model . AppError )
2023-10-30 16:33:37 +01:00
PatchPost ( c request . CTX , postID string , patch * model . PostPatch ) ( * model . Post , * model . AppError )
2021-04-20 13:16:40 -04:00
PatchRetentionPolicy ( patch * model . RetentionPolicyWithTeamAndChannelIDs ) ( * model . RetentionPolicyWithTeamAndChannelCounts , * model . AppError )
2020-02-13 13:26:58 +01:00
PatchRole ( role * model . Role , patch * model . RolePatch ) ( * model . Role , * model . AppError )
PatchScheme ( scheme * model . Scheme , patch * model . SchemePatch ) ( * model . Scheme , * model . AppError )
2021-02-05 11:22:27 +01:00
PatchTeam ( teamID string , patch * model . TeamPatch ) ( * model . Team , * model . AppError )
2022-07-28 10:04:21 +05:30
PatchUser ( c request . CTX , userID string , patch * model . UserPatch , asAdmin bool ) ( * model . User , * model . AppError )
2023-10-30 16:33:37 +01:00
PermanentDeleteAllUsers ( c request . CTX ) * model . AppError
2022-07-14 12:01:29 +03:00
PermanentDeleteChannel ( c request . CTX , channel * model . Channel ) * model . AppError
PermanentDeleteTeam ( c request . CTX , team * model . Team ) * model . AppError
PermanentDeleteTeamId ( c request . CTX , teamID string ) * model . AppError
2023-10-30 16:33:37 +01:00
PermanentDeleteUser ( c request . CTX , user * model . User ) * model . AppError
2020-02-13 13:26:58 +01:00
PostActionCookieSecret ( ) [ ] byte
2022-07-14 12:01:29 +03:00
PostAddToChannelMessage ( c request . CTX , user * model . User , addedUser * model . User , channel * model . Channel , postRootId string ) * model . AppError
2020-02-13 13:26:58 +01:00
PostPatchWithProxyRemovedFromImageURLs ( patch * model . PostPatch ) * model . PostPatch
2022-07-14 12:01:29 +03:00
PostUpdateChannelDisplayNameMessage ( c request . CTX , userID string , channel * model . Channel , oldChannelDisplayName , newChannelDisplayName string ) * model . AppError
PostUpdateChannelHeaderMessage ( c request . CTX , userID string , channel * model . Channel , oldChannelHeader , newChannelHeader string ) * model . AppError
PostUpdateChannelPurposeMessage ( c request . CTX , userID string , channel * model . Channel , oldChannelPurpose string , newChannelPurpose string ) * model . AppError
2020-02-13 13:26:58 +01:00
PostWithProxyAddedToImageURLs ( post * model . Post ) * model . Post
PostWithProxyRemovedFromImageURLs ( post * model . Post ) * model . Post
2022-11-23 21:08:21 +02:00
PreparePostForClient ( c request . CTX , originalPost * model . Post , isNewPost , isEditPost , includePriority bool ) * model . Post
PreparePostForClientWithEmbedsAndImages ( c request . CTX , originalPost * model . Post , isNewPost , isEditPost , includePriority bool ) * model . Post
2022-07-14 12:01:29 +03:00
PreparePostListForClient ( c request . CTX , originalList * model . PostList ) * model . PostList
2020-02-13 13:26:58 +01:00
ProcessSlackText ( text string ) string
Publish ( message * model . WebSocketEvent )
2021-02-25 20:22:27 +01:00
PublishUserTyping ( userID , channelID , parentId string ) * model . AppError
2023-12-04 18:34:57 +01:00
PurgeBleveIndexes ( c request . CTX ) * model . AppError
2024-03-13 10:26:06 +05:30
PurgeElasticsearchIndexes ( c request . CTX , indexes [ ] string ) * model . AppError
2023-11-29 17:07:54 +01:00
QueryLogs ( rctx request . CTX , page , perPage int , logFilter * model . LogFilter ) ( map [ string ] [ ] string , * model . AppError )
2020-02-13 13:26:58 +01:00
ReadFile ( path string ) ( [ ] byte , * model . AppError )
2023-11-29 17:07:54 +01:00
RecycleDatabaseConnection ( rctx request . CTX )
2020-02-13 13:26:58 +01:00
RegenCommandToken ( cmd * model . Command ) ( * model . Command , * model . AppError )
RegenOutgoingWebhookToken ( hook * model . OutgoingWebhook ) ( * model . OutgoingWebhook , * model . AppError )
RegenerateOAuthAppSecret ( app * model . OAuthApp ) ( * model . OAuthApp , * model . AppError )
2021-02-05 11:22:27 +01:00
RegenerateTeamInviteId ( teamID string ) ( * model . Team , * model . AppError )
2021-02-25 20:22:27 +01:00
RegisterPluginCommand ( pluginID string , command * model . Command ) error
Shared channels plugin APIs for MS Teams plugin (#25805)
New plugin APIs and hooks for accessing Shared Channels service via plugin.
- RegisterPluginForSharedChannels(opts model.RegisterPluginOpts) (remoteID string, err error)
- UnregisterPluginForSharedChannels(pluginID string) error
- ShareChannel(sc *model.SharedChannel) (*model.SharedChannel, error)
- UpdateSharedChannel(sc *model.SharedChannel) (*model.SharedChannel, error)
- UnshareChannel(channelID string) (unshared bool, err error)
- UpdateSharedChannelCursor(channelID, remoteID string, cusror model.GetPostsSinceForSyncCursor) error
- SyncSharedChannel(channelID string) error
- InviteRemoteToChannel(channelID string, remoteID string, userID string) error
- UninviteRemoteFromChannel(channelID string, remoteID string) error
Hooks
- OnSharedChannelsSyncMsg(msg *model.SyncMsg, rc *model.RemoteCluster) (model.SyncResponse, error)
- OnSharedChannelsPing(rc *model.RemoteCluster) bool
2023-12-22 17:00:27 -05:00
RegisterPluginForSharedChannels ( opts model . RegisterPluginOpts ) ( remoteID string , err error )
2020-02-13 13:26:58 +01:00
ReloadConfig ( ) error
2022-07-14 12:01:29 +03:00
RemoveAllDeactivatedMembersFromChannel ( c request . CTX , channel * model . Channel ) * model . AppError
2021-04-20 13:16:40 -04:00
RemoveChannelsFromRetentionPolicy ( policyID string , channelIDs [ ] string ) * model . AppError
2022-07-28 10:04:21 +05:30
RemoveCustomStatus ( c request . CTX , userID string ) * model . AppError
2020-12-20 12:53:07 +01:00
RemoveDirectory ( path string ) * model . AppError
2023-07-19 13:01:39 -07:00
RemoveExportFile ( path string ) * model . AppError
2020-02-13 13:26:58 +01:00
RemoveFile ( path string ) * model . AppError
2020-09-14 12:53:42 -06:00
RemoveLdapPrivateCertificate ( ) * model . AppError
RemoveLdapPublicCertificate ( ) * model . AppError
2023-06-05 16:02:40 +05:30
RemoveNotifications ( c request . CTX , post * model . Post , channel * model . Channel ) error
2024-01-03 12:25:53 -05:00
RemoveRecentCustomStatus ( c request . CTX , userID string , status * model . CustomStatus ) * model . AppError
2020-02-13 13:26:58 +01:00
RemoveSamlIdpCertificate ( ) * model . AppError
RemoveSamlPrivateCertificate ( ) * model . AppError
RemoveSamlPublicCertificate ( ) * model . AppError
2021-02-05 11:22:27 +01:00
RemoveTeamIcon ( teamID string ) * model . AppError
2021-04-20 13:16:40 -04:00
RemoveTeamsFromRetentionPolicy ( policyID string , teamIDs [ ] string ) * model . AppError
2022-07-14 12:01:29 +03:00
RemoveUserFromChannel ( c request . CTX , userIDToRemove string , removerUserId string , channel * model . Channel ) * model . AppError
2022-08-05 08:49:01 +05:30
RemoveUserFromTeam ( c request . CTX , teamID string , userID string , requestorId string ) * model . AppError
2022-07-14 12:01:29 +03:00
RemoveUsersFromChannelNotMemberOfTeam ( c request . CTX , remover * model . User , channel * model . Channel , team * model . Team ) * model . AppError
2022-07-28 10:04:21 +05:30
ResetPasswordFromToken ( c request . CTX , userSuppliedTokenString , newPassword string ) * model . AppError
2020-02-13 13:26:58 +01:00
ResetPermissionsSystem ( ) * model . AppError
2021-04-12 18:46:30 -04:00
ResetSamlAuthDataToEmail ( includeDeleted bool , dryRun bool , userIDs [ ] string ) ( numAffected int , appErr * model . AppError )
2022-07-14 12:01:29 +03:00
RestoreChannel ( c request . CTX , channel * model . Channel , userID string ) ( * model . Channel , * model . AppError )
2022-11-17 14:53:54 +05:30
RestoreGroup ( groupID string ) ( * model . Group , * model . AppError )
2021-02-05 11:22:27 +01:00
RestoreTeam ( teamID string ) * model . AppError
2023-10-11 13:08:55 +02:00
RestrictUsersGetByPermissions ( c request . CTX , userID string , options * model . UserGetOptions ) ( * model . UserGetOptions , * model . AppError )
RestrictUsersSearchByPermissions ( c request . CTX , userID string , options * model . UserSearchOptions ) ( * model . UserSearchOptions , * model . AppError )
2021-06-14 18:08:00 +03:00
ReturnSessionToPool ( session * model . Session )
2023-10-30 16:33:37 +01:00
RevokeAccessToken ( c request . CTX , token string ) * model . AppError
RevokeAllSessions ( c request . CTX , userID string ) * model . AppError
RevokeSession ( c request . CTX , session * model . Session ) * model . AppError
RevokeSessionById ( c request . CTX , sessionID string ) * model . AppError
RevokeSessionsForDeviceId ( c request . CTX , userID string , deviceID string , currentSessionId string ) * model . AppError
RevokeUserAccessToken ( c request . CTX , token * model . UserAccessToken ) * model . AppError
2020-02-13 13:26:58 +01:00
RolesGrantPermission ( roleNames [ ] string , permissionId string ) bool
Saml ( ) einterfaces . SamlInterface
2022-07-14 12:01:29 +03:00
SanitizePostListMetadataForUser ( c request . CTX , postList * model . PostList , userID string ) ( * model . PostList , * model . AppError )
SanitizePostMetadataForUser ( c request . CTX , post * model . Post , userID string ) ( * model . Post , * model . AppError )
2020-02-13 13:26:58 +01:00
SanitizeProfile ( user * model . User , asAdmin bool )
SanitizeTeam ( session model . Session , team * model . Team ) * model . Team
SanitizeTeams ( session model . Session , teams [ ] * model . Team ) [ ] * model . Team
2023-10-30 16:33:37 +01:00
SaveAcknowledgementForPost ( c request . CTX , postID , userID string ) ( * model . PostAcknowledgement , * model . AppError )
2022-09-02 13:52:48 +03:00
SaveAdminNotification ( userId string , notifyData * model . NotifyAdminToUpgradeRequest ) * model . AppError
SaveAdminNotifyData ( data * model . NotifyAdminData ) ( * model . NotifyAdminData , * model . AppError )
2023-11-29 21:37:16 +05:30
SaveBrandImage ( rctx request . CTX , imageData * multipart . FileHeader ) * model . AppError
2023-10-23 10:20:32 +02:00
SaveComplianceReport ( rctx request . CTX , job * model . Compliance ) ( * model . Compliance , * model . AppError )
2023-10-30 16:33:37 +01:00
SaveReactionForPost ( c request . CTX , reaction * model . Reaction ) ( * model . Reaction , * model . AppError )
2024-01-19 15:22:17 -05:00
SaveReportChunk ( format string , prefix string , count int , reportData [ ] model . ReportableObject ) * model . AppError
2021-04-01 13:44:56 -04:00
SaveSharedChannelRemote ( remote * model . SharedChannelRemote ) ( * model . SharedChannelRemote , error )
2021-02-05 11:22:27 +01:00
SaveUserTermsOfService ( userID , termsOfServiceId string , accepted bool ) * model . AppError
2020-03-23 13:44:20 -04:00
SchemesIterator ( scope string , batchSize int ) func ( ) [ ] * model . Scheme
2022-07-14 12:01:29 +03:00
SearchArchivedChannels ( c request . CTX , teamID string , term string , userID string ) ( model . ChannelList , * model . AppError )
SearchChannels ( c request . CTX , teamID string , term string ) ( model . ChannelList , * model . AppError )
SearchChannelsForUser ( c request . CTX , userID , teamID , term string ) ( model . ChannelList , * model . AppError )
SearchChannelsUserNotIn ( c request . CTX , teamID string , userID string , term string ) ( model . ChannelList , * model . AppError )
2022-11-03 08:54:59 +01:00
SearchEmoji ( c request . CTX , name string , prefixOnly bool , limit int ) ( [ ] * model . Emoji , * model . AppError )
2020-03-13 15:33:18 +01:00
SearchEngine ( ) * searchengine . Broker
2023-10-30 16:33:37 +01:00
SearchFilesInTeamForUser ( c request . CTX , terms string , userId string , teamId string , isOrSearch bool , includeDeletedChannels bool , timeZoneOffset int , page , perPage int ) ( * model . FileInfoList , * model . AppError )
2022-07-14 12:01:29 +03:00
SearchGroupChannels ( c request . CTX , userID , term string ) ( model . ChannelList , * model . AppError )
2023-10-30 16:33:37 +01:00
SearchPostsForUser ( c request . CTX , terms string , userID string , teamID string , isOrSearch bool , includeDeletedChannels bool , timeZoneOffset int , page , perPage int ) ( * model . PostSearchResults , * model . AppError )
2021-02-05 11:22:27 +01:00
SearchPostsInTeam ( teamID string , paramsList [ ] * model . SearchParams ) ( * model . PostList , * model . AppError )
2021-04-20 13:16:40 -04:00
SearchPrivateTeams ( searchOpts * model . TeamSearch ) ( [ ] * model . Team , * model . AppError )
SearchPublicTeams ( searchOpts * model . TeamSearch ) ( [ ] * model . Team , * model . AppError )
2020-02-13 13:26:58 +01:00
SearchUserAccessTokens ( term string ) ( [ ] * model . UserAccessToken , * model . AppError )
2023-12-04 18:34:57 +01:00
SearchUsers ( rctx request . CTX , props * model . UserSearch , options * model . UserSearchOptions ) ( [ ] * model . User , * model . AppError )
2021-02-25 20:22:27 +01:00
SearchUsersInChannel ( channelID string , term string , options * model . UserSearchOptions ) ( [ ] * model . User , * model . AppError )
2020-06-18 10:22:35 -04:00
SearchUsersInGroup ( groupID string , term string , options * model . UserSearchOptions ) ( [ ] * model . User , * model . AppError )
2023-12-04 18:34:57 +01:00
SearchUsersInTeam ( rctx request . CTX , teamID , term string , options * model . UserSearchOptions ) ( [ ] * model . User , * model . AppError )
2021-02-25 20:22:27 +01:00
SearchUsersNotInChannel ( teamID string , channelID string , term string , options * model . UserSearchOptions ) ( [ ] * model . User , * model . AppError )
2022-02-17 12:34:39 -05:00
SearchUsersNotInGroup ( groupID string , term string , options * model . UserSearchOptions ) ( [ ] * model . User , * model . AppError )
2020-02-13 13:26:58 +01:00
SearchUsersNotInTeam ( notInTeamId string , term string , options * model . UserSearchOptions ) ( [ ] * model . User , * model . AppError )
SearchUsersWithoutTeam ( term string , options * model . UserSearchOptions ) ( [ ] * model . User , * model . AppError )
SendAckToPushProxy ( ack * model . PushNotificationAck ) error
2023-11-07 21:25:52 +03:00
SendAutoResponse ( rctx request . CTX , channel * model . Channel , receiver * model . User , post * model . Post ) ( bool , * model . AppError )
SendAutoResponseIfNecessary ( rctx request . CTX , channel * model . Channel , sender * model . User , post * model . Post ) ( bool , * model . AppError )
2022-08-25 09:39:35 -04:00
SendDelinquencyEmail ( emailToSend model . DelinquencyEmail ) * model . AppError
2020-07-21 17:09:49 +03:00
SendEmailVerification ( user * model . User , newEmail , redirect string ) * model . AppError
2022-07-14 12:01:29 +03:00
SendEphemeralPost ( c request . CTX , userID string , post * model . Post ) * model . Post
2024-02-20 10:52:55 -05:00
SendIPFiltersChangedEmail ( c request . CTX , userID string ) error
2022-07-14 12:01:29 +03:00
SendNotifications ( c request . CTX , post * model . Post , team * model . Team , channel * model . Channel , sender * model . User , parentPostList * model . PostList , setOnline bool ) ( [ ] string , error )
2023-10-30 16:33:37 +01:00
SendNotifyAdminPosts ( c request . CTX , workspaceName string , currentSKU string , trial bool ) * model . AppError
2020-02-13 13:26:58 +01:00
SendPasswordReset ( email string , siteURL string ) ( bool , * model . AppError )
2020-11-25 15:45:15 -05:00
SendPaymentFailedEmail ( failedPayment * model . FailedPayment ) * model . AppError
2023-05-18 23:44:12 +05:30
SendPersistentNotifications ( ) error
2024-01-29 09:52:33 -05:00
SendReportToUser ( rctx request . CTX , job * model . Job , format string ) * model . AppError
2022-03-02 12:15:58 +01:00
SendTestPushNotification ( deviceID string ) string
2022-12-05 12:10:00 -05:00
SendUpgradeConfirmationEmail ( isYearly bool ) * model . AppError
2020-02-13 13:26:58 +01:00
ServeInterPluginRequest ( w http . ResponseWriter , r * http . Request , sourcePluginId , destinationPluginId string )
SessionHasPermissionTo ( session model . Session , permission * model . Permission ) bool
2020-08-21 16:49:31 -04:00
SessionHasPermissionToAny ( session model . Session , permissions [ ] * model . Permission ) bool
2022-07-14 12:01:29 +03:00
SessionHasPermissionToCategory ( c request . CTX , session model . Session , userID , teamID , categoryId string ) bool
SessionHasPermissionToChannel ( c request . CTX , session model . Session , channelID string , permission * model . Permission ) bool
2021-02-25 20:22:27 +01:00
SessionHasPermissionToChannelByPost ( session model . Session , postID string , permission * model . Permission ) bool
2021-04-06 10:39:48 -04:00
SessionHasPermissionToCreateJob ( session model . Session , job * model . Job ) ( bool , * model . Permission )
2022-02-17 12:34:39 -05:00
SessionHasPermissionToGroup ( session model . Session , groupID string , permission * model . Permission ) bool
2021-04-06 10:39:48 -04:00
SessionHasPermissionToReadJob ( session model . Session , jobType string ) ( bool , * model . Permission )
2021-02-05 11:22:27 +01:00
SessionHasPermissionToTeam ( session model . Session , teamID string , permission * model . Permission ) bool
SessionHasPermissionToUser ( session model . Session , userID string ) bool
2024-03-11 20:24:35 +08:00
SessionHasPermissionToUserOrBot ( rctx request . CTX , session model . Session , userID string ) bool
2022-07-14 12:01:29 +03:00
SetActiveChannel ( c request . CTX , userID string , channelID string ) * model . AppError
2023-11-07 21:25:52 +03:00
SetAutoResponderStatus ( rctx request . CTX , user * model . User , oldNotifyProps model . StringMap )
2021-10-12 11:39:49 +05:30
SetChannels ( ch * Channels )
2022-07-28 10:04:21 +05:30
SetCustomStatus ( c request . CTX , userID string , cs * model . CustomStatus ) * model . AppError
SetDefaultProfileImage ( c request . CTX , user * model . User ) * model . AppError
2023-12-04 18:34:57 +01:00
SetFileSearchableContent ( rctx request . CTX , fileID string , data string ) * model . AppError
2020-02-13 13:26:58 +01:00
SetPhase2PermissionsMigrationStatus ( isComplete bool ) error
2021-02-25 20:22:27 +01:00
SetPluginKey ( pluginID string , key string , value [ ] byte ) * model . AppError
SetPluginKeyWithExpiry ( pluginID string , key string , value [ ] byte , expireInSeconds int64 ) * model . AppError
SetPluginKeyWithOptions ( pluginID string , key string , value [ ] byte , options model . PluginKVSetOptions ) ( bool , * model . AppError )
2022-07-26 16:12:56 +05:30
SetPostReminder ( postID , userID string , targetTime int64 ) * model . AppError
2022-07-28 10:04:21 +05:30
SetProfileImage ( c request . CTX , userID string , imageData * multipart . FileHeader ) * model . AppError
SetProfileImageFromFile ( c request . CTX , userID string , file io . Reader ) * model . AppError
SetProfileImageFromMultiPartFile ( c request . CTX , userID string , file multipart . File ) * model . AppError
2021-04-01 13:44:56 -04:00
SetRemoteClusterLastPingAt ( remoteClusterId string ) * model . AppError
2020-02-13 13:26:58 +01:00
SetSamlIdpCertificateFromMetadata ( data [ ] byte ) * model . AppError
2020-04-09 11:08:39 +03:00
SetSearchEngine ( se * searchengine . Broker )
2020-02-13 13:26:58 +01:00
SetServer ( srv * Server )
2021-02-05 11:22:27 +01:00
SetStatusAwayIfNeeded ( userID string , manual bool )
SetStatusDoNotDisturb ( userID string )
SetStatusOffline ( userID string , manual bool )
SetStatusOnline ( userID string , manual bool )
SetStatusOutOfOffice ( userID string )
SetTeamIcon ( teamID string , imageData * multipart . FileHeader ) * model . AppError
2020-02-13 13:26:58 +01:00
SetTeamIconFromFile ( team * model . Team , file io . Reader ) * model . AppError
2021-02-05 11:22:27 +01:00
SetTeamIconFromMultiPartFile ( teamID string , file multipart . File ) * model . AppError
Shared channels plugin APIs for MS Teams plugin (#25805)
New plugin APIs and hooks for accessing Shared Channels service via plugin.
- RegisterPluginForSharedChannels(opts model.RegisterPluginOpts) (remoteID string, err error)
- UnregisterPluginForSharedChannels(pluginID string) error
- ShareChannel(sc *model.SharedChannel) (*model.SharedChannel, error)
- UpdateSharedChannel(sc *model.SharedChannel) (*model.SharedChannel, error)
- UnshareChannel(channelID string) (unshared bool, err error)
- UpdateSharedChannelCursor(channelID, remoteID string, cusror model.GetPostsSinceForSyncCursor) error
- SyncSharedChannel(channelID string) error
- InviteRemoteToChannel(channelID string, remoteID string, userID string) error
- UninviteRemoteFromChannel(channelID string, remoteID string) error
Hooks
- OnSharedChannelsSyncMsg(msg *model.SyncMsg, rc *model.RemoteCluster) (model.SyncResponse, error)
- OnSharedChannelsPing(rc *model.RemoteCluster) bool
2023-12-22 17:00:27 -05:00
ShareChannel ( c request . CTX , sc * model . SharedChannel ) ( * model . SharedChannel , error )
2024-02-29 12:33:05 -05:00
ShouldSendPushNotification ( user * model . User , channelNotifyProps model . StringMap , wasMentioned bool , status * model . Status , post * model . Post , isGM bool ) bool
2023-10-30 16:33:37 +01:00
SlackImport ( c request . CTX , fileData multipart . File , fileSize int64 , teamID string ) ( * model . AppError , * bytes . Buffer )
2021-02-05 11:22:27 +01:00
SoftDeleteTeam ( teamID string ) * model . AppError
2020-02-13 13:26:58 +01:00
Srv ( ) * Server
2024-01-29 09:52:33 -05:00
StartUsersBatchExport ( rctx request . CTX , dateRange string , startAt int64 , endAt int64 ) * model . AppError
2023-10-30 16:33:37 +01:00
SubmitInteractiveDialog ( c request . CTX , request model . SubmitDialogRequest ) ( * model . SubmitDialogResponse , * model . AppError )
SwitchEmailToLdap ( c request . CTX , email , password , code , ldapLoginId , ldapPassword string ) ( string , * model . AppError )
SwitchEmailToOAuth ( c request . CTX , w http . ResponseWriter , r * http . Request , email , password , code , service string ) ( string , * model . AppError )
SwitchLdapToEmail ( c request . CTX , ldapPassword , code , email , newPassword string ) ( string , * model . AppError )
SwitchOAuthToEmail ( c request . CTX , email , password , requesterId string ) ( string , * model . AppError )
2020-02-13 13:26:58 +01:00
TeamMembersToRemove ( teamID * string ) ( [ ] * model . TeamMember , * model . AppError )
2020-09-08 20:30:54 +02:00
TelemetryId ( ) string
2023-12-04 18:34:57 +01:00
TestElasticsearch ( rctx request . CTX , cfg * model . Config ) * model . AppError
2023-11-29 17:07:54 +01:00
TestEmail ( rctx request . CTX , userID string , cfg * model . Config ) * model . AppError
2021-03-02 14:37:21 +01:00
TestFileStoreConnection ( ) * model . AppError
TestFileStoreConnectionWithConfig ( cfg * model . FileSettings ) * model . AppError
2023-11-03 08:06:16 +01:00
TestLdap ( rctx request . CTX ) * model . AppError
2023-11-29 17:07:54 +01:00
TestSiteURL ( rctx request . CTX , siteURL string ) * model . AppError
2020-02-13 13:26:58 +01:00
Timezones ( ) * timezones . Timezones
2022-07-14 12:01:29 +03:00
ToggleMuteChannel ( c request . CTX , channelID , userID string ) ( * model . ChannelMember , * model . AppError )
2020-02-13 13:26:58 +01:00
TotalWebsocketConnections ( ) int
2022-07-14 12:01:29 +03:00
TriggerWebhook ( c request . CTX , payload * model . OutgoingWebhookPayload , hook * model . OutgoingWebhook , post * model . Post , channel * model . Channel )
Shared channels plugin APIs for MS Teams plugin (#25805)
New plugin APIs and hooks for accessing Shared Channels service via plugin.
- RegisterPluginForSharedChannels(opts model.RegisterPluginOpts) (remoteID string, err error)
- UnregisterPluginForSharedChannels(pluginID string) error
- ShareChannel(sc *model.SharedChannel) (*model.SharedChannel, error)
- UpdateSharedChannel(sc *model.SharedChannel) (*model.SharedChannel, error)
- UnshareChannel(channelID string) (unshared bool, err error)
- UpdateSharedChannelCursor(channelID, remoteID string, cusror model.GetPostsSinceForSyncCursor) error
- SyncSharedChannel(channelID string) error
- InviteRemoteToChannel(channelID string, remoteID string, userID string) error
- UninviteRemoteFromChannel(channelID string, remoteID string) error
Hooks
- OnSharedChannelsSyncMsg(msg *model.SyncMsg, rc *model.RemoteCluster) (model.SyncResponse, error)
- OnSharedChannelsPing(rc *model.RemoteCluster) bool
2023-12-22 17:00:27 -05:00
UninviteRemoteFromChannel ( channelID , remoteID string ) error
2021-02-25 20:22:27 +01:00
UnregisterPluginCommand ( pluginID , teamID , trigger string )
Shared channels plugin APIs for MS Teams plugin (#25805)
New plugin APIs and hooks for accessing Shared Channels service via plugin.
- RegisterPluginForSharedChannels(opts model.RegisterPluginOpts) (remoteID string, err error)
- UnregisterPluginForSharedChannels(pluginID string) error
- ShareChannel(sc *model.SharedChannel) (*model.SharedChannel, error)
- UpdateSharedChannel(sc *model.SharedChannel) (*model.SharedChannel, error)
- UnshareChannel(channelID string) (unshared bool, err error)
- UpdateSharedChannelCursor(channelID, remoteID string, cusror model.GetPostsSinceForSyncCursor) error
- SyncSharedChannel(channelID string) error
- InviteRemoteToChannel(channelID string, remoteID string, userID string) error
- UninviteRemoteFromChannel(channelID string, remoteID string) error
Hooks
- OnSharedChannelsSyncMsg(msg *model.SyncMsg, rc *model.RemoteCluster) (model.SyncResponse, error)
- OnSharedChannelsPing(rc *model.RemoteCluster) bool
2023-12-22 17:00:27 -05:00
UnregisterPluginForSharedChannels ( pluginID string ) error
UnshareChannel ( channelID string ) ( bool , error )
2023-10-30 16:33:37 +01:00
UpdateActive ( c request . CTX , user * model . User , active bool ) ( * model . User , * model . AppError )
2024-03-12 22:36:05 +08:00
UpdateChannelBookmark ( c request . CTX , updateBookmark * model . ChannelBookmarkWithFileInfo , connectionId string ) ( * model . UpdateChannelBookmarkResponse , * model . AppError )
UpdateChannelBookmarkSortOrder ( bookmarkId , channelId string , newIndex int64 , connectionId string ) ( [ ] * model . ChannelBookmarkWithFileInfo , * model . AppError )
2022-07-14 12:01:29 +03:00
UpdateChannelMemberNotifyProps ( c request . CTX , data map [ string ] string , channelID string , userID string ) ( * model . ChannelMember , * model . AppError )
UpdateChannelMemberRoles ( c request . CTX , channelID string , userID string , newRoles string ) ( * model . ChannelMember , * model . AppError )
UpdateChannelMemberSchemeRoles ( c request . CTX , channelID string , userID string , isSchemeGuest bool , isSchemeUser bool , isSchemeAdmin bool ) ( * model . ChannelMember , * model . AppError )
UpdateChannelPrivacy ( c request . CTX , oldChannel * model . Channel , user * model . User ) ( * model . Channel , * model . AppError )
2020-02-13 13:26:58 +01:00
UpdateCommand ( oldCmd , updatedCmd * model . Command ) ( * model . Command , * model . AppError )
UpdateConfig ( f func ( * model . Config ) )
2023-05-04 08:14:26 -06:00
UpdateDefaultProfileImage ( c request . CTX , user * model . User ) * model . AppError
2022-07-14 12:01:29 +03:00
UpdateEphemeralPost ( c request . CTX , userID string , post * model . Post ) * model . Post
2021-06-17 00:08:26 +05:30
UpdateExpiredDNDStatuses ( ) ( [ ] * model . Status , error )
2020-02-13 13:26:58 +01:00
UpdateGroup ( group * model . Group ) ( * model . Group , * model . AppError )
UpdateGroupSyncable ( groupSyncable * model . GroupSyncable ) ( * model . GroupSyncable , * model . AppError )
2020-08-26 11:28:00 -04:00
UpdateHashedPassword ( user * model . User , newHashedPassword string ) * model . AppError
2021-02-05 11:22:27 +01:00
UpdateHashedPasswordByUserId ( userID , newHashedPassword string ) * model . AppError
2020-02-13 13:26:58 +01:00
UpdateIncomingWebhook ( oldHook , updatedHook * model . IncomingWebhook ) ( * model . IncomingWebhook , * model . AppError )
2022-07-28 10:04:21 +05:30
UpdateMfa ( c request . CTX , activate bool , userID , token string ) * model . AppError
2021-02-05 11:22:27 +01:00
UpdateMobileAppBadge ( userID string )
2021-07-12 20:05:36 +02:00
UpdateOAuthApp ( oldApp , updatedApp * model . OAuthApp ) ( * model . OAuthApp , * model . AppError )
2023-10-30 16:33:37 +01:00
UpdateOAuthUserAttrs ( c request . CTX , userData io . Reader , user * model . User , provider einterfaces . OAuthProvider , service string , tokenUser * model . User ) * model . AppError
2022-07-14 12:01:29 +03:00
UpdateOutgoingWebhook ( c request . CTX , oldHook , updatedHook * model . OutgoingWebhook ) ( * model . OutgoingWebhook , * model . AppError )
2023-11-08 14:39:09 +01:00
UpdatePassword ( rctx request . CTX , user * model . User , newPassword string ) * model . AppError
2022-07-28 10:04:21 +05:30
UpdatePasswordAsUser ( c request . CTX , userID , currentPassword , newPassword string ) * model . AppError
UpdatePasswordByUserIdSendEmail ( c request . CTX , userID , newPassword , method string ) * model . AppError
UpdatePasswordSendEmail ( c request . CTX , user * model . User , newPassword , method string ) * model . AppError
2023-10-30 16:33:37 +01:00
UpdatePost ( c request . CTX , receivedUpdatedPost * model . Post , safeUpdate bool ) ( * model . Post , * model . AppError )
2024-01-03 12:25:53 -05:00
UpdatePreferences ( c request . CTX , userID string , preferences model . Preferences ) * model . AppError
2021-04-01 13:44:56 -04:00
UpdateRemoteCluster ( rc * model . RemoteCluster ) ( * model . RemoteCluster , * model . AppError )
UpdateRemoteClusterTopics ( remoteClusterId string , topics string ) ( * model . RemoteCluster , * model . AppError )
2020-02-13 13:26:58 +01:00
UpdateRole ( role * model . Role ) ( * model . Role , * model . AppError )
UpdateScheme ( scheme * model . Scheme ) ( * model . Scheme , * model . AppError )
2021-04-01 13:44:56 -04:00
UpdateSharedChannel ( sc * model . SharedChannel ) ( * model . SharedChannel , error )
2021-05-20 12:07:40 -04:00
UpdateSharedChannelRemoteCursor ( id string , cursor model . GetPostsSinceForSyncCursor ) error
2022-07-14 12:01:29 +03:00
UpdateSidebarCategories ( c request . CTX , userID , teamID string , categories [ ] * model . SidebarCategoryWithChannels ) ( [ ] * model . SidebarCategoryWithChannels , * model . AppError )
UpdateSidebarCategoryOrder ( c request . CTX , userID , teamID string , categoryOrder [ ] string ) * model . AppError
2020-02-13 13:26:58 +01:00
UpdateTeam ( team * model . Team ) ( * model . Team , * model . AppError )
2023-10-11 13:08:55 +02:00
UpdateTeamMemberRoles ( c request . CTX , teamID string , userID string , newRoles string ) ( * model . TeamMember , * model . AppError )
UpdateTeamMemberSchemeRoles ( c request . CTX , teamID string , userID string , isSchemeGuest bool , isSchemeUser bool , isSchemeAdmin bool ) ( * model . TeamMember , * model . AppError )
2021-02-05 11:22:27 +01:00
UpdateTeamPrivacy ( teamID string , teamType string , allowOpenInvite bool ) * model . AppError
2020-02-13 13:26:58 +01:00
UpdateTeamScheme ( team * model . Team ) ( * model . Team , * model . AppError )
2021-03-02 16:49:00 +02:00
UpdateThreadFollowForUser ( userID , teamID , threadID string , state bool ) * model . AppError
2022-07-14 12:01:29 +03:00
UpdateThreadFollowForUserFromChannelAdd ( c request . CTX , userID , teamID , threadID string ) * model . AppError
UpdateThreadReadForUser ( c request . CTX , currentSessionId , userID , teamID , threadID string , timestamp int64 ) ( * model . ThreadResponse , * model . AppError )
UpdateThreadReadForUserByPost ( c request . CTX , currentSessionId , userID , teamID , threadID , postID string ) ( * model . ThreadResponse , * model . AppError )
2021-02-05 11:22:27 +01:00
UpdateThreadsReadForUser ( userID , teamID string ) * model . AppError
2022-07-28 10:04:21 +05:30
UpdateUser ( c request . CTX , user * model . User , sendNotifications bool ) ( * model . User , * model . AppError )
2023-10-30 16:33:37 +01:00
UpdateUserActive ( c request . CTX , userID string , active bool ) * model . AppError
2022-07-28 10:04:21 +05:30
UpdateUserAsUser ( c request . CTX , user * model . User , asAdmin bool ) ( * model . User , * model . AppError )
2023-11-10 21:55:33 -04:00
UpdateUserAuth ( c request . CTX , userID string , userAuth * model . UserAuth ) ( * model . UserAuth , * model . AppError )
2022-07-28 10:04:21 +05:30
UpdateUserRoles ( c request . CTX , userID string , newRoles string , sendWebSocketEvent bool ) ( * model . User , * model . AppError )
UpdateUserRolesWithUser ( c request . CTX , user * model . User , newRoles string , sendWebSocketEvent bool ) ( * model . User , * model . AppError )
2022-12-13 11:47:05 -06:00
UploadData ( c request . CTX , us * model . UploadSession , rd io . Reader ) ( * model . FileInfo , * model . AppError )
2023-08-16 16:17:52 +02:00
UploadFileForUserAndTeam ( c request . CTX , data [ ] byte , channelID string , filename string , rawUserId string , rawTeamId string ) ( * model . FileInfo , * model . AppError )
2023-10-30 16:33:37 +01:00
UpsertDraft ( c request . CTX , draft * model . Draft , connectionID string ) ( * model . Draft , * model . AppError )
2020-02-13 13:26:58 +01:00
UpsertGroupMember ( groupID string , userID string ) ( * model . GroupMember , * model . AppError )
2022-02-17 12:34:39 -05:00
UpsertGroupMembers ( groupID string , userIDs [ ] string ) ( [ ] * model . GroupMember , * model . AppError )
2020-02-13 13:26:58 +01:00
UpsertGroupSyncable ( groupSyncable * model . GroupSyncable ) ( * model . GroupSyncable , * model . AppError )
2023-02-09 02:08:33 +05:00
UserAlreadyNotifiedOnRequiredFeature ( user string , feature model . MattermostFeature ) bool
2023-10-11 13:08:55 +02:00
UserCanSeeOtherUser ( c request . CTX , userID string , otherUserId string ) ( bool , * model . AppError )
2022-10-24 16:20:56 -05:00
UserIsFirstAdmin ( user * model . User ) bool
2023-08-30 11:21:43 -04:00
ValidateDesktopToken ( token string , expiryTime int64 ) ( * model . User , * model . AppError )
2022-07-28 10:04:21 +05:30
VerifyEmailFromToken ( c request . CTX , userSuppliedTokenString string ) * model . AppError
2021-02-05 11:22:27 +01:00
VerifyUserEmail ( userID , email string ) * model . AppError
2022-07-14 12:01:29 +03:00
ViewChannel ( c request . CTX , view * model . ChannelView , userID string , currentSessionId string , collapsedThreadsSupported bool ) ( map [ string ] int64 , * model . AppError )
2023-07-19 13:01:39 -07:00
WriteExportFile ( fr io . Reader , path string ) ( int64 , * model . AppError )
WriteExportFileContext ( ctx context . Context , fr io . Reader , path string ) ( int64 , * model . AppError )
2020-02-13 13:26:58 +01:00
WriteFile ( fr io . Reader , path string ) ( int64 , * model . AppError )
2022-12-13 20:36:40 +01:00
WriteFileContext ( ctx context . Context , fr io . Reader , path string ) ( int64 , * model . AppError )
2020-02-13 13:26:58 +01:00
}