store

package
v3.6.5+incompatible Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Mar 22, 2017 License: AGPL-3.0, Apache-2.0 Imports: 27 Imported by: 0

Documentation

Index

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"

	ALL_CHANNEL_MEMBERS_FOR_USER_CACHE_SIZE = model.SESSION_CACHE_SIZE
	ALL_CHANNEL_MEMBERS_FOR_USER_CACHE_SEC  = 900 // 15 mins

	CHANNEL_MEMBERS_COUNTS_CACHE_SIZE = model.CHANNEL_CACHE_SIZE
	CHANNEL_MEMBERS_COUNTS_CACHE_SEC  = 1800 // 30 mins

	CHANNEL_CACHE_SEC = 900 // 15 mins
)
View Source
const (
	EMOJI_CACHE_SIZE = 5000
	EMOJI_CACHE_SEC  = 1800 // 30 mins
)
View Source
const (
	FILE_INFO_CACHE_SIZE = 25000
	FILE_INFO_CACHE_SEC  = 1800 // 30 minutes
)
View Source
const (
	LAST_POST_TIME_CACHE_SIZE = 25000
	LAST_POST_TIME_CACHE_SEC  = 900 // 15 minutes

	LAST_POSTS_CACHE_SIZE = 1000
	LAST_POSTS_CACHE_SEC  = 900 // 15 minutes
)
View Source
const (
	INDEX_TYPE_FULL_TEXT = "full_text"
	INDEX_TYPE_DEFAULT   = "default"
	MAX_DB_CONN_LIFETIME = 15
)
View Source
const (
	EXIT_CREATE_TABLE                = 100
	EXIT_DB_OPEN                     = 101
	EXIT_PING                        = 102
	EXIT_NO_DRIVER                   = 103
	EXIT_TABLE_EXISTS                = 104
	EXIT_TABLE_EXISTS_MYSQL          = 105
	EXIT_COLUMN_EXISTS               = 106
	EXIT_DOES_COLUMN_EXISTS_POSTGRES = 107
	EXIT_DOES_COLUMN_EXISTS_MYSQL    = 108
	EXIT_DOES_COLUMN_EXISTS_MISSING  = 109
	EXIT_CREATE_COLUMN_POSTGRES      = 110
	EXIT_CREATE_COLUMN_MYSQL         = 111
	EXIT_CREATE_COLUMN_MISSING       = 112
	EXIT_REMOVE_COLUMN               = 113
	EXIT_RENAME_COLUMN               = 114
	EXIT_MAX_COLUMN                  = 115
	EXIT_ALTER_COLUMN                = 116
	EXIT_CREATE_INDEX_POSTGRES       = 117
	EXIT_CREATE_INDEX_MYSQL          = 118
	EXIT_CREATE_INDEX_FULL_MYSQL     = 119
	EXIT_CREATE_INDEX_MISSING        = 120
	EXIT_REMOVE_INDEX_POSTGRES       = 121
	EXIT_REMOVE_INDEX_MYSQL          = 122
	EXIT_REMOVE_INDEX_MISSING        = 123
)
View Source
const (
	VERSION_3_6_0 = "3.6.0"
	VERSION_3_5_0 = "3.5.0"
	VERSION_3_4_0 = "3.4.0"
	VERSION_3_3_0 = "3.3.0"
	VERSION_3_2_0 = "3.2.0"
	VERSION_3_1_0 = "3.1.0"
	VERSION_3_0_0 = "3.0.0"
)
View Source
const (
	EXIT_VERSION_SAVE_MISSING = 1001
	EXIT_TOO_OLD              = 1002
	EXIT_VERSION_SAVE         = 1003
	EXIT_THEME_MIGRATION      = 1004
)
View Source
const (
	MISSING_ACCOUNT_ERROR                      = "store.sql_user.missing_account.const"
	MISSING_AUTH_ACCOUNT_ERROR                 = "store.sql_user.get_by_auth.missing_account.app_error"
	PROFILES_IN_CHANNEL_CACHE_SIZE             = model.CHANNEL_CACHE_SIZE
	PROFILES_IN_CHANNEL_CACHE_SEC              = 900 // 15 mins
	PROFILE_BY_IDS_CACHE_SIZE                  = model.SESSION_CACHE_SIZE
	PROFILE_BY_IDS_CACHE_SEC                   = 900 // 15 mins
	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"
	USER_SEARCH_TYPE_NAMES_NO_FULL_NAME        = "Username, Nickname"
	USER_SEARCH_TYPE_NAMES                     = "Username, FirstName, LastName, Nickname"
	USER_SEARCH_TYPE_ALL_NO_FULL_NAME          = "Username, Nickname, Email"
	USER_SEARCH_TYPE_ALL                       = "Username, FirstName, LastName, Nickname, Email"
)
View Source
const (
	WEBHOOK_CACHE_SIZE = 25000
	WEBHOOK_CACHE_SEC  = 900 // 15 minutes
)
View Source
const (
	FEATURE_TOGGLE_PREFIX = "feature_enabled_"
)
View Source
const (
	MISSING_STATUS_ERROR = "store.sql_status.get.missing.app_error"
)
View Source
const (
	TEAM_MEMBER_EXISTS_ERROR = "store.sql_team.save_member.exists.app_error"
)
View Source
const (
	// Set HasReactions = true if and only if the post has reactions, update UpdateAt only if HasReactions changes
	UPDATE_POST_HAS_REACTIONS_QUERY = `` /* 270-byte string literal not displayed */

)

Variables

This section is empty.

Functions

func ClearChannelCaches

func ClearChannelCaches()

func ClearFileCaches

func ClearFileCaches()

func ClearPostCaches

func ClearPostCaches()

func ClearUserCaches

func ClearUserCaches()

func ClearWebhookCaches

func ClearWebhookCaches()

func IsUniqueConstraintError

func IsUniqueConstraintError(err string, indexName []string) bool

func Must

func Must(sc StoreChannel) interface{}

func UpgradeDatabase

func UpgradeDatabase(sqlStore *SqlStore)

func UpgradeDatabaseToVersion31

func UpgradeDatabaseToVersion31(sqlStore *SqlStore)

func UpgradeDatabaseToVersion32

func UpgradeDatabaseToVersion32(sqlStore *SqlStore)

func UpgradeDatabaseToVersion33

func UpgradeDatabaseToVersion33(sqlStore *SqlStore)

func UpgradeDatabaseToVersion34

func UpgradeDatabaseToVersion34(sqlStore *SqlStore)

func UpgradeDatabaseToVersion35

func UpgradeDatabaseToVersion35(sqlStore *SqlStore)

func UpgradeDatabaseToVersion36

func UpgradeDatabaseToVersion36(sqlStore *SqlStore)

Types

type AuditStore

type AuditStore interface {
	Save(audit *model.Audit) StoreChannel
	Get(user_id string, limit int) StoreChannel
	PermanentDeleteByUser(userId string) StoreChannel
}

func NewSqlAuditStore

func NewSqlAuditStore(sqlStore *SqlStore) AuditStore

type ChannelStore

