Documentation ¶
Overview ¶
Installing a managed plugin consists of copying the uploaded plugin (*.tar.gz) to the filestore, unpacking to the configured local directory (PluginSettings.Directory), and copying any webapp bundle therein to the configured local client directory (PluginSettings.ClientDirectory). The unpacking and copy occurs each time the server starts, ensuring it remains synchronized with the set of installed plugins.
When a plugin is enabled, all connected websocket clients are notified so as to fetch any webapp bundle and load the client-side portion of the plugin. This works well in a single-server system, but requires careful coordination in a high-availability cluster with multiple servers. In particular, websocket clients must not be notified of the newly enabled plugin until all servers in the cluster have finished unpacking the plugin, otherwise the webapp bundle might not yet be available. Ideally, each server would just notify its own set of connected peers after it finishes this process, but nothing prevents those clients from re-connecting to a different server behind the load balancer that hasn't finished unpacking.
To achieve this coordination, each server instead checks the status of its peers after unpacking. If it finds peers with differing versions of the plugin, it skips the notification. If it finds all peers with the same version of the plugin, it notifies all websocket clients connected to all peers. There's a small chance that this never occurs if the last server to finish unpacking dies before it can announce. There is also a chance that multiple servers decide to notify, but the webapp handles this idempotently.
Complicating this flow further are the various means of notifying. In addition to websocket events, there are cluster messages between peers. There is a cluster message when the config changes and a plugin is enabled or disabled. There is a cluster message when installing or uninstalling a plugin. There is a cluster message when peer's plugin change its status. And finally the act of notifying websocket clients is propagated itself via a cluster message.
The key methods involved in handling these notifications are notifyPluginEnabled and notifyPluginStatusesChanged. Note that none of this complexity applies to single-server systems or to plugins without a webapp bundle.
Finally, in addition to managed plugins, note that there are unmanaged and prepackaged plugins. Unmanaged plugins are plugins installed manually to the configured local directory (PluginSettings.Directory). Prepackaged plugins are included with the server. They otherwise follow the above flow, except do not get uploaded to the filestore. Prepackaged plugins override all other plugins with the same plugin id, but only when the prepackaged plugin is newer. Managed plugins unconditionally override unmanaged plugins with the same plugin id.
Index ¶
- Constants
- Variables
- func DoesNotifyPropsAllowPushNotification(user *model.User, channelNotifyProps model.StringMap, post *model.Post, ...) bool
- func DoesStatusAllowPushNotification(userNotifyProps model.StringMap, status *model.Status, channelID string) bool
- func GeneratePublicLinkHash(fileID, salt string) string
- func GetProtocol(r *http.Request) string
- func IsCWSLogin(a *App, token string) bool
- func JoinCluster(s *Server) error
- func NewMockRemoteClusterService(service remotecluster.RemoteClusterServiceIFace, ...) *mockRemoteClusterService
- func NewMockSharedChannelService(service SharedChannelServiceIFace, options ...MockOptionSharedChannelService) *mockSharedChannelService
- func RegisterAccountMigrationInterface(f func(*Server) einterfaces.AccountMigrationInterface)
- func RegisterCloudInterface(f func(*Server) einterfaces.CloudInterface)
- func RegisterClusterInterface(f func(*Server) einterfaces.ClusterInterface)
- func RegisterCommandProvider(newProvider CommandProvider)
- func RegisterComplianceInterface(f func(*Server) einterfaces.ComplianceInterface)
- func RegisterDataRetentionInterface(f func(*Server) einterfaces.DataRetentionInterface)
- func RegisterElasticsearchInterface(f func(*Server) searchengine.SearchEngineInterface)
- func RegisterJobsActiveUsersInterface(f func(*Server) tjobs.ActiveUsersJobInterface)
- func RegisterJobsBleveIndexerInterface(f func(*Server) tjobs.IndexerJobInterface)
- func RegisterJobsCloudInterface(f func(*Server) ejobs.CloudJobInterface)
- func RegisterJobsDataRetentionJobInterface(f func(*Server) ejobs.DataRetentionJobInterface)
- func RegisterJobsElasticsearchAggregatorInterface(f func(*Server) ejobs.ElasticsearchAggregatorInterface)
- func RegisterJobsElasticsearchIndexerInterface(f func(*Server) tjobs.IndexerJobInterface)
- func RegisterJobsExpiryNotifyJobInterface(f func(*Server) tjobs.ExpiryNotifyJobInterface)
- func RegisterJobsExportDeleteInterface(f func(*Server) tjobs.ExportDeleteInterface)
- func RegisterJobsExportProcessInterface(f func(*Server) tjobs.ExportProcessInterface)
- func RegisterJobsImportDeleteInterface(f func(*Server) tjobs.ImportDeleteInterface)
- func RegisterJobsImportProcessInterface(f func(*Server) tjobs.ImportProcessInterface)
- func RegisterJobsLdapSyncInterface(f func(*Server) ejobs.LdapSyncInterface)
- func RegisterJobsMessageExportJobInterface(f func(*Server) ejobs.MessageExportJobInterface)
- func RegisterJobsMigrationsJobInterface(f func(*Server) tjobs.MigrationsJobInterface)
- func RegisterJobsPluginsJobInterface(f func(*Server) tjobs.PluginsJobInterface)
- func RegisterJobsResendInvitationEmailInterface(f func(*Server) ejobs.ResendInvitationEmailJobInterface)
- func RegisterLdapInterface(f func(*Server) einterfaces.LdapInterface)
- func RegisterLicenseInterface(f func(*Server) einterfaces.LicenseInterface)
- func RegisterMessageExportInterface(f func(*Server) einterfaces.MessageExportInterface)
- func RegisterMetricsInterface(f func(*Server) einterfaces.MetricsInterface)
- func RegisterNewSamlInterface(f func(*Server) einterfaces.SamlInterface)
- func RegisterNotificationInterface(f func(*Server) einterfaces.NotificationInterface)
- func RegisterProductNoticesJobInterface(f func(*Server) tjobs.ProductNoticesJobInterface)
- func RemoveRoles(rolesToRemove []string, roles string) string
- func RunEssentialJobs(s *Server) error
- func ShouldSendPushNotification(user *model.User, channelNotifyProps model.StringMap, wasMentioned bool, ...) bool
- func SplitWebhookPost(post *model.Post, maxPostSize int) ([]*model.Post, *model.AppError)
- func StartMetrics(s *Server) error
- func StartSearchEngine(s *Server) error
- func UploadFileSetClientId(clientId string) func(t *UploadFileTask)
- func UploadFileSetContentLength(contentLength int64) func(t *UploadFileTask)
- func UploadFileSetRaw() func(t *UploadFileTask)
- func UploadFileSetTeamId(teamID string) func(t *UploadFileTask)
- func UploadFileSetTimestamp(timestamp time.Time) func(t *UploadFileTask)
- func UploadFileSetUserId(userID string) func(t *UploadFileTask)
- func WithMaster(ctx context.Context) context.Context
- type App
- func (a *App) AccountMigration() einterfaces.AccountMigrationInterface
- func (a *App) ActivateMfa(userID, token string) *model.AppError
- func (a *App) AddChannelMember(c *request.Context, userID string, channel *model.Channel, ...) (*model.ChannelMember, *model.AppError)
- func (a *App) AddChannelsToRetentionPolicy(policyID string, channelIDs []string) *model.AppError
- func (a *App) AddConfigListener(listener func(*model.Config, *model.Config)) string
- func (a *App) AddCursorIdsForPostList(originalList *model.PostList, afterPost, beforePost string, since int64, ...)
- func (a *App) AddDirectChannels(teamID string, user *model.User) *model.AppError
- func (a *App) AddLdapPrivateCertificate(fileData *multipart.FileHeader) *model.AppError
- func (a *App) AddLdapPublicCertificate(fileData *multipart.FileHeader) *model.AppError
- func (a *App) AddPublicKey(name string, key io.Reader) *model.AppError
- func (a *App) AddRemoteCluster(rc *model.RemoteCluster) (*model.RemoteCluster, *model.AppError)
- func (a *App) AddSamlIdpCertificate(fileData *multipart.FileHeader) *model.AppError
- func (a *App) AddSamlPrivateCertificate(fileData *multipart.FileHeader) *model.AppError
- func (a *App) AddSamlPublicCertificate(fileData *multipart.FileHeader) *model.AppError
- func (a *App) AddSessionToCache(session *model.Session)
- func (a *App) AddStatusCache(status *model.Status)
- func (a *App) AddStatusCacheSkipClusterSend(status *model.Status)
- func (a *App) AddTeamMember(c *request.Context, teamID, userID string) (*model.TeamMember, *model.AppError)
- func (a *App) AddTeamMemberByInviteId(c *request.Context, inviteId, userID string) (*model.TeamMember, *model.AppError)
- func (a *App) AddTeamMemberByToken(c *request.Context, userID, tokenID string) (*model.TeamMember, *model.AppError)
- func (a *App) AddTeamMembers(c *request.Context, teamID string, userIDs []string, userRequestorId string, ...) ([]*model.TeamMemberWithError, *model.AppError)
- func (a *App) AddTeamsToRetentionPolicy(policyID string, teamIDs []string) *model.AppError
- func (a *App) AddUserToChannel(user *model.User, channel *model.Channel, skipTeamMemberIntegrityCheck bool) (*model.ChannelMember, *model.AppError)
- func (a *App) AddUserToTeam(c *request.Context, teamID string, userID string, userRequestorId string) (*model.Team, *model.TeamMember, *model.AppError)
- func (a *App) AddUserToTeamByInviteId(c *request.Context, inviteId string, userID string) (*model.Team, *model.TeamMember, *model.AppError)
- func (a *App) AddUserToTeamByTeamId(c *request.Context, teamID string, user *model.User) *model.AppError
- func (a *App) AddUserToTeamByToken(c *request.Context, userID string, tokenID string) (*model.Team, *model.TeamMember, *model.AppError)
- func (a *App) AdjustImage(file io.Reader) (*bytes.Buffer, *model.AppError)
- func (a *App) AllowOAuthAppAccessToUser(userID string, authRequest *model.AuthorizeRequest) (string, *model.AppError)
- func (a *App) AppendFile(fr io.Reader, path string) (int64, *model.AppError)
- func (a *App) AsymmetricSigningKey() *ecdsa.PrivateKey
- func (a *App) AttachDeviceId(sessionID string, deviceID string, expiresAt int64) *model.AppError
- func (a *App) AttachSessionCookies(c *request.Context, w http.ResponseWriter, r *http.Request)
- func (a *App) AuthenticateUserForLogin(c *request.Context, id, loginId, password, mfaToken, cwsToken string, ...) (user *model.User, err *model.AppError)
- func (a *App) AuthorizeOAuthUser(w http.ResponseWriter, r *http.Request, ...) (io.ReadCloser, string, map[string]string, *model.User, *model.AppError)
- func (a *App) AutocompleteChannels(teamID string, term string) (*model.ChannelList, *model.AppError)
- func (a *App) AutocompleteChannelsForSearch(teamID string, userID string, term string) (*model.ChannelList, *model.AppError)
- func (a *App) AutocompleteUsersInChannel(teamID string, channelID string, term string, options *model.UserSearchOptions) (*model.UserAutocompleteInChannel, *model.AppError)
- func (a *App) AutocompleteUsersInTeam(teamID string, term string, options *model.UserSearchOptions) (*model.UserAutocompleteInTeam, *model.AppError)
- func (a *App) BroadcastStatus(status *model.Status)
- func (a *App) BuildPostReactions(postID string) (*[]ReactionImportData, *model.AppError)
- func (a *App) BuildPushNotificationMessage(contentsConfig string, post *model.Post, user *model.User, ...) (*model.PushNotification, *model.AppError)
- func (a *App) BuildSamlMetadataObject(idpMetadata []byte) (*model.SamlMetadataResponse, *model.AppError)
- func (a *App) BulkExport(writer io.Writer, outPath string, opts BulkExportOpts) *model.AppError
- func (a *App) BulkImport(c *request.Context, jsonlReader io.Reader, attachmentsReader *zip.Reader, ...) (*model.AppError, int)
- func (a *App) BulkImportWithPath(c *request.Context, jsonlReader io.Reader, attachmentsReader *zip.Reader, ...) (*model.AppError, int)
- func (a *App) CancelJob(jobId string) *model.AppError
- func (a *App) ChannelMembersMinusGroupMembers(channelID string, groupIDs []string, page, perPage int) ([]*model.UserWithGroups, int64, *model.AppError)
- func (a *App) ChannelMembersToAdd(since int64, channelID *string, includeRemovedMembers bool) ([]*model.UserChannelIDPair, *model.AppError)
- func (a *App) ChannelMembersToRemove(teamID *string) ([]*model.ChannelMember, *model.AppError)
- func (a *App) CheckAndSendUserLimitWarningEmails(c *request.Context) *model.AppError
- func (a *App) CheckCanInviteToSharedChannel(channelId string) error
- func (a *App) CheckCloudAccountAtLimit() (bool, *model.AppError)
- func (a *App) CheckForClientSideCert(r *http.Request) (string, string, string)
- func (a *App) CheckIntegrity() <-chan model.IntegrityCheckResult
- func (a *App) CheckMandatoryS3Fields(settings *model.FileSettings) *model.AppError
- func (a *App) CheckPasswordAndAllCriteria(user *model.User, password string, mfaToken string) *model.AppError
- func (a *App) CheckProviderAttributes(user *model.User, patch *model.UserPatch) string
- func (a *App) CheckRolesExist(roleNames []string) *model.AppError
- func (a *App) CheckUserAllAuthenticationCriteria(user *model.User, mfaToken string) *model.AppError
- func (a *App) CheckUserMfa(user *model.User, token string) *model.AppError
- func (a *App) CheckUserPostflightAuthenticationCriteria(user *model.User) *model.AppError
- func (a *App) CheckUserPreflightAuthenticationCriteria(user *model.User, mfaToken string) *model.AppError
- func (a *App) CheckValidDomains(team *model.Team) *model.AppError
- func (a *App) CheckWebConn(userID, connectionID string) *CheckConnResult
- func (a *App) ClearChannelMembersCache(channelID string)
- func (a *App) ClearSessionCacheForAllUsers()
- func (a *App) ClearSessionCacheForAllUsersSkipClusterSend()
- func (a *App) ClearSessionCacheForUser(userID string)
- func (a *App) ClearSessionCacheForUserSkipClusterSend(userID string)
- func (a *App) ClearTeamMembersCache(teamID string)
- func (a *App) ClientConfig() map[string]string
- func (a *App) ClientConfigHash() string
- func (a *App) ClientConfigWithComputed() map[string]string
- func (a *App) Cloud() einterfaces.CloudInterface
- func (a *App) Cluster() einterfaces.ClusterInterface
- func (a *App) CompareAndDeletePluginKey(pluginID string, key string, oldValue []byte) (bool, *model.AppError)
- func (a *App) CompareAndSetPluginKey(pluginID string, key string, oldValue, newValue []byte) (bool, *model.AppError)
- func (a *App) CompleteOAuth(c *request.Context, service string, body io.ReadCloser, teamID string, ...) (*model.User, *model.AppError)
- func (a *App) CompleteSwitchWithOAuth(service string, userData io.Reader, email string, tokenUser *model.User) (*model.User, *model.AppError)
- func (a *App) Compliance() einterfaces.ComplianceInterface
- func (a *App) Config() *model.Config
- func (a *App) ConvertBotToUser(bot *model.Bot, userPatch *model.UserPatch, sysadmin bool) (*model.User, *model.AppError)
- func (a *App) ConvertUserToBot(user *model.User) (*model.Bot, *model.AppError)
- func (a *App) CopyFileInfos(userID string, fileIDs []string) ([]string, *model.AppError)
- func (a *App) CreateBot(c *request.Context, bot *model.Bot) (*model.Bot, *model.AppError)
- func (a *App) CreateChannel(c *request.Context, channel *model.Channel, addMember bool) (*model.Channel, *model.AppError)
- func (a *App) CreateChannelScheme(channel *model.Channel) (*model.Scheme, *model.AppError)
- func (a *App) CreateChannelWithUser(c *request.Context, channel *model.Channel, userID string) (*model.Channel, *model.AppError)
- func (a *App) CreateCommand(cmd *model.Command) (*model.Command, *model.AppError)
- func (a *App) CreateCommandPost(c *request.Context, post *model.Post, teamID string, ...) (*model.Post, *model.AppError)
- func (a *App) CreateCommandWebhook(commandID string, args *model.CommandArgs) (*model.CommandWebhook, *model.AppError)
- func (a *App) CreateDefaultChannels(c *request.Context, teamID string) ([]*model.Channel, *model.AppError)
- func (a *App) CreateDefaultMemberships(c *request.Context, since int64, includeRemovedMembers bool) error
- func (a *App) CreateEmoji(sessionUserId string, emoji *model.Emoji, multiPartImageData *multipart.Form) (*model.Emoji, *model.AppError)
- func (a *App) CreateGroup(group *model.Group) (*model.Group, *model.AppError)
- func (a *App) CreateGroupChannel(userIDs []string, creatorId string) (*model.Channel, *model.AppError)
- func (a *App) CreateGuest(c *request.Context, user *model.User) (*model.User, *model.AppError)
- func (a *App) CreateIncomingWebhookForChannel(creatorId string, channel *model.Channel, hook *model.IncomingWebhook) (*model.IncomingWebhook, *model.AppError)
- func (a *App) CreateJob(job *model.Job) (*model.Job, *model.AppError)
- func (a *App) CreateOAuthApp(app *model.OAuthApp) (*model.OAuthApp, *model.AppError)
- func (a *App) CreateOAuthStateToken(extra string) (*model.Token, *model.AppError)
- func (a *App) CreateOAuthUser(c *request.Context, service string, userData io.Reader, teamID string, ...) (*model.User, *model.AppError)
- func (a *App) CreateOutgoingWebhook(hook *model.OutgoingWebhook) (*model.OutgoingWebhook, *model.AppError)
- func (a *App) CreatePasswordRecoveryToken(userID, email string) (*model.Token, *model.AppError)
- func (a *App) CreatePost(c *request.Context, post *model.Post, channel *model.Channel, ...) (savedPost *model.Post, err *model.AppError)
- func (a *App) CreatePostAsUser(c *request.Context, post *model.Post, currentSessionId string, setOnline bool) (*model.Post, *model.AppError)
- func (a *App) CreatePostMissingChannel(c *request.Context, post *model.Post, triggerWebhooks bool) (*model.Post, *model.AppError)
- func (a *App) CreateRetentionPolicy(policy *model.RetentionPolicyWithTeamAndChannelIDs) (*model.RetentionPolicyWithTeamAndChannelCounts, *model.AppError)
- func (a *App) CreateRole(role *model.Role) (*model.Role, *model.AppError)
- func (a *App) CreateScheme(scheme *model.Scheme) (*model.Scheme, *model.AppError)
- func (a *App) CreateSession(session *model.Session) (*model.Session, *model.AppError)
- func (a *App) CreateSidebarCategory(userID, teamID string, newCategory *model.SidebarCategoryWithChannels) (*model.SidebarCategoryWithChannels, *model.AppError)
- func (a *App) CreateTeam(c *request.Context, team *model.Team) (*model.Team, *model.AppError)
- func (a *App) CreateTeamWithUser(c *request.Context, team *model.Team, userID string) (*model.Team, *model.AppError)
- func (a *App) CreateTermsOfService(text, userID string) (*model.TermsOfService, *model.AppError)
- func (a *App) CreateUploadSession(us *model.UploadSession) (*model.UploadSession, *model.AppError)
- func (a *App) CreateUser(c *request.Context, user *model.User) (*model.User, *model.AppError)
- func (a *App) CreateUserAccessToken(token *model.UserAccessToken) (*model.UserAccessToken, *model.AppError)
- func (a *App) CreateUserAsAdmin(c *request.Context, user *model.User, redirect string) (*model.User, *model.AppError)
- func (a *App) CreateUserFromSignup(c *request.Context, user *model.User, redirect string) (*model.User, *model.AppError)
- func (a *App) CreateUserWithInviteId(c *request.Context, user *model.User, inviteId, redirect string) (*model.User, *model.AppError)
- func (a *App) CreateUserWithToken(c *request.Context, user *model.User, token *model.Token) (*model.User, *model.AppError)
- func (a *App) CreateWebhookPost(c *request.Context, userID string, channel *model.Channel, ...) (*model.Post, *model.AppError)
- func (a *App) CreateZipFileAndAddFiles(fileBackend filestore.FileBackend, fileDatas []model.FileData, ...) error
- func (a *App) DBHealthCheckDelete() error
- func (a *App) DBHealthCheckWrite() error
- func (a *App) DataRetention() einterfaces.DataRetentionInterface
- func (a *App) DeactivateGuests(c *request.Context) *model.AppError
- func (a *App) DeactivateMfa(userID string) *model.AppError
- func (a *App) DeauthorizeOAuthAppForUser(userID, appID string) *model.AppError
- func (a *App) DefaultChannelNames() []string
- func (a *App) DeleteAllExpiredPluginKeys() *model.AppError
- func (a *App) DeleteAllKeysForPlugin(pluginID string) *model.AppError
- func (a *App) DeleteBotIconImage(botUserId string) *model.AppError
- func (a *App) DeleteBrandImage() *model.AppError
- func (a *App) DeleteChannel(c *request.Context, channel *model.Channel, userID string) *model.AppError
- func (a *App) DeleteChannelScheme(channel *model.Channel) (*model.Channel, *model.AppError)
- func (a *App) DeleteCommand(commandID string) *model.AppError
- func (a *App) DeleteEmoji(emoji *model.Emoji) *model.AppError
- func (a *App) DeleteEphemeralPost(userID, postID string)
- func (a *App) DeleteExport(name string) *model.AppError
- func (a *App) DeleteFlaggedPosts(postID string)
- func (a *App) DeleteGroup(groupID string) (*model.Group, *model.AppError)
- func (a *App) DeleteGroupConstrainedMemberships(c *request.Context) error
- func (a *App) DeleteGroupMember(groupID string, userID string) (*model.GroupMember, *model.AppError)
- func (a *App) DeleteGroupSyncable(groupID string, syncableID string, syncableType model.GroupSyncableType) (*model.GroupSyncable, *model.AppError)
- func (a *App) DeleteIncomingWebhook(hookID string) *model.AppError
- func (a *App) DeleteOAuthApp(appID string) *model.AppError
- func (a *App) DeleteOutgoingWebhook(hookID string) *model.AppError
- func (a *App) DeletePluginKey(pluginID string, key string) *model.AppError
- func (a *App) DeletePost(postID, deleteByID string) (*model.Post, *model.AppError)
- func (a *App) DeletePostFiles(post *model.Post)
- func (a *App) DeletePreferences(userID string, preferences model.Preferences) *model.AppError
- func (a *App) DeletePublicKey(name string) *model.AppError
- func (a *App) DeleteReactionForPost(c *request.Context, reaction *model.Reaction) *model.AppError
- func (a *App) DeleteRemoteCluster(remoteClusterId string) (bool, *model.AppError)
- func (a *App) DeleteRetentionPolicy(policyID string) *model.AppError
- func (a *App) DeleteScheme(schemeId string) (*model.Scheme, *model.AppError)
- func (a *App) DeleteSharedChannel(channelID string) (bool, error)
- func (a *App) DeleteSharedChannelRemote(id string) (bool, error)
- func (a *App) DeleteSidebarCategory(userID, teamID, categoryId string) *model.AppError
- func (a *App) DeleteToken(token *model.Token) *model.AppError
- func (a *App) DemoteUserToGuest(user *model.User) *model.AppError
- func (a *App) DisableAutoResponder(userID string, asAdmin bool) *model.AppError
- func (a *App) DisablePlugin(id string) *model.AppError
- func (a *App) DisableUserAccessToken(token *model.UserAccessToken) *model.AppError
- func (a *App) DoActionRequest(c *request.Context, rawURL string, body []byte) (*http.Response, *model.AppError)
- func (a *App) DoAdvancedPermissionsMigration()
- func (a *App) DoAppMigrations()
- func (a *App) DoCommandRequest(cmd *model.Command, p url.Values) (*model.Command, *model.CommandResponse, *model.AppError)
- func (a *App) DoEmojisPermissionsMigration()
- func (a *App) DoGuestRolesCreationMigration()
- func (a *App) DoLocalRequest(c *request.Context, rawURL string, body []byte) (*http.Response, *model.AppError)
- func (a *App) DoLogin(c *request.Context, w http.ResponseWriter, r *http.Request, user *model.User, ...) *model.AppError
- func (a *App) DoPermissionsMigrations() error
- func (a *App) DoPostAction(c *request.Context, postID, actionId, userID, selectedOption string) (string, *model.AppError)
- func (a *App) DoPostActionWithCookie(c *request.Context, postID, actionId, userID, selectedOption string, ...) (string, *model.AppError)
- func (a *App) DoSystemConsoleRolesCreationMigration()
- func (a *App) DoUploadFile(c *request.Context, now time.Time, rawTeamId string, rawChannelId string, ...) (*model.FileInfo, *model.AppError)
- func (a *App) DoUploadFileExpectModification(c *request.Context, now time.Time, rawTeamId string, rawChannelId string, ...) (*model.FileInfo, []byte, *model.AppError)
- func (a *App) DoubleCheckPassword(user *model.User, password string) *model.AppError
- func (a *App) DownloadFromURL(downloadURL string) ([]byte, error)
- func (a *App) EnablePlugin(id string) *model.AppError
- func (a *App) EnableUserAccessToken(token *model.UserAccessToken) *model.AppError
- func (a *App) EnvironmentConfig(filter func(reflect.StructField) bool) map[string]interface{}
- func (a *App) ExecuteCommand(c *request.Context, args *model.CommandArgs) (*model.CommandResponse, *model.AppError)
- func (a *App) ExportPermissions(w io.Writer) error
- func (a *App) ExtendSessionExpiryIfNeeded(session *model.Session) bool
- func (a *App) ExtractContentFromFileInfo(fileInfo *model.FileInfo) error
- func (a *App) FetchSamlMetadataFromIdp(url string) ([]byte, *model.AppError)
- func (a *App) FileBackend() (filestore.FileBackend, *model.AppError)
- func (a *App) FileExists(path string) (bool, *model.AppError)
- func (a *App) FileModTime(path string) (time.Time, *model.AppError)
- func (a *App) FileReader(path string) (filestore.ReadCloseSeeker, *model.AppError)
- func (a *App) FileSize(path string) (int64, *model.AppError)
- func (a *App) FillInChannelProps(channel *model.Channel) *model.AppError
- func (a *App) FillInChannelsProps(channelList *model.ChannelList) *model.AppError
- func (a *App) FillInPostProps(post *model.Post, channel *model.Channel) *model.AppError
- func (a *App) FilterNonGroupChannelMembers(userIDs []string, channel *model.Channel) ([]string, error)
- func (a *App) FilterNonGroupTeamMembers(userIDs []string, team *model.Team) ([]string, error)
- func (a *App) FilterUsersByVisible(viewer *model.User, otherUsers []*model.User) ([]*model.User, *model.AppError)
- func (a *App) FindTeamByName(name string) bool
- func (a *App) GenerateMfaSecret(userID string) (*model.MfaSecret, *model.AppError)
- func (a *App) GeneratePublicLink(siteURL string, info *model.FileInfo) string
- func (a *App) GenerateSupportPacket() []model.FileData
- func (a *App) GetActivePluginManifests() ([]*model.Manifest, *model.AppError)
- func (a *App) GetAllChannels(page, perPage int, opts model.ChannelSearchOpts) (*model.ChannelListWithTeamData, *model.AppError)
- func (a *App) GetAllChannelsCount(opts model.ChannelSearchOpts) (int64, *model.AppError)
- func (a *App) GetAllLdapGroupsPage(page int, perPage int, opts model.LdapGroupSearchOpts) ([]*model.Group, int, *model.AppError)
- func (a *App) GetAllPrivateTeams() ([]*model.Team, *model.AppError)
- func (a *App) GetAllPublicTeams() ([]*model.Team, *model.AppError)
- func (a *App) GetAllRemoteClusters(filter model.RemoteClusterQueryFilter) ([]*model.RemoteCluster, *model.AppError)
- func (a *App) GetAllStatuses() map[string]*model.Status
- func (a *App) GetAllTeams() ([]*model.Team, *model.AppError)
- func (a *App) GetAllTeamsPage(offset int, limit int, opts *model.TeamSearch) ([]*model.Team, *model.AppError)
- func (a *App) GetAllTeamsPageWithCount(offset int, limit int, opts *model.TeamSearch) (*model.TeamsWithCount, *model.AppError)
- func (a *App) GetAnalytics(name string, teamID string) (model.AnalyticsRows, *model.AppError)
- func (a *App) GetAudits(userID string, limit int) (model.Audits, *model.AppError)
- func (a *App) GetAuditsPage(userID string, page int, perPage int) (model.Audits, *model.AppError)
- func (a *App) GetAuthorizationCode(w http.ResponseWriter, r *http.Request, service string, ...) (string, *model.AppError)
- func (a *App) GetAuthorizedAppsForUser(userID string, page, perPage int) ([]*model.OAuthApp, *model.AppError)
- func (a *App) GetBot(botUserId string, includeDeleted bool) (*model.Bot, *model.AppError)
- func (a *App) GetBotIconImage(botUserId string) ([]byte, *model.AppError)
- func (a *App) GetBots(options *model.BotGetOptions) (model.BotList, *model.AppError)
- func (a *App) GetBrandImage() ([]byte, *model.AppError)
- func (a *App) GetBulkReactionsForPosts(postIDs []string) (map[string][]*model.Reaction, *model.AppError)
- func (a *App) GetChannel(channelID string) (*model.Channel, *model.AppError)
- func (a *App) GetChannelByName(channelName, teamID string, includeDeleted bool) (*model.Channel, *model.AppError)
- func (a *App) GetChannelByNameForTeamName(channelName, teamName string, includeDeleted bool) (*model.Channel, *model.AppError)
- func (a *App) GetChannelCounts(teamID string, userID string) (*model.ChannelCounts, *model.AppError)
- func (a *App) GetChannelGroupUsers(channelID string) ([]*model.User, *model.AppError)
- func (a *App) GetChannelGuestCount(channelID string) (int64, *model.AppError)
- func (a *App) GetChannelMember(ctx context.Context, channelID string, userID string) (*model.ChannelMember, *model.AppError)
- func (a *App) GetChannelMemberCount(channelID string) (int64, *model.AppError)
- func (a *App) GetChannelMembersByIds(channelID string, userIDs []string) (*model.ChannelMembers, *model.AppError)
- func (a *App) GetChannelMembersForUser(teamID string, userID string) (*model.ChannelMembers, *model.AppError)
- func (a *App) GetChannelMembersForUserWithPagination(teamID, userID string, page, perPage int) ([]*model.ChannelMember, *model.AppError)
- func (a *App) GetChannelMembersPage(channelID string, page, perPage int) (*model.ChannelMembers, *model.AppError)
- func (a *App) GetChannelMembersTimezones(channelID string) ([]string, *model.AppError)
- func (a *App) GetChannelModerationsForChannel(channel *model.Channel) ([]*model.ChannelModeration, *model.AppError)
- func (a *App) GetChannelPinnedPostCount(channelID string) (int64, *model.AppError)
- func (a *App) GetChannelPoliciesForUser(userID string, offset, limit int) (*model.RetentionPolicyForChannelList, *model.AppError)
- func (a *App) GetChannelUnread(channelID, userID string) (*model.ChannelUnread, *model.AppError)
- func (a *App) GetChannelsByNames(channelNames []string, teamID string) ([]*model.Channel, *model.AppError)
- func (a *App) GetChannelsForRetentionPolicy(policyID string, offset, limit int) (*model.ChannelsWithCount, *model.AppError)
- func (a *App) GetChannelsForScheme(scheme *model.Scheme, offset int, limit int) (model.ChannelList, *model.AppError)
- func (a *App) GetChannelsForSchemePage(scheme *model.Scheme, page int, perPage int) (model.ChannelList, *model.AppError)
- func (a *App) GetChannelsForUser(teamID string, userID string, includeDeleted bool, lastDeleteAt int) (*model.ChannelList, *model.AppError)
- func (a *App) GetChannelsUserNotIn(teamID string, userID string, offset int, limit int) (*model.ChannelList, *model.AppError)
- func (a *App) GetCloudSession(token string) (*model.Session, *model.AppError)
- func (a *App) GetClusterId() string
- func (a *App) GetClusterPluginStatuses() (model.PluginStatuses, *model.AppError)
- func (a *App) GetClusterStatus() []*model.ClusterInfo
- func (a *App) GetCommand(commandID string) (*model.Command, *model.AppError)
- func (a *App) GetCommonTeamIDsForTwoUsers(userID, otherUserID string) ([]string, *model.AppError)
- func (a *App) GetComplianceFile(job *model.Compliance) ([]byte, *model.AppError)
- func (a *App) GetComplianceReport(reportId string) (*model.Compliance, *model.AppError)
- func (a *App) GetComplianceReports(page, perPage int) (model.Compliances, *model.AppError)
- func (a *App) GetConfigFile(name string) ([]byte, error)
- func (a *App) GetCookieDomain() string
- func (a *App) GetDefaultProfileImage(user *model.User) ([]byte, *model.AppError)
- func (a *App) GetDeletedChannels(teamID string, offset int, limit int, userID string) (*model.ChannelList, *model.AppError)
- func (a *App) GetEmoji(emojiId string) (*model.Emoji, *model.AppError)
- func (a *App) GetEmojiByName(emojiName string) (*model.Emoji, *model.AppError)
- func (a *App) GetEmojiImage(emojiId string) ([]byte, string, *model.AppError)
- func (a *App) GetEmojiList(page, perPage int, sort string) ([]*model.Emoji, *model.AppError)
- func (a *App) GetEmojiStaticUrl(emojiName string) (string, *model.AppError)
- func (a *App) GetEnvironmentConfig(filter func(reflect.StructField) bool) map[string]interface{}
- func (a *App) GetErrorListForEmailsOverLimit(emailList []string, cloudUserLimit int64) ([]string, []*model.EmailInviteWithError, *model.AppError)
- func (a *App) GetFile(fileID string) ([]byte, *model.AppError)
- func (a *App) GetFileInfo(fileID string) (*model.FileInfo, *model.AppError)
- func (a *App) GetFileInfos(page, perPage int, opt *model.GetFileInfosOptions) ([]*model.FileInfo, *model.AppError)
- func (a *App) GetFileInfosForPost(postID string, fromMaster bool) ([]*model.FileInfo, *model.AppError)
- func (a *App) GetFileInfosForPostWithMigration(postID string) ([]*model.FileInfo, *model.AppError)
- func (a *App) GetFilteredUsersStats(options *model.UserCountOptions) (*model.UsersStats, *model.AppError)
- func (a *App) GetFlaggedPosts(userID string, offset int, limit int) (*model.PostList, *model.AppError)
- func (a *App) GetFlaggedPostsForChannel(userID, channelID string, offset int, limit int) (*model.PostList, *model.AppError)
- func (a *App) GetFlaggedPostsForTeam(userID, teamID string, offset int, limit int) (*model.PostList, *model.AppError)
- func (a *App) GetGlobalRetentionPolicy() (*model.GlobalRetentionPolicy, *model.AppError)
- func (a *App) GetGroup(id string) (*model.Group, *model.AppError)
- func (a *App) GetGroupByName(name string, opts model.GroupSearchOpts) (*model.Group, *model.AppError)
- func (a *App) GetGroupByRemoteID(remoteID string, groupSource model.GroupSource) (*model.Group, *model.AppError)
- func (a *App) GetGroupChannel(userIDs []string) (*model.Channel, *model.AppError)
- func (a *App) GetGroupMemberCount(groupID string) (int64, *model.AppError)
- func (a *App) GetGroupMemberUsers(groupID string) ([]*model.User, *model.AppError)
- func (a *App) GetGroupMemberUsersPage(groupID string, page int, perPage int) ([]*model.User, int, *model.AppError)
- func (a *App) GetGroupSyncable(groupID string, syncableID string, syncableType model.GroupSyncableType) (*model.GroupSyncable, *model.AppError)
- func (a *App) GetGroupSyncables(groupID string, syncableType model.GroupSyncableType) ([]*model.GroupSyncable, *model.AppError)
- func (a *App) GetGroups(page, perPage int, opts model.GroupSearchOpts) ([]*model.Group, *model.AppError)
- func (a *App) GetGroupsAssociatedToChannelsByTeam(teamID string, opts model.GroupSearchOpts) (map[string][]*model.GroupWithSchemeAdmin, *model.AppError)
- func (a *App) GetGroupsByChannel(channelID string, opts model.GroupSearchOpts) ([]*model.GroupWithSchemeAdmin, int, *model.AppError)
- func (a *App) GetGroupsByIDs(groupIDs []string) ([]*model.Group, *model.AppError)
- func (a *App) GetGroupsBySource(groupSource model.GroupSource) ([]*model.Group, *model.AppError)
- func (a *App) GetGroupsByTeam(teamID string, opts model.GroupSearchOpts) ([]*model.GroupWithSchemeAdmin, int, *model.AppError)
- func (a *App) GetGroupsByUserId(userID string) ([]*model.Group, *model.AppError)
- func (a *App) GetHubForUserId(userID string) *Hub
- func (a *App) GetIncomingWebhook(hookID string) (*model.IncomingWebhook, *model.AppError)
- func (a *App) GetIncomingWebhooksForTeamPage(teamID string, page, perPage int) ([]*model.IncomingWebhook, *model.AppError)
- func (a *App) GetIncomingWebhooksForTeamPageByUser(teamID string, userID string, page, perPage int) ([]*model.IncomingWebhook, *model.AppError)
- func (a *App) GetIncomingWebhooksPage(page, perPage int) ([]*model.IncomingWebhook, *model.AppError)
- func (a *App) GetIncomingWebhooksPageByUser(userID string, page, perPage int) ([]*model.IncomingWebhook, *model.AppError)
- func (a *App) GetJob(id string) (*model.Job, *model.AppError)
- func (a *App) GetJobs(offset int, limit int) ([]*model.Job, *model.AppError)
- func (a *App) GetJobsByType(jobType string, offset int, limit int) ([]*model.Job, *model.AppError)
- func (a *App) GetJobsByTypePage(jobType string, page int, perPage int) ([]*model.Job, *model.AppError)
- func (a *App) GetJobsByTypes(jobTypes []string, offset int, limit int) ([]*model.Job, *model.AppError)
- func (a *App) GetJobsByTypesPage(jobType []string, page int, perPage int) ([]*model.Job, *model.AppError)
- func (a *App) GetJobsPage(page int, perPage int) ([]*model.Job, *model.AppError)
- func (a *App) GetKnownUsers(userID string) ([]string, *model.AppError)
- func (a *App) GetLatestTermsOfService() (*model.TermsOfService, *model.AppError)
- func (a *App) GetLdapGroup(ldapGroupID string) (*model.Group, *model.AppError)
- func (a *App) GetLogs(page, perPage int) ([]string, *model.AppError)
- func (a *App) GetLogsSkipSend(page, perPage int) ([]string, *model.AppError)
- func (a *App) GetMarketplacePlugins(filter *model.MarketplacePluginFilter) ([]*model.MarketplacePlugin, *model.AppError)
- func (a *App) GetMemberCountsByGroup(ctx context.Context, channelID string, includeTimezones bool) ([]*model.ChannelMemberCountByGroup, *model.AppError)
- func (a *App) GetMessageForNotification(post *model.Post, translateFunc i18n.TranslateFunc) string
- func (a *App) GetMultipleEmojiByName(names []string) ([]*model.Emoji, *model.AppError)
- func (a *App) GetNewUsersForTeamPage(teamID string, page, perPage int, asAdmin bool, ...) ([]*model.User, *model.AppError)
- func (a *App) GetNextPostIdFromPostList(postList *model.PostList, collapsedThreads bool) string
- func (a *App) GetNotificationNameFormat(user *model.User) string
- func (a *App) GetNumberOfChannelsOnTeam(teamID string) (int, *model.AppError)
- func (a *App) GetOAuthAccessTokenForCodeFlow(clientId, grantType, redirectUri, code, secret, refreshToken string) (*model.AccessResponse, *model.AppError)
- func (a *App) GetOAuthAccessTokenForImplicitFlow(userID string, authRequest *model.AuthorizeRequest) (*model.Session, *model.AppError)
- func (a *App) GetOAuthApp(appID string) (*model.OAuthApp, *model.AppError)
- func (a *App) GetOAuthApps(page, perPage int) ([]*model.OAuthApp, *model.AppError)
- func (a *App) GetOAuthAppsByCreator(userID string, page, perPage int) ([]*model.OAuthApp, *model.AppError)
- func (a *App) GetOAuthCodeRedirect(userID string, authRequest *model.AuthorizeRequest) (string, *model.AppError)
- func (a *App) GetOAuthImplicitRedirect(userID string, authRequest *model.AuthorizeRequest) (string, *model.AppError)
- func (a *App) GetOAuthLoginEndpoint(w http.ResponseWriter, r *http.Request, ...) (string, *model.AppError)
- func (a *App) GetOAuthSignupEndpoint(w http.ResponseWriter, r *http.Request, service, teamID string) (string, *model.AppError)
- func (a *App) GetOAuthStateToken(token string) (*model.Token, *model.AppError)
- func (a *App) GetOpenGraphMetadata(requestURL string) *opengraph.OpenGraph
- func (a *App) GetOrCreateDirectChannel(c *request.Context, userID, otherUserID string, ...) (*model.Channel, *model.AppError)
- func (a *App) GetOutgoingWebhook(hookID string) (*model.OutgoingWebhook, *model.AppError)
- func (a *App) GetOutgoingWebhooksForChannelPageByUser(channelID string, userID string, page, perPage int) ([]*model.OutgoingWebhook, *model.AppError)
- func (a *App) GetOutgoingWebhooksForTeamPage(teamID string, page, perPage int) ([]*model.OutgoingWebhook, *model.AppError)
- func (a *App) GetOutgoingWebhooksForTeamPageByUser(teamID string, userID string, page, perPage int) ([]*model.OutgoingWebhook, *model.AppError)
- func (a *App) GetOutgoingWebhooksPage(page, perPage int) ([]*model.OutgoingWebhook, *model.AppError)
- func (a *App) GetOutgoingWebhooksPageByUser(userID string, page, perPage int) ([]*model.OutgoingWebhook, *model.AppError)
- func (a *App) GetPasswordRecoveryToken(token string) (*model.Token, *model.AppError)
- func (a *App) GetPermalinkPost(c *request.Context, postID string, userID string) (*model.PostList, *model.AppError)
- func (a *App) GetPinnedPosts(channelID string) (*model.PostList, *model.AppError)
- func (a *App) GetPluginKey(pluginID string, key string) ([]byte, *model.AppError)
- func (a *App) GetPluginPublicKeyFiles() ([]string, *model.AppError)
- func (a *App) GetPluginStatus(id string) (*model.PluginStatus, *model.AppError)
- func (a *App) GetPluginStatuses() (model.PluginStatuses, *model.AppError)
- func (a *App) GetPlugins() (*model.PluginsResponse, *model.AppError)
- func (a *App) GetPluginsEnvironment() *plugin.Environment
- func (a *App) GetPostAfterTime(channelID string, time int64, collapsedThreads bool) (*model.Post, *model.AppError)
- func (a *App) GetPostIdAfterTime(channelID string, time int64, collapsedThreads bool) (string, *model.AppError)
- func (a *App) GetPostIdBeforeTime(channelID string, time int64, collapsedThreads bool) (string, *model.AppError)
- func (a *App) GetPostIfAuthorized(postID string, session *model.Session) (*model.Post, *model.AppError)
- func (a *App) GetPostThread(postID string, ...) (*model.PostList, *model.AppError)
- func (a *App) GetPosts(channelID string, offset int, limit int) (*model.PostList, *model.AppError)
- func (a *App) GetPostsAfterPost(options model.GetPostsOptions) (*model.PostList, *model.AppError)
- func (a *App) GetPostsAroundPost(before bool, options model.GetPostsOptions) (*model.PostList, *model.AppError)
- func (a *App) GetPostsBeforePost(options model.GetPostsOptions) (*model.PostList, *model.AppError)
- func (a *App) GetPostsEtag(channelID string, collapsedThreads bool) string
- func (a *App) GetPostsForChannelAroundLastUnread(channelID, userID string, limitBefore, limitAfter int, skipFetchThreads bool, ...) (*model.PostList, *model.AppError)
- func (a *App) GetPostsPage(options model.GetPostsOptions) (*model.PostList, *model.AppError)
- func (a *App) GetPostsSince(options model.GetPostsSinceOptions) (*model.PostList, *model.AppError)
- func (a *App) GetPreferenceByCategoryAndNameForUser(userID string, category string, preferenceName string) (*model.Preference, *model.AppError)
- func (a *App) GetPreferenceByCategoryForUser(userID string, category string) (model.Preferences, *model.AppError)
- func (a *App) GetPreferencesForUser(userID string) (model.Preferences, *model.AppError)
- func (a *App) GetPrevPostIdFromPostList(postList *model.PostList, collapsedThreads bool) string
- func (a *App) GetPrivateChannelsForTeam(teamID string, offset int, limit int) (*model.ChannelList, *model.AppError)
- func (a *App) GetProductNotices(c *request.Context, userID, teamID string, client model.NoticeClientType, ...) (model.NoticeMessages, *model.AppError)
- func (a *App) GetProfileImage(user *model.User) ([]byte, bool, *model.AppError)
- func (a *App) GetPublicChannelsByIdsForTeam(teamID string, channelIDs []string) (*model.ChannelList, *model.AppError)
- func (a *App) GetPublicChannelsForTeam(teamID string, offset int, limit int) (*model.ChannelList, *model.AppError)
- func (a *App) GetPublicKey(name string) ([]byte, *model.AppError)
- func (a *App) GetReactionsForPost(postID string) ([]*model.Reaction, *model.AppError)
- func (a *App) GetRecentlyActiveUsersForTeam(teamID string) (map[string]*model.User, *model.AppError)
- func (a *App) GetRecentlyActiveUsersForTeamPage(teamID string, page, perPage int, asAdmin bool, ...) ([]*model.User, *model.AppError)
- func (a *App) GetRemoteCluster(remoteClusterId string) (*model.RemoteCluster, *model.AppError)
- func (a *App) GetRemoteClusterForUser(remoteID string, userID string) (*model.RemoteCluster, *model.AppError)
- func (a *App) GetRemoteClusterService() (remotecluster.RemoteClusterServiceIFace, *model.AppError)
- func (a *App) GetRemoteClusterSession(token string, remoteId string) (*model.Session, *model.AppError)
- func (a *App) GetRetentionPolicies(offset, limit int) (*model.RetentionPolicyWithTeamAndChannelCountsList, *model.AppError)
- func (a *App) GetRetentionPoliciesCount() (int64, *model.AppError)
- func (a *App) GetRetentionPolicy(policyID string) (*model.RetentionPolicyWithTeamAndChannelCounts, *model.AppError)
- func (a *App) GetRole(id string) (*model.Role, *model.AppError)
- func (a *App) GetRoleByName(ctx context.Context, name string) (*model.Role, *model.AppError)
- func (a *App) GetRolesByNames(names []string) ([]*model.Role, *model.AppError)
- func (a *App) GetSamlCertificateStatus() *model.SamlCertificateStatus
- func (a *App) GetSamlMetadata() (string, *model.AppError)
- func (a *App) GetSamlMetadataFromIdp(idpMetadataUrl string) (*model.SamlMetadataResponse, *model.AppError)
- func (a *App) GetSanitizeOptions(asAdmin bool) map[string]bool
- func (a *App) GetSanitizedConfig() *model.Config
- func (a *App) GetScheme(id string) (*model.Scheme, *model.AppError)
- func (a *App) GetSchemeByName(name string) (*model.Scheme, *model.AppError)
- func (a *App) GetSchemeRolesForChannel(channelID string) (guestRoleName, userRoleName, adminRoleName string, err *model.AppError)
- func (a *App) GetSchemeRolesForTeam(teamID string) (string, string, string, *model.AppError)
- func (a *App) GetSchemes(scope string, offset int, limit int) ([]*model.Scheme, *model.AppError)
- func (a *App) GetSchemesPage(scope string, page int, perPage int) ([]*model.Scheme, *model.AppError)
- func (a *App) GetSession(token string) (*model.Session, *model.AppError)
- func (a *App) GetSessionById(sessionID string) (*model.Session, *model.AppError)
- func (a *App) GetSessionLengthInMillis(session *model.Session) int64
- func (a *App) GetSessions(userID string) ([]*model.Session, *model.AppError)
- func (a *App) GetSharedChannel(channelID string) (*model.SharedChannel, error)
- func (a *App) GetSharedChannelRemote(id string) (*model.SharedChannelRemote, error)
- func (a *App) GetSharedChannelRemoteByIds(channelID string, remoteID string) (*model.SharedChannelRemote, error)
- func (a *App) GetSharedChannelRemotes(opts model.SharedChannelRemoteFilterOpts) ([]*model.SharedChannelRemote, error)
- func (a *App) GetSharedChannelRemotesStatus(channelID string) ([]*model.SharedChannelRemoteStatus, error)
- func (a *App) GetSharedChannels(page int, perPage int, opts model.SharedChannelFilterOpts) ([]*model.SharedChannel, *model.AppError)
- func (a *App) GetSharedChannelsCount(opts model.SharedChannelFilterOpts) (int64, error)
- func (a *App) GetSidebarCategories(userID, teamID string) (*model.OrderedSidebarCategories, *model.AppError)
- func (a *App) GetSidebarCategory(categoryId string) (*model.SidebarCategoryWithChannels, *model.AppError)
- func (a *App) GetSidebarCategoryOrder(userID, teamID string) ([]string, *model.AppError)
- func (a *App) GetSinglePost(postID string) (*model.Post, *model.AppError)
- func (a *App) GetSiteURL() string
- func (a *App) GetStatus(userID string) (*model.Status, *model.AppError)
- func (a *App) GetStatusFromCache(userID string) *model.Status
- func (a *App) GetStatusesByIds(userIDs []string) (map[string]interface{}, *model.AppError)
- func (a *App) GetSubscriptionStats() (*model.SubscriptionStats, *model.AppError)
- func (a *App) GetSuggestions(c *request.Context, commandArgs *model.CommandArgs, commands []*model.Command, ...) []model.AutocompleteSuggestion
- func (a *App) GetSystemBot() (*model.Bot, *model.AppError)
- func (a *App) GetTeam(teamID string) (*model.Team, *model.AppError)
- func (a *App) GetTeamByInviteId(inviteId string) (*model.Team, *model.AppError)
- func (a *App) GetTeamByName(name string) (*model.Team, *model.AppError)
- func (a *App) GetTeamGroupUsers(teamID string) ([]*model.User, *model.AppError)
- func (a *App) GetTeamIcon(team *model.Team) ([]byte, *model.AppError)
- func (a *App) GetTeamIdFromQuery(query url.Values) (string, *model.AppError)
- func (a *App) GetTeamMember(teamID, userID string) (*model.TeamMember, *model.AppError)
- func (a *App) GetTeamMembers(teamID string, offset int, limit int, ...) ([]*model.TeamMember, *model.AppError)
- func (a *App) GetTeamMembersByIds(teamID string, userIDs []string, restrictions *model.ViewUsersRestrictions) ([]*model.TeamMember, *model.AppError)
- func (a *App) GetTeamMembersForUser(userID string) ([]*model.TeamMember, *model.AppError)
- func (a *App) GetTeamMembersForUserWithPagination(userID string, page, perPage int) ([]*model.TeamMember, *model.AppError)
- func (a *App) GetTeamPoliciesForUser(userID string, offset, limit int) (*model.RetentionPolicyForTeamList, *model.AppError)
- func (a *App) GetTeamSchemeChannelRoles(teamID string) (guestRoleName, userRoleName, adminRoleName string, err *model.AppError)
- func (a *App) GetTeamStats(teamID string, restrictions *model.ViewUsersRestrictions) (*model.TeamStats, *model.AppError)
- func (a *App) GetTeamUnread(teamID, userID string) (*model.TeamUnread, *model.AppError)
- func (a *App) GetTeamsForRetentionPolicy(policyID string, offset, limit int) (*model.TeamsWithCount, *model.AppError)
- func (a *App) GetTeamsForScheme(scheme *model.Scheme, offset int, limit int) ([]*model.Team, *model.AppError)
- func (a *App) GetTeamsForSchemePage(scheme *model.Scheme, page int, perPage int) ([]*model.Team, *model.AppError)
- func (a *App) GetTeamsForUser(userID string) ([]*model.Team, *model.AppError)
- func (a *App) GetTeamsUnreadForUser(excludeTeamId string, userID string) ([]*model.TeamUnread, *model.AppError)
- func (a *App) GetTermsOfService(id string) (*model.TermsOfService, *model.AppError)
- func (a *App) GetThreadForUser(teamID string, threadMembership *model.ThreadMembership, extended bool) (*model.ThreadResponse, *model.AppError)
- func (a *App) GetThreadMembershipForUser(userId, threadId string) (*model.ThreadMembership, *model.AppError)
- func (a *App) GetThreadMembershipsForUser(userID, teamID string) ([]*model.ThreadMembership, error)
- func (a *App) GetThreadsForUser(userID, teamID string, options model.GetUserThreadsOpts) (*model.Threads, *model.AppError)
- func (a *App) GetTotalUsersStats(viewRestrictions *model.ViewUsersRestrictions) (*model.UsersStats, *model.AppError)
- func (a *App) GetUploadSession(uploadId string) (*model.UploadSession, *model.AppError)
- func (a *App) GetUploadSessionsForUser(userID string) ([]*model.UploadSession, *model.AppError)
- func (a *App) GetUser(userID string) (*model.User, *model.AppError)
- func (a *App) GetUserAccessToken(tokenID string, sanitize bool) (*model.UserAccessToken, *model.AppError)
- func (a *App) GetUserAccessTokens(page, perPage int) ([]*model.UserAccessToken, *model.AppError)
- func (a *App) GetUserAccessTokensForUser(userID string, page, perPage int) ([]*model.UserAccessToken, *model.AppError)
- func (a *App) GetUserByAuth(authData *string, authService string) (*model.User, *model.AppError)
- func (a *App) GetUserByEmail(email string) (*model.User, *model.AppError)
- func (a *App) GetUserByUsername(username string) (*model.User, *model.AppError)
- func (a *App) GetUserForLogin(id, loginId string) (*model.User, *model.AppError)
- func (a *App) GetUserStatusesByIds(userIDs []string) ([]*model.Status, *model.AppError)
- func (a *App) GetUserTermsOfService(userID string) (*model.UserTermsOfService, *model.AppError)
- func (a *App) GetUsers(options *model.UserGetOptions) ([]*model.User, *model.AppError)
- func (a *App) GetUsersByGroupChannelIds(c *request.Context, channelIDs []string, asAdmin bool) (map[string][]*model.User, *model.AppError)
- func (a *App) GetUsersByIds(userIDs []string, options *store.UserGetByIdsOpts) ([]*model.User, *model.AppError)
- func (a *App) GetUsersByUsernames(usernames []string, asAdmin bool, ...) ([]*model.User, *model.AppError)
- func (a *App) GetUsersEtag(restrictionsHash string) string
- func (a *App) GetUsersInChannel(options *model.UserGetOptions) ([]*model.User, *model.AppError)
- func (a *App) GetUsersInChannelByStatus(options *model.UserGetOptions) ([]*model.User, *model.AppError)
- func (a *App) GetUsersInChannelMap(options *model.UserGetOptions, asAdmin bool) (map[string]*model.User, *model.AppError)
- func (a *App) GetUsersInChannelPage(options *model.UserGetOptions, asAdmin bool) ([]*model.User, *model.AppError)
- func (a *App) GetUsersInChannelPageByStatus(options *model.UserGetOptions, asAdmin bool) ([]*model.User, *model.AppError)
- func (a *App) GetUsersInTeam(options *model.UserGetOptions) ([]*model.User, *model.AppError)
- func (a *App) GetUsersInTeamEtag(teamID string, restrictionsHash string) string
- func (a *App) GetUsersInTeamPage(options *model.UserGetOptions, asAdmin bool) ([]*model.User, *model.AppError)
- func (a *App) GetUsersNotInChannel(teamID string, channelID string, groupConstrained bool, offset int, limit int, ...) ([]*model.User, *model.AppError)
- func (a *App) GetUsersNotInChannelMap(teamID string, channelID string, groupConstrained bool, offset int, limit int, ...) (map[string]*model.User, *model.AppError)
- func (a *App) GetUsersNotInChannelPage(teamID string, channelID string, groupConstrained bool, page int, perPage int, ...) ([]*model.User, *model.AppError)
- func (a *App) GetUsersNotInTeam(teamID string, groupConstrained bool, offset int, limit int, ...) ([]*model.User, *model.AppError)
- func (a *App) GetUsersNotInTeamEtag(teamID string, restrictionsHash string) string
- func (a *App) GetUsersNotInTeamPage(teamID string, groupConstrained bool, page int, perPage int, asAdmin bool, ...) ([]*model.User, *model.AppError)
- func (a *App) GetUsersPage(options *model.UserGetOptions, asAdmin bool) ([]*model.User, *model.AppError)
- func (a *App) GetUsersWithoutTeam(options *model.UserGetOptions) ([]*model.User, *model.AppError)
- func (a *App) GetUsersWithoutTeamPage(options *model.UserGetOptions, asAdmin bool) ([]*model.User, *model.AppError)
- func (a *App) GetVerifyEmailToken(token string) (*model.Token, *model.AppError)
- func (a *App) GetViewUsersRestrictions(userID string) (*model.ViewUsersRestrictions, *model.AppError)
- func (a *App) GetWarnMetricsBot() (*model.Bot, *model.AppError)
- func (a *App) GetWarnMetricsStatus() (map[string]*model.WarnMetricStatus, *model.AppError)
- func (a *App) HTTPService() httpservice.HTTPService
- func (a *App) Handle404(w http.ResponseWriter, r *http.Request)
- func (a *App) HandleCommandResponse(c *request.Context, command *model.Command, args *model.CommandArgs, ...) (*model.CommandResponse, *model.AppError)
- func (a *App) HandleCommandResponsePost(c *request.Context, command *model.Command, args *model.CommandArgs, ...) (*model.Post, *model.AppError)
- func (a *App) HandleCommandWebhook(c *request.Context, hookID string, response *model.CommandResponse) *model.AppError
- func (a *App) HandleImages(previewPathList []string, thumbnailPathList []string, fileData [][]byte)
- func (a *App) HandleIncomingWebhook(c *request.Context, hookID string, req *model.IncomingWebhookRequest) *model.AppError
- func (a *App) HandleMessageExportConfig(cfg *model.Config, appCfg *model.Config)
- func (a *App) HasPermissionTo(askingUserId string, permission *model.Permission) bool
- func (a *App) HasPermissionToChannel(askingUserId string, channelID string, permission *model.Permission) bool
- func (a *App) HasPermissionToChannelByPost(askingUserId string, postID string, permission *model.Permission) bool
- func (a *App) HasPermissionToTeam(askingUserId string, teamID string, permission *model.Permission) bool
- func (a *App) HasPermissionToUser(askingUserId string, userID string) bool
- func (a *App) HasRemote(channelID string, remoteID string) (bool, error)
- func (a *App) HasSharedChannel(channelID string) (bool, error)
- func (a *App) HubRegister(webConn *WebConn)
- func (a *App) HubStart()
- func (a *App) HubStop()
- func (a *App) HubUnregister(webConn *WebConn)
- func (a *App) ImageProxy() *imageproxy.ImageProxy
- func (a *App) ImageProxyAdder() func(string) string
- func (a *App) ImageProxyRemover() (f func(string) string)
- func (a *App) ImportPermissions(jsonl io.Reader) error
- func (a *App) InitPlugins(c *request.Context, pluginDir, webappPluginDir string)
- func (a *App) InstallMarketplacePlugin(request *model.InstallMarketplacePluginRequest) (*model.Manifest, *model.AppError)
- func (a *App) InstallPlugin(pluginFile io.ReadSeeker, replace bool) (*model.Manifest, *model.AppError)
- func (a *App) InstallPluginFromData(data model.PluginEventData)
- func (a *App) InstallPluginWithSignature(pluginFile, signature io.ReadSeeker) (*model.Manifest, *model.AppError)
- func (a *App) InvalidateAllEmailInvites() *model.AppError
- func (a *App) InvalidateCacheForUser(userID string)
- func (a *App) InviteGuestsToChannels(teamID string, guestsInvite *model.GuestsInvite, senderId string) *model.AppError
- func (a *App) InviteGuestsToChannelsGracefully(teamID string, guestsInvite *model.GuestsInvite, senderId string) ([]*model.EmailInviteWithError, *model.AppError)
- func (a *App) InviteNewUsersToTeam(emailList []string, teamID, senderId string) *model.AppError
- func (a *App) InviteNewUsersToTeamGracefully(emailList []string, teamID, senderId string) ([]*model.EmailInviteWithError, *model.AppError)
- func (a *App) IsFirstUserAccount() bool
- func (a *App) IsLeader() bool
- func (a *App) IsPasswordValid(password string) *model.AppError
- func (a *App) IsPhase2MigrationCompleted() *model.AppError
- func (a *App) IsUserAway(lastActivityAt int64) bool
- func (a *App) IsUserSignUpAllowed() *model.AppError
- func (a *App) JoinChannel(c *request.Context, channel *model.Channel, userID string) *model.AppError
- func (a *App) JoinDefaultChannels(c *request.Context, teamID string, user *model.User, shouldBeAdmin bool, ...) *model.AppError
- func (a *App) JoinUserToTeam(c *request.Context, team *model.Team, user *model.User, userRequestorId string) (*model.TeamMember, *model.AppError)
- func (a *App) Ldap() einterfaces.LdapInterface
- func (a *App) LeaveChannel(c *request.Context, channelID string, userID string) *model.AppError
- func (a *App) LeaveTeam(c *request.Context, team *model.Team, user *model.User, requestorId string) *model.AppError
- func (a *App) LimitedClientConfig() map[string]string
- func (a *App) LimitedClientConfigWithComputed() map[string]string
- func (a *App) ListAllCommands(teamID string, T i18n.TranslateFunc) ([]*model.Command, *model.AppError)
- func (a *App) ListAutocompleteCommands(teamID string, T i18n.TranslateFunc) ([]*model.Command, *model.AppError)
- func (a *App) ListDirectory(path string) ([]string, *model.AppError)
- func (a *App) ListExports() ([]string, *model.AppError)
- func (a *App) ListImports() ([]string, *model.AppError)
- func (a *App) ListPluginKeys(pluginID string, page, perPage int) ([]string, *model.AppError)
- func (a *App) ListTeamCommands(teamID string) ([]*model.Command, *model.AppError)
- func (a *App) Log() *mlog.Logger
- func (a *App) LogAuditRec(rec *audit.Record, err error)
- func (a *App) LogAuditRecWithLevel(rec *audit.Record, level mlog.LogLevel, err error)
- func (a *App) LoginByOAuth(c *request.Context, service string, userData io.Reader, teamID string, ...) (*model.User, *model.AppError)
- func (a *App) MakeAuditRecord(event string, initialStatus string) *audit.Record
- func (a *App) MakePermissionError(s *model.Session, permissions []*model.Permission) *model.AppError
- func (a *App) MarkChannelAsUnreadFromPost(postID string, userID string, collapsedThreadsSupported, followThread bool) (*model.ChannelUnreadAt, *model.AppError)
- func (a *App) MarkChannelsAsViewed(channelIDs []string, userID string, currentSessionId string, ...) (map[string]int64, *model.AppError)
- func (a *App) MaxPostSize() int
- func (a *App) MentionsToPublicChannels(message, teamID string) model.ChannelMentionMap
- func (a *App) MentionsToTeamMembers(message, teamID string) model.UserMentionMap
- func (a *App) MessageExport() einterfaces.MessageExportInterface
- func (a *App) Metrics() einterfaces.MetricsInterface
- func (a *App) MigrateFilenamesToFileInfos(post *model.Post) []*model.FileInfo
- func (a *App) MigrateIdLDAP(toAttribute string) *model.AppError
- func (a *App) MoveChannel(c *request.Context, team *model.Team, channel *model.Channel, user *model.User) *model.AppError
- func (a *App) MoveCommand(team *model.Team, command *model.Command) *model.AppError
- func (a *App) MoveFile(oldPath, newPath string) *model.AppError
- func (a *App) NewClusterDiscoveryService() *ClusterDiscoveryService
- func (a *App) NewPluginAPI(c *request.Context, manifest *model.Manifest) plugin.API
- func (a *App) NewWebConn(cfg *WebConnConfig) *WebConn
- func (a *App) NewWebHub() *Hub
- func (a *App) Notification() einterfaces.NotificationInterface
- func (a *App) NotificationsLog() *mlog.Logger
- func (a *App) NotifyAndSetWarnMetricAck(warnMetricId string, sender *model.User, forceAck bool, isBot bool) *model.AppError
- func (a *App) NotifySessionsExpired() *model.AppError
- func (a *App) NotifySharedChannelUserUpdate(user *model.User)
- func (a *App) OpenInteractiveDialog(request model.OpenDialogRequest) *model.AppError
- func (a *App) OriginChecker() func(*http.Request) bool
- func (a *App) OverrideIconURLIfEmoji(post *model.Post)
- func (a *App) PatchBot(botUserId string, botPatch *model.BotPatch) (*model.Bot, *model.AppError)
- func (a *App) PatchChannel(c *request.Context, channel *model.Channel, patch *model.ChannelPatch, ...) (*model.Channel, *model.AppError)
- func (a *App) PatchChannelModerationsForChannel(channel *model.Channel, ...) ([]*model.ChannelModeration, *model.AppError)
- func (a *App) PatchPost(c *request.Context, postID string, patch *model.PostPatch) (*model.Post, *model.AppError)
- func (a *App) PatchRetentionPolicy(patch *model.RetentionPolicyWithTeamAndChannelIDs) (*model.RetentionPolicyWithTeamAndChannelCounts, *model.AppError)
- func (a *App) PatchRole(role *model.Role, patch *model.RolePatch) (*model.Role, *model.AppError)
- func (a *App) PatchScheme(scheme *model.Scheme, patch *model.SchemePatch) (*model.Scheme, *model.AppError)
- func (a *App) PatchTeam(teamID string, patch *model.TeamPatch) (*model.Team, *model.AppError)
- func (a *App) PatchUser(userID string, patch *model.UserPatch, asAdmin bool) (*model.User, *model.AppError)
- func (a *App) PermanentDeleteAllUsers(c *request.Context) *model.AppError
- func (a *App) PermanentDeleteBot(botUserId string) *model.AppError
- func (a *App) PermanentDeleteChannel(channel *model.Channel) *model.AppError
- func (a *App) PermanentDeleteTeam(team *model.Team) *model.AppError
- func (a *App) PermanentDeleteTeamId(teamID string) *model.AppError
- func (a *App) PermanentDeleteUser(c *request.Context, user *model.User) *model.AppError
- func (a *App) PluginCommandsForTeam(teamID string) []*model.Command
- func (a *App) PopulateWebConnConfig(s *model.Session, cfg *WebConnConfig, seqVal string) (*WebConnConfig, error)
- func (a *App) PostActionCookieSecret() []byte
- func (a *App) PostAddToChannelMessage(c *request.Context, user *model.User, addedUser *model.User, ...) *model.AppError
- func (a *App) PostPatchWithProxyRemovedFromImageURLs(patch *model.PostPatch) *model.PostPatch
- func (a *App) PostUpdateChannelDisplayNameMessage(c *request.Context, userID string, channel *model.Channel, ...) *model.AppError
- func (a *App) PostUpdateChannelHeaderMessage(c *request.Context, userID string, channel *model.Channel, ...) *model.AppError
- func (a *App) PostUpdateChannelPurposeMessage(c *request.Context, userID string, channel *model.Channel, ...) *model.AppError
- func (a *App) PostWithProxyAddedToImageURLs(post *model.Post) *model.Post
- func (a *App) PostWithProxyRemovedFromImageURLs(post *model.Post) *model.Post
- func (a *App) PreparePostForClient(originalPost *model.Post, isNewPost bool, isEditPost bool) *model.Post
- func (a *App) PreparePostListForClient(originalList *model.PostList) *model.PostList
- func (a *App) ProcessSlackAttachments(attachments []*model.SlackAttachment) []*model.SlackAttachment
- func (a *App) ProcessSlackText(text string) string
- func (a *App) PromoteGuestToUser(c *request.Context, user *model.User, requestorId string) *model.AppError
- func (a *App) Publish(message *model.WebSocketEvent)
- func (a *App) PublishUserTyping(userID, channelID, parentId string) *model.AppError
- func (a *App) PurgeBleveIndexes() *model.AppError
- func (a *App) PurgeElasticsearchIndexes() *model.AppError
- func (a *App) ReadFile(path string) ([]byte, *model.AppError)
- func (a *App) RecycleDatabaseConnection()
- func (a *App) RegenCommandToken(cmd *model.Command) (*model.Command, *model.AppError)
- func (a *App) RegenOutgoingWebhookToken(hook *model.OutgoingWebhook) (*model.OutgoingWebhook, *model.AppError)
- func (a *App) RegenerateOAuthAppSecret(app *model.OAuthApp) (*model.OAuthApp, *model.AppError)
- func (a *App) RegenerateTeamInviteId(teamID string) (*model.Team, *model.AppError)
- func (a *App) RegisterPluginCommand(pluginID string, command *model.Command) error
- func (a *App) ReloadConfig() error
- func (a *App) RemoveAllDeactivatedMembersFromChannel(channel *model.Channel) *model.AppError
- func (a *App) RemoveChannelsFromRetentionPolicy(policyID string, channelIDs []string) *model.AppError
- func (a *App) RemoveConfigListener(id string)
- func (a *App) RemoveCustomStatus(userID string) *model.AppError
- func (a *App) RemoveDirectory(path string) *model.AppError
- func (a *App) RemoveFile(path string) *model.AppError
- func (a *App) RemoveLdapPrivateCertificate() *model.AppError
- func (a *App) RemoveLdapPublicCertificate() *model.AppError
- func (a *App) RemovePlugin(id string) *model.AppError
- func (a *App) RemovePluginFromData(data model.PluginEventData)
- func (a *App) RemoveRecentCustomStatus(userID string, status *model.CustomStatus) *model.AppError
- func (a *App) RemoveSamlIdpCertificate() *model.AppError
- func (a *App) RemoveSamlPrivateCertificate() *model.AppError
- func (a *App) RemoveSamlPublicCertificate() *model.AppError
- func (a *App) RemoveTeamIcon(teamID string) *model.AppError
- func (a *App) RemoveTeamMemberFromTeam(c *request.Context, teamMember *model.TeamMember, requestorId string) *model.AppError
- func (a *App) RemoveTeamsFromRetentionPolicy(policyID string, teamIDs []string) *model.AppError
- func (a *App) RemoveUserFromChannel(c *request.Context, userIDToRemove string, removerUserId string, ...) *model.AppError
- func (a *App) RemoveUserFromTeam(c *request.Context, teamID string, userID string, requestorId string) *model.AppError
- func (a *App) RemoveUsersFromChannelNotMemberOfTeam(c *request.Context, remover *model.User, channel *model.Channel, ...) *model.AppError
- func (a *App) RenameChannel(channel *model.Channel, newChannelName string, newDisplayName string) (*model.Channel, *model.AppError)
- func (a *App) RenameTeam(team *model.Team, newTeamName string, newDisplayName string) (*model.Team, *model.AppError)
- func (a *App) RequestLicenseAndAckWarnMetric(c *request.Context, warnMetricId string, isBot bool) *model.AppError
- func (a *App) ResetPasswordFromToken(userSuppliedTokenString, newPassword string) *model.AppError
- func (a *App) ResetPermissionsSystem() *model.AppError
- func (a *App) ResetSamlAuthDataToEmail(includeDeleted bool, dryRun bool, userIDs []string) (numAffected int, appErr *model.AppError)
- func (a *App) RestoreChannel(c *request.Context, channel *model.Channel, userID string) (*model.Channel, *model.AppError)
- func (a *App) RestoreTeam(teamID string) *model.AppError
- func (a *App) RestrictUsersGetByPermissions(userID string, options *model.UserGetOptions) (*model.UserGetOptions, *model.AppError)
- func (a *App) RestrictUsersSearchByPermissions(userID string, options *model.UserSearchOptions) (*model.UserSearchOptions, *model.AppError)
- func (a *App) ReturnSessionToPool(session *model.Session)
- func (a *App) RevokeAccessToken(token string) *model.AppError
- func (a *App) RevokeAllSessions(userID string) *model.AppError
- func (a *App) RevokeSession(session *model.Session) *model.AppError
- func (a *App) RevokeSessionById(sessionID string) *model.AppError
- func (a *App) RevokeSessionsForDeviceId(userID string, deviceID string, currentSessionId string) *model.AppError
- func (a *App) RevokeSessionsFromAllUsers() *model.AppError
- func (a *App) RevokeUserAccessToken(token *model.UserAccessToken) *model.AppError
- func (a *App) RolesGrantPermission(roleNames []string, permissionId string) bool
- func (a *App) Saml() einterfaces.SamlInterface
- func (a *App) SanitizeProfile(user *model.User, asAdmin bool)
- func (a *App) SanitizeTeam(session model.Session, team *model.Team) *model.Team
- func (a *App) SanitizeTeams(session model.Session, teams []*model.Team) []*model.Team
- func (a *App) SaveAndBroadcastStatus(status *model.Status)
- func (a *App) SaveBrandImage(imageData *multipart.FileHeader) *model.AppError
- func (a *App) SaveComplianceReport(job *model.Compliance) (*model.Compliance, *model.AppError)
- func (a *App) SaveConfig(newCfg *model.Config, sendConfigChangeClusterMessage bool) (*model.Config, *model.Config, *model.AppError)
- func (a *App) SaveReactionForPost(c *request.Context, reaction *model.Reaction) (*model.Reaction, *model.AppError)
- func (a *App) SaveSharedChannel(sc *model.SharedChannel) (*model.SharedChannel, error)
- func (a *App) SaveSharedChannelRemote(remote *model.SharedChannelRemote) (*model.SharedChannelRemote, error)
- func (a *App) SaveUserTermsOfService(userID, termsOfServiceId string, accepted bool) *model.AppError
- func (a *App) SchemesIterator(scope string, batchSize int) func() []*model.Scheme
- func (a *App) SearchAllChannels(term string, opts model.ChannelSearchOpts) (*model.ChannelListWithTeamData, int64, *model.AppError)
- func (a *App) SearchAllTeams(searchOpts *model.TeamSearch) ([]*model.Team, int64, *model.AppError)
- func (a *App) SearchArchivedChannels(teamID string, term string, userID string) (*model.ChannelList, *model.AppError)
- func (a *App) SearchChannels(teamID string, term string) (*model.ChannelList, *model.AppError)
- func (a *App) SearchChannelsForUser(userID, teamID, term string) (*model.ChannelList, *model.AppError)
- func (a *App) SearchChannelsUserNotIn(teamID string, userID string, term string) (*model.ChannelList, *model.AppError)
- func (a *App) SearchEmoji(name string, prefixOnly bool, limit int) ([]*model.Emoji, *model.AppError)
- func (a *App) SearchEngine() *searchengine.Broker
- func (a *App) SearchFilesInTeamForUser(c *request.Context, terms string, userId string, teamId string, ...) (*model.FileInfoList, *model.AppError)
- func (a *App) SearchGroupChannels(userID, term string) (*model.ChannelList, *model.AppError)
- func (a *App) SearchPostsInTeam(teamID string, paramsList []*model.SearchParams) (*model.PostList, *model.AppError)
- func (a *App) SearchPostsInTeamForUser(c *request.Context, terms string, userID string, teamID string, ...) (*model.PostSearchResults, *model.AppError)
- func (a *App) SearchPrivateTeams(searchOpts *model.TeamSearch) ([]*model.Team, *model.AppError)
- func (a *App) SearchPublicTeams(searchOpts *model.TeamSearch) ([]*model.Team, *model.AppError)
- func (a *App) SearchUserAccessTokens(term string) ([]*model.UserAccessToken, *model.AppError)
- func (a *App) SearchUsers(props *model.UserSearch, options *model.UserSearchOptions) ([]*model.User, *model.AppError)
- func (a *App) SearchUsersInChannel(channelID string, term string, options *model.UserSearchOptions) ([]*model.User, *model.AppError)
- func (a *App) SearchUsersInGroup(groupID string, term string, options *model.UserSearchOptions) ([]*model.User, *model.AppError)
- func (a *App) SearchUsersInTeam(teamID, term string, options *model.UserSearchOptions) ([]*model.User, *model.AppError)
- func (a *App) SearchUsersNotInChannel(teamID string, channelID string, term string, options *model.UserSearchOptions) ([]*model.User, *model.AppError)
- func (a *App) SearchUsersNotInTeam(notInTeamId string, term string, options *model.UserSearchOptions) ([]*model.User, *model.AppError)
- func (a *App) SearchUsersWithoutTeam(term string, options *model.UserSearchOptions) ([]*model.User, *model.AppError)
- func (a *App) SendAckToPushProxy(ack *model.PushNotificationAck) error
- func (a *App) SendAdminUpgradeRequestEmail(username string, subscription *model.Subscription, action string) *model.AppError
- func (a *App) SendAutoResponse(c *request.Context, channel *model.Channel, receiver *model.User, ...) (bool, *model.AppError)
- func (a *App) SendAutoResponseIfNecessary(c *request.Context, channel *model.Channel, sender *model.User, ...) (bool, *model.AppError)
- func (a *App) SendCloudTrialEndWarningEmail(trialEndDate, siteURL string) *model.AppError
- func (a *App) SendCloudTrialEndedEmail() *model.AppError
- func (a *App) SendEmailVerification(user *model.User, newEmail, redirect string) *model.AppError
- func (a *App) SendEphemeralPost(userID string, post *model.Post) *model.Post
- func (a *App) SendNoCardPaymentFailedEmail() *model.AppError
- func (a *App) SendNotifications(post *model.Post, team *model.Team, channel *model.Channel, sender *model.User, ...) ([]string, error)
- func (a *App) SendPasswordReset(email string, siteURL string) (bool, *model.AppError)
- func (a *App) SendPaymentFailedEmail(failedPayment *model.FailedPayment) *model.AppError
- func (a *App) ServeInterPluginRequest(w http.ResponseWriter, r *http.Request, ...)
- func (a *App) SessionHasPermissionTo(session model.Session, permission *model.Permission) bool
- func (a *App) SessionHasPermissionToAny(session model.Session, permissions []*model.Permission) bool
- func (a *App) SessionHasPermissionToCategory(session model.Session, userID, teamID, categoryId string) bool
- func (a *App) SessionHasPermissionToChannel(session model.Session, channelID string, permission *model.Permission) bool
- func (a *App) SessionHasPermissionToChannelByPost(session model.Session, postID string, permission *model.Permission) bool
- func (a *App) SessionHasPermissionToCreateJob(session model.Session, job *model.Job) (bool, *model.Permission)
- func (a *App) SessionHasPermissionToManageBot(session model.Session, botUserId string) *model.AppError
- func (a *App) SessionHasPermissionToReadJob(session model.Session, jobType string) (bool, *model.Permission)
- func (a *App) SessionHasPermissionToTeam(session model.Session, teamID string, permission *model.Permission) bool
- func (a *App) SessionHasPermissionToUser(session model.Session, userID string) bool
- func (a *App) SessionHasPermissionToUserOrBot(session model.Session, userID string) bool
- func (a *App) SessionIsRegistered(session model.Session) bool
- func (a *App) SetActiveChannel(userID string, channelID string) *model.AppError
- func (a *App) SetAutoResponderStatus(user *model.User, oldNotifyProps model.StringMap)
- func (a *App) SetBotIconImage(botUserId string, file io.ReadSeeker) *model.AppError
- func (a *App) SetBotIconImageFromMultiPartFile(botUserId string, imageData *multipart.FileHeader) *model.AppError
- func (a *App) SetCustomStatus(userID string, cs *model.CustomStatus) *model.AppError
- func (a *App) SetDefaultProfileImage(user *model.User) *model.AppError
- func (a *App) SetPhase2PermissionsMigrationStatus(isComplete bool) error
- func (a *App) SetPluginKey(pluginID string, key string, value []byte) *model.AppError
- func (a *App) SetPluginKeyWithExpiry(pluginID string, key string, value []byte, expireInSeconds int64) *model.AppError
- func (a *App) SetPluginKeyWithOptions(pluginID string, key string, value []byte, options model.PluginKVSetOptions) (bool, *model.AppError)
- func (a *App) SetPluginsEnvironment(pluginsEnvironment *plugin.Environment)
- func (a *App) SetProfileImage(userID string, imageData *multipart.FileHeader) *model.AppError
- func (a *App) SetProfileImageFromFile(userID string, file io.Reader) *model.AppError
- func (a *App) SetProfileImageFromMultiPartFile(userID string, file multipart.File) *model.AppError
- func (a *App) SetRemoteClusterLastPingAt(remoteClusterId string) *model.AppError
- func (a *App) SetSamlIdpCertificateFromMetadata(data []byte) *model.AppError
- func (a *App) SetSearchEngine(se *searchengine.Broker)
- func (a *App) SetServer(srv *Server)
- func (a *App) SetSessionExpireInDays(session *model.Session, days int)
- func (a *App) SetStatusAwayIfNeeded(userID string, manual bool)
- func (a *App) SetStatusDoNotDisturb(userID string)
- func (a *App) SetStatusDoNotDisturbTimed(userId string, endtime int64)
- func (a *App) SetStatusLastActivityAt(userID string, activityAt int64)
- func (a *App) SetStatusOffline(userID string, manual bool)
- func (a *App) SetStatusOnline(userID string, manual bool)
- func (a *App) SetStatusOutOfOffice(userID string)
- func (a *App) SetTeamIcon(teamID string, imageData *multipart.FileHeader) *model.AppError
- func (a *App) SetTeamIconFromFile(team *model.Team, file io.Reader) *model.AppError
- func (a *App) SetTeamIconFromMultiPartFile(teamID string, file multipart.File) *model.AppError
- func (a *App) SlackImport(c *request.Context, fileData multipart.File, fileSize int64, teamID string) (*model.AppError, *bytes.Buffer)
- func (a *App) SoftDeleteTeam(teamID string) *model.AppError
- func (a *App) Srv() *Server
- func (a *App) SubmitInteractiveDialog(c *request.Context, request model.SubmitDialogRequest) (*model.SubmitDialogResponse, *model.AppError)
- func (a *App) SwitchEmailToLdap(email, password, code, ldapLoginId, ldapPassword string) (string, *model.AppError)
- func (a *App) SwitchEmailToOAuth(w http.ResponseWriter, r *http.Request, email, password, code, service string) (string, *model.AppError)
- func (a *App) SwitchLdapToEmail(ldapPassword, code, email, newPassword string) (string, *model.AppError)
- func (a *App) SwitchOAuthToEmail(email, password, requesterId string) (string, *model.AppError)
- func (a *App) SyncLdap(includeRemovedMembers bool)
- func (a *App) SyncPlugins() *model.AppError
- func (a *App) SyncPluginsActiveState()
- func (a *App) SyncRolesAndMembership(c *request.Context, syncableID string, syncableType model.GroupSyncableType, ...)
- func (a *App) SyncSyncableRoles(syncableID string, syncableType model.GroupSyncableType) *model.AppError
- func (a *App) TeamMembersMinusGroupMembers(teamID string, groupIDs []string, page, perPage int) ([]*model.UserWithGroups, int64, *model.AppError)
- func (a *App) TeamMembersToAdd(since int64, teamID *string, includeRemovedMembers bool) ([]*model.UserTeamIDPair, *model.AppError)
- func (a *App) TeamMembersToRemove(teamID *string) ([]*model.TeamMember, *model.AppError)
- func (a *App) TelemetryId() string
- func (a *App) TestElasticsearch(cfg *model.Config) *model.AppError
- func (a *App) TestEmail(userID string, cfg *model.Config) *model.AppError
- func (a *App) TestFileStoreConnection() *model.AppError
- func (a *App) TestFileStoreConnectionWithConfig(cfg *model.FileSettings) *model.AppError
- func (a *App) TestLdap() *model.AppError
- func (a *App) TestSiteURL(siteURL string) *model.AppError
- func (a *App) Timezones() *timezones.Timezones
- func (a *App) ToggleMuteChannel(channelID, userID string) (*model.ChannelMember, *model.AppError)
- func (a *App) TotalWebsocketConnections() int
- func (a *App) TriggerWebhook(c *request.Context, payload *model.OutgoingWebhookPayload, ...)
- func (a *App) UnregisterPluginCommand(pluginID, teamID, trigger string)
- func (a *App) UnregisterPluginCommands(pluginID string)
- func (a *App) UpdateActive(c *request.Context, user *model.User, active bool) (*model.User, *model.AppError)
- func (a *App) UpdateBotActive(c *request.Context, botUserId string, active bool) (*model.Bot, *model.AppError)
- func (a *App) UpdateBotOwner(botUserId, newOwnerId string) (*model.Bot, *model.AppError)
- func (a *App) UpdateChannel(channel *model.Channel) (*model.Channel, *model.AppError)
- func (a *App) UpdateChannelLastViewedAt(channelIDs []string, userID string) *model.AppError
- func (a *App) UpdateChannelMemberNotifyProps(data map[string]string, channelID string, userID string) (*model.ChannelMember, *model.AppError)
- func (a *App) UpdateChannelMemberRoles(channelID string, userID string, newRoles string) (*model.ChannelMember, *model.AppError)
- func (a *App) UpdateChannelMemberSchemeRoles(channelID string, userID string, isSchemeGuest bool, isSchemeUser bool, ...) (*model.ChannelMember, *model.AppError)
- func (a *App) UpdateChannelPrivacy(c *request.Context, oldChannel *model.Channel, user *model.User) (*model.Channel, *model.AppError)
- func (a *App) UpdateChannelScheme(channel *model.Channel) (*model.Channel, *model.AppError)
- func (a *App) UpdateCommand(oldCmd, updatedCmd *model.Command) (*model.Command, *model.AppError)
- func (a *App) UpdateConfig(f func(*model.Config))
- func (a *App) UpdateDNDStatusOfUsers()
- func (a *App) UpdateEphemeralPost(userID string, post *model.Post) *model.Post
- func (a *App) UpdateExpiredDNDStatuses() ([]*model.Status, error)
- func (a *App) UpdateGroup(group *model.Group) (*model.Group, *model.AppError)
- func (a *App) UpdateGroupSyncable(groupSyncable *model.GroupSyncable) (*model.GroupSyncable, *model.AppError)
- func (a *App) UpdateHashedPassword(user *model.User, newHashedPassword string) *model.AppError
- func (a *App) UpdateHashedPasswordByUserId(userID, newHashedPassword string) *model.AppError
- func (a *App) UpdateIncomingWebhook(oldHook, updatedHook *model.IncomingWebhook) (*model.IncomingWebhook, *model.AppError)
- func (a *App) UpdateLastActivityAtIfNeeded(session model.Session)
- func (a *App) UpdateMfa(activate bool, userID, token string) *model.AppError
- func (a *App) UpdateMobileAppBadge(userID string)
- func (a *App) UpdateOAuthUserAttrs(userData io.Reader, user *model.User, provider einterfaces.OauthProvider, ...) *model.AppError
- func (a *App) UpdateOauthApp(oldApp, updatedApp *model.OAuthApp) (*model.OAuthApp, *model.AppError)
- func (a *App) UpdateOutgoingWebhook(oldHook, updatedHook *model.OutgoingWebhook) (*model.OutgoingWebhook, *model.AppError)
- func (a *App) UpdatePassword(user *model.User, newPassword string) *model.AppError
- func (a *App) UpdatePasswordAsUser(userID, currentPassword, newPassword string) *model.AppError
- func (a *App) UpdatePasswordByUserIdSendEmail(userID, newPassword, method string) *model.AppError
- func (a *App) UpdatePasswordSendEmail(user *model.User, newPassword, method string) *model.AppError
- func (a *App) UpdatePost(c *request.Context, post *model.Post, safeUpdate bool) (*model.Post, *model.AppError)
- func (a *App) UpdatePreferences(userID string, preferences model.Preferences) *model.AppError
- func (a *App) UpdateProductNotices() *model.AppError
- func (a *App) UpdateRemoteCluster(rc *model.RemoteCluster) (*model.RemoteCluster, *model.AppError)
- func (a *App) UpdateRemoteClusterTopics(remoteClusterId string, topics string) (*model.RemoteCluster, *model.AppError)
- func (a *App) UpdateRole(role *model.Role) (*model.Role, *model.AppError)
- func (a *App) UpdateScheme(scheme *model.Scheme) (*model.Scheme, *model.AppError)
- func (a *App) UpdateSharedChannel(sc *model.SharedChannel) (*model.SharedChannel, error)
- func (a *App) UpdateSharedChannelRemoteCursor(id string, cursor model.GetPostsSinceForSyncCursor) error
- func (a *App) UpdateSidebarCategories(userID, teamID string, categories []*model.SidebarCategoryWithChannels) ([]*model.SidebarCategoryWithChannels, *model.AppError)
- func (a *App) UpdateSidebarCategoryOrder(userID, teamID string, categoryOrder []string) *model.AppError
- func (a *App) UpdateTeam(team *model.Team) (*model.Team, *model.AppError)
- func (a *App) UpdateTeamMemberRoles(teamID string, userID string, newRoles string) (*model.TeamMember, *model.AppError)
- func (a *App) UpdateTeamMemberSchemeRoles(teamID string, userID string, isSchemeGuest bool, isSchemeUser bool, ...) (*model.TeamMember, *model.AppError)
- func (a *App) UpdateTeamPrivacy(teamID string, teamType string, allowOpenInvite bool) *model.AppError
- func (a *App) UpdateTeamScheme(team *model.Team) (*model.Team, *model.AppError)
- func (a *App) UpdateThreadFollowForUser(userID, teamID, threadID string, state bool) *model.AppError
- func (a *App) UpdateThreadReadForUser(userID, teamID, threadID string, timestamp int64) (*model.ThreadResponse, *model.AppError)
- func (a *App) UpdateThreadsReadForUser(userID, teamID string) *model.AppError
- func (a *App) UpdateUser(user *model.User, sendNotifications bool) (*model.User, *model.AppError)
- func (a *App) UpdateUserActive(c *request.Context, userID string, active bool) *model.AppError
- func (a *App) UpdateUserAsUser(user *model.User, asAdmin bool) (*model.User, *model.AppError)
- func (a *App) UpdateUserAuth(userID string, userAuth *model.UserAuth) (*model.UserAuth, *model.AppError)
- func (a *App) UpdateUserNotifyProps(userID string, props map[string]string, sendNotifications bool) (*model.User, *model.AppError)
- func (a *App) UpdateUserRoles(userID string, newRoles string, sendWebSocketEvent bool) (*model.User, *model.AppError)
- func (a *App) UpdateUserRolesWithUser(user *model.User, newRoles string, sendWebSocketEvent bool) (*model.User, *model.AppError)
- func (a *App) UpdateViewedProductNotices(userID string, noticeIds []string) *model.AppError
- func (a *App) UpdateViewedProductNoticesForNewUser(userID string)
- func (a *App) UpdateWebConnUserActivity(session model.Session, activityAt int64)
- func (a *App) UploadData(c *request.Context, us *model.UploadSession, rd io.Reader) (*model.FileInfo, *model.AppError)
- func (a *App) UploadEmojiImage(id string, imageData *multipart.FileHeader) *model.AppError
- func (a *App) UploadFile(c *request.Context, data []byte, channelID string, filename string) (*model.FileInfo, *model.AppError)
- func (a *App) UploadFileX(c *request.Context, channelID, name string, input io.Reader, ...) (*model.FileInfo, *model.AppError)
- func (a *App) UploadFiles(c *request.Context, teamID string, channelID string, userID string, ...) (*model.FileUploadResponse, *model.AppError)
- func (a *App) UploadMultipartFiles(c *request.Context, teamID string, channelID string, userID string, ...) (*model.FileUploadResponse, *model.AppError)
- func (a *App) UpsertGroupMember(groupID string, userID string) (*model.GroupMember, *model.AppError)
- func (a *App) UpsertGroupSyncable(groupSyncable *model.GroupSyncable) (*model.GroupSyncable, *model.AppError)
- func (a *App) UserCanSeeOtherUser(userID string, otherUserId string) (bool, *model.AppError)
- func (a *App) UserIsInAdminRoleGroup(userID, syncableID string, syncableType model.GroupSyncableType) (bool, *model.AppError)
- func (a *App) VerifyEmailFromToken(userSuppliedTokenString string) *model.AppError
- func (a *App) VerifyPlugin(plugin, signature io.ReadSeeker) *model.AppError
- func (a *App) VerifyUserEmail(userID, email string) *model.AppError
- func (a *App) ViewChannel(view *model.ChannelView, userID string, currentSessionId string, ...) (map[string]int64, *model.AppError)
- func (a *App) WriteFile(fr io.Reader, path string) (int64, *model.AppError)
- type AppIface
- type AppOption
- type AppOptionCreator
- type AttachmentImportData
- type AutocompleteDynamicArgProvider
- type BulkExportOpts
- type Busy
- type ChannelImportData
- type ChannelMemberOpts
- type CheckConnResult
- type ClusterDiscoveryService
- type CommandProvider
- type ComparablePreference
- type DirectChannelImportData
- type DirectPostImportData
- type DriverImpl
- func (d *DriverImpl) Conn(isMaster bool) (string, error)
- func (d *DriverImpl) ConnClose(connID string) error
- func (d *DriverImpl) ConnExec(connID, q string, args []driver.NamedValue) (_ plugin.ResultContainer, err error)
- func (d *DriverImpl) ConnPing(connID string) error
- func (d *DriverImpl) ConnQuery(connID, q string, args []driver.NamedValue) (_ string, err error)
- func (d *DriverImpl) RowsClose(rowsID string) error
- func (d *DriverImpl) RowsColumnTypeDatabaseTypeName(rowsID string, index int) string
- func (d *DriverImpl) RowsColumnTypePrecisionScale(rowsID string, index int) (int64, int64, bool)
- func (d *DriverImpl) RowsColumns(rowsID string) []string
- func (d *DriverImpl) RowsHasNextResultSet(rowsID string) bool
- func (d *DriverImpl) RowsNext(rowsID string, dest []driver.Value) error
- func (d *DriverImpl) RowsNextResultSet(rowsID string) error
- func (d *DriverImpl) Stmt(connID, q string) (_ string, err error)
- func (d *DriverImpl) StmtClose(stID string) error
- func (d *DriverImpl) StmtExec(stID string, args []driver.NamedValue) (plugin.ResultContainer, error)
- func (d *DriverImpl) StmtNumInput(stID string) int
- func (d *DriverImpl) StmtQuery(stID string, args []driver.NamedValue) (string, error)
- func (d *DriverImpl) Tx(connID string, opts driver.TxOptions) (_ string, err error)
- func (d *DriverImpl) TxCommit(txID string) error
- func (d *DriverImpl) TxRollback(txID string) error
- type EmailBatchingJob
- type EmailService
- func (es *EmailService) AddNotificationEmailToBatch(user *model.User, post *model.Post, team *model.Team) *model.AppError
- func (es *EmailService) CreateVerifyEmailToken(userID string, newEmail string) (*model.Token, *model.AppError)
- func (es *EmailService) InitEmailBatching()
- func (es *EmailService) SendAtUserLimitWarningEmail(email string, locale string, siteURL string) (bool, *model.AppError)
- func (es *EmailService) SendCloudTrialEndWarningEmail(userEmail, name, trialEndDate, locale, siteURL string) *model.AppError
- func (es *EmailService) SendCloudTrialEndedEmail(userEmail, name, locale, siteURL string) *model.AppError
- func (es *EmailService) SendCloudWelcomeEmail(userEmail, locale, teamInviteID, workSpaceName, dns, siteURL string) *model.AppError
- func (es *EmailService) SendDeactivateAccountEmail(email string, locale, siteURL string) *model.AppError
- func (es *EmailService) SendInviteEmails(team *model.Team, senderName string, senderUserId string, invites []string, ...) *model.AppError
- func (es *EmailService) SendNoCardPaymentFailedEmail(email string, locale string, siteURL string) *model.AppError
- func (es *EmailService) SendOverUserFourteenDayWarningEmail(email string, locale string, siteURL string, overLimitDate string) (bool, *model.AppError)
- func (es *EmailService) SendOverUserLimitNinetyDayWarningEmail(email string, locale string, siteURL string, overLimitDate string) (bool, *model.AppError)
- func (es *EmailService) SendOverUserLimitThirtyDayWarningEmail(email string, locale string, siteURL string) (bool, *model.AppError)
- func (es *EmailService) SendOverUserLimitWarningEmail(email string, locale string, siteURL string) (bool, *model.AppError)
- func (es *EmailService) SendOverUserLimitWorkspaceSuspendedWarningEmail(email string, locale string, siteURL string) (bool, *model.AppError)
- func (es *EmailService) SendOverUserSevenDayWarningEmail(email string, locale string, siteURL string) (bool, *model.AppError)
- func (es *EmailService) SendPasswordResetEmail(email string, token *model.Token, locale, siteURL string) (bool, *model.AppError)
- func (es *EmailService) SendPaymentFailedEmail(email string, locale string, failedPayment *model.FailedPayment, ...) (bool, *model.AppError)
- func (es *EmailService) SendRemoveExpiredLicenseEmail(email string, locale, siteURL string) *model.AppError
- func (es *EmailService) SendSignInChangeEmail(email, method, locale, siteURL string) *model.AppError
- func (es *EmailService) SendSuspensionEmailToSupport(email string, installationID string, customerID string, subscriptionID string, ...) (bool, *model.AppError)
- func (es *EmailService) SendUpgradeEmail(user, email, locale, siteURL, action string) (bool, *model.AppError)
- type EmojiImportData
- type ExplicitMentions
- type Hub
- func (h *Hub) Broadcast(message *model.WebSocketEvent)
- func (h *Hub) CheckConn(userID, connectionID string) *CheckConnResult
- func (h *Hub) InvalidateUser(userID string)
- func (h *Hub) IsRegistered(userID, sessionToken string) bool
- func (h *Hub) Register(webConn *WebConn)
- func (h *Hub) SendMessage(conn *WebConn, msg model.WebSocketMessage)
- func (h *Hub) Start()
- func (h *Hub) Stop()
- func (h *Hub) Unregister(webConn *WebConn)
- func (h *Hub) UpdateActivity(userID, sessionToken string, activityAt int64)
- type JWTClaims
- type LineImportData
- func ImportLineForDirectPost(post *model.DirectPostForExport) *LineImportData
- func ImportLineForPost(post *model.PostForExport) *LineImportData
- func ImportLineFromChannel(channel *model.ChannelForExport) *LineImportData
- func ImportLineFromDirectChannel(channel *model.DirectChannelForExport) *LineImportData
- func ImportLineFromEmoji(emoji *model.Emoji, filePath string) *LineImportData
- func ImportLineFromTeam(team *model.TeamForExport) *LineImportData
- func ImportLineFromUser(user *model.User, exportedPrefs map[string]*string) *LineImportData
- type LineImportWorkerData
- type LineImportWorkerError
- type LocalResponseWriter
- type MailToLinkContent
- type MentionType
- type MockOptionRemoteClusterService
- type MockOptionSharedChannelService
- type Option
- type PluginAPI
- func (api *PluginAPI) AddChannelMember(channelID, userID string) (*model.ChannelMember, *model.AppError)
- func (api *PluginAPI) AddReaction(reaction *model.Reaction) (*model.Reaction, *model.AppError)
- func (api *PluginAPI) AddUserToChannel(channelID, userID, asUserID string) (*model.ChannelMember, *model.AppError)
- func (api *PluginAPI) CopyFileInfos(userID string, fileIDs []string) ([]string, *model.AppError)
- func (api *PluginAPI) CreateBot(bot *model.Bot) (*model.Bot, *model.AppError)
- func (api *PluginAPI) CreateChannel(channel *model.Channel) (*model.Channel, *model.AppError)
- func (api *PluginAPI) CreateCommand(cmd *model.Command) (*model.Command, error)
- func (api *PluginAPI) CreatePost(post *model.Post) (*model.Post, *model.AppError)
- func (api *PluginAPI) CreateTeam(team *model.Team) (*model.Team, *model.AppError)
- func (api *PluginAPI) CreateTeamMember(teamID, userID string) (*model.TeamMember, *model.AppError)
- func (api *PluginAPI) CreateTeamMembers(teamID string, userIDs []string, requestorId string) ([]*model.TeamMember, *model.AppError)
- func (api *PluginAPI) CreateTeamMembersGracefully(teamID string, userIDs []string, requestorId string) ([]*model.TeamMemberWithError, *model.AppError)
- func (api *PluginAPI) CreateUser(user *model.User) (*model.User, *model.AppError)
- func (api *PluginAPI) DeleteBotIconImage(userID string) *model.AppError
- func (api *PluginAPI) DeleteChannel(channelID string) *model.AppError
- func (api *PluginAPI) DeleteChannelMember(channelID, userID string) *model.AppError
- func (api *PluginAPI) DeleteCommand(commandID string) error
- func (api *PluginAPI) DeleteEphemeralPost(userID, postID string)
- func (api *PluginAPI) DeletePost(postID string) *model.AppError
- func (api *PluginAPI) DeletePreferencesForUser(userID string, preferences []model.Preference) *model.AppError
- func (api *PluginAPI) DeleteTeam(teamID string) *model.AppError
- func (api *PluginAPI) DeleteTeamMember(teamID, userID, requestorId string) *model.AppError
- func (api *PluginAPI) DeleteUser(userID string) *model.AppError
- func (api *PluginAPI) DisablePlugin(id string) *model.AppError
- func (api *PluginAPI) EnablePlugin(id string) *model.AppError
- func (api *PluginAPI) ExecuteSlashCommand(commandArgs *model.CommandArgs) (*model.CommandResponse, error)
- func (api *PluginAPI) GetBot(userID string, includeDeleted bool) (*model.Bot, *model.AppError)
- func (api *PluginAPI) GetBotIconImage(userID string) ([]byte, *model.AppError)
- func (api *PluginAPI) GetBots(options *model.BotGetOptions) ([]*model.Bot, *model.AppError)
- func (api *PluginAPI) GetBundlePath() (string, error)
- func (api *PluginAPI) GetChannel(channelID string) (*model.Channel, *model.AppError)
- func (api *PluginAPI) GetChannelByName(teamID, name string, includeDeleted bool) (*model.Channel, *model.AppError)
- func (api *PluginAPI) GetChannelByNameForTeamName(teamName, channelName string, includeDeleted bool) (*model.Channel, *model.AppError)
- func (api *PluginAPI) GetChannelMember(channelID, userID string) (*model.ChannelMember, *model.AppError)
- func (api *PluginAPI) GetChannelMembers(channelID string, page, perPage int) (*model.ChannelMembers, *model.AppError)
- func (api *PluginAPI) GetChannelMembersByIds(channelID string, userIDs []string) (*model.ChannelMembers, *model.AppError)
- func (api *PluginAPI) GetChannelMembersForUser(teamID, userID string, page, perPage int) ([]*model.ChannelMember, *model.AppError)
- func (api *PluginAPI) GetChannelStats(channelID string) (*model.ChannelStats, *model.AppError)
- func (api *PluginAPI) GetChannelsForTeamForUser(teamID, userID string, includeDeleted bool) ([]*model.Channel, *model.AppError)
- func (api *PluginAPI) GetCommand(commandID string) (*model.Command, error)
- func (api *PluginAPI) GetConfig() *model.Config
- func (api *PluginAPI) GetDiagnosticId() string
- func (api *PluginAPI) GetDirectChannel(userID1, userID2 string) (*model.Channel, *model.AppError)
- func (api *PluginAPI) GetEmoji(emojiId string) (*model.Emoji, *model.AppError)
- func (api *PluginAPI) GetEmojiByName(name string) (*model.Emoji, *model.AppError)
- func (api *PluginAPI) GetEmojiImage(emojiId string) ([]byte, string, *model.AppError)
- func (api *PluginAPI) GetEmojiList(sortBy string, page, perPage int) ([]*model.Emoji, *model.AppError)
- func (api *PluginAPI) GetFile(fileID string) ([]byte, *model.AppError)
- func (api *PluginAPI) GetFileInfo(fileID string) (*model.FileInfo, *model.AppError)
- func (api *PluginAPI) GetFileInfos(page, perPage int, opt *model.GetFileInfosOptions) ([]*model.FileInfo, *model.AppError)
- func (api *PluginAPI) GetFileLink(fileID string) (string, *model.AppError)
- func (api *PluginAPI) GetGroup(groupId string) (*model.Group, *model.AppError)
- func (api *PluginAPI) GetGroupByName(name string) (*model.Group, *model.AppError)
- func (api *PluginAPI) GetGroupChannel(userIDs []string) (*model.Channel, *model.AppError)
- func (api *PluginAPI) GetGroupMemberUsers(groupID string, page, perPage int) ([]*model.User, *model.AppError)
- func (api *PluginAPI) GetGroupsBySource(groupSource model.GroupSource) ([]*model.Group, *model.AppError)
- func (api *PluginAPI) GetGroupsForUser(userID string) ([]*model.Group, *model.AppError)
- func (api *PluginAPI) GetLDAPUserAttributes(userID string, attributes []string) (map[string]string, *model.AppError)
- func (api *PluginAPI) GetLicense() *model.License
- func (api *PluginAPI) GetPluginConfig() map[string]interface{}
- func (api *PluginAPI) GetPluginStatus(id string) (*model.PluginStatus, *model.AppError)
- func (api *PluginAPI) GetPlugins() ([]*model.Manifest, *model.AppError)
- func (api *PluginAPI) GetPost(postID string) (*model.Post, *model.AppError)
- func (api *PluginAPI) GetPostThread(postID string) (*model.PostList, *model.AppError)
- func (api *PluginAPI) GetPostsAfter(channelID, postID string, page, perPage int) (*model.PostList, *model.AppError)
- func (api *PluginAPI) GetPostsBefore(channelID, postID string, page, perPage int) (*model.PostList, *model.AppError)
- func (api *PluginAPI) GetPostsForChannel(channelID string, page, perPage int) (*model.PostList, *model.AppError)
- func (api *PluginAPI) GetPostsSince(channelID string, time int64) (*model.PostList, *model.AppError)
- func (api *PluginAPI) GetPreferencesForUser(userID string) ([]model.Preference, *model.AppError)
- func (api *PluginAPI) GetProfileImage(userID string) ([]byte, *model.AppError)
- func (api *PluginAPI) GetPublicChannelsForTeam(teamID string, page, perPage int) ([]*model.Channel, *model.AppError)
- func (api *PluginAPI) GetReactions(postID string) ([]*model.Reaction, *model.AppError)
- func (api *PluginAPI) GetServerVersion() string
- func (api *PluginAPI) GetSession(sessionID string) (*model.Session, *model.AppError)
- func (api *PluginAPI) GetSystemInstallDate() (int64, *model.AppError)
- func (api *PluginAPI) GetTeam(teamID string) (*model.Team, *model.AppError)
- func (api *PluginAPI) GetTeamByName(name string) (*model.Team, *model.AppError)
- func (api *PluginAPI) GetTeamIcon(teamID string) ([]byte, *model.AppError)
- func (api *PluginAPI) GetTeamMember(teamID, userID string) (*model.TeamMember, *model.AppError)
- func (api *PluginAPI) GetTeamMembers(teamID string, page, perPage int) ([]*model.TeamMember, *model.AppError)
- func (api *PluginAPI) GetTeamMembersForUser(userID string, page int, perPage int) ([]*model.TeamMember, *model.AppError)
- func (api *PluginAPI) GetTeamStats(teamID string) (*model.TeamStats, *model.AppError)
- func (api *PluginAPI) GetTeams() ([]*model.Team, *model.AppError)
- func (api *PluginAPI) GetTeamsForUser(userID string) ([]*model.Team, *model.AppError)
- func (api *PluginAPI) GetTeamsUnreadForUser(userID string) ([]*model.TeamUnread, *model.AppError)
- func (api *PluginAPI) GetTelemetryId() string
- func (api *PluginAPI) GetUnsanitizedConfig() *model.Config
- func (api *PluginAPI) GetUser(userID string) (*model.User, *model.AppError)
- func (api *PluginAPI) GetUserByEmail(email string) (*model.User, *model.AppError)
- func (api *PluginAPI) GetUserByUsername(name string) (*model.User, *model.AppError)
- func (api *PluginAPI) GetUserStatus(userID string) (*model.Status, *model.AppError)
- func (api *PluginAPI) GetUserStatusesByIds(userIDs []string) ([]*model.Status, *model.AppError)
- func (api *PluginAPI) GetUsers(options *model.UserGetOptions) ([]*model.User, *model.AppError)
- func (api *PluginAPI) GetUsersByUsernames(usernames []string) ([]*model.User, *model.AppError)
- func (api *PluginAPI) GetUsersInChannel(channelID, sortBy string, page, perPage int) ([]*model.User, *model.AppError)
- func (api *PluginAPI) GetUsersInTeam(teamID string, page int, perPage int) ([]*model.User, *model.AppError)
- func (api *PluginAPI) HasPermissionTo(userID string, permission *model.Permission) bool
- func (api *PluginAPI) HasPermissionToChannel(userID, channelID string, permission *model.Permission) bool
- func (api *PluginAPI) HasPermissionToTeam(userID, teamID string, permission *model.Permission) bool
- func (api *PluginAPI) InstallPlugin(file io.Reader, replace bool) (*model.Manifest, *model.AppError)
- func (api *PluginAPI) KVCompareAndDelete(key string, oldValue []byte) (bool, *model.AppError)
- func (api *PluginAPI) KVCompareAndSet(key string, oldValue, newValue []byte) (bool, *model.AppError)
- func (api *PluginAPI) KVDelete(key string) *model.AppError
- func (api *PluginAPI) KVDeleteAll() *model.AppError
- func (api *PluginAPI) KVGet(key string) ([]byte, *model.AppError)
- func (api *PluginAPI) KVList(page, perPage int) ([]string, *model.AppError)
- func (api *PluginAPI) KVSet(key string, value []byte) *model.AppError
- func (api *PluginAPI) KVSetWithExpiry(key string, value []byte, expireInSeconds int64) *model.AppError
- func (api *PluginAPI) KVSetWithOptions(key string, value []byte, options model.PluginKVSetOptions) (bool, *model.AppError)
- func (api *PluginAPI) ListBuiltInCommands() ([]*model.Command, error)
- func (api *PluginAPI) ListCommands(teamID string) ([]*model.Command, error)
- func (api *PluginAPI) ListCustomCommands(teamID string) ([]*model.Command, error)
- func (api *PluginAPI) ListPluginCommands(teamID string) ([]*model.Command, error)
- func (api *PluginAPI) LoadPluginConfiguration(dest interface{}) error
- func (api *PluginAPI) LogDebug(msg string, keyValuePairs ...interface{})
- func (api *PluginAPI) LogError(msg string, keyValuePairs ...interface{})
- func (api *PluginAPI) LogInfo(msg string, keyValuePairs ...interface{})
- func (api *PluginAPI) LogWarn(msg string, keyValuePairs ...interface{})
- func (api *PluginAPI) OpenInteractiveDialog(dialog model.OpenDialogRequest) *model.AppError
- func (api *PluginAPI) PatchBot(userID string, botPatch *model.BotPatch) (*model.Bot, *model.AppError)
- func (api *PluginAPI) PermanentDeleteBot(userID string) *model.AppError
- func (api *PluginAPI) PluginHTTP(request *http.Request) *http.Response
- func (api *PluginAPI) PublishPluginClusterEvent(ev model.PluginClusterEvent, opts model.PluginClusterEventSendOptions) error
- func (api *PluginAPI) PublishUserTyping(userID, channelID, parentId string) *model.AppError
- func (api *PluginAPI) PublishWebSocketEvent(event string, payload map[string]interface{}, ...)
- func (api *PluginAPI) ReadFile(path string) ([]byte, *model.AppError)
- func (api *PluginAPI) RegisterCommand(command *model.Command) error
- func (api *PluginAPI) RemovePlugin(id string) *model.AppError
- func (api *PluginAPI) RemoveReaction(reaction *model.Reaction) *model.AppError
- func (api *PluginAPI) RemoveTeamIcon(teamID string) *model.AppError
- func (api *PluginAPI) RequestTrialLicense(requesterID string, users int, termsAccepted bool, receiveEmailsAccepted bool) *model.AppError
- func (api *PluginAPI) SaveConfig(config *model.Config) *model.AppError
- func (api *PluginAPI) SavePluginConfig(pluginConfig map[string]interface{}) *model.AppError
- func (api *PluginAPI) SearchChannels(teamID string, term string) ([]*model.Channel, *model.AppError)
- func (api *PluginAPI) SearchPostsInTeam(teamID string, paramsList []*model.SearchParams) ([]*model.Post, *model.AppError)
- func (api *PluginAPI) SearchPostsInTeamForUser(teamID string, userID string, searchParams model.SearchParameter) (*model.PostSearchResults, *model.AppError)
- func (api *PluginAPI) SearchTeams(term string) ([]*model.Team, *model.AppError)
- func (api *PluginAPI) SearchUsers(search *model.UserSearch) ([]*model.User, *model.AppError)
- func (api *PluginAPI) SendEphemeralPost(userID string, post *model.Post) *model.Post
- func (api *PluginAPI) SendMail(to, subject, htmlBody string) *model.AppError
- func (api *PluginAPI) SetBotIconImage(userID string, data []byte) *model.AppError
- func (api *PluginAPI) SetProfileImage(userID string, data []byte) *model.AppError
- func (api *PluginAPI) SetTeamIcon(teamID string, data []byte) *model.AppError
- func (api *PluginAPI) SetUserStatusTimedDND(userID string, endTime int64) (*model.Status, *model.AppError)
- func (api *PluginAPI) UnregisterCommand(teamID, trigger string) error
- func (api *PluginAPI) UpdateBotActive(userID string, active bool) (*model.Bot, *model.AppError)
- func (api *PluginAPI) UpdateChannel(channel *model.Channel) (*model.Channel, *model.AppError)
- func (api *PluginAPI) UpdateChannelMemberNotifications(channelID, userID string, notifications map[string]string) (*model.ChannelMember, *model.AppError)
- func (api *PluginAPI) UpdateChannelMemberRoles(channelID, userID, newRoles string) (*model.ChannelMember, *model.AppError)
- func (api *PluginAPI) UpdateCommand(commandID string, updatedCmd *model.Command) (*model.Command, error)
- func (api *PluginAPI) UpdateEphemeralPost(userID string, post *model.Post) *model.Post
- func (api *PluginAPI) UpdatePost(post *model.Post) (*model.Post, *model.AppError)
- func (api *PluginAPI) UpdatePreferencesForUser(userID string, preferences []model.Preference) *model.AppError
- func (api *PluginAPI) UpdateTeam(team *model.Team) (*model.Team, *model.AppError)
- func (api *PluginAPI) UpdateTeamMemberRoles(teamID, userID, newRoles string) (*model.TeamMember, *model.AppError)
- func (api *PluginAPI) UpdateUser(user *model.User) (*model.User, *model.AppError)
- func (api *PluginAPI) UpdateUserActive(userID string, active bool) *model.AppError
- func (api *PluginAPI) UpdateUserStatus(userID, status string) (*model.Status, *model.AppError)
- func (api *PluginAPI) UploadFile(data []byte, channelID string, filename string) (*model.FileInfo, *model.AppError)
- type PluginCommand
- type PluginResponseWriter
- type PostImportData
- type PostNotification
- type PushNotification
- type PushNotificationsHub
- type RateLimiter
- func (rl *RateLimiter) GenerateKey(r *http.Request) string
- func (rl *RateLimiter) RateLimitHandler(wrappedHandler http.Handler) http.Handler
- func (rl *RateLimiter) RateLimitWriter(key string, w http.ResponseWriter) bool
- func (rl *RateLimiter) UserIdRateLimit(userID string, w http.ResponseWriter) bool
- type ReactionImportData
- type ReplyImportData
- type RoleImportData
- type SchemeImportData
- type Server
- func (s *Server) AddClusterLeaderChangedListener(listener func()) string
- func (s *Server) AddConfigListener(listener func(*model.Config, *model.Config)) string
- func (s *Server) AddLicenseListener(listener func(oldLicense, newLicense *model.License)) string
- func (s *Server) AppOptions() []AppOption
- func (s *Server) AsymmetricSigningKey() *ecdsa.PrivateKey
- func (s *Server) CanIUpgradeToE0() error
- func (s *Server) ClientConfigHash() string
- func (s *Server) ClientConfigWithComputed() map[string]string
- func (s *Server) ClientLicense() map[string]string
- func (s *Server) ClusterHealthScore() int
- func (s *Server) Config() *model.Config
- func (s *Server) DatabaseTypeAndMattermostVersion() (string, string)
- func (s *Server) DoSecurityUpdateCheck()
- func (s *Server) EnvironmentConfig(filter func(reflect.StructField) bool) map[string]interface{}
- func (s *Server) FileBackend() (filestore.FileBackend, *model.AppError)
- func (s *Server) GenerateLicenseRenewalLink() (string, *model.AppError)
- func (s *Server) GenerateRenewalToken(expiration time.Duration) (string, *model.AppError)
- func (s *Server) GetDefaultProfileImage(user *model.User) ([]byte, *model.AppError)
- func (s *Server) GetHubForUserId(userID string) *Hub
- func (s *Server) GetLogger() mlog.LoggerIFace
- func (s *Server) GetLogs(page, perPage int) ([]string, *model.AppError)
- func (s *Server) GetLogsSkipSend(page, perPage int) ([]string, *model.AppError)
- func (s *Server) GetMessageForNotification(post *model.Post, translateFunc i18n.TranslateFunc) string
- func (s *Server) GetMetrics() einterfaces.MetricsInterface
- func (s *Server) GetPluginStatus(id string) (*model.PluginStatus, *model.AppError)
- func (s *Server) GetPluginStatuses() (model.PluginStatuses, *model.AppError)
- func (s *Server) GetPluginsEnvironment() *plugin.Environment
- func (s *Server) GetProfileImage(user *model.User) ([]byte, bool, *model.AppError)
- func (s *Server) GetRemoteClusterService() remotecluster.RemoteClusterServiceIFace
- func (s *Server) GetRoleByName(ctx context.Context, name string) (*model.Role, *model.AppError)
- func (s *Server) GetSanitizedClientLicense() map[string]string
- func (s *Server) GetSchemes(scope string, offset int, limit int) ([]*model.Scheme, *model.AppError)
- func (s *Server) GetSharedChannelSyncService() SharedChannelServiceIFace
- func (s *Server) GetStore() store.Store
- func (s *Server) Go(f func())
- func (s *Server) HandleMetrics(route string, h http.Handler)
- func (s *Server) HttpService() httpservice.HTTPService
- func (s *Server) HubStop()
- func (s *Server) InitMetricsRouter() error
- func (s *Server) InvalidateAllCaches() *model.AppError
- func (s *Server) InvalidateAllCachesSkipSend()
- func (s *Server) InvokeClusterLeaderChangedListeners()
- func (s *Server) IsLeader() bool
- func (s *Server) IsPhase2MigrationCompleted() *model.AppError
- func (s *Server) License() *model.License
- func (s *Server) LoadLicense()
- func (s *Server) MailServiceConfig() *mail.SMTPConfig
- func (s *Server) MaxPostSize() int
- func (s *Server) NewClusterDiscoveryService() *ClusterDiscoveryService
- func (s *Server) PostActionCookieSecret() []byte
- func (s *Server) Publish(message *model.WebSocketEvent)
- func (s *Server) PublishSkipClusterSend(event *model.WebSocketEvent)
- func (s *Server) ReadFile(path string) ([]byte, *model.AppError)
- func (s *Server) ReloadConfig() error
- func (s *Server) RemoveClusterLeaderChangedListener(id string)
- func (s *Server) RemoveConfigListener(id string)
- func (s *Server) RemoveLicense() *model.AppError
- func (s *Server) RemoveLicenseListener(id string)
- func (s *Server) RequestTrialLicense(trialRequest *model.TrialLicenseRequest) *model.AppError
- func (s *Server) Restart() error
- func (s *Server) SaveConfig(newCfg *model.Config, sendConfigChangeClusterMessage bool) (*model.Config, *model.Config, *model.AppError)
- func (s *Server) SaveLicense(licenseBytes []byte) (*model.License, *model.AppError)
- func (s *Server) ServePluginPublicRequest(w http.ResponseWriter, r *http.Request)
- func (s *Server) ServePluginRequest(w http.ResponseWriter, r *http.Request)
- func (s *Server) SetClientLicense(m map[string]string)
- func (s *Server) SetLicense(license *model.License) bool
- func (s *Server) SetLog(l *mlog.Logger)
- func (s *Server) SetRemoteClusterService(remoteClusterService remotecluster.RemoteClusterServiceIFace)
- func (s *Server) SetSharedChannelSyncService(sharedChannelService SharedChannelServiceIFace)
- func (s *Server) SetupMetricsServer()
- func (s *Server) SharedChannelSyncHandler(event *model.WebSocketEvent)
- func (s *Server) ShutDownPlugins()
- func (s *Server) Shutdown()
- func (s *Server) Start() error
- func (s *Server) StartSearchEngine() (string, string)
- func (s *Server) StopHTTPServer()
- func (s *Server) StopMetricsServer()
- func (s *Server) StopPushNotificationsHubWorkers()
- func (s *Server) TelemetryId() string
- func (s *Server) TemplatesContainer() *templates.Container
- func (s *Server) TotalWebsocketConnections() int
- func (s *Server) UpdateConfig(f func(*model.Config))
- func (s *Server) UpgradeToE0() error
- func (s *Server) UpgradeToE0Status() (int64, error)
- func (s *Server) ValidateAndSetLicenseBytes(b []byte) bool
- func (s *Server) WaitForGoroutines()
- type SharedChannelServiceIFace
- type TeamImportData
- type TokenLocation
- type UploadFileTask
- type UserChannelImportData
- type UserChannelNotifyPropsImportData
- type UserImportData
- type UserNotifyPropsImportData
- type UserTeamImportData
- type WebConn
- func (wc *WebConn) Close()
- func (wc *WebConn) GetConnectionID() string
- func (wc *WebConn) GetSession() *model.Session
- func (wc *WebConn) GetSessionExpiresAt() int64
- func (wc *WebConn) GetSessionToken() string
- func (wc *WebConn) InvalidateCache()
- func (wc *WebConn) IsAuthenticated() bool
- func (wc *WebConn) Pump()
- func (wc *WebConn) SetConnectionID(id string)
- func (wc *WebConn) SetSession(v *model.Session)
- func (wc *WebConn) SetSessionExpiresAt(v int64)
- func (wc *WebConn) SetSessionToken(v string)
- type WebConnConfig
- type WebSocketRouter
Constants ¶
const ( DayMilliseconds = 24 * 60 * 60 * 1000 MonthMilliseconds = 31 * DayMilliseconds )
const ( RestLevelID = 240 RestContentLevelID = 241 RestPermsLevelID = 242 CLILevelID = 243 )
const ( BrandFilePath = "brand/" BrandFileName = "image.png" )
const ( MaxEmojiFileSize = 1 << 20 // 1 MB MaxEmojiWidth = 128 MaxEmojiHeight = 128 MaxEmojiOriginalWidth = 1028 MaxEmojiOriginalHeight = 1028 )
const ( LicenseEnv = "MM_LICENSE" LicenseRenewalURL = "https://customers.mattermost.com/subscribe/renew" JWTDefaultTokenExpiration = 7 * 24 * time.Hour // 7 days of expiration )
const ( OauthCookieMaxAgeSeconds = 30 * 60 // 30 minutes CookieOauth = "MMOAUTH" OpenIDScope = "openid" )
const ( PermissionManageSystem = "manage_system" PermissionManageTeam = "manage_team" PermissionManageEmojis = "manage_emojis" PermissionManageOthersEmojis = "manage_others_emojis" PermissionCreateEmojis = "create_emojis" PermissionDeleteEmojis = "delete_emojis" PermissionDeleteOthersEmojis = "delete_others_emojis" PermissionManageWebhooks = "manage_webhooks" PermissionManageOthersWebhooks = "manage_others_webhooks" PermissionManageIncomingWebhooks = "manage_incoming_webhooks" PermissionManageOthersIncomingWebhooks = "manage_others_incoming_webhooks" PermissionManageOutgoingWebhooks = "manage_outgoing_webhooks" PermissionManageOthersOutgoingWebhooks = "manage_others_outgoing_webhooks" PermissionListPublicTeams = "list_public_teams" PermissionListPrivateTeams = "list_private_teams" PermissionJoinPublicTeams = "join_public_teams" PermissionJoinPrivateTeams = "join_private_teams" PermissionPermanentDeleteUser = "permanent_delete_user" PermissionCreateBot = "create_bot" PermissionReadBots = "read_bots" PermissionReadOthersBots = "read_others_bots" PermissionManageBots = "manage_bots" PermissionManageOthersBots = "manage_others_bots" PermissionDeletePublicChannel = "delete_public_channel" PermissionDeletePrivateChannel = "delete_private_channel" PermissionManagePublicChannelProperties = "manage_public_channel_properties" PermissionManagePrivateChannelProperties = "manage_private_channel_properties" PermissionConvertPublicChannelToPrivate = "convert_public_channel_to_private" PermissionConvertPrivateChannelToPublic = "convert_private_channel_to_public" PermissionViewMembers = "view_members" PermissionInviteUser = "invite_user" PermissionInviteGuest = "invite_guest" PermissionPromoteGuest = "promote_guest" PermissionDemoteToGuest = "demote_to_guest" PermissionUseChannelMentions = "use_channel_mentions" PermissionCreatePost = "create_post" PermissionCreatePost_PUBLIC = "create_post_public" PermissionUseGroupMentions = "use_group_mentions" PermissionAddReaction = "add_reaction" PermissionRemoveReaction = "remove_reaction" PermissionManagePublicChannelMembers = "manage_public_channel_members" PermissionManagePrivateChannelMembers = "manage_private_channel_members" PermissionReadJobs = "read_jobs" PermissionManageJobs = "manage_jobs" PermissionReadOtherUsersTeams = "read_other_users_teams" PermissionEditOtherUsers = "edit_other_users" PermissionReadPublicChannelGroups = "read_public_channel_groups" PermissionReadPrivateChannelGroups = "read_private_channel_groups" PermissionEditBrand = "edit_brand" PermissionManageSecureConnections = "manage_secure_connections" PermissionManageRemoteClusters = "manage_remote_clusters" // deprecated; use `manage_secure_connections` )
const ( PendingPostIDsCacheSize = 25000 PendingPostIDsCacheTTL = 30 * time.Second PageDefault = 0 )
const ( SamlPublicCertificateName = "saml-public.crt" SamlPrivateKeyName = "saml-private.key" SamlIdpCertificateName = "saml-idp.crt" )
const ( PropSecurityURL = "https://securityupdatecheck.mattermost.com" SecurityUpdatePeriod = 86400000 // 24 hours in milliseconds. PropSecurityID = "id" PropSecurityBuild = "b" PropSecurityEnterpriseReady = "be" PropSecurityDatabase = "db" PropSecurityOS = "os" PropSecurityUserCount = "uc" PropSecurityTeamCount = "tc" PropSecurityActiveUserCount = "auc" PropSecurityUnitTests = "ut" )
const ( TokenTypePasswordRecovery = "password_recovery" TokenTypeVerifyEmail = "verify_email" TokenTypeTeamInvitation = "team_invitation" TokenTypeGuestInvitation = "guest_invitation" TokenTypeCWSAccess = "cws_access_token" PasswordRecoverExpiryTime = 1000 * 60 * 60 // 1 hour InvitationExpiryTime = 1000 * 60 * 60 * 48 // 48 hours ImageProfilePixelDimension = 128 )
const ( TriggerwordsExactMatch = 0 TriggerwordsStartsWith = 1 MaxIntegrationResponseSize = 1024 * 1024 // Posts can be <100KB at most, so this is likely more than enough )
const (
CmdCustomStatusTrigger = "status"
)
const ContentExtractionConfigDefaultTrueMigrationKey = "ContentExtractionConfigDefaultTrueMigrationComplete"
const (
DiscoveryServiceWritePing = 60 * time.Second
)
const (
EmailBatchingTaskName = "Email Batching"
)
const EmojisPermissionsMigrationKey = "EmojisPermissionsMigrationComplete"
const (
ErrorTermsOfServiceNoRowsFound = "app.terms_of_service.get.no_rows.app_error"
)
const ExportDataDir = "data"
ExportDataDir is the name of the directory were to store additional data included with the export (e.g. file attachments).
const GuestRolesCreationMigrationKey = "GuestRolesCreationMigrationComplete"
const ( // HTTPRequestTimeout defines a high timeout for downloading large files // from an external URL to avoid slow connections from failing to install. HTTPRequestTimeout = 1 * time.Hour )
const IncompleteUploadSuffix = ".tmp"
const LinkCacheDuration = 1 * time.Hour
const LinkCacheSize = 10000
const MaxMetadataImageSize = MaxOpenGraphResponseSize
const MaxOpenGraphResponseSize = 1024 * 1024 * 50
const MaxRepeatViewings = 3
const MinSecondsBetweenRepeatViewings = 60 * 60
const MissingAccountError = "app.user.missing_account.const"
const MissingAuthAccountError = "app.user.get_by_auth.missing_account.app_error"
const MissingChannelMemberError = "app.channel.get_member.missing.app_error"
const (
OneHourMillis = 60 * 60 * 1000
)
const (
SessionsCleanupBatchSize = 1000
)
const SystemConsoleRolesCreationMigrationKey = "SystemConsoleRolesCreationMigrationComplete"
const TimeToWaitForConnectionsToCloseOnServerShutdown = time.Second
const (
TimestampFormat = "Mon Jan 2 15:04:05 -0700 MST 2006"
)
Variables ¶
var ( LevelAPI = mlog.LvlAuditAPI LevelContent = mlog.LvlAuditContent LevelPerms = mlog.LvlAuditPerms LevelCLI = mlog.LvlAuditCLI )
var MaxNotificationsPerChannelDefault int64 = 1000000
var SentryDSN = "placeholder_sentry_dsn"
declaring this as var to allow overriding in tests
Functions ¶
func GeneratePublicLinkHash ¶
func GetProtocol ¶
func IsCWSLogin ¶ added in v5.28.0
func JoinCluster ¶
func NewMockRemoteClusterService ¶ added in v5.35.0
func NewMockRemoteClusterService(service remotecluster.RemoteClusterServiceIFace, options ...MockOptionRemoteClusterService) *mockRemoteClusterService
func NewMockSharedChannelService ¶ added in v5.35.0
func NewMockSharedChannelService(service SharedChannelServiceIFace, options ...MockOptionSharedChannelService) *mockSharedChannelService
func RegisterAccountMigrationInterface ¶
func RegisterAccountMigrationInterface(f func(*Server) einterfaces.AccountMigrationInterface)
func RegisterCloudInterface ¶ added in v5.30.0
func RegisterCloudInterface(f func(*Server) einterfaces.CloudInterface)
func RegisterClusterInterface ¶
func RegisterClusterInterface(f func(*Server) einterfaces.ClusterInterface)
func RegisterCommandProvider ¶
func RegisterCommandProvider(newProvider CommandProvider)
func RegisterComplianceInterface ¶
func RegisterComplianceInterface(f func(*Server) einterfaces.ComplianceInterface)
func RegisterDataRetentionInterface ¶
func RegisterDataRetentionInterface(f func(*Server) einterfaces.DataRetentionInterface)
func RegisterElasticsearchInterface ¶
func RegisterElasticsearchInterface(f func(*Server) searchengine.SearchEngineInterface)
func RegisterJobsActiveUsersInterface ¶ added in v5.28.0
func RegisterJobsActiveUsersInterface(f func(*Server) tjobs.ActiveUsersJobInterface)
func RegisterJobsBleveIndexerInterface ¶ added in v5.24.0
func RegisterJobsBleveIndexerInterface(f func(*Server) tjobs.IndexerJobInterface)
func RegisterJobsCloudInterface ¶ added in v5.30.0
func RegisterJobsCloudInterface(f func(*Server) ejobs.CloudJobInterface)
func RegisterJobsDataRetentionJobInterface ¶
func RegisterJobsDataRetentionJobInterface(f func(*Server) ejobs.DataRetentionJobInterface)
func RegisterJobsElasticsearchAggregatorInterface ¶
func RegisterJobsElasticsearchAggregatorInterface(f func(*Server) ejobs.ElasticsearchAggregatorInterface)
func RegisterJobsElasticsearchIndexerInterface ¶
func RegisterJobsElasticsearchIndexerInterface(f func(*Server) tjobs.IndexerJobInterface)
func RegisterJobsExpiryNotifyJobInterface ¶ added in v5.26.0
func RegisterJobsExpiryNotifyJobInterface(f func(*Server) tjobs.ExpiryNotifyJobInterface)
func RegisterJobsExportDeleteInterface ¶ added in v5.33.0
func RegisterJobsExportDeleteInterface(f func(*Server) tjobs.ExportDeleteInterface)
func RegisterJobsExportProcessInterface ¶ added in v5.33.0
func RegisterJobsExportProcessInterface(f func(*Server) tjobs.ExportProcessInterface)
func RegisterJobsImportDeleteInterface ¶ added in v5.33.0
func RegisterJobsImportDeleteInterface(f func(*Server) tjobs.ImportDeleteInterface)
func RegisterJobsImportProcessInterface ¶ added in v5.32.0
func RegisterJobsImportProcessInterface(f func(*Server) tjobs.ImportProcessInterface)
func RegisterJobsLdapSyncInterface ¶
func RegisterJobsLdapSyncInterface(f func(*Server) ejobs.LdapSyncInterface)
func RegisterJobsMessageExportJobInterface ¶
func RegisterJobsMessageExportJobInterface(f func(*Server) ejobs.MessageExportJobInterface)
func RegisterJobsMigrationsJobInterface ¶
func RegisterJobsMigrationsJobInterface(f func(*Server) tjobs.MigrationsJobInterface)
func RegisterJobsPluginsJobInterface ¶
func RegisterJobsPluginsJobInterface(f func(*Server) tjobs.PluginsJobInterface)
func RegisterJobsResendInvitationEmailInterface ¶ added in v5.35.0
func RegisterJobsResendInvitationEmailInterface(f func(*Server) ejobs.ResendInvitationEmailJobInterface)
RegisterJobsResendInvitationEmailInterface is used to register or initialize the jobsResendInvitationEmailInterface
func RegisterLdapInterface ¶
func RegisterLdapInterface(f func(*Server) einterfaces.LdapInterface)
func RegisterLicenseInterface ¶ added in v5.37.0
func RegisterLicenseInterface(f func(*Server) einterfaces.LicenseInterface)
func RegisterMessageExportInterface ¶
func RegisterMessageExportInterface(f func(*Server) einterfaces.MessageExportInterface)
func RegisterMetricsInterface ¶
func RegisterMetricsInterface(f func(*Server) einterfaces.MetricsInterface)
func RegisterNewSamlInterface ¶ added in v5.20.0
func RegisterNewSamlInterface(f func(*Server) einterfaces.SamlInterface)
func RegisterNotificationInterface ¶
func RegisterNotificationInterface(f func(*Server) einterfaces.NotificationInterface)
func RegisterProductNoticesJobInterface ¶ added in v5.28.0
func RegisterProductNoticesJobInterface(f func(*Server) tjobs.ProductNoticesJobInterface)
func RemoveRoles ¶
func RunEssentialJobs ¶ added in v5.35.0
func SplitWebhookPost ¶
func StartMetrics ¶
func StartSearchEngine ¶ added in v5.22.0
func UploadFileSetClientId ¶
func UploadFileSetClientId(clientId string) func(t *UploadFileTask)
func UploadFileSetContentLength ¶
func UploadFileSetContentLength(contentLength int64) func(t *UploadFileTask)
func UploadFileSetRaw ¶
func UploadFileSetRaw() func(t *UploadFileTask)
func UploadFileSetTeamId ¶
func UploadFileSetTeamId(teamID string) func(t *UploadFileTask)
func UploadFileSetTimestamp ¶
func UploadFileSetTimestamp(timestamp time.Time) func(t *UploadFileTask)
func UploadFileSetUserId ¶
func UploadFileSetUserId(userID string) func(t *UploadFileTask)
Types ¶
type App ¶
type App struct {
// contains filtered or unexported fields
}
func (*App) AccountMigration ¶
func (a *App) AccountMigration() einterfaces.AccountMigrationInterface
func (*App) AddChannelMember ¶
func (a *App) AddChannelMember(c *request.Context, userID string, channel *model.Channel, opts ChannelMemberOpts) (*model.ChannelMember, *model.AppError)
AddChannelMember adds a user to a channel. It is a wrapper over AddUserToChannel.
func (*App) AddChannelsToRetentionPolicy ¶ added in v5.36.0
func (*App) AddConfigListener ¶
func (*App) AddCursorIdsForPostList ¶
func (a *App) AddCursorIdsForPostList(originalList *model.PostList, afterPost, beforePost string, since int64, page, perPage int, collapsedThreads bool)
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.
func (*App) AddDirectChannels ¶
func (*App) AddLdapPrivateCertificate ¶ added in v5.28.0
func (a *App) AddLdapPrivateCertificate(fileData *multipart.FileHeader) *model.AppError
func (*App) AddLdapPublicCertificate ¶ added in v5.28.0
func (a *App) AddLdapPublicCertificate(fileData *multipart.FileHeader) *model.AppError
func (*App) AddPublicKey ¶
AddPublicKey will add plugin public key to the config. Overwrites the previous file
func (*App) AddRemoteCluster ¶ added in v5.35.0
func (a *App) AddRemoteCluster(rc *model.RemoteCluster) (*model.RemoteCluster, *model.AppError)
func (*App) AddSamlIdpCertificate ¶
func (a *App) AddSamlIdpCertificate(fileData *multipart.FileHeader) *model.AppError
func (*App) AddSamlPrivateCertificate ¶
func (a *App) AddSamlPrivateCertificate(fileData *multipart.FileHeader) *model.AppError
func (*App) AddSamlPublicCertificate ¶
func (a *App) AddSamlPublicCertificate(fileData *multipart.FileHeader) *model.AppError
func (*App) AddSessionToCache ¶
func (*App) AddStatusCache ¶
func (*App) AddStatusCacheSkipClusterSend ¶
func (*App) AddTeamMember ¶
func (*App) AddTeamMemberByInviteId ¶
func (*App) AddTeamMemberByToken ¶
func (*App) AddTeamMembers ¶
func (*App) AddTeamsToRetentionPolicy ¶ added in v5.36.0
func (*App) AddUserToChannel ¶
func (a *App) AddUserToChannel(user *model.User, channel *model.Channel, skipTeamMemberIntegrityCheck bool) (*model.ChannelMember, *model.AppError)
AddUserToChannel adds a user to a given channel.
func (*App) AddUserToTeam ¶
func (*App) AddUserToTeamByInviteId ¶
func (*App) AddUserToTeamByTeamId ¶
func (*App) AddUserToTeamByToken ¶
func (*App) AdjustImage ¶ added in v5.24.0
func (*App) AllowOAuthAppAccessToUser ¶
func (*App) AppendFile ¶ added in v5.28.0
func (*App) AsymmetricSigningKey ¶
func (a *App) AsymmetricSigningKey() *ecdsa.PrivateKey
func (*App) AttachDeviceId ¶
func (*App) AttachSessionCookies ¶
func (*App) AuthenticateUserForLogin ¶
func (*App) AuthorizeOAuthUser ¶
func (*App) AutocompleteChannels ¶
func (*App) AutocompleteChannelsForSearch ¶
func (*App) AutocompleteUsersInChannel ¶
func (a *App) AutocompleteUsersInChannel(teamID string, channelID string, term string, options *model.UserSearchOptions) (*model.UserAutocompleteInChannel, *model.AppError)
func (*App) AutocompleteUsersInTeam ¶
func (a *App) AutocompleteUsersInTeam(teamID string, term string, options *model.UserSearchOptions) (*model.UserAutocompleteInTeam, *model.AppError)
func (*App) BroadcastStatus ¶
func (*App) BuildPostReactions ¶
func (a *App) BuildPostReactions(postID string) (*[]ReactionImportData, *model.AppError)
func (*App) BuildPushNotificationMessage ¶
func (*App) BuildSamlMetadataObject ¶ added in v5.20.0
func (*App) BulkExport ¶
func (*App) BulkImport ¶
func (*App) BulkImportWithPath ¶ added in v5.32.0
func (*App) ChannelMembersMinusGroupMembers ¶
func (a *App) ChannelMembersMinusGroupMembers(channelID string, groupIDs []string, page, perPage int) ([]*model.UserWithGroups, int64, *model.AppError)
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.
func (*App) ChannelMembersToAdd ¶
func (a *App) ChannelMembersToAdd(since int64, channelID *string, includeRemovedMembers bool) ([]*model.UserChannelIDPair, *model.AppError)
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.
func (*App) ChannelMembersToRemove ¶
func (*App) CheckAndSendUserLimitWarningEmails ¶ added in v5.30.0
func (*App) CheckCanInviteToSharedChannel ¶ added in v5.35.0
func (*App) CheckCloudAccountAtLimit ¶ added in v5.37.0
func (*App) CheckForClientSideCert ¶
func (*App) CheckIntegrity ¶ added in v5.37.0
func (a *App) CheckIntegrity() <-chan model.IntegrityCheckResult
func (*App) CheckMandatoryS3Fields ¶ added in v5.32.0
func (a *App) CheckMandatoryS3Fields(settings *model.FileSettings) *model.AppError
func (*App) CheckPasswordAndAllCriteria ¶
func (*App) CheckProviderAttributes ¶ added in v5.35.0
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.
func (*App) CheckUserAllAuthenticationCriteria ¶
func (*App) CheckUserMfa ¶
func (*App) CheckUserPostflightAuthenticationCriteria ¶
func (*App) CheckUserPreflightAuthenticationCriteria ¶
func (*App) CheckValidDomains ¶ added in v5.24.0
func (*App) CheckWebConn ¶ added in v5.36.0
func (a *App) CheckWebConn(userID, connectionID string) *CheckConnResult
func (*App) ClearChannelMembersCache ¶ added in v5.20.0
func (*App) ClearSessionCacheForAllUsers ¶
func (a *App) ClearSessionCacheForAllUsers()
func (*App) ClearSessionCacheForAllUsersSkipClusterSend ¶
func (a *App) ClearSessionCacheForAllUsersSkipClusterSend()
func (*App) ClearSessionCacheForUser ¶
func (*App) ClearSessionCacheForUserSkipClusterSend ¶
func (*App) ClearTeamMembersCache ¶ added in v5.20.0
func (*App) ClientConfig ¶
func (*App) ClientConfigHash ¶
func (*App) ClientConfigWithComputed ¶
ClientConfigWithComputed gets the configuration in a format suitable for sending to the client.
func (*App) Cloud ¶ added in v5.30.0
func (a *App) Cloud() einterfaces.CloudInterface
func (*App) Cluster ¶
func (a *App) Cluster() einterfaces.ClusterInterface
func (*App) CompareAndDeletePluginKey ¶
func (*App) CompareAndSetPluginKey ¶
func (*App) CompleteOAuth ¶
func (*App) CompleteSwitchWithOAuth ¶
func (*App) Compliance ¶
func (a *App) Compliance() einterfaces.ComplianceInterface
func (*App) ConvertBotToUser ¶ added in v5.26.0
func (a *App) ConvertBotToUser(bot *model.Bot, userPatch *model.UserPatch, sysadmin bool) (*model.User, *model.AppError)
ConvertBotToUser converts a bot to user.
func (*App) ConvertUserToBot ¶
ConvertUserToBot converts a user to bot.
func (*App) CopyFileInfos ¶
func (*App) CreateChannel ¶
func (*App) CreateChannelScheme ¶ added in v5.22.0
CreateChannelScheme creates a new Scheme of scope channel and assigns it to the channel.
func (*App) CreateChannelWithUser ¶
func (*App) CreateCommand ¶
func (*App) CreateCommandPost ¶
func (a *App) CreateCommandPost(c *request.Context, post *model.Post, teamID string, response *model.CommandResponse, skipSlackParsing bool) (*model.Post, *model.AppError)
@openTracingParams teamID, skipSlackParsing
func (*App) CreateCommandWebhook ¶
func (a *App) CreateCommandWebhook(commandID string, args *model.CommandArgs) (*model.CommandWebhook, *model.AppError)
func (*App) CreateDefaultChannels ¶
func (a *App) CreateDefaultChannels(c *request.Context, teamID string) ([]*model.Channel, *model.AppError)
CreateDefaultChannels creates channels in the given team for each channel returned by (*App).DefaultChannelNames.
func (*App) CreateDefaultMemberships ¶
func (a *App) CreateDefaultMemberships(c *request.Context, since int64, includeRemovedMembers bool) error
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. 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.
func (*App) CreateEmoji ¶
func (*App) CreateGroup ¶
func (*App) CreateGroupChannel ¶
func (*App) CreateGuest ¶
CreateGuest creates a guest and sets several fields of the returned User struct to their zero values.
func (*App) CreateIncomingWebhookForChannel ¶
func (a *App) CreateIncomingWebhookForChannel(creatorId string, channel *model.Channel, hook *model.IncomingWebhook) (*model.IncomingWebhook, *model.AppError)
func (*App) CreateOAuthApp ¶
func (*App) CreateOAuthStateToken ¶
func (*App) CreateOAuthUser ¶
func (*App) CreateOutgoingWebhook ¶
func (a *App) CreateOutgoingWebhook(hook *model.OutgoingWebhook) (*model.OutgoingWebhook, *model.AppError)
func (*App) CreatePasswordRecoveryToken ¶
func (*App) CreatePost ¶
func (*App) CreatePostAsUser ¶
func (*App) CreatePostMissingChannel ¶
func (*App) CreateRetentionPolicy ¶ added in v5.36.0
func (a *App) CreateRetentionPolicy(policy *model.RetentionPolicyWithTeamAndChannelIDs) (*model.RetentionPolicyWithTeamAndChannelCounts, *model.AppError)
func (*App) CreateScheme ¶
func (*App) CreateSession ¶
func (*App) CreateSidebarCategory ¶ added in v5.26.0
func (a *App) CreateSidebarCategory(userID, teamID string, newCategory *model.SidebarCategoryWithChannels) (*model.SidebarCategoryWithChannels, *model.AppError)
func (*App) CreateTeam ¶
func (*App) CreateTeamWithUser ¶
func (*App) CreateTermsOfService ¶
func (*App) CreateUploadSession ¶ added in v5.28.0
func (a *App) CreateUploadSession(us *model.UploadSession) (*model.UploadSession, *model.AppError)
func (*App) CreateUser ¶
CreateUser creates a user and sets several fields of the returned User struct to their zero values.
func (*App) CreateUserAccessToken ¶
func (a *App) CreateUserAccessToken(token *model.UserAccessToken) (*model.UserAccessToken, *model.AppError)
func (*App) CreateUserAsAdmin ¶
func (*App) CreateUserFromSignup ¶
func (*App) CreateUserWithInviteId ¶
func (*App) CreateUserWithToken ¶
func (*App) CreateWebhookPost ¶
func (*App) CreateZipFileAndAddFiles ¶ added in v5.33.0
func (a *App) CreateZipFileAndAddFiles(fileBackend filestore.FileBackend, fileDatas []model.FileData, zipFileName, directory string) error
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
func (*App) DBHealthCheckDelete ¶ added in v5.30.0
func (*App) DBHealthCheckWrite ¶ added in v5.30.0
func (*App) DataRetention ¶
func (a *App) DataRetention() einterfaces.DataRetentionInterface
func (*App) DeauthorizeOAuthAppForUser ¶
func (*App) DefaultChannelNames ¶
DefaultChannelNames returns the list of system-wide default channel names.
By default the list will be (not necessarily in this order):
['town-square', 'off-topic']
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:
['town-square', 'game-of-thrones', 'wow']
func (*App) DeleteAllExpiredPluginKeys ¶
func (*App) DeleteAllKeysForPlugin ¶
func (*App) DeleteBotIconImage ¶
DeleteBotIconImage deletes LHS icon for a bot.
func (*App) DeleteBrandImage ¶
func (*App) DeleteChannel ¶
func (*App) DeleteChannelScheme ¶ added in v5.22.0
DeleteChannelScheme deletes a channels scheme and sets its SchemeId to nil.
func (*App) DeleteEphemeralPost ¶
func (*App) DeleteFlaggedPosts ¶
func (*App) DeleteGroupConstrainedMemberships ¶
DeleteGroupConstrainedMemberships deletes team and channel memberships of users who aren't members of the allowed groups of all group-constrained teams and channels.
func (*App) DeleteGroupMember ¶
func (*App) DeleteGroupSyncable ¶
func (a *App) DeleteGroupSyncable(groupID string, syncableID string, syncableType model.GroupSyncableType) (*model.GroupSyncable, *model.AppError)
func (*App) DeleteIncomingWebhook ¶
func (*App) DeleteOutgoingWebhook ¶
func (*App) DeletePluginKey ¶
func (*App) DeletePost ¶
func (*App) DeletePostFiles ¶
func (*App) DeletePreferences ¶
func (*App) DeletePublicKey ¶
DeletePublicKey will delete plugin public key from the config.
func (*App) DeleteReactionForPost ¶
func (*App) DeleteRemoteCluster ¶ added in v5.35.0
func (*App) DeleteRetentionPolicy ¶ added in v5.36.0
func (*App) DeleteScheme ¶
func (*App) DeleteSharedChannel ¶ added in v5.35.0
func (*App) DeleteSharedChannelRemote ¶ added in v5.35.0
func (*App) DeleteSidebarCategory ¶ added in v5.26.0
func (*App) DemoteUserToGuest ¶
DemoteUserToGuest Convert user's roles and all his mermbership's roles from regular user roles to guest roles.
func (*App) DisableAutoResponder ¶
func (*App) DisablePlugin ¶
DisablePlugin will set the config for an installed plugin to disabled, triggering deactivation if active. Notifies cluster peers through config change.
func (*App) DisableUserAccessToken ¶
func (a *App) DisableUserAccessToken(token *model.UserAccessToken) *model.AppError
func (*App) DoActionRequest ¶
func (a *App) DoActionRequest(c *request.Context, rawURL string, body []byte) (*http.Response, *model.AppError)
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
func (*App) DoAdvancedPermissionsMigration ¶
func (a *App) DoAdvancedPermissionsMigration()
This function migrates the default built in roles from code/config to the database.
func (*App) DoAppMigrations ¶
func (a *App) DoAppMigrations()
func (*App) DoCommandRequest ¶ added in v5.28.0
func (*App) DoEmojisPermissionsMigration ¶
func (a *App) DoEmojisPermissionsMigration()
func (*App) DoGuestRolesCreationMigration ¶
func (a *App) DoGuestRolesCreationMigration()
func (*App) DoLocalRequest ¶
func (*App) DoPermissionsMigrations ¶
DoPermissionsMigrations execute all the permissions migrations need by the current version.
func (*App) DoPostAction ¶
func (*App) DoPostActionWithCookie ¶
func (*App) DoSystemConsoleRolesCreationMigration ¶ added in v5.28.0
func (a *App) DoSystemConsoleRolesCreationMigration()
func (*App) DoUploadFile ¶
func (*App) DoUploadFileExpectModification ¶
func (*App) DoubleCheckPassword ¶
This to be used for places we check the users password when they are already logged in
func (*App) DownloadFromURL ¶ added in v5.20.0
func (*App) EnablePlugin ¶
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.
func (*App) EnableUserAccessToken ¶
func (a *App) EnableUserAccessToken(token *model.UserAccessToken) *model.AppError
func (*App) EnvironmentConfig ¶
func (a *App) EnvironmentConfig(filter func(reflect.StructField) bool) map[string]interface{}
func (*App) ExecuteCommand ¶
func (a *App) ExecuteCommand(c *request.Context, args *model.CommandArgs) (*model.CommandResponse, *model.AppError)
@openTracingParams args
func (*App) ExtendSessionExpiryIfNeeded ¶ added in v5.24.0
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.
func (*App) ExtractContentFromFileInfo ¶ added in v5.35.0
func (*App) FetchSamlMetadataFromIdp ¶ added in v5.20.0
func (*App) FileBackend ¶
func (a *App) FileBackend() (filestore.FileBackend, *model.AppError)
func (*App) FileModTime ¶ added in v5.33.0
func (*App) FileReader ¶
Caller must close the first return value
func (*App) FillInChannelProps ¶
func (*App) FillInChannelsProps ¶
func (a *App) FillInChannelsProps(channelList *model.ChannelList) *model.AppError
func (*App) FillInPostProps ¶
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.
func (*App) FilterNonGroupChannelMembers ¶
func (a *App) FilterNonGroupChannelMembers(userIDs []string, channel *model.Channel) ([]string, error)
FilterNonGroupChannelMembers returns the subset of the given user IDs of the users who are not members of groups associated to the channel excluding bots
func (*App) FilterNonGroupTeamMembers ¶
FilterNonGroupTeamMembers returns the subset of the given user IDs of the users who are not members of groups associated to the team excluding bots.
func (*App) FilterUsersByVisible ¶ added in v5.23.0
func (*App) FindTeamByName ¶
func (*App) GenerateMfaSecret ¶
func (*App) GeneratePublicLink ¶
func (*App) GenerateSupportPacket ¶ added in v5.33.0
func (*App) GetActivePluginManifests ¶
func (*App) GetAllChannels ¶
func (a *App) GetAllChannels(page, perPage int, opts model.ChannelSearchOpts) (*model.ChannelListWithTeamData, *model.AppError)
func (*App) GetAllChannelsCount ¶
func (*App) GetAllLdapGroupsPage ¶
func (a *App) GetAllLdapGroupsPage(page int, perPage int, opts model.LdapGroupSearchOpts) ([]*model.Group, int, *model.AppError)
GetAllLdapGroupsPage retrieves all LDAP groups under the configured base DN using the default or configured group filter.
func (*App) GetAllPrivateTeams ¶
func (*App) GetAllRemoteClusters ¶ added in v5.35.0
func (a *App) GetAllRemoteClusters(filter model.RemoteClusterQueryFilter) ([]*model.RemoteCluster, *model.AppError)
func (*App) GetAllTeamsPage ¶
func (*App) GetAllTeamsPageWithCount ¶
func (a *App) GetAllTeamsPageWithCount(offset int, limit int, opts *model.TeamSearch) (*model.TeamsWithCount, *model.AppError)
func (*App) GetAnalytics ¶
func (*App) GetAuditsPage ¶
func (*App) GetAuthorizationCode ¶
func (*App) GetAuthorizedAppsForUser ¶
func (*App) GetBotIconImage ¶
GetBotIconImage retrieves LHS icon for a bot.
func (*App) GetBulkReactionsForPosts ¶
func (*App) GetChannel ¶
func (*App) GetChannelByName ¶
func (*App) GetChannelByNameForTeamName ¶
func (*App) GetChannelCounts ¶
func (*App) GetChannelGroupUsers ¶
GetChannelGroupUsers returns the users who are associated to the channel via GroupChannels and GroupMembers.
func (*App) GetChannelGuestCount ¶
func (*App) GetChannelMember ¶
func (*App) GetChannelMemberCount ¶
func (*App) GetChannelMembersByIds ¶
func (*App) GetChannelMembersForUser ¶
func (*App) GetChannelMembersForUserWithPagination ¶
func (*App) GetChannelMembersPage ¶
func (*App) GetChannelMembersTimezones ¶
func (*App) GetChannelModerationsForChannel ¶ added in v5.22.0
func (a *App) GetChannelModerationsForChannel(channel *model.Channel) ([]*model.ChannelModeration, *model.AppError)
GetChannelModerationsForChannel Gets a channels ChannelModerations from either the higherScoped roles or from the channel scheme roles.
func (*App) GetChannelPinnedPostCount ¶
func (*App) GetChannelPoliciesForUser ¶ added in v5.36.0
func (*App) GetChannelUnread ¶
func (*App) GetChannelsByNames ¶
func (*App) GetChannelsForRetentionPolicy ¶ added in v5.36.0
func (*App) GetChannelsForScheme ¶
func (*App) GetChannelsForSchemePage ¶
func (*App) GetChannelsForUser ¶
func (*App) GetChannelsUserNotIn ¶
func (*App) GetCloudSession ¶ added in v5.31.0
func (*App) GetClusterId ¶
func (*App) GetClusterPluginStatuses ¶
func (a *App) GetClusterPluginStatuses() (model.PluginStatuses, *model.AppError)
GetClusterPluginStatuses returns the status for plugins installed anywhere in the cluster.
func (*App) GetClusterStatus ¶
func (a *App) GetClusterStatus() []*model.ClusterInfo
func (*App) GetCommand ¶
func (*App) GetCommonTeamIDsForTwoUsers ¶ added in v5.36.0
func (*App) GetComplianceFile ¶
func (*App) GetComplianceReport ¶
func (*App) GetComplianceReports ¶
func (*App) GetConfigFile ¶
GetConfigFile proxies access to the given configuration file to the underlying config store.
func (*App) GetCookieDomain ¶
func (*App) GetDefaultProfileImage ¶
func (*App) GetDeletedChannels ¶
func (*App) GetEmojiByName ¶
func (*App) GetEmojiImage ¶
func (*App) GetEmojiList ¶
func (*App) GetEmojiStaticUrl ¶
GetEmojiStaticUrl returns a relative static URL for system default emojis, and the API route for custom ones. Errors if not found or if custom and deleted.
func (*App) GetEnvironmentConfig ¶
func (a *App) GetEnvironmentConfig(filter func(reflect.StructField) bool) map[string]interface{}
GetEnvironmentConfig returns a map of configuration keys whose values have been overridden by an environment variable. If filter is not nil and returns false for a struct field, that field will be omitted.
func (*App) GetErrorListForEmailsOverLimit ¶ added in v5.28.0
func (*App) GetFileInfo ¶
func (*App) GetFileInfos ¶ added in v5.22.0
func (*App) GetFileInfosForPost ¶
func (*App) GetFileInfosForPostWithMigration ¶
func (*App) GetFilteredUsersStats ¶ added in v5.26.0
func (a *App) GetFilteredUsersStats(options *model.UserCountOptions) (*model.UsersStats, *model.AppError)
GetFilteredUsersStats is used to get a count of users based on the set of filters supported by UserCountOptions.
func (*App) GetFlaggedPosts ¶
func (*App) GetFlaggedPostsForChannel ¶
func (*App) GetFlaggedPostsForTeam ¶
func (*App) GetGlobalRetentionPolicy ¶ added in v5.36.0
func (a *App) GetGlobalRetentionPolicy() (*model.GlobalRetentionPolicy, *model.AppError)
func (*App) GetGroupByName ¶
func (*App) GetGroupByRemoteID ¶
func (*App) GetGroupChannel ¶
func (*App) GetGroupMemberCount ¶ added in v5.26.0
func (*App) GetGroupMemberUsers ¶
func (*App) GetGroupMemberUsersPage ¶
func (*App) GetGroupSyncable ¶
func (a *App) GetGroupSyncable(groupID string, syncableID string, syncableType model.GroupSyncableType) (*model.GroupSyncable, *model.AppError)
func (*App) GetGroupSyncables ¶
func (a *App) GetGroupSyncables(groupID string, syncableType model.GroupSyncableType) ([]*model.GroupSyncable, *model.AppError)
func (*App) GetGroupsAssociatedToChannelsByTeam ¶ added in v5.24.0
func (a *App) GetGroupsAssociatedToChannelsByTeam(teamID string, opts model.GroupSearchOpts) (map[string][]*model.GroupWithSchemeAdmin, *model.AppError)
func (*App) GetGroupsByChannel ¶
func (a *App) GetGroupsByChannel(channelID string, opts model.GroupSearchOpts) ([]*model.GroupWithSchemeAdmin, int, *model.AppError)
func (*App) GetGroupsByIDs ¶
func (*App) GetGroupsBySource ¶
func (*App) GetGroupsByTeam ¶
func (a *App) GetGroupsByTeam(teamID string, opts model.GroupSearchOpts) ([]*model.GroupWithSchemeAdmin, int, *model.AppError)
GetGroupsByTeam returns the paged list and the total count of group associated to the given team.
func (*App) GetGroupsByUserId ¶
func (*App) GetHubForUserId ¶
func (*App) GetIncomingWebhook ¶
func (*App) GetIncomingWebhooksForTeamPage ¶
func (*App) GetIncomingWebhooksForTeamPageByUser ¶
func (*App) GetIncomingWebhooksPage ¶
func (*App) GetIncomingWebhooksPageByUser ¶
func (*App) GetJobsByType ¶
func (*App) GetJobsByTypePage ¶
func (*App) GetJobsByTypes ¶ added in v5.35.0
func (*App) GetJobsByTypesPage ¶ added in v5.35.0
func (*App) GetJobsPage ¶
func (*App) GetKnownUsers ¶ added in v5.23.0
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.
func (*App) GetLatestTermsOfService ¶
func (a *App) GetLatestTermsOfService() (*model.TermsOfService, *model.AppError)
func (*App) GetLdapGroup ¶
GetLdapGroup retrieves a single LDAP group by the given LDAP group id.
func (*App) GetLogsSkipSend ¶
func (*App) GetMarketplacePlugins ¶
func (a *App) GetMarketplacePlugins(filter *model.MarketplacePluginFilter) ([]*model.MarketplacePlugin, *model.AppError)
GetMarketplacePlugins returns a list of plugins from the marketplace-server, and plugins that are installed locally.
func (*App) GetMemberCountsByGroup ¶ added in v5.30.0
func (*App) GetMessageForNotification ¶
func (*App) GetMultipleEmojiByName ¶
func (*App) GetNewUsersForTeamPage ¶
func (*App) GetNextPostIdFromPostList ¶
func (*App) GetNotificationNameFormat ¶
func (*App) GetNumberOfChannelsOnTeam ¶
func (*App) GetOAuthAccessTokenForCodeFlow ¶
func (*App) GetOAuthAccessTokenForImplicitFlow ¶
func (*App) GetOAuthApp ¶
func (*App) GetOAuthApps ¶
func (*App) GetOAuthAppsByCreator ¶
func (*App) GetOAuthCodeRedirect ¶
func (*App) GetOAuthImplicitRedirect ¶
func (*App) GetOAuthLoginEndpoint ¶
func (*App) GetOAuthSignupEndpoint ¶
func (*App) GetOAuthStateToken ¶
func (*App) GetOpenGraphMetadata ¶
func (*App) GetOrCreateDirectChannel ¶
func (*App) GetOutgoingWebhook ¶
func (*App) GetOutgoingWebhooksForChannelPageByUser ¶
func (*App) GetOutgoingWebhooksForTeamPage ¶
func (*App) GetOutgoingWebhooksForTeamPageByUser ¶
func (*App) GetOutgoingWebhooksPage ¶
func (*App) GetOutgoingWebhooksPageByUser ¶
func (*App) GetPasswordRecoveryToken ¶
func (*App) GetPermalinkPost ¶
func (*App) GetPinnedPosts ¶
func (*App) GetPluginKey ¶
func (*App) GetPluginPublicKeyFiles ¶
GetPluginPublicKeyFiles returns all public keys listed in the config.
func (*App) GetPluginStatus ¶
GetPluginStatus returns the status for a plugin installed on this server.
func (*App) GetPluginStatuses ¶
func (a *App) GetPluginStatuses() (model.PluginStatuses, *model.AppError)
GetPluginStatuses returns the status for plugins installed on this server.
func (*App) GetPlugins ¶
func (a *App) GetPlugins() (*model.PluginsResponse, *model.AppError)
func (*App) GetPluginsEnvironment ¶
func (a *App) GetPluginsEnvironment() *plugin.Environment
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.
func (*App) GetPostAfterTime ¶
func (*App) GetPostIdAfterTime ¶
func (*App) GetPostIdBeforeTime ¶
func (*App) GetPostIfAuthorized ¶ added in v5.37.2
func (*App) GetPostThread ¶
func (*App) GetPostsAfterPost ¶
func (*App) GetPostsAroundPost ¶
func (*App) GetPostsBeforePost ¶
func (*App) GetPostsEtag ¶
func (*App) GetPostsForChannelAroundLastUnread ¶
func (*App) GetPostsPage ¶
func (*App) GetPostsSince ¶
func (*App) GetPreferenceByCategoryAndNameForUser ¶
func (*App) GetPreferenceByCategoryForUser ¶
func (*App) GetPreferencesForUser ¶
func (*App) GetPrevPostIdFromPostList ¶
func (*App) GetPrivateChannelsForTeam ¶ added in v5.26.0
func (*App) GetProductNotices ¶ added in v5.28.0
func (a *App) GetProductNotices(c *request.Context, userID, teamID string, client model.NoticeClientType, clientVersion string, locale string) (model.NoticeMessages, *model.AppError)
GetProductNotices is called from the frontend to fetch the product notices that are relevant to the caller
func (*App) GetProfileImage ¶
func (*App) GetPublicChannelsByIdsForTeam ¶
func (*App) GetPublicChannelsForTeam ¶
func (*App) GetPublicKey ¶
GetPublicKey will return the actual public key saved in the `name` file.
func (*App) GetReactionsForPost ¶
func (*App) GetRecentlyActiveUsersForTeam ¶
func (*App) GetRecentlyActiveUsersForTeamPage ¶
func (*App) GetRemoteCluster ¶ added in v5.35.0
func (*App) GetRemoteClusterForUser ¶ added in v5.35.0
func (*App) GetRemoteClusterService ¶ added in v5.35.0
func (a *App) GetRemoteClusterService() (remotecluster.RemoteClusterServiceIFace, *model.AppError)
func (*App) GetRemoteClusterSession ¶ added in v5.35.0
func (*App) GetRetentionPolicies ¶ added in v5.36.0
func (*App) GetRetentionPoliciesCount ¶ added in v5.36.0
func (*App) GetRetentionPolicy ¶ added in v5.36.0
func (*App) GetRoleByName ¶
func (*App) GetRolesByNames ¶
func (*App) GetSamlCertificateStatus ¶
func (a *App) GetSamlCertificateStatus() *model.SamlCertificateStatus
func (*App) GetSamlMetadataFromIdp ¶ added in v5.20.0
func (*App) GetSanitizeOptions ¶
TODO: migrate this after the user service implementation is completed
func (*App) GetSanitizedConfig ¶
GetSanitizedConfig gets the configuration for a system admin without any secrets.
func (*App) GetSchemeByName ¶
func (*App) GetSchemeRolesForChannel ¶
func (a *App) GetSchemeRolesForChannel(channelID string) (guestRoleName, userRoleName, adminRoleName string, err *model.AppError)
GetSchemeRolesForChannel Checks if a channel or its team has an override scheme for channel roles and returns the scheme roles or default channel roles.
func (*App) GetSchemeRolesForTeam ¶
func (*App) GetSchemes ¶
func (*App) GetSchemesPage ¶
func (*App) GetSessionById ¶
func (*App) GetSessionLengthInMillis ¶ added in v5.24.0
GetSessionLengthInMillis returns the session length, in milliseconds, based on the type of session (Mobile, SSO, Web/LDAP).
func (*App) GetSessions ¶
func (*App) GetSharedChannel ¶ added in v5.35.0
func (a *App) GetSharedChannel(channelID string) (*model.SharedChannel, error)
func (*App) GetSharedChannelRemote ¶ added in v5.35.0
func (a *App) GetSharedChannelRemote(id string) (*model.SharedChannelRemote, error)
func (*App) GetSharedChannelRemoteByIds ¶ added in v5.35.0
func (*App) GetSharedChannelRemotes ¶ added in v5.35.0
func (a *App) GetSharedChannelRemotes(opts model.SharedChannelRemoteFilterOpts) ([]*model.SharedChannelRemote, error)
func (*App) GetSharedChannelRemotesStatus ¶ added in v5.35.0
func (a *App) GetSharedChannelRemotesStatus(channelID string) ([]*model.SharedChannelRemoteStatus, error)
func (*App) GetSharedChannels ¶ added in v5.35.0
func (a *App) GetSharedChannels(page int, perPage int, opts model.SharedChannelFilterOpts) ([]*model.SharedChannel, *model.AppError)
func (*App) GetSharedChannelsCount ¶ added in v5.35.0
func (a *App) GetSharedChannelsCount(opts model.SharedChannelFilterOpts) (int64, error)
func (*App) GetSidebarCategories ¶ added in v5.26.0
func (*App) GetSidebarCategory ¶ added in v5.26.0
func (*App) GetSidebarCategoryOrder ¶ added in v5.26.0
func (*App) GetSinglePost ¶
func (*App) GetSiteURL ¶
func (*App) GetStatusFromCache ¶ added in v5.20.0
func (*App) GetStatusesByIds ¶
func (*App) GetSubscriptionStats ¶ added in v5.37.0
func (a *App) GetSubscriptionStats() (*model.SubscriptionStats, *model.AppError)
func (*App) GetSuggestions ¶ added in v5.24.0
func (a *App) GetSuggestions(c *request.Context, commandArgs *model.CommandArgs, commands []*model.Command, roleID string) []model.AutocompleteSuggestion
GetSuggestions returns suggestions for user input.
func (*App) GetSystemBot ¶ added in v5.37.0
func (*App) GetTeamByInviteId ¶
func (*App) GetTeamGroupUsers ¶
GetTeamGroupUsers returns the users who are associated to the team via GroupTeams and GroupMembers.
func (*App) GetTeamIdFromQuery ¶
func (*App) GetTeamMember ¶
func (*App) GetTeamMembers ¶
func (a *App) GetTeamMembers(teamID string, offset int, limit int, teamMembersGetOptions *model.TeamMembersGetOptions) ([]*model.TeamMember, *model.AppError)
func (*App) GetTeamMembersByIds ¶
func (a *App) GetTeamMembersByIds(teamID string, userIDs []string, restrictions *model.ViewUsersRestrictions) ([]*model.TeamMember, *model.AppError)
func (*App) GetTeamMembersForUser ¶
func (*App) GetTeamMembersForUserWithPagination ¶
func (*App) GetTeamPoliciesForUser ¶ added in v5.36.0
func (*App) GetTeamSchemeChannelRoles ¶ added in v5.22.0
func (a *App) GetTeamSchemeChannelRoles(teamID string) (guestRoleName, userRoleName, adminRoleName string, err *model.AppError)
GetTeamSchemeChannelRoles Checks if a team has an override scheme and returns the scheme channel role names or default channel role names.
func (*App) GetTeamStats ¶
func (*App) GetTeamUnread ¶
func (*App) GetTeamsForRetentionPolicy ¶ added in v5.36.0
func (*App) GetTeamsForScheme ¶
func (*App) GetTeamsForSchemePage ¶
func (*App) GetTeamsForUser ¶
func (*App) GetTeamsUnreadForUser ¶
func (*App) GetTermsOfService ¶
func (*App) GetThreadForUser ¶ added in v5.33.0
func (a *App) GetThreadForUser(teamID string, threadMembership *model.ThreadMembership, extended bool) (*model.ThreadResponse, *model.AppError)
func (*App) GetThreadMembershipForUser ¶ added in v5.37.0
func (*App) GetThreadMembershipsForUser ¶ added in v5.29.0
func (a *App) GetThreadMembershipsForUser(userID, teamID string) ([]*model.ThreadMembership, error)
func (*App) GetThreadsForUser ¶ added in v5.30.0
func (*App) GetTotalUsersStats ¶
func (a *App) GetTotalUsersStats(viewRestrictions *model.ViewUsersRestrictions) (*model.UsersStats, *model.AppError)
GetTotalUsersStats is used for the DM list total
func (*App) GetUploadSession ¶ added in v5.28.0
func (*App) GetUploadSessionsForUser ¶ added in v5.28.0
func (*App) GetUserAccessToken ¶
func (*App) GetUserAccessTokens ¶
func (*App) GetUserAccessTokensForUser ¶
func (*App) GetUserByAuth ¶
func (*App) GetUserByEmail ¶
func (*App) GetUserByUsername ¶
func (*App) GetUserForLogin ¶
func (*App) GetUserStatusesByIds ¶
GetUserStatusesByIds used by apiV4
func (*App) GetUserTermsOfService ¶
func (*App) GetUsersByGroupChannelIds ¶
func (*App) GetUsersByIds ¶
func (*App) GetUsersByUsernames ¶
func (*App) GetUsersEtag ¶
func (*App) GetUsersInChannel ¶
func (*App) GetUsersInChannelByStatus ¶
func (*App) GetUsersInChannelMap ¶
func (*App) GetUsersInChannelPage ¶
func (*App) GetUsersInChannelPageByStatus ¶
func (*App) GetUsersInTeam ¶
func (*App) GetUsersInTeamEtag ¶
func (*App) GetUsersInTeamPage ¶
func (*App) GetUsersNotInChannel ¶
func (*App) GetUsersNotInChannelMap ¶
func (*App) GetUsersNotInChannelPage ¶
func (*App) GetUsersNotInTeam ¶
func (*App) GetUsersNotInTeamEtag ¶
func (*App) GetUsersNotInTeamPage ¶
func (*App) GetUsersPage ¶
func (*App) GetUsersWithoutTeam ¶
func (*App) GetUsersWithoutTeamPage ¶
func (*App) GetVerifyEmailToken ¶
func (*App) GetViewUsersRestrictions ¶
func (*App) GetWarnMetricsBot ¶ added in v5.37.0
func (*App) GetWarnMetricsStatus ¶ added in v5.26.0
func (*App) HTTPService ¶
func (a *App) HTTPService() httpservice.HTTPService
func (*App) HandleCommandResponse ¶
func (a *App) HandleCommandResponse(c *request.Context, command *model.Command, args *model.CommandArgs, response *model.CommandResponse, builtIn bool) (*model.CommandResponse, *model.AppError)
func (*App) HandleCommandResponsePost ¶
func (*App) HandleCommandWebhook ¶
func (*App) HandleImages ¶
func (*App) HandleIncomingWebhook ¶
func (*App) HandleMessageExportConfig ¶ added in v5.20.0
func (*App) HasPermissionTo ¶
func (a *App) HasPermissionTo(askingUserId string, permission *model.Permission) bool
func (*App) HasPermissionToChannel ¶
func (*App) HasPermissionToChannelByPost ¶
func (*App) HasPermissionToTeam ¶
func (*App) HasPermissionToUser ¶
func (*App) HasRemote ¶ added in v5.35.0
HasRemote returns whether a given channelID is present in the channel remotes or not.
func (*App) HasSharedChannel ¶ added in v5.35.0
func (*App) HubRegister ¶
HubRegister registers a connection to a hub.
func (*App) HubUnregister ¶
HubUnregister unregisters a connection from a hub.
func (*App) ImageProxy ¶
func (a *App) ImageProxy() *imageproxy.ImageProxy
func (*App) ImageProxyAdder ¶
func (*App) ImageProxyRemover ¶
func (*App) InitPlugins ¶
func (*App) InstallMarketplacePlugin ¶ added in v5.20.0
func (a *App) InstallMarketplacePlugin(request *model.InstallMarketplacePluginRequest) (*model.Manifest, *model.AppError)
InstallMarketplacePlugin installs a plugin listed in the marketplace server. It will get the plugin bundle from the prepackaged folder, if available, or remotely if EnableRemoteMarketplace is true.
func (*App) InstallPlugin ¶
func (a *App) InstallPlugin(pluginFile io.ReadSeeker, replace bool) (*model.Manifest, *model.AppError)
InstallPlugin unpacks and installs a plugin but does not enable or activate it.
func (*App) InstallPluginFromData ¶
func (a *App) InstallPluginFromData(data model.PluginEventData)
func (*App) InstallPluginWithSignature ¶
func (a *App) InstallPluginWithSignature(pluginFile, signature io.ReadSeeker) (*model.Manifest, *model.AppError)
InstallPluginWithSignature verifies and installs plugin.
func (*App) InvalidateAllEmailInvites ¶
func (*App) InvalidateCacheForUser ¶
func (*App) InviteGuestsToChannels ¶
func (*App) InviteGuestsToChannelsGracefully ¶ added in v5.20.0
func (a *App) InviteGuestsToChannelsGracefully(teamID string, guestsInvite *model.GuestsInvite, senderId string) ([]*model.EmailInviteWithError, *model.AppError)
func (*App) InviteNewUsersToTeam ¶
func (*App) InviteNewUsersToTeamGracefully ¶ added in v5.20.0
func (*App) IsFirstUserAccount ¶
func (*App) IsPhase2MigrationCompleted ¶
func (*App) IsUserAway ¶
func (*App) IsUserSignUpAllowed ¶
func (*App) JoinChannel ¶
func (*App) JoinDefaultChannels ¶
func (*App) JoinUserToTeam ¶
func (*App) Ldap ¶
func (a *App) Ldap() einterfaces.LdapInterface
func (*App) LeaveChannel ¶
func (*App) LimitedClientConfig ¶
func (*App) LimitedClientConfigWithComputed ¶
LimitedClientConfigWithComputed gets the configuration in a format suitable for sending to the client.
func (*App) ListAllCommands ¶
func (*App) ListAutocompleteCommands ¶
func (a *App) ListAutocompleteCommands(teamID string, T i18n.TranslateFunc) ([]*model.Command, *model.AppError)
@openTracingParams teamID previous ListCommands now ListAutocompleteCommands
func (*App) ListPluginKeys ¶
func (*App) ListTeamCommands ¶
func (*App) LogAuditRec ¶ added in v5.24.0
LogAuditRec logs an audit record using default LvlAuditCLI.
func (*App) LogAuditRecWithLevel ¶ added in v5.24.0
LogAuditRecWithLevel logs an audit record using specified Level.
func (*App) LoginByOAuth ¶
func (*App) MakeAuditRecord ¶ added in v5.24.0
MakeAuditRecord creates a audit record pre-populated with defaults.
func (*App) MakePermissionError ¶
func (*App) MarkChannelAsUnreadFromPost ¶
func (a *App) MarkChannelAsUnreadFromPost(postID string, userID string, collapsedThreadsSupported, followThread bool) (*model.ChannelUnreadAt, *model.AppError)
MarkChanelAsUnreadFromPost will take a post and set the channel as unread from that one.
func (*App) MarkChannelsAsViewed ¶
func (*App) MaxPostSize ¶
func (*App) MentionsToPublicChannels ¶ added in v5.28.0
func (a *App) MentionsToPublicChannels(message, teamID string) model.ChannelMentionMap
MentionsToPublicChannels returns all the mentions to public channels, linking them to their channels
func (*App) MentionsToTeamMembers ¶ added in v5.28.0
func (a *App) MentionsToTeamMembers(message, teamID string) model.UserMentionMap
MentionsToTeamMembers returns all the @ mentions found in message that belong to users in the specified team, linking them to their users
func (*App) MessageExport ¶
func (a *App) MessageExport() einterfaces.MessageExportInterface
func (*App) Metrics ¶
func (a *App) Metrics() einterfaces.MetricsInterface
func (*App) MigrateFilenamesToFileInfos ¶
Creates and stores FileInfos for a post created before the FileInfos table existed.
func (*App) MigrateIdLDAP ¶ added in v5.26.0
func (*App) MoveChannel ¶
func (a *App) MoveChannel(c *request.Context, team *model.Team, channel *model.Channel, user *model.User) *model.AppError
MoveChannel method is prone to data races if someone joins to channel during the move process. However this function is only exposed to sysadmins and the possibility of this edge case is relatively small.
func (*App) MoveCommand ¶
func (*App) NewClusterDiscoveryService ¶
func (a *App) NewClusterDiscoveryService() *ClusterDiscoveryService
func (*App) NewPluginAPI ¶
func (*App) NewWebConn ¶
func (a *App) NewWebConn(cfg *WebConnConfig) *WebConn
NewWebConn returns a new WebConn instance.
func (*App) Notification ¶
func (a *App) Notification() einterfaces.NotificationInterface
func (*App) NotificationsLog ¶
func (*App) NotifyAndSetWarnMetricAck ¶ added in v5.26.0
func (*App) NotifySessionsExpired ¶ added in v5.26.0
NotifySessionsExpired is called periodically from the job server to notify any mobile sessions that have expired.
func (*App) NotifySharedChannelUserUpdate ¶ added in v5.36.0
func (*App) OpenInteractiveDialog ¶
func (a *App) OpenInteractiveDialog(request model.OpenDialogRequest) *model.AppError
func (*App) OverrideIconURLIfEmoji ¶
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.
func (*App) PatchChannel ¶
func (*App) PatchChannelModerationsForChannel ¶ added in v5.22.0
func (a *App) PatchChannelModerationsForChannel(channel *model.Channel, channelModerationsPatch []*model.ChannelModerationPatch) ([]*model.ChannelModeration, *model.AppError)
PatchChannelModerationsForChannel Updates a channels scheme roles based on a given ChannelModerationPatch, if the permissions match the higher scoped role the scheme is deleted.
func (*App) PatchRetentionPolicy ¶ added in v5.36.0
func (a *App) PatchRetentionPolicy(patch *model.RetentionPolicyWithTeamAndChannelIDs) (*model.RetentionPolicyWithTeamAndChannelCounts, *model.AppError)
func (*App) PatchScheme ¶
func (*App) PermanentDeleteAllUsers ¶
func (*App) PermanentDeleteBot ¶
PermanentDeleteBot permanently deletes a bot and its corresponding user.
func (*App) PermanentDeleteChannel ¶
func (*App) PermanentDeleteTeam ¶
func (*App) PermanentDeleteTeamId ¶
func (*App) PermanentDeleteUser ¶
func (*App) PluginCommandsForTeam ¶
func (*App) PopulateWebConnConfig ¶ added in v5.36.0
func (a *App) PopulateWebConnConfig(s *model.Session, cfg *WebConnConfig, seqVal string) (*WebConnConfig, error)
PopulateWebConnConfig checks if the connection id already exists in the hub, and if so, accordingly populates the other fields of the webconn.
func (*App) PostActionCookieSecret ¶
func (*App) PostAddToChannelMessage ¶
func (*App) PostPatchWithProxyRemovedFromImageURLs ¶
func (*App) PostUpdateChannelDisplayNameMessage ¶
func (*App) PostUpdateChannelHeaderMessage ¶
func (*App) PostUpdateChannelPurposeMessage ¶
func (*App) PostWithProxyAddedToImageURLs ¶
func (*App) PostWithProxyRemovedFromImageURLs ¶
func (*App) PreparePostForClient ¶
func (*App) PreparePostListForClient ¶
func (*App) ProcessSlackAttachments ¶
func (a *App) ProcessSlackAttachments(attachments []*model.SlackAttachment) []*model.SlackAttachment
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
func (*App) ProcessSlackText ¶
func (*App) PromoteGuestToUser ¶
func (a *App) PromoteGuestToUser(c *request.Context, user *model.User, requestorId string) *model.AppError
PromoteGuestToUser Convert user's roles and all his mermbership's roles from guest roles to regular user roles.
func (*App) Publish ¶
func (a *App) Publish(message *model.WebSocketEvent)
func (*App) PublishUserTyping ¶ added in v5.26.0
func (*App) PurgeBleveIndexes ¶ added in v5.24.0
func (*App) PurgeElasticsearchIndexes ¶
func (*App) RecycleDatabaseConnection ¶
func (a *App) RecycleDatabaseConnection()
func (*App) RegenCommandToken ¶
func (*App) RegenOutgoingWebhookToken ¶
func (a *App) RegenOutgoingWebhookToken(hook *model.OutgoingWebhook) (*model.OutgoingWebhook, *model.AppError)
func (*App) RegenerateOAuthAppSecret ¶
func (*App) RegenerateTeamInviteId ¶
func (*App) RegisterPluginCommand ¶
func (*App) ReloadConfig ¶
func (*App) RemoveAllDeactivatedMembersFromChannel ¶ added in v5.26.0
func (*App) RemoveChannelsFromRetentionPolicy ¶ added in v5.36.0
func (*App) RemoveConfigListener ¶
func (*App) RemoveCustomStatus ¶ added in v5.33.0
func (*App) RemoveDirectory ¶ added in v5.32.0
func (*App) RemoveLdapPrivateCertificate ¶ added in v5.28.0
func (*App) RemoveLdapPublicCertificate ¶ added in v5.28.0
func (*App) RemovePluginFromData ¶
func (a *App) RemovePluginFromData(data model.PluginEventData)
func (*App) RemoveRecentCustomStatus ¶ added in v5.33.0
func (*App) RemoveSamlIdpCertificate ¶
func (*App) RemoveSamlPrivateCertificate ¶
func (*App) RemoveSamlPublicCertificate ¶
func (*App) RemoveTeamMemberFromTeam ¶
func (*App) RemoveTeamsFromRetentionPolicy ¶ added in v5.36.0
func (*App) RemoveUserFromChannel ¶
func (*App) RemoveUserFromTeam ¶
func (*App) RemoveUsersFromChannelNotMemberOfTeam ¶ added in v5.26.0
func (*App) RenameChannel ¶
func (a *App) RenameChannel(channel *model.Channel, newChannelName string, newDisplayName string) (*model.Channel, *model.AppError)
RenameChannel is used to rename the channel Name and the DisplayName fields
func (*App) RenameTeam ¶
func (a *App) RenameTeam(team *model.Team, newTeamName string, newDisplayName string) (*model.Team, *model.AppError)
RenameTeam is used to rename the team Name and the DisplayName fields
func (*App) RequestLicenseAndAckWarnMetric ¶ added in v5.28.0
func (*App) ResetPasswordFromToken ¶
func (*App) ResetPermissionsSystem ¶
func (*App) ResetSamlAuthDataToEmail ¶ added in v5.36.0
func (*App) RestoreChannel ¶
func (*App) RestrictUsersGetByPermissions ¶
func (a *App) RestrictUsersGetByPermissions(userID string, options *model.UserGetOptions) (*model.UserGetOptions, *model.AppError)
func (*App) RestrictUsersSearchByPermissions ¶
func (a *App) RestrictUsersSearchByPermissions(userID string, options *model.UserSearchOptions) (*model.UserSearchOptions, *model.AppError)
func (*App) ReturnSessionToPool ¶ added in v5.37.0
func (*App) RevokeSessionsForDeviceId ¶
func (*App) RevokeSessionsFromAllUsers ¶
RevokeSessionsFromAllUsers will go through all the sessions active in the server and revoke them
func (*App) RevokeUserAccessToken ¶
func (a *App) RevokeUserAccessToken(token *model.UserAccessToken) *model.AppError
func (*App) RolesGrantPermission ¶
func (*App) Saml ¶
func (a *App) Saml() einterfaces.SamlInterface
func (*App) SanitizeTeam ¶
func (*App) SanitizeTeams ¶
func (*App) SaveAndBroadcastStatus ¶
func (*App) SaveBrandImage ¶
func (a *App) SaveBrandImage(imageData *multipart.FileHeader) *model.AppError
func (*App) SaveComplianceReport ¶
func (a *App) SaveComplianceReport(job *model.Compliance) (*model.Compliance, *model.AppError)
func (*App) SaveConfig ¶
func (a *App) SaveConfig(newCfg *model.Config, sendConfigChangeClusterMessage bool) (*model.Config, *model.Config, *model.AppError)
SaveConfig replaces the active configuration, optionally notifying cluster peers.
func (*App) SaveReactionForPost ¶
func (*App) SaveSharedChannel ¶ added in v5.35.0
func (a *App) SaveSharedChannel(sc *model.SharedChannel) (*model.SharedChannel, error)
func (*App) SaveSharedChannelRemote ¶ added in v5.35.0
func (a *App) SaveSharedChannelRemote(remote *model.SharedChannelRemote) (*model.SharedChannelRemote, error)
func (*App) SaveUserTermsOfService ¶
func (*App) SchemesIterator ¶
func (*App) SearchAllChannels ¶
func (a *App) SearchAllChannels(term string, opts model.ChannelSearchOpts) (*model.ChannelListWithTeamData, int64, *model.AppError)
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.
func (*App) SearchAllTeams ¶
SearchAllTeams returns a team list and the total count of the results
func (*App) SearchArchivedChannels ¶
func (*App) SearchChannels ¶
func (*App) SearchChannelsForUser ¶
func (*App) SearchChannelsUserNotIn ¶
func (*App) SearchEmoji ¶
func (*App) SearchEngine ¶ added in v5.22.0
func (a *App) SearchEngine() *searchengine.Broker
func (*App) SearchFilesInTeamForUser ¶ added in v5.34.0
func (*App) SearchGroupChannels ¶
func (*App) SearchPostsInTeam ¶
func (*App) SearchPostsInTeamForUser ¶
func (*App) SearchPrivateTeams ¶
func (*App) SearchPublicTeams ¶
func (*App) SearchUserAccessTokens ¶
func (*App) SearchUsers ¶
func (a *App) SearchUsers(props *model.UserSearch, options *model.UserSearchOptions) ([]*model.User, *model.AppError)
func (*App) SearchUsersInChannel ¶
func (*App) SearchUsersInGroup ¶ added in v5.26.0
func (*App) SearchUsersInTeam ¶
func (*App) SearchUsersNotInChannel ¶
func (*App) SearchUsersNotInTeam ¶
func (*App) SearchUsersWithoutTeam ¶
func (*App) SendAckToPushProxy ¶
func (a *App) SendAckToPushProxy(ack *model.PushNotificationAck) error
func (*App) SendAdminUpgradeRequestEmail ¶ added in v5.33.0
func (a *App) SendAdminUpgradeRequestEmail(username string, subscription *model.Subscription, action string) *model.AppError
SendAdminUpgradeRequestEmail takes the username of user trying to alert admins and then applies rate limit of n (number of admins) emails per user per day before sending the emails.
func (*App) SendAutoResponse ¶
func (*App) SendAutoResponseIfNecessary ¶
func (*App) SendCloudTrialEndWarningEmail ¶ added in v5.35.0
func (*App) SendCloudTrialEndedEmail ¶ added in v5.36.0
func (*App) SendEmailVerification ¶
func (*App) SendEphemeralPost ¶
func (*App) SendNoCardPaymentFailedEmail ¶ added in v5.31.0
SendNoCardPaymentFailedEmail
func (*App) SendNotifications ¶
func (*App) SendPasswordReset ¶
func (*App) SendPaymentFailedEmail ¶ added in v5.31.0
func (a *App) SendPaymentFailedEmail(failedPayment *model.FailedPayment) *model.AppError
func (*App) ServeInterPluginRequest ¶
func (*App) SessionHasPermissionTo ¶
func (*App) SessionHasPermissionToAny ¶ added in v5.28.0
func (*App) SessionHasPermissionToCategory ¶ added in v5.26.0
func (*App) SessionHasPermissionToChannel ¶
func (*App) SessionHasPermissionToChannelByPost ¶
func (*App) SessionHasPermissionToCreateJob ¶ added in v5.35.0
func (*App) SessionHasPermissionToManageBot ¶
func (a *App) SessionHasPermissionToManageBot(session model.Session, botUserId string) *model.AppError
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.
func (*App) SessionHasPermissionToReadJob ¶ added in v5.35.0
func (*App) SessionHasPermissionToTeam ¶
func (*App) SessionHasPermissionToUser ¶
func (*App) SessionHasPermissionToUserOrBot ¶
func (*App) SessionIsRegistered ¶ added in v5.24.0
SessionIsRegistered determines if a specific session has been registered
func (*App) SetActiveChannel ¶
func (*App) SetAutoResponderStatus ¶
func (*App) SetBotIconImage ¶
SetBotIconImage sets LHS icon for a bot.
func (*App) SetBotIconImageFromMultiPartFile ¶
func (a *App) SetBotIconImageFromMultiPartFile(botUserId string, imageData *multipart.FileHeader) *model.AppError
SetBotIconImageFromMultiPartFile sets LHS icon for a bot.
func (*App) SetCustomStatus ¶ added in v5.33.0
func (*App) SetDefaultProfileImage ¶
func (*App) SetPhase2PermissionsMigrationStatus ¶
func (*App) SetPluginKey ¶
func (*App) SetPluginKeyWithExpiry ¶
func (*App) SetPluginKeyWithOptions ¶
func (*App) SetPluginsEnvironment ¶
func (a *App) SetPluginsEnvironment(pluginsEnvironment *plugin.Environment)
func (*App) SetProfileImage ¶
func (*App) SetProfileImageFromFile ¶
func (*App) SetProfileImageFromMultiPartFile ¶
func (*App) SetRemoteClusterLastPingAt ¶ added in v5.35.0
func (*App) SetSamlIdpCertificateFromMetadata ¶ added in v5.20.0
func (*App) SetSearchEngine ¶ added in v5.24.0
func (a *App) SetSearchEngine(se *searchengine.Broker)
func (*App) SetSessionExpireInDays ¶ added in v5.25.4
SetSessionExpireInDays sets the session's expiry the specified number of days relative to either the session creation date or the current time, depending on the `ExtendSessionOnActivity` config setting.
func (*App) SetStatusAwayIfNeeded ¶
func (*App) SetStatusDoNotDisturb ¶
func (*App) SetStatusDoNotDisturbTimed ¶ added in v5.37.0
SetStatusDoNotDisturbTimed takes endtime in unix epoch format in UTC and sets status of given userId to dnd which will be restored back after endtime
func (*App) SetStatusLastActivityAt ¶
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
func (*App) SetStatusOffline ¶
func (*App) SetStatusOnline ¶
func (*App) SetStatusOutOfOffice ¶
func (*App) SetTeamIcon ¶
func (*App) SetTeamIconFromFile ¶
func (*App) SetTeamIconFromMultiPartFile ¶
func (*App) SlackImport ¶
func (*App) SubmitInteractiveDialog ¶
func (a *App) SubmitInteractiveDialog(c *request.Context, request model.SubmitDialogRequest) (*model.SubmitDialogResponse, *model.AppError)
func (*App) SwitchEmailToLdap ¶
func (*App) SwitchEmailToOAuth ¶
func (*App) SwitchLdapToEmail ¶
func (*App) SwitchOAuthToEmail ¶
func (*App) SyncLdap ¶
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.
func (*App) SyncPlugins ¶
SyncPlugins synchronizes the plugins installed locally with the plugin bundles available in the file store.
func (*App) SyncPluginsActiveState ¶
func (a *App) SyncPluginsActiveState()
func (*App) SyncRolesAndMembership ¶ added in v5.20.0
func (a *App) SyncRolesAndMembership(c *request.Context, syncableID string, syncableType model.GroupSyncableType, includeRemovedMembers bool)
SyncRolesAndMembership updates the SchemeAdmin status and membership of all of the members of the given syncable.
func (*App) SyncSyncableRoles ¶ added in v5.20.0
func (a *App) SyncSyncableRoles(syncableID string, syncableType model.GroupSyncableType) *model.AppError
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.
func (*App) TeamMembersMinusGroupMembers ¶
func (a *App) TeamMembersMinusGroupMembers(teamID string, groupIDs []string, page, perPage int) ([]*model.UserWithGroups, int64, *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.
func (*App) TeamMembersToAdd ¶
func (a *App) TeamMembersToAdd(since int64, teamID *string, includeRemovedMembers bool) ([]*model.UserTeamIDPair, *model.AppError)
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.
func (*App) TeamMembersToRemove ¶
func (*App) TelemetryId ¶ added in v5.28.0
func (*App) TestFileStoreConnection ¶ added in v5.34.0
func (*App) TestFileStoreConnectionWithConfig ¶ added in v5.34.0
func (a *App) TestFileStoreConnectionWithConfig(cfg *model.FileSettings) *model.AppError
func (*App) ToggleMuteChannel ¶
func (*App) TotalWebsocketConnections ¶
func (*App) TriggerWebhook ¶
func (*App) UnregisterPluginCommand ¶
func (*App) UnregisterPluginCommands ¶
func (*App) UpdateActive ¶
func (*App) UpdateBotActive ¶
func (a *App) UpdateBotActive(c *request.Context, botUserId string, active bool) (*model.Bot, *model.AppError)
UpdateBotActive marks a bot as active or inactive, along with its corresponding user.
func (*App) UpdateBotOwner ¶
UpdateBotOwner changes a bot's owner to the given value.
func (*App) UpdateChannel ¶
UpdateChannel updates a given channel by its Id. It also publishes the CHANNEL_UPDATED event.
func (*App) UpdateChannelLastViewedAt ¶
func (*App) UpdateChannelMemberNotifyProps ¶
func (*App) UpdateChannelMemberRoles ¶
func (*App) UpdateChannelMemberSchemeRoles ¶
func (*App) UpdateChannelPrivacy ¶
func (*App) UpdateChannelScheme ¶
UpdateChannelScheme saves the new SchemeId of the channel passed.
func (*App) UpdateCommand ¶
func (*App) UpdateConfig ¶
func (*App) UpdateDNDStatusOfUsers ¶ added in v5.37.0
func (a *App) UpdateDNDStatusOfUsers()
UpdateDNDStatusOfUsers is a recurring task which is started when server starts which unsets dnd status of users if needed and saves and broadcasts it
func (*App) UpdateEphemeralPost ¶
func (*App) UpdateExpiredDNDStatuses ¶ added in v5.37.0
func (*App) UpdateGroup ¶
func (*App) UpdateGroupSyncable ¶
func (a *App) UpdateGroupSyncable(groupSyncable *model.GroupSyncable) (*model.GroupSyncable, *model.AppError)
func (*App) UpdateHashedPassword ¶ added in v5.28.0
func (*App) UpdateHashedPasswordByUserId ¶ added in v5.28.0
func (*App) UpdateIncomingWebhook ¶
func (a *App) UpdateIncomingWebhook(oldHook, updatedHook *model.IncomingWebhook) (*model.IncomingWebhook, *model.AppError)
func (*App) UpdateLastActivityAtIfNeeded ¶
func (*App) UpdateMobileAppBadge ¶
func (*App) UpdateOAuthUserAttrs ¶
func (*App) UpdateOauthApp ¶
func (*App) UpdateOutgoingWebhook ¶
func (a *App) UpdateOutgoingWebhook(oldHook, updatedHook *model.OutgoingWebhook) (*model.OutgoingWebhook, *model.AppError)
func (*App) UpdatePassword ¶
func (*App) UpdatePasswordAsUser ¶
func (*App) UpdatePasswordByUserIdSendEmail ¶
func (*App) UpdatePasswordSendEmail ¶
func (*App) UpdatePost ¶
func (*App) UpdatePreferences ¶
func (*App) UpdateProductNotices ¶ added in v5.28.0
UpdateProductNotices is called periodically from a scheduled worker to fetch new notices and update the cache
func (*App) UpdateRemoteCluster ¶ added in v5.35.0
func (a *App) UpdateRemoteCluster(rc *model.RemoteCluster) (*model.RemoteCluster, *model.AppError)
func (*App) UpdateRemoteClusterTopics ¶ added in v5.35.0
func (*App) UpdateScheme ¶
func (*App) UpdateSharedChannel ¶ added in v5.35.0
func (a *App) UpdateSharedChannel(sc *model.SharedChannel) (*model.SharedChannel, error)
func (*App) UpdateSharedChannelRemoteCursor ¶ added in v5.36.0
func (a *App) UpdateSharedChannelRemoteCursor(id string, cursor model.GetPostsSinceForSyncCursor) error
func (*App) UpdateSidebarCategories ¶ added in v5.26.0
func (a *App) UpdateSidebarCategories(userID, teamID string, categories []*model.SidebarCategoryWithChannels) ([]*model.SidebarCategoryWithChannels, *model.AppError)
func (*App) UpdateSidebarCategoryOrder ¶ added in v5.26.0
func (*App) UpdateTeamMemberRoles ¶
func (*App) UpdateTeamMemberSchemeRoles ¶
func (*App) UpdateTeamPrivacy ¶
func (*App) UpdateTeamScheme ¶
func (*App) UpdateThreadFollowForUser ¶ added in v5.30.0
func (*App) UpdateThreadReadForUser ¶ added in v5.30.0
func (*App) UpdateThreadsReadForUser ¶ added in v5.30.0
func (*App) UpdateUser ¶
func (*App) UpdateUserActive ¶
func (*App) UpdateUserAsUser ¶
func (*App) UpdateUserAuth ¶
func (*App) UpdateUserNotifyProps ¶
func (*App) UpdateUserRoles ¶
func (*App) UpdateUserRolesWithUser ¶ added in v5.33.0
func (*App) UpdateViewedProductNotices ¶ added in v5.28.0
UpdateViewedProductNotices is called from the frontend to mark a set of notices as 'viewed' by user
func (*App) UpdateViewedProductNoticesForNewUser ¶ added in v5.28.0
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
func (*App) UpdateWebConnUserActivity ¶
UpdateWebConnUserActivity sets the LastUserActivityAt of the hub for the given session.
func (*App) UploadData ¶ added in v5.28.0
func (*App) UploadEmojiImage ¶
func (*App) UploadFile ¶
func (a *App) UploadFile(c *request.Context, data []byte, channelID string, filename string) (*model.FileInfo, *model.AppError)
UploadFile uploads a single file in form of a completely constructed byte array for a channel.
func (*App) UploadFileX ¶
func (a *App) UploadFileX(c *request.Context, channelID, name string, input io.Reader, opts ...func(*UploadFileTask)) (*model.FileInfo, *model.AppError)
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.
func (*App) UploadFiles ¶
func (a *App) UploadFiles(c *request.Context, teamID string, channelID string, userID string, files []io.ReadCloser, filenames []string, clientIds []string, now time.Time) (*model.FileUploadResponse, *model.AppError)
Uploads some files to the given team and channel as the given user. files and filenames should have the same length. clientIds should either not be provided or have the same length as files and filenames. The provided files should be closed by the caller so that they are not leaked.
func (*App) UploadMultipartFiles ¶
func (*App) UpsertGroupMember ¶
func (*App) UpsertGroupSyncable ¶ added in v5.20.0
func (a *App) UpsertGroupSyncable(groupSyncable *model.GroupSyncable) (*model.GroupSyncable, *model.AppError)
func (*App) UserCanSeeOtherUser ¶
func (*App) UserIsInAdminRoleGroup ¶ added in v5.20.0
func (a *App) UserIsInAdminRoleGroup(userID, syncableID string, syncableType model.GroupSyncableType) (bool, *model.AppError)
UserIsInAdminRoleGroup returns true at least one of the user's groups are configured to set the members as admins in the given syncable.
func (*App) VerifyEmailFromToken ¶
func (*App) VerifyPlugin ¶
func (a *App) VerifyPlugin(plugin, signature io.ReadSeeker) *model.AppError
VerifyPlugin checks that the given signature corresponds to the given plugin and matches a trusted certificate.
func (*App) ViewChannel ¶
type AppIface ¶ added in v5.22.0
type AppIface interface { // @openTracingParams args ExecuteCommand(c *request.Context, args *model.CommandArgs) (*model.CommandResponse, *model.AppError) // @openTracingParams teamID // previous ListCommands now ListAutocompleteCommands ListAutocompleteCommands(teamID string, T i18n.TranslateFunc) ([]*model.Command, *model.AppError) // @openTracingParams teamID, skipSlackParsing CreateCommandPost(c *request.Context, post *model.Post, teamID string, response *model.CommandResponse, skipSlackParsing bool) (*model.Post, *model.AppError) // AddChannelMember adds a user to a channel. It is a wrapper over AddUserToChannel. AddChannelMember(c *request.Context, userID string, channel *model.Channel, opts ChannelMemberOpts) (*model.ChannelMember, *model.AppError) // 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. AddCursorIdsForPostList(originalList *model.PostList, afterPost, beforePost string, since int64, page, perPage int, collapsedThreads bool) // AddPublicKey will add plugin public key to the config. Overwrites the previous file AddPublicKey(name string, key io.Reader) *model.AppError // AddUserToChannel adds a user to a given channel. AddUserToChannel(user *model.User, channel *model.Channel, skipTeamMemberIntegrityCheck bool) (*model.ChannelMember, *model.AppError) // Caller must close the first return value FileReader(path string) (filestore.ReadCloseSeeker, *model.AppError) // 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) // 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) // 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. CheckProviderAttributes(user *model.User, patch *model.UserPatch) string // ClientConfigWithComputed gets the configuration in a format suitable for sending to the client. ClientConfigWithComputed() map[string]string // ConvertBotToUser converts a bot to user. ConvertBotToUser(bot *model.Bot, userPatch *model.UserPatch, sysadmin bool) (*model.User, *model.AppError) // ConvertUserToBot converts a user to bot. ConvertUserToBot(user *model.User) (*model.Bot, *model.AppError) // CreateBot creates the given bot and corresponding user. CreateBot(c *request.Context, bot *model.Bot) (*model.Bot, *model.AppError) // CreateChannelScheme creates a new Scheme of scope channel and assigns it to the channel. CreateChannelScheme(channel *model.Channel) (*model.Scheme, *model.AppError) // CreateDefaultChannels creates channels in the given team for each channel returned by (*App).DefaultChannelNames. // CreateDefaultChannels(c *request.Context, teamID string) ([]*model.Channel, *model.AppError) // 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. // 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. CreateDefaultMemberships(c *request.Context, since int64, includeRemovedMembers bool) error // CreateGuest creates a guest and sets several fields of the returned User struct to // their zero values. CreateGuest(c *request.Context, user *model.User) (*model.User, *model.AppError) // CreateUser creates a user and sets several fields of the returned User struct to // their zero values. CreateUser(c *request.Context, user *model.User) (*model.User, *model.AppError) // Creates and stores FileInfos for a post created before the FileInfos table existed. MigrateFilenamesToFileInfos(post *model.Post) []*model.FileInfo // DefaultChannelNames returns the list of system-wide default channel names. // // By default the list will be (not necessarily in this order): // ['town-square', 'off-topic'] // 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: // ['town-square', 'game-of-thrones', 'wow'] // DefaultChannelNames() []string // DeleteBotIconImage deletes LHS icon for a bot. DeleteBotIconImage(botUserId string) *model.AppError // DeleteChannelScheme deletes a channels scheme and sets its SchemeId to nil. DeleteChannelScheme(channel *model.Channel) (*model.Channel, *model.AppError) // DeleteGroupConstrainedMemberships deletes team and channel memberships of users who aren't members of the allowed // groups of all group-constrained teams and channels. DeleteGroupConstrainedMemberships(c *request.Context) error // DeletePublicKey will delete plugin public key from the config. DeletePublicKey(name string) *model.AppError // DemoteUserToGuest Convert user's roles and all his mermbership's roles from // regular user roles to guest roles. DemoteUserToGuest(user *model.User) *model.AppError // 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. DoPermissionsMigrations() error // 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 // 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 // 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. ExtendSessionExpiryIfNeeded(session *model.Session) bool // 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. FillInPostProps(post *model.Post, channel *model.Channel) *model.AppError // FilterNonGroupChannelMembers returns the subset of the given user IDs of the users who are not members of groups // associated to the channel excluding bots FilterNonGroupChannelMembers(userIDs []string, channel *model.Channel) ([]string, error) // FilterNonGroupTeamMembers returns the subset of the given user IDs of the users who are not members of groups // associated to the team excluding bots. FilterNonGroupTeamMembers(userIDs []string, team *model.Team) ([]string, error) // GetAllLdapGroupsPage retrieves all LDAP groups under the configured base DN using the default or configured group // filter. GetAllLdapGroupsPage(page int, perPage int, opts model.LdapGroupSearchOpts) ([]*model.Group, int, *model.AppError) // GetBot returns the given bot. GetBot(botUserId string, includeDeleted bool) (*model.Bot, *model.AppError) // GetBotIconImage retrieves LHS icon for a bot. GetBotIconImage(botUserId string) ([]byte, *model.AppError) // GetBots returns the requested page of bots. GetBots(options *model.BotGetOptions) (model.BotList, *model.AppError) // GetChannelGroupUsers returns the users who are associated to the channel via GroupChannels and GroupMembers. GetChannelGroupUsers(channelID string) ([]*model.User, *model.AppError) // GetChannelModerationsForChannel Gets a channels ChannelModerations from either the higherScoped roles or from the channel scheme roles. GetChannelModerationsForChannel(channel *model.Channel) ([]*model.ChannelModeration, *model.AppError) // 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) // GetEmojiStaticUrl returns a relative static URL for system default emojis, // and the API route for custom ones. Errors if not found or if custom and deleted. GetEmojiStaticUrl(emojiName string) (string, *model.AppError) // GetEnvironmentConfig returns a map of configuration keys whose values have been overridden by an environment variable. // If filter is not nil and returns false for a struct field, that field will be omitted. GetEnvironmentConfig(filter func(reflect.StructField) bool) map[string]interface{} // 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) // GetGroupsByTeam returns the paged list and the total count of group associated to the given team. GetGroupsByTeam(teamID string, opts model.GroupSearchOpts) ([]*model.GroupWithSchemeAdmin, int, *model.AppError) // 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) // GetLdapGroup retrieves a single LDAP group by the given LDAP group id. GetLdapGroup(ldapGroupID string) (*model.Group, *model.AppError) // GetMarketplacePlugins returns a list of plugins from the marketplace-server, // and plugins that are installed locally. GetMarketplacePlugins(filter *model.MarketplacePluginFilter) ([]*model.MarketplacePlugin, *model.AppError) // GetPluginPublicKeyFiles returns all public keys listed in the config. GetPluginPublicKeyFiles() ([]string, *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 // GetProductNotices is called from the frontend to fetch the product notices that are relevant to the caller GetProductNotices(c *request.Context, userID, teamID string, client model.NoticeClientType, clientVersion string, locale string) (model.NoticeMessages, *model.AppError) // 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 // GetSchemeRolesForChannel Checks if a channel or its team has an override scheme for channel roles and returns the scheme roles or default channel roles. GetSchemeRolesForChannel(channelID string) (guestRoleName string, userRoleName string, adminRoleName string, err *model.AppError) // GetSessionLengthInMillis returns the session length, in milliseconds, // based on the type of session (Mobile, SSO, Web/LDAP). GetSessionLengthInMillis(session *model.Session) int64 // GetSuggestions returns suggestions for user input. GetSuggestions(c *request.Context, commandArgs *model.CommandArgs, commands []*model.Command, roleID string) []model.AutocompleteSuggestion // GetTeamGroupUsers returns the users who are associated to the team via GroupTeams and GroupMembers. GetTeamGroupUsers(teamID string) ([]*model.User, *model.AppError) // GetTeamSchemeChannelRoles Checks if a team has an override scheme and returns the scheme channel role names or default channel role names. GetTeamSchemeChannelRoles(teamID string) (guestRoleName string, userRoleName string, adminRoleName string, err *model.AppError) // GetTotalUsersStats is used for the DM list total GetTotalUsersStats(viewRestrictions *model.ViewUsersRestrictions) (*model.UsersStats, *model.AppError) // HasRemote returns whether a given channelID is present in the channel remotes or not. HasRemote(channelID string, remoteID string) (bool, error) // HubRegister registers a connection to a hub. HubRegister(webConn *WebConn) // HubStart starts all the hubs. HubStart() // HubUnregister unregisters a connection from a hub. HubUnregister(webConn *WebConn) // InstallMarketplacePlugin installs a plugin listed in the marketplace server. It will get the plugin bundle // from the prepackaged folder, if available, or remotely if EnableRemoteMarketplace is true. InstallMarketplacePlugin(request *model.InstallMarketplacePluginRequest) (*model.Manifest, *model.AppError) // InstallPlugin unpacks and installs a plugin but does not enable or activate it. InstallPlugin(pluginFile io.ReadSeeker, replace bool) (*model.Manifest, *model.AppError) // InstallPluginWithSignature verifies and installs plugin. InstallPluginWithSignature(pluginFile, signature io.ReadSeeker) (*model.Manifest, *model.AppError) // LimitedClientConfigWithComputed gets the configuration in a format suitable for sending to the client. LimitedClientConfigWithComputed() map[string]string // LogAuditRec logs an audit record using default LvlAuditCLI. LogAuditRec(rec *audit.Record, err error) // LogAuditRecWithLevel logs an audit record using specified Level. LogAuditRecWithLevel(rec *audit.Record, level mlog.LogLevel, err error) // MakeAuditRecord creates a audit record pre-populated with defaults. MakeAuditRecord(event string, initialStatus string) *audit.Record // MarkChanelAsUnreadFromPost will take a post and set the channel as unread from that one. MarkChannelAsUnreadFromPost(postID string, userID string, collapsedThreadsSupported, followThread bool) (*model.ChannelUnreadAt, *model.AppError) // MentionsToPublicChannels returns all the mentions to public channels, // linking them to their channels MentionsToPublicChannels(message, teamID string) model.ChannelMentionMap // MentionsToTeamMembers returns all the @ mentions found in message that // belong to users in the specified team, linking them to their users MentionsToTeamMembers(message, teamID string) model.UserMentionMap // MoveChannel method is prone to data races if someone joins to channel during the move process. However this // function is only exposed to sysadmins and the possibility of this edge case is relatively small. MoveChannel(c *request.Context, team *model.Team, channel *model.Channel, user *model.User) *model.AppError // NewWebConn returns a new WebConn instance. NewWebConn(cfg *WebConnConfig) *WebConn // NewWebHub creates a new Hub. NewWebHub() *Hub // NotifySessionsExpired is called periodically from the job server to notify any mobile sessions that have expired. NotifySessionsExpired() *model.AppError // 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. OverrideIconURLIfEmoji(post *model.Post) // PatchBot applies the given patch to the bot and corresponding user. PatchBot(botUserId string, botPatch *model.BotPatch) (*model.Bot, *model.AppError) // PatchChannelModerationsForChannel Updates a channels scheme roles based on a given ChannelModerationPatch, if the permissions match the higher scoped role the scheme is deleted. PatchChannelModerationsForChannel(channel *model.Channel, channelModerationsPatch []*model.ChannelModerationPatch) ([]*model.ChannelModeration, *model.AppError) // 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 DoActionRequest(c *request.Context, rawURL string, body []byte) (*http.Response, *model.AppError) // PermanentDeleteBot permanently deletes a bot and its corresponding user. PermanentDeleteBot(botUserId string) *model.AppError // PopulateWebConnConfig checks if the connection id already exists in the hub, // and if so, accordingly populates the other fields of the webconn. PopulateWebConnConfig(s *model.Session, cfg *WebConnConfig, seqVal string) (*WebConnConfig, error) // PromoteGuestToUser Convert user's roles and all his mermbership's roles from // guest roles to regular user roles. PromoteGuestToUser(c *request.Context, user *model.User, requestorId string) *model.AppError // RenameChannel is used to rename the channel Name and the DisplayName fields RenameChannel(channel *model.Channel, newChannelName string, newDisplayName string) (*model.Channel, *model.AppError) // RenameTeam is used to rename the team Name and the DisplayName fields RenameTeam(team *model.Team, newTeamName string, newDisplayName string) (*model.Team, *model.AppError) // 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. SaveConfig(newCfg *model.Config, sendConfigChangeClusterMessage bool) (*model.Config, *model.Config, *model.AppError) // 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. SearchAllChannels(term string, opts model.ChannelSearchOpts) (*model.ChannelListWithTeamData, int64, *model.AppError) // SearchAllTeams returns a team list and the total count of the results SearchAllTeams(searchOpts *model.TeamSearch) ([]*model.Team, int64, *model.AppError) // SendAdminUpgradeRequestEmail takes the username of user trying to alert admins and then applies rate limit of n (number of admins) emails per user per day // before sending the emails. SendAdminUpgradeRequestEmail(username string, subscription *model.Subscription, action string) *model.AppError // SendNoCardPaymentFailedEmail SendNoCardPaymentFailedEmail() *model.AppError // 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. SessionHasPermissionToManageBot(session model.Session, botUserId string) *model.AppError // SessionIsRegistered determines if a specific session has been registered SessionIsRegistered(session model.Session) bool // SetBotIconImage sets LHS icon for a bot. SetBotIconImage(botUserId string, file io.ReadSeeker) *model.AppError // SetBotIconImageFromMultiPartFile sets LHS icon for a bot. SetBotIconImageFromMultiPartFile(botUserId string, imageData *multipart.FileHeader) *model.AppError // SetSessionExpireInDays sets the session's expiry the specified number of days // relative to either the session creation date or the current time, depending // on the `ExtendSessionOnActivity` config setting. SetSessionExpireInDays(session *model.Session, days int) // 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) // 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 SetStatusLastActivityAt(userID string, activityAt int64) // 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. SyncLdap(includeRemovedMembers bool) // 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. SyncRolesAndMembership(c *request.Context, syncableID string, syncableType model.GroupSyncableType, includeRemovedMembers bool) // 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 // TODO: migrate this after the user service implementation is completed GetSanitizeOptions(asAdmin bool) map[string]bool // 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) // 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) // This function migrates the default built in roles from code/config to the database. DoAdvancedPermissionsMigration() // 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 CreateZipFileAndAddFiles(fileBackend filestore.FileBackend, fileDatas []model.FileData, zipFileName, directory string) error // This to be used for places we check the users password when they are already logged in DoubleCheckPassword(user *model.User, password string) *model.AppError // UpdateBotActive marks a bot as active or inactive, along with its corresponding user. UpdateBotActive(c *request.Context, botUserId string, active bool) (*model.Bot, *model.AppError) // UpdateBotOwner changes a bot's owner to the given value. UpdateBotOwner(botUserId, newOwnerId string) (*model.Bot, *model.AppError) // UpdateChannel updates a given channel by its Id. It also publishes the CHANNEL_UPDATED event. UpdateChannel(channel *model.Channel) (*model.Channel, *model.AppError) // UpdateChannelScheme saves the new SchemeId of the channel passed. UpdateChannelScheme(channel *model.Channel) (*model.Channel, *model.AppError) // 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() // UpdateProductNotices is called periodically from a scheduled worker to fetch new notices and update the cache UpdateProductNotices() *model.AppError // UpdateViewedProductNotices is called from the frontend to mark a set of notices as 'viewed' by user UpdateViewedProductNotices(userID string, noticeIds []string) *model.AppError // 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 UpdateViewedProductNoticesForNewUser(userID string) // UpdateWebConnUserActivity sets the LastUserActivityAt of the hub for the given session. UpdateWebConnUserActivity(session model.Session, activityAt int64) // UploadFile uploads a single file in form of a completely constructed byte array for a channel. UploadFile(c *request.Context, data []byte, channelID string, filename string) (*model.FileInfo, *model.AppError) // 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. UploadFileX(c *request.Context, channelID, name string, input io.Reader, opts ...func(*UploadFileTask)) (*model.FileInfo, *model.AppError) // Uploads some files to the given team and channel as the given user. files and filenames should have // the same length. clientIds should either not be provided or have the same length as files and filenames. // The provided files should be closed by the caller so that they are not leaked. UploadFiles(c *request.Context, teamID string, channelID string, userID string, files []io.ReadCloser, filenames []string, clientIds []string, now time.Time) (*model.FileUploadResponse, *model.AppError) // 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) // VerifyPlugin checks that the given signature corresponds to the given plugin and matches a trusted certificate. VerifyPlugin(plugin, signature io.ReadSeeker) *model.AppError //GetUserStatusesByIds used by apiV4 GetUserStatusesByIds(userIDs []string) ([]*model.Status, *model.AppError) //nolint:golint,unused,deadcode GetWarnMetricsBot() (*model.Bot, *model.AppError) AccountMigration() einterfaces.AccountMigrationInterface ActivateMfa(userID, token string) *model.AppError AddChannelsToRetentionPolicy(policyID string, channelIDs []string) *model.AppError AddConfigListener(listener func(*model.Config, *model.Config)) string AddDirectChannels(teamID string, user *model.User) *model.AppError AddLdapPrivateCertificate(fileData *multipart.FileHeader) *model.AppError AddLdapPublicCertificate(fileData *multipart.FileHeader) *model.AppError AddRemoteCluster(rc *model.RemoteCluster) (*model.RemoteCluster, *model.AppError) AddSamlIdpCertificate(fileData *multipart.FileHeader) *model.AppError AddSamlPrivateCertificate(fileData *multipart.FileHeader) *model.AppError AddSamlPublicCertificate(fileData *multipart.FileHeader) *model.AppError AddSessionToCache(session *model.Session) AddStatusCache(status *model.Status) AddStatusCacheSkipClusterSend(status *model.Status) AddTeamMember(c *request.Context, teamID, userID string) (*model.TeamMember, *model.AppError) AddTeamMemberByInviteId(c *request.Context, inviteId, userID string) (*model.TeamMember, *model.AppError) AddTeamMemberByToken(c *request.Context, userID, tokenID string) (*model.TeamMember, *model.AppError) AddTeamMembers(c *request.Context, teamID string, userIDs []string, userRequestorId string, graceful bool) ([]*model.TeamMemberWithError, *model.AppError) AddTeamsToRetentionPolicy(policyID string, teamIDs []string) *model.AppError AddUserToTeam(c *request.Context, teamID string, userID string, userRequestorId string) (*model.Team, *model.TeamMember, *model.AppError) AddUserToTeamByInviteId(c *request.Context, inviteId string, userID string) (*model.Team, *model.TeamMember, *model.AppError) AddUserToTeamByTeamId(c *request.Context, teamID string, user *model.User) *model.AppError AddUserToTeamByToken(c *request.Context, userID string, tokenID string) (*model.Team, *model.TeamMember, *model.AppError) AdjustImage(file io.Reader) (*bytes.Buffer, *model.AppError) AllowOAuthAppAccessToUser(userID string, authRequest *model.AuthorizeRequest) (string, *model.AppError) AppendFile(fr io.Reader, path string) (int64, *model.AppError) AsymmetricSigningKey() *ecdsa.PrivateKey AttachDeviceId(sessionID string, deviceID string, expiresAt int64) *model.AppError AttachSessionCookies(c *request.Context, w http.ResponseWriter, r *http.Request) AuthenticateUserForLogin(c *request.Context, id, loginId, password, mfaToken, cwsToken string, ldapOnly bool) (user *model.User, err *model.AppError) AuthorizeOAuthUser(w http.ResponseWriter, r *http.Request, service, code, state, redirectUri string) (io.ReadCloser, string, map[string]string, *model.User, *model.AppError) AutocompleteChannels(teamID string, term string) (*model.ChannelList, *model.AppError) AutocompleteChannelsForSearch(teamID string, userID string, term string) (*model.ChannelList, *model.AppError) AutocompleteUsersInChannel(teamID string, channelID string, term string, options *model.UserSearchOptions) (*model.UserAutocompleteInChannel, *model.AppError) AutocompleteUsersInTeam(teamID string, term string, options *model.UserSearchOptions) (*model.UserAutocompleteInTeam, *model.AppError) BroadcastStatus(status *model.Status) BuildPostReactions(postID string) (*[]ReactionImportData, *model.AppError) BuildPushNotificationMessage(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) BuildSamlMetadataObject(idpMetadata []byte) (*model.SamlMetadataResponse, *model.AppError) BulkExport(writer io.Writer, outPath string, opts BulkExportOpts) *model.AppError BulkImport(c *request.Context, jsonlReader io.Reader, attachmentsReader *zip.Reader, dryRun bool, workers int) (*model.AppError, int) BulkImportWithPath(c *request.Context, jsonlReader io.Reader, attachmentsReader *zip.Reader, dryRun bool, workers int, importPath string) (*model.AppError, int) CancelJob(jobId string) *model.AppError ChannelMembersToRemove(teamID *string) ([]*model.ChannelMember, *model.AppError) CheckAndSendUserLimitWarningEmails(c *request.Context) *model.AppError CheckCloudAccountAtLimit() (bool, *model.AppError) CheckForClientSideCert(r *http.Request) (string, string, string) CheckIntegrity() <-chan model.IntegrityCheckResult CheckMandatoryS3Fields(settings *model.FileSettings) *model.AppError CheckPasswordAndAllCriteria(user *model.User, password string, mfaToken string) *model.AppError CheckRolesExist(roleNames []string) *model.AppError CheckUserAllAuthenticationCriteria(user *model.User, mfaToken string) *model.AppError CheckUserMfa(user *model.User, token string) *model.AppError CheckUserPostflightAuthenticationCriteria(user *model.User) *model.AppError CheckUserPreflightAuthenticationCriteria(user *model.User, mfaToken string) *model.AppError CheckValidDomains(team *model.Team) *model.AppError CheckWebConn(userID, connectionID string) *CheckConnResult ClearChannelMembersCache(channelID string) ClearSessionCacheForAllUsers() ClearSessionCacheForAllUsersSkipClusterSend() ClearSessionCacheForUser(userID string) ClearSessionCacheForUserSkipClusterSend(userID string) ClearTeamMembersCache(teamID string) ClientConfig() map[string]string ClientConfigHash() string Cloud() einterfaces.CloudInterface Cluster() einterfaces.ClusterInterface CompareAndDeletePluginKey(pluginID string, key string, oldValue []byte) (bool, *model.AppError) CompareAndSetPluginKey(pluginID string, key string, oldValue, newValue []byte) (bool, *model.AppError) CompleteOAuth(c *request.Context, service string, body io.ReadCloser, teamID string, props map[string]string, tokenUser *model.User) (*model.User, *model.AppError) CompleteSwitchWithOAuth(service string, userData io.Reader, email string, tokenUser *model.User) (*model.User, *model.AppError) Compliance() einterfaces.ComplianceInterface Config() *model.Config CopyFileInfos(userID string, fileIDs []string) ([]string, *model.AppError) CreateChannel(c *request.Context, channel *model.Channel, addMember bool) (*model.Channel, *model.AppError) CreateChannelWithUser(c *request.Context, channel *model.Channel, userID string) (*model.Channel, *model.AppError) CreateCommand(cmd *model.Command) (*model.Command, *model.AppError) CreateCommandWebhook(commandID string, args *model.CommandArgs) (*model.CommandWebhook, *model.AppError) CreateEmoji(sessionUserId string, emoji *model.Emoji, multiPartImageData *multipart.Form) (*model.Emoji, *model.AppError) CreateGroup(group *model.Group) (*model.Group, *model.AppError) CreateGroupChannel(userIDs []string, creatorId string) (*model.Channel, *model.AppError) CreateIncomingWebhookForChannel(creatorId string, channel *model.Channel, hook *model.IncomingWebhook) (*model.IncomingWebhook, *model.AppError) CreateJob(job *model.Job) (*model.Job, *model.AppError) CreateOAuthApp(app *model.OAuthApp) (*model.OAuthApp, *model.AppError) CreateOAuthStateToken(extra string) (*model.Token, *model.AppError) CreateOAuthUser(c *request.Context, service string, userData io.Reader, teamID string, tokenUser *model.User) (*model.User, *model.AppError) CreateOutgoingWebhook(hook *model.OutgoingWebhook) (*model.OutgoingWebhook, *model.AppError) CreatePasswordRecoveryToken(userID, email string) (*model.Token, *model.AppError) CreatePost(c *request.Context, post *model.Post, channel *model.Channel, triggerWebhooks, setOnline bool) (savedPost *model.Post, err *model.AppError) CreatePostAsUser(c *request.Context, post *model.Post, currentSessionId string, setOnline bool) (*model.Post, *model.AppError) CreatePostMissingChannel(c *request.Context, post *model.Post, triggerWebhooks bool) (*model.Post, *model.AppError) CreateRetentionPolicy(policy *model.RetentionPolicyWithTeamAndChannelIDs) (*model.RetentionPolicyWithTeamAndChannelCounts, *model.AppError) CreateRole(role *model.Role) (*model.Role, *model.AppError) CreateScheme(scheme *model.Scheme) (*model.Scheme, *model.AppError) CreateSession(session *model.Session) (*model.Session, *model.AppError) CreateSidebarCategory(userID, teamID string, newCategory *model.SidebarCategoryWithChannels) (*model.SidebarCategoryWithChannels, *model.AppError) CreateTeam(c *request.Context, team *model.Team) (*model.Team, *model.AppError) CreateTeamWithUser(c *request.Context, team *model.Team, userID string) (*model.Team, *model.AppError) CreateTermsOfService(text, userID string) (*model.TermsOfService, *model.AppError) CreateUploadSession(us *model.UploadSession) (*model.UploadSession, *model.AppError) CreateUserAccessToken(token *model.UserAccessToken) (*model.UserAccessToken, *model.AppError) CreateUserAsAdmin(c *request.Context, user *model.User, redirect string) (*model.User, *model.AppError) CreateUserFromSignup(c *request.Context, user *model.User, redirect string) (*model.User, *model.AppError) CreateUserWithInviteId(c *request.Context, user *model.User, inviteId, redirect string) (*model.User, *model.AppError) CreateUserWithToken(c *request.Context, user *model.User, token *model.Token) (*model.User, *model.AppError) CreateWebhookPost(c *request.Context, userID string, channel *model.Channel, text, overrideUsername, overrideIconURL, overrideIconEmoji string, props model.StringInterface, postType string, postRootId string) (*model.Post, *model.AppError) DBHealthCheckDelete() error DBHealthCheckWrite() error DataRetention() einterfaces.DataRetentionInterface DeactivateGuests(c *request.Context) *model.AppError DeactivateMfa(userID string) *model.AppError DeleteAllExpiredPluginKeys() *model.AppError DeleteAllKeysForPlugin(pluginID string) *model.AppError DeleteBrandImage() *model.AppError DeleteChannel(c *request.Context, channel *model.Channel, userID string) *model.AppError DeleteCommand(commandID string) *model.AppError DeleteEmoji(emoji *model.Emoji) *model.AppError DeleteEphemeralPost(userID, postID string) DeleteExport(name string) *model.AppError DeleteFlaggedPosts(postID string) DeleteGroup(groupID string) (*model.Group, *model.AppError) DeleteGroupMember(groupID string, userID string) (*model.GroupMember, *model.AppError) DeleteGroupSyncable(groupID string, syncableID string, syncableType model.GroupSyncableType) (*model.GroupSyncable, *model.AppError) DeleteIncomingWebhook(hookID string) *model.AppError DeleteOAuthApp(appID string) *model.AppError DeleteOutgoingWebhook(hookID string) *model.AppError DeletePluginKey(pluginID string, key string) *model.AppError DeletePost(postID, deleteByID string) (*model.Post, *model.AppError) DeletePostFiles(post *model.Post) DeletePreferences(userID string, preferences model.Preferences) *model.AppError DeleteReactionForPost(c *request.Context, reaction *model.Reaction) *model.AppError DeleteRemoteCluster(remoteClusterId string) (bool, *model.AppError) DeleteRetentionPolicy(policyID string) *model.AppError DeleteScheme(schemeId string) (*model.Scheme, *model.AppError) DeleteSidebarCategory(userID, teamID, categoryId string) *model.AppError DeleteToken(token *model.Token) *model.AppError DisableAutoResponder(userID string, asAdmin bool) *model.AppError DisableUserAccessToken(token *model.UserAccessToken) *model.AppError DoAppMigrations() DoCommandRequest(cmd *model.Command, p url.Values) (*model.Command, *model.CommandResponse, *model.AppError) DoEmojisPermissionsMigration() DoGuestRolesCreationMigration() DoLocalRequest(c *request.Context, rawURL string, body []byte) (*http.Response, *model.AppError) DoLogin(c *request.Context, w http.ResponseWriter, r *http.Request, user *model.User, deviceID string, isMobile, isOAuthUser, isSaml bool) *model.AppError DoPostAction(c *request.Context, postID, actionId, userID, selectedOption string) (string, *model.AppError) DoPostActionWithCookie(c *request.Context, postID, actionId, userID, selectedOption string, cookie *model.PostActionCookie) (string, *model.AppError) DoSystemConsoleRolesCreationMigration() DoUploadFile(c *request.Context, now time.Time, rawTeamId string, rawChannelId string, rawUserId string, rawFilename string, data []byte) (*model.FileInfo, *model.AppError) DoUploadFileExpectModification(c *request.Context, now time.Time, rawTeamId string, rawChannelId string, rawUserId string, rawFilename string, data []byte) (*model.FileInfo, []byte, *model.AppError) DownloadFromURL(downloadURL string) ([]byte, error) EnableUserAccessToken(token *model.UserAccessToken) *model.AppError EnvironmentConfig(filter func(reflect.StructField) bool) map[string]interface{} ExportPermissions(w io.Writer) error ExtractContentFromFileInfo(fileInfo *model.FileInfo) error FetchSamlMetadataFromIdp(url string) ([]byte, *model.AppError) FileBackend() (filestore.FileBackend, *model.AppError) FileExists(path string) (bool, *model.AppError) FileModTime(path string) (time.Time, *model.AppError) FileSize(path string) (int64, *model.AppError) FillInChannelProps(channel *model.Channel) *model.AppError FillInChannelsProps(channelList *model.ChannelList) *model.AppError FilterUsersByVisible(viewer *model.User, otherUsers []*model.User) ([]*model.User, *model.AppError) FindTeamByName(name string) bool GenerateMfaSecret(userID string) (*model.MfaSecret, *model.AppError) GeneratePublicLink(siteURL string, info *model.FileInfo) string GenerateSupportPacket() []model.FileData GetActivePluginManifests() ([]*model.Manifest, *model.AppError) GetAllChannels(page, perPage int, opts model.ChannelSearchOpts) (*model.ChannelListWithTeamData, *model.AppError) GetAllChannelsCount(opts model.ChannelSearchOpts) (int64, *model.AppError) GetAllPrivateTeams() ([]*model.Team, *model.AppError) GetAllPublicTeams() ([]*model.Team, *model.AppError) GetAllRemoteClusters(filter model.RemoteClusterQueryFilter) ([]*model.RemoteCluster, *model.AppError) GetAllStatuses() map[string]*model.Status GetAllTeams() ([]*model.Team, *model.AppError) GetAllTeamsPage(offset int, limit int, opts *model.TeamSearch) ([]*model.Team, *model.AppError) GetAllTeamsPageWithCount(offset int, limit int, opts *model.TeamSearch) (*model.TeamsWithCount, *model.AppError) GetAnalytics(name string, teamID string) (model.AnalyticsRows, *model.AppError) GetAudits(userID string, limit int) (model.Audits, *model.AppError) GetAuditsPage(userID string, page int, perPage int) (model.Audits, *model.AppError) GetAuthorizationCode(w http.ResponseWriter, r *http.Request, service string, props map[string]string, loginHint string) (string, *model.AppError) GetAuthorizedAppsForUser(userID string, page, perPage int) ([]*model.OAuthApp, *model.AppError) GetBrandImage() ([]byte, *model.AppError) GetBulkReactionsForPosts(postIDs []string) (map[string][]*model.Reaction, *model.AppError) GetChannel(channelID string) (*model.Channel, *model.AppError) GetChannelByName(channelName, teamID string, includeDeleted bool) (*model.Channel, *model.AppError) GetChannelByNameForTeamName(channelName, teamName string, includeDeleted bool) (*model.Channel, *model.AppError) GetChannelCounts(teamID string, userID string) (*model.ChannelCounts, *model.AppError) GetChannelGuestCount(channelID string) (int64, *model.AppError) GetChannelMember(ctx context.Context, channelID string, userID string) (*model.ChannelMember, *model.AppError) GetChannelMemberCount(channelID string) (int64, *model.AppError) GetChannelMembersByIds(channelID string, userIDs []string) (*model.ChannelMembers, *model.AppError) GetChannelMembersForUser(teamID string, userID string) (*model.ChannelMembers, *model.AppError) GetChannelMembersForUserWithPagination(teamID, userID string, page, perPage int) ([]*model.ChannelMember, *model.AppError) GetChannelMembersPage(channelID string, page, perPage int) (*model.ChannelMembers, *model.AppError) GetChannelMembersTimezones(channelID string) ([]string, *model.AppError) GetChannelPinnedPostCount(channelID string) (int64, *model.AppError) GetChannelPoliciesForUser(userID string, offset, limit int) (*model.RetentionPolicyForChannelList, *model.AppError) GetChannelUnread(channelID, userID string) (*model.ChannelUnread, *model.AppError) GetChannelsByNames(channelNames []string, teamID string) ([]*model.Channel, *model.AppError) GetChannelsForRetentionPolicy(policyID string, offset, limit int) (*model.ChannelsWithCount, *model.AppError) GetChannelsForScheme(scheme *model.Scheme, offset int, limit int) (model.ChannelList, *model.AppError) GetChannelsForSchemePage(scheme *model.Scheme, page int, perPage int) (model.ChannelList, *model.AppError) GetChannelsForUser(teamID string, userID string, includeDeleted bool, lastDeleteAt int) (*model.ChannelList, *model.AppError) GetChannelsUserNotIn(teamID string, userID string, offset int, limit int) (*model.ChannelList, *model.AppError) GetCloudSession(token string) (*model.Session, *model.AppError) GetClusterId() string GetClusterStatus() []*model.ClusterInfo GetCommand(commandID string) (*model.Command, *model.AppError) GetCommonTeamIDsForTwoUsers(userID, otherUserID string) ([]string, *model.AppError) GetComplianceFile(job *model.Compliance) ([]byte, *model.AppError) GetComplianceReport(reportId string) (*model.Compliance, *model.AppError) GetComplianceReports(page, perPage int) (model.Compliances, *model.AppError) GetCookieDomain() string GetDefaultProfileImage(user *model.User) ([]byte, *model.AppError) GetDeletedChannels(teamID string, offset int, limit int, userID string) (*model.ChannelList, *model.AppError) GetEmoji(emojiId string) (*model.Emoji, *model.AppError) GetEmojiByName(emojiName string) (*model.Emoji, *model.AppError) GetEmojiImage(emojiId string) ([]byte, string, *model.AppError) GetEmojiList(page, perPage int, sort string) ([]*model.Emoji, *model.AppError) GetErrorListForEmailsOverLimit(emailList []string, cloudUserLimit int64) ([]string, []*model.EmailInviteWithError, *model.AppError) GetFile(fileID string) ([]byte, *model.AppError) GetFileInfo(fileID string) (*model.FileInfo, *model.AppError) GetFileInfos(page, perPage int, opt *model.GetFileInfosOptions) ([]*model.FileInfo, *model.AppError) GetFileInfosForPost(postID string, fromMaster bool) ([]*model.FileInfo, *model.AppError) GetFileInfosForPostWithMigration(postID string) ([]*model.FileInfo, *model.AppError) GetFlaggedPosts(userID string, offset int, limit int) (*model.PostList, *model.AppError) GetFlaggedPostsForChannel(userID, channelID string, offset int, limit int) (*model.PostList, *model.AppError) GetFlaggedPostsForTeam(userID, teamID string, offset int, limit int) (*model.PostList, *model.AppError) GetGlobalRetentionPolicy() (*model.GlobalRetentionPolicy, *model.AppError) GetGroup(id string) (*model.Group, *model.AppError) GetGroupByName(name string, opts model.GroupSearchOpts) (*model.Group, *model.AppError) GetGroupByRemoteID(remoteID string, groupSource model.GroupSource) (*model.Group, *model.AppError) GetGroupChannel(userIDs []string) (*model.Channel, *model.AppError) GetGroupMemberCount(groupID string) (int64, *model.AppError) GetGroupMemberUsers(groupID string) ([]*model.User, *model.AppError) GetGroupMemberUsersPage(groupID string, page int, perPage int) ([]*model.User, int, *model.AppError) GetGroupSyncable(groupID string, syncableID string, syncableType model.GroupSyncableType) (*model.GroupSyncable, *model.AppError) GetGroupSyncables(groupID string, syncableType model.GroupSyncableType) ([]*model.GroupSyncable, *model.AppError) GetGroups(page, perPage int, opts model.GroupSearchOpts) ([]*model.Group, *model.AppError) GetGroupsAssociatedToChannelsByTeam(teamID string, opts model.GroupSearchOpts) (map[string][]*model.GroupWithSchemeAdmin, *model.AppError) GetGroupsByChannel(channelID string, opts model.GroupSearchOpts) ([]*model.GroupWithSchemeAdmin, int, *model.AppError) GetGroupsByIDs(groupIDs []string) ([]*model.Group, *model.AppError) GetGroupsBySource(groupSource model.GroupSource) ([]*model.Group, *model.AppError) GetGroupsByUserId(userID string) ([]*model.Group, *model.AppError) GetHubForUserId(userID string) *Hub 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) GetIncomingWebhooksPage(page, perPage int) ([]*model.IncomingWebhook, *model.AppError) GetIncomingWebhooksPageByUser(userID string, page, perPage int) ([]*model.IncomingWebhook, *model.AppError) GetJob(id string) (*model.Job, *model.AppError) GetJobs(offset int, limit int) ([]*model.Job, *model.AppError) GetJobsByType(jobType string, offset int, limit int) ([]*model.Job, *model.AppError) GetJobsByTypePage(jobType string, page int, perPage int) ([]*model.Job, *model.AppError) GetJobsByTypes(jobTypes []string, offset int, limit int) ([]*model.Job, *model.AppError) GetJobsByTypesPage(jobType []string, page int, perPage int) ([]*model.Job, *model.AppError) GetJobsPage(page int, perPage int) ([]*model.Job, *model.AppError) GetLatestTermsOfService() (*model.TermsOfService, *model.AppError) GetLogs(page, perPage int) ([]string, *model.AppError) GetLogsSkipSend(page, perPage int) ([]string, *model.AppError) GetMemberCountsByGroup(ctx context.Context, channelID string, includeTimezones bool) ([]*model.ChannelMemberCountByGroup, *model.AppError) GetMessageForNotification(post *model.Post, translateFunc i18n.TranslateFunc) string GetMultipleEmojiByName(names []string) ([]*model.Emoji, *model.AppError) GetNewUsersForTeamPage(teamID string, page, perPage int, asAdmin bool, viewRestrictions *model.ViewUsersRestrictions) ([]*model.User, *model.AppError) GetNextPostIdFromPostList(postList *model.PostList, collapsedThreads bool) string GetNotificationNameFormat(user *model.User) string GetNumberOfChannelsOnTeam(teamID string) (int, *model.AppError) GetOAuthAccessTokenForCodeFlow(clientId, grantType, redirectUri, code, secret, refreshToken string) (*model.AccessResponse, *model.AppError) GetOAuthAccessTokenForImplicitFlow(userID string, authRequest *model.AuthorizeRequest) (*model.Session, *model.AppError) GetOAuthApp(appID string) (*model.OAuthApp, *model.AppError) GetOAuthApps(page, perPage int) ([]*model.OAuthApp, *model.AppError) GetOAuthAppsByCreator(userID string, page, perPage int) ([]*model.OAuthApp, *model.AppError) GetOAuthCodeRedirect(userID string, authRequest *model.AuthorizeRequest) (string, *model.AppError) GetOAuthImplicitRedirect(userID string, authRequest *model.AuthorizeRequest) (string, *model.AppError) GetOAuthLoginEndpoint(w http.ResponseWriter, r *http.Request, service, teamID, action, redirectTo, loginHint string, isMobile bool) (string, *model.AppError) GetOAuthSignupEndpoint(w http.ResponseWriter, r *http.Request, service, teamID string) (string, *model.AppError) GetOAuthStateToken(token string) (*model.Token, *model.AppError) GetOpenGraphMetadata(requestURL string) *opengraph.OpenGraph GetOrCreateDirectChannel(c *request.Context, userID, otherUserID string, channelOptions ...model.ChannelOption) (*model.Channel, *model.AppError) GetOutgoingWebhook(hookID string) (*model.OutgoingWebhook, *model.AppError) GetOutgoingWebhooksForChannelPageByUser(channelID string, userID string, page, perPage int) ([]*model.OutgoingWebhook, *model.AppError) GetOutgoingWebhooksForTeamPage(teamID string, page, perPage int) ([]*model.OutgoingWebhook, *model.AppError) GetOutgoingWebhooksForTeamPageByUser(teamID string, userID string, page, perPage int) ([]*model.OutgoingWebhook, *model.AppError) GetOutgoingWebhooksPage(page, perPage int) ([]*model.OutgoingWebhook, *model.AppError) GetOutgoingWebhooksPageByUser(userID string, page, perPage int) ([]*model.OutgoingWebhook, *model.AppError) GetPasswordRecoveryToken(token string) (*model.Token, *model.AppError) GetPermalinkPost(c *request.Context, postID string, userID string) (*model.PostList, *model.AppError) GetPinnedPosts(channelID string) (*model.PostList, *model.AppError) GetPluginKey(pluginID string, key string) ([]byte, *model.AppError) GetPlugins() (*model.PluginsResponse, *model.AppError) 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) GetPostIfAuthorized(postID string, session *model.Session) (*model.Post, *model.AppError) GetPostThread(postID string, skipFetchThreads, collapsedThreads, collapsedThreadsExtended bool, userID string) (*model.PostList, *model.AppError) GetPosts(channelID string, offset int, limit int) (*model.PostList, *model.AppError) 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) GetPostsEtag(channelID string, collapsedThreads bool) string GetPostsForChannelAroundLastUnread(channelID, userID string, limitBefore, limitAfter int, skipFetchThreads bool, collapsedThreads, collapsedThreadsExtended bool) (*model.PostList, *model.AppError) GetPostsPage(options model.GetPostsOptions) (*model.PostList, *model.AppError) GetPostsSince(options model.GetPostsSinceOptions) (*model.PostList, *model.AppError) GetPreferenceByCategoryAndNameForUser(userID string, category string, preferenceName string) (*model.Preference, *model.AppError) GetPreferenceByCategoryForUser(userID string, category string) (model.Preferences, *model.AppError) GetPreferencesForUser(userID string) (model.Preferences, *model.AppError) GetPrevPostIdFromPostList(postList *model.PostList, collapsedThreads bool) string GetPrivateChannelsForTeam(teamID string, offset int, limit int) (*model.ChannelList, *model.AppError) GetProfileImage(user *model.User) ([]byte, bool, *model.AppError) GetPublicChannelsByIdsForTeam(teamID string, channelIDs []string) (*model.ChannelList, *model.AppError) GetPublicChannelsForTeam(teamID string, offset int, limit int) (*model.ChannelList, *model.AppError) GetReactionsForPost(postID string) ([]*model.Reaction, *model.AppError) GetRecentlyActiveUsersForTeam(teamID string) (map[string]*model.User, *model.AppError) GetRecentlyActiveUsersForTeamPage(teamID string, page, perPage int, asAdmin bool, viewRestrictions *model.ViewUsersRestrictions) ([]*model.User, *model.AppError) 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) GetRetentionPolicies(offset, limit int) (*model.RetentionPolicyWithTeamAndChannelCountsList, *model.AppError) GetRetentionPoliciesCount() (int64, *model.AppError) GetRetentionPolicy(policyID string) (*model.RetentionPolicyWithTeamAndChannelCounts, *model.AppError) GetRole(id string) (*model.Role, *model.AppError) GetRoleByName(ctx context.Context, name string) (*model.Role, *model.AppError) GetRolesByNames(names []string) ([]*model.Role, *model.AppError) GetSamlCertificateStatus() *model.SamlCertificateStatus GetSamlMetadata() (string, *model.AppError) GetSamlMetadataFromIdp(idpMetadataUrl string) (*model.SamlMetadataResponse, *model.AppError) GetScheme(id string) (*model.Scheme, *model.AppError) GetSchemeByName(name string) (*model.Scheme, *model.AppError) GetSchemeRolesForTeam(teamID string) (string, string, string, *model.AppError) 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) GetSessionById(sessionID string) (*model.Session, *model.AppError) GetSessions(userID string) ([]*model.Session, *model.AppError) GetSidebarCategories(userID, teamID string) (*model.OrderedSidebarCategories, *model.AppError) GetSidebarCategory(categoryId string) (*model.SidebarCategoryWithChannels, *model.AppError) GetSidebarCategoryOrder(userID, teamID string) ([]string, *model.AppError) GetSinglePost(postID string) (*model.Post, *model.AppError) GetSiteURL() string GetStatus(userID string) (*model.Status, *model.AppError) GetStatusFromCache(userID string) *model.Status GetStatusesByIds(userIDs []string) (map[string]interface{}, *model.AppError) GetSubscriptionStats() (*model.SubscriptionStats, *model.AppError) GetSystemBot() (*model.Bot, *model.AppError) GetTeam(teamID string) (*model.Team, *model.AppError) 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) GetTeamMember(teamID, userID string) (*model.TeamMember, *model.AppError) 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) GetTeamMembersForUser(userID string) ([]*model.TeamMember, *model.AppError) GetTeamMembersForUserWithPagination(userID string, page, perPage int) ([]*model.TeamMember, *model.AppError) GetTeamPoliciesForUser(userID string, offset, limit int) (*model.RetentionPolicyForTeamList, *model.AppError) GetTeamStats(teamID string, restrictions *model.ViewUsersRestrictions) (*model.TeamStats, *model.AppError) GetTeamUnread(teamID, userID string) (*model.TeamUnread, *model.AppError) GetTeamsForRetentionPolicy(policyID string, offset, limit int) (*model.TeamsWithCount, *model.AppError) GetTeamsForScheme(scheme *model.Scheme, offset int, limit int) ([]*model.Team, *model.AppError) GetTeamsForSchemePage(scheme *model.Scheme, page int, perPage int) ([]*model.Team, *model.AppError) GetTeamsForUser(userID string) ([]*model.Team, *model.AppError) GetTeamsUnreadForUser(excludeTeamId string, userID string) ([]*model.TeamUnread, *model.AppError) GetTermsOfService(id string) (*model.TermsOfService, *model.AppError) GetThreadForUser(teamID string, threadMembership *model.ThreadMembership, extended bool) (*model.ThreadResponse, *model.AppError) GetThreadMembershipForUser(userId, threadId string) (*model.ThreadMembership, *model.AppError) GetThreadMembershipsForUser(userID, teamID string) ([]*model.ThreadMembership, error) GetThreadsForUser(userID, teamID string, options model.GetUserThreadsOpts) (*model.Threads, *model.AppError) GetUploadSession(uploadId string) (*model.UploadSession, *model.AppError) GetUploadSessionsForUser(userID string) ([]*model.UploadSession, *model.AppError) GetUser(userID string) (*model.User, *model.AppError) GetUserAccessToken(tokenID string, sanitize bool) (*model.UserAccessToken, *model.AppError) GetUserAccessTokens(page, perPage int) ([]*model.UserAccessToken, *model.AppError) GetUserAccessTokensForUser(userID string, page, perPage int) ([]*model.UserAccessToken, *model.AppError) GetUserByAuth(authData *string, authService string) (*model.User, *model.AppError) GetUserByEmail(email string) (*model.User, *model.AppError) GetUserByUsername(username string) (*model.User, *model.AppError) GetUserForLogin(id, loginId string) (*model.User, *model.AppError) GetUserTermsOfService(userID string) (*model.UserTermsOfService, *model.AppError) GetUsers(options *model.UserGetOptions) ([]*model.User, *model.AppError) GetUsersByGroupChannelIds(c *request.Context, channelIDs []string, asAdmin bool) (map[string][]*model.User, *model.AppError) GetUsersByIds(userIDs []string, options *store.UserGetByIdsOpts) ([]*model.User, *model.AppError) GetUsersByUsernames(usernames []string, asAdmin bool, viewRestrictions *model.ViewUsersRestrictions) ([]*model.User, *model.AppError) GetUsersEtag(restrictionsHash string) string GetUsersInChannel(options *model.UserGetOptions) ([]*model.User, *model.AppError) 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) GetUsersInChannelPageByStatus(options *model.UserGetOptions, asAdmin bool) ([]*model.User, *model.AppError) GetUsersInTeam(options *model.UserGetOptions) ([]*model.User, *model.AppError) GetUsersInTeamEtag(teamID string, restrictionsHash string) string GetUsersInTeamPage(options *model.UserGetOptions, asAdmin bool) ([]*model.User, *model.AppError) 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) 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) GetUsersPage(options *model.UserGetOptions, asAdmin bool) ([]*model.User, *model.AppError) 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) GetViewUsersRestrictions(userID string) (*model.ViewUsersRestrictions, *model.AppError) GetWarnMetricsStatus() (map[string]*model.WarnMetricStatus, *model.AppError) HTTPService() httpservice.HTTPService Handle404(w http.ResponseWriter, r *http.Request) HandleCommandResponse(c *request.Context, command *model.Command, args *model.CommandArgs, response *model.CommandResponse, builtIn bool) (*model.CommandResponse, *model.AppError) HandleCommandResponsePost(c *request.Context, command *model.Command, args *model.CommandArgs, response *model.CommandResponse, builtIn bool) (*model.Post, *model.AppError) HandleCommandWebhook(c *request.Context, hookID string, response *model.CommandResponse) *model.AppError HandleImages(previewPathList []string, thumbnailPathList []string, fileData [][]byte) HandleIncomingWebhook(c *request.Context, hookID string, req *model.IncomingWebhookRequest) *model.AppError HandleMessageExportConfig(cfg *model.Config, appCfg *model.Config) HasPermissionTo(askingUserId string, permission *model.Permission) bool HasPermissionToChannel(askingUserId string, channelID string, permission *model.Permission) bool HasPermissionToChannelByPost(askingUserId string, postID string, permission *model.Permission) bool HasPermissionToTeam(askingUserId string, teamID string, permission *model.Permission) bool HasPermissionToUser(askingUserId string, userID string) bool HubStop() ImageProxy() *imageproxy.ImageProxy ImageProxyAdder() func(string) string ImageProxyRemover() (f func(string) string) ImportPermissions(jsonl io.Reader) error InitPlugins(c *request.Context, pluginDir, webappPluginDir string) InstallPluginFromData(data model.PluginEventData) InvalidateAllEmailInvites() *model.AppError InvalidateCacheForUser(userID string) 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 InviteNewUsersToTeamGracefully(emailList []string, teamID, senderId string) ([]*model.EmailInviteWithError, *model.AppError) IsFirstUserAccount() bool IsLeader() bool IsPasswordValid(password string) *model.AppError IsPhase2MigrationCompleted() *model.AppError IsUserAway(lastActivityAt int64) bool IsUserSignUpAllowed() *model.AppError JoinChannel(c *request.Context, channel *model.Channel, userID string) *model.AppError JoinDefaultChannels(c *request.Context, teamID string, user *model.User, shouldBeAdmin bool, userRequestorId string) *model.AppError JoinUserToTeam(c *request.Context, team *model.Team, user *model.User, userRequestorId string) (*model.TeamMember, *model.AppError) Ldap() einterfaces.LdapInterface LeaveChannel(c *request.Context, channelID string, userID string) *model.AppError LeaveTeam(c *request.Context, team *model.Team, user *model.User, requestorId string) *model.AppError LimitedClientConfig() map[string]string ListAllCommands(teamID string, T i18n.TranslateFunc) ([]*model.Command, *model.AppError) ListDirectory(path string) ([]string, *model.AppError) ListExports() ([]string, *model.AppError) ListImports() ([]string, *model.AppError) ListPluginKeys(pluginID string, page, perPage int) ([]string, *model.AppError) ListTeamCommands(teamID string) ([]*model.Command, *model.AppError) Log() *mlog.Logger LoginByOAuth(c *request.Context, service string, userData io.Reader, teamID string, tokenUser *model.User) (*model.User, *model.AppError) MakePermissionError(s *model.Session, permissions []*model.Permission) *model.AppError MarkChannelsAsViewed(channelIDs []string, userID string, currentSessionId string, collapsedThreadsSupported bool) (map[string]int64, *model.AppError) MaxPostSize() int MessageExport() einterfaces.MessageExportInterface Metrics() einterfaces.MetricsInterface MigrateIdLDAP(toAttribute string) *model.AppError MoveCommand(team *model.Team, command *model.Command) *model.AppError MoveFile(oldPath, newPath string) *model.AppError NewClusterDiscoveryService() *ClusterDiscoveryService NewPluginAPI(c *request.Context, manifest *model.Manifest) plugin.API Notification() einterfaces.NotificationInterface NotificationsLog() *mlog.Logger NotifyAndSetWarnMetricAck(warnMetricId string, sender *model.User, forceAck bool, isBot bool) *model.AppError OpenInteractiveDialog(request model.OpenDialogRequest) *model.AppError OriginChecker() func(*http.Request) bool PatchChannel(c *request.Context, channel *model.Channel, patch *model.ChannelPatch, userID string) (*model.Channel, *model.AppError) PatchPost(c *request.Context, postID string, patch *model.PostPatch) (*model.Post, *model.AppError) PatchRetentionPolicy(patch *model.RetentionPolicyWithTeamAndChannelIDs) (*model.RetentionPolicyWithTeamAndChannelCounts, *model.AppError) PatchRole(role *model.Role, patch *model.RolePatch) (*model.Role, *model.AppError) PatchScheme(scheme *model.Scheme, patch *model.SchemePatch) (*model.Scheme, *model.AppError) PatchTeam(teamID string, patch *model.TeamPatch) (*model.Team, *model.AppError) PatchUser(userID string, patch *model.UserPatch, asAdmin bool) (*model.User, *model.AppError) PermanentDeleteAllUsers(c *request.Context) *model.AppError PermanentDeleteChannel(channel *model.Channel) *model.AppError PermanentDeleteTeam(team *model.Team) *model.AppError PermanentDeleteTeamId(teamID string) *model.AppError PermanentDeleteUser(c *request.Context, user *model.User) *model.AppError PluginCommandsForTeam(teamID string) []*model.Command PostActionCookieSecret() []byte PostAddToChannelMessage(c *request.Context, user *model.User, addedUser *model.User, channel *model.Channel, postRootId string) *model.AppError PostPatchWithProxyRemovedFromImageURLs(patch *model.PostPatch) *model.PostPatch PostUpdateChannelDisplayNameMessage(c *request.Context, userID string, channel *model.Channel, oldChannelDisplayName, newChannelDisplayName string) *model.AppError PostUpdateChannelHeaderMessage(c *request.Context, userID string, channel *model.Channel, oldChannelHeader, newChannelHeader string) *model.AppError PostUpdateChannelPurposeMessage(c *request.Context, userID string, channel *model.Channel, oldChannelPurpose string, newChannelPurpose string) *model.AppError PostWithProxyAddedToImageURLs(post *model.Post) *model.Post PostWithProxyRemovedFromImageURLs(post *model.Post) *model.Post PreparePostForClient(originalPost *model.Post, isNewPost bool, isEditPost bool) *model.Post PreparePostListForClient(originalList *model.PostList) *model.PostList ProcessSlackText(text string) string Publish(message *model.WebSocketEvent) PublishUserTyping(userID, channelID, parentId string) *model.AppError PurgeBleveIndexes() *model.AppError PurgeElasticsearchIndexes() *model.AppError ReadFile(path string) ([]byte, *model.AppError) RecycleDatabaseConnection() RegenCommandToken(cmd *model.Command) (*model.Command, *model.AppError) RegenOutgoingWebhookToken(hook *model.OutgoingWebhook) (*model.OutgoingWebhook, *model.AppError) RegenerateOAuthAppSecret(app *model.OAuthApp) (*model.OAuthApp, *model.AppError) RegenerateTeamInviteId(teamID string) (*model.Team, *model.AppError) RegisterPluginCommand(pluginID string, command *model.Command) error ReloadConfig() error RemoveAllDeactivatedMembersFromChannel(channel *model.Channel) *model.AppError RemoveChannelsFromRetentionPolicy(policyID string, channelIDs []string) *model.AppError RemoveConfigListener(id string) RemoveCustomStatus(userID string) *model.AppError RemoveDirectory(path string) *model.AppError RemoveFile(path string) *model.AppError RemoveLdapPrivateCertificate() *model.AppError RemoveLdapPublicCertificate() *model.AppError RemovePlugin(id string) *model.AppError RemovePluginFromData(data model.PluginEventData) RemoveRecentCustomStatus(userID string, status *model.CustomStatus) *model.AppError RemoveSamlIdpCertificate() *model.AppError RemoveSamlPrivateCertificate() *model.AppError RemoveSamlPublicCertificate() *model.AppError RemoveTeamIcon(teamID string) *model.AppError RemoveTeamMemberFromTeam(c *request.Context, teamMember *model.TeamMember, requestorId string) *model.AppError RemoveTeamsFromRetentionPolicy(policyID string, teamIDs []string) *model.AppError RemoveUserFromChannel(c *request.Context, userIDToRemove string, removerUserId string, channel *model.Channel) *model.AppError RemoveUserFromTeam(c *request.Context, teamID string, userID string, requestorId string) *model.AppError RemoveUsersFromChannelNotMemberOfTeam(c *request.Context, remover *model.User, channel *model.Channel, team *model.Team) *model.AppError RequestLicenseAndAckWarnMetric(c *request.Context, warnMetricId string, isBot bool) *model.AppError ResetPasswordFromToken(userSuppliedTokenString, newPassword string) *model.AppError ResetPermissionsSystem() *model.AppError ResetSamlAuthDataToEmail(includeDeleted bool, dryRun bool, userIDs []string) (numAffected int, appErr *model.AppError) RestoreChannel(c *request.Context, channel *model.Channel, userID string) (*model.Channel, *model.AppError) RestoreTeam(teamID string) *model.AppError RestrictUsersGetByPermissions(userID string, options *model.UserGetOptions) (*model.UserGetOptions, *model.AppError) RestrictUsersSearchByPermissions(userID string, options *model.UserSearchOptions) (*model.UserSearchOptions, *model.AppError) ReturnSessionToPool(session *model.Session) RevokeAccessToken(token string) *model.AppError RevokeAllSessions(userID string) *model.AppError RevokeSession(session *model.Session) *model.AppError RevokeSessionById(sessionID string) *model.AppError RevokeSessionsForDeviceId(userID string, deviceID string, currentSessionId string) *model.AppError RevokeUserAccessToken(token *model.UserAccessToken) *model.AppError RolesGrantPermission(roleNames []string, permissionId string) bool Saml() einterfaces.SamlInterface SanitizeProfile(user *model.User, asAdmin bool) SanitizeTeam(session model.Session, team *model.Team) *model.Team SanitizeTeams(session model.Session, teams []*model.Team) []*model.Team SaveAndBroadcastStatus(status *model.Status) SaveBrandImage(imageData *multipart.FileHeader) *model.AppError SaveComplianceReport(job *model.Compliance) (*model.Compliance, *model.AppError) SaveReactionForPost(c *request.Context, reaction *model.Reaction) (*model.Reaction, *model.AppError) SaveUserTermsOfService(userID, termsOfServiceId string, accepted bool) *model.AppError SchemesIterator(scope string, batchSize int) func() []*model.Scheme SearchArchivedChannels(teamID string, term string, userID string) (*model.ChannelList, *model.AppError) SearchChannels(teamID string, term string) (*model.ChannelList, *model.AppError) SearchChannelsForUser(userID, teamID, term string) (*model.ChannelList, *model.AppError) SearchChannelsUserNotIn(teamID string, userID string, term string) (*model.ChannelList, *model.AppError) SearchEmoji(name string, prefixOnly bool, limit int) ([]*model.Emoji, *model.AppError) SearchEngine() *searchengine.Broker SearchFilesInTeamForUser(c *request.Context, terms string, userId string, teamId string, isOrSearch bool, includeDeletedChannels bool, timeZoneOffset int, page, perPage int) (*model.FileInfoList, *model.AppError) SearchGroupChannels(userID, term string) (*model.ChannelList, *model.AppError) SearchPostsInTeam(teamID string, paramsList []*model.SearchParams) (*model.PostList, *model.AppError) SearchPostsInTeamForUser(c *request.Context, terms string, userID string, teamID string, isOrSearch bool, includeDeletedChannels bool, timeZoneOffset int, page, perPage int) (*model.PostSearchResults, *model.AppError) SearchPrivateTeams(searchOpts *model.TeamSearch) ([]*model.Team, *model.AppError) SearchPublicTeams(searchOpts *model.TeamSearch) ([]*model.Team, *model.AppError) SearchUserAccessTokens(term string) ([]*model.UserAccessToken, *model.AppError) SearchUsers(props *model.UserSearch, options *model.UserSearchOptions) ([]*model.User, *model.AppError) SearchUsersInChannel(channelID string, term string, options *model.UserSearchOptions) ([]*model.User, *model.AppError) SearchUsersInGroup(groupID string, term string, options *model.UserSearchOptions) ([]*model.User, *model.AppError) SearchUsersInTeam(teamID, term string, options *model.UserSearchOptions) ([]*model.User, *model.AppError) SearchUsersNotInChannel(teamID string, channelID string, term string, options *model.UserSearchOptions) ([]*model.User, *model.AppError) 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 SendAutoResponse(c *request.Context, channel *model.Channel, receiver *model.User, post *model.Post) (bool, *model.AppError) SendAutoResponseIfNecessary(c *request.Context, channel *model.Channel, sender *model.User, post *model.Post) (bool, *model.AppError) SendCloudTrialEndWarningEmail(trialEndDate, siteURL string) *model.AppError SendCloudTrialEndedEmail() *model.AppError SendEmailVerification(user *model.User, newEmail, redirect string) *model.AppError SendEphemeralPost(userID string, post *model.Post) *model.Post SendNotifications(post *model.Post, team *model.Team, channel *model.Channel, sender *model.User, parentPostList *model.PostList, setOnline bool) ([]string, error) SendPasswordReset(email string, siteURL string) (bool, *model.AppError) SendPaymentFailedEmail(failedPayment *model.FailedPayment) *model.AppError ServeInterPluginRequest(w http.ResponseWriter, r *http.Request, sourcePluginId, destinationPluginId string) SessionHasPermissionTo(session model.Session, permission *model.Permission) bool SessionHasPermissionToAny(session model.Session, permissions []*model.Permission) bool SessionHasPermissionToCategory(session model.Session, userID, teamID, categoryId string) bool SessionHasPermissionToChannel(session model.Session, channelID string, permission *model.Permission) bool SessionHasPermissionToChannelByPost(session model.Session, postID string, permission *model.Permission) bool SessionHasPermissionToCreateJob(session model.Session, job *model.Job) (bool, *model.Permission) SessionHasPermissionToReadJob(session model.Session, jobType string) (bool, *model.Permission) SessionHasPermissionToTeam(session model.Session, teamID string, permission *model.Permission) bool SessionHasPermissionToUser(session model.Session, userID string) bool SessionHasPermissionToUserOrBot(session model.Session, userID string) bool SetActiveChannel(userID string, channelID string) *model.AppError SetAutoResponderStatus(user *model.User, oldNotifyProps model.StringMap) SetCustomStatus(userID string, cs *model.CustomStatus) *model.AppError SetDefaultProfileImage(user *model.User) *model.AppError SetPhase2PermissionsMigrationStatus(isComplete bool) error 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) SetPluginsEnvironment(pluginsEnvironment *plugin.Environment) SetProfileImage(userID string, imageData *multipart.FileHeader) *model.AppError SetProfileImageFromFile(userID string, file io.Reader) *model.AppError SetProfileImageFromMultiPartFile(userID string, file multipart.File) *model.AppError SetRemoteClusterLastPingAt(remoteClusterId string) *model.AppError SetSamlIdpCertificateFromMetadata(data []byte) *model.AppError SetSearchEngine(se *searchengine.Broker) SetServer(srv *Server) 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 SetTeamIconFromFile(team *model.Team, file io.Reader) *model.AppError SetTeamIconFromMultiPartFile(teamID string, file multipart.File) *model.AppError SlackImport(c *request.Context, fileData multipart.File, fileSize int64, teamID string) (*model.AppError, *bytes.Buffer) SoftDeleteTeam(teamID string) *model.AppError Srv() *Server SubmitInteractiveDialog(c *request.Context, request model.SubmitDialogRequest) (*model.SubmitDialogResponse, *model.AppError) SwitchEmailToLdap(email, password, code, ldapLoginId, ldapPassword string) (string, *model.AppError) SwitchEmailToOAuth(w http.ResponseWriter, r *http.Request, email, password, code, service string) (string, *model.AppError) SwitchLdapToEmail(ldapPassword, code, email, newPassword string) (string, *model.AppError) SwitchOAuthToEmail(email, password, requesterId string) (string, *model.AppError) SyncPluginsActiveState() TeamMembersToRemove(teamID *string) ([]*model.TeamMember, *model.AppError) TelemetryId() string TestElasticsearch(cfg *model.Config) *model.AppError TestEmail(userID string, cfg *model.Config) *model.AppError TestFileStoreConnection() *model.AppError TestFileStoreConnectionWithConfig(cfg *model.FileSettings) *model.AppError TestLdap() *model.AppError TestSiteURL(siteURL string) *model.AppError Timezones() *timezones.Timezones ToggleMuteChannel(channelID, userID string) (*model.ChannelMember, *model.AppError) TotalWebsocketConnections() int TriggerWebhook(c *request.Context, payload *model.OutgoingWebhookPayload, hook *model.OutgoingWebhook, post *model.Post, channel *model.Channel) UnregisterPluginCommand(pluginID, teamID, trigger string) UnregisterPluginCommands(pluginID string) UpdateActive(c *request.Context, user *model.User, active bool) (*model.User, *model.AppError) UpdateChannelLastViewedAt(channelIDs []string, userID string) *model.AppError UpdateChannelMemberNotifyProps(data map[string]string, channelID string, userID string) (*model.ChannelMember, *model.AppError) UpdateChannelMemberRoles(channelID string, userID string, newRoles string) (*model.ChannelMember, *model.AppError) UpdateChannelMemberSchemeRoles(channelID string, userID string, isSchemeGuest bool, isSchemeUser bool, isSchemeAdmin bool) (*model.ChannelMember, *model.AppError) UpdateChannelPrivacy(c *request.Context, oldChannel *model.Channel, user *model.User) (*model.Channel, *model.AppError) UpdateCommand(oldCmd, updatedCmd *model.Command) (*model.Command, *model.AppError) UpdateConfig(f func(*model.Config)) UpdateEphemeralPost(userID string, post *model.Post) *model.Post UpdateExpiredDNDStatuses() ([]*model.Status, error) UpdateGroup(group *model.Group) (*model.Group, *model.AppError) UpdateGroupSyncable(groupSyncable *model.GroupSyncable) (*model.GroupSyncable, *model.AppError) UpdateHashedPassword(user *model.User, newHashedPassword string) *model.AppError UpdateHashedPasswordByUserId(userID, newHashedPassword string) *model.AppError UpdateIncomingWebhook(oldHook, updatedHook *model.IncomingWebhook) (*model.IncomingWebhook, *model.AppError) UpdateLastActivityAtIfNeeded(session model.Session) UpdateMfa(activate bool, userID, token string) *model.AppError UpdateMobileAppBadge(userID string) UpdateOAuthUserAttrs(userData io.Reader, user *model.User, provider einterfaces.OauthProvider, service string, tokenUser *model.User) *model.AppError UpdateOauthApp(oldApp, updatedApp *model.OAuthApp) (*model.OAuthApp, *model.AppError) UpdateOutgoingWebhook(oldHook, updatedHook *model.OutgoingWebhook) (*model.OutgoingWebhook, *model.AppError) UpdatePassword(user *model.User, newPassword string) *model.AppError UpdatePasswordAsUser(userID, currentPassword, newPassword string) *model.AppError UpdatePasswordByUserIdSendEmail(userID, newPassword, method string) *model.AppError UpdatePasswordSendEmail(user *model.User, newPassword, method string) *model.AppError UpdatePost(c *request.Context, post *model.Post, safeUpdate bool) (*model.Post, *model.AppError) UpdatePreferences(userID string, preferences model.Preferences) *model.AppError UpdateRemoteCluster(rc *model.RemoteCluster) (*model.RemoteCluster, *model.AppError) UpdateRemoteClusterTopics(remoteClusterId string, topics string) (*model.RemoteCluster, *model.AppError) UpdateRole(role *model.Role) (*model.Role, *model.AppError) UpdateScheme(scheme *model.Scheme) (*model.Scheme, *model.AppError) UpdateSidebarCategories(userID, teamID string, categories []*model.SidebarCategoryWithChannels) ([]*model.SidebarCategoryWithChannels, *model.AppError) UpdateSidebarCategoryOrder(userID, teamID string, categoryOrder []string) *model.AppError UpdateTeam(team *model.Team) (*model.Team, *model.AppError) UpdateTeamMemberRoles(teamID string, userID string, newRoles string) (*model.TeamMember, *model.AppError) UpdateTeamMemberSchemeRoles(teamID string, userID string, isSchemeGuest bool, isSchemeUser bool, isSchemeAdmin bool) (*model.TeamMember, *model.AppError) UpdateTeamPrivacy(teamID string, teamType string, allowOpenInvite bool) *model.AppError UpdateTeamScheme(team *model.Team) (*model.Team, *model.AppError) UpdateThreadFollowForUser(userID, teamID, threadID string, state bool) *model.AppError UpdateThreadReadForUser(userID, teamID, threadID string, timestamp int64) (*model.ThreadResponse, *model.AppError) UpdateThreadsReadForUser(userID, teamID string) *model.AppError UpdateUser(user *model.User, sendNotifications bool) (*model.User, *model.AppError) UpdateUserActive(c *request.Context, userID string, active bool) *model.AppError UpdateUserAsUser(user *model.User, asAdmin bool) (*model.User, *model.AppError) UpdateUserAuth(userID string, userAuth *model.UserAuth) (*model.UserAuth, *model.AppError) UpdateUserNotifyProps(userID string, props map[string]string, sendNotifications bool) (*model.User, *model.AppError) UpdateUserRoles(userID string, newRoles string, sendWebSocketEvent bool) (*model.User, *model.AppError) UpdateUserRolesWithUser(user *model.User, newRoles string, sendWebSocketEvent bool) (*model.User, *model.AppError) UploadData(c *request.Context, us *model.UploadSession, rd io.Reader) (*model.FileInfo, *model.AppError) UploadEmojiImage(id string, imageData *multipart.FileHeader) *model.AppError UploadMultipartFiles(c *request.Context, teamID string, channelID string, userID string, fileHeaders []*multipart.FileHeader, clientIds []string, now time.Time) (*model.FileUploadResponse, *model.AppError) UpsertGroupMember(groupID string, userID string) (*model.GroupMember, *model.AppError) UpsertGroupSyncable(groupSyncable *model.GroupSyncable) (*model.GroupSyncable, *model.AppError) UserCanSeeOtherUser(userID string, otherUserId string) (bool, *model.AppError) VerifyEmailFromToken(userSuppliedTokenString string) *model.AppError VerifyUserEmail(userID, email string) *model.AppError ViewChannel(view *model.ChannelView, userID string, currentSessionId string, collapsedThreadsSupported bool) (map[string]int64, *model.AppError) WriteFile(fr io.Reader, path string) (int64, *model.AppError) }
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 AppOptionCreator ¶
type AppOptionCreator func() []AppOption
type AttachmentImportData ¶
type AutocompleteDynamicArgProvider ¶ added in v5.30.0
type AutocompleteDynamicArgProvider interface {
GetAutoCompleteListItems(a *App, commandArgs *model.CommandArgs, arg *model.AutocompleteArg, parsed, toBeParsed string) ([]model.AutocompleteListItem, error)
}
AutocompleteDynamicArgProvider dynamically provides auto-completion args for built-in commands.
type BulkExportOpts ¶ added in v5.33.0
type Busy ¶ added in v5.20.0
type Busy struct {
// contains filtered or unexported fields
}
Busy represents the busy state of the server. A server marked busy will have non-critical services disabled. If a Cluster is provided any changes will be propagated to each node.
func NewBusy ¶ added in v5.20.0
func NewBusy(cluster einterfaces.ClusterInterface) *Busy
NewBusy creates a new Busy instance with optional cluster which will be notified of busy state changes.
func (*Busy) Clear ¶ added in v5.20.0
func (b *Busy) Clear()
ClearBusy marks the server as not busy and notifies cluster nodes.
func (*Busy) ClusterEventChanged ¶ added in v5.20.0
func (b *Busy) ClusterEventChanged(sbs *model.ServerBusyState)
ClusterEventChanged is called when a CLUSTER_EVENT_BUSY_STATE_CHANGED is received.
func (*Busy) Expires ¶ added in v5.20.0
Expires returns the expected time that the server will be marked not busy. This expiry can be extended via additional calls to SetBusy.
type ChannelImportData ¶
type ChannelMemberOpts ¶ added in v5.35.0
type ChannelMemberOpts struct { UserRequestorID string PostRootID string // SkipTeamMemberIntegrityCheck is used to indicate whether it should be checked // that a user has already been removed from that team or not. // This is useful to avoid in scenarios when we just added the team member, // and thereby know that there is no need to check this. SkipTeamMemberIntegrityCheck bool }
type CheckConnResult ¶ added in v5.36.0
type CheckConnResult struct { ConnectionID string UserID string ActiveQueue chan model.WebSocketMessage DeadQueue []*model.WebSocketEvent DeadQueuePointer int }
CheckConnResult indicates whether a connectionID was present in the hub or not. And if so, contains the active and dead queue details.
type ClusterDiscoveryService ¶
type ClusterDiscoveryService struct { model.ClusterDiscovery // contains filtered or unexported fields }
func (*ClusterDiscoveryService) Start ¶
func (cds *ClusterDiscoveryService) Start()
func (*ClusterDiscoveryService) Stop ¶
func (cds *ClusterDiscoveryService) Stop()
type CommandProvider ¶
type CommandProvider interface { GetTrigger() string GetCommand(a *App, T i18n.TranslateFunc) *model.Command DoCommand(a *App, c *request.Context, args *model.CommandArgs, message string) *model.CommandResponse }
func GetCommandProvider ¶
func GetCommandProvider(name string) CommandProvider
type ComparablePreference ¶
type DirectChannelImportData ¶
type DirectPostImportData ¶
type DirectPostImportData struct { ChannelMembers *[]string `json:"channel_members"` User *string `json:"user"` Message *string `json:"message"` Props *model.StringInterface `json:"props"` CreateAt *int64 `json:"create_at"` FlaggedBy *[]string `json:"flagged_by"` Reactions *[]ReactionImportData `json:"reactions"` Replies *[]ReplyImportData `json:"replies"` Attachments *[]AttachmentImportData `json:"attachments"` }
type DriverImpl ¶ added in v5.37.0
type DriverImpl struct {
// contains filtered or unexported fields
}
DriverImpl implements the plugin.Driver interface on the server-side. Each new request for a connection/statement/transaction etc, generates a new entry tracked centrally in a map. Further requests operate on the object ID.
func NewDriverImpl ¶ added in v5.37.0
func NewDriverImpl(s *Server) *DriverImpl
func (*DriverImpl) ConnClose ¶ added in v5.37.0
func (d *DriverImpl) ConnClose(connID string) error
func (*DriverImpl) ConnExec ¶ added in v5.37.0
func (d *DriverImpl) ConnExec(connID, q string, args []driver.NamedValue) (_ plugin.ResultContainer, err error)
func (*DriverImpl) ConnPing ¶ added in v5.37.0
func (d *DriverImpl) ConnPing(connID string) error
func (*DriverImpl) ConnQuery ¶ added in v5.37.0
func (d *DriverImpl) ConnQuery(connID, q string, args []driver.NamedValue) (_ string, err error)
func (*DriverImpl) RowsClose ¶ added in v5.37.0
func (d *DriverImpl) RowsClose(rowsID string) error
func (*DriverImpl) RowsColumnTypeDatabaseTypeName ¶ added in v5.37.0
func (d *DriverImpl) RowsColumnTypeDatabaseTypeName(rowsID string, index int) string
func (*DriverImpl) RowsColumnTypePrecisionScale ¶ added in v5.37.0
func (*DriverImpl) RowsColumns ¶ added in v5.37.0
func (d *DriverImpl) RowsColumns(rowsID string) []string
func (*DriverImpl) RowsHasNextResultSet ¶ added in v5.37.0
func (d *DriverImpl) RowsHasNextResultSet(rowsID string) bool
func (*DriverImpl) RowsNext ¶ added in v5.37.0
func (d *DriverImpl) RowsNext(rowsID string, dest []driver.Value) error
func (*DriverImpl) RowsNextResultSet ¶ added in v5.37.0
func (d *DriverImpl) RowsNextResultSet(rowsID string) error
func (*DriverImpl) Stmt ¶ added in v5.37.0
func (d *DriverImpl) Stmt(connID, q string) (_ string, err error)
func (*DriverImpl) StmtClose ¶ added in v5.37.0
func (d *DriverImpl) StmtClose(stID string) error
func (*DriverImpl) StmtExec ¶ added in v5.37.0
func (d *DriverImpl) StmtExec(stID string, args []driver.NamedValue) (plugin.ResultContainer, error)
func (*DriverImpl) StmtNumInput ¶ added in v5.37.0
func (d *DriverImpl) StmtNumInput(stID string) int
func (*DriverImpl) StmtQuery ¶ added in v5.37.0
func (d *DriverImpl) StmtQuery(stID string, args []driver.NamedValue) (string, error)
func (*DriverImpl) TxCommit ¶ added in v5.37.0
func (d *DriverImpl) TxCommit(txID string) error
func (*DriverImpl) TxRollback ¶ added in v5.37.0
func (d *DriverImpl) TxRollback(txID string) error
type EmailBatchingJob ¶
type EmailBatchingJob struct {
// contains filtered or unexported fields
}
func NewEmailBatchingJob ¶
func NewEmailBatchingJob(es *EmailService, bufferSize int) *EmailBatchingJob
func (*EmailBatchingJob) CheckPendingEmails ¶
func (job *EmailBatchingJob) CheckPendingEmails()
func (*EmailBatchingJob) Start ¶
func (job *EmailBatchingJob) Start()
type EmailService ¶ added in v5.26.0
type EmailService struct { PerHourEmailRateLimiter *throttled.GCRARateLimiter PerDayEmailRateLimiter *throttled.GCRARateLimiter EmailBatching *EmailBatchingJob // contains filtered or unexported fields }
func NewEmailService ¶ added in v5.26.0
func NewEmailService(srv *Server) (*EmailService, error)
func (*EmailService) AddNotificationEmailToBatch ¶ added in v5.26.0
func (*EmailService) CreateVerifyEmailToken ¶ added in v5.26.0
func (*EmailService) InitEmailBatching ¶ added in v5.26.0
func (es *EmailService) InitEmailBatching()
func (*EmailService) SendAtUserLimitWarningEmail ¶ added in v5.30.0
func (*EmailService) SendCloudTrialEndWarningEmail ¶ added in v5.35.0
func (es *EmailService) SendCloudTrialEndWarningEmail(userEmail, name, trialEndDate, locale, siteURL string) *model.AppError
func (*EmailService) SendCloudTrialEndedEmail ¶ added in v5.36.0
func (es *EmailService) SendCloudTrialEndedEmail(userEmail, name, locale, siteURL string) *model.AppError
func (*EmailService) SendCloudWelcomeEmail ¶ added in v5.34.0
func (es *EmailService) SendCloudWelcomeEmail(userEmail, locale, teamInviteID, workSpaceName, dns, siteURL string) *model.AppError
SendCloudWelcomeEmail sends the cloud version of the welcome email
func (*EmailService) SendDeactivateAccountEmail ¶ added in v5.26.0
func (es *EmailService) SendDeactivateAccountEmail(email string, locale, siteURL string) *model.AppError
func (*EmailService) SendInviteEmails ¶ added in v5.26.0
func (*EmailService) SendNoCardPaymentFailedEmail ¶ added in v5.31.0
func (*EmailService) SendOverUserFourteenDayWarningEmail ¶ added in v5.30.0
func (*EmailService) SendOverUserLimitNinetyDayWarningEmail ¶ added in v5.30.0
func (*EmailService) SendOverUserLimitThirtyDayWarningEmail ¶ added in v5.30.0
func (*EmailService) SendOverUserLimitWarningEmail ¶ added in v5.30.0
func (*EmailService) SendOverUserLimitWorkspaceSuspendedWarningEmail ¶ added in v5.30.0
func (*EmailService) SendOverUserSevenDayWarningEmail ¶ added in v5.30.0
func (*EmailService) SendPasswordResetEmail ¶ added in v5.26.0
func (*EmailService) SendPaymentFailedEmail ¶ added in v5.31.0
func (es *EmailService) SendPaymentFailedEmail(email string, locale string, failedPayment *model.FailedPayment, siteURL string) (bool, *model.AppError)
func (*EmailService) SendRemoveExpiredLicenseEmail ¶ added in v5.26.0
func (es *EmailService) SendRemoveExpiredLicenseEmail(email string, locale, siteURL string) *model.AppError
SendRemoveExpiredLicenseEmail formats an email and uses the email service to send the email to user with link pointing to CWS to renew the user license
func (*EmailService) SendSignInChangeEmail ¶ added in v5.26.0
func (es *EmailService) SendSignInChangeEmail(email, method, locale, siteURL string) *model.AppError
func (*EmailService) SendSuspensionEmailToSupport ¶ added in v5.30.0
func (*EmailService) SendUpgradeEmail ¶ added in v5.33.0
func (es *EmailService) SendUpgradeEmail(user, email, locale, siteURL, action string) (bool, *model.AppError)
SendUpgradeEmail formats an email template and sends an email to an admin specified in the email arg
type EmojiImportData ¶
type ExplicitMentions ¶
type ExplicitMentions struct { // Mentions contains the ID of each user that was mentioned and how they were mentioned. Mentions map[string]MentionType // Contains a map of groups that were mentioned GroupMentions map[string]*model.Group // OtherPotentialMentions contains a list of strings that looked like mentions, but didn't have // a corresponding keyword. OtherPotentialMentions []string // HereMentioned is true if the message contained @here. HereMentioned bool // AllMentioned is true if the message contained @all. AllMentioned bool // ChannelMentioned is true if the message contained @channel. ChannelMentioned bool }
type Hub ¶
type Hub struct {
// contains filtered or unexported fields
}
Hub is the central place to manage all websocket connections in the server. It handles different websocket events and sending messages to individual user connections.
func (*Hub) Broadcast ¶
func (h *Hub) Broadcast(message *model.WebSocketEvent)
Broadcast broadcasts the message to all connections in the hub.
func (*Hub) CheckConn ¶ added in v5.36.0
func (h *Hub) CheckConn(userID, connectionID string) *CheckConnResult
func (*Hub) InvalidateUser ¶
InvalidateUser invalidates the cache for the given user.
func (*Hub) IsRegistered ¶ added in v5.24.0
Determines if a user's session is registered a connection from the hub.
func (*Hub) SendMessage ¶ added in v5.24.0
func (h *Hub) SendMessage(conn *WebConn, msg model.WebSocketMessage)
SendMessage sends the given message to the given connection.
func (*Hub) Unregister ¶
Unregister unregisters a connection from the hub.
func (*Hub) UpdateActivity ¶
UpdateActivity sets the LastUserActivityAt field for the connection of the user.
type JWTClaims ¶ added in v5.32.0
type JWTClaims struct { LicenseID string `json:"license_id"` ActiveUsers int64 `json:"active_users"` jwt.StandardClaims }
JWTClaims custom JWT claims with the needed information for the renewal process
type LineImportData ¶
type LineImportData struct { Type string `json:"type"` Scheme *SchemeImportData `json:"scheme,omitempty"` Team *TeamImportData `json:"team,omitempty"` Channel *ChannelImportData `json:"channel,omitempty"` User *UserImportData `json:"user,omitempty"` Post *PostImportData `json:"post,omitempty"` DirectChannel *DirectChannelImportData `json:"direct_channel,omitempty"` DirectPost *DirectPostImportData `json:"direct_post,omitempty"` Emoji *EmojiImportData `json:"emoji,omitempty"` Version *int `json:"version,omitempty"` }
func ImportLineForDirectPost ¶
func ImportLineForDirectPost(post *model.DirectPostForExport) *LineImportData
func ImportLineForPost ¶
func ImportLineForPost(post *model.PostForExport) *LineImportData
func ImportLineFromChannel ¶
func ImportLineFromChannel(channel *model.ChannelForExport) *LineImportData
func ImportLineFromDirectChannel ¶
func ImportLineFromDirectChannel(channel *model.DirectChannelForExport) *LineImportData
func ImportLineFromEmoji ¶
func ImportLineFromEmoji(emoji *model.Emoji, filePath string) *LineImportData
func ImportLineFromTeam ¶
func ImportLineFromTeam(team *model.TeamForExport) *LineImportData
func ImportLineFromUser ¶
func ImportLineFromUser(user *model.User, exportedPrefs map[string]*string) *LineImportData
type LineImportWorkerData ¶
type LineImportWorkerData struct { LineImportData LineNumber int }
type LineImportWorkerError ¶
type LocalResponseWriter ¶
type LocalResponseWriter struct {
// contains filtered or unexported fields
}
func (*LocalResponseWriter) Header ¶
func (w *LocalResponseWriter) Header() http.Header
func (*LocalResponseWriter) WriteHeader ¶
func (w *LocalResponseWriter) WriteHeader(statusCode int)
type MailToLinkContent ¶ added in v5.26.0
type MailToLinkContent struct { MetricId string `json:"metric_id"` MailRecipient string `json:"mail_recipient"` MailCC string `json:"mail_cc"` MailSubject string `json:"mail_subject"` MailBody string `json:"mail_body"` }
func (*MailToLinkContent) ToJson ¶ added in v5.26.0
func (mlc *MailToLinkContent) ToJson() string
type MentionType ¶
type MentionType int
const ( // A placeholder that should never be used in practice NoMention MentionType = iota // The post is in a thread that the user has commented on ThreadMention // The post is a comment on a thread started by the user CommentMention // The post contains an at-channel, at-all, or at-here ChannelMention // The post is a DM DMMention // The post contains an at-mention for the user KeywordMention // The post contains a group mention for the user GroupMention )
type MockOptionRemoteClusterService ¶ added in v5.35.0
type MockOptionRemoteClusterService func(service *mockRemoteClusterService)
MockOptionRemoteClusterService a mock of the remote cluster service
func MockOptionRemoteClusterServiceWithActive ¶ added in v5.35.0
func MockOptionRemoteClusterServiceWithActive(active bool) MockOptionRemoteClusterService
type MockOptionSharedChannelService ¶ added in v5.35.0
type MockOptionSharedChannelService func(service *mockSharedChannelService)
func MockOptionSharedChannelServiceWithActive ¶ added in v5.35.0
func MockOptionSharedChannelServiceWithActive(active bool) MockOptionSharedChannelService
type Option ¶
func Config ¶
Config applies the given config dsn, whether a path to config.json or a database connection string. It receives as well a set of custom defaults that will be applied for any unset property of the config loaded from the dsn on top of the normal defaults
func ConfigStore ¶
ConfigStore applies the given config store, typically to replace the traditional sources with a memory store for testing.
func SkipPostInitializiation ¶ added in v5.36.0
func SkipPostInitializiation() Option
func StoreOverride ¶
func StoreOverride(override interface{}) Option
By default, the app will use the store specified by the configuration. This allows you to construct an app with a different store.
The override parameter must be either a store.Store or func(App) store.Store().
type PluginAPI ¶
type PluginAPI struct {
// contains filtered or unexported fields
}
func NewPluginAPI ¶
func (*PluginAPI) AddChannelMember ¶
func (*PluginAPI) AddReaction ¶
func (*PluginAPI) AddUserToChannel ¶
func (*PluginAPI) CopyFileInfos ¶
func (*PluginAPI) CreateChannel ¶
func (*PluginAPI) CreateCommand ¶ added in v5.28.0
func (*PluginAPI) CreatePost ¶
func (*PluginAPI) CreateTeam ¶
func (*PluginAPI) CreateTeamMember ¶
func (*PluginAPI) CreateTeamMembers ¶
func (*PluginAPI) CreateTeamMembersGracefully ¶ added in v5.20.0
func (*PluginAPI) CreateUser ¶
func (*PluginAPI) DeleteBotIconImage ¶
func (*PluginAPI) DeleteChannel ¶
func (*PluginAPI) DeleteChannelMember ¶
func (*PluginAPI) DeleteCommand ¶ added in v5.28.0
func (*PluginAPI) DeleteEphemeralPost ¶
func (*PluginAPI) DeletePreferencesForUser ¶ added in v5.26.0
func (*PluginAPI) DeleteTeamMember ¶
func (*PluginAPI) ExecuteSlashCommand ¶ added in v5.26.0
func (api *PluginAPI) ExecuteSlashCommand(commandArgs *model.CommandArgs) (*model.CommandResponse, error)
func (*PluginAPI) GetBotIconImage ¶
func (*PluginAPI) GetBundlePath ¶
func (*PluginAPI) GetChannel ¶
func (*PluginAPI) GetChannelByName ¶
func (*PluginAPI) GetChannelByNameForTeamName ¶
func (*PluginAPI) GetChannelMember ¶
func (*PluginAPI) GetChannelMembers ¶
func (*PluginAPI) GetChannelMembersByIds ¶
func (*PluginAPI) GetChannelMembersForUser ¶
func (*PluginAPI) GetChannelStats ¶
func (*PluginAPI) GetChannelsForTeamForUser ¶
func (*PluginAPI) GetCommand ¶ added in v5.28.0
func (*PluginAPI) GetDiagnosticId ¶
func (*PluginAPI) GetDirectChannel ¶
func (*PluginAPI) GetEmojiByName ¶
func (*PluginAPI) GetEmojiImage ¶
func (*PluginAPI) GetEmojiList ¶
func (*PluginAPI) GetFileInfo ¶
func (*PluginAPI) GetFileInfos ¶ added in v5.22.0
func (*PluginAPI) GetFileLink ¶
func (*PluginAPI) GetGroupByName ¶
func (*PluginAPI) GetGroupChannel ¶
func (*PluginAPI) GetGroupMemberUsers ¶ added in v5.36.0
func (*PluginAPI) GetGroupsBySource ¶ added in v5.36.0
func (*PluginAPI) GetGroupsForUser ¶
func (*PluginAPI) GetLDAPUserAttributes ¶
func (*PluginAPI) GetLicense ¶
func (*PluginAPI) GetPluginConfig ¶
func (*PluginAPI) GetPluginStatus ¶
func (*PluginAPI) GetPlugins ¶
func (*PluginAPI) GetPostThread ¶
func (*PluginAPI) GetPostsAfter ¶
func (*PluginAPI) GetPostsBefore ¶
func (*PluginAPI) GetPostsForChannel ¶
func (*PluginAPI) GetPostsSince ¶
func (*PluginAPI) GetPreferencesForUser ¶ added in v5.26.0
func (*PluginAPI) GetProfileImage ¶
func (*PluginAPI) GetPublicChannelsForTeam ¶
func (*PluginAPI) GetReactions ¶
func (*PluginAPI) GetServerVersion ¶
func (*PluginAPI) GetSession ¶
func (*PluginAPI) GetSystemInstallDate ¶
func (*PluginAPI) GetTeamByName ¶
func (*PluginAPI) GetTeamIcon ¶
func (*PluginAPI) GetTeamMember ¶
func (*PluginAPI) GetTeamMembers ¶
func (*PluginAPI) GetTeamMembersForUser ¶
func (*PluginAPI) GetTeamStats ¶
func (*PluginAPI) GetTeamsForUser ¶
func (*PluginAPI) GetTeamsUnreadForUser ¶
func (*PluginAPI) GetTelemetryId ¶ added in v5.28.0
func (*PluginAPI) GetUnsanitizedConfig ¶
GetUnsanitizedConfig gets the configuration for a system admin without removing secrets.
func (*PluginAPI) GetUserByEmail ¶
func (*PluginAPI) GetUserByUsername ¶
func (*PluginAPI) GetUserStatus ¶
func (*PluginAPI) GetUserStatusesByIds ¶
func (*PluginAPI) GetUsersByUsernames ¶
func (*PluginAPI) GetUsersInChannel ¶
func (*PluginAPI) GetUsersInTeam ¶
func (*PluginAPI) HasPermissionTo ¶
func (api *PluginAPI) HasPermissionTo(userID string, permission *model.Permission) bool
func (*PluginAPI) HasPermissionToChannel ¶
func (api *PluginAPI) HasPermissionToChannel(userID, channelID string, permission *model.Permission) bool
func (*PluginAPI) HasPermissionToTeam ¶
func (api *PluginAPI) HasPermissionToTeam(userID, teamID string, permission *model.Permission) bool
func (*PluginAPI) InstallPlugin ¶
func (*PluginAPI) KVCompareAndDelete ¶
func (*PluginAPI) KVCompareAndSet ¶
func (*PluginAPI) KVDeleteAll ¶
func (*PluginAPI) KVSetWithExpiry ¶
func (*PluginAPI) KVSetWithOptions ¶
func (*PluginAPI) ListBuiltInCommands ¶ added in v5.28.0
func (*PluginAPI) ListCommands ¶ added in v5.28.0
func (*PluginAPI) ListCustomCommands ¶ added in v5.28.0
func (*PluginAPI) ListPluginCommands ¶ added in v5.28.0
func (*PluginAPI) LoadPluginConfiguration ¶
func (*PluginAPI) OpenInteractiveDialog ¶
func (api *PluginAPI) OpenInteractiveDialog(dialog model.OpenDialogRequest) *model.AppError
func (*PluginAPI) PermanentDeleteBot ¶
func (*PluginAPI) PluginHTTP ¶
func (*PluginAPI) PublishPluginClusterEvent ¶ added in v5.36.0
func (api *PluginAPI) PublishPluginClusterEvent(ev model.PluginClusterEvent, opts model.PluginClusterEventSendOptions) error
PublishPluginClusterEvent broadcasts a plugin event to all other running instances of the calling plugin.
func (*PluginAPI) PublishUserTyping ¶ added in v5.26.0
func (*PluginAPI) PublishWebSocketEvent ¶
func (api *PluginAPI) PublishWebSocketEvent(event string, payload map[string]interface{}, broadcast *model.WebsocketBroadcast)
func (*PluginAPI) RegisterCommand ¶
func (*PluginAPI) RemoveReaction ¶
func (*PluginAPI) RemoveTeamIcon ¶
func (*PluginAPI) RequestTrialLicense ¶ added in v5.36.0
func (api *PluginAPI) RequestTrialLicense(requesterID string, users int, termsAccepted bool, receiveEmailsAccepted bool) *model.AppError
RequestTrialLicense requests a trial license and installs it in the server
func (*PluginAPI) SaveConfig ¶
func (*PluginAPI) SavePluginConfig ¶
func (*PluginAPI) SearchChannels ¶
func (*PluginAPI) SearchPostsInTeam ¶
func (*PluginAPI) SearchPostsInTeamForUser ¶ added in v5.26.0
func (api *PluginAPI) SearchPostsInTeamForUser(teamID string, userID string, searchParams model.SearchParameter) (*model.PostSearchResults, *model.AppError)
func (*PluginAPI) SearchTeams ¶
func (*PluginAPI) SearchUsers ¶
func (*PluginAPI) SendEphemeralPost ¶
func (*PluginAPI) SetBotIconImage ¶
func (*PluginAPI) SetProfileImage ¶
func (*PluginAPI) SetTeamIcon ¶
func (*PluginAPI) SetUserStatusTimedDND ¶ added in v5.37.0
func (*PluginAPI) UnregisterCommand ¶
func (*PluginAPI) UpdateBotActive ¶
func (*PluginAPI) UpdateChannel ¶
func (*PluginAPI) UpdateChannelMemberNotifications ¶
func (*PluginAPI) UpdateChannelMemberRoles ¶
func (*PluginAPI) UpdateCommand ¶ added in v5.28.0
func (*PluginAPI) UpdateEphemeralPost ¶
func (*PluginAPI) UpdatePost ¶
func (*PluginAPI) UpdatePreferencesForUser ¶ added in v5.26.0
func (*PluginAPI) UpdateTeam ¶
func (*PluginAPI) UpdateTeamMemberRoles ¶
func (*PluginAPI) UpdateUser ¶
func (*PluginAPI) UpdateUserActive ¶
func (*PluginAPI) UpdateUserStatus ¶
type PluginCommand ¶
type PluginResponseWriter ¶
func (*PluginResponseWriter) GenerateResponse ¶
func (rt *PluginResponseWriter) GenerateResponse() *http.Response
func (*PluginResponseWriter) Header ¶
func (rt *PluginResponseWriter) Header() http.Header
func (*PluginResponseWriter) WriteHeader ¶
func (rt *PluginResponseWriter) WriteHeader(statusCode int)
type PostImportData ¶
type PostImportData struct { Team *string `json:"team"` Channel *string `json:"channel"` User *string `json:"user"` Message *string `json:"message"` Props *model.StringInterface `json:"props"` CreateAt *int64 `json:"create_at"` FlaggedBy *[]string `json:"flagged_by,omitempty"` Reactions *[]ReactionImportData `json:"reactions,omitempty"` Replies *[]ReplyImportData `json:"replies,omitempty"` Attachments *[]AttachmentImportData `json:"attachments,omitempty"` }
type PostNotification ¶
type PostNotification struct { Channel *model.Channel Post *model.Post ProfileMap map[string]*model.User Sender *model.User }
Represents either an email or push notification and contains the fields required to send it to any user.
func (*PostNotification) GetChannelName ¶
func (n *PostNotification) GetChannelName(userNameFormat, excludeId string) string
Returns the name of the channel for this notification. For direct messages, this is the sender's name preceded by an at sign. For group messages, this is a comma-separated list of the members of the channel, with an option to exclude the recipient of the message from that list.
func (*PostNotification) GetSenderName ¶
func (n *PostNotification) GetSenderName(userNameFormat string, overridesAllowed bool) string
Returns the name of the sender of this notification, accounting for things like system messages and whether or not the username has been overridden by an integration.
type PushNotification ¶
type PushNotification struct {
// contains filtered or unexported fields
}
type PushNotificationsHub ¶
type PushNotificationsHub struct {
// contains filtered or unexported fields
}
type RateLimiter ¶
type RateLimiter struct {
// contains filtered or unexported fields
}
func NewRateLimiter ¶
func NewRateLimiter(settings *model.RateLimitSettings, trustedProxyIPHeader []string) (*RateLimiter, error)
func (*RateLimiter) GenerateKey ¶
func (rl *RateLimiter) GenerateKey(r *http.Request) string
func (*RateLimiter) RateLimitHandler ¶
func (rl *RateLimiter) RateLimitHandler(wrappedHandler http.Handler) http.Handler
func (*RateLimiter) RateLimitWriter ¶
func (rl *RateLimiter) RateLimitWriter(key string, w http.ResponseWriter) bool
func (*RateLimiter) UserIdRateLimit ¶
func (rl *RateLimiter) UserIdRateLimit(userID string, w http.ResponseWriter) bool
type ReactionImportData ¶
type ReactionImportData struct { User *string `json:"user"` CreateAt *int64 `json:"create_at"` EmojiName *string `json:"emoji_name"` }
func ImportReactionFromPost ¶
func ImportReactionFromPost(user *model.User, reaction *model.Reaction) *ReactionImportData
type ReplyImportData ¶
type ReplyImportData struct { User *string `json:"user"` Message *string `json:"message"` CreateAt *int64 `json:"create_at"` FlaggedBy *[]string `json:"flagged_by,omitempty"` Reactions *[]ReactionImportData `json:"reactions,omitempty"` Attachments *[]AttachmentImportData `json:"attachments,omitempty"` }
func ImportReplyFromPost ¶
func ImportReplyFromPost(post *model.ReplyForExport) *ReplyImportData
type RoleImportData ¶
type SchemeImportData ¶
type SchemeImportData struct { Name *string `json:"name"` DisplayName *string `json:"display_name"` Description *string `json:"description"` Scope *string `json:"scope"` DefaultTeamAdminRole *RoleImportData `json:"default_team_admin_role"` DefaultTeamUserRole *RoleImportData `json:"default_team_user_role"` DefaultChannelAdminRole *RoleImportData `json:"default_channel_admin_role"` DefaultChannelUserRole *RoleImportData `json:"default_channel_user_role"` DefaultTeamGuestRole *RoleImportData `json:"default_team_guest_role"` DefaultChannelGuestRole *RoleImportData `json:"default_channel_guest_role"` }
type Server ¶
type Server struct { Store store.Store WebSocketRouter *WebSocketRouter // RootRouter is the starting point for all HTTP requests to the server. RootRouter *mux.Router // LocalRouter is the starting point for all the local UNIX socket // requests to the server LocalRouter *mux.Router // Router is the starting point for all web, api4 and ws requests to the server. It differs // from RootRouter only if the SiteURL contains a /subpath. Router *mux.Router Server *http.Server ListenAddr *net.TCPAddr RateLimiter *RateLimiter Busy *Busy PluginsEnvironment *plugin.Environment PluginConfigListenerId string PluginsLock sync.RWMutex EmailService *EmailService PushNotificationsHub PushNotificationsHub Jobs *jobs.JobServer HTTPService httpservice.HTTPService ImageProxy *imageproxy.ImageProxy Audit *audit.Audit Log *mlog.Logger NotificationsLog *mlog.Logger SearchEngine *searchengine.Broker AccountMigration einterfaces.AccountMigrationInterface Cluster einterfaces.ClusterInterface Compliance einterfaces.ComplianceInterface DataRetention einterfaces.DataRetentionInterface Ldap einterfaces.LdapInterface MessageExport einterfaces.MessageExportInterface Cloud einterfaces.CloudInterface Metrics einterfaces.MetricsInterface Notification einterfaces.NotificationInterface Saml einterfaces.SamlInterface LicenseManager einterfaces.LicenseInterface CacheProvider cache.Provider // contains filtered or unexported fields }
func (*Server) AddClusterLeaderChangedListener ¶
Registers a given function to be called when the cluster leader may have changed. Returns a unique ID for the listener which can later be used to remove it. If clustering is not enabled in this build, the callback will never be called.
func (*Server) AddConfigListener ¶
Registers a function with a given listener to be called when the config is reloaded and may have changed. The function will be called with two arguments: the old config and the new config. AddConfigListener returns a unique ID for the listener that can later be used to remove it.
func (*Server) AddLicenseListener ¶
func (*Server) AppOptions ¶
Global app options that should be applied to apps created by this server
func (*Server) AsymmetricSigningKey ¶
func (s *Server) AsymmetricSigningKey() *ecdsa.PrivateKey
AsymmetricSigningKey will return a private key that can be used for asymmetric signing.
func (*Server) CanIUpgradeToE0 ¶ added in v5.27.0
func (*Server) ClientConfigHash ¶ added in v5.26.0
func (*Server) ClientConfigWithComputed ¶ added in v5.26.0
ClientConfigWithComputed gets the configuration in a format suitable for sending to the client.
func (*Server) ClientLicense ¶ added in v5.26.0
func (*Server) ClusterHealthScore ¶ added in v5.26.0
func (*Server) DatabaseTypeAndMattermostVersion ¶ added in v5.33.0
Return Database type (postgres or mysql) and current version of Mattermost
func (*Server) DoSecurityUpdateCheck ¶
func (s *Server) DoSecurityUpdateCheck()
func (*Server) EnvironmentConfig ¶
func (s *Server) EnvironmentConfig(filter func(reflect.StructField) bool) map[string]interface{}
func (*Server) FileBackend ¶ added in v5.24.0
func (s *Server) FileBackend() (filestore.FileBackend, *model.AppError)
func (*Server) GenerateLicenseRenewalLink ¶ added in v5.32.0
GenerateLicenseRenewalLink returns a link that points to the CWS where clients can renew license
func (*Server) GenerateRenewalToken ¶ added in v5.32.0
GenerateRenewalToken returns the current active token or generate a new one if the current active one has expired
func (*Server) GetDefaultProfileImage ¶ added in v5.36.0
func (*Server) GetHubForUserId ¶ added in v5.26.0
GetHubForUserId returns the hub for a given user id.
func (*Server) GetLogger ¶ added in v5.35.0
func (s *Server) GetLogger() mlog.LoggerIFace
func (*Server) GetLogsSkipSend ¶ added in v5.26.0
func (*Server) GetMessageForNotification ¶ added in v5.26.0
func (*Server) GetMetrics ¶ added in v5.35.0
func (s *Server) GetMetrics() einterfaces.MetricsInterface
GetMetrics returns the server's Metrics interface. Exposing via a method allows interfaces to be created with subsets of server APIs.
func (*Server) GetPluginStatus ¶ added in v5.26.0
GetPluginStatus returns the status for a plugin installed on this server.
func (*Server) GetPluginStatuses ¶ added in v5.26.0
func (s *Server) GetPluginStatuses() (model.PluginStatuses, *model.AppError)
GetPluginStatuses returns the status for plugins installed on this server.
func (*Server) GetPluginsEnvironment ¶ added in v5.26.0
func (s *Server) GetPluginsEnvironment() *plugin.Environment
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.
func (*Server) GetProfileImage ¶ added in v5.36.0
func (*Server) GetRemoteClusterService ¶ added in v5.35.0
func (s *Server) GetRemoteClusterService() remotecluster.RemoteClusterServiceIFace
GetRemoteClusterService returns the `RemoteClusterService` instantiated by the server. May be nil if the service is not enabled via license.
func (*Server) GetRoleByName ¶ added in v5.26.0
func (*Server) GetSanitizedClientLicense ¶ added in v5.26.0
func (*Server) GetSchemes ¶ added in v5.26.0
func (*Server) GetSharedChannelSyncService ¶ added in v5.35.0
func (s *Server) GetSharedChannelSyncService() SharedChannelServiceIFace
GetSharedChannelSyncService returns the `SharedChannelSyncService` instantiated by the server. May be nil if the service is not enabled via license.
func (*Server) GetStore ¶ added in v5.35.0
GetStore returns the server's Store. Exposing via a method allows interfaces to be created with subsets of server APIs.
func (*Server) Go ¶
func (s *Server) Go(f func())
Go creates a goroutine, but maintains a record of it to ensure that execution completes before the server is shutdown.
func (*Server) HandleMetrics ¶ added in v5.34.0
func (*Server) HttpService ¶ added in v5.28.0
func (s *Server) HttpService() httpservice.HTTPService
func (*Server) InitMetricsRouter ¶ added in v5.34.0
func (*Server) InvalidateAllCaches ¶ added in v5.26.0
func (*Server) InvalidateAllCachesSkipSend ¶ added in v5.26.0
func (s *Server) InvalidateAllCachesSkipSend()
func (*Server) InvokeClusterLeaderChangedListeners ¶
func (s *Server) InvokeClusterLeaderChangedListeners()
func (*Server) IsPhase2MigrationCompleted ¶ added in v5.26.0
func (*Server) LoadLicense ¶ added in v5.26.0
func (s *Server) LoadLicense()
func (*Server) MailServiceConfig ¶ added in v5.33.0
func (s *Server) MailServiceConfig() *mail.SMTPConfig
func (*Server) MaxPostSize ¶ added in v5.26.0
func (*Server) NewClusterDiscoveryService ¶ added in v5.26.0
func (s *Server) NewClusterDiscoveryService() *ClusterDiscoveryService
func (*Server) PostActionCookieSecret ¶
func (*Server) Publish ¶ added in v5.26.0
func (s *Server) Publish(message *model.WebSocketEvent)
func (*Server) PublishSkipClusterSend ¶ added in v5.26.0
func (s *Server) PublishSkipClusterSend(event *model.WebSocketEvent)
func (*Server) ReloadConfig ¶
func (*Server) RemoveClusterLeaderChangedListener ¶
Removes a listener function by the unique ID returned when AddConfigListener was called
func (*Server) RemoveConfigListener ¶
Removes a listener function by the unique ID returned when AddConfigListener was called
func (*Server) RemoveLicense ¶ added in v5.26.0
func (*Server) RemoveLicenseListener ¶
func (*Server) RequestTrialLicense ¶ added in v5.26.0
func (s *Server) RequestTrialLicense(trialRequest *model.TrialLicenseRequest) *model.AppError
RequestTrialLicense request a trial license from the mattermost official license server
func (*Server) SaveConfig ¶ added in v5.26.0
func (s *Server) SaveConfig(newCfg *model.Config, sendConfigChangeClusterMessage bool) (*model.Config, *model.Config, *model.AppError)
SaveConfig replaces the active configuration, optionally notifying cluster peers. It returns both the previous and current configs.
func (*Server) SaveLicense ¶ added in v5.26.0
func (*Server) ServePluginPublicRequest ¶ added in v5.36.0
func (s *Server) ServePluginPublicRequest(w http.ResponseWriter, r *http.Request)
ServePluginPublicRequest serves public plugin files at the URL http(s)://$SITE_URL/plugins/$PLUGIN_ID/public/{anything}
func (*Server) ServePluginRequest ¶ added in v5.36.0
func (s *Server) ServePluginRequest(w http.ResponseWriter, r *http.Request)
func (*Server) SetClientLicense ¶ added in v5.26.0
func (*Server) SetLicense ¶ added in v5.26.0
func (*Server) SetRemoteClusterService ¶ added in v5.35.0
func (s *Server) SetRemoteClusterService(remoteClusterService remotecluster.RemoteClusterServiceIFace)
SetRemoteClusterService sets the `RemoteClusterService` to be used by the server. For testing only.
func (*Server) SetSharedChannelSyncService ¶ added in v5.35.0
func (s *Server) SetSharedChannelSyncService(sharedChannelService SharedChannelServiceIFace)
SetSharedChannelSyncService sets the `SharedChannelSyncService` to be used by the server. For testing only.
func (*Server) SetupMetricsServer ¶ added in v5.34.0
func (s *Server) SetupMetricsServer()
func (*Server) SharedChannelSyncHandler ¶ added in v5.35.0
func (s *Server) SharedChannelSyncHandler(event *model.WebSocketEvent)
SharedChannelSyncHandler is called when a websocket event is received by a cluster node. Only on the leader node it will notify the sync service to perform necessary updates to the remote for the given shared channel.
func (*Server) ShutDownPlugins ¶ added in v5.26.0
func (s *Server) ShutDownPlugins()
func (*Server) StartSearchEngine ¶ added in v5.22.0
func (*Server) StopHTTPServer ¶
func (s *Server) StopHTTPServer()
func (*Server) StopMetricsServer ¶ added in v5.34.0
func (s *Server) StopMetricsServer()
func (*Server) StopPushNotificationsHubWorkers ¶ added in v5.26.0
func (s *Server) StopPushNotificationsHubWorkers()
func (*Server) TelemetryId ¶ added in v5.28.0
func (*Server) TemplatesContainer ¶ added in v5.34.0
func (*Server) TotalWebsocketConnections ¶ added in v5.24.0
func (*Server) UpdateConfig ¶
func (*Server) UpgradeToE0 ¶ added in v5.27.0
func (*Server) UpgradeToE0Status ¶ added in v5.27.0
func (*Server) ValidateAndSetLicenseBytes ¶ added in v5.26.0
func (*Server) WaitForGoroutines ¶
func (s *Server) WaitForGoroutines()
WaitForGoroutines blocks until all goroutines created by App.Go exit.
type SharedChannelServiceIFace ¶ added in v5.35.0
type SharedChannelServiceIFace interface {}
SharedChannelServiceIFace is the interface to the shared channel service
type TeamImportData ¶
type TokenLocation ¶
type TokenLocation int
const ( TokenLocationNotFound TokenLocation = iota TokenLocationHeader TokenLocationCookie TokenLocationQueryString TokenLocationCloudHeader TokenLocationRemoteClusterHeader )
func ParseAuthTokenFromRequest ¶
func ParseAuthTokenFromRequest(r *http.Request) (string, TokenLocation)
func (TokenLocation) String ¶
func (tl TokenLocation) String() string
type UploadFileTask ¶ added in v5.22.0
type UploadFileTask struct { // File name. Name string ChannelId string TeamId string UserId string // Time stamp to use when creating the file. Timestamp time.Time // The value of the Content-Length http header, when available. ContentLength int64 // The file data stream. Input io.Reader // An optional, client-assigned Id field. ClientId string // If Raw, do not execute special processing for images, just upload // the file. Plugins are still invoked. Raw bool // contains filtered or unexported fields }
type UserChannelImportData ¶
type UserChannelImportData struct { Name *string `json:"name"` Roles *string `json:"roles"` NotifyProps *UserChannelNotifyPropsImportData `json:"notify_props,omitempty"` Favorite *bool `json:"favorite,omitempty"` }
func ImportUserChannelDataFromChannelMemberAndPreferences ¶
func ImportUserChannelDataFromChannelMemberAndPreferences(member *model.ChannelMemberForExport, preferences *model.Preferences) *UserChannelImportData
type UserImportData ¶
type UserImportData struct { ProfileImage *string `json:"profile_image,omitempty"` ProfileImageData *zip.File `json:"-"` Username *string `json:"username"` Email *string `json:"email"` AuthService *string `json:"auth_service"` AuthData *string `json:"auth_data,omitempty"` Password *string `json:"password,omitempty"` Nickname *string `json:"nickname"` FirstName *string `json:"first_name"` LastName *string `json:"last_name"` Position *string `json:"position"` Roles *string `json:"roles"` Locale *string `json:"locale"` UseMarkdownPreview *string `json:"feature_enabled_markdown_preview,omitempty"` UseFormatting *string `json:"formatting,omitempty"` ShowUnreadSection *string `json:"show_unread_section,omitempty"` DeleteAt *int64 `json:"delete_at,omitempty"` Teams *[]UserTeamImportData `json:"teams,omitempty"` Theme *string `json:"theme,omitempty"` UseMilitaryTime *string `json:"military_time,omitempty"` CollapsePreviews *string `json:"link_previews,omitempty"` MessageDisplay *string `json:"message_display,omitempty"` ChannelDisplayMode *string `json:"channel_display_mode,omitempty"` TutorialStep *string `json:"tutorial_step,omitempty"` EmailInterval *string `json:"email_interval,omitempty"` NotifyProps *UserNotifyPropsImportData `json:"notify_props,omitempty"` }
type UserNotifyPropsImportData ¶
type UserNotifyPropsImportData struct { Desktop *string `json:"desktop"` DesktopSound *string `json:"desktop_sound"` Email *string `json:"email"` Mobile *string `json:"mobile"` MobilePushStatus *string `json:"mobile_push_status"` ChannelTrigger *string `json:"channel"` CommentsTrigger *string `json:"comments"` MentionKeys *string `json:"mention_keys"` }
type UserTeamImportData ¶
type UserTeamImportData struct { Name *string `json:"name"` Roles *string `json:"roles"` Theme *string `json:"theme,omitempty"` Channels *[]UserChannelImportData `json:"channels,omitempty"` }
func ImportUserTeamDataFromTeamMember ¶
func ImportUserTeamDataFromTeamMember(member *model.TeamMemberForExport) *UserTeamImportData
type WebConn ¶
type WebConn struct { App *App WebSocket *websocket.Conn T i18n.TranslateFunc Locale string Sequence int64 UserId string // contains filtered or unexported fields }
WebConn represents a single websocket connection to a user. It contains all the necessary state to manage sending/receiving data to/from a websocket.
func (*WebConn) GetConnectionID ¶ added in v5.36.0
GetConnectionID returns the connection id of the connection.
func (*WebConn) GetSession ¶
GetSession returns the session of the connection.
func (*WebConn) GetSessionExpiresAt ¶
GetSessionExpiresAt returns the time at which the session expires.
func (*WebConn) GetSessionToken ¶
GetSessionToken returns the session token of the connection.
func (*WebConn) InvalidateCache ¶
func (wc *WebConn) InvalidateCache()
InvalidateCache resets all internal data of the WebConn.
func (*WebConn) IsAuthenticated ¶
IsAuthenticated returns whether the given WebConn is authenticated or not.
func (*WebConn) Pump ¶
func (wc *WebConn) Pump()
Pump starts the WebConn instance. After this, the websocket is ready to send/receive messages.
func (*WebConn) SetConnectionID ¶ added in v5.35.0
SetConnectionID sets the connection id of the connection.
func (*WebConn) SetSession ¶
SetSession sets the session of the connection.
func (*WebConn) SetSessionExpiresAt ¶
SetSessionExpiresAt sets the time at which the session expires.
func (*WebConn) SetSessionToken ¶
SetSessionToken sets the session token of the connection.
type WebConnConfig ¶ added in v5.36.0
type WebSocketRouter ¶
type WebSocketRouter struct {
// contains filtered or unexported fields
}
func (*WebSocketRouter) Handle ¶
func (wr *WebSocketRouter) Handle(action string, handler webSocketHandler)
func (*WebSocketRouter) ServeWebSocket ¶
func (wr *WebSocketRouter) ServeWebSocket(conn *WebConn, r *model.WebSocketRequest)
Source Files ¶
- admin.go
- analytics.go
- app.go
- app_iface.go
- audit.go
- authentication.go
- authorization.go
- auto_responder.go
- bot.go
- brand.go
- busy.go
- channel.go
- channel_category.go
- cloud.go
- cluster.go
- cluster_discovery.go
- cluster_handlers.go
- command.go
- command_autocomplete.go
- compliance.go
- config.go
- constants.go
- context.go
- data_retention.go
- download.go
- email.go
- email_batching.go
- emoji.go
- enterprise.go
- expirynotify.go
- export.go
- export_converters.go
- extract_plugin_tar.go
- feature_flags.go
- file.go
- group.go
- image.go
- import.go
- import_functions.go
- import_types.go
- import_utils.go
- import_validators.go
- integration_action.go
- job.go
- ldap.go
- license.go
- login.go
- migrations.go
- notification.go
- notification_email.go
- notification_push.go
- oauth.go
- opengraph.go
- options.go
- permissions.go
- permissions_migrations.go
- plugin.go
- plugin_api.go
- plugin_commands.go
- plugin_context.go
- plugin_db_driver.go
- plugin_event.go
- plugin_install.go
- plugin_key_value_store.go
- plugin_public_keys.go
- plugin_requests.go
- plugin_signature.go
- plugin_statuses.go
- post.go
- post_metadata.go
- preference.go
- product_notices.go
- ratelimit.go
- reaction.go
- remote_cluster.go
- remote_cluster_service_mock.go
- response_transfer.go
- role.go
- saml.go
- scheme.go
- searchengine.go
- security_update_check.go
- server.go
- server_license.go
- session.go
- shared_channel.go
- shared_channel_notifier.go
- shared_channel_service_iface.go
- slack.go
- status.go
- syncables.go
- team.go
- terms_of_service.go
- upload.go
- user.go
- user_agent.go
- user_terms_of_service.go
- web_conn.go
- web_hub.go
- webhook.go
- websocket_router.go