platform: github.com/samdolan/platform/store Index | Files

package store

import "github.com/samdolan/platform/store"

Index

Package Files

sql_audit_store.go sql_channel_store.go sql_command_store.go sql_compliance_store.go sql_emoji_store.go sql_license_store.go sql_oauth_store.go sql_post_store.go sql_preference_store.go sql_recovery_store.go sql_session_store.go sql_store.go sql_system_store.go sql_team_store.go sql_user_store.go sql_webhook_store.go store.go

Constants

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"
)
const (
    INDEX_TYPE_FULL_TEXT = "full_text"
    INDEX_TYPE_DEFAULT   = "default"
)
const (
    MISSING_ACCOUNT_ERROR      = "store.sql_user.missing_account.const"
    MISSING_AUTH_ACCOUNT_ERROR = "store.sql_user.get_by_auth.missing_account.app_error"
)
const (
    FEATURE_TOGGLE_PREFIX = "feature_enabled_"
)
const (
    TEAM_MEMBER_EXISTS_ERROR = "store.sql_team.save_member.exists.app_error"
)

func IsUniqueConstraintError Uses

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

func Must Uses

func Must(sc StoreChannel) interface{}

type AuditStore Uses

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

func NewSqlAuditStore Uses

func NewSqlAuditStore(sqlStore *SqlStore) AuditStore

type ChannelStore Uses

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
    CheckPermissionsToNoTeam(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
    ExtraUpdateByUser(userId string, time int64) StoreChannel
}

func NewSqlChannelStore Uses

func NewSqlChannelStore(sqlStore *SqlStore) ChannelStore

type CommandStore Uses

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 Uses

func NewSqlCommandStore(sqlStore *SqlStore) CommandStore

type ComplianceStore Uses

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 Uses

func NewSqlComplianceStore(sqlStore *SqlStore) ComplianceStore

type EmojiStore Uses

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

func NewSqlEmojiStore Uses

func NewSqlEmojiStore(sqlStore *SqlStore) EmojiStore

type LicenseStore Uses

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

func NewSqlLicenseStore Uses

func NewSqlLicenseStore(sqlStore *SqlStore) LicenseStore

type OAuthStore Uses

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 Uses

func NewSqlOAuthStore(sqlStore *SqlStore) OAuthStore

type PasswordRecoveryStore Uses

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

func NewSqlPasswordRecoveryStore Uses

func NewSqlPasswordRecoveryStore(sqlStore *SqlStore) PasswordRecoveryStore

type PostStore Uses

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 Uses

func NewSqlPostStore(sqlStore *SqlStore) PostStore

type PreferenceStore Uses

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 Uses

func NewSqlPreferenceStore(sqlStore *SqlStore) PreferenceStore

type SessionStore Uses

type SessionStore interface {
    Save(session *model.Session) StoreChannel
    Get(sessionIdOrToken string) StoreChannel
    GetSessions(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) StoreChannel
    AnalyticsSessionCount() StoreChannel
}

func NewSqlSessionStore Uses

func NewSqlSessionStore(sqlStore *SqlStore) SessionStore

type SqlAuditStore Uses

type SqlAuditStore struct {
    *SqlStore
}

func (SqlAuditStore) CreateIndexesIfNotExists Uses

func (s SqlAuditStore) CreateIndexesIfNotExists()

func (SqlAuditStore) Get Uses

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

func (SqlAuditStore) PermanentDeleteByUser Uses

func (s SqlAuditStore) PermanentDeleteByUser(userId string) StoreChannel

func (SqlAuditStore) Save Uses

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

func (SqlAuditStore) UpgradeSchemaIfNeeded Uses

func (s SqlAuditStore) UpgradeSchemaIfNeeded()

type SqlChannelStore Uses

type SqlChannelStore struct {
    *SqlStore
}

func (SqlChannelStore) AnalyticsTypeCount Uses

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