type ChannelStore interface {
	Save(channel *model.Channel) StoreChannel
	CreateDirectChannel(userId string, otherUserId string) StoreChannel
	SaveDirectChannel(channel *model.Channel, member1 *model.ChannelMember, member2 *model.ChannelMember) StoreChannel
	Update(channel *model.Channel) StoreChannel
	Get(id string, allowFromCache bool) StoreChannel
	InvalidateChannel(id string)
	InvalidateChannelByName(teamId, name string)
	GetFromMaster(id string) StoreChannel
	Delete(channelId string, time int64) StoreChannel
	SetDeleteAt(channelId string, deleteAt int64, updateAt int64) StoreChannel
	PermanentDeleteByTeam(teamId string) StoreChannel
	GetByName(team_id string, name string, allowFromCache bool) StoreChannel
	GetByNameIncludeDeleted(team_id string, name string, allowFromCache bool) StoreChannel
	GetChannels(teamId string, userId string) StoreChannel
	GetMoreChannels(teamId string, userId string, offset int, limit int) StoreChannel
	GetChannelCounts(teamId string, userId string) StoreChannel
	GetTeamChannels(teamId string) StoreChannel
	GetAll(teamId string) StoreChannel
	GetForPost(postId string) StoreChannel
	SaveMember(member *model.ChannelMember) StoreChannel
	UpdateMember(member *model.ChannelMember) StoreChannel
	GetMembers(channelId string) StoreChannel
	GetMember(channelId string, userId string) StoreChannel
	GetAllChannelMembersForUser(userId string, allowFromCache bool) StoreChannel
	InvalidateAllChannelMembersForUser(userId string)
	IsUserInChannelUseCache(userId string, channelId string) bool
	GetMemberForPost(postId string, userId string) StoreChannel
	InvalidateMemberCount(channelId string)
	GetMemberCountFromCache(channelId string) int64
	GetMemberCount(channelId string, allowFromCache bool) StoreChannel
	RemoveMember(channelId string, userId string) StoreChannel
	PermanentDeleteMembersByUser(userId string) StoreChannel
	UpdateLastViewedAt(channelIds []string, userId string) StoreChannel
	SetLastViewedAt(channelId string, userId string, newLastViewedAt int64) StoreChannel
	IncrementMentionCount(channelId string, userId string) StoreChannel
	AnalyticsTypeCount(teamId string, channelType string) StoreChannel
	ExtraUpdateByUser(userId string, time int64) StoreChannel
	GetMembersForUser(teamId string, userId string) StoreChannel
	SearchInTeam(teamId string, term string) StoreChannel
	SearchMore(userId string, teamId string, term string) StoreChannel
	GetMembersByIds(channelId string, userIds []string) StoreChannel
}

func NewSqlChannelStore

func NewSqlChannelStore(sqlStore *SqlStore) ChannelStore

type CommandStore

type CommandStore interface {
	Save(webhook *model.Command) StoreChannel
	Get(id string) StoreChannel
	GetByTeam(teamId string) StoreChannel
	Delete(commandId string, time int64) StoreChannel
	PermanentDeleteByUser(userId string) StoreChannel
	Update(hook *model.Command) StoreChannel
	AnalyticsCommandCount(teamId string) StoreChannel
}

func NewSqlCommandStore

func NewSqlCommandStore(sqlStore *SqlStore) CommandStore

type ComplianceStore

type ComplianceStore interface {
	Save(compliance *model.Compliance) StoreChannel
	Update(compliance *model.Compliance) StoreChannel
	Get(id string) StoreChannel
	GetAll() StoreChannel
	ComplianceExport(compliance *model.Compliance) StoreChannel
}

func NewSqlComplianceStore

func NewSqlComplianceStore(sqlStore *SqlStore) ComplianceStore

type EmojiStore

type EmojiStore interface {
	Save(emoji *model.Emoji) StoreChannel
	Get(id string, allowFromCache bool) StoreChannel
	GetByName(name string) StoreChannel
	GetAll() StoreChannel
	Delete(id string, time int64) StoreChannel
}

func NewSqlEmojiStore

func NewSqlEmojiStore(sqlStore *SqlStore) EmojiStore

type FileInfoStore

type FileInfoStore interface {
	Save(info *model.FileInfo) StoreChannel
	Get(id string) StoreChannel
	GetByPath(path string) StoreChannel
	GetForPost(postId string, readFromMaster bool, allowFromCache bool) StoreChannel
	InvalidateFileInfosForPostCache(postId string)
	AttachToPost(fileId string, postId string) StoreChannel
	DeleteForPost(postId string) StoreChannel
}

func NewSqlFileInfoStore

func NewSqlFileInfoStore(sqlStore *SqlStore) FileInfoStore

type LicenseStore

type LicenseStore interface {
	Save(license *model.LicenseRecord) StoreChannel
	Get(id string) StoreChannel
}

func NewSqlLicenseStore

func NewSqlLicenseStore(sqlStore *SqlStore) LicenseStore

type OAuthStore

type OAuthStore interface {
	SaveApp(app *model.OAuthApp) StoreChannel
	UpdateApp(app *model.OAuthApp) StoreChannel
	GetApp(id string) StoreChannel
	GetAppByUser(userId string) StoreChannel
	GetApps() StoreChannel
	GetAuthorizedApps(userId string) StoreChannel
	DeleteApp(id string) StoreChannel
	SaveAuthData(authData *model.AuthData) StoreChannel
	GetAuthData(code string) StoreChannel
	RemoveAuthData(code string) StoreChannel
	PermanentDeleteAuthDataByUser(userId string) StoreChannel
	SaveAccessData(accessData *model.AccessData) StoreChannel
	UpdateAccessData(accessData *model.AccessData) StoreChannel
	GetAccessData(token string) StoreChannel
	GetAccessDataByUserForApp(userId, clientId string) StoreChannel
	GetAccessDataByRefreshToken(token string) StoreChannel
	GetPreviousAccessData(userId, clientId string) StoreChannel
	RemoveAccessData(token string) StoreChannel
}

func NewSqlOAuthStore

func NewSqlOAuthStore(sqlStore *SqlStore) OAuthStore

type PasswordRecoveryStore

type PasswordRecoveryStore interface {
	SaveOrUpdate(recovery *model.PasswordRecovery) StoreChannel
	Delete(userId string) StoreChannel
	Get(userId string) StoreChannel
	GetByCode(code string) StoreChannel
}

func NewSqlPasswordRecoveryStore

func NewSqlPasswordRecoveryStore(sqlStore *SqlStore) PasswordRecoveryStore

type PostStore

type PostStore interface {
	Save(post *model.Post) StoreChannel
	Update(newPost *model.Post, oldPost *model.Post) StoreChannel
	Get(id string) StoreChannel
	Delete(postId string, time int64) StoreChannel
	PermanentDeleteByUser(userId string) StoreChannel
	GetPosts(channelId string, offset int, limit int, allowFromCache bool) StoreChannel
	GetFlaggedPosts(userId string, offset int, limit int) StoreChannel
	GetPostsBefore(channelId string, postId string, numPosts int, offset int) StoreChannel
	GetPostsAfter(channelId string, postId string, numPosts int, offset int) StoreChannel
	GetPostsSince(channelId string, time int64, allowFromCache bool) StoreChannel
	GetEtag(channelId string, allowFromCache bool) StoreChannel
	Search(teamId string, userId string, params *model.SearchParams) StoreChannel
	AnalyticsUserCountsWithPostsByDay(teamId string) StoreChannel
	AnalyticsPostCountsByDay(teamId string) StoreChannel
	AnalyticsPostCount(teamId string, mustHaveFile bool, mustHaveHashtag bool) StoreChannel
	InvalidateLastPostTimeCache(channelId string)
}

func NewSqlPostStore

func NewSqlPostStore(sqlStore *SqlStore) PostStore

type PreferenceStore added in v1.2.1

type PreferenceStore interface {
	Save(preferences *model.Preferences) StoreChannel
	Get(userId string, category string, name string) StoreChannel
	GetCategory(userId string, category string) StoreChannel
	GetAll(userId string) StoreChannel
	Delete(userId, category, name string) StoreChannel
	DeleteCategory(userId string, category string) StoreChannel
	PermanentDeleteByUser(userId string) StoreChannel
	IsFeatureEnabled(feature, userId string) StoreChannel
}

func NewSqlPreferenceStore added in v1.2.1

func NewSqlPreferenceStore(sqlStore *SqlStore) PreferenceStore

type ReactionStore

type ReactionStore interface {
	Save(reaction *model.Reaction) StoreChannel
	Delete(reaction *model.Reaction) StoreChannel
	GetForPost(postId string) StoreChannel
	DeleteAllWithEmojiName(emojiName string) StoreChannel
}

func NewSqlReactionStore

func NewSqlReactionStore(sqlStore *SqlStore) ReactionStore

