store

package
v2.0.0+incompatible Latest Latest
Warning

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

Go to latest
Published: Feb 13, 2016 License: AGPL-3.0, Apache-2.0 Imports: 25 Imported by: 0

Documentation

Index

Constants

View Source
const (
	INDEX_TYPE_FULL_TEXT = "full_text"
	INDEX_TYPE_DEFAULT   = "default"
)
View Source
const (
	FEATURE_TOGGLE_PREFIX = "feature_enabled_"
)
View Source
const (
	MISSING_ACCOUNT_ERROR = "store.sql_user.missing_account.const"
)

Variables

This section is empty.

Functions

func IsUniqueConstraintError added in v1.0.0

func IsUniqueConstraintError(err string, mysql string, postgres string) bool

func Must added in v1.0.0

func Must(sc StoreChannel) interface{}

Types

type AuditStore

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

func NewSqlAuditStore added in v1.0.0

func NewSqlAuditStore(sqlStore *SqlStore) AuditStore

type ChannelStore

type ChannelStore interface {
	Save(channel *model.Channel) StoreChannel
	SaveDirectChannel(channel *model.Channel, member1 *model.ChannelMember, member2 *model.ChannelMember) StoreChannel
	Update(channel *model.Channel) StoreChannel
	Get(id string) StoreChannel
	GetFromMaster(id string) StoreChannel
	Delete(channelId string, time int64) StoreChannel
	PermanentDeleteByTeam(teamId string) StoreChannel
	GetByName(team_id string, domain string) StoreChannel
	GetChannels(teamId string, userId string) StoreChannel
	GetMoreChannels(teamId string, userId string) StoreChannel
	GetChannelCounts(teamId string, userId string) StoreChannel
	GetForExport(teamId string) StoreChannel

	SaveMember(member *model.ChannelMember) StoreChannel
	UpdateMember(member *model.ChannelMember) StoreChannel
	GetMembers(channelId string) StoreChannel
	GetMember(channelId string, userId string) StoreChannel
	GetMemberCount(channelId string) StoreChannel
	RemoveMember(channelId string, userId string) StoreChannel
	PermanentDeleteMembersByUser(userId string) StoreChannel
	GetExtraMembers(channelId string, limit int) StoreChannel
	CheckPermissionsTo(teamId string, channelId string, userId string) StoreChannel
	CheckOpenChannelPermissions(teamId string, channelId string) StoreChannel
	CheckPermissionsToByName(teamId string, channelName string, userId string) StoreChannel
	UpdateLastViewedAt(channelId string, userId string) StoreChannel
	IncrementMentionCount(channelId string, userId string) StoreChannel
	AnalyticsTypeCount(teamId string, channelType string) StoreChannel
}

func NewSqlChannelStore added in v1.0.0

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
}

func NewSqlCommandStore

func NewSqlCommandStore(sqlStore *SqlStore) CommandStore

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
	SaveAuthData(authData *model.AuthData) StoreChannel
	GetAuthData(code string) StoreChannel
	RemoveAuthData(code string) StoreChannel
	PermanentDeleteAuthDataByUser(userId string) StoreChannel
	SaveAccessData(accessData *model.AccessData) StoreChannel
	GetAccessData(token string) StoreChannel
	GetAccessDataByAuthCode(authCode string) StoreChannel
	RemoveAccessData(token string) StoreChannel
}

func NewSqlOAuthStore added in v1.0.0

func NewSqlOAuthStore(sqlStore *SqlStore) OAuthStore

type PostStore

type PostStore interface {
	Save(post *model.Post) StoreChannel
	Update(post *model.Post, newMessage string, newHashtags string) StoreChannel
	Get(id string) StoreChannel
	Delete(postId string, time int64) StoreChannel
	PermanentDeleteByUser(userId string) StoreChannel
	GetPosts(channelId 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) StoreChannel
	GetEtag(channelId string) StoreChannel
	Search(teamId string, userId string, params *model.SearchParams) StoreChannel
	GetForExport(channelId string) StoreChannel
	AnalyticsUserCountsWithPostsByDay(teamId string) StoreChannel
	AnalyticsPostCountsByDay(teamId string) StoreChannel
	AnalyticsPostCount(teamId string, mustHaveFile bool, mustHaveHashtag bool) StoreChannel
}