func (SqlChannelStore) CheckOpenChannelPermissions Uses

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

func (SqlChannelStore) CheckPermissionsTo Uses

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

func (SqlChannelStore) CheckPermissionsToByName Uses

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

func (SqlChannelStore) CheckPermissionsToNoTeam Uses

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

func (SqlChannelStore) CreateIndexesIfNotExists Uses

func (s SqlChannelStore) CreateIndexesIfNotExists()

func (SqlChannelStore) Delete Uses

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

func (SqlChannelStore) ExtraUpdateByUser Uses

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

func (SqlChannelStore) Get Uses

func (s SqlChannelStore) Get(id string) StoreChannel

func (SqlChannelStore) GetByName Uses

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

func (SqlChannelStore) GetChannelCounts Uses

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

func (SqlChannelStore) GetChannels Uses

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

func (SqlChannelStore) GetExtraMembers Uses

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

func (SqlChannelStore) GetForExport Uses

func (s SqlChannelStore) GetForExport(teamId string) StoreChannel

func (SqlChannelStore) GetFromMaster Uses

func (s SqlChannelStore) GetFromMaster(id string) StoreChannel

func (SqlChannelStore) GetMember Uses

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

func (SqlChannelStore) GetMemberCount Uses

func (s SqlChannelStore) GetMemberCount(channelId string) StoreChannel

func (SqlChannelStore) GetMembers Uses

func (s SqlChannelStore) GetMembers(channelId string) StoreChannel

func (SqlChannelStore) GetMoreChannels Uses

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

func (SqlChannelStore) IncrementMentionCount Uses

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

func (SqlChannelStore) PermanentDeleteByTeam Uses

func (s SqlChannelStore) PermanentDeleteByTeam(teamId string) StoreChannel

func (SqlChannelStore) PermanentDeleteMembersByUser Uses

func (s SqlChannelStore) PermanentDeleteMembersByUser(userId string) StoreChannel

func (SqlChannelStore) RemoveMember Uses

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

func (SqlChannelStore) Save Uses

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

func (SqlChannelStore) SaveDirectChannel Uses

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

func (SqlChannelStore) SaveMember Uses

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

func (SqlChannelStore) Update Uses

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

func (SqlChannelStore) UpdateLastViewedAt Uses

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

func (SqlChannelStore) UpdateMember Uses

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

func (SqlChannelStore) UpgradeSchemaIfNeeded Uses

func (s SqlChannelStore) UpgradeSchemaIfNeeded()

type SqlCommandStore Uses

type SqlCommandStore struct {
    *SqlStore
}

func (SqlCommandStore) AnalyticsCommandCount Uses

func (s SqlCommandStore) AnalyticsCommandCount(teamId string) StoreChannel

func (SqlCommandStore) CreateIndexesIfNotExists Uses

func (s SqlCommandStore) CreateIndexesIfNotExists()

func (SqlCommandStore) Delete Uses

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

func (SqlCommandStore) Get Uses

func (s SqlCommandStore) Get(id string) StoreChannel

func (SqlCommandStore) GetByTeam Uses

func (s SqlCommandStore) GetByTeam(teamId string) StoreChannel

func (SqlCommandStore) PermanentDeleteByUser Uses

func (s SqlCommandStore) PermanentDeleteByUser(userId string) StoreChannel

func (SqlCommandStore) Save Uses

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

func (SqlCommandStore) Update Uses

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

func (SqlCommandStore) UpgradeSchemaIfNeeded Uses

func (s SqlCommandStore) UpgradeSchemaIfNeeded()

type SqlComplianceStore Uses

type SqlComplianceStore struct {
    *SqlStore
}

func (SqlComplianceStore) ComplianceExport Uses

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

func (SqlComplianceStore) CreateIndexesIfNotExists Uses

func (s SqlComplianceStore) CreateIndexesIfNotExists()

func (SqlComplianceStore) Get Uses

func (us SqlComplianceStore) Get(id string) StoreChannel