type SessionStore

type SessionStore interface {
	Save(session *model.Session) StoreChannel
	Get(sessionIdOrToken string) StoreChannel
	GetSessions(userId string) StoreChannel
	GetSessionsWithActiveDeviceIds(userId string) StoreChannel
	Remove(sessionIdOrToken string) StoreChannel
	RemoveAllSessions() StoreChannel
	PermanentDeleteSessionsByUser(teamId string) StoreChannel
	UpdateLastActivityAt(sessionId string, time int64) StoreChannel
	UpdateRoles(userId string, roles string) StoreChannel
	UpdateDeviceId(id string, deviceId string, expiresAt int64) StoreChannel
	AnalyticsSessionCount() StoreChannel
}

func NewSqlSessionStore

func NewSqlSessionStore(sqlStore *SqlStore) SessionStore

type SqlAuditStore

type SqlAuditStore struct {
	*SqlStore
}

func (SqlAuditStore) CreateIndexesIfNotExists

func (s SqlAuditStore) CreateIndexesIfNotExists()

func (SqlAuditStore) Get

func (s SqlAuditStore) Get(user_id string, limit int) StoreChannel

func (SqlAuditStore) PermanentDeleteByUser added in v1.3.0

func (s SqlAuditStore) PermanentDeleteByUser(userId string) StoreChannel

func (SqlAuditStore) Save

func (s SqlAuditStore) Save(audit *model.Audit) StoreChannel

type SqlChannelStore

type SqlChannelStore struct {
	*SqlStore
}

func (SqlChannelStore) AnalyticsTypeCount added in v1.2.1

func (s SqlChannelStore) AnalyticsTypeCount(teamId string, channelType string) StoreChannel

func (SqlChannelStore) CreateDirectChannel

func (s SqlChannelStore) CreateDirectChannel(userId string, otherUserId string) StoreChannel

func (SqlChannelStore) CreateIndexesIfNotExists

func (s SqlChannelStore) CreateIndexesIfNotExists()

func (SqlChannelStore) Delete

func (s SqlChannelStore) Delete(channelId string, time int64) StoreChannel

func (SqlChannelStore) ExtraUpdateByUser

func (s SqlChannelStore) ExtraUpdateByUser(userId string, time int64) StoreChannel

func (SqlChannelStore) Get

func (s SqlChannelStore) Get(id string, allowFromCache bool) StoreChannel

func (SqlChannelStore) GetAll

func (s SqlChannelStore) GetAll(teamId string) StoreChannel

func (SqlChannelStore) GetAllChannelMembersForUser

func (s SqlChannelStore) GetAllChannelMembersForUser(userId string, allowFromCache bool) StoreChannel

func (SqlChannelStore) GetByName

func (s SqlChannelStore) GetByName(teamId string, name string, allowFromCache bool) StoreChannel

func (SqlChannelStore) GetByNameIncludeDeleted

func (s SqlChannelStore) GetByNameIncludeDeleted(teamId string, name string, allowFromCache bool) StoreChannel

func (SqlChannelStore) GetChannelCounts

func (s SqlChannelStore) GetChannelCounts(teamId string, userId string) StoreChannel

func (SqlChannelStore) GetChannels

func (s SqlChannelStore) GetChannels(teamId string, userId string) StoreChannel

func (SqlChannelStore) GetForPost

func (s SqlChannelStore) GetForPost(postId string) StoreChannel

func (SqlChannelStore) GetFromMaster added in v1.3.0

func (s SqlChannelStore) GetFromMaster(id string) StoreChannel

func (SqlChannelStore) GetMember

func (s SqlChannelStore) GetMember(channelId string, userId string) StoreChannel

func (SqlChannelStore) GetMemberCount added in v1.3.0

func (s SqlChannelStore) GetMemberCount(channelId string, allowFromCache bool) StoreChannel

func (SqlChannelStore) GetMemberCountFromCache

func (s SqlChannelStore) GetMemberCountFromCache(channelId string) int64

func (SqlChannelStore) GetMemberForPost

func (s SqlChannelStore) GetMemberForPost(postId string, userId string) StoreChannel

func (SqlChannelStore) GetMembers

func (s SqlChannelStore) GetMembers(channelId string) StoreChannel

func (SqlChannelStore) GetMembersByIds

func (s SqlChannelStore) GetMembersByIds(channelId string, userIds []string) StoreChannel

func (SqlChannelStore) GetMembersForUser

func (s SqlChannelStore) GetMembersForUser(teamId string, userId string) StoreChannel

func (SqlChannelStore) GetMoreChannels

func (s SqlChannelStore) GetMoreChannels(teamId string, userId string, offset int, limit int) StoreChannel

func (SqlChannelStore) GetTeamChannels

func (s SqlChannelStore) GetTeamChannels(teamId string) StoreChannel

func (SqlChannelStore) IncrementMentionCount

func (s SqlChannelStore) IncrementMentionCount(channelId string, userId string) StoreChannel

func (SqlChannelStore) InvalidateAllChannelMembersForUser

func (us SqlChannelStore) InvalidateAllChannelMembersForUser(userId string)

func (SqlChannelStore) InvalidateChannel

func (us SqlChannelStore) InvalidateChannel(id string)

func (SqlChannelStore) InvalidateChannelByName

func (us SqlChannelStore) InvalidateChannelByName(teamId, name string)

func (SqlChannelStore) InvalidateMemberCount

func (us SqlChannelStore) InvalidateMemberCount(channelId string)

func (SqlChannelStore) IsUserInChannelUseCache

func (us SqlChannelStore) IsUserInChannelUseCache(userId string, channelId string) bool

func (SqlChannelStore) PermanentDeleteByTeam added in v1.3.0

func (s SqlChannelStore) PermanentDeleteByTeam(teamId string) StoreChannel

func (SqlChannelStore) PermanentDeleteMembersByUser added in v1.3.0

func (s SqlChannelStore) PermanentDeleteMembersByUser(userId string) StoreChannel

func (SqlChannelStore) RemoveMember

func (s SqlChannelStore) RemoveMember(channelId string, userId string) StoreChannel

func (SqlChannelStore) Save

func (s SqlChannelStore) Save(channel *model.Channel) StoreChannel

func (SqlChannelStore) SaveDirectChannel added in v1.2.1

func (s SqlChannelStore) SaveDirectChannel(directchannel *model.Channel, member1 *model.ChannelMember, member2 *model.ChannelMember) StoreChannel

func (SqlChannelStore) SaveMember

func (s SqlChannelStore) SaveMember(member *model.ChannelMember) StoreChannel

func (SqlChannelStore) SearchInTeam

func (s SqlChannelStore) SearchInTeam(teamId string, term string) StoreChannel

func (SqlChannelStore) SearchMore

func (s SqlChannelStore) SearchMore(userId string, teamId string, term string) StoreChannel

func (SqlChannelStore) SetDeleteAt

func (s SqlChannelStore) SetDeleteAt(channelId string, deleteAt int64, updateAt int64) StoreChannel

func (SqlChannelStore) SetLastViewedAt

func (s SqlChannelStore) SetLastViewedAt(channelId string, userId string, newLastViewedAt int64) StoreChannel

func (SqlChannelStore) Update

func (s SqlChannelStore) Update(channel *model.Channel) StoreChannel

func (SqlChannelStore) UpdateLastViewedAt

func (s SqlChannelStore) UpdateLastViewedAt(channelIds []string, userId string) StoreChannel

func (SqlChannelStore) UpdateMember added in v1.1.0

func (s SqlChannelStore) UpdateMember(member *model.ChannelMember) StoreChannel

type SqlCommandStore

type SqlCommandStore struct {
	*SqlStore
}

func (SqlCommandStore) AnalyticsCommandCount

func (s SqlCommandStore) AnalyticsCommandCount(teamId string) StoreChannel

func (SqlCommandStore) CreateIndexesIfNotExists

func (s SqlCommandStore) CreateIndexesIfNotExists()

func (SqlCommandStore) Delete