func NewSqlPostStore added in v1.0.0

func NewSqlPostStore(sqlStore *SqlStore) PostStore

type PreferenceStore

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
	PermanentDeleteByUser(userId string) StoreChannel
	IsFeatureEnabled(feature, userId string) StoreChannel
}

func NewSqlPreferenceStore added in v1.2.1

func NewSqlPreferenceStore(sqlStore *SqlStore) PreferenceStore

type SessionStore

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

func NewSqlSessionStore added in v1.0.0

func NewSqlSessionStore(sqlStore *SqlStore) SessionStore

type SqlAuditStore added in v1.0.0

type SqlAuditStore struct {
	*SqlStore
}

func (SqlAuditStore) CreateIndexesIfNotExists added in v1.0.0

func (s SqlAuditStore) CreateIndexesIfNotExists()

func (SqlAuditStore) Get added in v1.0.0

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 added in v1.0.0

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

func (SqlAuditStore) UpgradeSchemaIfNeeded added in v1.0.0

func (s SqlAuditStore) UpgradeSchemaIfNeeded()

type SqlChannelStore added in v1.0.0

type SqlChannelStore struct {
	*SqlStore
}

func (SqlChannelStore) AnalyticsTypeCount added in v1.2.1

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

func (SqlChannelStore) CheckOpenChannelPermissions added in v1.0.0

func (s SqlChannelStore) CheckOpenChannelPermissions(teamId string, channelId string) StoreChannel

func (SqlChannelStore) CheckPermissionsTo added in v1.0.0

func (s SqlChannelStore) CheckPermissionsTo(teamId string, channelId string, userId string) StoreChannel

func (SqlChannelStore) CheckPermissionsToByName added in v1.0.0

func (s SqlChannelStore) CheckPermissionsToByName(teamId string, channelName string, userId string) StoreChannel

func (SqlChannelStore) CreateIndexesIfNotExists added in v1.0.0

func (s SqlChannelStore) CreateIndexesIfNotExists()

func (SqlChannelStore) Delete added in v1.0.0

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

func (SqlChannelStore) Get added in v1.0.0

func (SqlChannelStore) GetByName added in v1.0.0

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

func (SqlChannelStore) GetChannelCounts added in v1.0.0

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

func (SqlChannelStore) GetChannels added in v1.0.0

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

func (SqlChannelStore) GetExtraMembers added in v1.0.0

func (s SqlChannelStore) GetExtraMembers(channelId string, limit int) StoreChannel

func (SqlChannelStore) GetForExport added in v1.0.0

func (s SqlChannelStore) GetForExport(teamId string) StoreChannel

func (SqlChannelStore) GetFromMaster added in v1.3.0

func (s SqlChannelStore) GetFromMaster(id string) StoreChannel

func (SqlChannelStore) GetMember added in v1.0.0

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

func (SqlChannelStore) GetMemberCount added in v1.3.0

func (s SqlChannelStore) GetMemberCount(channelId string) StoreChannel

func (SqlChannelStore) GetMembers added in v1.0.0

func (s SqlChannelStore) GetMembers(channelId string) StoreChannel

func (SqlChannelStore) GetMoreChannels added in v1.0.0

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

func (SqlChannelStore) IncrementMentionCount added in v1.0.0

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

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 added in v1.0.0

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

func (SqlChannelStore) Save added in v1.0.0

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 added in v1.0.0

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

func (SqlChannelStore) Update added in v1.0.0

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

func (SqlChannelStore) UpdateLastViewedAt added in v1.0.0

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

func (SqlChannelStore) UpdateMember added in v1.1.0

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

func (SqlChannelStore) UpgradeSchemaIfNeeded added in v1.0.0