func (SqlComplianceStore) GetAll Uses

func (s SqlComplianceStore) GetAll() StoreChannel

func (SqlComplianceStore) Save Uses

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

func (SqlComplianceStore) Update Uses

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

func (SqlComplianceStore) UpgradeSchemaIfNeeded Uses

func (s SqlComplianceStore) UpgradeSchemaIfNeeded()

type SqlEmojiStore Uses

type SqlEmojiStore struct {
    *SqlStore
}

func (SqlEmojiStore) CreateIndexesIfNotExists Uses

func (es SqlEmojiStore) CreateIndexesIfNotExists()

func (SqlEmojiStore) Delete Uses

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

func (SqlEmojiStore) Get Uses

func (es SqlEmojiStore) Get(id string) StoreChannel

func (SqlEmojiStore) GetAll Uses

func (es SqlEmojiStore) GetAll() StoreChannel

func (SqlEmojiStore) GetByName Uses

func (es SqlEmojiStore) GetByName(name string) StoreChannel

func (SqlEmojiStore) Save Uses

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

func (SqlEmojiStore) UpgradeSchemaIfNeeded Uses

func (es SqlEmojiStore) UpgradeSchemaIfNeeded()

type SqlLicenseStore Uses

type SqlLicenseStore struct {
    *SqlStore
}

func (SqlLicenseStore) CreateIndexesIfNotExists Uses

func (ls SqlLicenseStore) CreateIndexesIfNotExists()

func (SqlLicenseStore) Get Uses

func (ls SqlLicenseStore) Get(id string) StoreChannel

func (SqlLicenseStore) Save Uses

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

func (SqlLicenseStore) UpgradeSchemaIfNeeded Uses

func (ls SqlLicenseStore) UpgradeSchemaIfNeeded()

type SqlOAuthStore Uses

type SqlOAuthStore struct {
    *SqlStore
}

func (SqlOAuthStore) CreateIndexesIfNotExists Uses

func (as SqlOAuthStore) CreateIndexesIfNotExists()

func (SqlOAuthStore) GetAccessData Uses

func (as SqlOAuthStore) GetAccessData(token string) StoreChannel

func (SqlOAuthStore) GetAccessDataByAuthCode Uses

func (as SqlOAuthStore) GetAccessDataByAuthCode(authCode string) StoreChannel

func (SqlOAuthStore) GetApp Uses

func (as SqlOAuthStore) GetApp(id string) StoreChannel

func (SqlOAuthStore) GetAppByUser Uses

func (as SqlOAuthStore) GetAppByUser(userId string) StoreChannel

func (SqlOAuthStore) GetAuthData Uses

func (as SqlOAuthStore) GetAuthData(code string) StoreChannel

func (SqlOAuthStore) PermanentDeleteAuthDataByUser Uses

func (as SqlOAuthStore) PermanentDeleteAuthDataByUser(userId string) StoreChannel

func (SqlOAuthStore) RemoveAccessData Uses

func (as SqlOAuthStore) RemoveAccessData(token string) StoreChannel

func (SqlOAuthStore) RemoveAuthData Uses

func (as SqlOAuthStore) RemoveAuthData(code string) StoreChannel

func (SqlOAuthStore) SaveAccessData Uses

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

func (SqlOAuthStore) SaveApp Uses

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

func (SqlOAuthStore) SaveAuthData Uses

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

func (SqlOAuthStore) UpdateApp Uses

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

func (SqlOAuthStore) UpgradeSchemaIfNeeded Uses

func (as SqlOAuthStore) UpgradeSchemaIfNeeded()

type SqlPasswordRecoveryStore Uses

type SqlPasswordRecoveryStore struct {
    *SqlStore
}

func (SqlPasswordRecoveryStore) CreateIndexesIfNotExists Uses

func (s SqlPasswordRecoveryStore) CreateIndexesIfNotExists()

func (SqlPasswordRecoveryStore) Delete Uses

