Documentation ¶
Index ¶
- Constants
- func DecodeBytes(input []byte, thing interface{}) error
- func GetBytes(key interface{}) ([]byte, error)
- func Must(sc StoreChannel) interface{}
- type AuditStore
- type BotStore
- type ChannelMemberHistoryStore
- type ChannelSearchOpts
- type ChannelStore
- type ClusterDiscoveryStore
- type CommandStore
- type CommandWebhookStore
- type ComplianceStore
- type EmojiStore
- type FileInfoStore
- type GroupStore
- type JobStore
- type LayeredReactionStore
- func (s *LayeredReactionStore) BulkGetForPosts(postIds []string) ([]*model.Reaction, *model.AppError)
- func (s *LayeredReactionStore) Delete(reaction *model.Reaction) (*model.Reaction, *model.AppError)
- func (s *LayeredReactionStore) DeleteAllWithEmojiName(emojiName string) *model.AppError
- func (s *LayeredReactionStore) GetForPost(postId string, allowFromCache bool) ([]*model.Reaction, *model.AppError)
- func (s *LayeredReactionStore) PermanentDeleteBatch(endTime int64, limit int64) (int64, *model.AppError)
- func (s *LayeredReactionStore) Save(reaction *model.Reaction) (*model.Reaction, *model.AppError)
- type LayeredRoleStore
- func (s *LayeredRoleStore) Delete(roldId string) (*model.Role, *model.AppError)
- func (s *LayeredRoleStore) Get(roleId string) (*model.Role, *model.AppError)
- func (s *LayeredRoleStore) GetAll() ([]*model.Role, *model.AppError)
- func (s *LayeredRoleStore) GetByName(name string) (*model.Role, *model.AppError)
- func (s *LayeredRoleStore) GetByNames(names []string) ([]*model.Role, *model.AppError)
- func (s *LayeredRoleStore) PermanentDeleteAll() *model.AppError
- func (s *LayeredRoleStore) Save(role *model.Role) (*model.Role, *model.AppError)
- type LayeredSchemeStore
- func (s *LayeredSchemeStore) Delete(schemeId string) StoreChannel
- func (s *LayeredSchemeStore) Get(schemeId string) StoreChannel
- func (s *LayeredSchemeStore) GetAllPage(scope string, offset int, limit int) StoreChannel
- func (s *LayeredSchemeStore) GetByName(schemeName string) StoreChannel
- func (s *LayeredSchemeStore) PermanentDeleteAll() StoreChannel
- func (s *LayeredSchemeStore) Save(scheme *model.Scheme) StoreChannel
- type LayeredStore
- func (s *LayeredStore) Audit() AuditStore
- func (s *LayeredStore) Bot() BotStore
- func (s *LayeredStore) Channel() ChannelStore
- func (s *LayeredStore) ChannelMemberHistory() ChannelMemberHistoryStore
- func (s *LayeredStore) Close()
- func (s *LayeredStore) ClusterDiscovery() ClusterDiscoveryStore
- func (s *LayeredStore) Command() CommandStore
- func (s *LayeredStore) CommandWebhook() CommandWebhookStore
- func (s *LayeredStore) Compliance() ComplianceStore
- func (s *LayeredStore) DropAllTables()
- func (s *LayeredStore) Emoji() EmojiStore
- func (s *LayeredStore) FileInfo() FileInfoStore
- func (s *LayeredStore) Group() GroupStore
- func (s *LayeredStore) Job() JobStore
- func (s *LayeredStore) License() LicenseStore
- func (s *LayeredStore) LinkMetadata() LinkMetadataStore
- func (s *LayeredStore) LockToMaster()
- func (s *LayeredStore) MarkSystemRanUnitTests()
- func (s *LayeredStore) OAuth() OAuthStore
- func (s *LayeredStore) Plugin() PluginStore
- func (s *LayeredStore) Post() PostStore
- func (s *LayeredStore) Preference() PreferenceStore
- func (s *LayeredStore) Reaction() ReactionStore
- func (s *LayeredStore) Role() RoleStore
- func (s *LayeredStore) RunQuery(queryFunction QueryFunction) StoreChannel
- func (s *LayeredStore) Scheme() SchemeStore
- func (s *LayeredStore) Session() SessionStore
- func (s *LayeredStore) Status() StatusStore
- func (s *LayeredStore) System() SystemStore
- func (s *LayeredStore) Task() TaskStore
- func (s *LayeredStore) Team() TeamStore
- func (s *LayeredStore) TermsOfService() TermsOfServiceStore
- func (s *LayeredStore) Token() TokenStore
- func (s *LayeredStore) TotalMasterDbConnections() int
- func (s *LayeredStore) TotalReadDbConnections() int
- func (s *LayeredStore) TotalSearchDbConnections() int
- func (s *LayeredStore) UnlockFromMaster()
- func (s *LayeredStore) User() UserStore
- func (s *LayeredStore) UserAccessToken() UserAccessTokenStore
- func (s *LayeredStore) UserTermsOfService() UserTermsOfServiceStore
- func (s *LayeredStore) Webhook() WebhookStore
- type LayeredStoreDatabaseLayer
- type LayeredStoreHint
- type LayeredStoreSupplier
- type LayeredStoreSupplierResult
- type LicenseStore
- type LinkMetadataStore
- type LocalCacheSupplier
- func (s *LocalCacheSupplier) Invalidate()
- func (s *LocalCacheSupplier) Next() LayeredStoreSupplier
- func (s *LocalCacheSupplier) ReactionDelete(ctx context.Context, reaction *model.Reaction, hints ...LayeredStoreHint) (*model.Reaction, *model.AppError)
- func (s *LocalCacheSupplier) ReactionDeleteAllWithEmojiName(ctx context.Context, emojiName string, hints ...LayeredStoreHint) *model.AppError
- func (s *LocalCacheSupplier) ReactionGetForPost(ctx context.Context, postId string, hints ...LayeredStoreHint) ([]*model.Reaction, *model.AppError)
- func (s *LocalCacheSupplier) ReactionPermanentDeleteBatch(ctx context.Context, endTime int64, limit int64, hints ...LayeredStoreHint) (int64, *model.AppError)
- func (s *LocalCacheSupplier) ReactionSave(ctx context.Context, reaction *model.Reaction, hints ...LayeredStoreHint) (*model.Reaction, *model.AppError)
- func (s *LocalCacheSupplier) ReactionsBulkGetForPosts(ctx context.Context, postIds []string, hints ...LayeredStoreHint) ([]*model.Reaction, *model.AppError)
- func (s *LocalCacheSupplier) RoleDelete(ctx context.Context, roleId string, hints ...LayeredStoreHint) (*model.Role, *model.AppError)
- func (s *LocalCacheSupplier) RoleGet(ctx context.Context, roleId string, hints ...LayeredStoreHint) (*model.Role, *model.AppError)
- func (s *LocalCacheSupplier) RoleGetAll(ctx context.Context, hints ...LayeredStoreHint) ([]*model.Role, *model.AppError)
- func (s *LocalCacheSupplier) RoleGetByName(ctx context.Context, name string, hints ...LayeredStoreHint) (*model.Role, *model.AppError)
- func (s *LocalCacheSupplier) RoleGetByNames(ctx context.Context, roleNames []string, hints ...LayeredStoreHint) ([]*model.Role, *model.AppError)
- func (s *LocalCacheSupplier) RolePermanentDeleteAll(ctx context.Context, hints ...LayeredStoreHint) *model.AppError
- func (s *LocalCacheSupplier) RoleSave(ctx context.Context, role *model.Role, hints ...LayeredStoreHint) (*model.Role, *model.AppError)
- func (s *LocalCacheSupplier) SchemeDelete(ctx context.Context, schemeId string, hints ...LayeredStoreHint) *LayeredStoreSupplierResult
- func (s *LocalCacheSupplier) SchemeGet(ctx context.Context, schemeId string, hints ...LayeredStoreHint) *LayeredStoreSupplierResult
- func (s *LocalCacheSupplier) SchemeGetAllPage(ctx context.Context, scope string, offset int, limit int, ...) *LayeredStoreSupplierResult
- func (s *LocalCacheSupplier) SchemeGetByName(ctx context.Context, schemeName string, hints ...LayeredStoreHint) *LayeredStoreSupplierResult
- func (s *LocalCacheSupplier) SchemePermanentDeleteAll(ctx context.Context, hints ...LayeredStoreHint) *LayeredStoreSupplierResult
- func (s *LocalCacheSupplier) SchemeSave(ctx context.Context, scheme *model.Scheme, hints ...LayeredStoreHint) *LayeredStoreSupplierResult
- func (s *LocalCacheSupplier) SetChainNext(next LayeredStoreSupplier)
- type OAuthStore
- type ObjectCache
- type PluginStore
- type PostStore
- type PreferenceStore
- type QueryFunction
- type ReactionStore
- type RedisSupplier
- func (s *RedisSupplier) Next() LayeredStoreSupplier
- func (s *RedisSupplier) ReactionDelete(ctx context.Context, reaction *model.Reaction, hints ...LayeredStoreHint) (*model.Reaction, *model.AppError)
- func (s *RedisSupplier) ReactionDeleteAllWithEmojiName(ctx context.Context, emojiName string, hints ...LayeredStoreHint) *model.AppError
- func (s *RedisSupplier) ReactionGetForPost(ctx context.Context, postId string, hints ...LayeredStoreHint) ([]*model.Reaction, *model.AppError)
- func (s *RedisSupplier) ReactionPermanentDeleteBatch(ctx context.Context, endTime int64, limit int64, hints ...LayeredStoreHint) (int64, *model.AppError)
- func (s *RedisSupplier) ReactionSave(ctx context.Context, reaction *model.Reaction, hints ...LayeredStoreHint) (*model.Reaction, *model.AppError)
- func (s *RedisSupplier) ReactionsBulkGetForPosts(ctx context.Context, postIds []string, hints ...LayeredStoreHint) ([]*model.Reaction, *model.AppError)
- func (s *RedisSupplier) RoleDelete(ctx context.Context, roleId string, hints ...LayeredStoreHint) (*model.Role, *model.AppError)
- func (s *RedisSupplier) RoleGet(ctx context.Context, roleId string, hints ...LayeredStoreHint) (*model.Role, *model.AppError)
- func (s *RedisSupplier) RoleGetAll(ctx context.Context, hints ...LayeredStoreHint) ([]*model.Role, *model.AppError)
- func (s *RedisSupplier) RoleGetByName(ctx context.Context, name string, hints ...LayeredStoreHint) (*model.Role, *model.AppError)
- func (s *RedisSupplier) RoleGetByNames(ctx context.Context, roleNames []string, hints ...LayeredStoreHint) ([]*model.Role, *model.AppError)
- func (s *RedisSupplier) RolePermanentDeleteAll(ctx context.Context, hints ...LayeredStoreHint) *model.AppError
- func (s *RedisSupplier) RoleSave(ctx context.Context, role *model.Role, hints ...LayeredStoreHint) (*model.Role, *model.AppError)
- func (s *RedisSupplier) SchemeDelete(ctx context.Context, schemeId string, hints ...LayeredStoreHint) *LayeredStoreSupplierResult
- func (s *RedisSupplier) SchemeGet(ctx context.Context, schemeId string, hints ...LayeredStoreHint) *LayeredStoreSupplierResult
- func (s *RedisSupplier) SchemeGetAllPage(ctx context.Context, scope string, offset int, limit int, ...) *LayeredStoreSupplierResult
- func (s *RedisSupplier) SchemeGetByName(ctx context.Context, schemeName string, hints ...LayeredStoreHint) *LayeredStoreSupplierResult
- func (s *RedisSupplier) SchemePermanentDeleteAll(ctx context.Context, hints ...LayeredStoreHint) *LayeredStoreSupplierResult
- func (s *RedisSupplier) SchemeSave(ctx context.Context, scheme *model.Scheme, hints ...LayeredStoreHint) *LayeredStoreSupplierResult
- func (s *RedisSupplier) SetChainNext(next LayeredStoreSupplier)
- type RoleStore
- type SchemeStore
- type SessionStore
- type StatusStore
- type Store
- type StoreChannel
- type StoreResult
- type SystemStore
- type TaskStore
- type TeamStore
- type TermsOfServiceStore
- type TokenStore
- type UserAccessTokenStore
- type UserGetByIdsOpts
- type UserStore
- type UserTermsOfServiceStore
- type WebhookStore
Constants ¶
View Source
const ( MISSING_CHANNEL_ERROR = "store.sql_channel.get_by_name.missing.app_error" MISSING_CHANNEL_MEMBER_ERROR = "store.sql_channel.get_member.missing.app_error" CHANNEL_EXISTS_ERROR = "store.sql_channel.save_channel.exists.app_error" MISSING_ACCOUNT_ERROR = "store.sql_user.missing_account.const" MISSING_AUTH_ACCOUNT_ERROR = "store.sql_user.get_by_auth.missing_account.app_error" USER_SEARCH_OPTION_NAMES_ONLY = "names_only" USER_SEARCH_OPTION_NAMES_ONLY_NO_FULL_NAME = "names_only_no_full_name" USER_SEARCH_OPTION_ALL_NO_FULL_NAME = "all_no_full_name" USER_SEARCH_OPTION_ALLOW_INACTIVE = "allow_inactive" FEATURE_TOGGLE_PREFIX = "feature_enabled_" )
View Source
const ( REACTION_CACHE_SIZE = 20000 REACTION_CACHE_SEC = 30 * 60 ROLE_CACHE_SIZE = 20000 ROLE_CACHE_SEC = 30 * 60 SCHEME_CACHE_SIZE = 20000 SCHEME_CACHE_SEC = 30 * 60 GROUP_CACHE_SIZE = 20000 GROUP_CACHE_SEC = 30 * 60 CLEAR_CACHE_MESSAGE_DATA = "" )
View Source
const (
ENABLE_EXPERIMENTAL_REDIS = false
)
View Source
const REDIS_EXPIRY_TIME = 30 * time.Minute
Variables ¶
This section is empty.
Functions ¶
func DecodeBytes ¶
func Must ¶
func Must(sc StoreChannel) interface{}
Types ¶
type AuditStore ¶
type BotStore ¶
type BotStore interface { Get(userId string, includeDeleted bool) (*model.Bot, *model.AppError) GetAll(options *model.BotGetOptions) ([]*model.Bot, *model.AppError) Save(bot *model.Bot) (*model.Bot, *model.AppError) Update(bot *model.Bot) (*model.Bot, *model.AppError) PermanentDelete(userId string) *model.AppError }
type ChannelMemberHistoryStore ¶
type ChannelMemberHistoryStore interface { LogJoinEvent(userId string, channelId string, joinTime int64) *model.AppError LogLeaveEvent(userId string, channelId string, leaveTime int64) *model.AppError GetUsersInChannelDuring(startTime int64, endTime int64, channelId string) ([]*model.ChannelMemberHistoryResult, *model.AppError) PermanentDeleteBatch(endTime int64, limit int64) (int64, *model.AppError) }
type ChannelSearchOpts ¶
type ChannelSearchOpts struct { NotAssociatedToGroup string IncludeDeleted bool ExcludeChannelNames []string }
ChannelSearchOpts contains options for searching channels.
NotAssociatedToGroup will exclude channels that have associated, active GroupChannels records. IncludeDeleted will include channel records where DeleteAt != 0. ExcludeChannelNames will exclude channels from the results by name.
type ChannelStore ¶
type ChannelStore interface { GetByDisplayName(teamId string, displayName string) (*model.Channel, *model.AppError) Save(channel *model.Channel, maxChannelsPerTeam int64) (*model.Channel, *model.AppError) CreateDirectChannel(userId string, otherUserId string) (*model.Channel, *model.AppError) SaveDirectChannel(channel *model.Channel, member1 *model.ChannelMember, member2 *model.ChannelMember) (*model.Channel, *model.AppError) Update(channel *model.Channel) (*model.Channel, *model.AppError) Get(id string, allowFromCache bool) (*model.Channel, *model.AppError) InvalidateChannel(id string) InvalidateChannelByName(teamId, name string) GetFromMaster(id string) (*model.Channel, *model.AppError) Delete(channelId string, time int64) *model.AppError Restore(channelId string, time int64) *model.AppError SetDeleteAt(channelId string, deleteAt int64, updateAt int64) *model.AppError PermanentDeleteByTeam(teamId string) StoreChannel PermanentDelete(channelId string) StoreChannel GetByName(team_id string, name string, allowFromCache bool) (*model.Channel, *model.AppError) GetByNames(team_id string, names []string, allowFromCache bool) ([]*model.Channel, *model.AppError) GetByNameIncludeDeleted(team_id string, name string, allowFromCache bool) (*model.Channel, *model.AppError) GetDeletedByName(team_id string, name string) (*model.Channel, *model.AppError) GetDeleted(team_id string, offset int, limit int) (*model.ChannelList, *model.AppError) GetChannels(teamId string, userId string, includeDeleted bool) (*model.ChannelList, *model.AppError) GetAllChannels(page, perPage int, opts ChannelSearchOpts) (*model.ChannelListWithTeamData, *model.AppError) GetAllChannelsCount(opts ChannelSearchOpts) (int64, *model.AppError) GetMoreChannels(teamId string, userId string, offset int, limit int) (*model.ChannelList, *model.AppError) GetPublicChannelsForTeam(teamId string, offset int, limit int) (*model.ChannelList, *model.AppError) GetPublicChannelsByIdsForTeam(teamId string, channelIds []string) (*model.ChannelList, *model.AppError) GetChannelCounts(teamId string, userId string) (*model.ChannelCounts, *model.AppError) GetTeamChannels(teamId string) (*model.ChannelList, *model.AppError) GetAll(teamId string) ([]*model.Channel, *model.AppError) GetChannelsByIds(channelIds []string) ([]*model.Channel, *model.AppError) GetForPost(postId string) (*model.Channel, *model.AppError) SaveMember(member *model.ChannelMember) StoreChannel UpdateMember(member *model.ChannelMember) (*model.ChannelMember, *model.AppError) GetMembers(channelId string, offset, limit int) (*model.ChannelMembers, *model.AppError) GetMember(channelId string, userId string) (*model.ChannelMember, *model.AppError) GetChannelMembersTimezones(channelId string) ([]model.StringMap, *model.AppError) GetAllChannelMembersForUser(userId string, allowFromCache bool, includeDeleted bool) (map[string]string, *model.AppError) InvalidateAllChannelMembersForUser(userId string) IsUserInChannelUseCache(userId string, channelId string) bool GetAllChannelMembersNotifyPropsForChannel(channelId string, allowFromCache bool) (map[string]model.StringMap, *model.AppError) InvalidateCacheForChannelMembersNotifyProps(channelId string) GetMemberForPost(postId string, userId string) (*model.ChannelMember, *model.AppError) InvalidateMemberCount(channelId string) GetMemberCountFromCache(channelId string) int64 GetMemberCount(channelId string, allowFromCache bool) (int64, *model.AppError) GetPinnedPosts(channelId string) (*model.PostList, *model.AppError) RemoveMember(channelId string, userId string) *model.AppError PermanentDeleteMembersByUser(userId string) *model.AppError PermanentDeleteMembersByChannel(channelId string) *model.AppError UpdateLastViewedAt(channelIds []string, userId string) (map[string]int64, *model.AppError) IncrementMentionCount(channelId string, userId string) *model.AppError AnalyticsTypeCount(teamId string, channelType string) (int64, *model.AppError) GetMembersForUser(teamId string, userId string) (*model.ChannelMembers, *model.AppError) GetMembersForUserWithPagination(teamId, userId string, page, perPage int) (*model.ChannelMembers, *model.AppError) AutocompleteInTeam(teamId string, term string, includeDeleted bool) (*model.ChannelList, *model.AppError) AutocompleteInTeamForSearch(teamId string, userId string, term string, includeDeleted bool) (*model.ChannelList, *model.AppError) SearchAllChannels(term string, opts ChannelSearchOpts) (*model.ChannelListWithTeamData, *model.AppError) SearchInTeam(teamId string, term string, includeDeleted bool) (*model.ChannelList, *model.AppError) SearchMore(userId string, teamId string, term string) (*model.ChannelList, *model.AppError) SearchGroupChannels(userId, term string) (*model.ChannelList, *model.AppError) GetMembersByIds(channelId string, userIds []string) (*model.ChannelMembers, *model.AppError) AnalyticsDeletedTypeCount(teamId string, channelType string) (int64, *model.AppError) GetChannelUnread(channelId, userId string) (*model.ChannelUnread, *model.AppError) ClearCaches() GetChannelsByScheme(schemeId string, offset int, limit int) StoreChannel MigrateChannelMembers(fromChannelId string, fromUserId string) (map[string]string, *model.AppError) ResetAllChannelSchemes() *model.AppError ClearAllCustomRoleAssignments() *model.AppError MigratePublicChannels() error GetAllChannelsForExportAfter(limit int, afterId string) ([]*model.ChannelForExport, *model.AppError) GetAllDirectChannelsForExportAfter(limit int, afterId string) ([]*model.DirectChannelForExport, *model.AppError) GetChannelMembersForExport(userId string, teamId string) ([]*model.ChannelMemberForExport, *model.AppError) RemoveAllDeactivatedMembers(channelId string) *model.AppError GetChannelsBatchForIndexing(startTime, endTime int64, limit int) ([]*model.Channel, *model.AppError) UserBelongsToChannels(userId string, channelIds []string) (bool, *model.AppError) }
type ClusterDiscoveryStore ¶
type ClusterDiscoveryStore interface { Save(discovery *model.ClusterDiscovery) *model.AppError Delete(discovery *model.ClusterDiscovery) (bool, *model.AppError) Exists(discovery *model.ClusterDiscovery) (bool, *model.AppError) GetAll(discoveryType, clusterName string) ([]*model.ClusterDiscovery, *model.AppError) SetLastPingAt(discovery *model.ClusterDiscovery) *model.AppError Cleanup() *model.AppError }
type CommandStore ¶
type CommandStore interface { Save(webhook *model.Command) (*model.Command, *model.AppError) GetByTrigger(teamId string, trigger string) (*model.Command, *model.AppError) Get(id string) (*model.Command, *model.AppError) GetByTeam(teamId string) ([]*model.Command, *model.AppError) Delete(commandId string, time int64) *model.AppError PermanentDeleteByTeam(teamId string) *model.AppError PermanentDeleteByUser(userId string) *model.AppError Update(hook *model.Command) (*model.Command, *model.AppError) AnalyticsCommandCount(teamId string) (int64, *model.AppError) }
type CommandWebhookStore ¶
type CommandWebhookStore interface { Save(webhook *model.CommandWebhook) StoreChannel Get(id string) StoreChannel TryUse(id string, limit int) StoreChannel Cleanup() }
type ComplianceStore ¶
type ComplianceStore interface { Save(compliance *model.Compliance) (*model.Compliance, *model.AppError) Update(compliance *model.Compliance) (*model.Compliance, *model.AppError) Get(id string) (*model.Compliance, *model.AppError) GetAll(offset, limit int) (model.Compliances, *model.AppError) ComplianceExport(compliance *model.Compliance) ([]*model.CompliancePost, *model.AppError) MessageExport(after int64, limit int) ([]*model.MessageExport, *model.AppError) }
type EmojiStore ¶
type EmojiStore interface { Save(emoji *model.Emoji) (*model.Emoji, *model.AppError) Get(id string, allowFromCache bool) (*model.Emoji, *model.AppError) GetByName(name string) (*model.Emoji, *model.AppError) GetMultipleByName(names []string) StoreChannel GetList(offset, limit int, sort string) ([]*model.Emoji, *model.AppError) Delete(id string, time int64) *model.AppError Search(name string, prefixOnly bool, limit int) ([]*model.Emoji, *model.AppError) }
type FileInfoStore ¶
type FileInfoStore interface { Save(info *model.FileInfo) (*model.FileInfo, *model.AppError) Get(id string) (*model.FileInfo, *model.AppError) GetByPath(path string) (*model.FileInfo, *model.AppError) GetForPost(postId string, readFromMaster bool, allowFromCache bool) ([]*model.FileInfo, *model.AppError) GetForUser(userId string) ([]*model.FileInfo, *model.AppError) InvalidateFileInfosForPostCache(postId string) AttachToPost(fileId string, postId string, creatorId string) *model.AppError DeleteForPost(postId string) (string, *model.AppError) PermanentDelete(fileId string) *model.AppError PermanentDeleteBatch(endTime int64, limit int64) (int64, *model.AppError) PermanentDeleteByUser(userId string) (int64, *model.AppError) ClearCaches() }
type GroupStore ¶
type GroupStore interface { Create(group *model.Group) StoreChannel Get(groupID string) StoreChannel GetByIDs(groupIDs []string) ([]*model.Group, *model.AppError) GetByRemoteID(remoteID string, groupSource model.GroupSource) StoreChannel GetAllBySource(groupSource model.GroupSource) StoreChannel Update(group *model.Group) StoreChannel Delete(groupID string) StoreChannel GetMemberUsers(groupID string) StoreChannel GetMemberUsersPage(groupID string, offset int, limit int) StoreChannel GetMemberCount(groupID string) StoreChannel UpsertMember(groupID string, userID string) StoreChannel DeleteMember(groupID string, userID string) StoreChannel CreateGroupSyncable(groupSyncable *model.GroupSyncable) (*model.GroupSyncable, *model.AppError) GetGroupSyncable(groupID string, syncableID string, syncableType model.GroupSyncableType) (*model.GroupSyncable, *model.AppError) GetAllGroupSyncablesByGroupId(groupID string, syncableType model.GroupSyncableType) ([]*model.GroupSyncable, *model.AppError) UpdateGroupSyncable(groupSyncable *model.GroupSyncable) (*model.GroupSyncable, *model.AppError) DeleteGroupSyncable(groupID string, syncableID string, syncableType model.GroupSyncableType) (*model.GroupSyncable, *model.AppError) TeamMembersToAdd(since int64) ([]*model.UserTeamIDPair, *model.AppError) ChannelMembersToAdd(since int64) ([]*model.UserChannelIDPair, *model.AppError) TeamMembersToRemove() ([]*model.TeamMember, *model.AppError) ChannelMembersToRemove() ([]*model.ChannelMember, *model.AppError) GetGroupsByChannel(channelId string, opts model.GroupSearchOpts) ([]*model.Group, *model.AppError) CountGroupsByChannel(channelId string, opts model.GroupSearchOpts) (int64, *model.AppError) GetGroupsByTeam(teamId string, opts model.GroupSearchOpts) ([]*model.Group, *model.AppError) CountGroupsByTeam(teamId string, opts model.GroupSearchOpts) (int64, *model.AppError) GetGroups(page, perPage int, opts model.GroupSearchOpts) ([]*model.Group, *model.AppError) TeamMembersMinusGroupMembers(teamID string, groupIDs []string, page, perPage int) ([]*model.UserWithGroups, *model.AppError) CountTeamMembersMinusGroupMembers(teamID string, groupIDs []string) (int64, *model.AppError) ChannelMembersMinusGroupMembers(channelID string, groupIDs []string, page, perPage int) ([]*model.UserWithGroups, *model.AppError) CountChannelMembersMinusGroupMembers(channelID string, groupIDs []string) (int64, *model.AppError) }
type JobStore ¶
type JobStore interface { Save(job *model.Job) (*model.Job, *model.AppError) UpdateOptimistically(job *model.Job, currentStatus string) (bool, *model.AppError) UpdateStatus(id string, status string) (*model.Job, *model.AppError) UpdateStatusOptimistically(id string, currentStatus string, newStatus string) (bool, *model.AppError) Get(id string) (*model.Job, *model.AppError) GetAllPage(offset int, limit int) ([]*model.Job, *model.AppError) GetAllByType(jobType string) ([]*model.Job, *model.AppError) GetAllByTypePage(jobType string, offset int, limit int) ([]*model.Job, *model.AppError) GetAllByStatus(status string) ([]*model.Job, *model.AppError) GetNewestJobByStatusAndType(status string, jobType string) (*model.Job, *model.AppError) GetCountByStatusAndType(status string, jobType string) (int64, *model.AppError) Delete(id string) (string, *model.AppError) }
type LayeredReactionStore ¶
type LayeredReactionStore struct {
*LayeredStore
}
func (*LayeredReactionStore) BulkGetForPosts ¶
func (*LayeredReactionStore) DeleteAllWithEmojiName ¶
func (s *LayeredReactionStore) DeleteAllWithEmojiName(emojiName string) *model.AppError
func (*LayeredReactionStore) GetForPost ¶
func (*LayeredReactionStore) PermanentDeleteBatch ¶
type LayeredRoleStore ¶
type LayeredRoleStore struct {
*LayeredStore
}
func (*LayeredRoleStore) GetAll ¶
func (s *LayeredRoleStore) GetAll() ([]*model.Role, *model.AppError)
func (*LayeredRoleStore) GetByNames ¶
func (*LayeredRoleStore) PermanentDeleteAll ¶
func (s *LayeredRoleStore) PermanentDeleteAll() *model.AppError
type LayeredSchemeStore ¶
type LayeredSchemeStore struct {
*LayeredStore
}
func (*LayeredSchemeStore) Delete ¶
func (s *LayeredSchemeStore) Delete(schemeId string) StoreChannel
func (*LayeredSchemeStore) Get ¶
func (s *LayeredSchemeStore) Get(schemeId string) StoreChannel
func (*LayeredSchemeStore) GetAllPage ¶
func (s *LayeredSchemeStore) GetAllPage(scope string, offset int, limit int) StoreChannel
func (*LayeredSchemeStore) GetByName ¶
func (s *LayeredSchemeStore) GetByName(schemeName string) StoreChannel
func (*LayeredSchemeStore) PermanentDeleteAll ¶
func (s *LayeredSchemeStore) PermanentDeleteAll() StoreChannel
func (*LayeredSchemeStore) Save ¶
func (s *LayeredSchemeStore) Save(scheme *model.Scheme) StoreChannel
type LayeredStore ¶
type LayeredStore struct { TmpContext context.Context ReactionStore ReactionStore RoleStore RoleStore SchemeStore SchemeStore DatabaseLayer LayeredStoreDatabaseLayer LocalCacheLayer *LocalCacheSupplier RedisLayer *RedisSupplier LayerChainHead LayeredStoreSupplier }
func (*LayeredStore) Audit ¶
func (s *LayeredStore) Audit() AuditStore
func (*LayeredStore) Bot ¶
func (s *LayeredStore) Bot() BotStore
func (*LayeredStore) Channel ¶
func (s *LayeredStore) Channel() ChannelStore
func (*LayeredStore) ChannelMemberHistory ¶
func (s *LayeredStore) ChannelMemberHistory() ChannelMemberHistoryStore
func (*LayeredStore) Close ¶
func (s *LayeredStore) Close()
func (*LayeredStore) ClusterDiscovery ¶
func (s *LayeredStore) ClusterDiscovery() ClusterDiscoveryStore
func (*LayeredStore) Command ¶
func (s *LayeredStore) Command() CommandStore
func (*LayeredStore) CommandWebhook ¶
func (s *LayeredStore) CommandWebhook() CommandWebhookStore
func (*LayeredStore) Compliance ¶
func (s *LayeredStore) Compliance() ComplianceStore
func (*LayeredStore) DropAllTables ¶
func (s *LayeredStore) DropAllTables()
func (*LayeredStore) Emoji ¶
func (s *LayeredStore) Emoji() EmojiStore
func (*LayeredStore) FileInfo ¶
func (s *LayeredStore) FileInfo() FileInfoStore
func (*LayeredStore) Group ¶
func (s *LayeredStore) Group() GroupStore
func (*LayeredStore) Job ¶
func (s *LayeredStore) Job() JobStore
func (*LayeredStore) License ¶
func (s *LayeredStore) License() LicenseStore
func (*LayeredStore) LinkMetadata ¶
func (s *LayeredStore) LinkMetadata() LinkMetadataStore
func (*LayeredStore) LockToMaster ¶
func (s *LayeredStore) LockToMaster()
func (*LayeredStore) MarkSystemRanUnitTests ¶
func (s *LayeredStore) MarkSystemRanUnitTests()
func (*LayeredStore) OAuth ¶
func (s *LayeredStore) OAuth() OAuthStore
func (*LayeredStore) Plugin ¶
func (s *LayeredStore) Plugin() PluginStore
func (*LayeredStore) Post ¶
func (s *LayeredStore) Post() PostStore
func (*LayeredStore) Preference ¶
func (s *LayeredStore) Preference() PreferenceStore
func (*LayeredStore) Reaction ¶
func (s *LayeredStore) Reaction() ReactionStore
func (*LayeredStore) Role ¶
func (s *LayeredStore) Role() RoleStore
func (*LayeredStore) RunQuery ¶
func (s *LayeredStore) RunQuery(queryFunction QueryFunction) StoreChannel
func (*LayeredStore) Scheme ¶
func (s *LayeredStore) Scheme() SchemeStore
func (*LayeredStore) Session ¶
func (s *LayeredStore) Session() SessionStore
func (*LayeredStore) Status ¶
func (s *LayeredStore) Status() StatusStore
func (*LayeredStore) System ¶
func (s *LayeredStore) System() SystemStore
func (*LayeredStore) Task ¶
func (s *LayeredStore) Task() TaskStore
func (*LayeredStore) Team ¶
func (s *LayeredStore) Team() TeamStore
func (*LayeredStore) TermsOfService ¶
func (s *LayeredStore) TermsOfService() TermsOfServiceStore
func (*LayeredStore) Token ¶
func (s *LayeredStore) Token() TokenStore
func (*LayeredStore) TotalMasterDbConnections ¶
func (s *LayeredStore) TotalMasterDbConnections() int
func (*LayeredStore) TotalReadDbConnections ¶
func (s *LayeredStore) TotalReadDbConnections() int
func (*LayeredStore) TotalSearchDbConnections ¶
func (s *LayeredStore) TotalSearchDbConnections() int
func (*LayeredStore) UnlockFromMaster ¶
func (s *LayeredStore) UnlockFromMaster()
func (*LayeredStore) User ¶
func (s *LayeredStore) User() UserStore
func (*LayeredStore) UserAccessToken ¶
func (s *LayeredStore) UserAccessToken() UserAccessTokenStore
func (*LayeredStore) UserTermsOfService ¶
func (s *LayeredStore) UserTermsOfService() UserTermsOfServiceStore
func (*LayeredStore) Webhook ¶
func (s *LayeredStore) Webhook() WebhookStore
type LayeredStoreDatabaseLayer ¶
type LayeredStoreDatabaseLayer interface { LayeredStoreSupplier Store }
type LayeredStoreHint ¶
type LayeredStoreHint int
const ( LSH_NO_CACHE LayeredStoreHint = iota LSH_MASTER_ONLY )
type LayeredStoreSupplier ¶
type LayeredStoreSupplier interface { // // Control // SetChainNext(LayeredStoreSupplier) Next() LayeredStoreSupplier // // Reactions //), hints ...LayeredStoreHint) ReactionSave(ctx context.Context, reaction *model.Reaction, hints ...LayeredStoreHint) (*model.Reaction, *model.AppError) ReactionDelete(ctx context.Context, reaction *model.Reaction, hints ...LayeredStoreHint) (*model.Reaction, *model.AppError) ReactionGetForPost(ctx context.Context, postId string, hints ...LayeredStoreHint) ([]*model.Reaction, *model.AppError) ReactionDeleteAllWithEmojiName(ctx context.Context, emojiName string, hints ...LayeredStoreHint) *model.AppError ReactionPermanentDeleteBatch(ctx context.Context, endTime int64, limit int64, hints ...LayeredStoreHint) (int64, *model.AppError) ReactionsBulkGetForPosts(ctx context.Context, postIds []string, hints ...LayeredStoreHint) ([]*model.Reaction, *model.AppError) // Roles RoleSave(ctx context.Context, role *model.Role, hints ...LayeredStoreHint) (*model.Role, *model.AppError) RoleGet(ctx context.Context, roleId string, hints ...LayeredStoreHint) (*model.Role, *model.AppError) RoleGetAll(ctx context.Context, hints ...LayeredStoreHint) ([]*model.Role, *model.AppError) RoleGetByName(ctx context.Context, name string, hints ...LayeredStoreHint) (*model.Role, *model.AppError) RoleGetByNames(ctx context.Context, names []string, hints ...LayeredStoreHint) ([]*model.Role, *model.AppError) RoleDelete(ctx context.Context, roldId string, hints ...LayeredStoreHint) (*model.Role, *model.AppError) RolePermanentDeleteAll(ctx context.Context, hints ...LayeredStoreHint) *model.AppError // Schemes SchemeSave(ctx context.Context, scheme *model.Scheme, hints ...LayeredStoreHint) *LayeredStoreSupplierResult SchemeGet(ctx context.Context, schemeId string, hints ...LayeredStoreHint) *LayeredStoreSupplierResult SchemeGetByName(ctx context.Context, schemeName string, hints ...LayeredStoreHint) *LayeredStoreSupplierResult SchemeDelete(ctx context.Context, schemeId string, hints ...LayeredStoreHint) *LayeredStoreSupplierResult SchemeGetAllPage(ctx context.Context, scope string, offset int, limit int, hints ...LayeredStoreHint) *LayeredStoreSupplierResult SchemePermanentDeleteAll(ctx context.Context, hints ...LayeredStoreHint) *LayeredStoreSupplierResult }
type LayeredStoreSupplierResult ¶
type LayeredStoreSupplierResult struct {
StoreResult
}
func NewSupplierResult ¶
func NewSupplierResult() *LayeredStoreSupplierResult
type LicenseStore ¶
type LicenseStore interface { Save(license *model.LicenseRecord) (*model.LicenseRecord, *model.AppError) Get(id string) (*model.LicenseRecord, *model.AppError) }
type LinkMetadataStore ¶
type LinkMetadataStore interface { Save(linkMetadata *model.LinkMetadata) (*model.LinkMetadata, *model.AppError) Get(url string, timestamp int64) (*model.LinkMetadata, *model.AppError) }
type LocalCacheSupplier ¶
type LocalCacheSupplier struct {
// contains filtered or unexported fields
}
func NewLocalCacheSupplier ¶
func NewLocalCacheSupplier(metrics einterfaces.MetricsInterface, cluster einterfaces.ClusterInterface) *LocalCacheSupplier
func (*LocalCacheSupplier) Invalidate ¶
func (s *LocalCacheSupplier) Invalidate()
func (*LocalCacheSupplier) Next ¶
func (s *LocalCacheSupplier) Next() LayeredStoreSupplier
func (*LocalCacheSupplier) ReactionDelete ¶
func (s *LocalCacheSupplier) ReactionDelete(ctx context.Context, reaction *model.Reaction, hints ...LayeredStoreHint) (*model.Reaction, *model.AppError)
func (*LocalCacheSupplier) ReactionDeleteAllWithEmojiName ¶
func (s *LocalCacheSupplier) ReactionDeleteAllWithEmojiName(ctx context.Context, emojiName string, hints ...LayeredStoreHint) *model.AppError
func (*LocalCacheSupplier) ReactionGetForPost ¶
func (s *LocalCacheSupplier) ReactionGetForPost(ctx context.Context, postId string, hints ...LayeredStoreHint) ([]*model.Reaction, *model.AppError)
func (*LocalCacheSupplier) ReactionPermanentDeleteBatch ¶
func (s *LocalCacheSupplier) ReactionPermanentDeleteBatch(ctx context.Context, endTime int64, limit int64, hints ...LayeredStoreHint) (int64, *model.AppError)
func (*LocalCacheSupplier) ReactionSave ¶
func (s *LocalCacheSupplier) ReactionSave(ctx context.Context, reaction *model.Reaction, hints ...LayeredStoreHint) (*model.Reaction, *model.AppError)
func (*LocalCacheSupplier) ReactionsBulkGetForPosts ¶
func (s *LocalCacheSupplier) ReactionsBulkGetForPosts(ctx context.Context, postIds []string, hints ...LayeredStoreHint) ([]*model.Reaction, *model.AppError)
func (*LocalCacheSupplier) RoleDelete ¶
func (s *LocalCacheSupplier) RoleDelete(ctx context.Context, roleId string, hints ...LayeredStoreHint) (*model.Role, *model.AppError)
func (*LocalCacheSupplier) RoleGet ¶
func (s *LocalCacheSupplier) RoleGet(ctx context.Context, roleId string, hints ...LayeredStoreHint) (*model.Role, *model.AppError)
func (*LocalCacheSupplier) RoleGetAll ¶
func (s *LocalCacheSupplier) RoleGetAll(ctx context.Context, hints ...LayeredStoreHint) ([]*model.Role, *model.AppError)
func (*LocalCacheSupplier) RoleGetByName ¶
func (s *LocalCacheSupplier) RoleGetByName(ctx context.Context, name string, hints ...LayeredStoreHint) (*model.Role, *model.AppError)
func (*LocalCacheSupplier) RoleGetByNames ¶
func (s *LocalCacheSupplier) RoleGetByNames(ctx context.Context, roleNames []string, hints ...LayeredStoreHint) ([]*model.Role, *model.AppError)
func (*LocalCacheSupplier) RolePermanentDeleteAll ¶
func (s *LocalCacheSupplier) RolePermanentDeleteAll(ctx context.Context, hints ...LayeredStoreHint) *model.AppError
func (*LocalCacheSupplier) RoleSave ¶
func (s *LocalCacheSupplier) RoleSave(ctx context.Context, role *model.Role, hints ...LayeredStoreHint) (*model.Role, *model.AppError)
func (*LocalCacheSupplier) SchemeDelete ¶
func (s *LocalCacheSupplier) SchemeDelete(ctx context.Context, schemeId string, hints ...LayeredStoreHint) *LayeredStoreSupplierResult
func (*LocalCacheSupplier) SchemeGet ¶
func (s *LocalCacheSupplier) SchemeGet(ctx context.Context, schemeId string, hints ...LayeredStoreHint) *LayeredStoreSupplierResult
func (*LocalCacheSupplier) SchemeGetAllPage ¶
func (s *LocalCacheSupplier) SchemeGetAllPage(ctx context.Context, scope string, offset int, limit int, hints ...LayeredStoreHint) *LayeredStoreSupplierResult
func (*LocalCacheSupplier) SchemeGetByName ¶
func (s *LocalCacheSupplier) SchemeGetByName(ctx context.Context, schemeName string, hints ...LayeredStoreHint) *LayeredStoreSupplierResult
func (*LocalCacheSupplier) SchemePermanentDeleteAll ¶
func (s *LocalCacheSupplier) SchemePermanentDeleteAll(ctx context.Context, hints ...LayeredStoreHint) *LayeredStoreSupplierResult
func (*LocalCacheSupplier) SchemeSave ¶
func (s *LocalCacheSupplier) SchemeSave(ctx context.Context, scheme *model.Scheme, hints ...LayeredStoreHint) *LayeredStoreSupplierResult
func (*LocalCacheSupplier) SetChainNext ¶
func (s *LocalCacheSupplier) SetChainNext(next LayeredStoreSupplier)
type OAuthStore ¶
type OAuthStore interface { SaveApp(app *model.OAuthApp) (*model.OAuthApp, *model.AppError) UpdateApp(app *model.OAuthApp) (*model.OAuthApp, *model.AppError) GetApp(id string) (*model.OAuthApp, *model.AppError) GetAppByUser(userId string, offset, limit int) ([]*model.OAuthApp, *model.AppError) GetApps(offset, limit int) ([]*model.OAuthApp, *model.AppError) GetAuthorizedApps(userId string, offset, limit int) ([]*model.OAuthApp, *model.AppError) DeleteApp(id string) *model.AppError SaveAuthData(authData *model.AuthData) (*model.AuthData, *model.AppError) GetAuthData(code string) (*model.AuthData, *model.AppError) RemoveAuthData(code string) *model.AppError PermanentDeleteAuthDataByUser(userId string) *model.AppError SaveAccessData(accessData *model.AccessData) (*model.AccessData, *model.AppError) UpdateAccessData(accessData *model.AccessData) (*model.AccessData, *model.AppError) GetAccessData(token string) (*model.AccessData, *model.AppError) GetAccessDataByUserForApp(userId, clientId string) ([]*model.AccessData, *model.AppError) GetAccessDataByRefreshToken(token string) (*model.AccessData, *model.AppError) GetPreviousAccessData(userId, clientId string) (*model.AccessData, *model.AppError) RemoveAccessData(token string) *model.AppError RemoveAllAccessData() *model.AppError }
type ObjectCache ¶
type ObjectCache interface { AddWithExpiresInSecs(key, value interface{}, expireAtSecs int64) AddWithDefaultExpires(key, value interface{}) Purge() Get(key interface{}) (value interface{}, ok bool) Remove(key interface{}) Len() int Name() string GetInvalidateClusterEvent() string }
Caching Interface
type PluginStore ¶
type PluginStore interface { SaveOrUpdate(keyVal *model.PluginKeyValue) StoreChannel CompareAndSet(keyVal *model.PluginKeyValue, oldValue []byte) (bool, *model.AppError) Get(pluginId, key string) StoreChannel Delete(pluginId, key string) StoreChannel DeleteAllForPlugin(PluginId string) StoreChannel DeleteAllExpired() StoreChannel List(pluginId string, page, perPage int) StoreChannel }
type PostStore ¶
type PostStore interface { Save(post *model.Post) (*model.Post, *model.AppError) Update(newPost *model.Post, oldPost *model.Post) (*model.Post, *model.AppError) SelectByMessage(message string) (*model.Post, *model.AppError) Get(id string) (*model.PostList, *model.AppError) GetSingle(id string) (*model.Post, *model.AppError) Delete(postId string, time int64, deleteByID string) *model.AppError PermanentDeleteByUser(userId string) *model.AppError PermanentDeleteByChannel(channelId string) *model.AppError GetPosts(channelId string, offset int, limit int, allowFromCache bool) (*model.PostList, *model.AppError) GetFlaggedPosts(userId string, offset int, limit int) (*model.PostList, *model.AppError) GetFlaggedPostsForTeam(userId, teamId string, offset int, limit int) (*model.PostList, *model.AppError) GetFlaggedPostsForChannel(userId, channelId string, offset int, limit int) (*model.PostList, *model.AppError) GetPostsBefore(channelId string, postId string, numPosts int, offset int) (*model.PostList, *model.AppError) GetPostsAfter(channelId string, postId string, numPosts int, offset int) (*model.PostList, *model.AppError) GetPostsSince(channelId string, time int64, allowFromCache bool) (*model.PostList, *model.AppError) GetEtag(channelId string, allowFromCache bool) string Search(teamId string, userId string, params *model.SearchParams) StoreChannel AnalyticsUserCountsWithPostsByDay(teamId string) (model.AnalyticsRows, *model.AppError) AnalyticsPostCountsByDay(teamId string) (model.AnalyticsRows, *model.AppError) AnalyticsPostCount(teamId string, mustHaveFile bool, mustHaveHashtag bool) (int64, *model.AppError) ClearCaches() InvalidateLastPostTimeCache(channelId string) GetPostsCreatedAt(channelId string, time int64) ([]*model.Post, *model.AppError) Overwrite(post *model.Post) (*model.Post, *model.AppError) GetPostsByIds(postIds []string) ([]*model.Post, *model.AppError) GetPostsBatchForIndexing(startTime int64, endTime int64, limit int) ([]*model.PostForIndexing, *model.AppError) PermanentDeleteBatch(endTime int64, limit int64) (int64, *model.AppError) GetOldest() (*model.Post, *model.AppError) GetMaxPostSize() int GetParentsForExportAfter(limit int, afterId string) ([]*model.PostForExport, *model.AppError) GetRepliesForExport(parentId string) ([]*model.ReplyForExport, *model.AppError) GetDirectPostParentsForExportAfter(limit int, afterId string) ([]*model.DirectPostForExport, *model.AppError) }
type PreferenceStore ¶
type PreferenceStore interface { Save(preferences *model.Preferences) *model.AppError GetCategory(userId string, category string) (model.Preferences, *model.AppError) Get(userId string, category string, name string) (*model.Preference, *model.AppError) GetAll(userId string) (model.Preferences, *model.AppError) Delete(userId, category, name string) *model.AppError DeleteCategory(userId string, category string) *model.AppError DeleteCategoryAndName(category string, name string) *model.AppError PermanentDeleteByUser(userId string) *model.AppError IsFeatureEnabled(feature, userId string) (bool, *model.AppError) CleanupFlagsBatch(limit int64) (int64, *model.AppError) }
type QueryFunction ¶
type QueryFunction func(LayeredStoreSupplier) *LayeredStoreSupplierResult
type ReactionStore ¶
type ReactionStore interface { Save(reaction *model.Reaction) (*model.Reaction, *model.AppError) Delete(reaction *model.Reaction) (*model.Reaction, *model.AppError) GetForPost(postId string, allowFromCache bool) ([]*model.Reaction, *model.AppError) DeleteAllWithEmojiName(emojiName string) *model.AppError PermanentDeleteBatch(endTime int64, limit int64) (int64, *model.AppError) BulkGetForPosts(postIds []string) ([]*model.Reaction, *model.AppError) }
type RedisSupplier ¶
type RedisSupplier struct {
// contains filtered or unexported fields
}
func NewRedisSupplier ¶
func NewRedisSupplier() *RedisSupplier
func (*RedisSupplier) Next ¶
func (s *RedisSupplier) Next() LayeredStoreSupplier
func (*RedisSupplier) ReactionDelete ¶
func (s *RedisSupplier) ReactionDelete(ctx context.Context, reaction *model.Reaction, hints ...LayeredStoreHint) (*model.Reaction, *model.AppError)
func (*RedisSupplier) ReactionDeleteAllWithEmojiName ¶
func (s *RedisSupplier) ReactionDeleteAllWithEmojiName(ctx context.Context, emojiName string, hints ...LayeredStoreHint) *model.AppError
func (*RedisSupplier) ReactionGetForPost ¶
func (s *RedisSupplier) ReactionGetForPost(ctx context.Context, postId string, hints ...LayeredStoreHint) ([]*model.Reaction, *model.AppError)
func (*RedisSupplier) ReactionPermanentDeleteBatch ¶
func (s *RedisSupplier) ReactionPermanentDeleteBatch(ctx context.Context, endTime int64, limit int64, hints ...LayeredStoreHint) (int64, *model.AppError)
func (*RedisSupplier) ReactionSave ¶
func (s *RedisSupplier) ReactionSave(ctx context.Context, reaction *model.Reaction, hints ...LayeredStoreHint) (*model.Reaction, *model.AppError)
func (*RedisSupplier) ReactionsBulkGetForPosts ¶
func (s *RedisSupplier) ReactionsBulkGetForPosts(ctx context.Context, postIds []string, hints ...LayeredStoreHint) ([]*model.Reaction, *model.AppError)
func (*RedisSupplier) RoleDelete ¶
func (s *RedisSupplier) RoleDelete(ctx context.Context, roleId string, hints ...LayeredStoreHint) (*model.Role, *model.AppError)
func (*RedisSupplier) RoleGet ¶
func (s *RedisSupplier) RoleGet(ctx context.Context, roleId string, hints ...LayeredStoreHint) (*model.Role, *model.AppError)
func (*RedisSupplier) RoleGetAll ¶
func (s *RedisSupplier) RoleGetAll(ctx context.Context, hints ...LayeredStoreHint) ([]*model.Role, *model.AppError)
func (*RedisSupplier) RoleGetByName ¶
func (s *RedisSupplier) RoleGetByName(ctx context.Context, name string, hints ...LayeredStoreHint) (*model.Role, *model.AppError)
func (*RedisSupplier) RoleGetByNames ¶
func (s *RedisSupplier) RoleGetByNames(ctx context.Context, roleNames []string, hints ...LayeredStoreHint) ([]*model.Role, *model.AppError)
func (*RedisSupplier) RolePermanentDeleteAll ¶
func (s *RedisSupplier) RolePermanentDeleteAll(ctx context.Context, hints ...LayeredStoreHint) *model.AppError
func (*RedisSupplier) RoleSave ¶
func (s *RedisSupplier) RoleSave(ctx context.Context, role *model.Role, hints ...LayeredStoreHint) (*model.Role, *model.AppError)
func (*RedisSupplier) SchemeDelete ¶
func (s *RedisSupplier) SchemeDelete(ctx context.Context, schemeId string, hints ...LayeredStoreHint) *LayeredStoreSupplierResult
func (*RedisSupplier) SchemeGet ¶
func (s *RedisSupplier) SchemeGet(ctx context.Context, schemeId string, hints ...LayeredStoreHint) *LayeredStoreSupplierResult
func (*RedisSupplier) SchemeGetAllPage ¶
func (s *RedisSupplier) SchemeGetAllPage(ctx context.Context, scope string, offset int, limit int, hints ...LayeredStoreHint) *LayeredStoreSupplierResult
func (*RedisSupplier) SchemeGetByName ¶
func (s *RedisSupplier) SchemeGetByName(ctx context.Context, schemeName string, hints ...LayeredStoreHint) *LayeredStoreSupplierResult
func (*RedisSupplier) SchemePermanentDeleteAll ¶
func (s *RedisSupplier) SchemePermanentDeleteAll(ctx context.Context, hints ...LayeredStoreHint) *LayeredStoreSupplierResult
func (*RedisSupplier) SchemeSave ¶
func (s *RedisSupplier) SchemeSave(ctx context.Context, scheme *model.Scheme, hints ...LayeredStoreHint) *LayeredStoreSupplierResult
func (*RedisSupplier) SetChainNext ¶
func (s *RedisSupplier) SetChainNext(next LayeredStoreSupplier)
type RoleStore ¶
type RoleStore interface { Save(role *model.Role) (*model.Role, *model.AppError) Get(roleId string) (*model.Role, *model.AppError) GetAll() ([]*model.Role, *model.AppError) GetByName(name string) (*model.Role, *model.AppError) GetByNames(names []string) ([]*model.Role, *model.AppError) Delete(roldId string) (*model.Role, *model.AppError) PermanentDeleteAll() *model.AppError }
type SchemeStore ¶
type SchemeStore interface { Save(scheme *model.Scheme) StoreChannel Get(schemeId string) StoreChannel GetByName(schemeName string) StoreChannel GetAllPage(scope string, offset int, limit int) StoreChannel Delete(schemeId string) StoreChannel PermanentDeleteAll() StoreChannel }
type SessionStore ¶
type SessionStore interface { Get(sessionIdOrToken string) (*model.Session, *model.AppError) Save(session *model.Session) (*model.Session, *model.AppError) GetSessions(userId string) ([]*model.Session, *model.AppError) GetSessionsWithActiveDeviceIds(userId string) ([]*model.Session, *model.AppError) Remove(sessionIdOrToken string) *model.AppError RemoveAllSessions() *model.AppError PermanentDeleteSessionsByUser(teamId string) *model.AppError UpdateLastActivityAt(sessionId string, time int64) *model.AppError UpdateRoles(userId string, roles string) (string, *model.AppError) UpdateDeviceId(id string, deviceId string, expiresAt int64) (string, *model.AppError) AnalyticsSessionCount() (int64, *model.AppError) Cleanup(expiryTime int64, batchSize int64) }
type StatusStore ¶
type StatusStore interface { SaveOrUpdate(status *model.Status) *model.AppError Get(userId string) (*model.Status, *model.AppError) GetByIds(userIds []string) ([]*model.Status, *model.AppError) GetOnlineAway() ([]*model.Status, *model.AppError) GetOnline() ([]*model.Status, *model.AppError) GetAllFromTeam(teamId string) ([]*model.Status, *model.AppError) ResetAll() *model.AppError GetTotalActiveUsersCount() (int64, *model.AppError) UpdateLastActivityAt(userId string, lastActivityAt int64) StoreChannel }
type Store ¶
type Store interface { Team() TeamStore Channel() ChannelStore Post() PostStore User() UserStore Bot() BotStore Task() TaskStore Audit() AuditStore ClusterDiscovery() ClusterDiscoveryStore Compliance() ComplianceStore Session() SessionStore OAuth() OAuthStore System() SystemStore Webhook() WebhookStore Command() CommandStore CommandWebhook() CommandWebhookStore Preference() PreferenceStore License() LicenseStore Token() TokenStore Emoji() EmojiStore Status() StatusStore FileInfo() FileInfoStore Reaction() ReactionStore Role() RoleStore Scheme() SchemeStore Job() JobStore UserAccessToken() UserAccessTokenStore ChannelMemberHistory() ChannelMemberHistoryStore Plugin() PluginStore TermsOfService() TermsOfServiceStore Group() GroupStore UserTermsOfService() UserTermsOfServiceStore LinkMetadata() LinkMetadataStore MarkSystemRanUnitTests() Close() LockToMaster() UnlockFromMaster() DropAllTables() TotalMasterDbConnections() int TotalReadDbConnections() int TotalSearchDbConnections() int }
func NewLayeredStore ¶
func NewLayeredStore(db LayeredStoreDatabaseLayer, metrics einterfaces.MetricsInterface, cluster einterfaces.ClusterInterface) Store
type StoreChannel ¶
type StoreChannel chan StoreResult
func Do ¶
func Do(f func(result *StoreResult)) StoreChannel
type StoreResult ¶
type SystemStore ¶
type SystemStore interface { Save(system *model.System) *model.AppError SaveOrUpdate(system *model.System) *model.AppError Update(system *model.System) *model.AppError Get() (model.StringMap, *model.AppError) GetByName(name string) (*model.System, *model.AppError) PermanentDeleteByName(name string) (*model.System, *model.AppError) }
type TaskStore ¶
type TaskStore interface { Get(taskId string) (*model.Task, *model.AppError) GetAll() ([]*model.Task, *model.AppError) // Save(bot *model.Bot) (*model.Task, *model.AppError) // Update(bot *model.Bot) (*model.Task, *model.AppError) Update(task *model.Task) (*model.Task, *model.AppError) Insert(task *model.Task) (*model.Task, *model.AppError) // PermanentDelete(taskId string) *model.AppError GetAllWithTeamId(teamId string) ([]*model.Task, *model.AppError) }
type TeamStore ¶
type TeamStore interface { Save(team *model.Team) (*model.Team, *model.AppError) Update(team *model.Team) (*model.Team, *model.AppError) UpdateDisplayName(name string, teamId string) *model.AppError Get(id string) (*model.Team, *model.AppError) GetByName(name string) (*model.Team, *model.AppError) SearchByName(name string) ([]*model.Team, *model.AppError) SearchAll(term string) ([]*model.Team, *model.AppError) SearchOpen(term string) ([]*model.Team, *model.AppError) SearchPrivate(term string) ([]*model.Team, *model.AppError) GetAll() ([]*model.Team, *model.AppError) GetAllPage(offset int, limit int) ([]*model.Team, *model.AppError) GetAllPrivateTeamListing() StoreChannel GetAllPrivateTeamPageListing(offset int, limit int) ([]*model.Team, *model.AppError) GetAllTeamListing() StoreChannel GetAllTeamPageListing(offset int, limit int) ([]*model.Team, *model.AppError) GetTeamsByUserId(userId string) StoreChannel GetByInviteId(inviteId string) (*model.Team, *model.AppError) PermanentDelete(teamId string) *model.AppError AnalyticsTeamCount() (int64, *model.AppError) SaveMember(member *model.TeamMember, maxUsersPerTeam int) StoreChannel UpdateMember(member *model.TeamMember) (*model.TeamMember, *model.AppError) GetMember(teamId string, userId string) (*model.TeamMember, *model.AppError) GetMembers(teamId string, offset int, limit int, restrictions *model.ViewUsersRestrictions) ([]*model.TeamMember, *model.AppError) GetMembersByIds(teamId string, userIds []string, restrictions *model.ViewUsersRestrictions) ([]*model.TeamMember, *model.AppError) GetTotalMemberCount(teamId string) (int64, *model.AppError) GetActiveMemberCount(teamId string) (int64, *model.AppError) GetTeamsForUser(userId string) ([]*model.TeamMember, *model.AppError) GetTeamsForUserWithPagination(userId string, page, perPage int) ([]*model.TeamMember, *model.AppError) GetChannelUnreadsForAllTeams(excludeTeamId, userId string) ([]*model.ChannelUnread, *model.AppError) GetChannelUnreadsForTeam(teamId, userId string) ([]*model.ChannelUnread, *model.AppError) RemoveMember(teamId string, userId string) StoreChannel RemoveAllMembersByTeam(teamId string) StoreChannel RemoveAllMembersByUser(userId string) StoreChannel UpdateLastTeamIconUpdate(teamId string, curTime int64) StoreChannel GetTeamsByScheme(schemeId string, offset int, limit int) StoreChannel MigrateTeamMembers(fromTeamId string, fromUserId string) StoreChannel ResetAllTeamSchemes() StoreChannel ClearAllCustomRoleAssignments() StoreChannel AnalyticsGetTeamCountForScheme(schemeId string) StoreChannel GetAllForExportAfter(limit int, afterId string) StoreChannel GetTeamMembersForExport(userId string) StoreChannel UserBelongsToTeams(userId string, teamIds []string) StoreChannel GetUserTeamIds(userId string, allowFromCache bool) StoreChannel InvalidateAllTeamIdsForUser(userId string) ClearCaches() }
type TermsOfServiceStore ¶
type TermsOfServiceStore interface { Save(termsOfService *model.TermsOfService) StoreChannel GetLatest(allowFromCache bool) StoreChannel Get(id string, allowFromCache bool) StoreChannel }
type TokenStore ¶
type UserAccessTokenStore ¶
type UserAccessTokenStore interface { Save(token *model.UserAccessToken) (*model.UserAccessToken, *model.AppError) DeleteAllForUser(userId string) *model.AppError Delete(tokenId string) *model.AppError Get(tokenId string) (*model.UserAccessToken, *model.AppError) GetAll(offset int, limit int) ([]*model.UserAccessToken, *model.AppError) GetByToken(tokenString string) (*model.UserAccessToken, *model.AppError) GetByUser(userId string, page, perPage int) ([]*model.UserAccessToken, *model.AppError) Search(term string) ([]*model.UserAccessToken, *model.AppError) UpdateTokenEnable(tokenId string) *model.AppError UpdateTokenDisable(tokenId string) *model.AppError }
type UserGetByIdsOpts ¶
type UserGetByIdsOpts struct { // IsAdmin tracks whether or not the request is being made by an administrator. Does nothing when provided by a client. IsAdmin bool // Restrict to search in a list of teams and channels. Does nothing when provided by a client. ViewRestrictions *model.ViewUsersRestrictions // Since filters the users based on their UpdateAt timestamp. Since int64 }
type UserStore ¶
type UserStore interface { Save(user *model.User) StoreChannel Update(user *model.User, allowRoleUpdate bool) (*model.UserUpdate, *model.AppError) UpdateLastPictureUpdate(userId string) StoreChannel ResetLastPictureUpdate(userId string) *model.AppError UpdateUpdateAt(userId string) StoreChannel UpdatePassword(userId, newPassword string) StoreChannel UpdateAuthData(userId string, service string, authData *string, email string, resetMfa bool) (string, *model.AppError) UpdateMfaSecret(userId, secret string) StoreChannel UpdateMfaActive(userId string, active bool) StoreChannel Get(id string) (*model.User, *model.AppError) GetAll() StoreChannel ClearCaches() InvalidateProfilesInChannelCacheByUser(userId string) InvalidateProfilesInChannelCache(channelId string) GetProfilesInChannel(channelId string, offset int, limit int) StoreChannel GetProfilesInChannelByStatus(channelId string, offset int, limit int) StoreChannel GetAllProfilesInChannel(channelId string, allowFromCache bool) StoreChannel GetProfilesNotInChannel(teamId string, channelId string, groupConstrained bool, offset int, limit int, viewRestrictions *model.ViewUsersRestrictions) StoreChannel GetProfilesWithoutTeam(offset int, limit int, viewRestrictions *model.ViewUsersRestrictions) StoreChannel GetProfilesByUsernames(usernames []string, viewRestrictions *model.ViewUsersRestrictions) StoreChannel GetAllProfiles(options *model.UserGetOptions) StoreChannel GetProfiles(options *model.UserGetOptions) StoreChannel GetProfileByIds(userIds []string, options *UserGetByIdsOpts, allowFromCache bool) StoreChannel GetProfileByGroupChannelIdsForUser(userId string, channelIds []string) (map[string][]*model.User, *model.AppError) InvalidatProfileCacheForUser(userId string) GetByEmail(email string) (*model.User, *model.AppError) GetByAuth(authData *string, authService string) (*model.User, *model.AppError) GetAllUsingAuthService(authService string) ([]*model.User, *model.AppError) GetByUsername(username string) StoreChannel GetForLogin(loginId string, allowSignInWithUsername, allowSignInWithEmail bool) StoreChannel VerifyEmail(userId, email string) (string, *model.AppError) GetEtagForAllProfiles() StoreChannel GetEtagForProfiles(teamId string) StoreChannel UpdateFailedPasswordAttempts(userId string, attempts int) StoreChannel GetSystemAdminProfiles() StoreChannel PermanentDelete(userId string) *model.AppError AnalyticsActiveCount(time int64) StoreChannel GetUnreadCount(userId string) (int64, error) GetUnreadCountForChannel(userId string, channelId string) StoreChannel GetAnyUnreadPostCountForChannel(userId string, channelId string) (int64, *model.AppError) GetRecentlyActiveUsersForTeam(teamId string, offset, limit int, viewRestrictions *model.ViewUsersRestrictions) ([]*model.User, *model.AppError) GetNewUsersForTeam(teamId string, offset, limit int, viewRestrictions *model.ViewUsersRestrictions) ([]*model.User, *model.AppError) Search(teamId string, term string, options *model.UserSearchOptions) ([]*model.User, *model.AppError) SearchNotInTeam(notInTeamId string, term string, options *model.UserSearchOptions) ([]*model.User, *model.AppError) SearchInChannel(channelId string, term string, options *model.UserSearchOptions) ([]*model.User, *model.AppError) SearchNotInChannel(teamId string, channelId string, term string, options *model.UserSearchOptions) StoreChannel SearchWithoutTeam(term string, options *model.UserSearchOptions) ([]*model.User, *model.AppError) AnalyticsGetInactiveUsersCount() (int64, *model.AppError) AnalyticsGetSystemAdminCount() StoreChannel GetProfilesNotInTeam(teamId string, groupConstrained bool, offset int, limit int, viewRestrictions *model.ViewUsersRestrictions) StoreChannel GetEtagForProfilesNotInTeam(teamId string) StoreChannel ClearAllCustomRoleAssignments() StoreChannel InferSystemInstallDate() StoreChannel GetAllAfter(limit int, afterId string) ([]*model.User, *model.AppError) GetUsersBatchForIndexing(startTime, endTime int64, limit int) ([]*model.UserForIndexing, *model.AppError) Count(options model.UserCountOptions) (int64, *model.AppError) GetTeamGroupUsers(teamID string) ([]*model.User, *model.AppError) GetChannelGroupUsers(channelID string) ([]*model.User, *model.AppError) }
type UserTermsOfServiceStore ¶
type UserTermsOfServiceStore interface { GetByUser(userId string) StoreChannel Save(userTermsOfService *model.UserTermsOfService) StoreChannel Delete(userId, termsOfServiceId string) StoreChannel }
type WebhookStore ¶
type WebhookStore interface { SaveIncoming(webhook *model.IncomingWebhook) (*model.IncomingWebhook, *model.AppError) GetIncoming(id string, allowFromCache bool) (*model.IncomingWebhook, *model.AppError) GetIncomingList(offset, limit int) ([]*model.IncomingWebhook, *model.AppError) GetIncomingByTeam(teamId string, offset, limit int) ([]*model.IncomingWebhook, *model.AppError) UpdateIncoming(webhook *model.IncomingWebhook) (*model.IncomingWebhook, *model.AppError) GetIncomingByChannel(channelId string) ([]*model.IncomingWebhook, *model.AppError) DeleteIncoming(webhookId string, time int64) *model.AppError PermanentDeleteIncomingByChannel(channelId string) *model.AppError PermanentDeleteIncomingByUser(userId string) *model.AppError SaveOutgoing(webhook *model.OutgoingWebhook) (*model.OutgoingWebhook, *model.AppError) GetOutgoing(id string) (*model.OutgoingWebhook, *model.AppError) GetOutgoingByChannel(channelId string, offset, limit int) ([]*model.OutgoingWebhook, *model.AppError) GetOutgoingList(offset, limit int) ([]*model.OutgoingWebhook, *model.AppError) GetOutgoingByTeam(teamId string, offset, limit int) ([]*model.OutgoingWebhook, *model.AppError) DeleteOutgoing(webhookId string, time int64) *model.AppError PermanentDeleteOutgoingByChannel(channelId string) *model.AppError PermanentDeleteOutgoingByUser(userId string) *model.AppError UpdateOutgoing(hook *model.OutgoingWebhook) (*model.OutgoingWebhook, *model.AppError) AnalyticsIncomingCount(teamId string) (int64, *model.AppError) AnalyticsOutgoingCount(teamId string) (int64, *model.AppError) InvalidateWebhookCache(webhook string) ClearCaches() }
Source Files ¶
- constants.go
- layered_store.go
- layered_store_hints.go
- layered_store_supplier.go
- local_cache_supplier.go
- local_cache_supplier_reactions.go
- local_cache_supplier_roles.go
- local_cache_supplier_schemes.go
- redis_supplier.go
- redis_supplier_reactions.go
- redis_supplier_roles.go
- redis_supplier_schemes.go
- store.go
Click to show internal directories.
Click to hide internal directories.