func (s SqlCommandStore) Delete(commandId string, time int64) StoreChannel

func (SqlCommandStore) Get

func (SqlCommandStore) GetByTeam

func (s SqlCommandStore) GetByTeam(teamId string) StoreChannel

func (SqlCommandStore) PermanentDeleteByUser

func (s SqlCommandStore) PermanentDeleteByUser(userId string) StoreChannel

func (SqlCommandStore) Save

func (s SqlCommandStore) Save(command *model.Command) StoreChannel

func (SqlCommandStore) Update

func (s SqlCommandStore) Update(cmd *model.Command) StoreChannel

type SqlComplianceStore

type SqlComplianceStore struct {
	*SqlStore
}

func (SqlComplianceStore) ComplianceExport

func (s SqlComplianceStore) ComplianceExport(job *model.Compliance) StoreChannel

func (SqlComplianceStore) CreateIndexesIfNotExists

func (s SqlComplianceStore) CreateIndexesIfNotExists()

func (SqlComplianceStore) Get

func (SqlComplianceStore) GetAll

func (s SqlComplianceStore) GetAll() StoreChannel

func (SqlComplianceStore) Save

func (s SqlComplianceStore) Save(compliance *model.Compliance) StoreChannel

func (SqlComplianceStore) Update

func (us SqlComplianceStore) Update(compliance *model.Compliance) StoreChannel

type SqlEmojiStore

type SqlEmojiStore struct {
	*SqlStore
}

func (SqlEmojiStore) CreateIndexesIfNotExists

func (es SqlEmojiStore) CreateIndexesIfNotExists()

func (SqlEmojiStore) Delete

func (es SqlEmojiStore) Delete(id string, time int64) StoreChannel

func (SqlEmojiStore) Get

func (es SqlEmojiStore) Get(id string, allowFromCache bool) StoreChannel

func (SqlEmojiStore) GetAll

func (es SqlEmojiStore) GetAll() StoreChannel

func (SqlEmojiStore) GetByName

func (es SqlEmojiStore) GetByName(name string) StoreChannel

func (SqlEmojiStore) Save

func (es SqlEmojiStore) Save(emoji *model.Emoji) StoreChannel

type SqlFileInfoStore

type SqlFileInfoStore struct {
	*SqlStore
}

func (SqlFileInfoStore) AttachToPost

func (fs SqlFileInfoStore) AttachToPost(fileId, postId string) StoreChannel

func (SqlFileInfoStore) CreateIndexesIfNotExists

func (fs SqlFileInfoStore) CreateIndexesIfNotExists()

func (SqlFileInfoStore) DeleteForPost

func (fs SqlFileInfoStore) DeleteForPost(postId string) StoreChannel

func (SqlFileInfoStore) Get

func (SqlFileInfoStore) GetByPath

func (fs SqlFileInfoStore) GetByPath(path string) StoreChannel

func (SqlFileInfoStore) GetForPost

func (fs SqlFileInfoStore) GetForPost(postId string, readFromMaster bool, allowFromCache bool) StoreChannel

func (SqlFileInfoStore) InvalidateFileInfosForPostCache

func (s SqlFileInfoStore) InvalidateFileInfosForPostCache(postId string)

func (SqlFileInfoStore) Save

type SqlLicenseStore

type SqlLicenseStore struct {
	*SqlStore
}

func (SqlLicenseStore) CreateIndexesIfNotExists

func (ls SqlLicenseStore) CreateIndexesIfNotExists()

func (SqlLicenseStore) Get

func (ls SqlLicenseStore) Get(id string) StoreChannel

func (SqlLicenseStore) Save

func (ls SqlLicenseStore) Save(license *model.LicenseRecord) StoreChannel

type SqlOAuthStore

type SqlOAuthStore struct {
	*SqlStore
}

func (SqlOAuthStore) CreateIndexesIfNotExists

func (as SqlOAuthStore) CreateIndexesIfNotExists()

func (SqlOAuthStore) DeleteApp

func (as SqlOAuthStore) DeleteApp(id string) StoreChannel

func (SqlOAuthStore) GetAccessData

func (as SqlOAuthStore) GetAccessData(token string) StoreChannel

func (SqlOAuthStore) GetAccessDataByRefreshToken

func (as SqlOAuthStore) GetAccessDataByRefreshToken(token string) StoreChannel

func (SqlOAuthStore) GetAccessDataByUserForApp

func (as SqlOAuthStore) GetAccessDataByUserForApp(userId, clientId string) StoreChannel

func (SqlOAuthStore) GetApp

func (as SqlOAuthStore) GetApp(id string) StoreChannel

func (SqlOAuthStore) GetAppByUser

func (as SqlOAuthStore) GetAppByUser(userId string) StoreChannel

func (SqlOAuthStore) GetApps

func (as SqlOAuthStore) GetApps() StoreChannel

func (SqlOAuthStore) GetAuthData

func (as SqlOAuthStore) GetAuthData(code string) StoreChannel

func (SqlOAuthStore) GetAuthorizedApps

func (as SqlOAuthStore) GetAuthorizedApps(userId string) StoreChannel

func (SqlOAuthStore) GetPreviousAccessData

func (as SqlOAuthStore) GetPreviousAccessData(userId, clientId string) StoreChannel

func (SqlOAuthStore) PermanentDeleteAuthDataByUser added in v1.3.0

func (as SqlOAuthStore) PermanentDeleteAuthDataByUser(userId string) StoreChannel

func (SqlOAuthStore) RemoveAccessData

func (as SqlOAuthStore) RemoveAccessData(token string) StoreChannel

func (SqlOAuthStore) RemoveAuthData

func (as SqlOAuthStore) RemoveAuthData(code string) StoreChannel

func (SqlOAuthStore) SaveAccessData

func (as SqlOAuthStore) SaveAccessData(accessData *model.AccessData) StoreChannel

func (SqlOAuthStore) SaveApp

func (as SqlOAuthStore) SaveApp(app *model.OAuthApp) StoreChannel

func (SqlOAuthStore) SaveAuthData

func (as SqlOAuthStore) SaveAuthData(authData *model.AuthData) StoreChannel

func (SqlOAuthStore) UpdateAccessData

func (as SqlOAuthStore) UpdateAccessData(accessData *model.AccessData) StoreChannel

func (SqlOAuthStore) UpdateApp

func (as SqlOAuthStore) UpdateApp(app *model.OAuthApp) StoreChannel

type SqlPasswordRecoveryStore

type SqlPasswordRecoveryStore struct {
	*SqlStore
}

func (SqlPasswordRecoveryStore) CreateIndexesIfNotExists

func (s SqlPasswordRecoveryStore) CreateIndexesIfNotExists()

func (SqlPasswordRecoveryStore) Delete

func (s SqlPasswordRecoveryStore) Delete(userId string) StoreChannel

func (SqlPasswordRecoveryStore) Get

func (SqlPasswordRecoveryStore) GetByCode

func (s SqlPasswordRecoveryStore) GetByCode(code string) StoreChannel

func (SqlPasswordRecoveryStore) SaveOrUpdate

func (s SqlPasswordRecoveryStore) SaveOrUpdate(recovery *model.PasswordRecovery) StoreChannel

type SqlPostStore

type SqlPostStore struct {
	*SqlStore
}

func (SqlPostStore) AnalyticsPostCount added in v1.2.1

func (s SqlPostStore) AnalyticsPostCount(teamId string, mustHaveFile bool, mustHaveHashtag bool) StoreChannel

func (SqlPostStore) AnalyticsPostCountsByDay added in v1.2.1

func (s SqlPostStore) AnalyticsPostCountsByDay(teamId string) StoreChannel

func (SqlPostStore) AnalyticsUserCountsWithPostsByDay added in v1.2.1

func (s SqlPostStore) AnalyticsUserCountsWithPostsByDay(teamId string) StoreChannel

func (SqlPostStore) CreateIndexesIfNotExists

func (s SqlPostStore) CreateIndexesIfNotExists()