func (s SqlPasswordRecoveryStore) Delete(userId string) StoreChannel

func (SqlPasswordRecoveryStore) Get Uses

func (s SqlPasswordRecoveryStore) Get(userId string) StoreChannel

func (SqlPasswordRecoveryStore) GetByCode Uses

func (s SqlPasswordRecoveryStore) GetByCode(code string) StoreChannel

func (SqlPasswordRecoveryStore) SaveOrUpdate Uses

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

func (SqlPasswordRecoveryStore) UpgradeSchemaIfNeeded Uses

func (s SqlPasswordRecoveryStore) UpgradeSchemaIfNeeded()

type SqlPostStore Uses

type SqlPostStore struct {
    *SqlStore
}

func (SqlPostStore) AnalyticsPostCount Uses

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

func (SqlPostStore) AnalyticsPostCountsByDay Uses

func (s SqlPostStore) AnalyticsPostCountsByDay(teamId string) StoreChannel

func (SqlPostStore) AnalyticsUserCountsWithPostsByDay Uses

func (s SqlPostStore) AnalyticsUserCountsWithPostsByDay(teamId string) StoreChannel

func (SqlPostStore) CreateIndexesIfNotExists Uses

func (s SqlPostStore) CreateIndexesIfNotExists()

func (SqlPostStore) Delete Uses

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

func (SqlPostStore) Get Uses

func (s SqlPostStore) Get(id string) StoreChannel

func (SqlPostStore) GetEtag Uses

func (s SqlPostStore) GetEtag(channelId string) StoreChannel

func (SqlPostStore) GetForExport Uses

func (s SqlPostStore) GetForExport(channelId string) StoreChannel

func (SqlPostStore) GetPosts Uses

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

func (SqlPostStore) GetPostsAfter Uses

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

func (SqlPostStore) GetPostsBefore Uses

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

func (SqlPostStore) GetPostsSince Uses

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

func (SqlPostStore) PermanentDeleteByUser Uses

func (s SqlPostStore) PermanentDeleteByUser(userId string) StoreChannel

func (SqlPostStore) Save Uses

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

func (SqlPostStore) Search Uses

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

func (SqlPostStore) Update Uses

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

func (SqlPostStore) UpgradeSchemaIfNeeded Uses

func (s SqlPostStore) UpgradeSchemaIfNeeded()

type SqlPreferenceStore Uses

type SqlPreferenceStore struct {
    *SqlStore
}

func (SqlPreferenceStore) CreateIndexesIfNotExists Uses

func (s SqlPreferenceStore) CreateIndexesIfNotExists()

func (SqlPreferenceStore) DeleteUnusedFeatures Uses

func (s SqlPreferenceStore) DeleteUnusedFeatures()

func (SqlPreferenceStore) Get Uses

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

func (SqlPreferenceStore) GetAll Uses

func (s SqlPreferenceStore) GetAll(userId string) StoreChannel

func (SqlPreferenceStore) GetCategory Uses

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

func (SqlPreferenceStore) IsFeatureEnabled Uses

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

func (SqlPreferenceStore) PermanentDeleteByUser Uses

func (s SqlPreferenceStore) PermanentDeleteByUser(userId string) StoreChannel

func (SqlPreferenceStore) Save Uses

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

func (SqlPreferenceStore) UpgradeSchemaIfNeeded Uses

func (s SqlPreferenceStore) UpgradeSchemaIfNeeded()

type SqlSessionStore Uses

type SqlSessionStore struct {
    *SqlStore
}

func (SqlSessionStore) AnalyticsSessionCount Uses

func (me SqlSessionStore) AnalyticsSessionCount() StoreChannel

func (SqlSessionStore) CleanUpExpiredSessions Uses

func (me SqlSessionStore) CleanUpExpiredSessions(userId string) StoreChannel

func (SqlSessionStore) CreateIndexesIfNotExists Uses