func (s SqlChannelStore) UpgradeSchemaIfNeeded()

type SqlCommandStore

type SqlCommandStore struct {
	*SqlStore
}

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(hook *model.Command) StoreChannel

func (SqlCommandStore) UpgradeSchemaIfNeeded

func (s SqlCommandStore) UpgradeSchemaIfNeeded()

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

func (SqlLicenseStore) UpgradeSchemaIfNeeded

func (ls SqlLicenseStore) UpgradeSchemaIfNeeded()

type SqlOAuthStore added in v1.0.0

type SqlOAuthStore struct {
	*SqlStore
}

func (SqlOAuthStore) CreateIndexesIfNotExists added in v1.0.0

func (as SqlOAuthStore) CreateIndexesIfNotExists()

func (SqlOAuthStore) GetAccessData added in v1.0.0

func (as SqlOAuthStore) GetAccessData(token string) StoreChannel

func (SqlOAuthStore) GetAccessDataByAuthCode added in v1.0.0

func (as SqlOAuthStore) GetAccessDataByAuthCode(authCode string) StoreChannel

func (SqlOAuthStore) GetApp added in v1.0.0

func (as SqlOAuthStore) GetApp(id string) StoreChannel

func (SqlOAuthStore) GetAppByUser added in v1.0.0

func (as SqlOAuthStore) GetAppByUser(userId string) StoreChannel

func (SqlOAuthStore) GetAuthData added in v1.0.0

func (as SqlOAuthStore) GetAuthData(code string) StoreChannel

func (SqlOAuthStore) PermanentDeleteAuthDataByUser added in v1.3.0

func (as SqlOAuthStore) PermanentDeleteAuthDataByUser(userId string) StoreChannel

func (SqlOAuthStore) RemoveAccessData added in v1.0.0

func (as SqlOAuthStore) RemoveAccessData(token string) StoreChannel

func (SqlOAuthStore) RemoveAuthData added in v1.0.0

func (as SqlOAuthStore) RemoveAuthData(code string) StoreChannel

func (SqlOAuthStore) SaveAccessData added in v1.0.0

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

func (SqlOAuthStore) SaveApp added in v1.0.0

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

func (SqlOAuthStore) SaveAuthData added in v1.0.0

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

func (SqlOAuthStore) UpdateApp added in v1.0.0

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

func (SqlOAuthStore) UpgradeSchemaIfNeeded added in v1.0.0

func (as SqlOAuthStore) UpgradeSchemaIfNeeded()

type SqlPostStore added in v1.0.0

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 added in v1.0.0

func (s SqlPostStore) CreateIndexesIfNotExists()

func (SqlPostStore) Delete added in v1.0.0

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

func (SqlPostStore) Get added in v1.0.0

func (s SqlPostStore) Get(id string) StoreChannel

func (SqlPostStore) GetEtag added in v1.0.0

func (s SqlPostStore) GetEtag(channelId string) StoreChannel

func (SqlPostStore) GetForExport added in v1.0.0

func (s SqlPostStore) GetForExport(channelId string) StoreChannel

func (SqlPostStore) GetPosts added in v1.0.0

func (s SqlPostStore) GetPosts(channelId string, offset int, limit int) 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 added in v1.0.0

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

func (SqlPostStore) PermanentDeleteByUser added in v1.3.0

func (s SqlPostStore) PermanentDeleteByUser(userId string) StoreChannel

func (SqlPostStore) Save added in v1.0.0

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

func (SqlPostStore) Search added in v1.0.0

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

func (SqlPostStore) Update added in v1.0.0

func (s SqlPostStore) Update(oldPost *model.Post, newMessage string, newHashtags string) StoreChannel

func (SqlPostStore) UpgradeSchemaIfNeeded added in v1.0.0

func (s SqlPostStore) UpgradeSchemaIfNeeded()

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) 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

func (SqlPreferenceStore) UpgradeSchemaIfNeeded added in v1.2.1

func (s SqlPreferenceStore) UpgradeSchemaIfNeeded()

type SqlSessionStore added in v1.0.0