func (SqlPostStore) Delete

func (s SqlPostStore) Delete(postId string, time int64) StoreChannel

func (SqlPostStore) Get

func (s SqlPostStore) Get(id string) StoreChannel

func (SqlPostStore) GetEtag

func (s SqlPostStore) GetEtag(channelId string, allowFromCache bool) StoreChannel

func (SqlPostStore) GetFlaggedPosts

func (s SqlPostStore) GetFlaggedPosts(userId string, offset int, limit int) StoreChannel

func (SqlPostStore) GetPosts

func (s SqlPostStore) GetPosts(channelId string, offset int, limit int, allowFromCache bool) StoreChannel

func (SqlPostStore) GetPostsAfter added in v1.2.1

func (s SqlPostStore) GetPostsAfter(channelId string, postId string, numPosts int, offset int) StoreChannel

func (SqlPostStore) GetPostsBefore added in v1.2.1

func (s SqlPostStore) GetPostsBefore(channelId string, postId string, numPosts int, offset int) StoreChannel

func (SqlPostStore) GetPostsSince

func (s SqlPostStore) GetPostsSince(channelId string, time int64, allowFromCache bool) StoreChannel

func (SqlPostStore) InvalidateLastPostTimeCache

func (s SqlPostStore) InvalidateLastPostTimeCache(channelId string)

func (SqlPostStore) PermanentDeleteByUser added in v1.3.0

func (s SqlPostStore) PermanentDeleteByUser(userId string) StoreChannel

func (SqlPostStore) Save

func (s SqlPostStore) Save(post *model.Post) StoreChannel

func (SqlPostStore) Search

func (s SqlPostStore) Search(teamId string, userId string, params *model.SearchParams) StoreChannel

func (SqlPostStore) Update

func (s SqlPostStore) Update(newPost *model.Post, oldPost *model.Post) StoreChannel

type SqlPreferenceStore added in v1.2.1

type SqlPreferenceStore struct {
	*SqlStore
}

func (SqlPreferenceStore) CreateIndexesIfNotExists added in v1.2.1

func (s SqlPreferenceStore) CreateIndexesIfNotExists()

func (SqlPreferenceStore) Delete

func (s SqlPreferenceStore) Delete(userId, category, name string) StoreChannel

func (SqlPreferenceStore) DeleteCategory

func (s SqlPreferenceStore) DeleteCategory(userId string, category string) StoreChannel

func (SqlPreferenceStore) DeleteUnusedFeatures added in v1.3.0

func (s SqlPreferenceStore) DeleteUnusedFeatures()

func (SqlPreferenceStore) Get added in v1.2.1

func (s SqlPreferenceStore) Get(userId string, category string, name string) StoreChannel

func (SqlPreferenceStore) GetAll added in v1.2.1

func (s SqlPreferenceStore) GetAll(userId string) StoreChannel

func (SqlPreferenceStore) GetCategory added in v1.2.1

func (s SqlPreferenceStore) GetCategory(userId string, category string) StoreChannel

func (SqlPreferenceStore) IsFeatureEnabled added in v1.3.0

func (s SqlPreferenceStore) IsFeatureEnabled(feature, userId string) StoreChannel

func (SqlPreferenceStore) PermanentDeleteByUser added in v1.3.0

func (s SqlPreferenceStore) PermanentDeleteByUser(userId string) StoreChannel

func (SqlPreferenceStore) Save added in v1.2.1

func (s SqlPreferenceStore) Save(preferences *model.Preferences) StoreChannel

type SqlReactionStore

type SqlReactionStore struct {
	*SqlStore
}

func (SqlReactionStore) CreateIndexesIfNotExists

func (s SqlReactionStore) CreateIndexesIfNotExists()

func (SqlReactionStore) Delete

func (s SqlReactionStore) Delete(reaction *model.Reaction) StoreChannel

func (SqlReactionStore) DeleteAllWithEmojiName

func (s SqlReactionStore) DeleteAllWithEmojiName(emojiName string) StoreChannel

func (SqlReactionStore) GetForPost

func (s SqlReactionStore) GetForPost(postId string) StoreChannel

func (SqlReactionStore) Save

func (s SqlReactionStore) Save(reaction *model.Reaction) StoreChannel

type SqlSessionStore

type SqlSessionStore struct {
	*SqlStore
}

func (SqlSessionStore) AnalyticsSessionCount

func (me SqlSessionStore) AnalyticsSessionCount() StoreChannel

func (SqlSessionStore) CleanUpExpiredSessions

func (me SqlSessionStore) CleanUpExpiredSessions(userId string) StoreChannel

func (SqlSessionStore) CreateIndexesIfNotExists

func (me SqlSessionStore) CreateIndexesIfNotExists()

func (SqlSessionStore) Get

func (me SqlSessionStore) Get(sessionIdOrToken string) StoreChannel

func (SqlSessionStore) GetSessions

func (me SqlSessionStore) GetSessions(userId string) StoreChannel

func (SqlSessionStore) GetSessionsWithActiveDeviceIds

func (me SqlSessionStore) GetSessionsWithActiveDeviceIds(userId string) StoreChannel

func (SqlSessionStore) PermanentDeleteSessionsByUser added in v1.3.0

func (me SqlSessionStore) PermanentDeleteSessionsByUser(userId string) StoreChannel

func (SqlSessionStore) Remove

func (me SqlSessionStore) Remove(sessionIdOrToken string) StoreChannel

func (SqlSessionStore) RemoveAllSessions

func (me SqlSessionStore) RemoveAllSessions() StoreChannel

func (SqlSessionStore) Save

func (me SqlSessionStore) Save(session *model.Session) StoreChannel

func (SqlSessionStore) UpdateDeviceId

func (me SqlSessionStore) UpdateDeviceId(id string, deviceId string, expiresAt int64) StoreChannel

func (SqlSessionStore) UpdateLastActivityAt

func (me SqlSessionStore) UpdateLastActivityAt(sessionId string, time int64) StoreChannel

func (SqlSessionStore) UpdateRoles

func (me SqlSessionStore) UpdateRoles(userId, roles string) StoreChannel

type SqlStatusStore

type SqlStatusStore struct {
	*SqlStore
}

func (SqlStatusStore) CreateIndexesIfNotExists

func (s SqlStatusStore) CreateIndexesIfNotExists()

func (SqlStatusStore) Get

func (s SqlStatusStore) Get(userId string) StoreChannel

func (SqlStatusStore) GetAllFromTeam

func (s SqlStatusStore) GetAllFromTeam(teamId string) StoreChannel

func (SqlStatusStore) GetByIds

func (s SqlStatusStore) GetByIds(userIds []string) StoreChannel

func (SqlStatusStore) GetOnline

func (s SqlStatusStore) GetOnline() StoreChannel

func (SqlStatusStore) GetOnlineAway

func (s SqlStatusStore) GetOnlineAway() StoreChannel

func (SqlStatusStore) GetTotalActiveUsersCount

func (s SqlStatusStore) GetTotalActiveUsersCount() StoreChannel

func (SqlStatusStore) ResetAll

func (s SqlStatusStore) ResetAll() StoreChannel

func (SqlStatusStore) SaveOrUpdate

func (s SqlStatusStore) SaveOrUpdate(status *model.Status) StoreChannel

func (SqlStatusStore) UpdateLastActivityAt

func (s SqlStatusStore) UpdateLastActivityAt(userId string, lastActivityAt int64) StoreChannel

type SqlStore

type SqlStore struct {
	SchemaVersion string
	// contains filtered or unexported fields
}

func (*SqlStore) AlterColumnTypeIfExists

func (ss *SqlStore) AlterColumnTypeIfExists(tableName string, columnName string, mySqlColType string, postgresColType string) bool

func (*SqlStore) Audit

func (ss *SqlStore) Audit() AuditStore

func (*SqlStore) Channel

func (ss *SqlStore) Channel() ChannelStore

func (*SqlStore) Close

func (ss *SqlStore) Close()