func (me SqlSessionStore) CreateIndexesIfNotExists()

func (SqlSessionStore) Get Uses

func (me SqlSessionStore) Get(sessionIdOrToken string) StoreChannel

func (SqlSessionStore) GetSessions Uses

func (me SqlSessionStore) GetSessions(userId string) StoreChannel

func (SqlSessionStore) PermanentDeleteSessionsByUser Uses

func (me SqlSessionStore) PermanentDeleteSessionsByUser(userId string) StoreChannel

func (SqlSessionStore) Remove Uses

func (me SqlSessionStore) Remove(sessionIdOrToken string) StoreChannel

func (SqlSessionStore) RemoveAllSessions Uses

func (me SqlSessionStore) RemoveAllSessions() StoreChannel

func (SqlSessionStore) Save Uses

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

func (SqlSessionStore) UpdateDeviceId Uses

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

func (SqlSessionStore) UpdateLastActivityAt Uses

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

func (SqlSessionStore) UpdateRoles Uses

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

func (SqlSessionStore) UpgradeSchemaIfNeeded Uses

func (me SqlSessionStore) UpgradeSchemaIfNeeded()

type SqlStore Uses

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

func NewSqlStoreForUpgrade30 Uses

func NewSqlStoreForUpgrade30() *SqlStore

ADDED for 3.0 REMOVE for 3.4 This is a special case for upgrading the schema to the 3.0 user model

func (SqlStore) AlterColumnTypeIfExists Uses

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

func (SqlStore) Audit Uses

func (ss SqlStore) Audit() AuditStore

func (SqlStore) Channel Uses

func (ss SqlStore) Channel() ChannelStore

func (SqlStore) Close Uses

func (ss SqlStore) Close()

func (SqlStore) Command Uses

func (ss SqlStore) Command() CommandStore

func (SqlStore) Compliance Uses

func (ss SqlStore) Compliance() ComplianceStore

func (SqlStore) CreateColumnIfNotExists Uses

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

func (SqlStore) CreateFullTextIndexIfNotExists Uses

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

func (SqlStore) CreateIndexIfNotExists Uses

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

func (SqlStore) CreateUniqueIndexIfNotExists Uses

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

func (SqlStore) DoesColumnExist Uses

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

func (SqlStore) DoesTableExist Uses

func (ss SqlStore) DoesTableExist(tableName string) bool

func (SqlStore) DropAllTables Uses

func (ss SqlStore) DropAllTables()

func (SqlStore) Emoji Uses

func (ss SqlStore) Emoji() EmojiStore

func (SqlStore) GetAllConns Uses

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

func (SqlStore) GetCurrentSchemaVersion Uses

func (ss SqlStore) GetCurrentSchemaVersion() string

func (SqlStore) GetMaster Uses

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

func (SqlStore) GetMaxLengthOfColumnIfExists Uses

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

func (SqlStore) GetReplica Uses

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

func (SqlStore) License Uses

func (ss SqlStore) License() LicenseStore

func (SqlStore) MarkSystemRanUnitTests Uses

func (ss SqlStore) MarkSystemRanUnitTests()

func (SqlStore) OAuth Uses

func (ss SqlStore) OAuth() OAuthStore

func (SqlStore) PasswordRecovery Uses

func (ss SqlStore) PasswordRecovery() PasswordRecoveryStore

func (SqlStore) Post Uses

func (ss SqlStore) Post() PostStore

func (SqlStore) Preference Uses

func (ss SqlStore) Preference() PreferenceStore

func (SqlStore) RemoveColumnIfExists Uses

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

func (SqlStore) RemoveIndexIfExists Uses

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

func (SqlStore) RenameColumnIfExists Uses

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

func (SqlStore) Session Uses

func (ss SqlStore) Session() SessionStore

func (SqlStore) System Uses

func (ss SqlStore) System() SystemStore

func (SqlStore) Team Uses

func (ss SqlStore) Team() TeamStore