type SqlSessionStore struct {
	*SqlStore
}

func (SqlSessionStore) CleanUpExpiredSessions added in v1.0.0

func (me SqlSessionStore) CleanUpExpiredSessions(userId string) StoreChannel

func (SqlSessionStore) CreateIndexesIfNotExists added in v1.0.0

func (me SqlSessionStore) CreateIndexesIfNotExists()

func (SqlSessionStore) Get added in v1.0.0

func (me SqlSessionStore) Get(sessionIdOrToken string) StoreChannel

func (SqlSessionStore) GetSessions added in v1.0.0

func (me SqlSessionStore) GetSessions(userId string) StoreChannel

func (SqlSessionStore) PermanentDeleteSessionsByUser added in v1.3.0

func (me SqlSessionStore) PermanentDeleteSessionsByUser(userId string) StoreChannel

func (SqlSessionStore) Remove added in v1.0.0

func (me SqlSessionStore) Remove(sessionIdOrToken string) StoreChannel

func (SqlSessionStore) RemoveAllSessionsForTeam added in v1.0.0

func (me SqlSessionStore) RemoveAllSessionsForTeam(teamId string) StoreChannel

func (SqlSessionStore) Save added in v1.0.0

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

func (SqlSessionStore) UpdateDeviceId

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

func (SqlSessionStore) UpdateLastActivityAt added in v1.0.0

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

func (SqlSessionStore) UpdateRoles added in v1.0.0

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

func (SqlSessionStore) UpgradeSchemaIfNeeded added in v1.0.0

func (me SqlSessionStore) UpgradeSchemaIfNeeded()

type SqlStore added in v1.0.0

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

func (SqlStore) Audit added in v1.0.0

func (ss SqlStore) Audit() AuditStore

func (SqlStore) Channel added in v1.0.0

func (ss SqlStore) Channel() ChannelStore

func (SqlStore) Close added in v1.0.0

func (ss SqlStore) Close()

func (SqlStore) Command

func (ss SqlStore) Command() CommandStore

func (SqlStore) CreateColumnIfNotExists added in v1.0.0

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

func (SqlStore) CreateFullTextIndexIfNotExists added in v1.0.0

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

func (SqlStore) CreateIndexIfNotExists added in v1.0.0

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

func (SqlStore) DoesColumnExist added in v1.0.0

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

func (SqlStore) DoesTableExist added in v1.0.0

func (ss SqlStore) DoesTableExist(tableName string) bool

func (SqlStore) GetAllConns added in v1.0.0

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

func (SqlStore) GetColumnDataType added in v1.2.1

func (ss SqlStore) GetColumnDataType(tableName, columnName string) string

func (SqlStore) GetCurrentSchemaVersion added in v1.0.0

func (ss SqlStore) GetCurrentSchemaVersion() string

func (SqlStore) GetMaster added in v1.0.0

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

func (SqlStore) GetReplica added in v1.0.0

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 added in v1.0.0

func (ss SqlStore) OAuth() OAuthStore

func (SqlStore) Post added in v1.0.0

func (ss SqlStore) Post() PostStore

func (SqlStore) Preference added in v1.2.1

func (ss SqlStore) Preference() PreferenceStore

func (SqlStore) RemoveColumnIfExists added in v1.0.0