func (*SqlStore) Command

func (ss *SqlStore) Command() CommandStore

func (*SqlStore) Compliance

func (ss *SqlStore) Compliance() ComplianceStore

func (*SqlStore) CreateColumnIfNotExists

func (ss *SqlStore) CreateColumnIfNotExists(tableName string, columnName string, mySqlColType string, postgresColType string, defaultValue string) bool

func (*SqlStore) CreateFullTextIndexIfNotExists

func (ss *SqlStore) CreateFullTextIndexIfNotExists(indexName string, tableName string, columnName string) bool

func (*SqlStore) CreateIndexIfNotExists

func (ss *SqlStore) CreateIndexIfNotExists(indexName string, tableName string, columnName string) bool

func (*SqlStore) CreateUniqueIndexIfNotExists

func (ss *SqlStore) CreateUniqueIndexIfNotExists(indexName string, tableName string, columnName string) bool

func (*SqlStore) DoesColumnExist

func (ss *SqlStore) DoesColumnExist(tableName string, columnName string) bool

func (*SqlStore) DoesTableExist

func (ss *SqlStore) DoesTableExist(tableName string) bool

func (*SqlStore) DropAllTables

func (ss *SqlStore) DropAllTables()

func (*SqlStore) Emoji

func (ss *SqlStore) Emoji() EmojiStore

func (*SqlStore) FileInfo

func (ss *SqlStore) FileInfo() FileInfoStore

func (*SqlStore) GetAllConns

func (ss *SqlStore) GetAllConns() []*gorp.DbMap

func (*SqlStore) GetCurrentSchemaVersion

func (ss *SqlStore) GetCurrentSchemaVersion() string

func (*SqlStore) GetMaster

func (ss *SqlStore) GetMaster() *gorp.DbMap

func (*SqlStore) GetMaxLengthOfColumnIfExists

func (ss *SqlStore) GetMaxLengthOfColumnIfExists(tableName string, columnName string) string

func (*SqlStore) GetReplica

func (ss *SqlStore) GetReplica() *gorp.DbMap

func (*SqlStore) License

func (ss *SqlStore) License() LicenseStore

func (*SqlStore) MarkSystemRanUnitTests added in v1.2.1

func (ss *SqlStore) MarkSystemRanUnitTests()

func (*SqlStore) OAuth

func (ss *SqlStore) OAuth() OAuthStore

func (*SqlStore) PasswordRecovery

func (ss *SqlStore) PasswordRecovery() PasswordRecoveryStore

func (*SqlStore) Post

func (ss *SqlStore) Post() PostStore

func (*SqlStore) Preference added in v1.2.1

func (ss *SqlStore) Preference() PreferenceStore

func (*SqlStore) Reaction

func (ss *SqlStore) Reaction() ReactionStore

func (*SqlStore) RemoveColumnIfExists

func (ss *SqlStore) RemoveColumnIfExists(tableName string, columnName string) bool

func (*SqlStore) RemoveIndexIfExists

func (ss *SqlStore) RemoveIndexIfExists(indexName string, tableName string) bool

func (*SqlStore) RenameColumnIfExists added in v1.2.1

func (ss *SqlStore) RenameColumnIfExists(tableName string, oldColumnName string, newColumnName string, colType string) bool

func (*SqlStore) Session

func (ss *SqlStore) Session() SessionStore

func (*SqlStore) Status

func (ss *SqlStore) Status() StatusStore

func (*SqlStore) System

func (ss *SqlStore) System() SystemStore

func (*SqlStore) Team

func (ss *SqlStore) Team() TeamStore

func (*SqlStore) TotalMasterDbConnections

func (ss *SqlStore) TotalMasterDbConnections() int

func (*SqlStore) TotalReadDbConnections

func (ss *SqlStore) TotalReadDbConnections() int

func (*SqlStore) User

func (ss *SqlStore) User() UserStore

func (*SqlStore) Webhook

func (ss *SqlStore) Webhook() WebhookStore

type SqlSystemStore

type SqlSystemStore struct {
	*SqlStore
}

func (SqlSystemStore) CreateIndexesIfNotExists

func (s SqlSystemStore) CreateIndexesIfNotExists()

func (SqlSystemStore) Get

func (s SqlSystemStore) Get() StoreChannel

func (SqlSystemStore) GetByName

func (s SqlSystemStore) GetByName(name string) StoreChannel

func (SqlSystemStore) Save

func (s SqlSystemStore) Save(system *model.System) StoreChannel

func (SqlSystemStore) SaveOrUpdate

func (s SqlSystemStore) SaveOrUpdate(system *model.System) StoreChannel

func (SqlSystemStore) Update

func (s SqlSystemStore) Update(system *model.System) StoreChannel

type SqlTeamStore

type SqlTeamStore struct {
	*SqlStore
}

func (SqlTeamStore) AnalyticsTeamCount

func (s SqlTeamStore) AnalyticsTeamCount() StoreChannel

func (SqlTeamStore) CreateIndexesIfNotExists

func (s SqlTeamStore) CreateIndexesIfNotExists()

func (SqlTeamStore) Get

func (s SqlTeamStore) Get(id string) StoreChannel

func (SqlTeamStore) GetActiveMemberCount

func (s SqlTeamStore) GetActiveMemberCount(teamId string) StoreChannel

func (SqlTeamStore) GetAll

func (s SqlTeamStore) GetAll() StoreChannel

func (SqlTeamStore) GetAllTeamListing added in v1.2.1

func (s SqlTeamStore) GetAllTeamListing() StoreChannel

func (SqlTeamStore) GetByInviteId added in v1.2.1

func (s SqlTeamStore) GetByInviteId(inviteId string) StoreChannel

func (SqlTeamStore) GetByName

func (s SqlTeamStore) GetByName(name string) StoreChannel

func (SqlTeamStore) GetMember

func (s SqlTeamStore) GetMember(teamId string, userId string) StoreChannel

func (SqlTeamStore) GetMembers

func (s SqlTeamStore) GetMembers(teamId string, offset int, limit int) StoreChannel

func (SqlTeamStore) GetMembersByIds

func (s SqlTeamStore) GetMembersByIds(teamId string, userIds []string) StoreChannel

func (SqlTeamStore) GetTeamsByUserId

func (s SqlTeamStore) GetTeamsByUserId(userId string) StoreChannel

func (SqlTeamStore) GetTeamsForUser

func (s SqlTeamStore) GetTeamsForUser(userId string) StoreChannel

func (SqlTeamStore) GetTeamsUnreadForUser

func (s SqlTeamStore) GetTeamsUnreadForUser(teamId, userId string) StoreChannel

func (SqlTeamStore) GetTotalMemberCount

func (s SqlTeamStore) GetTotalMemberCount(teamId string) StoreChannel

func (SqlTeamStore) PermanentDelete added in v1.3.0

func (s SqlTeamStore) PermanentDelete(teamId string) StoreChannel

func (SqlTeamStore) RemoveAllMembersByTeam

func (s SqlTeamStore) RemoveAllMembersByTeam(teamId string) StoreChannel

func (SqlTeamStore) RemoveAllMembersByUser

func (s SqlTeamStore) RemoveAllMembersByUser(userId string) StoreChannel

func (SqlTeamStore) RemoveMember

func (s SqlTeamStore) RemoveMember(teamId string, userId string) StoreChannel

func (SqlTeamStore) Save

func (s SqlTeamStore) Save(team *model.Team) StoreChannel

func (SqlTeamStore) SaveMember

func (s SqlTeamStore) SaveMember(member *model.TeamMember) StoreChannel

func (SqlTeamStore) Update

func (s SqlTeamStore) Update(team *model.Team) StoreChannel

func (SqlTeamStore) UpdateDisplayName

func (s SqlTeamStore) UpdateDisplayName(name string, teamId string) StoreChannel

func (SqlTeamStore) UpdateMember

func (s SqlTeamStore) UpdateMember(member *model.TeamMember) StoreChannel