func (SqlStore) User Uses

func (ss SqlStore) User() UserStore

func (SqlStore) Webhook Uses

func (ss SqlStore) Webhook() WebhookStore

type SqlSystemStore Uses

type SqlSystemStore struct {
    *SqlStore
}

func (SqlSystemStore) CreateIndexesIfNotExists Uses

func (s SqlSystemStore) CreateIndexesIfNotExists()

func (SqlSystemStore) Get Uses

func (s SqlSystemStore) Get() StoreChannel

func (SqlSystemStore) GetByName Uses

func (s SqlSystemStore) GetByName(name string) StoreChannel

func (SqlSystemStore) Save Uses

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

func (SqlSystemStore) SaveOrUpdate Uses

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

func (SqlSystemStore) Update Uses

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

func (SqlSystemStore) UpgradeSchemaIfNeeded Uses

func (s SqlSystemStore) UpgradeSchemaIfNeeded()

type SqlTeamStore Uses

type SqlTeamStore struct {
    *SqlStore
}

func (SqlTeamStore) AnalyticsTeamCount Uses

func (s SqlTeamStore) AnalyticsTeamCount() StoreChannel

func (SqlTeamStore) CreateIndexesIfNotExists Uses

func (s SqlTeamStore) CreateIndexesIfNotExists()

func (SqlTeamStore) Get Uses

func (s SqlTeamStore) Get(id string) StoreChannel

func (SqlTeamStore) GetAll Uses

func (s SqlTeamStore) GetAll() StoreChannel

func (SqlTeamStore) GetAllTeamListing Uses

func (s SqlTeamStore) GetAllTeamListing() StoreChannel

func (SqlTeamStore) GetByInviteId Uses

func (s SqlTeamStore) GetByInviteId(inviteId string) StoreChannel

func (SqlTeamStore) GetByName Uses

func (s SqlTeamStore) GetByName(name string) StoreChannel

func (SqlTeamStore) GetMember Uses

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

func (SqlTeamStore) GetMembers Uses

func (s SqlTeamStore) GetMembers(teamId string) StoreChannel

func (SqlTeamStore) GetTeamsByUserId Uses

func (s SqlTeamStore) GetTeamsByUserId(userId string) StoreChannel

func (SqlTeamStore) GetTeamsForUser Uses

func (s SqlTeamStore) GetTeamsForUser(userId string) StoreChannel

func (SqlTeamStore) PermanentDelete Uses

func (s SqlTeamStore) PermanentDelete(teamId string) StoreChannel

func (SqlTeamStore) RemoveAllMembersByTeam Uses

func (s SqlTeamStore) RemoveAllMembersByTeam(teamId string) StoreChannel

func (SqlTeamStore) RemoveAllMembersByUser Uses

func (s SqlTeamStore) RemoveAllMembersByUser(userId string) StoreChannel

func (SqlTeamStore) RemoveMember Uses

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

func (SqlTeamStore) Save Uses

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

func (SqlTeamStore) SaveMember Uses

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

func (SqlTeamStore) Update Uses

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

func (SqlTeamStore) UpdateDisplayName Uses

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

func (SqlTeamStore) UpdateMember Uses

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

func (SqlTeamStore) UpgradeSchemaIfNeeded Uses

func (s SqlTeamStore) UpgradeSchemaIfNeeded()

type SqlUserStore Uses

type SqlUserStore struct {
    *SqlStore
}

func (SqlUserStore) AnalyticsUniqueUserCount Uses

func (us SqlUserStore) AnalyticsUniqueUserCount(teamId string) StoreChannel

func (SqlUserStore) CreateIndexesIfNotExists Uses

func (us SqlUserStore) CreateIndexesIfNotExists()

func (SqlUserStore) Get Uses

func (us SqlUserStore) Get(id string) StoreChannel

func (SqlUserStore) GetAll Uses

func (us SqlUserStore) GetAll() StoreChannel

