Documentation ¶
Index ¶
- Constants
- Variables
- func CheckUserDomain(user *model.User, domains string) bool
- func ClearStatusCache()
- func CreateProfileImage(username string, userId string, initialFont string) ([]byte, *model.AppError)
- 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 GetMentionsEnabledFields(post *model.Post) model.StringArray
- func GetProtocol(r *http.Request) string
- func GetStatusFromCache(userId string) *model.Status
- func JoinCluster(s *Server) error
- func OpenGraphDataWithProxyAddedToImageURLs(ogdata *opengraph.OpenGraph, toProxyURL func(string) string) *opengraph.OpenGraph
- func RegisterAccountMigrationInterface(f func(*Server) einterfaces.AccountMigrationInterface)
- func RegisterClusterInterface(f func(*Server) einterfaces.ClusterInterface)
- func RegisterCommandProvider(newProvider CommandProvider)
- func RegisterComplianceInterface(f func(*App) einterfaces.ComplianceInterface)
- func RegisterDataRetentionInterface(f func(*App) einterfaces.DataRetentionInterface)
- func RegisterElasticsearchInterface(f func(*App) einterfaces.ElasticsearchInterface)
- func RegisterJobsDataRetentionJobInterface(f func(*App) ejobs.DataRetentionJobInterface)
- func RegisterJobsElasticsearchAggregatorInterface(f func(*App) ejobs.ElasticsearchAggregatorInterface)
- func RegisterJobsElasticsearchIndexerInterface(f func(*App) ejobs.ElasticsearchIndexerInterface)
- func RegisterJobsLdapSyncInterface(f func(*App) ejobs.LdapSyncInterface)
- func RegisterJobsMessageExportJobInterface(f func(*App) ejobs.MessageExportJobInterface)
- func RegisterJobsMigrationsJobInterface(f func(*App) tjobs.MigrationsJobInterface)
- func RegisterJobsPluginsJobInterface(f func(*App) tjobs.PluginsJobInterface)
- func RegisterLdapInterface(f func(*App) einterfaces.LdapInterface)
- func RegisterMessageExportInterface(f func(*App) einterfaces.MessageExportInterface)
- func RegisterMetricsInterface(f func(*App) einterfaces.MetricsInterface)
- func RegisterSamlInterface(f func(*App) einterfaces.SamlInterface)
- func RemoveRoles(rolesToRemove []string, roles string) string
- func ReturnWebSocketError(conn *WebConn, r *model.WebSocketRequest, err *model.AppError)
- func RunJobs(s *Server) error
- func ShouldSendPushNotification(user *model.User, channelNotifyProps model.StringMap, wasMentioned bool, ...) bool
- func SlackConvertChannelMentions(channels []SlackChannel, posts map[string][]SlackPost) map[string][]SlackPost
- func SlackConvertChannelName(channelName string, channelId string) string
- func SlackConvertPostsMarkup(posts map[string][]SlackPost) map[string][]SlackPost
- func SlackConvertTimeStamp(ts string) int64
- func SlackConvertUserMentions(users []SlackUser, posts map[string][]SlackPost) map[string][]SlackPost
- func SlackSanitiseChannelProperties(channel model.Channel) model.Channel
- func SplitWebhookPost(post *model.Post, maxPostSize int) ([]*model.Post, *model.AppError)
- func StartElasticsearch(s *Server) error
- func StartMetrics(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)
- type App
- func (a *App) ActivateMfa(userId, token string) *model.AppError
- func (a *App) AddChannelMember(userId string, channel *model.Channel, userRequestorId string, ...) (*model.ChannelMember, *model.AppError)
- func (a *App) AddConfigListener(listener func(*model.Config, *model.Config)) string
- func (a *App) AddDirectChannels(teamId string, user *model.User) *model.AppError
- func (a *App) AddLicenseListener(listener func()) string
- func (a *App) AddNotificationEmailToBatch(user *model.User, post *model.Post, team *model.Team) *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(teamId, userId string) (*model.TeamMember, *model.AppError)
- func (a *App) AddTeamMemberByInviteId(inviteId, userId string) (*model.TeamMember, *model.AppError)
- func (a *App) AddTeamMemberByToken(userId, tokenId string) (*model.TeamMember, *model.AppError)
- func (a *App) AddTeamMembers(teamId string, userIds []string, userRequestorId string) ([]*model.TeamMember, *model.AppError)
- func (a *App) AddUserToChannel(user *model.User, channel *model.Channel) (*model.ChannelMember, *model.AppError)
- func (a *App) AddUserToTeam(teamId string, userId string, userRequestorId string) (*model.Team, *model.AppError)
- func (a *App) AddUserToTeamByInviteId(inviteId string, userId string) (*model.Team, *model.AppError)
- func (a *App) AddUserToTeamByTeamId(teamId string, user *model.User) *model.AppError
- func (a *App) AddUserToTeamByToken(userId string, tokenId string) (*model.Team, *model.AppError)
- func (a *App) AllowOAuthAppAccessToUser(userId string, authRequest *model.AuthorizeRequest) (string, *model.AppError)
- func (a *App) AsymmetricSigningKey() *ecdsa.PrivateKey
- func (a *App) AttachDeviceId(sessionId string, deviceId string, expiresAt int64) *model.AppError
- func (a *App) AuthenticateUserForLogin(id, loginId, password, mfaToken string, ldapOnly bool) (user *model.User, err *model.AppError)
- func (a *App) AuthorizeOAuthUser(w http.ResponseWriter, r *http.Request, ...) (io.ReadCloser, string, map[string]string, *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) BulkExport(writer io.Writer, file string, pathToEmojiDir string, ...) *model.AppError
- func (a *App) BulkImport(fileReader io.Reader, dryRun bool, workers int) (*model.AppError, int)
- func (a *App) CancelJob(jobId string) *model.AppError
- func (a *App) CheckForClientSideCert(r *http.Request) (string, string, string)
- func (a *App) CheckPasswordAndAllCriteria(user *model.User, password string, mfaToken string) *model.AppError
- 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) ClearPushNotification(currentSessionId, userId, channelId string)
- func (a *App) ClearPushNotificationSync(currentSessionId, userId, channelId string)
- func (a *App) ClearSessionCacheForUser(userId string)
- func (a *App) ClearSessionCacheForUserSkipClusterSend(userId string)
- func (a *App) ClientConfig() map[string]string
- func (a *App) ClientConfigHash() string
- func (a *App) ClientConfigWithComputed() map[string]string
- func (a *App) ClientLicense() map[string]string
- func (a *App) ClusterClearSessionCacheForUserHandler(msg *model.ClusterMessage)
- func (a *App) ClusterInvalidateAllCachesHandler(msg *model.ClusterMessage)
- func (a *App) ClusterInvalidateCacheForChannelByNameHandler(msg *model.ClusterMessage)
- func (a *App) ClusterInvalidateCacheForChannelHandler(msg *model.ClusterMessage)
- func (a *App) ClusterInvalidateCacheForChannelMembersHandler(msg *model.ClusterMessage)
- func (a *App) ClusterInvalidateCacheForChannelMembersNotifyPropHandler(msg *model.ClusterMessage)
- func (a *App) ClusterInvalidateCacheForChannelPostsHandler(msg *model.ClusterMessage)
- func (a *App) ClusterInvalidateCacheForUserHandler(msg *model.ClusterMessage)
- func (a *App) ClusterInvalidateCacheForWebhookHandler(msg *model.ClusterMessage)
- func (a *App) ClusterPublishHandler(msg *model.ClusterMessage)
- func (a *App) ClusterUpdateStatusHandler(msg *model.ClusterMessage)
- func (a *App) CompleteOAuth(service string, body io.ReadCloser, teamId string, props map[string]string) (*model.User, *model.AppError)
- func (a *App) CompleteSwitchWithOAuth(service string, userData io.Reader, email string) (*model.User, *model.AppError)
- func (a *App) Config() *model.Config
- func (a *App) CopyFileInfos(userId string, fileIds []string) ([]string, *model.AppError)
- func (a *App) CreateBasicUser(client *model.Client4) *model.AppError
- func (a *App) CreateBot(bot *model.Bot) (*model.Bot, *model.AppError)
- func (a *App) CreateChannel(channel *model.Channel, addMember bool) (*model.Channel, *model.AppError)
- func (a *App) CreateChannelWithUser(channel *model.Channel, userId string) (*model.Channel, *model.AppError)
- func (a *App) CreateCommand(cmd *model.Command) (*model.Command, *model.AppError)
- func (a *App) CreateCommandPost(post *model.Post, teamId string, response *model.CommandResponse) (*model.Post, *model.AppError)
- func (a *App) CreateCommandWebhook(commandId string, args *model.CommandArgs) (*model.CommandWebhook, *model.AppError)
- func (a *App) CreateDefaultChannels(teamId string) ([]*model.Channel, *model.AppError)
- 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) CreateGroupSyncable(groupSyncable *model.GroupSyncable) (*model.GroupSyncable, *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(service string, userData io.Reader, teamId string) (*model.User, *model.AppError)
- func (a *App) CreateOrRestoreGroupMember(groupID string, userID string) (*model.GroupMember, *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(post *model.Post, channel *model.Channel, triggerWebhooks bool) (savedPost *model.Post, err *model.AppError)
- func (a *App) CreatePostAsUser(post *model.Post, currentSessionId string) (*model.Post, *model.AppError)
- func (a *App) CreatePostMissingChannel(post *model.Post, triggerWebhooks bool) (*model.Post, *model.AppError)
- func (a *App) CreatePushNotificationsHub()
- 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) CreateTeam(team *model.Team) (*model.Team, *model.AppError)
- func (a *App) CreateTeamWithUser(team *model.Team, userId string) (*model.Team, *model.AppError)
- func (a *App) CreateTermsOfService(text, userId string) (*model.TermsOfService, *model.AppError)
- func (a *App) CreateUser(user *model.User) (*model.User, *model.AppError)
- func (a *App) CreateUserAccessToken(token *model.UserAccessToken) (*model.UserAccessToken, *model.AppError)
- func (a *App) CreateUserAsAdmin(user *model.User) (*model.User, *model.AppError)
- func (a *App) CreateUserFromSignup(user *model.User) (*model.User, *model.AppError)
- func (a *App) CreateUserWithInviteId(user *model.User, inviteId string) (*model.User, *model.AppError)
- func (a *App) CreateUserWithToken(user *model.User, tokenId string) (*model.User, *model.AppError)
- func (a *App) CreateVerifyEmailToken(userId string, newEmail string) (*model.Token, *model.AppError)
- func (a *App) CreateWebhookPost(userId string, channel *model.Channel, ...) (*model.Post, *model.AppError)
- func (a *App) DeactivateMfa(userId string) *model.AppError
- func (a *App) DeauthorizeOAuthAppForUser(userId, appId string) *model.AppError
- func (a *App) DeleteAllExpiredPluginKeys() *model.AppError
- func (a *App) DeleteAllKeysForPlugin(pluginId string) *model.AppError
- func (a *App) DeleteBrandImage() *model.AppError
- func (a *App) DeleteChannel(channel *model.Channel, userId string) *model.AppError
- func (a *App) DeleteCommand(commandId string) *model.AppError
- func (a *App) DeleteEmoji(emoji *model.Emoji) *model.AppError
- func (a *App) DeleteEphemeralPost(userId string, post *model.Post) *model.Post
- func (a *App) DeleteFlaggedPosts(postId string)
- func (a *App) DeleteGroup(groupID string) (*model.Group, *model.AppError)
- 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) DeleteReactionForPost(reaction *model.Reaction) *model.AppError
- func (a *App) DeleteScheme(schemeId string) (*model.Scheme, *model.AppError)
- func (a *App) DeleteToken(token *model.Token) *model.AppError
- func (a *App) DiagnosticId() string
- 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(rawURL string, body []byte) (*http.Response, *model.AppError)
- func (a *App) DoAdvancedPermissionsMigration()
- func (a *App) DoEmojisPermissionsMigration()
- func (a *App) DoLogin(w http.ResponseWriter, r *http.Request, user *model.User, deviceId string) (*model.Session, *model.AppError)
- func (a *App) DoPermissionsMigrations() *model.AppError
- func (a *App) DoPostAction(postId, actionId, userId, selectedOption string) (string, *model.AppError)
- func (a *App) DoPostActionWithCookie(postId, actionId, userId, selectedOption string, ...) (string, *model.AppError)
- func (a *App) DoUploadFile(now time.Time, rawTeamId string, rawChannelId string, rawUserId string, ...) (*model.FileInfo, *model.AppError)
- func (a *App) DoUploadFileExpectModification(now time.Time, rawTeamId string, rawChannelId string, rawUserId string, ...) (*model.FileInfo, []byte, *model.AppError)
- func (a *App) DoubleCheckPassword(user *model.User, password string) *model.AppError
- func (a *App) EnablePlugin(id string) *model.AppError
- func (a *App) EnableUserAccessToken(token *model.UserAccessToken) *model.AppError
- func (a *App) EnsureDiagnosticId()
- func (a *App) EnvironmentConfig() map[string]interface{}
- func (a *App) ExecuteCommand(args *model.CommandArgs) (*model.CommandResponse, *model.AppError)
- func (a *App) ExportAllChannels(writer io.Writer) *model.AppError
- func (a *App) ExportAllDirectChannels(writer io.Writer) *model.AppError
- func (a *App) ExportAllDirectPosts(writer io.Writer) *model.AppError
- func (a *App) ExportAllPosts(writer io.Writer) *model.AppError
- func (a *App) ExportAllTeams(writer io.Writer) *model.AppError
- func (a *App) ExportAllUsers(writer io.Writer) *model.AppError
- func (a *App) ExportCustomEmoji(writer io.Writer, file string, pathToEmojiDir string, ...) *model.AppError
- func (a *App) ExportPermissions(w io.Writer) error
- func (a *App) ExportVersion(writer io.Writer) *model.AppError
- func (a *App) ExportWriteLine(writer io.Writer, line *LineImportData) *model.AppError
- func (a *App) FileBackend() (filesstore.FileBackend, *model.AppError)
- func (a *App) FileExists(path string) (bool, *model.AppError)
- func (a *App) FileReader(path string) (io.ReadCloser, *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) FindTeamByName(name string) bool
- func (a *App) FindTeamIdForFilename(post *model.Post, filename string) string
- func (a *App) GenerateMfaSecret(userId string) (*model.MfaSecret, *model.AppError)
- func (a *App) GeneratePublicLink(siteURL string, info *model.FileInfo) string
- func (a *App) GetActivePluginManifests() ([]*model.Manifest, *model.AppError)
- func (a *App) GetAllChannels(page, perPage int, includeDeleted bool) (*model.ChannelListWithTeamData, *model.AppError)
- func (a *App) GetAllLdapGroupsPage(page int, perPage int, opts model.GroupSearchOpts) ([]*model.Group, int, *model.AppError)
- func (a *App) GetAllPrivateTeams() ([]*model.Team, *model.AppError)
- func (a *App) GetAllPrivateTeamsPage(offset int, limit int) ([]*model.Team, *model.AppError)
- func (a *App) GetAllPublicTeams() ([]*model.Team, *model.AppError)
- func (a *App) GetAllPublicTeamsPage(offset int, limit int) ([]*model.Team, *model.AppError)
- func (a *App) GetAllRoles() ([]*model.Role, *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) ([]*model.Team, *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) 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) GetChannelMember(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) GetChannelUnread(channelId, userId string) (*model.ChannelUnread, *model.AppError)
- func (a *App) GetChannelsByNames(channelNames []string, teamId string) ([]*model.Channel, *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) (*model.ChannelList, *model.AppError)
- func (a *App) GetChannelsUserNotIn(teamId string, userId string, offset int, limit int) (*model.ChannelList, *model.AppError)
- func (a *App) GetClientLicenseEtag(useSanitized bool) string
- 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) 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) GetDataRetentionPolicy() (*model.DataRetentionPolicy, *model.AppError)
- func (a *App) GetDefaultProfileImage(user *model.User) ([]byte, *model.AppError)
- func (a *App) GetDeletedChannels(teamId string, offset int, limit int) (*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) GetEnvironmentConfig() map[string]interface{}
- func (a *App) GetFile(fileId string) ([]byte, *model.AppError)
- func (a *App) GetFileInfo(fileId string) (*model.FileInfo, *model.AppError)
- func (a *App) GetFileInfosForPost(postId string) ([]*model.FileInfo, *model.AppError)
- func (a *App) GetFileInfosForPostWithMigration(postId string) ([]*model.FileInfo, *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) GetGroup(id string) (*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) 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) GetGroupsBySource(groupSource model.GroupSource) ([]*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) GetIncomingWebhooksPage(page, perPage int) ([]*model.IncomingWebhook, *model.AppError)
- func (a *App) GetInfoForFilename(post *model.Post, teamId string, filename string) *model.FileInfo
- 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) GetJobsPage(page int, perPage int) ([]*model.Job, *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) GetMentionKeywordsInChannel(profiles map[string]*model.User, lookForSpecialMentions bool, ...) map[string][]string
- 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) 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(userId, otherUserId string) (*model.Channel, *model.AppError)
- func (a *App) GetOutgoingWebhook(hookId string) (*model.OutgoingWebhook, *model.AppError)
- func (a *App) GetOutgoingWebhooksForChannelPage(channelId string, page, perPage int) ([]*model.OutgoingWebhook, *model.AppError)
- func (a *App) GetOutgoingWebhooksForTeamPage(teamId string, page, perPage int) ([]*model.OutgoingWebhook, *model.AppError)
- func (a *App) GetOutgoingWebhooksPage(page, perPage int) ([]*model.OutgoingWebhook, *model.AppError)
- func (a *App) GetPasswordRecoveryToken(token string) (*model.Token, *model.AppError)
- func (a *App) GetPermalinkPost(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) 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) 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(channelId, postId string, page, perPage int) (*model.PostList, *model.AppError)
- func (a *App) GetPostsAroundPost(postId, channelId string, offset, limit int, before bool) (*model.PostList, *model.AppError)
- func (a *App) GetPostsBeforePost(channelId, postId string, page, perPage int) (*model.PostList, *model.AppError)
- func (a *App) GetPostsEtag(channelId string) string
- func (a *App) GetPostsPage(channelId string, page int, perPage int) (*model.PostList, *model.AppError)
- func (a *App) GetPostsSince(channelId string, time int64) (*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) 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) 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) GetRole(id string) (*model.Role, *model.AppError)
- func (a *App) GetRoleByName(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) GetSanitizeOptions(asAdmin bool) map[string]bool
- func (a *App) GetSanitizedClientLicense() map[string]string
- 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) (string, string, *model.AppError)
- func (a *App) GetSchemeRolesForTeam(teamId 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) GetSessions(userId string) ([]*model.Session, *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) GetStatusesByIds(userIds []string) (map[string]interface{}, *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) 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) ([]*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) GetTeamStats(teamId string) (*model.TeamStats, *model.AppError)
- func (a *App) GetTeamUnread(teamId, userId string) (*model.TeamUnread, *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) GetTotalUsersStats() (*model.UsersStats, *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) GetUsersByIds(userIds []string, asAdmin bool) ([]*model.User, *model.AppError)
- func (a *App) GetUsersByUsernames(usernames []string, asAdmin bool) ([]*model.User, *model.AppError)
- func (a *App) GetUsersEtag() string
- func (a *App) GetUsersInChannel(channelId string, offset int, limit int) ([]*model.User, *model.AppError)
- func (a *App) GetUsersInChannelByStatus(channelId string, offset int, limit int) ([]*model.User, *model.AppError)
- func (a *App) GetUsersInChannelMap(channelId string, offset int, limit int, asAdmin bool) (map[string]*model.User, *model.AppError)
- func (a *App) GetUsersInChannelPage(channelId string, page int, perPage int, asAdmin bool) ([]*model.User, *model.AppError)
- func (a *App) GetUsersInChannelPageByStatus(channelId string, page int, perPage int, asAdmin bool) ([]*model.User, *model.AppError)
- func (a *App) GetUsersInTeam(options *model.UserGetOptions) ([]*model.User, *model.AppError)
- func (a *App) GetUsersInTeamEtag(teamId string) string
- func (a *App) GetUsersInTeamPage(options *model.UserGetOptions, asAdmin bool) ([]*model.User, *model.AppError)
- func (a *App) GetUsersNotInChannel(teamId string, channelId string, offset int, limit int) ([]*model.User, *model.AppError)
- func (a *App) GetUsersNotInChannelMap(teamId string, channelId string, offset int, limit int, asAdmin bool) (map[string]*model.User, *model.AppError)
- func (a *App) GetUsersNotInChannelPage(teamId string, channelId string, page int, perPage int, asAdmin bool) ([]*model.User, *model.AppError)
- func (a *App) GetUsersNotInTeam(teamId string, offset int, limit int) ([]*model.User, *model.AppError)
- func (a *App) GetUsersNotInTeamEtag(teamId string) string
- func (a *App) GetUsersNotInTeamPage(teamId string, 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(offset int, limit int) ([]*model.User, *model.AppError)
- func (a *App) GetUsersWithoutTeamPage(page int, perPage int, asAdmin bool) ([]*model.User, *model.AppError)
- func (a *App) GetVerifyEmailToken(token string) (*model.Token, *model.AppError)
- func (a *App) HTMLTemplates() *template.Template
- func (a *App) Handle404(w http.ResponseWriter, r *http.Request)
- func (a *App) HandleCommandResponse(command *model.Command, args *model.CommandArgs, ...) (*model.CommandResponse, *model.AppError)
- func (a *App) HandleCommandResponsePost(command *model.Command, args *model.CommandArgs, ...) (*model.Post, *model.AppError)
- func (a *App) HandleCommandWebhook(hookId string, response *model.CommandResponse) *model.AppError
- func (a *App) HandleImages(previewPathList []string, thumbnailPathList []string, fileData [][]byte)
- func (a *App) HandleIncomingWebhook(hookId string, req *model.IncomingWebhookRequest) *model.AppError
- 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) HubRegister(webConn *WebConn)
- func (a *App) HubStart()
- func (a *App) HubStop()
- func (a *App) HubUnregister(webConn *WebConn)
- func (a *App) ImageProxyAdder() func(string) string
- func (a *App) ImageProxyRemover() (f func(string) string)
- func (a *App) ImportAttachment(data *AttachmentImportData, post *model.Post, teamId string, dryRun bool) (*model.FileInfo, *model.AppError)
- func (a *App) ImportChannel(data *ChannelImportData, dryRun bool) *model.AppError
- func (a *App) ImportDirectChannel(data *DirectChannelImportData, dryRun bool) *model.AppError
- func (a *App) ImportDirectPost(data *DirectPostImportData, dryRun bool) *model.AppError
- func (a *App) ImportEmoji(data *EmojiImportData, dryRun bool) *model.AppError
- func (a *App) ImportLine(line LineImportData, dryRun bool) *model.AppError
- func (a *App) ImportPermissions(jsonl io.Reader) error
- func (a *App) ImportPost(data *PostImportData, dryRun bool) *model.AppError
- func (a *App) ImportReaction(data *ReactionImportData, post *model.Post, dryRun bool) *model.AppError
- func (a *App) ImportReply(data *ReplyImportData, post *model.Post, teamId string, dryRun bool) *model.AppError
- func (a *App) ImportRole(data *RoleImportData, dryRun bool, isSchemeRole bool) *model.AppError
- func (a *App) ImportScheme(data *SchemeImportData, dryRun bool) *model.AppError
- func (a *App) ImportTeam(data *TeamImportData, dryRun bool) *model.AppError
- func (a *App) ImportUser(data *UserImportData, dryRun bool) *model.AppError
- func (a *App) ImportUserChannels(user *model.User, team *model.Team, teamMember *model.TeamMember, ...) *model.AppError
- func (a *App) ImportUserTeams(user *model.User, data *[]UserTeamImportData) *model.AppError
- func (a *App) InitPlugins(pluginDir, webappPluginDir string)
- func (a *App) InitPostMetadata()
- func (a *App) InstallPlugin(pluginFile io.Reader, replace bool) (*model.Manifest, *model.AppError)
- func (a *App) InvalidateAllCaches() *model.AppError
- func (a *App) InvalidateAllCachesSkipSend()
- func (a *App) InvalidateAllEmailInvites() *model.AppError
- func (a *App) InvalidateCacheForChannel(channel *model.Channel)
- func (a *App) InvalidateCacheForChannelByNameSkipClusterSend(teamId, name string)
- func (a *App) InvalidateCacheForChannelMembers(channelId string)
- func (a *App) InvalidateCacheForChannelMembersNotifyProps(channelId string)
- func (a *App) InvalidateCacheForChannelMembersNotifyPropsSkipClusterSend(channelId string)
- func (a *App) InvalidateCacheForChannelMembersSkipClusterSend(channelId string)
- func (a *App) InvalidateCacheForChannelPosts(channelId string)
- func (a *App) InvalidateCacheForChannelPostsSkipClusterSend(channelId string)
- func (a *App) InvalidateCacheForChannelSkipClusterSend(channelId string)
- func (a *App) InvalidateCacheForUser(userId string)
- func (a *App) InvalidateCacheForUserSkipClusterSend(userId string)
- func (a *App) InvalidateCacheForWebhook(webhookId string)
- func (a *App) InvalidateCacheForWebhookSkipClusterSend(webhookId string)
- func (a *App) InvalidateWebConnSessionCacheForUser(userId string)
- func (a *App) InviteNewUsersToTeam(emailList []string, teamId, senderId string) *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) IsUsernameTaken(name string) bool
- func (a *App) JoinChannel(channel *model.Channel, userId string) *model.AppError
- func (a *App) JoinDefaultChannels(teamId string, user *model.User, shouldBeAdmin bool, userRequestorId string) *model.AppError
- func (a *App) JoinUserToTeam(team *model.Team, user *model.User, userRequestorId string) *model.AppError
- func (a *App) LeaveChannel(channelId string, userId string) *model.AppError
- func (a *App) LeaveTeam(team *model.Team, user *model.User, requestorId string) *model.AppError
- func (a *App) License() *model.License
- func (a *App) LimitedClientConfig() map[string]string
- func (a *App) LimitedClientConfigWithComputed() map[string]string
- func (a *App) ListAllCommands(teamId string, T goi18n.TranslateFunc) ([]*model.Command, *model.AppError)
- func (a *App) ListAutocompleteCommands(teamId string, T goi18n.TranslateFunc) ([]*model.Command, *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) LoadLicense()
- func (a *App) LoginByOAuth(service string, userData io.Reader, teamId string) (*model.User, *model.AppError)
- func (a *App) MakePermissionError(permission *model.Permission) *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) MigrateFilenamesToFileInfos(post *model.Post) []*model.FileInfo
- func (a *App) MoveChannel(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) NewEmailTemplate(name, locale string) *utils.HTMLTemplate
- func (a *App) NewPluginAPI(manifest *model.Manifest) plugin.API
- func (a *App) NewWebConn(ws *websocket.Conn, session model.Session, t goi18n.TranslateFunc, ...) *WebConn
- func (a *App) NewWebHub() *Hub
- func (a *App) OldImportChannel(channel *model.Channel) *model.Channel
- func (a *App) OldImportFile(timestamp time.Time, file io.Reader, teamId string, channelId string, ...) (*model.FileInfo, error)
- func (a *App) OldImportIncomingWebhookPost(post *model.Post, props model.StringInterface)
- func (a *App) OldImportPost(post *model.Post)
- func (a *App) OldImportUser(team *model.Team, user *model.User) *model.User
- func (a *App) OpenInteractiveDialog(request model.OpenDialogRequest) *model.AppError
- func (a *App) OriginChecker() func(*http.Request) bool
- func (a *App) ParseOpenGraphMetadata(requestURL string, body io.Reader, contentType string) *opengraph.OpenGraph
- func (a *App) PatchBot(botUserId string, botPatch *model.BotPatch) (*model.Bot, *model.AppError)
- func (a *App) PatchChannel(channel *model.Channel, patch *model.ChannelPatch, userId string) (*model.Channel, *model.AppError)
- func (a *App) PatchPost(postId string, patch *model.PostPatch) (*model.Post, *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) PendingAutoAddChannelMembers(minGroupMembersCreateAt int64) ([]*model.UserChannelIDPair, *model.AppError)
- func (a *App) PendingAutoAddTeamMembers(minGroupMembersCreateAt int64) ([]*model.UserTeamIDPair, *model.AppError)
- func (a *App) PermanentDeleteAllUsers() *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(user *model.User) *model.AppError
- func (a *App) PluginCommandsForTeam(teamId string) []*model.Command
- func (a *App) PluginContext() *plugin.Context
- func (a *App) PopulateSyncablesSince(groupMembersCreatedAfter int64) error
- func (a *App) PostActionCookieSecret() []byte
- func (a *App) PostAddToChannelMessage(user *model.User, addedUser *model.User, channel *model.Channel, ...) *model.AppError
- func (a *App) PostPatchWithProxyRemovedFromImageURLs(patch *model.PostPatch) *model.PostPatch
- func (a *App) PostUpdateChannelDisplayNameMessage(userId string, channel *model.Channel, ...) *model.AppError
- func (a *App) PostUpdateChannelHeaderMessage(userId string, channel *model.Channel, ...) *model.AppError
- func (a *App) PostUpdateChannelPurposeMessage(userId string, channel *model.Channel, oldChannelPurpose string, ...) *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) *model.Post
- func (a *App) PreparePostListForClient(originalList *model.PostList) *model.PostList
- func (app *App) ProcessSlackAttachments(a []*model.SlackAttachment) []*model.SlackAttachment
- func (a *App) ProcessSlackText(text string) string
- func (a *App) Publish(message *model.WebSocketEvent)
- func (a *App) PublishSkipClusterSend(message *model.WebSocketEvent)
- 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) RegisterAllClusterMessageHandlers()
- func (a *App) RegisterPluginCommand(pluginId string, command *model.Command) error
- func (a *App) ReloadConfig() error
- func (a *App) RemoveConfigListener(id string)
- func (a *App) RemoveFile(path string) *model.AppError
- func (a *App) RemoveLicense() *model.AppError
- func (a *App) RemoveLicenseListener(id string)
- func (a *App) RemovePlugin(id string) *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) RemoveUserFromChannel(userIdToRemove string, removerUserId string, channel *model.Channel) *model.AppError
- func (a *App) RemoveUserFromTeam(teamId string, userId string, requestorId string) *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) ResetPasswordFromToken(userSuppliedTokenString, newPassword string) *model.AppError
- func (a *App) ResetPermissionsSystem() *model.AppError
- func (a *App) RestoreChannel(channel *model.Channel) (*model.Channel, *model.AppError)
- func (a *App) RestoreTeam(teamId string) *model.AppError
- 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) RevokeUserAccessToken(token *model.UserAccessToken) *model.AppError
- func (a *App) RolesGrantPermission(roleNames []string, permissionId string) bool
- 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.AppError
- func (a *App) SaveLicense(licenseBytes []byte) (*model.License, *model.AppError)
- func (a *App) SaveReactionForPost(reaction *model.Reaction) (*model.Reaction, *model.AppError)
- func (a *App) SaveUserTermsOfService(userId, termsOfServiceId string, accepted bool) *model.AppError
- func (a *App) SchemesIterator(batchSize int) func() []*model.Scheme
- func (a *App) SearchAllChannels(term string, includeDeleted bool) (*model.ChannelListWithTeamData, *model.AppError)
- func (a *App) SearchAllTeams(term string) ([]*model.Team, *model.AppError)
- func (a *App) SearchChannels(teamId string, 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) SearchPostsInTeam(teamId string, paramsList []*model.SearchParams) (*model.PostList, *model.AppError)
- func (a *App) SearchPostsInTeamForUser(terms string, userId string, teamId string, isOrSearch bool, ...) (*model.PostSearchResults, *model.AppError)
- func (a *App) SearchPrivateTeams(term string) ([]*model.Team, *model.AppError)
- func (a *App) SearchPublicTeams(term string) ([]*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) SearchUsersInTeam(teamId string, 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) SendAutoResponse(channel *model.Channel, receiver *model.User)
- func (a *App) SendChangeUsernameEmail(oldUsername, newUsername, email, locale, siteURL string) *model.AppError
- func (a *App) SendDailyDiagnostics()
- func (a *App) SendDeactivateAccountEmail(email string, locale, siteURL string) *model.AppError
- func (a *App) SendDiagnostic(event string, properties map[string]interface{})
- func (a *App) SendEmailChangeEmail(oldEmail, newEmail, locale, siteURL string) *model.AppError
- func (a *App) SendEmailChangeVerifyEmail(newUserEmail, locale, siteURL, token string) *model.AppError
- func (a *App) SendEmailVerification(user *model.User, newEmail string) *model.AppError
- func (a *App) SendEphemeralPost(userId string, post *model.Post) *model.Post
- func (a *App) SendInviteEmails(team *model.Team, senderName string, senderUserId string, invites []string, ...)
- func (a *App) SendMail(to, subject, htmlBody string) *model.AppError
- func (a *App) SendMfaChangeEmail(email string, activated bool, locale, siteURL string) *model.AppError
- func (a *App) SendNotifications(post *model.Post, team *model.Team, channel *model.Channel, sender *model.User, ...) ([]string, *model.AppError)
- func (a *App) SendPasswordChangeEmail(email, method, locale, siteURL string) *model.AppError
- func (a *App) SendPasswordReset(email string, siteURL string) (bool, *model.AppError)
- func (a *App) SendPasswordResetEmail(email string, token *model.Token, locale, siteURL string) (bool, *model.AppError)
- func (a *App) SendSignInChangeEmail(email, method, locale, siteURL string) *model.AppError
- func (a *App) SendUserAccessTokenAddedEmail(email, locale, siteURL string) *model.AppError
- func (a *App) SendVerifyEmail(userEmail, locale, siteURL, token string) *model.AppError
- func (a *App) SendWelcomeEmail(userId string, email string, verified bool, locale, siteURL string) *model.AppError
- func (a *App) ServePluginRequest(w http.ResponseWriter, r *http.Request)
- func (a *App) SessionCacheLength() int
- func (a *App) SessionHasPermissionTo(session model.Session, permission *model.Permission) 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) SessionHasPermissionToManageBot(session model.Session, botUserId string) *model.AppError
- 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) SetActiveChannel(userId string, channelId string) *model.AppError
- func (a *App) SetAutoResponderStatus(user *model.User, oldNotifyProps model.StringMap)
- func (a *App) SetClientLicense(m map[string]string)
- func (a *App) SetDefaultProfileImage(user *model.User) *model.AppError
- func (a *App) SetDiagnosticId(id string)
- func (a *App) SetLicense(license *model.License) bool
- 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) 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) SetStatusAwayIfNeeded(userId string, manual bool)
- func (a *App) SetStatusDoNotDisturb(userId string)
- 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) SetupInviteEmailRateLimiting() error
- func (a *App) ShutDownPlugins()
- func (a *App) Shutdown()
- func (a *App) SlackAddBotUser(teamId string, log *bytes.Buffer) *model.User
- func (a *App) SlackAddChannels(teamId string, slackchannels []SlackChannel, posts map[string][]SlackPost, ...) map[string]*model.Channel
- func (a *App) SlackAddPosts(teamId string, channel *model.Channel, posts []SlackPost, ...)
- func (a *App) SlackAddUsers(teamId string, slackusers []SlackUser, importerLog *bytes.Buffer) map[string]*model.User
- func (a *App) SlackImport(fileData multipart.File, fileSize int64, teamID string) (*model.AppError, *bytes.Buffer)
- func (a *App) SlackUploadFile(sPost SlackPost, uploads map[string]*zip.File, teamId string, channelId string, ...) (*model.FileInfo, bool)
- func (a *App) SoftDeleteTeam(teamId string) *model.AppError
- func (a *App) StartPushNotificationsHubWorkers()
- func (a *App) StopPushNotificationsHubWorkers()
- func (a *App) SubmitInteractiveDialog(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()
- func (a *App) SyncPluginsActiveState()
- func (a *App) TestElasticsearch(cfg *model.Config) *model.AppError
- func (a *App) TestEmail(userId string, cfg *model.Config) *model.AppError
- func (a *App) TestLdap() *model.AppError
- func (a *App) ToggleMuteChannel(channelId string, userId string) *model.ChannelMember
- func (a *App) TotalWebsocketConnections() int
- func (a *App) TriggerWebhook(payload *model.OutgoingWebhookPayload, hook *model.OutgoingWebhook, ...)
- func (a *App) UnregisterPluginCommand(pluginId, teamId, trigger string)
- func (a *App) UnregisterPluginCommands(pluginId string)
- func (a *App) UpdateActive(user *model.User, active bool) (*model.User, *model.AppError)
- func (a *App) UpdateBotActive(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, isSchemeUser bool, isSchemeAdmin bool) (*model.ChannelMember, *model.AppError)
- func (a *App) UpdateChannelPrivacy(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) UpdateEphemeralPost(userId string, post *model.Post) *model.Post
- func (a *App) UpdateFileInfoWithPostId(post *model.Post)
- 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) 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) 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(post *model.Post, safeUpdate bool) (*model.Post, *model.AppError)
- func (a *App) UpdatePreferences(userId string, preferences model.Preferences) *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) 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, isSchemeUser bool, isSchemeAdmin bool) (*model.TeamMember, *model.AppError)
- func (a *App) UpdateTeamScheme(team *model.Team) (*model.Team, *model.AppError)
- func (a *App) UpdateUser(user *model.User, sendNotifications bool) (*model.User, *model.AppError)
- func (a *App) UpdateUserActive(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) (*model.User, *model.AppError)
- func (a *App) UpdateUserRoles(userId string, newRoles string, sendWebSocketEvent bool) (*model.User, *model.AppError)
- func (a *App) UpdateWebConnUserActivity(session model.Session, activityAt int64)
- func (a *App) UploadEmojiImage(id string, imageData *multipart.FileHeader) *model.AppError
- func (a *App) UploadFile(data []byte, channelId string, filename string) (*model.FileInfo, *model.AppError)
- func (a *App) UploadFileX(channelId, name string, input io.Reader, opts ...func(*uploadFileTask)) (*model.FileInfo, *model.AppError)
- func (a *App) UploadFiles(teamId string, channelId string, userId string, files []io.ReadCloser, ...) (*model.FileUploadResponse, *model.AppError)
- func (a *App) UploadMultipartFiles(teamId string, channelId string, userId string, ...) (*model.FileUploadResponse, *model.AppError)
- func (a *App) ValidateAndSetLicenseBytes(b []byte)
- func (a *App) VerifyEmailFromToken(userSuppliedTokenString string) *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) WaitForChannelMembership(channelId string, userId string)
- func (a *App) WriteFile(fr io.Reader, path string) (int64, *model.AppError)
- type AppOption
- type AppOptionCreator
- type AttachmentImportData
- type AutoChannelCreator
- type AutoPostCreator
- type AutoTeamCreator
- type AutoUserCreator
- type AwayProvider
- type ChannelImportData
- type ClusterDiscoveryService
- type CodeProvider
- type CollapseProvider
- type CommandProvider
- type ComparablePreference
- type DirectChannelImportData
- type DirectPostImportData
- type DndProvider
- type EchoProvider
- type EmailBatchingJob
- type EmojiImportData
- type ExpandProvider
- type ExplicitMentions
- type HeaderProvider
- type HelpProvider
- type Hub
- func (h *Hub) Broadcast(message *model.WebSocketEvent)
- func (h *Hub) InvalidateUser(userId string)
- func (h *Hub) Register(webConn *WebConn)
- func (h *Hub) Start()
- func (h *Hub) Stop()
- func (h *Hub) Unregister(webConn *WebConn)
- func (h *Hub) UpdateActivity(userId, sessionToken string, activityAt int64)
- type InvitePeopleProvider
- type InviteProvider
- type JoinProvider
- type KickProvider
- type LeaveProvider
- 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 LoadTestProvider
- func (me *LoadTestProvider) ChannelsCommand(a *App, args *model.CommandArgs, message string) *model.CommandResponse
- func (me *LoadTestProvider) DoCommand(a *App, args *model.CommandArgs, message string) *model.CommandResponse
- func (me *LoadTestProvider) GetCommand(a *App, T goi18n.TranslateFunc) *model.Command
- func (me *LoadTestProvider) GetTrigger() string
- func (me *LoadTestProvider) HelpCommand(args *model.CommandArgs, message string) *model.CommandResponse
- func (me *LoadTestProvider) JsonCommand(a *App, args *model.CommandArgs, message string) *model.CommandResponse
- func (me *LoadTestProvider) PostsCommand(a *App, args *model.CommandArgs, message string) *model.CommandResponse
- func (me *LoadTestProvider) SetupCommand(a *App, args *model.CommandArgs, message string) *model.CommandResponse
- func (me *LoadTestProvider) UrlCommand(a *App, args *model.CommandArgs, message string) *model.CommandResponse
- func (me *LoadTestProvider) UsersCommand(a *App, args *model.CommandArgs, message string) *model.CommandResponse
- type LogoutProvider
- type MeProvider
- type MuteProvider
- type NotificationType
- type OfflineProvider
- type OnlineProvider
- type OpenProvider
- 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) 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) 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) CreateUser(user *model.User) (*model.User, *model.AppError)
- func (api *PluginAPI) DeleteChannel(channelId string) *model.AppError
- func (api *PluginAPI) DeleteChannelMember(channelId, userId string) *model.AppError
- func (api *PluginAPI) DeleteEphemeralPost(userId string, post *model.Post)
- func (api *PluginAPI) DeletePost(postId string) *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) GetBot(userId string, includeDeleted bool) (*model.Bot, *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) 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) GetFileLink(fileId string) (string, *model.AppError)
- func (api *PluginAPI) GetGroupChannel(userIds []string) (*model.Channel, *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) 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) 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) 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) 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) 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) 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) 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) SetProfileImage(userId string, data []byte) *model.AppError
- func (api *PluginAPI) SetTeamIcon(teamId string, data []byte) *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) UpdateEphemeralPost(userId string, post *model.Post) *model.Post
- func (api *PluginAPI) UpdatePost(post *model.Post) (*model.Post, *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 PostImportData
- type PurposeProvider
- 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 RemoveProvider
- type RenameProvider
- type ReplyImportData
- type RoleImportData
- type SVGInfo
- type SchemeImportData
- type SearchProvider
- 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()) string
- func (s *Server) AppOptions() []AppOption
- func (s *Server) AsymmetricSigningKey() *ecdsa.PrivateKey
- func (s *Server) Config() *model.Config
- func (s *Server) DoSecurityUpdateCheck()
- func (s *Server) EnvironmentConfig() map[string]interface{}
- func (s *Server) FakeApp() *App
- func (s *Server) Go(f func())
- func (s *Server) InitEmailBatching()
- func (s *Server) InvokeClusterLeaderChangedListeners()
- func (s *Server) License() *model.License
- func (s *Server) PostActionCookieSecret() []byte
- func (s *Server) ReloadConfig() error
- func (s *Server) RemoveClusterLeaderChangedListener(id string)
- func (s *Server) RemoveConfigListener(id string)
- func (s *Server) RemoveLicenseListener(id string)
- func (s *Server) RunOldAppInitalization() error
- func (s *Server) RunOldAppShutdown()
- func (s *Server) Shutdown() error
- func (s *Server) Start() error
- func (s *Server) StartElasticsearch()
- func (s *Server) StopHTTPServer()
- func (s *Server) UpdateConfig(f func(*model.Config))
- func (s *Server) WaitForGoroutines()
- type SettingsProvider
- type ShortcutsProvider
- type ShrugProvider
- type SlackChannel
- type SlackComment
- type SlackFile
- type SlackPost
- type SlackProfile
- type SlackUser
- type TeamEnvironment
- type TeamImportData
- type TestEnvironment
- type TokenLocation
- type UserChannelImportData
- type UserChannelNotifyPropsImportData
- type UserImportData
- type UserNotifyPropsImportData
- type UserTeamImportData
- type WebConn
- func (wc *WebConn) Close()
- func (c *WebConn) GetSession() *model.Session
- func (c *WebConn) GetSessionExpiresAt() int64
- func (c *WebConn) GetSessionToken() string
- func (webCon *WebConn) InvalidateCache()
- func (webCon *WebConn) IsAuthenticated() bool
- func (webCon *WebConn) IsMemberOfTeam(teamId string) bool
- func (c *WebConn) Pump()
- func (webCon *WebConn) SendHello()
- func (c *WebConn) SetSession(v *model.Session)
- func (c *WebConn) SetSessionExpiresAt(v int64)
- func (c *WebConn) SetSessionToken(v string)
- func (webCon *WebConn) ShouldSendEvent(msg *model.WebSocketEvent) bool
- type WebConnActivityMessage
- type WebSocketRouter
Constants ¶
const ( DAY_MILLISECONDS = 24 * 60 * 60 * 1000 MONTH_MILLISECONDS = 31 * DAY_MILLISECONDS )
const ( TokenLocationNotFound = iota TokenLocationHeader TokenLocationCookie TokenLocationQueryString )
const ( USER_PASSWORD = "passwd" CHANNEL_TYPE = model.CHANNEL_OPEN BTEST_TEAM_DISPLAY_NAME = "TestTeam" BTEST_TEAM_NAME = "z-z-testdomaina" BTEST_TEAM_EMAIL = "test@nowhere.com" BTEST_TEAM_TYPE = model.TEAM_OPEN BTEST_USER_NAME = "Mr. Testing Tester" BTEST_USER_EMAIL = "success+ttester@simulator.amazonses.com" BTEST_USER_PASSWORD = "passwd" )
const ( BRAND_FILE_PATH = "brand/" BRAND_FILE_NAME = "image.png" )
const ( CMD_EXPAND = "expand" CMD_COLLAPSE = "collapse" )
const ( CMD_REMOVE = "remove" CMD_KICK = "kick" )
const ( SEGMENT_KEY = "placeholder_segment_key" TRACK_CONFIG_SERVICE = "config_service" TRACK_CONFIG_TEAM = "config_team" TRACK_CONFIG_CLIENT_REQ = "config_client_requirements" TRACK_CONFIG_SQL = "config_sql" TRACK_CONFIG_LOG = "config_log" TRACK_CONFIG_FILE = "config_file" TRACK_CONFIG_RATE = "config_rate" TRACK_CONFIG_EMAIL = "config_email" TRACK_CONFIG_PRIVACY = "config_privacy" TRACK_CONFIG_THEME = "config_theme" TRACK_CONFIG_OAUTH = "config_oauth" TRACK_CONFIG_LDAP = "config_ldap" TRACK_CONFIG_COMPLIANCE = "config_compliance" TRACK_CONFIG_LOCALIZATION = "config_localization" TRACK_CONFIG_SAML = "config_saml" TRACK_CONFIG_PASSWORD = "config_password" TRACK_CONFIG_CLUSTER = "config_cluster" TRACK_CONFIG_METRICS = "config_metrics" TRACK_CONFIG_SUPPORT = "config_support" TRACK_CONFIG_NATIVEAPP = "config_nativeapp" TRACK_CONFIG_EXPERIMENTAL = "config_experimental" TRACK_CONFIG_ANALYTICS = "config_analytics" TRACK_CONFIG_ANNOUNCEMENT = "config_announcement" TRACK_CONFIG_ELASTICSEARCH = "config_elasticsearch" TRACK_CONFIG_PLUGIN = "config_plugin" TRACK_CONFIG_DATA_RETENTION = "config_data_retention" TRACK_CONFIG_MESSAGE_EXPORT = "config_message_export" TRACK_CONFIG_DISPLAY = "config_display" TRACK_CONFIG_IMAGE_PROXY = "config_image_proxy" TRACK_PERMISSIONS_GENERAL = "permissions_general" TRACK_PERMISSIONS_SYSTEM_SCHEME = "permissions_system_scheme" TRACK_PERMISSIONS_TEAM_SCHEMES = "permissions_team_schemes" TRACK_ACTIVITY = "activity" TRACK_LICENSE = "license" TRACK_SERVER = "server" TRACK_PLUGINS = "plugins" )
const ( MaxEmojiFileSize = 1 << 20 // 1 MB MaxEmojiWidth = 128 MaxEmojiHeight = 128 MaxEmojiOriginalWidth = 1028 MaxEmojiOriginalHeight = 1028 )
const ( /* EXIF Image Orientations 1 2 3 4 5 6 7 8 888888 888888 88 88 8888888888 88 88 8888888888 88 88 88 88 88 88 88 88 88 88 88 88 8888 8888 8888 8888 88 8888888888 8888888888 88 88 88 88 88 88 88 888888 888888 */ Upright = 1 UprightMirrored = 2 UpsideDown = 3 UpsideDownMirrored = 4 RotatedCWMirrored = 5 RotatedCCW = 6 RotatedCCWMirrored = 7 RotatedCW = 8 MaxImageSize = 6048 * 4032 // 24 megapixels, roughly 36MB as a raw image ImageThumbnailWidth = 120 ImageThumbnailHeight = 100 ImageThumbnailRatio = float64(ImageThumbnailHeight) / float64(ImageThumbnailWidth) ImagePreviewWidth = 1920 UploadFileInitialBufferSize = 2 * 1024 * 1024 // 2Mb // Deprecated IMAGE_THUMBNAIL_PIXEL_WIDTH = 120 IMAGE_THUMBNAIL_PIXEL_HEIGHT = 100 IMAGE_PREVIEW_PIXEL_WIDTH = 1920 )
const ( THREAD_ANY = "any" THREAD_ROOT = "root" )
const ( OAUTH_COOKIE_MAX_AGE_SECONDS = 30 * 60 // 30 minutes COOKIE_OAUTH = "MMOAUTH" )
const ( MIGRATION_KEY_EMOJI_PERMISSIONS_SPLIT = "emoji_permissions_split" MIGRATION_KEY_WEBHOOK_PERMISSIONS_SPLIT = "webhook_permissions_split" MIGRATION_KEY_LIST_JOIN_PUBLIC_PRIVATE_TEAMS = "list_join_public_private_teams" MIGRATION_KEY_REMOVE_PERMANENT_DELETE_USER = "remove_permanent_delete_user" MIGRATION_KEY_ADD_BOT_PERMISSIONS = "add_bot_permissions" MIGRATION_KEY_APPLY_CHANNEL_MANAGE_DELETE_TO_CHANNEL_USER = "apply_channel_manage_delete_to_channel_user" MIGRATION_KEY_REMOVE_CHANNEL_MANAGE_DELETE_FROM_TEAM_USER = "remove_channel_manage_delete_from_team_user" PERMISSION_MANAGE_SYSTEM = "manage_system" PERMISSION_MANAGE_EMOJIS = "manage_emojis" PERMISSION_MANAGE_OTHERS_EMOJIS = "manage_others_emojis" PERMISSION_CREATE_EMOJIS = "create_emojis" PERMISSION_DELETE_EMOJIS = "delete_emojis" PERMISSION_DELETE_OTHERS_EMOJIS = "delete_others_emojis" PERMISSION_MANAGE_WEBHOOKS = "manage_webhooks" PERMISSION_MANAGE_OTHERS_WEBHOOKS = "manage_others_webhooks" PERMISSION_MANAGE_INCOMING_WEBHOOKS = "manage_incoming_webhooks" PERMISSION_MANAGE_OTHERS_INCOMING_WEBHOOKS = "manage_others_incoming_webhooks" PERMISSION_MANAGE_OUTGOING_WEBHOOKS = "manage_outgoing_webhooks" PERMISSION_MANAGE_OTHERS_OUTGOING_WEBHOOKS = "manage_others_outgoing_webhooks" PERMISSION_LIST_PUBLIC_TEAMS = "list_public_teams" PERMISSION_LIST_PRIVATE_TEAMS = "list_private_teams" PERMISSION_JOIN_PUBLIC_TEAMS = "join_public_teams" PERMISSION_JOIN_PRIVATE_TEAMS = "join_private_teams" PERMISSION_PERMANENT_DELETE_USER = "permanent_delete_user" PERMISSION_CREATE_BOT = "create_bot" PERMISSION_READ_BOTS = "read_bots" PERMISSION_READ_OTHERS_BOTS = "read_others_bots" PERMISSION_MANAGE_BOTS = "manage_bots" PERMISSION_MANAGE_OTHERS_BOTS = "manage_others_bots" PERMISSION_DELETE_PUBLIC_CHANNEL = "delete_public_channel" PERMISSION_DELETE_PRIVATE_CHANNEL = "delete_private_channel" PERMISSION_MANAGE_PUBLIC_CHANNEL_PROPERTIES = "manage_public_channel_properties" PERMISSION_MANAGE_PRIVATE_CHANNEL_PROPERTIES = "manage_private_channel_properties" )
const ( PENDING_POST_IDS_CACHE_SIZE = 25000 PENDING_POST_IDS_CACHE_TTL = 30 * time.Second )
const ( SamlPublicCertificateName = "saml-public.crt" SamlPrivateKeyName = "saml-private.key" SamlIdpCertificateName = "saml-idp.crt" )
const ( SECURITY_URL = "https://securityupdatecheck.mattermost.com" SECURITY_UPDATE_PERIOD = 86400000 // 24 hours in milliseconds. PROP_SECURITY_ID = "id" PROP_SECURITY_BUILD = "b" PROP_SECURITY_ENTERPRISE_READY = "be" PROP_SECURITY_DATABASE = "db" PROP_SECURITY_OS = "os" PROP_SECURITY_USER_COUNT = "uc" PROP_SECURITY_TEAM_COUNT = "tc" PROP_SECURITY_ACTIVE_USER_COUNT = "auc" PROP_SECURITY_UNIT_TESTS = "ut" )
const ( TOKEN_TYPE_PASSWORD_RECOVERY = "password_recovery" TOKEN_TYPE_VERIFY_EMAIL = "verify_email" TOKEN_TYPE_TEAM_INVITATION = "team_invitation" PASSWORD_RECOVER_EXPIRY_TIME = 1000 * 60 * 60 // 1 hour TEAM_INVITATION_EXPIRY_TIME = 1000 * 60 * 60 * 48 // 48 hours IMAGE_PROFILE_PIXEL_DIMENSION = 128 )
const ( SEND_QUEUE_SIZE = 256 SEND_SLOW_WARN = (SEND_QUEUE_SIZE * 50) / 100 SEND_DEADLOCK_WARN = (SEND_QUEUE_SIZE * 95) / 100 WRITE_WAIT = 30 * time.Second PONG_WAIT = 100 * time.Second PING_PERIOD = (PONG_WAIT * 6) / 10 AUTH_TIMEOUT = 5 * time.Second WEBCONN_MEMBER_CACHE_TIME = 1000 * 60 * 30 // 30 minutes )
const ( BROADCAST_QUEUE_SIZE = 4096 DEADLOCK_TICKER = 15 * time.Second // check every 15 seconds DEADLOCK_WARN = (BROADCAST_QUEUE_SIZE * 99) / 100 // number of buffered messages before printing stack trace )
const ( TRIGGERWORDS_EXACT_MATCH = 0 TRIGGERWORDS_STARTS_WITH = 1 MaxIntegrationResponseSize = 1024 * 1024 // Posts can be <100KB at most, so this is likely more than enough )
const ADVANCED_PERMISSIONS_MIGRATION_KEY = "AdvancedPermissionsMigrationComplete"
const (
CMD_AWAY = "away"
)
const (
CMD_CODE = "code"
)
const (
CMD_DND = "dnd"
)
const (
CMD_ECHO = "echo"
)
const (
CMD_GROUPMSG = "groupmsg"
)
const (
CMD_HEADER = "header"
)
const (
CMD_HELP = "help"
)
const (
CMD_INVITE = "invite"
)
const (
CMD_INVITE_PEOPLE = "invite_people"
)
const (
CMD_JOIN = "join"
)
const (
CMD_LEAVE = "leave"
)
const (
CMD_LOGOUT = "logout"
)
const (
CMD_ME = "me"
)
const (
CMD_MSG = "msg"
)
const (
CMD_MUTE = "mute"
)
const (
CMD_OFFLINE = "offline"
)
const (
CMD_ONLINE = "online"
)
const (
CMD_OPEN = "open"
)
const (
CMD_PURPOSE = "purpose"
)
const (
CMD_RENAME = "rename"
)
const (
CMD_SEARCH = "search"
)
const (
CMD_SETTINGS = "settings"
)
const (
CMD_SHORTCUTS = "shortcuts"
)
const (
CMD_SHRUG = "shrug"
)
const (
CMD_TEST = "test"
)
const (
DISCOVERY_SERVICE_WRITE_PING = 60 * time.Second
)
const (
EMAIL_BATCHING_TASK_NAME = "Email Batching"
)
const EMOJIS_PERMISSIONS_MIGRATION_KEY = "EmojisPermissionsMigrationComplete"
const (
ERROR_TERMS_OF_SERVICE_NO_ROWS_FOUND = "store.sql_terms_of_service_store.get.no_rows.app_error"
)
const LINK_CACHE_DURATION = 3600
const LINK_CACHE_SIZE = 10000
const MaxMetadataImageSize = MaxOpenGraphResponseSize
const MaxOpenGraphResponseSize = 1024 * 1024 * 50
const PUSH_NOTIFICATIONS_HUB_BUFFER_PER_WORKER = 50
const PUSH_NOTIFICATION_HUB_WORKERS = 1000
const (
SESSIONS_CLEANUP_BATCH_SIZE = 1000
)
const TIME_TO_WAIT_FOR_CONNECTIONS_TO_CLOSE_ON_SERVER_SHUTDOWN = time.Second
Variables ¶
var ( TEAM_NAME_LEN = utils.Range{Begin: 10, End: 20} TEAM_DOMAIN_NAME_LEN = utils.Range{Begin: 10, End: 20} TEAM_EMAIL_LEN = utils.Range{Begin: 15, End: 30} USER_NAME_LEN = utils.Range{Begin: 5, End: 20} USER_EMAIL_LEN = utils.Range{Begin: 15, End: 30} CHANNEL_DISPLAY_NAME_LEN = utils.Range{Begin: 10, End: 20} CHANNEL_NAME_LEN = utils.Range{Begin: 5, End: 20} TEST_IMAGE_FILENAMES = []string{"test.png", "testjpg.jpg", "testgif.gif"} )
var MaxNotificationsPerChannelDefault int64 = 1000000
Functions ¶
func CheckUserDomain ¶
CheckUserDomain checks that a user's email domain matches a list of space-delimited domains as a string.
func ClearStatusCache ¶
func ClearStatusCache()
func CreateProfileImage ¶
func GeneratePublicLinkHash ¶
func GetMentionsEnabledFields ¶
func GetMentionsEnabledFields(post *model.Post) model.StringArray
Given a post returns the values of the fields in which mentions are possible. post.message, preText and text in the attachment are enabled.
func GetProtocol ¶
func GetStatusFromCache ¶
func JoinCluster ¶
func RegisterAccountMigrationInterface ¶
func RegisterAccountMigrationInterface(f func(*Server) einterfaces.AccountMigrationInterface)
func RegisterClusterInterface ¶
func RegisterClusterInterface(f func(*Server) einterfaces.ClusterInterface)
func RegisterCommandProvider ¶
func RegisterCommandProvider(newProvider CommandProvider)
func RegisterComplianceInterface ¶
func RegisterComplianceInterface(f func(*App) einterfaces.ComplianceInterface)
func RegisterDataRetentionInterface ¶
func RegisterDataRetentionInterface(f func(*App) einterfaces.DataRetentionInterface)
func RegisterElasticsearchInterface ¶
func RegisterElasticsearchInterface(f func(*App) einterfaces.ElasticsearchInterface)
func RegisterJobsDataRetentionJobInterface ¶
func RegisterJobsDataRetentionJobInterface(f func(*App) ejobs.DataRetentionJobInterface)
func RegisterJobsElasticsearchAggregatorInterface ¶
func RegisterJobsElasticsearchAggregatorInterface(f func(*App) ejobs.ElasticsearchAggregatorInterface)
func RegisterJobsElasticsearchIndexerInterface ¶
func RegisterJobsElasticsearchIndexerInterface(f func(*App) ejobs.ElasticsearchIndexerInterface)
func RegisterJobsLdapSyncInterface ¶
func RegisterJobsLdapSyncInterface(f func(*App) ejobs.LdapSyncInterface)
func RegisterJobsMessageExportJobInterface ¶
func RegisterJobsMessageExportJobInterface(f func(*App) ejobs.MessageExportJobInterface)
func RegisterJobsMigrationsJobInterface ¶
func RegisterJobsMigrationsJobInterface(f func(*App) tjobs.MigrationsJobInterface)
func RegisterJobsPluginsJobInterface ¶
func RegisterJobsPluginsJobInterface(f func(*App) tjobs.PluginsJobInterface)
func RegisterLdapInterface ¶
func RegisterLdapInterface(f func(*App) einterfaces.LdapInterface)
func RegisterMessageExportInterface ¶
func RegisterMessageExportInterface(f func(*App) einterfaces.MessageExportInterface)
func RegisterMetricsInterface ¶
func RegisterMetricsInterface(f func(*App) einterfaces.MetricsInterface)
func RegisterSamlInterface ¶
func RegisterSamlInterface(f func(*App) einterfaces.SamlInterface)
func RemoveRoles ¶
func ReturnWebSocketError ¶
func ReturnWebSocketError(conn *WebConn, r *model.WebSocketRequest, err *model.AppError)
func SlackConvertChannelMentions ¶
func SlackConvertChannelMentions(channels []SlackChannel, posts map[string][]SlackPost) map[string][]SlackPost
func SlackConvertChannelName ¶
func SlackConvertPostsMarkup ¶
func SlackConvertTimeStamp ¶
func SplitWebhookPost ¶
func StartElasticsearch ¶
func StartMetrics ¶
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 UploadFileSetUserId ¶
func UploadFileSetUserId(userId string) func(t *uploadFileTask)
Types ¶
type App ¶
type App struct { Srv *Server Log *mlog.Logger T goi18n.TranslateFunc Session model.Session RequestId string IpAddress string Path string UserAgent string AcceptLanguage string AccountMigration einterfaces.AccountMigrationInterface Cluster einterfaces.ClusterInterface Compliance einterfaces.ComplianceInterface DataRetention einterfaces.DataRetentionInterface Elasticsearch einterfaces.ElasticsearchInterface Ldap einterfaces.LdapInterface MessageExport einterfaces.MessageExportInterface Metrics einterfaces.MetricsInterface Saml einterfaces.SamlInterface HTTPService httpservice.HTTPService ImageProxy *imageproxy.ImageProxy Timezones *timezones.Timezones }
func (*App) AddChannelMember ¶
func (*App) AddConfigListener ¶
func (*App) AddDirectChannels ¶
func (*App) AddLicenseListener ¶
func (*App) AddNotificationEmailToBatch ¶
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) AddUserToChannel ¶
func (*App) AddUserToTeam ¶
func (*App) AddUserToTeamByInviteId ¶
func (*App) AddUserToTeamByTeamId ¶
func (*App) AddUserToTeamByToken ¶
func (*App) AllowOAuthAppAccessToUser ¶
func (*App) AsymmetricSigningKey ¶
func (a *App) AsymmetricSigningKey() *ecdsa.PrivateKey
func (*App) AttachDeviceId ¶
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) BulkExport ¶
func (*App) BulkImport ¶
func (*App) CheckForClientSideCert ¶
func (*App) CheckPasswordAndAllCriteria ¶
func (*App) CheckUserAllAuthenticationCriteria ¶
func (*App) CheckUserMfa ¶
func (*App) CheckUserPostflightAuthenticationCriteria ¶
func (*App) CheckUserPreflightAuthenticationCriteria ¶
func (*App) ClearPushNotification ¶
func (*App) ClearPushNotificationSync ¶
func (*App) ClearSessionCacheForUser ¶
func (*App) ClearSessionCacheForUserSkipClusterSend ¶
func (*App) ClientConfig ¶
func (*App) ClientConfigHash ¶
func (*App) ClientConfigWithComputed ¶
ClientConfigWithComputed gets the configuration in a format suitable for sending to the client.
func (*App) ClientLicense ¶
func (*App) ClusterClearSessionCacheForUserHandler ¶
func (a *App) ClusterClearSessionCacheForUserHandler(msg *model.ClusterMessage)
func (*App) ClusterInvalidateAllCachesHandler ¶
func (a *App) ClusterInvalidateAllCachesHandler(msg *model.ClusterMessage)
func (*App) ClusterInvalidateCacheForChannelByNameHandler ¶
func (a *App) ClusterInvalidateCacheForChannelByNameHandler(msg *model.ClusterMessage)
func (*App) ClusterInvalidateCacheForChannelHandler ¶
func (a *App) ClusterInvalidateCacheForChannelHandler(msg *model.ClusterMessage)
func (*App) ClusterInvalidateCacheForChannelMembersHandler ¶
func (a *App) ClusterInvalidateCacheForChannelMembersHandler(msg *model.ClusterMessage)
func (*App) ClusterInvalidateCacheForChannelMembersNotifyPropHandler ¶
func (a *App) ClusterInvalidateCacheForChannelMembersNotifyPropHandler(msg *model.ClusterMessage)
func (*App) ClusterInvalidateCacheForChannelPostsHandler ¶
func (a *App) ClusterInvalidateCacheForChannelPostsHandler(msg *model.ClusterMessage)
func (*App) ClusterInvalidateCacheForUserHandler ¶
func (a *App) ClusterInvalidateCacheForUserHandler(msg *model.ClusterMessage)
func (*App) ClusterInvalidateCacheForWebhookHandler ¶
func (a *App) ClusterInvalidateCacheForWebhookHandler(msg *model.ClusterMessage)
func (*App) ClusterPublishHandler ¶
func (a *App) ClusterPublishHandler(msg *model.ClusterMessage)
func (*App) ClusterUpdateStatusHandler ¶
func (a *App) ClusterUpdateStatusHandler(msg *model.ClusterMessage)
func (*App) CompleteOAuth ¶
func (*App) CompleteSwitchWithOAuth ¶
func (*App) CopyFileInfos ¶
func (*App) CreateBasicUser ¶
Basic test team and user so you always know one
func (*App) CreateChannel ¶
func (*App) CreateChannelWithUser ¶
func (*App) CreateCommand ¶
func (*App) CreateCommandPost ¶
func (*App) CreateCommandWebhook ¶
func (a *App) CreateCommandWebhook(commandId string, args *model.CommandArgs) (*model.CommandWebhook, *model.AppError)
func (*App) CreateDefaultChannels ¶
func (*App) CreateEmoji ¶
func (*App) CreateGroup ¶
func (*App) CreateGroupChannel ¶
func (*App) CreateGroupSyncable ¶
func (a *App) CreateGroupSyncable(groupSyncable *model.GroupSyncable) (*model.GroupSyncable, *model.AppError)
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) CreateOrRestoreGroupMember ¶
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) CreatePushNotificationsHub ¶
func (a *App) CreatePushNotificationsHub()
func (*App) CreateScheme ¶
func (*App) CreateSession ¶
func (*App) CreateTeamWithUser ¶
func (*App) CreateTermsOfService ¶
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) CreateVerifyEmailToken ¶
func (*App) CreateWebhookPost ¶
func (*App) DeauthorizeOAuthAppForUser ¶
func (*App) DeleteAllExpiredPluginKeys ¶
func (*App) DeleteAllKeysForPlugin ¶
func (*App) DeleteBrandImage ¶
func (*App) DeleteChannel ¶
func (*App) DeleteEphemeralPost ¶
func (*App) DeleteFlaggedPosts ¶
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) DeleteReactionForPost ¶
func (*App) DeleteScheme ¶
func (*App) DiagnosticId ¶
func (*App) DisableAutoResponder ¶
func (*App) DisablePlugin ¶
DisablePlugin will set the config for an installed plugin to disabled, triggering deactivation if active.
func (*App) DisableUserAccessToken ¶
func (a *App) DisableUserAccessToken(token *model.UserAccessToken) *model.AppError
func (*App) DoActionRequest ¶
Perform an HTTP POST request to an integration's action endpoint. Caller must consume and close returned http.Response as necessary.
func (*App) DoAdvancedPermissionsMigration ¶
func (a *App) DoAdvancedPermissionsMigration()
This function migrates the default built in roles from code/config to the database.
func (*App) DoEmojisPermissionsMigration ¶
func (a *App) DoEmojisPermissionsMigration()
func (*App) DoPermissionsMigrations ¶
DoPermissionsMigrations execute all the permissions migrations need by the current version.
func (*App) DoPostAction ¶
func (*App) DoPostActionWithCookie ¶
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) EnablePlugin ¶
EnablePlugin will set the config for an installed plugin to enabled, triggering asynchronous activation if inactive anywhere in the cluster.
func (*App) EnableUserAccessToken ¶
func (a *App) EnableUserAccessToken(token *model.UserAccessToken) *model.AppError
func (*App) EnsureDiagnosticId ¶
func (a *App) EnsureDiagnosticId()
func (*App) EnvironmentConfig ¶
func (*App) ExecuteCommand ¶
func (a *App) ExecuteCommand(args *model.CommandArgs) (*model.CommandResponse, *model.AppError)
func (*App) ExportAllDirectChannels ¶
func (*App) ExportAllDirectPosts ¶
func (*App) ExportCustomEmoji ¶
func (*App) ExportWriteLine ¶
func (*App) FileBackend ¶
func (a *App) FileBackend() (filesstore.FileBackend, *model.AppError)
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) FindTeamByName ¶
func (*App) FindTeamIdForFilename ¶
func (*App) GenerateMfaSecret ¶
func (*App) GeneratePublicLink ¶
func (*App) GetActivePluginManifests ¶
func (*App) GetAllChannels ¶
func (*App) GetAllLdapGroupsPage ¶
func (a *App) GetAllLdapGroupsPage(page int, perPage int, opts model.GroupSearchOpts) ([]*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) GetAllPrivateTeamsPage ¶
func (*App) GetAllPublicTeamsPage ¶
func (*App) GetAllTeamsPage ¶
func (*App) GetAnalytics ¶
func (*App) GetAuditsPage ¶
func (*App) GetAuthorizationCode ¶
func (*App) GetAuthorizedAppsForUser ¶
func (*App) GetBulkReactionsForPosts ¶
func (*App) GetChannel ¶
func (*App) GetChannelByName ¶
func (*App) GetChannelByNameForTeamName ¶
func (*App) GetChannelCounts ¶
func (*App) GetChannelMember ¶
func (*App) GetChannelMemberCount ¶
func (*App) GetChannelMembersByIds ¶
func (*App) GetChannelMembersForUser ¶
func (*App) GetChannelMembersForUserWithPagination ¶
func (*App) GetChannelMembersPage ¶
func (*App) GetChannelMembersTimezones ¶
func (*App) GetChannelUnread ¶
func (*App) GetChannelsByNames ¶
func (*App) GetChannelsForScheme ¶
func (*App) GetChannelsForSchemePage ¶
func (*App) GetChannelsForUser ¶
func (*App) GetChannelsUserNotIn ¶
func (*App) GetClientLicenseEtag ¶
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) 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) GetDataRetentionPolicy ¶
func (a *App) GetDataRetentionPolicy() (*model.DataRetentionPolicy, *model.AppError)
func (*App) GetDefaultProfileImage ¶
func (*App) GetDeletedChannels ¶
func (*App) GetEmojiByName ¶
func (*App) GetEmojiImage ¶
func (*App) GetEmojiList ¶
func (*App) GetEnvironmentConfig ¶
GetEnvironmentConfig returns a map of configuration keys whose values have been overridden by an environment variable.
func (*App) GetFileInfo ¶
func (*App) GetFileInfosForPost ¶
func (*App) GetFileInfosForPostWithMigration ¶
func (*App) GetFlaggedPosts ¶
func (*App) GetFlaggedPostsForChannel ¶
func (*App) GetFlaggedPostsForTeam ¶
func (*App) GetGroupByRemoteID ¶
func (*App) GetGroupChannel ¶
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) GetGroupsBySource ¶
func (*App) GetHubForUserId ¶
func (*App) GetIncomingWebhook ¶
func (*App) GetIncomingWebhooksForTeamPage ¶
func (*App) GetIncomingWebhooksPage ¶
func (*App) GetInfoForFilename ¶
func (*App) GetJobsByType ¶
func (*App) GetJobsByTypePage ¶
func (*App) GetJobsPage ¶
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) GetMentionKeywordsInChannel ¶
func (a *App) GetMentionKeywordsInChannel(profiles map[string]*model.User, lookForSpecialMentions bool, channelMemberNotifyPropsMap map[string]model.StringMap) map[string][]string
Given a map of user IDs to profiles, returns a list of mention keywords for all users in the channel.
func (*App) GetMessageForNotification ¶
func (*App) GetMultipleEmojiByName ¶
func (*App) GetNewUsersForTeamPage ¶
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) GetOutgoingWebhooksForChannelPage ¶
func (*App) GetOutgoingWebhooksForTeamPage ¶
func (*App) GetOutgoingWebhooksPage ¶
func (*App) GetPasswordRecoveryToken ¶
func (*App) GetPermalinkPost ¶
func (*App) GetPinnedPosts ¶
func (*App) GetPluginKey ¶
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) GetPostThread ¶
func (*App) GetPostsAfterPost ¶
func (*App) GetPostsAroundPost ¶
func (*App) GetPostsBeforePost ¶
func (*App) GetPostsEtag ¶
func (*App) GetPostsPage ¶
func (*App) GetPostsSince ¶
func (*App) GetPreferenceByCategoryAndNameForUser ¶
func (*App) GetPreferenceByCategoryForUser ¶
func (*App) GetPreferencesForUser ¶
func (*App) GetProfileImage ¶
func (*App) GetPublicChannelsByIdsForTeam ¶
func (*App) GetPublicChannelsForTeam ¶
func (*App) GetReactionsForPost ¶
func (*App) GetRecentlyActiveUsersForTeam ¶
func (*App) GetRecentlyActiveUsersForTeamPage ¶
func (*App) GetRolesByNames ¶
func (*App) GetSamlCertificateStatus ¶
func (a *App) GetSamlCertificateStatus() *model.SamlCertificateStatus
func (*App) GetSanitizedClientLicense ¶
func (*App) GetSanitizedConfig ¶
GetSanitizedConfig gets the configuration for a system admin without any secrets.
func (*App) GetSchemeByName ¶
func (*App) GetSchemeRolesForChannel ¶
func (*App) GetSchemeRolesForTeam ¶
func (*App) GetSchemes ¶
func (*App) GetSchemesPage ¶
func (*App) GetSessionById ¶
func (*App) GetSessions ¶
func (*App) GetSinglePost ¶
func (*App) GetSiteURL ¶
func (*App) GetStatusesByIds ¶
func (*App) GetTeamByInviteId ¶
func (*App) GetTeamIdFromQuery ¶
func (*App) GetTeamMember ¶
func (*App) GetTeamMembers ¶
func (*App) GetTeamMembersByIds ¶
func (*App) GetTeamMembersForUser ¶
func (*App) GetTeamMembersForUserWithPagination ¶
func (*App) GetTeamStats ¶
func (*App) GetTeamUnread ¶
func (*App) GetTeamsForScheme ¶
func (*App) GetTeamsForSchemePage ¶
func (*App) GetTeamsForUser ¶
func (*App) GetTeamsUnreadForUser ¶
func (*App) GetTermsOfService ¶
func (*App) GetTotalUsersStats ¶
func (a *App) GetTotalUsersStats() (*model.UsersStats, *model.AppError)
GetTotalUsersStats is used for the DM list total
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) 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) HTMLTemplates ¶
func (*App) HandleCommandResponse ¶
func (a *App) HandleCommandResponse(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) 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) HubRegister ¶
func (*App) HubUnregister ¶
func (*App) ImageProxyAdder ¶
func (*App) ImageProxyRemover ¶
func (*App) ImportAttachment ¶
func (*App) ImportChannel ¶
func (a *App) ImportChannel(data *ChannelImportData, dryRun bool) *model.AppError
func (*App) ImportDirectChannel ¶
func (a *App) ImportDirectChannel(data *DirectChannelImportData, dryRun bool) *model.AppError
func (*App) ImportDirectPost ¶
func (a *App) ImportDirectPost(data *DirectPostImportData, dryRun bool) *model.AppError
func (*App) ImportEmoji ¶
func (a *App) ImportEmoji(data *EmojiImportData, dryRun bool) *model.AppError
func (*App) ImportLine ¶
func (a *App) ImportLine(line LineImportData, dryRun bool) *model.AppError
func (*App) ImportPost ¶
func (a *App) ImportPost(data *PostImportData, dryRun bool) *model.AppError
func (*App) ImportReaction ¶
func (*App) ImportReply ¶
func (*App) ImportRole ¶
func (*App) ImportScheme ¶
func (a *App) ImportScheme(data *SchemeImportData, dryRun bool) *model.AppError
func (*App) ImportTeam ¶
func (a *App) ImportTeam(data *TeamImportData, dryRun bool) *model.AppError
func (*App) ImportUser ¶
func (a *App) ImportUser(data *UserImportData, dryRun bool) *model.AppError
func (*App) ImportUserChannels ¶
func (a *App) ImportUserChannels(user *model.User, team *model.Team, teamMember *model.TeamMember, data *[]UserChannelImportData) *model.AppError
func (*App) ImportUserTeams ¶
func (*App) InitPlugins ¶
func (*App) InitPostMetadata ¶
func (a *App) InitPostMetadata()
func (*App) InstallPlugin ¶
InstallPlugin unpacks and installs a plugin but does not enable or activate it.
func (*App) InvalidateAllCaches ¶
func (*App) InvalidateAllCachesSkipSend ¶
func (a *App) InvalidateAllCachesSkipSend()
func (*App) InvalidateAllEmailInvites ¶
func (*App) InvalidateCacheForChannel ¶
func (*App) InvalidateCacheForChannelByNameSkipClusterSend ¶
func (*App) InvalidateCacheForChannelMembers ¶
func (*App) InvalidateCacheForChannelMembersNotifyProps ¶
func (*App) InvalidateCacheForChannelMembersSkipClusterSend ¶
func (*App) InvalidateCacheForChannelPosts ¶
func (*App) InvalidateCacheForChannelPostsSkipClusterSend ¶
func (*App) InvalidateCacheForChannelSkipClusterSend ¶
func (*App) InvalidateCacheForUser ¶
func (*App) InvalidateCacheForUserSkipClusterSend ¶
func (*App) InvalidateCacheForWebhook ¶
func (*App) InvalidateCacheForWebhookSkipClusterSend ¶
func (*App) InvalidateWebConnSessionCacheForUser ¶
func (*App) InviteNewUsersToTeam ¶
func (*App) IsFirstUserAccount ¶
func (*App) IsPhase2MigrationCompleted ¶
func (*App) IsUserAway ¶
func (*App) IsUserSignUpAllowed ¶
func (*App) IsUsernameTaken ¶
IsUsernameTaken checks if the username is already used by another user. Return false if the username is invalid.
func (*App) JoinChannel ¶
func (*App) JoinDefaultChannels ¶
func (*App) JoinUserToTeam ¶
func (*App) LeaveChannel ¶
func (*App) License ¶
License returns the currently active license or nil if the application is unlicensed.
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 goi18n.TranslateFunc) ([]*model.Command, *model.AppError)
previous ListCommands now ListAutocompleteCommands
func (*App) ListPluginKeys ¶
func (*App) ListTeamCommands ¶
func (*App) LoadLicense ¶
func (a *App) LoadLicense()
func (*App) LoginByOAuth ¶
func (*App) MakePermissionError ¶
func (a *App) MakePermissionError(permission *model.Permission) *model.AppError
func (*App) MarkChannelsAsViewed ¶
func (*App) MaxPostSize ¶
func (*App) MigrateFilenamesToFileInfos ¶
Creates and stores FileInfos for a post created before the FileInfos table existed.
func (*App) MoveChannel ¶
func (a *App) MoveChannel(team *model.Team, channel *model.Channel, user *model.User, removeDeactivatedMembers bool) *model.AppError
This function is intended for use from the CLI. It is not robust against people joining the channel while the move is in progress, and therefore should not be used from the API without first fixing this potential race condition.
func (*App) MoveCommand ¶
func (*App) NewClusterDiscoveryService ¶
func (a *App) NewClusterDiscoveryService() *ClusterDiscoveryService
func (*App) NewEmailTemplate ¶
func (a *App) NewEmailTemplate(name, locale string) *utils.HTMLTemplate
func (*App) NewWebConn ¶
func (*App) OldImportChannel ¶
func (*App) OldImportFile ¶
func (*App) OldImportIncomingWebhookPost ¶
func (a *App) OldImportIncomingWebhookPost(post *model.Post, props model.StringInterface)
func (*App) OldImportPost ¶
func (*App) OldImportUser ¶
func (*App) OpenInteractiveDialog ¶
func (a *App) OpenInteractiveDialog(request model.OpenDialogRequest) *model.AppError
func (*App) ParseOpenGraphMetadata ¶
func (*App) PatchChannel ¶
func (*App) PatchScheme ¶
func (*App) PendingAutoAddChannelMembers ¶
func (*App) PendingAutoAddTeamMembers ¶
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) PluginContext ¶
func (*App) PopulateSyncablesSince ¶
PopulateSyncablesSince 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.
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 (app *App) ProcessSlackAttachments(a []*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) Publish ¶
func (a *App) Publish(message *model.WebSocketEvent)
func (*App) PublishSkipClusterSend ¶
func (a *App) PublishSkipClusterSend(message *model.WebSocketEvent)
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) RegisterAllClusterMessageHandlers ¶
func (a *App) RegisterAllClusterMessageHandlers()
func (*App) RegisterPluginCommand ¶
func (*App) ReloadConfig ¶
func (*App) RemoveConfigListener ¶
func (*App) RemoveLicense ¶
func (*App) RemoveLicenseListener ¶
func (*App) RemoveSamlIdpCertificate ¶
func (*App) RemoveSamlPrivateCertificate ¶
func (*App) RemoveSamlPublicCertificate ¶
func (*App) RemoveUserFromChannel ¶
func (*App) RemoveUserFromTeam ¶
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) ResetPasswordFromToken ¶
func (*App) ResetPermissionsSystem ¶
func (*App) RestoreChannel ¶
func (*App) RevokeSessionsForDeviceId ¶
func (*App) RevokeUserAccessToken ¶
func (a *App) RevokeUserAccessToken(token *model.UserAccessToken) *model.AppError
func (*App) RolesGrantPermission ¶
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 ¶
SaveConfig replaces the active configuration, optionally notifying cluster peers.
func (*App) SaveLicense ¶
func (*App) SaveReactionForPost ¶
func (*App) SaveUserTermsOfService ¶
func (*App) SearchAllChannels ¶
func (*App) SearchAllTeams ¶
func (*App) SearchChannels ¶
func (*App) SearchChannelsUserNotIn ¶
func (*App) SearchEmoji ¶
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) SearchUsersInTeam ¶
func (*App) SearchUsersNotInChannel ¶
func (*App) SearchUsersNotInTeam ¶
func (*App) SearchUsersWithoutTeam ¶
func (*App) SendAutoResponse ¶
func (*App) SendChangeUsernameEmail ¶
func (*App) SendDailyDiagnostics ¶
func (a *App) SendDailyDiagnostics()
func (*App) SendDeactivateAccountEmail ¶
func (*App) SendDiagnostic ¶
func (*App) SendEmailChangeEmail ¶
func (*App) SendEmailChangeVerifyEmail ¶
func (*App) SendEmailVerification ¶
func (*App) SendEphemeralPost ¶
func (*App) SendInviteEmails ¶
func (*App) SendMfaChangeEmail ¶
func (*App) SendNotifications ¶
func (*App) SendPasswordChangeEmail ¶
func (*App) SendPasswordReset ¶
func (*App) SendPasswordResetEmail ¶
func (*App) SendSignInChangeEmail ¶
func (*App) SendUserAccessTokenAddedEmail ¶
func (*App) SendVerifyEmail ¶
func (*App) SendWelcomeEmail ¶
func (*App) ServePluginRequest ¶
func (a *App) ServePluginRequest(w http.ResponseWriter, r *http.Request)
func (*App) SessionCacheLength ¶
func (*App) SessionHasPermissionTo ¶
func (*App) SessionHasPermissionToChannel ¶
func (*App) SessionHasPermissionToChannelByPost ¶
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) SessionHasPermissionToTeam ¶
func (a *App) SessionHasPermissionToTeam(session model.Session, teamId string, permission *model.Permission) bool
/ DO NOT USE: LEGACY
func (*App) SessionHasPermissionToUser ¶
func (*App) SessionHasPermissionToUserOrBot ¶
func (*App) SetActiveChannel ¶
func (*App) SetAutoResponderStatus ¶
func (*App) SetClientLicense ¶
func (*App) SetDefaultProfileImage ¶
func (*App) SetDiagnosticId ¶
func (*App) SetPhase2PermissionsMigrationStatus ¶
func (*App) SetPluginKey ¶
func (*App) SetPluginKeyWithExpiry ¶
func (*App) SetPluginsEnvironment ¶
func (a *App) SetPluginsEnvironment(pluginsEnvironment *plugin.Environment)
func (*App) SetProfileImage ¶
func (*App) SetProfileImageFromFile ¶
func (*App) SetProfileImageFromMultiPartFile ¶
func (*App) SetStatusAwayIfNeeded ¶
func (*App) SetStatusDoNotDisturb ¶
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) SetupInviteEmailRateLimiting ¶
func (*App) ShutDownPlugins ¶
func (a *App) ShutDownPlugins()
func (*App) Shutdown ¶
func (a *App) Shutdown()
DO NOT CALL THIS. This is to avoid having to change all the code in cmd/mattermost/commands/* for now shutdown should be called directly on the server
func (*App) SlackAddBotUser ¶
func (*App) SlackAddChannels ¶
func (*App) SlackAddPosts ¶
func (*App) SlackAddUsers ¶
func (*App) SlackImport ¶
func (*App) SlackUploadFile ¶
func (*App) StartPushNotificationsHubWorkers ¶
func (a *App) StartPushNotificationsHubWorkers()
func (*App) StopPushNotificationsHubWorkers ¶
func (a *App) StopPushNotificationsHubWorkers()
func (*App) SubmitInteractiveDialog ¶
func (a *App) SubmitInteractiveDialog(request model.SubmitDialogRequest) (*model.SubmitDialogResponse, *model.AppError)
func (*App) SwitchEmailToLdap ¶
func (*App) SwitchEmailToOAuth ¶
func (*App) SwitchLdapToEmail ¶
func (*App) SwitchOAuthToEmail ¶
func (*App) SyncPluginsActiveState ¶
func (a *App) SyncPluginsActiveState()
func (*App) ToggleMuteChannel ¶
func (a *App) ToggleMuteChannel(channelId string, userId string) *model.ChannelMember
func (*App) TotalWebsocketConnections ¶
func (*App) TriggerWebhook ¶
func (a *App) TriggerWebhook(payload *model.OutgoingWebhookPayload, hook *model.OutgoingWebhook, post *model.Post, channel *model.Channel)
func (*App) UnregisterPluginCommand ¶
func (*App) UnregisterPluginCommands ¶
func (*App) UpdateActive ¶
func (*App) UpdateBotActive ¶
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 ¶
func (*App) UpdateChannelLastViewedAt ¶
func (*App) UpdateChannelMemberNotifyProps ¶
func (*App) UpdateChannelMemberRoles ¶
func (*App) UpdateChannelMemberSchemeRoles ¶
func (*App) UpdateChannelPrivacy ¶
func (*App) UpdateChannelScheme ¶
func (*App) UpdateCommand ¶
func (*App) UpdateConfig ¶
func (*App) UpdateEphemeralPost ¶
func (*App) UpdateFileInfoWithPostId ¶
func (*App) UpdateGroup ¶
func (*App) UpdateGroupSyncable ¶
func (a *App) UpdateGroupSyncable(groupSyncable *model.GroupSyncable) (*model.GroupSyncable, *model.AppError)
func (*App) UpdateIncomingWebhook ¶
func (a *App) UpdateIncomingWebhook(oldHook, updatedHook *model.IncomingWebhook) (*model.IncomingWebhook, *model.AppError)
func (*App) UpdateLastActivityAtIfNeeded ¶
func (*App) UpdateOAuthUserAttrs ¶
func (a *App) UpdateOAuthUserAttrs(userData io.Reader, user *model.User, provider einterfaces.OauthProvider, service string) *model.AppError
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) UpdateScheme ¶
func (*App) UpdateTeamMemberRoles ¶
func (*App) UpdateTeamMemberSchemeRoles ¶
func (*App) UpdateTeamScheme ¶
func (*App) UpdateUser ¶
func (*App) UpdateUserActive ¶
func (*App) UpdateUserAsUser ¶
func (*App) UpdateUserAuth ¶
func (*App) UpdateUserNotifyProps ¶
func (*App) UpdateUserRoles ¶
func (*App) UpdateWebConnUserActivity ¶
func (*App) UploadEmojiImage ¶
func (*App) UploadFile ¶
func (a *App) UploadFile(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(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(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) ValidateAndSetLicenseBytes ¶
func (*App) VerifyEmailFromToken ¶
func (*App) ViewChannel ¶
func (*App) WaitForChannelMembership ¶
type AppOptionCreator ¶
type AppOptionCreator func() []AppOption
type AttachmentImportData ¶
type AttachmentImportData struct {
Path *string `json:"path"`
}
type AutoChannelCreator ¶
type AutoChannelCreator struct { Fuzzy bool DisplayNameLen utils.Range DisplayNameCharset string NameLen utils.Range NameCharset string ChannelType string // contains filtered or unexported fields }
func NewAutoChannelCreator ¶
func NewAutoChannelCreator(client *model.Client4, team *model.Team) *AutoChannelCreator
func (*AutoChannelCreator) CreateTestChannels ¶
type AutoPostCreator ¶
type AutoPostCreator struct { Fuzzy bool TextLength utils.Range HasImage bool ImageFilenames []string Users []string Mentions utils.Range Tags utils.Range // contains filtered or unexported fields }
func NewAutoPostCreator ¶
func NewAutoPostCreator(client *model.Client4, channelid string) *AutoPostCreator
Automatic poster used for testing
func (*AutoPostCreator) CreateRandomPost ¶
func (cfg *AutoPostCreator) CreateRandomPost() (*model.Post, bool)
func (*AutoPostCreator) UploadTestFile ¶
func (cfg *AutoPostCreator) UploadTestFile() ([]string, bool)
type AutoTeamCreator ¶
type AutoTeamCreator struct { Fuzzy bool NameLength utils.Range NameCharset string DomainLength utils.Range DomainCharset string EmailLength utils.Range EmailCharset string // contains filtered or unexported fields }
func NewAutoTeamCreator ¶
func NewAutoTeamCreator(client *model.Client4) *AutoTeamCreator
func (*AutoTeamCreator) CreateTestTeams ¶
type AutoUserCreator ¶
type AutoUserCreator struct { EmailLength utils.Range EmailCharset string NameLength utils.Range NameCharset string Fuzzy bool // contains filtered or unexported fields }
func NewAutoUserCreator ¶
func (*AutoUserCreator) CreateTestUsers ¶
type AwayProvider ¶
type AwayProvider struct { }
func (*AwayProvider) DoCommand ¶
func (me *AwayProvider) DoCommand(a *App, args *model.CommandArgs, message string) *model.CommandResponse
func (*AwayProvider) GetCommand ¶
func (me *AwayProvider) GetCommand(a *App, T goi18n.TranslateFunc) *model.Command
func (*AwayProvider) GetTrigger ¶
func (me *AwayProvider) GetTrigger() string
type ChannelImportData ¶
type ClusterDiscoveryService ¶
type ClusterDiscoveryService struct { model.ClusterDiscovery // contains filtered or unexported fields }
func (*ClusterDiscoveryService) Start ¶
func (me *ClusterDiscoveryService) Start()
func (*ClusterDiscoveryService) Stop ¶
func (me *ClusterDiscoveryService) Stop()
type CodeProvider ¶
type CodeProvider struct { }
func (*CodeProvider) DoCommand ¶
func (me *CodeProvider) DoCommand(a *App, args *model.CommandArgs, message string) *model.CommandResponse
func (*CodeProvider) GetCommand ¶
func (me *CodeProvider) GetCommand(a *App, T goi18n.TranslateFunc) *model.Command
func (*CodeProvider) GetTrigger ¶
func (me *CodeProvider) GetTrigger() string
type CollapseProvider ¶
type CollapseProvider struct { }
func (*CollapseProvider) DoCommand ¶
func (me *CollapseProvider) DoCommand(a *App, args *model.CommandArgs, message string) *model.CommandResponse
func (*CollapseProvider) GetCommand ¶
func (me *CollapseProvider) GetCommand(a *App, T goi18n.TranslateFunc) *model.Command
func (*CollapseProvider) GetTrigger ¶
func (me *CollapseProvider) GetTrigger() string
type CommandProvider ¶
type CommandProvider interface { GetTrigger() string GetCommand(a *App, T goi18n.TranslateFunc) *model.Command DoCommand(a *App, 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"` CreateAt *int64 `json:"create_at"` FlaggedBy *[]string `json:"flagged_by"` Reactions *[]ReactionImportData `json:"reactions"` Replies *[]ReplyImportData `json:"replies"` Attachments *[]AttachmentImportData `json:"attachments"` }
type DndProvider ¶
type DndProvider struct { }
func (*DndProvider) DoCommand ¶
func (me *DndProvider) DoCommand(a *App, args *model.CommandArgs, message string) *model.CommandResponse
func (*DndProvider) GetCommand ¶
func (me *DndProvider) GetCommand(a *App, T goi18n.TranslateFunc) *model.Command
func (*DndProvider) GetTrigger ¶
func (me *DndProvider) GetTrigger() string
type EchoProvider ¶
type EchoProvider struct { }
func (*EchoProvider) DoCommand ¶
func (me *EchoProvider) DoCommand(a *App, args *model.CommandArgs, message string) *model.CommandResponse
func (*EchoProvider) GetCommand ¶
func (me *EchoProvider) GetCommand(a *App, T goi18n.TranslateFunc) *model.Command
func (*EchoProvider) GetTrigger ¶
func (me *EchoProvider) GetTrigger() string
type EmailBatchingJob ¶
type EmailBatchingJob struct {
// contains filtered or unexported fields
}
func NewEmailBatchingJob ¶
func NewEmailBatchingJob(s *Server, bufferSize int) *EmailBatchingJob
func (*EmailBatchingJob) CheckPendingEmails ¶
func (job *EmailBatchingJob) CheckPendingEmails()
func (*EmailBatchingJob) Start ¶
func (job *EmailBatchingJob) Start()
type EmojiImportData ¶
type ExpandProvider ¶
type ExpandProvider struct { }
func (*ExpandProvider) DoCommand ¶
func (me *ExpandProvider) DoCommand(a *App, args *model.CommandArgs, message string) *model.CommandResponse
func (*ExpandProvider) GetCommand ¶
func (me *ExpandProvider) GetCommand(a *App, T goi18n.TranslateFunc) *model.Command
func (*ExpandProvider) GetTrigger ¶
func (me *ExpandProvider) GetTrigger() string
type ExplicitMentions ¶
type ExplicitMentions struct { // MentionedUserIds contains a key for each user mentioned by keyword. MentionedUserIds map[string]bool // 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 }
func GetExplicitMentions ¶
func GetExplicitMentions(post *model.Post, keywords map[string][]string) *ExplicitMentions
Given a message and a map mapping mention keywords to the users who use them, returns a map of mentioned users and a slice of potential mention users not in the channel and whether or not @here was mentioned.
type HeaderProvider ¶
type HeaderProvider struct { }
func (*HeaderProvider) DoCommand ¶
func (me *HeaderProvider) DoCommand(a *App, args *model.CommandArgs, message string) *model.CommandResponse
func (*HeaderProvider) GetCommand ¶
func (me *HeaderProvider) GetCommand(a *App, T goi18n.TranslateFunc) *model.Command
func (*HeaderProvider) GetTrigger ¶
func (me *HeaderProvider) GetTrigger() string
type HelpProvider ¶
type HelpProvider struct { }
func (*HelpProvider) DoCommand ¶
func (h *HelpProvider) DoCommand(a *App, args *model.CommandArgs, message string) *model.CommandResponse
func (*HelpProvider) GetCommand ¶
func (h *HelpProvider) GetCommand(a *App, T goi18n.TranslateFunc) *model.Command
func (*HelpProvider) GetTrigger ¶
func (h *HelpProvider) GetTrigger() string
type Hub ¶
type Hub struct { ExplicitStop bool // contains filtered or unexported fields }
func (*Hub) Broadcast ¶
func (h *Hub) Broadcast(message *model.WebSocketEvent)
func (*Hub) InvalidateUser ¶
func (*Hub) Unregister ¶
func (*Hub) UpdateActivity ¶
type InvitePeopleProvider ¶
type InvitePeopleProvider struct { }
func (*InvitePeopleProvider) DoCommand ¶
func (me *InvitePeopleProvider) DoCommand(a *App, args *model.CommandArgs, message string) *model.CommandResponse
func (*InvitePeopleProvider) GetCommand ¶
func (me *InvitePeopleProvider) GetCommand(a *App, T goi18n.TranslateFunc) *model.Command
func (*InvitePeopleProvider) GetTrigger ¶
func (me *InvitePeopleProvider) GetTrigger() string
type InviteProvider ¶
type InviteProvider struct { }
func (*InviteProvider) DoCommand ¶
func (me *InviteProvider) DoCommand(a *App, args *model.CommandArgs, message string) *model.CommandResponse
func (*InviteProvider) GetCommand ¶
func (me *InviteProvider) GetCommand(a *App, T goi18n.TranslateFunc) *model.Command
func (*InviteProvider) GetTrigger ¶
func (me *InviteProvider) GetTrigger() string
type JoinProvider ¶
type JoinProvider struct { }
func (*JoinProvider) DoCommand ¶
func (me *JoinProvider) DoCommand(a *App, args *model.CommandArgs, message string) *model.CommandResponse
func (*JoinProvider) GetCommand ¶
func (me *JoinProvider) GetCommand(a *App, T goi18n.TranslateFunc) *model.Command
func (*JoinProvider) GetTrigger ¶
func (me *JoinProvider) GetTrigger() string
type KickProvider ¶
type KickProvider struct { }
func (*KickProvider) DoCommand ¶
func (me *KickProvider) DoCommand(a *App, args *model.CommandArgs, message string) *model.CommandResponse
func (*KickProvider) GetCommand ¶
func (me *KickProvider) GetCommand(a *App, T goi18n.TranslateFunc) *model.Command
func (*KickProvider) GetTrigger ¶
func (me *KickProvider) GetTrigger() string
type LeaveProvider ¶
type LeaveProvider struct { }
func (*LeaveProvider) DoCommand ¶
func (me *LeaveProvider) DoCommand(a *App, args *model.CommandArgs, message string) *model.CommandResponse
func (*LeaveProvider) GetCommand ¶
func (me *LeaveProvider) GetCommand(a *App, T goi18n.TranslateFunc) *model.Command
func (*LeaveProvider) GetTrigger ¶
func (me *LeaveProvider) GetTrigger() string
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 LoadTestProvider ¶
type LoadTestProvider struct { }
func (*LoadTestProvider) ChannelsCommand ¶
func (me *LoadTestProvider) ChannelsCommand(a *App, args *model.CommandArgs, message string) *model.CommandResponse
func (*LoadTestProvider) DoCommand ¶
func (me *LoadTestProvider) DoCommand(a *App, args *model.CommandArgs, message string) *model.CommandResponse
func (*LoadTestProvider) GetCommand ¶
func (me *LoadTestProvider) GetCommand(a *App, T goi18n.TranslateFunc) *model.Command
func (*LoadTestProvider) GetTrigger ¶
func (me *LoadTestProvider) GetTrigger() string
func (*LoadTestProvider) HelpCommand ¶
func (me *LoadTestProvider) HelpCommand(args *model.CommandArgs, message string) *model.CommandResponse
func (*LoadTestProvider) JsonCommand ¶
func (me *LoadTestProvider) JsonCommand(a *App, args *model.CommandArgs, message string) *model.CommandResponse
func (*LoadTestProvider) PostsCommand ¶
func (me *LoadTestProvider) PostsCommand(a *App, args *model.CommandArgs, message string) *model.CommandResponse
func (*LoadTestProvider) SetupCommand ¶
func (me *LoadTestProvider) SetupCommand(a *App, args *model.CommandArgs, message string) *model.CommandResponse
func (*LoadTestProvider) UrlCommand ¶
func (me *LoadTestProvider) UrlCommand(a *App, args *model.CommandArgs, message string) *model.CommandResponse
func (*LoadTestProvider) UsersCommand ¶
func (me *LoadTestProvider) UsersCommand(a *App, args *model.CommandArgs, message string) *model.CommandResponse
type LogoutProvider ¶
type LogoutProvider struct { }
func (*LogoutProvider) DoCommand ¶
func (me *LogoutProvider) DoCommand(a *App, args *model.CommandArgs, message string) *model.CommandResponse
func (*LogoutProvider) GetCommand ¶
func (me *LogoutProvider) GetCommand(a *App, T goi18n.TranslateFunc) *model.Command
func (*LogoutProvider) GetTrigger ¶
func (me *LogoutProvider) GetTrigger() string
type MeProvider ¶
type MeProvider struct { }
func (*MeProvider) DoCommand ¶
func (me *MeProvider) DoCommand(a *App, args *model.CommandArgs, message string) *model.CommandResponse
func (*MeProvider) GetCommand ¶
func (me *MeProvider) GetCommand(a *App, T goi18n.TranslateFunc) *model.Command
func (*MeProvider) GetTrigger ¶
func (me *MeProvider) GetTrigger() string
type MuteProvider ¶
type MuteProvider struct { }
func (*MuteProvider) DoCommand ¶
func (me *MuteProvider) DoCommand(a *App, args *model.CommandArgs, message string) *model.CommandResponse
func (*MuteProvider) GetCommand ¶
func (me *MuteProvider) GetCommand(a *App, T goi18n.TranslateFunc) *model.Command
func (*MuteProvider) GetTrigger ¶
func (me *MuteProvider) GetTrigger() string
type NotificationType ¶
type NotificationType string
const NOTIFICATION_TYPE_CLEAR NotificationType = "clear"
const NOTIFICATION_TYPE_MESSAGE NotificationType = "message"
type OfflineProvider ¶
type OfflineProvider struct { }
func (*OfflineProvider) DoCommand ¶
func (me *OfflineProvider) DoCommand(a *App, args *model.CommandArgs, message string) *model.CommandResponse
func (*OfflineProvider) GetCommand ¶
func (me *OfflineProvider) GetCommand(a *App, T goi18n.TranslateFunc) *model.Command
func (*OfflineProvider) GetTrigger ¶
func (me *OfflineProvider) GetTrigger() string
type OnlineProvider ¶
type OnlineProvider struct { }
func (*OnlineProvider) DoCommand ¶
func (me *OnlineProvider) DoCommand(a *App, args *model.CommandArgs, message string) *model.CommandResponse
func (*OnlineProvider) GetCommand ¶
func (me *OnlineProvider) GetCommand(a *App, T goi18n.TranslateFunc) *model.Command
func (*OnlineProvider) GetTrigger ¶
func (me *OnlineProvider) GetTrigger() string
type OpenProvider ¶
type OpenProvider struct {
JoinProvider
}
func (*OpenProvider) GetCommand ¶
func (open *OpenProvider) GetCommand(a *App, T goi18n.TranslateFunc) *model.Command
func (*OpenProvider) GetTrigger ¶
func (open *OpenProvider) GetTrigger() string
type Option ¶
func Config ¶
Config applies the given config dsn, whether a path to config.json or a database connection string.
func ConfigStore ¶
ConfigStore applies the given config store, typically to replace the traditional sources with a memory store for testing.
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 (*PluginAPI) AddChannelMember ¶
func (*PluginAPI) AddReaction ¶
func (*PluginAPI) CopyFileInfos ¶
func (*PluginAPI) CreateChannel ¶
func (*PluginAPI) CreatePost ¶
func (*PluginAPI) CreateTeam ¶
func (*PluginAPI) CreateTeamMember ¶
func (*PluginAPI) CreateTeamMembers ¶
func (*PluginAPI) CreateUser ¶
func (*PluginAPI) DeleteChannel ¶
func (*PluginAPI) DeleteChannelMember ¶
func (*PluginAPI) DeleteEphemeralPost ¶
func (*PluginAPI) DeleteTeamMember ¶
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) GetDiagnosticId ¶
func (*PluginAPI) GetDirectChannel ¶
func (*PluginAPI) GetEmojiByName ¶
func (*PluginAPI) GetEmojiImage ¶
func (*PluginAPI) GetEmojiList ¶
func (*PluginAPI) GetFileInfo ¶
func (*PluginAPI) GetFileLink ¶
func (*PluginAPI) GetGroupChannel ¶
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) 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) 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) KVDeleteAll ¶
func (*PluginAPI) KVSetWithExpiry ¶
func (*PluginAPI) LoadPluginConfiguration ¶
func (*PluginAPI) OpenInteractiveDialog ¶
func (api *PluginAPI) OpenInteractiveDialog(dialog model.OpenDialogRequest) *model.AppError
func (*PluginAPI) PermanentDeleteBot ¶
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) SaveConfig ¶
func (*PluginAPI) SavePluginConfig ¶
func (*PluginAPI) SearchChannels ¶
func (*PluginAPI) SearchPostsInTeam ¶
func (*PluginAPI) SearchTeams ¶
func (*PluginAPI) SearchUsers ¶
func (*PluginAPI) SendEphemeralPost ¶
func (*PluginAPI) SetProfileImage ¶
func (*PluginAPI) SetTeamIcon ¶
func (*PluginAPI) UnregisterCommand ¶
func (*PluginAPI) UpdateBotActive ¶
func (*PluginAPI) UpdateChannel ¶
func (*PluginAPI) UpdateChannelMemberNotifications ¶
func (*PluginAPI) UpdateChannelMemberRoles ¶
func (*PluginAPI) UpdateEphemeralPost ¶
func (*PluginAPI) UpdatePost ¶
func (*PluginAPI) UpdateTeam ¶
func (*PluginAPI) UpdateTeamMemberRoles ¶
func (*PluginAPI) UpdateUser ¶
func (*PluginAPI) UpdateUserActive ¶
func (*PluginAPI) UpdateUserStatus ¶
type PluginCommand ¶
type PostImportData ¶
type PostImportData struct { Team *string `json:"team"` Channel *string `json:"channel"` User *string `json:"user"` Message *string `json:"message"` 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 PurposeProvider ¶
type PurposeProvider struct { }
func (*PurposeProvider) DoCommand ¶
func (me *PurposeProvider) DoCommand(a *App, args *model.CommandArgs, message string) *model.CommandResponse
func (*PurposeProvider) GetCommand ¶
func (me *PurposeProvider) GetCommand(a *App, T goi18n.TranslateFunc) *model.Command
func (*PurposeProvider) GetTrigger ¶
func (me *PurposeProvider) GetTrigger() string
type PushNotification ¶
type PushNotification struct {
// contains filtered or unexported fields
}
type PushNotificationsHub ¶
type PushNotificationsHub struct {
Channels []chan PushNotification
}
func (*PushNotificationsHub) GetGoChannelFromUserId ¶
func (hub *PushNotificationsHub) GetGoChannelFromUserId(userId string) chan PushNotification
type RateLimiter ¶
type RateLimiter struct {
// contains filtered or unexported fields
}
func NewRateLimiter ¶
func NewRateLimiter(settings *model.RateLimitSettings) (*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 RemoveProvider ¶
type RemoveProvider struct { }
func (*RemoveProvider) DoCommand ¶
func (me *RemoveProvider) DoCommand(a *App, args *model.CommandArgs, message string) *model.CommandResponse
func (*RemoveProvider) GetCommand ¶
func (me *RemoveProvider) GetCommand(a *App, T goi18n.TranslateFunc) *model.Command
func (*RemoveProvider) GetTrigger ¶
func (me *RemoveProvider) GetTrigger() string
type RenameProvider ¶
type RenameProvider struct { }
func (*RenameProvider) DoCommand ¶
func (me *RenameProvider) DoCommand(a *App, args *model.CommandArgs, message string) *model.CommandResponse
func (*RenameProvider) GetCommand ¶
func (me *RenameProvider) GetCommand(a *App, T goi18n.TranslateFunc) *model.Command
func (*RenameProvider) GetTrigger ¶
func (me *RenameProvider) GetTrigger() string
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"` }
type SearchProvider ¶
type SearchProvider struct { }
func (*SearchProvider) DoCommand ¶
func (search *SearchProvider) DoCommand(a *App, args *model.CommandArgs, message string) *model.CommandResponse
func (*SearchProvider) GetCommand ¶
func (search *SearchProvider) GetCommand(a *App, T goi18n.TranslateFunc) *model.Command
func (*SearchProvider) GetTrigger ¶
func (search *SearchProvider) GetTrigger() string
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 // 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 PluginsEnvironment *plugin.Environment PluginConfigListenerId string PluginsLock sync.RWMutex EmailBatching *EmailBatchingJob EmailRateLimiter *throttled.GCRARateLimiter Hubs []*Hub HubsStopCheckingForDeadlock chan bool PushNotificationsHub PushNotificationsHub Jobs *jobs.JobServer HTTPService httpservice.HTTPService ImageProxy *imageproxy.ImageProxy Log *mlog.Logger AccountMigration einterfaces.AccountMigrationInterface Cluster einterfaces.ClusterInterface Compliance einterfaces.ComplianceInterface DataRetention einterfaces.DataRetentionInterface Elasticsearch einterfaces.ElasticsearchInterface Ldap einterfaces.LdapInterface MessageExport einterfaces.MessageExportInterface Metrics einterfaces.MetricsInterface Saml einterfaces.SamlInterface // 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 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 opptions 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) DoSecurityUpdateCheck ¶
func (s *Server) DoSecurityUpdateCheck()
func (*Server) EnvironmentConfig ¶
func (*Server) FakeApp ¶
A temporary bridge to deal with cases where the code is so tighly coupled that this is easier as a temporary solution
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) InitEmailBatching ¶
func (s *Server) InitEmailBatching()
func (*Server) InvokeClusterLeaderChangedListeners ¶
func (s *Server) InvokeClusterLeaderChangedListeners()
func (*Server) PostActionCookieSecret ¶
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) RemoveLicenseListener ¶
func (*Server) RunOldAppInitalization ¶
This is a bridge between the old and new initalization for the context refactor. It calls app layer initalization code that then turns around and acts on the server. Don't add anything new here, new initilization should be done in the server and performed in the NewServer function.
func (*Server) RunOldAppShutdown ¶
func (s *Server) RunOldAppShutdown()
func (*Server) StartElasticsearch ¶
func (s *Server) StartElasticsearch()
func (*Server) StopHTTPServer ¶
func (s *Server) StopHTTPServer()
func (*Server) UpdateConfig ¶
func (*Server) WaitForGoroutines ¶
func (s *Server) WaitForGoroutines()
WaitForGoroutines blocks until all goroutines created by App.Go exit.
type SettingsProvider ¶
type SettingsProvider struct { }
func (*SettingsProvider) DoCommand ¶
func (settings *SettingsProvider) DoCommand(a *App, args *model.CommandArgs, message string) *model.CommandResponse
func (*SettingsProvider) GetCommand ¶
func (settings *SettingsProvider) GetCommand(a *App, T goi18n.TranslateFunc) *model.Command
func (*SettingsProvider) GetTrigger ¶
func (settings *SettingsProvider) GetTrigger() string
type ShortcutsProvider ¶
type ShortcutsProvider struct { }
func (*ShortcutsProvider) DoCommand ¶
func (me *ShortcutsProvider) DoCommand(a *App, args *model.CommandArgs, message string) *model.CommandResponse
func (*ShortcutsProvider) GetCommand ¶
func (me *ShortcutsProvider) GetCommand(a *App, T goi18n.TranslateFunc) *model.Command
func (*ShortcutsProvider) GetTrigger ¶
func (me *ShortcutsProvider) GetTrigger() string
type ShrugProvider ¶
type ShrugProvider struct { }
func (*ShrugProvider) DoCommand ¶
func (me *ShrugProvider) DoCommand(a *App, args *model.CommandArgs, message string) *model.CommandResponse
func (*ShrugProvider) GetCommand ¶
func (me *ShrugProvider) GetCommand(a *App, T goi18n.TranslateFunc) *model.Command
func (*ShrugProvider) GetTrigger ¶
func (me *ShrugProvider) GetTrigger() string
type SlackChannel ¶
type SlackChannel struct { Id string `json:"id"` Name string `json:"name"` Members []string `json:"members"` Topic map[string]string `json:"topic"` Purpose map[string]string `json:"purpose"` }
func SlackParseChannels ¶
func SlackParseChannels(data io.Reader) ([]SlackChannel, error)
type SlackComment ¶
type SlackPost ¶
type SlackPost struct { User string `json:"user"` BotId string `json:"bot_id"` BotUsername string `json:"username"` Text string `json:"text"` TimeStamp string `json:"ts"` Type string `json:"type"` SubType string `json:"subtype"` Comment *SlackComment `json:"comment"` Upload bool `json:"upload"` File *SlackFile `json:"file"` Attachments []*model.SlackAttachment `json:"attachments"` }
type SlackProfile ¶
type SlackUser ¶
type SlackUser struct { Id string `json:"id"` Username string `json:"name"` Profile SlackProfile `json:"profile"` }
type TeamEnvironment ¶
type TeamImportData ¶
type TestEnvironment ¶
type TestEnvironment struct { Teams []*model.Team Environments []TeamEnvironment }
type TokenLocation ¶
type TokenLocation int
func ParseAuthTokenFromRequest ¶
func ParseAuthTokenFromRequest(r *http.Request) (string, TokenLocation)
func (TokenLocation) String ¶
func (tl TokenLocation) String() string
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"` 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 Send chan model.WebSocketMessage LastUserActivityAt int64 UserId string T goi18n.TranslateFunc Locale string AllChannelMembers map[string]string LastAllChannelMembersTime int64 Sequence int64 // contains filtered or unexported fields }
func (*WebConn) GetSession ¶
func (*WebConn) GetSessionExpiresAt ¶
func (*WebConn) GetSessionToken ¶
func (*WebConn) InvalidateCache ¶
func (webCon *WebConn) InvalidateCache()
func (*WebConn) IsAuthenticated ¶
func (*WebConn) IsMemberOfTeam ¶
func (*WebConn) SetSession ¶
func (*WebConn) SetSessionExpiresAt ¶
func (*WebConn) SetSessionToken ¶
func (*WebConn) ShouldSendEvent ¶
func (webCon *WebConn) ShouldSendEvent(msg *model.WebSocketEvent) bool
type WebConnActivityMessage ¶
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
- audit.go
- authentication.go
- authorization.go
- auto_channels.go
- auto_constants.go
- auto_environment.go
- auto_posts.go
- auto_responder.go
- auto_teams.go
- auto_users.go
- bot.go
- brand.go
- channel.go
- cluster.go
- cluster_discovery.go
- cluster_handlers.go
- command.go
- command_away.go
- command_channel_header.go
- command_channel_purpose.go
- command_channel_rename.go
- command_code.go
- command_dnd.go
- command_echo.go
- command_expand_collapse.go
- command_groupmsg.go
- command_help.go
- command_invite.go
- command_invite_people.go
- command_join.go
- command_leave.go
- command_loadtest.go
- command_logout.go
- command_me.go
- command_msg.go
- command_mute.go
- command_offline.go
- command_online.go
- command_open.go
- command_remove.go
- command_search.go
- command_settings.go
- command_shortcuts.go
- command_shrug.go
- compliance.go
- config.go
- data_retention.go
- diagnostics.go
- elasticsearch.go
- email.go
- email_batching.go
- emoji.go
- enterprise.go
- export.go
- export_converters.go
- file.go
- group.go
- import.go
- import_functions.go
- import_types.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_install.go
- plugin_key_value_store.go
- plugin_requests.go
- plugin_statuses.go
- post.go
- post_metadata.go
- preference.go
- ratelimit.go
- reaction.go
- role.go
- saml.go
- scheme.go
- security_update_check.go
- server.go
- server_app_adapters.go
- server_license.go
- session.go
- slack.go
- slackimport.go
- status.go
- svg.go
- syncables.go
- team.go
- terms_of_service.go
- user.go
- user_agent.go
- user_terms_of_service.go
- web_conn.go
- web_hub.go
- webhook.go
- websocket_router.go