type SqlUserStore

type SqlUserStore struct {
	*SqlStore
}

func (SqlUserStore) AnalyticsUniqueUserCount

func (us SqlUserStore) AnalyticsUniqueUserCount(teamId string) StoreChannel

func (SqlUserStore) CreateIndexesIfNotExists

func (us SqlUserStore) CreateIndexesIfNotExists()

func (SqlUserStore) Get

func (us SqlUserStore) Get(id string) StoreChannel

func (SqlUserStore) GetAll

func (us SqlUserStore) GetAll() StoreChannel

func (SqlUserStore) GetAllProfiles

func (us SqlUserStore) GetAllProfiles(offset int, limit int) StoreChannel

func (SqlUserStore) GetAllUsingAuthService

func (us SqlUserStore) GetAllUsingAuthService(authService string) StoreChannel

func (SqlUserStore) GetByAuth

func (us SqlUserStore) GetByAuth(authData *string, authService string) StoreChannel

func (SqlUserStore) GetByEmail

func (us SqlUserStore) GetByEmail(email string) StoreChannel

func (SqlUserStore) GetByUsername

func (us SqlUserStore) GetByUsername(username string) StoreChannel

func (SqlUserStore) GetEtagForAllProfiles

func (s SqlUserStore) GetEtagForAllProfiles() StoreChannel

func (SqlUserStore) GetEtagForDirectProfiles

func (s SqlUserStore) GetEtagForDirectProfiles(userId string) StoreChannel

func (SqlUserStore) GetEtagForProfiles

func (s SqlUserStore) GetEtagForProfiles(teamId string) StoreChannel

func (SqlUserStore) GetForLogin

func (us SqlUserStore) GetForLogin(loginId string, allowSignInWithUsername, allowSignInWithEmail, ldapEnabled bool) StoreChannel

func (SqlUserStore) GetProfileByIds

func (us SqlUserStore) GetProfileByIds(userIds []string, allowFromCache bool) StoreChannel

func (SqlUserStore) GetProfiles

func (us SqlUserStore) GetProfiles(teamId string, offset int, limit int) StoreChannel

func (SqlUserStore) GetProfilesByUsernames

func (us SqlUserStore) GetProfilesByUsernames(usernames []string, teamId string) StoreChannel

func (SqlUserStore) GetProfilesInChannel

func (us SqlUserStore) GetProfilesInChannel(channelId string, offset int, limit int, allowFromCache bool) StoreChannel

func (SqlUserStore) GetProfilesNotInChannel

func (us SqlUserStore) GetProfilesNotInChannel(teamId string, channelId string, offset int, limit int) StoreChannel

func (SqlUserStore) GetRecentlyActiveUsersForTeam

func (us SqlUserStore) GetRecentlyActiveUsersForTeam(teamId string) StoreChannel

func (SqlUserStore) GetSystemAdminProfiles added in v1.1.0

func (us SqlUserStore) GetSystemAdminProfiles() StoreChannel

func (SqlUserStore) GetTotalUsersCount

func (us SqlUserStore) GetTotalUsersCount() StoreChannel

func (SqlUserStore) GetUnreadCount

func (us SqlUserStore) GetUnreadCount(userId string) StoreChannel

func (SqlUserStore) GetUnreadCountForChannel

func (us SqlUserStore) GetUnreadCountForChannel(userId string, channelId string) StoreChannel

func (SqlUserStore) InvalidatProfileCacheForUser

func (us SqlUserStore) InvalidatProfileCacheForUser(userId string)

func (SqlUserStore) InvalidateProfilesInChannelCache

func (us SqlUserStore) InvalidateProfilesInChannelCache(channelId string)

func (SqlUserStore) InvalidateProfilesInChannelCacheByUser

func (us SqlUserStore) InvalidateProfilesInChannelCacheByUser(userId string)

func (SqlUserStore) PermanentDelete added in v1.3.0

func (us SqlUserStore) PermanentDelete(userId string) StoreChannel

func (SqlUserStore) Save

func (us SqlUserStore) Save(user *model.User) StoreChannel

func (SqlUserStore) Search

func (us SqlUserStore) Search(teamId string, term string, options map[string]bool) StoreChannel

func (SqlUserStore) SearchInChannel

func (us SqlUserStore) SearchInChannel(channelId string, term string, options map[string]bool) StoreChannel

func (SqlUserStore) SearchNotInChannel

func (us SqlUserStore) SearchNotInChannel(teamId string, channelId string, term string, options map[string]bool) StoreChannel

func (SqlUserStore) Update

func (us SqlUserStore) Update(user *model.User, trustedUpdateData bool) StoreChannel

func (SqlUserStore) UpdateAuthData added in v1.4.0

func (us SqlUserStore) UpdateAuthData(userId string, service string, authData *string, email string, resetMfa bool) StoreChannel

func (SqlUserStore) UpdateFailedPasswordAttempts

func (us SqlUserStore) UpdateFailedPasswordAttempts(userId string, attempts int) StoreChannel

func (SqlUserStore) UpdateLastPictureUpdate

func (us SqlUserStore) UpdateLastPictureUpdate(userId string) StoreChannel

func (SqlUserStore) UpdateMfaActive

func (us SqlUserStore) UpdateMfaActive(userId string, active bool) StoreChannel

func (SqlUserStore) UpdateMfaSecret

func (us SqlUserStore) UpdateMfaSecret(userId, secret string) StoreChannel

func (SqlUserStore) UpdatePassword

func (us SqlUserStore) UpdatePassword(userId, hashedPassword string) StoreChannel

func (SqlUserStore) UpdateUpdateAt

func (us SqlUserStore) UpdateUpdateAt(userId string) StoreChannel

func (SqlUserStore) VerifyEmail

func (us SqlUserStore) VerifyEmail(userId string) StoreChannel

type SqlWebhookStore

type SqlWebhookStore struct {
	*SqlStore
}

func (SqlWebhookStore) AnalyticsIncomingCount

func (s SqlWebhookStore) AnalyticsIncomingCount(teamId string) StoreChannel

func (SqlWebhookStore) AnalyticsOutgoingCount

func (s SqlWebhookStore) AnalyticsOutgoingCount(teamId string) StoreChannel

func (SqlWebhookStore) CreateIndexesIfNotExists

func (s SqlWebhookStore) CreateIndexesIfNotExists()

func (SqlWebhookStore) DeleteIncoming

func (s SqlWebhookStore) DeleteIncoming(webhookId string, time int64) StoreChannel

func (SqlWebhookStore) DeleteOutgoing added in v1.2.1

func (s SqlWebhookStore) DeleteOutgoing(webhookId string, time int64) StoreChannel

func (SqlWebhookStore) GetIncoming

func (s SqlWebhookStore) GetIncoming(id string, allowFromCache bool) StoreChannel

func (SqlWebhookStore) GetIncomingByChannel added in v1.2.1

func (s SqlWebhookStore) GetIncomingByChannel(channelId string) StoreChannel

func (SqlWebhookStore) GetIncomingByTeam

func (s SqlWebhookStore) GetIncomingByTeam(teamId string) StoreChannel

func (SqlWebhookStore) GetOutgoing added in v1.2.1

func (s SqlWebhookStore) GetOutgoing(id string) StoreChannel

func (SqlWebhookStore) GetOutgoingByChannel added in v1.2.1

func (s SqlWebhookStore) GetOutgoingByChannel(channelId string) StoreChannel

func (SqlWebhookStore) GetOutgoingByTeam added in v1.2.1

func (s SqlWebhookStore) GetOutgoingByTeam(teamId string) StoreChannel

func (SqlWebhookStore) InvalidateWebhookCache

func (s SqlWebhookStore) InvalidateWebhookCache(webhookId string)

func (SqlWebhookStore) PermanentDeleteIncomingByUser added in v1.3.0

func (s SqlWebhookStore) PermanentDeleteIncomingByUser(userId string) StoreChannel

func (SqlWebhookStore) PermanentDeleteOutgoingByUser added in v1.3.0