func (SqlUserStore) GetAllProfiles Uses

func (us SqlUserStore) GetAllProfiles() StoreChannel

func (SqlUserStore) GetAllUsingAuthService Uses

func (us SqlUserStore) GetAllUsingAuthService(authService string) StoreChannel

func (SqlUserStore) GetByAuth Uses

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

func (SqlUserStore) GetByEmail Uses

func (us SqlUserStore) GetByEmail(email string) StoreChannel

func (SqlUserStore) GetByUsername Uses

func (us SqlUserStore) GetByUsername(username string) StoreChannel

func (SqlUserStore) GetDirectProfiles Uses

func (us SqlUserStore) GetDirectProfiles(userId string) StoreChannel

func (SqlUserStore) GetEtagForAllProfiles Uses

func (s SqlUserStore) GetEtagForAllProfiles() StoreChannel

func (SqlUserStore) GetEtagForDirectProfiles Uses

func (s SqlUserStore) GetEtagForDirectProfiles(userId string) StoreChannel

func (SqlUserStore) GetEtagForProfiles Uses

func (s SqlUserStore) GetEtagForProfiles(teamId string) StoreChannel

func (SqlUserStore) GetForExport Uses

func (us SqlUserStore) GetForExport(teamId string) StoreChannel

func (SqlUserStore) GetForLogin Uses

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

func (SqlUserStore) GetProfileByIds Uses

func (us SqlUserStore) GetProfileByIds(userIds []string) StoreChannel

func (SqlUserStore) GetProfiles Uses

func (us SqlUserStore) GetProfiles(teamId string) StoreChannel

func (SqlUserStore) GetSystemAdminProfiles Uses

func (us SqlUserStore) GetSystemAdminProfiles() StoreChannel

func (SqlUserStore) GetTotalActiveUsersCount Uses

func (us SqlUserStore) GetTotalActiveUsersCount() StoreChannel

func (SqlUserStore) GetTotalUsersCount Uses

func (us SqlUserStore) GetTotalUsersCount() StoreChannel

func (SqlUserStore) GetUnreadCount Uses

func (us SqlUserStore) GetUnreadCount(userId string) StoreChannel

func (SqlUserStore) PermanentDelete Uses

func (us SqlUserStore) PermanentDelete(userId string) StoreChannel

func (SqlUserStore) Save Uses

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

func (SqlUserStore) Update Uses

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

func (SqlUserStore) UpdateAuthData Uses

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

func (SqlUserStore) UpdateFailedPasswordAttempts Uses

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

func (SqlUserStore) UpdateLastActivityAt Uses

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

func (SqlUserStore) UpdateLastPictureUpdate Uses

func (us SqlUserStore) UpdateLastPictureUpdate(userId string) StoreChannel

func (SqlUserStore) UpdateLastPingAt Uses

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

func (SqlUserStore) UpdateMfaActive Uses

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

func (SqlUserStore) UpdateMfaSecret Uses

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

func (SqlUserStore) UpdatePassword Uses

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

func (SqlUserStore) UpdateUpdateAt Uses

func (us SqlUserStore) UpdateUpdateAt(userId string) StoreChannel

func (SqlUserStore) UpdateUserAndSessionActivity Uses

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

func (SqlUserStore) UpgradeSchemaIfNeeded Uses

func (us SqlUserStore) UpgradeSchemaIfNeeded()

func (SqlUserStore) VerifyEmail Uses

func (us SqlUserStore) VerifyEmail(userId string) StoreChannel

type SqlWebhookStore Uses

type SqlWebhookStore struct {
    *SqlStore
}

func (SqlWebhookStore) AnalyticsIncomingCount Uses

func (s SqlWebhookStore) AnalyticsIncomingCount(teamId string) StoreChannel

func (SqlWebhookStore) AnalyticsOutgoingCount Uses

func (s SqlWebhookStore) AnalyticsOutgoingCount(teamId string) StoreChannel