func (ss SqlStore) RemoveColumnIfExists(tableName string, columnName 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 added in v1.0.0

func (ss SqlStore) Session() SessionStore

func (SqlStore) System added in v1.0.0

func (ss SqlStore) System() SystemStore

func (SqlStore) Team added in v1.0.0

func (ss SqlStore) Team() TeamStore

func (SqlStore) User added in v1.0.0

func (ss SqlStore) User() UserStore

func (SqlStore) Webhook added in v1.0.0

func (ss SqlStore) Webhook() WebhookStore

type SqlSystemStore added in v1.0.0

type SqlSystemStore struct {
	*SqlStore
}

func (SqlSystemStore) CreateIndexesIfNotExists added in v1.0.0

func (s SqlSystemStore) CreateIndexesIfNotExists()

func (SqlSystemStore) Get added in v1.0.0

func (s SqlSystemStore) Get() StoreChannel

func (SqlSystemStore) Save added in v1.0.0

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

func (SqlSystemStore) SaveOrUpdate

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

func (SqlSystemStore) Update added in v1.0.0

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

func (SqlSystemStore) UpgradeSchemaIfNeeded added in v1.0.0

func (s SqlSystemStore) UpgradeSchemaIfNeeded()

type SqlTeamStore added in v1.0.0

type SqlTeamStore struct {
	*SqlStore
}

func (SqlTeamStore) CreateIndexesIfNotExists added in v1.0.0

func (s SqlTeamStore) CreateIndexesIfNotExists()

func (SqlTeamStore) Get added in v1.0.0

func (s SqlTeamStore) Get(id string) StoreChannel

func (SqlTeamStore) GetAll added in v1.0.0

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 added in v1.0.0

func (s SqlTeamStore) GetByName(name string) StoreChannel

func (SqlTeamStore) GetTeamsForEmail added in v1.0.0

func (s SqlTeamStore) GetTeamsForEmail(email string) StoreChannel

func (SqlTeamStore) PermanentDelete added in v1.3.0

func (s SqlTeamStore) PermanentDelete(teamId string) StoreChannel

func (SqlTeamStore) Save added in v1.0.0

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

func (SqlTeamStore) Update added in v1.0.0

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

func (SqlTeamStore) UpdateDisplayName added in v1.0.0

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

func (SqlTeamStore) UpgradeSchemaIfNeeded added in v1.0.0

func (s SqlTeamStore) UpgradeSchemaIfNeeded()

type SqlUserStore added in v1.0.0

type SqlUserStore struct {
	*SqlStore
}

func (SqlUserStore) AnalyticsUniqueUserCount

func (us SqlUserStore) AnalyticsUniqueUserCount(teamId string) StoreChannel

func (SqlUserStore) CreateIndexesIfNotExists added in v1.0.0

func (us SqlUserStore) CreateIndexesIfNotExists()

func (SqlUserStore) Get added in v1.0.0

func (us SqlUserStore) Get(id string) StoreChannel

func (SqlUserStore) GetByAuth added in v1.0.0

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

func (SqlUserStore) GetByEmail added in v1.0.0

func (us SqlUserStore) GetByEmail(teamId string, email string) StoreChannel

func (SqlUserStore) GetByUsername added in v1.0.0

func (us SqlUserStore) GetByUsername(teamId string, username string) StoreChannel

func (SqlUserStore) GetEtagForProfiles added in v1.0.0

func (s SqlUserStore) GetEtagForProfiles(teamId string) StoreChannel

func (SqlUserStore) GetForExport added in v1.0.0

func (us SqlUserStore) GetForExport(teamId string) StoreChannel

func (SqlUserStore) GetProfiles added in v1.0.0

func (us SqlUserStore) GetProfiles(teamId string) StoreChannel

func (SqlUserStore) GetSystemAdminProfiles added in v1.1.0

func (us SqlUserStore) GetSystemAdminProfiles() StoreChannel

func (SqlUserStore) GetTotalActiveUsersCount added in v1.1.0

func (us SqlUserStore) GetTotalActiveUsersCount() StoreChannel

func (SqlUserStore) GetTotalUsersCount added in v1.0.0

func (us SqlUserStore) GetTotalUsersCount() StoreChannel

func (SqlUserStore) PermanentDelete added in v1.3.0

func (us SqlUserStore) PermanentDelete(userId string) StoreChannel

func (SqlUserStore) Save added in v1.0.0

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

func (SqlUserStore) Update added in v1.0.0

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

func (SqlUserStore) UpdateAuthData added in v1.4.0

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

func (SqlUserStore) UpdateFailedPasswordAttempts added in v1.0.0

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

func (SqlUserStore) UpdateLastActivityAt added in v1.0.0

func (us SqlUserStore) UpdateLastActivityAt(userId string, time int64) StoreChannel

func (SqlUserStore) UpdateLastPictureUpdate added in v1.0.0

func (us SqlUserStore) UpdateLastPictureUpdate(userId string) StoreChannel

func (SqlUserStore) UpdateLastPingAt added in v1.0.0

func (us SqlUserStore) UpdateLastPingAt(userId string, time int64) StoreChannel

func (SqlUserStore) UpdatePassword added in v1.0.0

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

func (SqlUserStore) UpdateUserAndSessionActivity added in v1.0.0

func (us SqlUserStore) UpdateUserAndSessionActivity(userId string, sessionId string, time int64) StoreChannel

func (SqlUserStore) UpgradeSchemaIfNeeded added in v1.0.0

func (us SqlUserStore) UpgradeSchemaIfNeeded()

func (SqlUserStore) VerifyEmail added in v1.0.0

func (us SqlUserStore) VerifyEmail(userId string) StoreChannel

type SqlWebhookStore added in v1.0.0

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 added in v1.0.0

func (s SqlWebhookStore) CreateIndexesIfNotExists()

func (SqlWebhookStore) DeleteIncoming added in v1.0.0

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 added in v1.0.0

func (s SqlWebhookStore) GetIncoming(id string) 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) 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 added in v1.0.0

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

