Versions in this module Expand all Collapse all v6 v6.0.0 Dec 23, 2020 Changes in this version + const CHANNEL_EXISTS_ERROR + const FEATURE_TOGGLE_PREFIX + const USER_SEARCH_OPTION_ALLOW_INACTIVE + const USER_SEARCH_OPTION_ALL_NO_FULL_NAME + const USER_SEARCH_OPTION_NAMES_ONLY + const USER_SEARCH_OPTION_NAMES_ONLY_NO_FULL_NAME + type AuditStore interface + Get func(user_id string, offset int, limit int) (model.Audits, error) + PermanentDeleteByUser func(userId string) error + Save func(audit *model.Audit) error + type BotStore interface + Get func(userId string, includeDeleted bool) (*model.Bot, error) + GetAll func(options *model.BotGetOptions) ([]*model.Bot, error) + PermanentDelete func(userId string) error + Save func(bot *model.Bot) (*model.Bot, error) + Update func(bot *model.Bot) (*model.Bot, error) + type ChannelMemberHistoryStore interface + GetUsersInChannelDuring func(startTime int64, endTime int64, channelId string) ([]*model.ChannelMemberHistoryResult, error) + LogJoinEvent func(userId string, channelId string, joinTime int64) error + LogLeaveEvent func(userId string, channelId string, leaveTime int64) error + PermanentDeleteBatch func(endTime int64, limit int64) (int64, error) + type ChannelSearchOpts struct + Deleted bool + ExcludeChannelNames []string + ExcludeGroupConstrained bool + GroupConstrained bool + IncludeDeleted bool + NotAssociatedToGroup string + Page *int + PerPage *int + Private bool + Public bool + TeamIds []string + func (c *ChannelSearchOpts) IsPaginated() bool + type ChannelStore interface + AnalyticsDeletedTypeCount func(teamId string, channelType string) (int64, error) + AnalyticsTypeCount func(teamId string, channelType string) (int64, error) + AutocompleteInTeam func(teamId string, term string, includeDeleted bool) (*model.ChannelList, error) + AutocompleteInTeamForSearch func(teamId string, userId string, term string, includeDeleted bool) (*model.ChannelList, error) + ClearAllCustomRoleAssignments func() error + ClearCaches func() + ClearSidebarOnTeamLeave func(userId, teamId string) error + CountPostsAfter func(channelId string, timestamp int64, userId string) (int, error) + CreateDirectChannel func(userId *model.User, otherUserId *model.User) (*model.Channel, error) + CreateInitialSidebarCategories func(userId, teamId string) error + CreateSidebarCategory func(userId, teamId string, newCategory *model.SidebarCategoryWithChannels) (*model.SidebarCategoryWithChannels, error) + Delete func(channelId string, time int64) error + DeleteSidebarCategory func(categoryId string) error + DeleteSidebarChannelsByPreferences func(preferences *model.Preferences) error + Get func(id string, allowFromCache bool) (*model.Channel, error) + GetAll func(teamId string) ([]*model.Channel, error) + GetAllChannelMembersForUser func(userId string, allowFromCache bool, includeDeleted bool) (map[string]string, error) + GetAllChannelMembersNotifyPropsForChannel func(channelId string, allowFromCache bool) (map[string]model.StringMap, error) + GetAllChannels func(page, perPage int, opts ChannelSearchOpts) (*model.ChannelListWithTeamData, error) + GetAllChannelsCount func(opts ChannelSearchOpts) (int64, error) + GetAllChannelsForExportAfter func(limit int, afterId string) ([]*model.ChannelForExport, error) + GetAllDirectChannelsForExportAfter func(limit int, afterId string) ([]*model.DirectChannelForExport, error) + GetByName func(team_id string, name string, allowFromCache bool) (*model.Channel, error) + GetByNameIncludeDeleted func(team_id string, name string, allowFromCache bool) (*model.Channel, error) + GetByNames func(team_id string, names []string, allowFromCache bool) ([]*model.Channel, error) + GetChannelCounts func(teamId string, userId string) (*model.ChannelCounts, error) + GetChannelMembersForExport func(userId string, teamId string) ([]*model.ChannelMemberForExport, error) + GetChannelMembersTimezones func(channelId string) ([]model.StringMap, error) + GetChannelUnread func(channelId, userId string) (*model.ChannelUnread, error) + GetChannels func(teamId string, userId string, includeDeleted bool, lastDeleteAt int) (*model.ChannelList, error) + GetChannelsBatchForIndexing func(startTime, endTime int64, limit int) ([]*model.Channel, error) + GetChannelsByIds func(channelIds []string, includeDeleted bool) ([]*model.Channel, error) + GetChannelsByScheme func(schemeId string, offset int, limit int) (model.ChannelList, error) + GetDeleted func(team_id string, offset int, limit int, userId string) (*model.ChannelList, error) + GetDeletedByName func(team_id string, name string) (*model.Channel, error) + GetForPost func(postId string) (*model.Channel, error) + GetFromMaster func(id string) (*model.Channel, error) + GetGuestCount func(channelId string, allowFromCache bool) (int64, error) + GetMember func(channelId string, userId string) (*model.ChannelMember, error) + GetMemberCount func(channelId string, allowFromCache bool) (int64, error) + GetMemberCountFromCache func(channelId string) int64 + GetMemberCountsByGroup func(channelID string, includeTimezones bool) ([]*model.ChannelMemberCountByGroup, error) + GetMemberForPost func(postId string, userId string) (*model.ChannelMember, error) + GetMembers func(channelId string, offset, limit int) (*model.ChannelMembers, error) + GetMembersByChannelIds func(channelIds []string, userId string) (*model.ChannelMembers, error) + GetMembersByIds func(channelId string, userIds []string) (*model.ChannelMembers, error) + GetMembersForUser func(teamId string, userId string) (*model.ChannelMembers, error) + GetMembersForUserWithPagination func(teamId, userId string, page, perPage int) (*model.ChannelMembers, error) + GetMoreChannels func(teamId string, userId string, offset int, limit int) (*model.ChannelList, error) + GetPinnedPostCount func(channelId string, allowFromCache bool) (int64, error) + GetPinnedPosts func(channelId string) (*model.PostList, error) + GetPrivateChannelsForTeam func(teamId string, offset int, limit int) (*model.ChannelList, error) + GetPublicChannelsByIdsForTeam func(teamId string, channelIds []string) (*model.ChannelList, error) + GetPublicChannelsForTeam func(teamId string, offset int, limit int) (*model.ChannelList, error) + GetSidebarCategories func(userId, teamId string) (*model.OrderedSidebarCategories, error) + GetSidebarCategory func(categoryId string) (*model.SidebarCategoryWithChannels, error) + GetSidebarCategoryOrder func(userId, teamId string) ([]string, error) + GetTeamChannels func(teamId string) (*model.ChannelList, error) + GroupSyncedChannelCount func() (int64, error) + IncrementMentionCount func(channelId string, userId string, updateThreads bool) error + InvalidateAllChannelMembersForUser func(userId string) + InvalidateCacheForChannelMembersNotifyProps func(channelId string) + InvalidateChannel func(id string) + InvalidateChannelByName func(teamId, name string) + InvalidateGuestCount func(channelId string) + InvalidateMemberCount func(channelId string) + InvalidatePinnedPostCount func(channelId string) + IsUserInChannelUseCache func(userId string, channelId string) bool + MigrateChannelMembers func(fromChannelId string, fromUserId string) (map[string]string, error) + MigratePublicChannels func() error + PermanentDelete func(channelId string) error + PermanentDeleteByTeam func(teamId string) error + PermanentDeleteMembersByChannel func(channelId string) error + PermanentDeleteMembersByUser func(userId string) error + RemoveAllDeactivatedMembers func(channelId string) error + RemoveMember func(channelId string, userId string) error + RemoveMembers func(channelId string, userIds []string) error + ResetAllChannelSchemes func() error + Restore func(channelId string, time int64) error + Save func(channel *model.Channel, maxChannelsPerTeam int64) (*model.Channel, error) + SaveDirectChannel func(channel *model.Channel, member1 *model.ChannelMember, ...) (*model.Channel, error) + SaveMember func(member *model.ChannelMember) (*model.ChannelMember, error) + SaveMultipleMembers func(members []*model.ChannelMember) ([]*model.ChannelMember, error) + SearchAllChannels func(term string, opts ChannelSearchOpts) (*model.ChannelListWithTeamData, int64, error) + SearchArchivedInTeam func(teamId string, term string, userId string) (*model.ChannelList, error) + SearchForUserInTeam func(userId string, teamId string, term string, includeDeleted bool) (*model.ChannelList, error) + SearchGroupChannels func(userId, term string) (*model.ChannelList, error) + SearchInTeam func(teamId string, term string, includeDeleted bool) (*model.ChannelList, error) + SearchMore func(userId string, teamId string, term string) (*model.ChannelList, error) + SetDeleteAt func(channelId string, deleteAt int64, updateAt int64) error + Update func(channel *model.Channel) (*model.Channel, error) + UpdateLastViewedAt func(channelIds []string, userId string, updateThreads bool) (map[string]int64, error) + UpdateLastViewedAtPost func(unreadPost *model.Post, userID string, mentionCount int, updateThreads bool) (*model.ChannelUnreadAt, error) + UpdateMember func(member *model.ChannelMember) (*model.ChannelMember, error) + UpdateMembersRole func(channelID string, userIDs []string) error + UpdateMultipleMembers func(members []*model.ChannelMember) ([]*model.ChannelMember, error) + UpdateSidebarCategories func(userId, teamId string, categories []*model.SidebarCategoryWithChannels) ([]*model.SidebarCategoryWithChannels, []*model.SidebarCategoryWithChannels, ...) + UpdateSidebarCategoryOrder func(userId, teamId string, categoryOrder []string) error + UpdateSidebarChannelCategoryOnMove func(channel *model.Channel, newTeamId string) error + UpdateSidebarChannelsByPreferences func(preferences *model.Preferences) error + UserBelongsToChannels func(userId string, channelIds []string) (bool, error) + type ClusterDiscoveryStore interface + Cleanup func() error + Delete func(discovery *model.ClusterDiscovery) (bool, error) + Exists func(discovery *model.ClusterDiscovery) (bool, error) + GetAll func(discoveryType, clusterName string) ([]*model.ClusterDiscovery, error) + Save func(discovery *model.ClusterDiscovery) error + SetLastPingAt func(discovery *model.ClusterDiscovery) error + type CommandStore interface + AnalyticsCommandCount func(teamId string) (int64, error) + Delete func(commandId string, time int64) error + Get func(id string) (*model.Command, error) + GetByTeam func(teamId string) ([]*model.Command, error) + GetByTrigger func(teamId string, trigger string) (*model.Command, error) + PermanentDeleteByTeam func(teamId string) error + PermanentDeleteByUser func(userId string) error + Save func(webhook *model.Command) (*model.Command, error) + Update func(hook *model.Command) (*model.Command, error) + type CommandWebhookStore interface + Cleanup func() + Get func(id string) (*model.CommandWebhook, error) + Save func(webhook *model.CommandWebhook) (*model.CommandWebhook, error) + TryUse func(id string, limit int) error + type ComplianceStore interface + ComplianceExport func(compliance *model.Compliance) ([]*model.CompliancePost, error) + Get func(id string) (*model.Compliance, error) + GetAll func(offset, limit int) (model.Compliances, error) + MessageExport func(after int64, limit int) ([]*model.MessageExport, error) + Save func(compliance *model.Compliance) (*model.Compliance, error) + Update func(compliance *model.Compliance) (*model.Compliance, error) + type EmojiStore interface + Delete func(emoji *model.Emoji, time int64) error + Get func(id string, allowFromCache bool) (*model.Emoji, error) + GetByName func(name string, allowFromCache bool) (*model.Emoji, error) + GetList func(offset, limit int, sort string) ([]*model.Emoji, error) + GetMultipleByName func(names []string) ([]*model.Emoji, error) + Save func(emoji *model.Emoji) (*model.Emoji, error) + Search func(name string, prefixOnly bool, limit int) ([]*model.Emoji, error) + type ErrConflict struct + Resource string + func NewErrConflict(resource string, err error, meta string) *ErrConflict + func (e *ErrConflict) Error() string + func (e *ErrConflict) Unwrap() error + type ErrInvalidInput struct + Entity string + Field string + Value interface{} + func NewErrInvalidInput(entity, field string, value interface{}) *ErrInvalidInput + func (e *ErrInvalidInput) Error() string + type ErrLimitExceeded struct + Count int + What string + func NewErrLimitExceeded(what string, count int, meta string) *ErrLimitExceeded + func (e *ErrLimitExceeded) Error() string + type ErrNotFound struct + Id string + func NewErrNotFound(resource, id string) *ErrNotFound + func (e *ErrNotFound) Error() string + type ErrNotImplemented struct + func NewErrNotImplemented(detail string) *ErrNotImplemented + func (e *ErrNotImplemented) Error() string + type ErrOutOfBounds struct + func NewErrOutOfBounds(value int) *ErrOutOfBounds + func (e *ErrOutOfBounds) Error() string + type FileInfoStore interface + AttachToPost func(fileId string, postId string, creatorId string) error + ClearCaches func() + DeleteForPost func(postId string) (string, error) + Get func(id string) (*model.FileInfo, error) + GetByPath func(path string) (*model.FileInfo, error) + GetForPost func(postId string, readFromMaster, includeDeleted, allowFromCache bool) ([]*model.FileInfo, error) + GetForUser func(userId string) ([]*model.FileInfo, error) + GetWithOptions func(page, perPage int, opt *model.GetFileInfosOptions) ([]*model.FileInfo, error) + InvalidateFileInfosForPostCache func(postId string, deleted bool) + PermanentDelete func(fileId string) error + PermanentDeleteBatch func(endTime int64, limit int64) (int64, error) + PermanentDeleteByUser func(userId string) (int64, error) + Save func(info *model.FileInfo) (*model.FileInfo, error) + SetContent func(fileId, content string) error + Upsert func(info *model.FileInfo) (*model.FileInfo, error) + type GroupStore interface + AdminRoleGroupsForSyncableMember func(userID, syncableID string, syncableType model.GroupSyncableType) ([]string, error) + ChannelMembersMinusGroupMembers func(channelID string, groupIDs []string, page, perPage int) ([]*model.UserWithGroups, error) + ChannelMembersToAdd func(since int64, channelID *string) ([]*model.UserChannelIDPair, error) + ChannelMembersToRemove func(channelID *string) ([]*model.ChannelMember, error) + CountChannelMembersMinusGroupMembers func(channelID string, groupIDs []string) (int64, error) + CountGroupsByChannel func(channelId string, opts model.GroupSearchOpts) (int64, error) + CountGroupsByTeam func(teamId string, opts model.GroupSearchOpts) (int64, error) + CountTeamMembersMinusGroupMembers func(teamID string, groupIDs []string) (int64, error) + Create func(group *model.Group) (*model.Group, error) + CreateGroupSyncable func(groupSyncable *model.GroupSyncable) (*model.GroupSyncable, error) + Delete func(groupID string) (*model.Group, error) + DeleteGroupSyncable func(groupID string, syncableID string, syncableType model.GroupSyncableType) (*model.GroupSyncable, error) + DeleteMember func(groupID string, userID string) (*model.GroupMember, error) + DistinctGroupMemberCount func() (int64, error) + Get func(groupID string) (*model.Group, error) + GetAllBySource func(groupSource model.GroupSource) ([]*model.Group, error) + GetAllGroupSyncablesByGroupId func(groupID string, syncableType model.GroupSyncableType) ([]*model.GroupSyncable, error) + GetByIDs func(groupIDs []string) ([]*model.Group, error) + GetByName func(name string, opts model.GroupSearchOpts) (*model.Group, error) + GetByRemoteID func(remoteID string, groupSource model.GroupSource) (*model.Group, error) + GetByUser func(userId string) ([]*model.Group, error) + GetGroupSyncable func(groupID string, syncableID string, syncableType model.GroupSyncableType) (*model.GroupSyncable, error) + GetGroups func(page, perPage int, opts model.GroupSearchOpts) ([]*model.Group, error) + GetGroupsAssociatedToChannelsByTeam func(teamId string, opts model.GroupSearchOpts) (map[string][]*model.GroupWithSchemeAdmin, error) + GetGroupsByChannel func(channelId string, opts model.GroupSearchOpts) ([]*model.GroupWithSchemeAdmin, error) + GetGroupsByTeam func(teamId string, opts model.GroupSearchOpts) ([]*model.GroupWithSchemeAdmin, error) + GetMemberCount func(groupID string) (int64, error) + GetMemberUsers func(groupID string) ([]*model.User, error) + GetMemberUsersInTeam func(groupID string, teamID string) ([]*model.User, error) + GetMemberUsersNotInChannel func(groupID string, channelID string) ([]*model.User, error) + GetMemberUsersPage func(groupID string, page int, perPage int) ([]*model.User, error) + GroupChannelCount func() (int64, error) + GroupCount func() (int64, error) + GroupCountWithAllowReference func() (int64, error) + GroupMemberCount func() (int64, error) + GroupTeamCount func() (int64, error) + PermanentDeleteMembersByUser func(userId string) error + PermittedSyncableAdmins func(syncableID string, syncableType model.GroupSyncableType) ([]string, error) + TeamMembersMinusGroupMembers func(teamID string, groupIDs []string, page, perPage int) ([]*model.UserWithGroups, error) + TeamMembersToAdd func(since int64, teamID *string) ([]*model.UserTeamIDPair, error) + TeamMembersToRemove func(teamID *string) ([]*model.TeamMember, error) + Update func(group *model.Group) (*model.Group, error) + UpdateGroupSyncable func(groupSyncable *model.GroupSyncable) (*model.GroupSyncable, error) + UpsertMember func(groupID string, userID string) (*model.GroupMember, error) + type JobStore interface + Delete func(id string) (string, error) + Get func(id string) (*model.Job, error) + GetAllByStatus func(status string) ([]*model.Job, error) + GetAllByType func(jobType string) ([]*model.Job, error) + GetAllByTypePage func(jobType string, offset int, limit int) ([]*model.Job, error) + GetAllPage func(offset int, limit int) ([]*model.Job, error) + GetCountByStatusAndType func(status string, jobType string) (int64, error) + GetNewestJobByStatusAndType func(status string, jobType string) (*model.Job, error) + GetNewestJobByStatusesAndType func(statuses []string, jobType string) (*model.Job, error) + Save func(job *model.Job) (*model.Job, error) + UpdateOptimistically func(job *model.Job, currentStatus string) (bool, error) + UpdateStatus func(id string, status string) (*model.Job, error) + UpdateStatusOptimistically func(id string, currentStatus string, newStatus string) (bool, error) + type LicenseStore interface + Get func(id string) (*model.LicenseRecord, error) + Save func(license *model.LicenseRecord) (*model.LicenseRecord, error) + type LinkMetadataStore interface + Get func(url string, timestamp int64) (*model.LinkMetadata, error) + Save func(linkMetadata *model.LinkMetadata) (*model.LinkMetadata, error) + type OAuthStore interface + DeleteApp func(id string) error + GetAccessData func(token string) (*model.AccessData, error) + GetAccessDataByRefreshToken func(token string) (*model.AccessData, error) + GetAccessDataByUserForApp func(userId, clientId string) ([]*model.AccessData, error) + GetApp func(id string) (*model.OAuthApp, error) + GetAppByUser func(userId string, offset, limit int) ([]*model.OAuthApp, error) + GetApps func(offset, limit int) ([]*model.OAuthApp, error) + GetAuthData func(code string) (*model.AuthData, error) + GetAuthorizedApps func(userId string, offset, limit int) ([]*model.OAuthApp, error) + GetPreviousAccessData func(userId, clientId string) (*model.AccessData, error) + PermanentDeleteAuthDataByUser func(userId string) error + RemoveAccessData func(token string) error + RemoveAllAccessData func() error + RemoveAuthData func(code string) error + SaveAccessData func(accessData *model.AccessData) (*model.AccessData, error) + SaveApp func(app *model.OAuthApp) (*model.OAuthApp, error) + SaveAuthData func(authData *model.AuthData) (*model.AuthData, error) + UpdateAccessData func(accessData *model.AccessData) (*model.AccessData, error) + UpdateApp func(app *model.OAuthApp) (*model.OAuthApp, error) + type PluginStore interface + CompareAndDelete func(keyVal *model.PluginKeyValue, oldValue []byte) (bool, error) + CompareAndSet func(keyVal *model.PluginKeyValue, oldValue []byte) (bool, error) + Delete func(pluginId, key string) error + DeleteAllExpired func() error + DeleteAllForPlugin func(PluginId string) error + Get func(pluginId, key string) (*model.PluginKeyValue, error) + List func(pluginId string, page, perPage int) ([]string, error) + SaveOrUpdate func(keyVal *model.PluginKeyValue) (*model.PluginKeyValue, error) + SetWithOptions func(pluginId string, key string, value []byte, options model.PluginKVSetOptions) (bool, error) + type PostStore interface + AnalyticsPostCount func(teamId string, mustHaveFile bool, mustHaveHashtag bool) (int64, error) + AnalyticsPostCountsByDay func(options *model.AnalyticsPostCountsOptions) (model.AnalyticsRows, error) + AnalyticsUserCountsWithPostsByDay func(teamId string) (model.AnalyticsRows, error) + ClearCaches func() + Delete func(postId string, time int64, deleteByID string) error + Get func(id string, skipFetchThreads bool) (*model.PostList, error) + GetDirectPostParentsForExportAfter func(limit int, afterId string) ([]*model.DirectPostForExport, error) + GetEtag func(channelId string, allowFromCache bool) string + GetFlaggedPosts func(userId string, offset int, limit int) (*model.PostList, error) + GetFlaggedPostsForChannel func(userId, channelId string, offset int, limit int) (*model.PostList, error) + GetFlaggedPostsForTeam func(userId, teamId string, offset int, limit int) (*model.PostList, error) + GetMaxPostSize func() int + GetOldest func() (*model.Post, error) + GetOldestEntityCreationTime func() (int64, error) + GetParentsForExportAfter func(limit int, afterId string) ([]*model.PostForExport, error) + GetPostAfterTime func(channelId string, time int64) (*model.Post, error) + GetPostIdAfterTime func(channelId string, time int64) (string, error) + GetPostIdBeforeTime func(channelId string, time int64) (string, error) + GetPosts func(options model.GetPostsOptions, allowFromCache bool) (*model.PostList, error) + GetPostsAfter func(options model.GetPostsOptions) (*model.PostList, error) + GetPostsBatchForIndexing func(startTime int64, endTime int64, limit int) ([]*model.PostForIndexing, error) + GetPostsBefore func(options model.GetPostsOptions) (*model.PostList, error) + GetPostsByIds func(postIds []string) ([]*model.Post, error) + GetPostsCreatedAt func(channelId string, time int64) ([]*model.Post, error) + GetPostsSince func(options model.GetPostsSinceOptions, allowFromCache bool) (*model.PostList, error) + GetRepliesForExport func(parentId string) ([]*model.ReplyForExport, error) + GetSingle func(id string) (*model.Post, error) + InvalidateLastPostTimeCache func(channelId string) + Overwrite func(post *model.Post) (*model.Post, error) + OverwriteMultiple func(posts []*model.Post) ([]*model.Post, int, error) + PermanentDeleteBatch func(endTime int64, limit int64) (int64, error) + PermanentDeleteByChannel func(channelId string) error + PermanentDeleteByUser func(userId string) error + Save func(post *model.Post) (*model.Post, error) + SaveMultiple func(posts []*model.Post) ([]*model.Post, int, error) + Search func(teamId string, userId string, params *model.SearchParams) (*model.PostList, error) + SearchPostsInTeamForUser func(paramsList []*model.SearchParams, userId, teamId string, page, perPage int) (*model.PostSearchResults, error) + Update func(newPost *model.Post, oldPost *model.Post) (*model.Post, error) + type PreferenceStore interface + CleanupFlagsBatch func(limit int64) (int64, error) + Delete func(userId, category, name string) error + DeleteCategory func(userId string, category string) error + DeleteCategoryAndName func(category string, name string) error + Get func(userId string, category string, name string) (*model.Preference, error) + GetAll func(userId string) (model.Preferences, error) + GetCategory func(userId string, category string) (model.Preferences, error) + PermanentDeleteByUser func(userId string) error + Save func(preferences *model.Preferences) error + type ProductNoticesStore interface + Clear func(notices []string) error + ClearOldNotices func(currentNotices *model.ProductNotices) error + GetViews func(userId string) ([]model.ProductNoticeViewState, error) + View func(userId string, notices []string) error + type ReactionStore interface + BulkGetForPosts func(postIds []string) ([]*model.Reaction, error) + Delete func(reaction *model.Reaction) (*model.Reaction, error) + DeleteAllWithEmojiName func(emojiName string) error + GetForPost func(postId string, allowFromCache bool) ([]*model.Reaction, error) + PermanentDeleteBatch func(endTime int64, limit int64) (int64, error) + Save func(reaction *model.Reaction) (*model.Reaction, error) + type RoleStore interface + AllChannelSchemeRoles func() ([]*model.Role, error) + ChannelHigherScopedPermissions func(roleNames []string) (map[string]*model.RolePermissions, error) + ChannelRolesUnderTeamRole func(roleName string) ([]*model.Role, error) + Delete func(roleId string) (*model.Role, error) + Get func(roleId string) (*model.Role, error) + GetAll func() ([]*model.Role, error) + GetByName func(name string) (*model.Role, error) + GetByNames func(names []string) ([]*model.Role, error) + PermanentDeleteAll func() error + Save func(role *model.Role) (*model.Role, error) + type SchemeStore interface + CountByScope func(scope string) (int64, error) + CountWithoutPermission func(scope, permissionID string, roleScope model.RoleScope, roleType model.RoleType) (int64, error) + Delete func(schemeId string) (*model.Scheme, error) + Get func(schemeId string) (*model.Scheme, error) + GetAllPage func(scope string, offset int, limit int) ([]*model.Scheme, error) + GetByName func(schemeName string) (*model.Scheme, error) + PermanentDeleteAll func() error + Save func(scheme *model.Scheme) (*model.Scheme, error) + type SessionStore interface + AnalyticsSessionCount func() (int64, error) + Cleanup func(expiryTime int64, batchSize int64) + Get func(sessionIdOrToken string) (*model.Session, error) + GetSessions func(userId string) ([]*model.Session, error) + GetSessionsExpired func(thresholdMillis int64, mobileOnly bool, unnotifiedOnly bool) ([]*model.Session, error) + GetSessionsWithActiveDeviceIds func(userId string) ([]*model.Session, error) + PermanentDeleteSessionsByUser func(teamId string) error + Remove func(sessionIdOrToken string) error + RemoveAllSessions func() error + Save func(session *model.Session) (*model.Session, error) + UpdateDeviceId func(id string, deviceId string, expiresAt int64) (string, error) + UpdateExpiredNotify func(sessionid string, notified bool) error + UpdateExpiresAt func(sessionId string, time int64) error + UpdateLastActivityAt func(sessionId string, time int64) error + UpdateProps func(session *model.Session) error + UpdateRoles func(userId string, roles string) (string, error) + type StatusStore interface + Get func(userId string) (*model.Status, error) + GetByIds func(userIds []string) ([]*model.Status, error) + GetTotalActiveUsersCount func() (int64, error) + ResetAll func() error + SaveOrUpdate func(status *model.Status) error + UpdateLastActivityAt func(userId string, lastActivityAt int64) error + type Store interface + Audit func() AuditStore + Bot func() BotStore + Channel func() ChannelStore + ChannelMemberHistory func() ChannelMemberHistoryStore + CheckIntegrity func() <-chan model.IntegrityCheckResult + Close func() + ClusterDiscovery func() ClusterDiscoveryStore + Command func() CommandStore + CommandWebhook func() CommandWebhookStore + Compliance func() ComplianceStore + Context func() context.Context + DropAllTables func() + Emoji func() EmojiStore + FileInfo func() FileInfoStore + GetCurrentSchemaVersion func() string + GetDbVersion func() (string, error) + Group func() GroupStore + Job func() JobStore + License func() LicenseStore + LinkMetadata func() LinkMetadataStore + LockToMaster func() + MarkSystemRanUnitTests func() + OAuth func() OAuthStore + Plugin func() PluginStore + Post func() PostStore + Preference func() PreferenceStore + ProductNotices func() ProductNoticesStore + Reaction func() ReactionStore + RecycleDBConnections func(d time.Duration) + Role func() RoleStore + Scheme func() SchemeStore + Session func() SessionStore + SetContext func(context context.Context) + Status func() StatusStore + System func() SystemStore + Team func() TeamStore + TermsOfService func() TermsOfServiceStore + Thread func() ThreadStore + Token func() TokenStore + TotalMasterDbConnections func() int + TotalReadDbConnections func() int + TotalSearchDbConnections func() int + UnlockFromMaster func() + UploadSession func() UploadSessionStore + User func() UserStore + UserAccessToken func() UserAccessTokenStore + UserTermsOfService func() UserTermsOfServiceStore + Webhook func() WebhookStore + type StoreResult struct + Data interface{} + NErr error + type SystemStore interface + Get func() (model.StringMap, error) + GetByName func(name string) (*model.System, error) + InsertIfExists func(system *model.System) (*model.System, error) + PermanentDeleteByName func(name string) (*model.System, error) + Save func(system *model.System) error + SaveOrUpdate func(system *model.System) error + SaveOrUpdateWithWarnMetricHandling func(system *model.System) error + Update func(system *model.System) error + type TeamStore interface + AnalyticsGetTeamCountForScheme func(schemeId string) (int64, error) + AnalyticsPrivateTeamCount func() (int64, error) + AnalyticsPublicTeamCount func() (int64, error) + AnalyticsTeamCount func(includeDeleted bool) (int64, error) + ClearAllCustomRoleAssignments func() error + ClearCaches func() + Get func(id string) (*model.Team, error) + GetActiveMemberCount func(teamId string, restrictions *model.ViewUsersRestrictions) (int64, error) + GetAll func() ([]*model.Team, error) + GetAllForExportAfter func(limit int, afterId string) ([]*model.TeamForExport, error) + GetAllPage func(offset int, limit int) ([]*model.Team, error) + GetAllPrivateTeamListing func() ([]*model.Team, error) + GetAllPrivateTeamPageListing func(offset int, limit int) ([]*model.Team, error) + GetAllPublicTeamPageListing func(offset int, limit int) ([]*model.Team, error) + GetAllTeamListing func() ([]*model.Team, error) + GetAllTeamPageListing func(offset int, limit int) ([]*model.Team, error) + GetByInviteId func(inviteId string) (*model.Team, error) + GetByName func(name string) (*model.Team, error) + GetByNames func(name []string) ([]*model.Team, error) + GetChannelUnreadsForAllTeams func(excludeTeamId, userId string) ([]*model.ChannelUnread, error) + GetChannelUnreadsForTeam func(teamId, userId string) ([]*model.ChannelUnread, error) + GetMember func(teamId string, userId string) (*model.TeamMember, error) + GetMembers func(teamId string, offset int, limit int, ...) ([]*model.TeamMember, error) + GetMembersByIds func(teamId string, userIds []string, restrictions *model.ViewUsersRestrictions) ([]*model.TeamMember, error) + GetTeamMembersForExport func(userId string) ([]*model.TeamMemberForExport, error) + GetTeamsByScheme func(schemeId string, offset int, limit int) ([]*model.Team, error) + GetTeamsByUserId func(userId string) ([]*model.Team, error) + GetTeamsForUser func(ctx context.Context, userId string) ([]*model.TeamMember, error) + GetTeamsForUserWithPagination func(userId string, page, perPage int) ([]*model.TeamMember, error) + GetTotalMemberCount func(teamId string, restrictions *model.ViewUsersRestrictions) (int64, error) + GetUserTeamIds func(userId string, allowFromCache bool) ([]string, error) + GroupSyncedTeamCount func() (int64, error) + InvalidateAllTeamIdsForUser func(userId string) + MigrateTeamMembers func(fromTeamId string, fromUserId string) (map[string]string, error) + PermanentDelete func(teamId string) error + RemoveAllMembersByTeam func(teamId string) error + RemoveAllMembersByUser func(userId string) error + RemoveMember func(teamId string, userId string) error + RemoveMembers func(teamId string, userIds []string) error + ResetAllTeamSchemes func() error + Save func(team *model.Team) (*model.Team, error) + SaveMember func(member *model.TeamMember, maxUsersPerTeam int) (*model.TeamMember, error) + SaveMultipleMembers func(members []*model.TeamMember, maxUsersPerTeam int) ([]*model.TeamMember, error) + SearchAll func(term string, opts *model.TeamSearch) ([]*model.Team, error) + SearchAllPaged func(term string, opts *model.TeamSearch) ([]*model.Team, int64, error) + SearchOpen func(term string) ([]*model.Team, error) + SearchPrivate func(term string) ([]*model.Team, error) + Update func(team *model.Team) (*model.Team, error) + UpdateLastTeamIconUpdate func(teamId string, curTime int64) error + UpdateMember func(member *model.TeamMember) (*model.TeamMember, error) + UpdateMembersRole func(teamID string, userIDs []string) error + UpdateMultipleMembers func(members []*model.TeamMember) ([]*model.TeamMember, error) + UserBelongsToTeams func(userId string, teamIds []string) (bool, error) + type TermsOfServiceStore interface + Get func(id string, allowFromCache bool) (*model.TermsOfService, error) + GetLatest func(allowFromCache bool) (*model.TermsOfService, error) + Save func(termsOfService *model.TermsOfService) (*model.TermsOfService, error) + type ThreadStore interface + CollectThreadsWithNewerReplies func(userId string, channelIds []string, timestamp int64) ([]string, error) + CreateMembershipIfNeeded func(userId, postId string, following, incrementMentions, updateFollowing bool) error + Delete func(postId string) error + DeleteMembershipForUser func(userId, postId string) error + Get func(id string) (*model.Thread, error) + GetMembershipForUser func(userId, postId string) (*model.ThreadMembership, error) + GetMembershipsForUser func(userId, teamId string) ([]*model.ThreadMembership, error) + GetPosts func(threadId string, since int64) ([]*model.Post, error) + GetThreadsForUser func(userId, teamId string, opts model.GetUserThreadsOpts) (*model.Threads, error) + MarkAllAsRead func(userId, teamId string) error + MarkAsRead func(userId, threadId string, timestamp int64) error + Save func(thread *model.Thread) (*model.Thread, error) + SaveMembership func(membership *model.ThreadMembership) (*model.ThreadMembership, error) + SaveMultiple func(thread []*model.Thread) ([]*model.Thread, int, error) + Update func(thread *model.Thread) (*model.Thread, error) + UpdateMembership func(membership *model.ThreadMembership) (*model.ThreadMembership, error) + UpdateUnreadsByChannel func(userId string, changedThreads []string, timestamp int64, ...) error + type TokenStore interface + Cleanup func() + Delete func(token string) error + GetByToken func(token string) (*model.Token, error) + RemoveAllTokensByType func(tokenType string) error + Save func(recovery *model.Token) error + type UploadSessionStore interface + Delete func(id string) error + Get func(id string) (*model.UploadSession, error) + GetForUser func(userId string) ([]*model.UploadSession, error) + Save func(session *model.UploadSession) (*model.UploadSession, error) + Update func(session *model.UploadSession) error + type UserAccessTokenStore interface + Delete func(tokenId string) error + DeleteAllForUser func(userId string) error + Get func(tokenId string) (*model.UserAccessToken, error) + GetAll func(offset int, limit int) ([]*model.UserAccessToken, error) + GetByToken func(tokenString string) (*model.UserAccessToken, error) + GetByUser func(userId string, page, perPage int) ([]*model.UserAccessToken, error) + Save func(token *model.UserAccessToken) (*model.UserAccessToken, error) + Search func(term string) ([]*model.UserAccessToken, error) + UpdateTokenDisable func(tokenId string) error + UpdateTokenEnable func(tokenId string) error + type UserGetByIdsOpts struct + IsAdmin bool + Since int64 + ViewRestrictions *model.ViewUsersRestrictions + type UserStore interface + AnalyticsActiveCount func(time int64, options model.UserCountOptions) (int64, error) + AnalyticsActiveCountForPeriod func(startTime int64, endTime int64, options model.UserCountOptions) (int64, error) + AnalyticsGetExternalUsers func(hostDomain string) (bool, error) + AnalyticsGetGuestCount func() (int64, error) + AnalyticsGetInactiveUsersCount func() (int64, error) + AnalyticsGetSystemAdminCount func() (int64, error) + AutocompleteUsersInChannel func(teamId, channelId, term string, options *model.UserSearchOptions) (*model.UserAutocompleteInChannel, error) + ClearAllCustomRoleAssignments func() error + ClearCaches func() + Count func(options model.UserCountOptions) (int64, error) + DeactivateGuests func() ([]string, error) + DemoteUserToGuest func(userID string) error + Get func(id string) (*model.User, error) + GetAll func() ([]*model.User, error) + GetAllAfter func(limit int, afterId string) ([]*model.User, error) + GetAllNotInAuthService func(authServices []string) ([]*model.User, error) + GetAllProfiles func(options *model.UserGetOptions) ([]*model.User, error) + GetAllProfilesInChannel func(channelId string, allowFromCache bool) (map[string]*model.User, error) + GetAllUsingAuthService func(authService string) ([]*model.User, error) + GetAnyUnreadPostCountForChannel func(userId string, channelId string) (int64, error) + GetByAuth func(authData *string, authService string) (*model.User, error) + GetByEmail func(email string) (*model.User, error) + GetByUsername func(username string) (*model.User, error) + GetChannelGroupUsers func(channelID string) ([]*model.User, error) + GetEtagForAllProfiles func() string + GetEtagForProfiles func(teamId string) string + GetEtagForProfilesNotInTeam func(teamId string) string + GetForLogin func(loginId string, allowSignInWithUsername, allowSignInWithEmail bool) (*model.User, error) + GetKnownUsers func(userID string) ([]string, error) + GetNewUsersForTeam func(teamId string, offset, limit int, ...) ([]*model.User, error) + GetProfileByGroupChannelIdsForUser func(userId string, channelIds []string) (map[string][]*model.User, error) + GetProfileByIds func(userIds []string, options *UserGetByIdsOpts, allowFromCache bool) ([]*model.User, error) + GetProfiles func(options *model.UserGetOptions) ([]*model.User, error) + GetProfilesByUsernames func(usernames []string, viewRestrictions *model.ViewUsersRestrictions) ([]*model.User, error) + GetProfilesInChannel func(options *model.UserGetOptions) ([]*model.User, error) + GetProfilesInChannelByStatus func(options *model.UserGetOptions) ([]*model.User, error) + GetProfilesNotInChannel func(teamId string, channelId string, groupConstrained bool, offset int, limit int, ...) ([]*model.User, error) + GetProfilesNotInTeam func(teamId string, groupConstrained bool, offset int, limit int, ...) ([]*model.User, error) + GetProfilesWithoutTeam func(options *model.UserGetOptions) ([]*model.User, error) + GetRecentlyActiveUsersForTeam func(teamId string, offset, limit int, ...) ([]*model.User, error) + GetSystemAdminProfiles func() (map[string]*model.User, error) + GetTeamGroupUsers func(teamID string) ([]*model.User, error) + GetUnreadCount func(userId string) (int64, error) + GetUnreadCountForChannel func(userId string, channelId string) (int64, error) + GetUsersBatchForIndexing func(startTime, endTime int64, limit int) ([]*model.UserForIndexing, error) + InferSystemInstallDate func() (int64, error) + InvalidateProfileCacheForUser func(userId string) + InvalidateProfilesInChannelCache func(channelId string) + InvalidateProfilesInChannelCacheByUser func(userId string) + PermanentDelete func(userId string) error + PromoteGuestToUser func(userID string) error + ResetLastPictureUpdate func(userId string) error + Save func(user *model.User) (*model.User, error) + Search func(teamId string, term string, options *model.UserSearchOptions) ([]*model.User, error) + SearchInChannel func(channelId string, term string, options *model.UserSearchOptions) ([]*model.User, error) + SearchInGroup func(groupID string, term string, options *model.UserSearchOptions) ([]*model.User, error) + SearchNotInChannel func(teamId string, channelId string, term string, options *model.UserSearchOptions) ([]*model.User, error) + SearchNotInTeam func(notInTeamId string, term string, options *model.UserSearchOptions) ([]*model.User, error) + SearchWithoutTeam func(term string, options *model.UserSearchOptions) ([]*model.User, error) + Update func(user *model.User, allowRoleUpdate bool) (*model.UserUpdate, error) + UpdateAuthData func(userId string, service string, authData *string, email string, resetMfa bool) (string, error) + UpdateFailedPasswordAttempts func(userId string, attempts int) error + UpdateLastPictureUpdate func(userId string) error + UpdateMfaActive func(userId string, active bool) error + UpdateMfaSecret func(userId, secret string) error + UpdatePassword func(userId, newPassword string) error + UpdateUpdateAt func(userId string) (int64, error) + VerifyEmail func(userId, email string) (string, error) + type UserTermsOfServiceStore interface + Delete func(userId, termsOfServiceId string) error + GetByUser func(userId string) (*model.UserTermsOfService, error) + Save func(userTermsOfService *model.UserTermsOfService) (*model.UserTermsOfService, error) + type WebhookStore interface + AnalyticsIncomingCount func(teamId string) (int64, error) + AnalyticsOutgoingCount func(teamId string) (int64, error) + ClearCaches func() + DeleteIncoming func(webhookId string, time int64) error + DeleteOutgoing func(webhookId string, time int64) error + GetIncoming func(id string, allowFromCache bool) (*model.IncomingWebhook, error) + GetIncomingByChannel func(channelId string) ([]*model.IncomingWebhook, error) + GetIncomingByTeam func(teamId string, offset, limit int) ([]*model.IncomingWebhook, error) + GetIncomingByTeamByUser func(teamId string, userId string, offset, limit int) ([]*model.IncomingWebhook, error) + GetIncomingList func(offset, limit int) ([]*model.IncomingWebhook, error) + GetIncomingListByUser func(userId string, offset, limit int) ([]*model.IncomingWebhook, error) + GetOutgoing func(id string) (*model.OutgoingWebhook, error) + GetOutgoingByChannel func(channelId string, offset, limit int) ([]*model.OutgoingWebhook, error) + GetOutgoingByChannelByUser func(channelId string, userId string, offset, limit int) ([]*model.OutgoingWebhook, error) + GetOutgoingByTeam func(teamId string, offset, limit int) ([]*model.OutgoingWebhook, error) + GetOutgoingByTeamByUser func(teamId string, userId string, offset, limit int) ([]*model.OutgoingWebhook, error) + GetOutgoingList func(offset, limit int) ([]*model.OutgoingWebhook, error) + GetOutgoingListByUser func(userId string, offset, limit int) ([]*model.OutgoingWebhook, error) + InvalidateWebhookCache func(webhook string) + PermanentDeleteIncomingByChannel func(channelId string) error + PermanentDeleteIncomingByUser func(userId string) error + PermanentDeleteOutgoingByChannel func(channelId string) error + PermanentDeleteOutgoingByUser func(userId string) error + SaveIncoming func(webhook *model.IncomingWebhook) (*model.IncomingWebhook, error) + SaveOutgoing func(webhook *model.OutgoingWebhook) (*model.OutgoingWebhook, error) + UpdateIncoming func(webhook *model.IncomingWebhook) (*model.IncomingWebhook, error) + UpdateOutgoing func(hook *model.OutgoingWebhook) (*model.OutgoingWebhook, error) Other modules containing this package github.com/adacta-ru/mattermost-server github.com/adacta-ru/mattermost-server/v5