func (SqlWebhookStore) CreateIndexesIfNotExists Uses

func (s SqlWebhookStore) CreateIndexesIfNotExists()

func (SqlWebhookStore) DeleteIncoming Uses

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

func (SqlWebhookStore) DeleteOutgoing Uses

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

func (SqlWebhookStore) GetIncoming Uses

func (s SqlWebhookStore) GetIncoming(id string) StoreChannel

func (SqlWebhookStore) GetIncomingByChannel Uses

func (s SqlWebhookStore) GetIncomingByChannel(channelId string) StoreChannel

func (SqlWebhookStore) GetIncomingByTeam Uses

func (s SqlWebhookStore) GetIncomingByTeam(teamId string) StoreChannel

func (SqlWebhookStore) GetOutgoing Uses

func (s SqlWebhookStore) GetOutgoing(id string) StoreChannel

func (SqlWebhookStore) GetOutgoingByChannel Uses

func (s SqlWebhookStore) GetOutgoingByChannel(channelId string) StoreChannel

func (SqlWebhookStore) GetOutgoingByTeam Uses

func (s SqlWebhookStore) GetOutgoingByTeam(teamId string) StoreChannel

func (SqlWebhookStore) PermanentDeleteIncomingByUser Uses

func (s SqlWebhookStore) PermanentDeleteIncomingByUser(userId string) StoreChannel

func (SqlWebhookStore) PermanentDeleteOutgoingByUser Uses

func (s SqlWebhookStore) PermanentDeleteOutgoingByUser(userId string) StoreChannel

func (SqlWebhookStore) SaveIncoming Uses

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

func (SqlWebhookStore) SaveOutgoing Uses

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

func (SqlWebhookStore) UpdateOutgoing Uses

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

func (SqlWebhookStore) UpgradeSchemaIfNeeded Uses

func (s SqlWebhookStore) UpgradeSchemaIfNeeded()

type Store Uses

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
    MarkSystemRanUnitTests()
    Close()
    DropAllTables()
}

func NewSqlStore Uses

func NewSqlStore() Store

type StoreChannel Uses

type StoreChannel chan StoreResult

type StoreResult Uses

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

type SystemStore Uses

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 Uses

func NewSqlSystemStore(sqlStore *SqlStore) SystemStore

type TeamStore Uses

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) StoreChannel
    GetTeamsForUser(userId string) StoreChannel
    RemoveMember(teamId string, userId string) StoreChannel
    RemoveAllMembersByTeam(teamId string) StoreChannel
    RemoveAllMembersByUser(userId string) StoreChannel
}

func NewSqlTeamStore Uses

func NewSqlTeamStore(sqlStore *SqlStore) TeamStore

type UserStore Uses

type UserStore interface {
    Save(user *model.User) StoreChannel
    Update(user *model.User, allowRoleUpdate bool) StoreChannel
    UpdateLastPictureUpdate(userId string) StoreChannel
    UpdateUpdateAt(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 string, service string, authData *string, email string) StoreChannel
    UpdateMfaSecret(userId, secret string) StoreChannel
    UpdateMfaActive(userId string, active bool) StoreChannel
    Get(id string) StoreChannel
    GetAll() StoreChannel
    GetAllProfiles() StoreChannel
    GetProfiles(teamId string) StoreChannel
    GetDirectProfiles(userId string) StoreChannel
    GetProfileByIds(userId []string) StoreChannel
    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
    GetEtagForDirectProfiles(userId 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
    GetUnreadCount(userId string) StoreChannel
}

func NewSqlUserStore Uses

func NewSqlUserStore(sqlStore *SqlStore) UserStore

type WebhookStore Uses

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 Uses

func NewSqlWebhookStore(sqlStore *SqlStore) WebhookStore

Package store imports 25 packages (graph). Updated 2018-04-04. Refresh now. Tools for package owners. This is a dead-end fork (no commits since the fork).