func (SqlWebhookStore) UpgradeSchemaIfNeeded added in v1.0.0

func (s SqlWebhookStore) UpgradeSchemaIfNeeded()

type Store

type Store interface {
	Team() TeamStore
	Channel() ChannelStore
	Post() PostStore
	User() UserStore
	Audit() AuditStore
	Session() SessionStore
	OAuth() OAuthStore
	System() SystemStore
	Webhook() WebhookStore
	Command() CommandStore
	Preference() PreferenceStore
	License() LicenseStore
	MarkSystemRanUnitTests()
	Close()
}

func NewSqlStore added in v1.0.0

func NewSqlStore() Store

type StoreChannel added in v1.0.0

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
}

func NewSqlSystemStore added in v1.0.0

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
	GetTeamsForEmail(domain string) StoreChannel
	GetAll() StoreChannel
	GetAllTeamListing() StoreChannel
	GetByInviteId(inviteId string) StoreChannel
	PermanentDelete(teamId string) StoreChannel
}

func NewSqlTeamStore added in v1.0.0

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
	UpdateLastPingAt(userId string, time int64) StoreChannel
	UpdateLastActivityAt(userId string, time int64) StoreChannel
	UpdateUserAndSessionActivity(userId string, sessionId string, time int64) StoreChannel
	UpdatePassword(userId, newPassword string) StoreChannel
	UpdateAuthData(userId, service, authData, email string) StoreChannel
	Get(id string) StoreChannel
	GetProfiles(teamId string) StoreChannel
	GetByEmail(teamId string, email string) StoreChannel
	GetByAuth(teamId string, authData string, authService string) StoreChannel
	GetByUsername(teamId string, username string) StoreChannel
	VerifyEmail(userId string) StoreChannel
	GetEtagForProfiles(teamId string) StoreChannel
	UpdateFailedPasswordAttempts(userId string, attempts int) StoreChannel
	GetForExport(teamId string) StoreChannel
	GetTotalUsersCount() StoreChannel
	GetTotalActiveUsersCount() StoreChannel
	GetSystemAdminProfiles() StoreChannel
	PermanentDelete(userId string) StoreChannel
	AnalyticsUniqueUserCount(teamId string) StoreChannel
}

func NewSqlUserStore added in v1.0.0

func NewSqlUserStore(sqlStore *SqlStore) UserStore

type WebhookStore

type WebhookStore interface {
	SaveIncoming(webhook *model.IncomingWebhook) StoreChannel
	GetIncoming(id string) 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
}

func NewSqlWebhookStore added in v1.0.0

func NewSqlWebhookStore(sqlStore *SqlStore) WebhookStore

Jump to

Keyboard shortcuts

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