func (s SqlWebhookStore) PermanentDeleteOutgoingByUser(userId string) StoreChannel

func (SqlWebhookStore) SaveIncoming

func (s SqlWebhookStore) SaveIncoming(webhook *model.IncomingWebhook) StoreChannel

func (SqlWebhookStore) SaveOutgoing added in v1.2.1

func (s SqlWebhookStore) SaveOutgoing(webhook *model.OutgoingWebhook) StoreChannel

func (SqlWebhookStore) UpdateOutgoing added in v1.2.1

func (s SqlWebhookStore) UpdateOutgoing(hook *model.OutgoingWebhook) StoreChannel

type StatusStore

type StatusStore interface {
	SaveOrUpdate(status *model.Status) StoreChannel
	Get(userId string) StoreChannel
	GetByIds(userIds []string) StoreChannel
	GetOnlineAway() StoreChannel
	GetOnline() StoreChannel
	GetAllFromTeam(teamId string) StoreChannel
	ResetAll() StoreChannel
	GetTotalActiveUsersCount() StoreChannel
	UpdateLastActivityAt(userId string, lastActivityAt int64) StoreChannel
}

func NewSqlStatusStore

func NewSqlStatusStore(sqlStore *SqlStore) StatusStore

type Store

type Store interface {
	Team() TeamStore
	Channel() ChannelStore
	Post() PostStore
	User() UserStore
	Audit() AuditStore
	Compliance() ComplianceStore
	Session() SessionStore
	OAuth() OAuthStore
	System() SystemStore
	Webhook() WebhookStore
	Command() CommandStore
	Preference() PreferenceStore
	License() LicenseStore
	PasswordRecovery() PasswordRecoveryStore
	Emoji() EmojiStore
	Status() StatusStore
	FileInfo() FileInfoStore
	Reaction() ReactionStore
	MarkSystemRanUnitTests()
	Close()
	DropAllTables()
	TotalMasterDbConnections() int
	TotalReadDbConnections() int
}

func NewSqlStore

func NewSqlStore() Store

type StoreChannel

type StoreChannel chan StoreResult

type StoreResult

type StoreResult struct {
	Data interface{}
	Err  *model.AppError
}

type SystemStore

type SystemStore interface {
	Save(system *model.System) StoreChannel
	SaveOrUpdate(system *model.System) StoreChannel
	Update(system *model.System) StoreChannel
	Get() StoreChannel
	GetByName(name string) StoreChannel
}

func NewSqlSystemStore

func NewSqlSystemStore(sqlStore *SqlStore) SystemStore

type TeamStore

type TeamStore interface {
	Save(team *model.Team) StoreChannel
	Update(team *model.Team) StoreChannel
	UpdateDisplayName(name string, teamId string) StoreChannel
	Get(id string) StoreChannel
	GetByName(name string) StoreChannel
	GetAll() StoreChannel
	GetAllTeamListing() StoreChannel
	GetTeamsByUserId(userId string) StoreChannel
	GetByInviteId(inviteId string) StoreChannel
	PermanentDelete(teamId string) StoreChannel
	AnalyticsTeamCount() StoreChannel
	SaveMember(member *model.TeamMember) StoreChannel
	UpdateMember(member *model.TeamMember) StoreChannel
	GetMember(teamId string, userId string) StoreChannel
	GetMembers(teamId string, offset int, limit int) StoreChannel
	GetMembersByIds(teamId string, userIds []string) StoreChannel
	GetTotalMemberCount(teamId string) StoreChannel
	GetActiveMemberCount(teamId string) StoreChannel
	GetTeamsForUser(userId string) StoreChannel
	GetTeamsUnreadForUser(teamId, userId string) StoreChannel
	RemoveMember(teamId string, userId string) StoreChannel
	RemoveAllMembersByTeam(teamId string) StoreChannel
	RemoveAllMembersByUser(userId string) StoreChannel
}

func NewSqlTeamStore

func NewSqlTeamStore(sqlStore *SqlStore) TeamStore

type UserStore

type UserStore interface {
	Save(user *model.User) StoreChannel
	Update(user *model.User, allowRoleUpdate bool) StoreChannel
	UpdateLastPictureUpdate(userId string) StoreChannel
	UpdateUpdateAt(userId string) StoreChannel
	UpdatePassword(userId, newPassword string) StoreChannel
	UpdateAuthData(userId string, service string, authData *string, email string, resetMfa bool) StoreChannel
	UpdateMfaSecret(userId, secret string) StoreChannel
	UpdateMfaActive(userId string, active bool) StoreChannel
	Get(id string) StoreChannel
	GetAll() StoreChannel
	InvalidateProfilesInChannelCacheByUser(userId string)
	InvalidateProfilesInChannelCache(channelId string)
	GetProfilesInChannel(channelId string, offset int, limit int, allowFromCache bool) StoreChannel
	GetProfilesNotInChannel(teamId string, channelId string, offset int, limit int) StoreChannel
	GetProfilesByUsernames(usernames []string, teamId string) StoreChannel
	GetAllProfiles(offset int, limit int) StoreChannel
	GetProfiles(teamId string, offset int, limit int) StoreChannel
	GetProfileByIds(userId []string, allowFromCache bool) StoreChannel
	InvalidatProfileCacheForUser(userId string)
	GetByEmail(email string) StoreChannel
	GetByAuth(authData *string, authService string) StoreChannel
	GetAllUsingAuthService(authService string) StoreChannel
	GetByUsername(username string) StoreChannel
	GetForLogin(loginId string, allowSignInWithUsername, allowSignInWithEmail, ldapEnabled bool) StoreChannel
	VerifyEmail(userId string) StoreChannel
	GetEtagForAllProfiles() StoreChannel
	GetEtagForProfiles(teamId string) StoreChannel
	UpdateFailedPasswordAttempts(userId string, attempts int) StoreChannel
	GetTotalUsersCount() StoreChannel
	GetSystemAdminProfiles() StoreChannel
	PermanentDelete(userId string) StoreChannel
	AnalyticsUniqueUserCount(teamId string) StoreChannel
	GetUnreadCount(userId string) StoreChannel
	GetUnreadCountForChannel(userId string, channelId string) StoreChannel
	GetRecentlyActiveUsersForTeam(teamId string) StoreChannel
	Search(teamId string, term string, options map[string]bool) StoreChannel
	SearchInChannel(channelId string, term string, options map[string]bool) StoreChannel
	SearchNotInChannel(teamId string, channelId string, term string, options map[string]bool) StoreChannel
}

func NewSqlUserStore

func NewSqlUserStore(sqlStore *SqlStore) UserStore

type UserWithLastActivityAt

type UserWithLastActivityAt struct {
	model.User
	LastActivityAt int64
}

type WebhookStore

type WebhookStore interface {
	SaveIncoming(webhook *model.IncomingWebhook) StoreChannel
	GetIncoming(id string, allowFromCache bool) StoreChannel
	GetIncomingByTeam(teamId string) StoreChannel
	GetIncomingByChannel(channelId string) StoreChannel
	DeleteIncoming(webhookId string, time int64) StoreChannel
	PermanentDeleteIncomingByUser(userId string) StoreChannel
	SaveOutgoing(webhook *model.OutgoingWebhook) StoreChannel
	GetOutgoing(id string) StoreChannel
	GetOutgoingByChannel(channelId string) StoreChannel
	GetOutgoingByTeam(teamId string) StoreChannel
	DeleteOutgoing(webhookId string, time int64) StoreChannel
	PermanentDeleteOutgoingByUser(userId string) StoreChannel
	UpdateOutgoing(hook *model.OutgoingWebhook) StoreChannel
	AnalyticsIncomingCount(teamId string) StoreChannel
	AnalyticsOutgoingCount(teamId string) StoreChannel
	InvalidateWebhookCache(webhook string)
}

func NewSqlWebhookStore

func NewSqlWebhookStore(sqlStore *SqlStore) WebhookStore

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL