Documentation ¶
Index ¶
- Constants
- Variables
- func CheckRelationalIntegrity(ss *SqlSupplier, results chan<- store.IntegrityCheckResult)
- func IsUniqueConstraintError(err error, indexName []string) bool
- func MapStringsToQueryParams(list []string, paramPrefix string) (string, map[string]interface{})
- func NewBranchMemberFromModel(tm *model.BranchMember) *branchMember
- func NewClassMemberFromModel(cm *model.ClassMember) *classMember
- type JSONSerializable
- type Role
- type SqlAuditStore
- type SqlBranchStore
- func (s SqlBranchStore) AnalyticsBranchCount(includeDeleted bool) (int64, *model.AppError)
- func (s SqlBranchStore) AnalyticsGetBranchCountForScheme(schemeId string) (int64, *model.AppError)
- func (s SqlBranchStore) ClearAllCustomRoleAssignments() *model.AppError
- func (s SqlBranchStore) ClearCaches()
- func (s SqlBranchStore) Get(id string) (*model.Branch, *model.AppError)
- func (s SqlBranchStore) GetActiveMemberCount(branchId string, restrictions *model.ViewUsersRestrictions) (int64, *model.AppError)
- func (s SqlBranchStore) GetAll() ([]*model.Branch, *model.AppError)
- func (s SqlBranchStore) GetAllForExportAfter(limit int, afterId string) ([]*model.BranchForExport, *model.AppError)
- func (s SqlBranchStore) GetAllPage(offset int, limit int) ([]*model.Branch, *model.AppError)
- func (s SqlBranchStore) GetBranchMembersForExport(userId string) ([]*model.BranchMemberForExport, *model.AppError)
- func (s SqlBranchStore) GetBranchesByScheme(schemeId string, offset int, limit int) ([]*model.Branch, *model.AppError)
- func (s SqlBranchStore) GetBranchesByUserId(userId string) ([]*model.Branch, *model.AppError)
- func (s SqlBranchStore) GetBranchesForUser(userId string) ([]*model.BranchMember, *model.AppError)
- func (s SqlBranchStore) GetBranchesForUserWithPagination(userId string, page, perPage int) ([]*model.BranchMember, *model.AppError)
- func (s SqlBranchStore) GetByName(name string) (*model.Branch, *model.AppError)
- func (s SqlBranchStore) GetByNames(names []string) ([]*model.Branch, *model.AppError)
- func (s SqlBranchStore) GetBySchoolId(schoolId string) (*model.Branch, *model.AppError)
- func (s SqlBranchStore) GetMember(branchId string, userId string) (*model.BranchMember, *model.AppError)
- func (s SqlBranchStore) GetMembers(branchId string, offset int, limit int, ...) ([]*model.BranchMember, *model.AppError)
- func (s SqlBranchStore) GetMembersByIds(branchId string, userIds []string, restrictions *model.ViewUsersRestrictions) ([]*model.BranchMember, *model.AppError)
- func (s SqlBranchStore) GetTotalMemberCount(branchId string, restrictions *model.ViewUsersRestrictions) (int64, *model.AppError)
- func (s SqlBranchStore) GetUserBranchIds(userID string, allowFromCache bool) ([]string, *model.AppError)
- func (s SqlBranchStore) InvalidateAllBranchIdsForUser(userId string)
- func (s SqlBranchStore) MigrateBranchMembers(fromBranchId string, fromUserId string) (map[string]string, *model.AppError)
- func (s SqlBranchStore) PermanentDelete(branchId string) *model.AppError
- func (s SqlBranchStore) RemoveAllMembersByBranch(branchId string) *model.AppError
- func (s SqlBranchStore) RemoveAllMembersByUser(userId string) *model.AppError
- func (s SqlBranchStore) RemoveMember(branchId string, userId string) *model.AppError
- func (s SqlBranchStore) RemoveMembers(branchId string, userIds []string) *model.AppError
- func (s SqlBranchStore) ResetAllBranchSchemes() *model.AppError
- func (s SqlBranchStore) Save(branch *model.Branch) (*model.Branch, *model.AppError)
- func (s SqlBranchStore) SaveMember(member *model.BranchMember, maxUsersPerBranch int) (*model.BranchMember, *model.AppError)
- func (s SqlBranchStore) SaveMultipleMembers(members []*model.BranchMember, maxUsersPerBranch int) ([]*model.BranchMember, *model.AppError)
- func (s SqlBranchStore) Update(branch *model.Branch) (*model.Branch, *model.AppError)
- func (s SqlBranchStore) UpdateLastBranchIconUpdate(branchId string, curTime int64) *model.AppError
- func (s SqlBranchStore) UpdateMember(member *model.BranchMember) (*model.BranchMember, *model.AppError)
- func (s SqlBranchStore) UpdateMembersRole(branchID string, userIDs []string) *model.AppError
- func (s SqlBranchStore) UpdateMultipleMembers(members []*model.BranchMember) ([]*model.BranchMember, *model.AppError)
- func (s SqlBranchStore) UserBelongsToBranches(userId string, branchIds []string) (bool, *model.AppError)
- type SqlClassStore
- func (s SqlClassStore) ClearAllCustomRoleAssignments() *model.AppError
- func (s SqlClassStore) ClearCaches()
- func (s SqlClassStore) CreateDirectClass(user *model.User, otherUser *model.User) (*model.Class, *model.AppError)
- func (s SqlClassStore) Delete(classId string, time int64) *model.AppError
- func (s SqlClassStore) Get(id string, allowFromCache bool) (*model.Class, *model.AppError)
- func (s SqlClassStore) GetAll(branchId string) ([]*model.Class, *model.AppError)
- func (s SqlClassStore) GetAllClassMembersForUser(userId string, allowFromCache bool, includeDeleted bool) (map[string]string, *model.AppError)
- func (s SqlClassStore) GetAllClassMembersNotifyPropsForClass(classId string, allowFromCache bool) (map[string]model.StringMap, *model.AppError)
- func (s SqlClassStore) GetAllClasses(offset, limit int, opts store.ClassSearchOpts) (*model.ClassListWithBranchData, *model.AppError)
- func (s SqlClassStore) GetAllClassesCount(opts store.ClassSearchOpts) (int64, *model.AppError)
- func (s SqlClassStore) GetAllClassesForExportAfter(limit int, afterId string) ([]*model.ClassForExport, *model.AppError)
- func (s SqlClassStore) GetBranchClasses(branchId string) (*model.ClassList, *model.AppError)
- func (s SqlClassStore) GetByName(branchId string, name string, allowFromCache bool) (*model.Class, *model.AppError)
- func (s SqlClassStore) GetByNameIncludeDeleted(branchId string, name string, allowFromCache bool) (*model.Class, *model.AppError)
- func (s SqlClassStore) GetByNames(branchId string, names []string, allowFromCache bool) ([]*model.Class, *model.AppError)
- func (s SqlClassStore) GetClassMembersForExport(userId string, branchId string) ([]*model.ClassMemberForExport, *model.AppError)
- func (s SqlClassStore) GetClassMembersTimezones(classId string) ([]model.StringMap, *model.AppError)
- func (s SqlClassStore) GetClasses(branchId string, userId string, includeDeleted bool) (*model.ClassList, *model.AppError)
- func (s SqlClassStore) GetClassesBatchForIndexing(startTime, endTime int64, limit int) ([]*model.Class, *model.AppError)
- func (s SqlClassStore) GetClassesByIds(classIds []string, includeDeleted bool) ([]*model.Class, *model.AppError)
- func (s SqlClassStore) GetClassesByScheme(schemeId string, offset int, limit int) (model.ClassList, *model.AppError)
- func (s SqlClassStore) GetDeleted(branchId string, offset int, limit int, userId string) (*model.ClassList, *model.AppError)
- func (s SqlClassStore) GetDeletedByName(branchId string, name string) (*model.Class, *model.AppError)
- func (s SqlClassStore) GetFromMaster(id string) (*model.Class, *model.AppError)
- func (s SqlClassStore) GetMember(classId string, userId string) (*model.ClassMember, *model.AppError)
- func (s SqlClassStore) GetMemberCount(classId string, allowFromCache bool) (int64, *model.AppError)
- func (s SqlClassStore) GetMemberCountFromCache(classId string) int64
- func (s SqlClassStore) GetMembers(classId string, offset, limit int) (*model.ClassMembers, *model.AppError)
- func (s SqlClassStore) GetMembersByIds(classId string, userIds []string) (*model.ClassMembers, *model.AppError)
- func (s SqlClassStore) GetMembersForUser(branchId string, userId string) (*model.ClassMembers, *model.AppError)
- func (s SqlClassStore) GetMembersForUserWithPagination(branchId, userId string, page, perPage int) (*model.ClassMembers, *model.AppError)
- func (s SqlClassStore) GetMoreClasses(branchId string, userId string, offset int, limit int) (*model.ClassList, *model.AppError)
- func (s SqlClassStore) GetPublicClassesForBranch(branchId string, offset int, limit int) (*model.ClassList, *model.AppError)
- func (s SqlClassStore) InvalidateAllClassMembersForUser(userId string)
- func (s SqlClassStore) InvalidateCacheForClassMembersNotifyProps(classId string)
- func (s SqlClassStore) InvalidateClass(id string)
- func (s SqlClassStore) InvalidateClassByName(branchId, name string)
- func (s SqlClassStore) InvalidateGuestCount(classId string)
- func (s SqlClassStore) InvalidateMemberCount(classId string)
- func (s SqlClassStore) InvalidatePinnedPostCount(classId string)
- func (s SqlClassStore) IsUserInClassUseCache(userId string, classId string) bool
- func (s SqlClassStore) MigrateClassMembers(fromClassId string, fromUserId string) (map[string]string, *model.AppError)
- func (s SqlClassStore) PermanentDelete(classId string) *model.AppError
- func (s SqlClassStore) PermanentDeleteByBranch(branchId string) *model.AppError
- func (s SqlClassStore) PermanentDeleteMembersByClass(classId string) *model.AppError
- func (s SqlClassStore) PermanentDeleteMembersByUser(userId string) *model.AppError
- func (s SqlClassStore) RemoveAllDeactivatedMembers(classId string) *model.AppError
- func (s SqlClassStore) RemoveMember(classId string, userId string) *model.AppError
- func (s SqlClassStore) RemoveMembers(classId string, userIds []string) *model.AppError
- func (s SqlClassStore) ResetAllClassSchemes() *model.AppError
- func (s SqlClassStore) Restore(classId string, time int64) *model.AppError
- func (s SqlClassStore) Save(class *model.Class, maxClassesPerBranch int64) (*model.Class, *model.AppError)
- func (s SqlClassStore) SaveDirectClass(directclass *model.Class, member1 *model.ClassMember, ...) (*model.Class, *model.AppError)
- func (s SqlClassStore) SaveMember(member *model.ClassMember) (*model.ClassMember, *model.AppError)
- func (s SqlClassStore) SaveMultipleMembers(members []*model.ClassMember) ([]*model.ClassMember, *model.AppError)
- func (s SqlClassStore) SetDeleteAt(classId string, deleteAt, updateAt int64) *model.AppError
- func (s SqlClassStore) Update(class *model.Class) (*model.Class, *model.AppError)
- func (s SqlClassStore) UpdateMember(member *model.ClassMember) (*model.ClassMember, *model.AppError)
- func (s SqlClassStore) UpdateMembersRole(classID string, userIDs []string) *model.AppError
- func (s SqlClassStore) UpdateMultipleMembers(members []*model.ClassMember) ([]*model.ClassMember, *model.AppError)
- func (s SqlClassStore) UserBelongsToClasses(userId string, classIds []string) (bool, *model.AppError)
- type SqlCommandStore
- func (s SqlCommandStore) AnalyticsCommandCount(teamId string) (int64, *model.AppError)
- func (s SqlCommandStore) Delete(commandId string, time int64) *model.AppError
- func (s SqlCommandStore) Get(id string) (*model.Command, *model.AppError)
- func (s SqlCommandStore) GetByTeam(teamId string) ([]*model.Command, *model.AppError)
- func (s SqlCommandStore) GetByTrigger(teamId string, trigger string) (*model.Command, *model.AppError)
- func (s SqlCommandStore) PermanentDeleteByTeam(teamId string) *model.AppError
- func (s SqlCommandStore) PermanentDeleteByUser(userId string) *model.AppError
- func (s SqlCommandStore) Save(command *model.Command) (*model.Command, *model.AppError)
- func (s SqlCommandStore) Update(cmd *model.Command) (*model.Command, *model.AppError)
- type SqlCommandWebhookStore
- func (s SqlCommandWebhookStore) Cleanup()
- func (s SqlCommandWebhookStore) Get(id string) (*model.CommandWebhook, *model.AppError)
- func (s SqlCommandWebhookStore) Save(webhook *model.CommandWebhook) (*model.CommandWebhook, *model.AppError)
- func (s SqlCommandWebhookStore) TryUse(id string, limit int) *model.AppError
- type SqlComplianceStore
- func (s SqlComplianceStore) ComplianceExport(job *model.Compliance) ([]*model.CompliancePost, *model.AppError)
- func (s SqlComplianceStore) Get(id string) (*model.Compliance, *model.AppError)
- func (s SqlComplianceStore) GetAll(offset, limit int) (model.Compliances, *model.AppError)
- func (s SqlComplianceStore) MessageExport(after int64, limit int) ([]*model.MessageExport, *model.AppError)
- func (s SqlComplianceStore) Save(compliance *model.Compliance) (*model.Compliance, *model.AppError)
- func (s SqlComplianceStore) Update(compliance *model.Compliance) (*model.Compliance, *model.AppError)
- type SqlEmojiStore
- func (es SqlEmojiStore) Delete(emoji *model.Emoji, time int64) *model.AppError
- func (es SqlEmojiStore) Get(id string, allowFromCache bool) (*model.Emoji, *model.AppError)
- func (es SqlEmojiStore) GetByName(name string, allowFromCache bool) (*model.Emoji, *model.AppError)
- func (es SqlEmojiStore) GetList(offset, limit int, sort string) ([]*model.Emoji, *model.AppError)
- func (es SqlEmojiStore) GetMultipleByName(names []string) ([]*model.Emoji, *model.AppError)
- func (es SqlEmojiStore) Save(emoji *model.Emoji) (*model.Emoji, *model.AppError)
- func (es SqlEmojiStore) Search(name string, prefixOnly bool, limit int) ([]*model.Emoji, *model.AppError)
- type SqlFileInfoStore
- func (fs SqlFileInfoStore) AttachToPost(fileId, postId, creatorId string) *model.AppError
- func (fs SqlFileInfoStore) ClearCaches()
- func (fs SqlFileInfoStore) DeleteForPost(postId string) (string, *model.AppError)
- func (fs SqlFileInfoStore) Get(id string) (*model.FileInfo, *model.AppError)
- func (fs SqlFileInfoStore) GetByPath(path string) (*model.FileInfo, *model.AppError)
- func (fs SqlFileInfoStore) GetForPost(postId string, readFromMaster, includeDeleted, allowFromCache bool) ([]*model.FileInfo, *model.AppError)
- func (fs SqlFileInfoStore) GetForUser(userId string) ([]*model.FileInfo, *model.AppError)
- func (fs SqlFileInfoStore) GetWithOptions(page, perPage int, opt *model.GetFileInfosOptions) ([]*model.FileInfo, *model.AppError)
- func (fs SqlFileInfoStore) InvalidateFileInfosForPostCache(postId string, deleted bool)
- func (fs SqlFileInfoStore) PermanentDelete(fileId string) *model.AppError
- func (fs SqlFileInfoStore) PermanentDeleteBatch(endTime int64, limit int64) (int64, *model.AppError)
- func (fs SqlFileInfoStore) PermanentDeleteByUser(userId string) (int64, *model.AppError)
- func (fs SqlFileInfoStore) Save(info *model.FileInfo) (*model.FileInfo, *model.AppError)
- type SqlJobStore
- func (jss SqlJobStore) Delete(id string) (string, *model.AppError)
- func (jss SqlJobStore) Get(id string) (*model.Job, *model.AppError)
- func (jss SqlJobStore) GetAllByStatus(status string) ([]*model.Job, *model.AppError)
- func (jss SqlJobStore) GetAllByType(jobType string) ([]*model.Job, *model.AppError)
- func (jss SqlJobStore) GetAllByTypePage(jobType string, offset int, limit int) ([]*model.Job, *model.AppError)
- func (jss SqlJobStore) GetAllPage(offset int, limit int) ([]*model.Job, *model.AppError)
- func (jss SqlJobStore) GetCountByStatusAndType(status string, jobType string) (int64, *model.AppError)
- func (jss SqlJobStore) GetNewestJobByStatusAndType(status string, jobType string) (*model.Job, *model.AppError)
- func (jss SqlJobStore) Save(job *model.Job) (*model.Job, *model.AppError)
- func (jss SqlJobStore) UpdateOptimistically(job *model.Job, currentStatus string) (bool, *model.AppError)
- func (jss SqlJobStore) UpdateStatus(id string, status string) (*model.Job, *model.AppError)
- func (jss SqlJobStore) UpdateStatusOptimistically(id string, currentStatus string, newStatus string) (bool, *model.AppError)
- type SqlLicenseStore
- type SqlLinkMetadataStore
- type SqlOAuthStore
- func (as SqlOAuthStore) DeleteApp(id string) *model.AppError
- func (as SqlOAuthStore) GetAccessData(token string) (*model.AccessData, *model.AppError)
- func (as SqlOAuthStore) GetAccessDataByRefreshToken(token string) (*model.AccessData, *model.AppError)
- func (as SqlOAuthStore) GetAccessDataByUserForApp(userId, clientId string) ([]*model.AccessData, *model.AppError)
- func (as SqlOAuthStore) GetApp(id string) (*model.OAuthApp, *model.AppError)
- func (as SqlOAuthStore) GetAppByUser(userId string, offset, limit int) ([]*model.OAuthApp, *model.AppError)
- func (as SqlOAuthStore) GetApps(offset, limit int) ([]*model.OAuthApp, *model.AppError)
- func (as SqlOAuthStore) GetAuthData(code string) (*model.AuthData, *model.AppError)
- func (as SqlOAuthStore) GetAuthorizedApps(userId string, offset, limit int) ([]*model.OAuthApp, *model.AppError)
- func (as SqlOAuthStore) GetPreviousAccessData(userId, clientId string) (*model.AccessData, *model.AppError)
- func (as SqlOAuthStore) PermanentDeleteAuthDataByUser(userId string) *model.AppError
- func (as SqlOAuthStore) RemoveAccessData(token string) *model.AppError
- func (as SqlOAuthStore) RemoveAllAccessData() *model.AppError
- func (as SqlOAuthStore) RemoveAuthData(code string) *model.AppError
- func (as SqlOAuthStore) SaveAccessData(accessData *model.AccessData) (*model.AccessData, *model.AppError)
- func (as SqlOAuthStore) SaveApp(app *model.OAuthApp) (*model.OAuthApp, *model.AppError)
- func (as SqlOAuthStore) SaveAuthData(authData *model.AuthData) (*model.AuthData, *model.AppError)
- func (as SqlOAuthStore) UpdateAccessData(accessData *model.AccessData) (*model.AccessData, *model.AppError)
- func (as SqlOAuthStore) UpdateApp(app *model.OAuthApp) (*model.OAuthApp, *model.AppError)
- type SqlPreferenceStore
- func (s SqlPreferenceStore) CleanupFlagsBatch(limit int64) (int64, *model.AppError)
- func (s SqlPreferenceStore) Delete(userId, category, name string) *model.AppError
- func (s SqlPreferenceStore) DeleteCategory(userId string, category string) *model.AppError
- func (s SqlPreferenceStore) DeleteCategoryAndName(category string, name string) *model.AppError
- func (s SqlPreferenceStore) Get(userId string, category string, name string) (*model.Preference, *model.AppError)
- func (s SqlPreferenceStore) GetAll(userId string) (model.Preferences, *model.AppError)
- func (s SqlPreferenceStore) GetCategory(userId string, category string) (model.Preferences, *model.AppError)
- func (s SqlPreferenceStore) PermanentDeleteByUser(userId string) *model.AppError
- func (s SqlPreferenceStore) Save(preferences *model.Preferences) *model.AppError
- type SqlReactionStore
- func (s *SqlReactionStore) BulkGetForPosts(postIds []string) ([]*model.Reaction, *model.AppError)
- func (s *SqlReactionStore) Delete(reaction *model.Reaction) (*model.Reaction, *model.AppError)
- func (s *SqlReactionStore) DeleteAllWithEmojiName(emojiName string) *model.AppError
- func (s *SqlReactionStore) GetForPost(postId string, allowFromCache bool) ([]*model.Reaction, *model.AppError)
- func (s *SqlReactionStore) PermanentDeleteBatch(endTime int64, limit int64) (int64, *model.AppError)
- func (s *SqlReactionStore) Save(reaction *model.Reaction) (*model.Reaction, *model.AppError)
- type SqlRoleStore
- func (s *SqlRoleStore) AllClassSchemeRoles() ([]*model.Role, *model.AppError)
- func (s *SqlRoleStore) ClassHigherScopedPermissions(roleNames []string) (map[string]*model.RolePermissions, *model.AppError)
- func (s *SqlRoleStore) ClassRolesUnderBranchRole(roleName string) ([]*model.Role, *model.AppError)
- func (s *SqlRoleStore) Delete(roleId string) (*model.Role, *model.AppError)
- func (s *SqlRoleStore) Get(roleId string) (*model.Role, *model.AppError)
- func (s *SqlRoleStore) GetAll() ([]*model.Role, *model.AppError)
- func (s *SqlRoleStore) GetByName(name string) (*model.Role, *model.AppError)
- func (s *SqlRoleStore) GetByNames(names []string) ([]*model.Role, *model.AppError)
- func (s *SqlRoleStore) PermanentDeleteAll() *model.AppError
- func (s *SqlRoleStore) Save(role *model.Role) (*model.Role, *model.AppError)
- type SqlSchemeStore
- func (s *SqlSchemeStore) CountByScope(scope string) (int64, *model.AppError)
- func (s *SqlSchemeStore) CountWithoutPermission(schemeScope, permissionID string, roleScope model.RoleScope, ...) (int64, *model.AppError)
- func (s *SqlSchemeStore) Delete(schemeId string) (*model.Scheme, *model.AppError)
- func (s *SqlSchemeStore) Get(schemeId string) (*model.Scheme, *model.AppError)
- func (s *SqlSchemeStore) GetAllPage(scope string, offset int, limit int) ([]*model.Scheme, *model.AppError)
- func (s *SqlSchemeStore) GetByName(schemeName string) (*model.Scheme, *model.AppError)
- func (s *SqlSchemeStore) PermanentDeleteAll() *model.AppError
- func (s *SqlSchemeStore) Save(scheme *model.Scheme) (*model.Scheme, *model.AppError)
- type SqlSessionStore
- func (me SqlSessionStore) AnalyticsSessionCount() (int64, *model.AppError)
- func (me SqlSessionStore) Cleanup(expiryTime int64, batchSize int64)
- func (me SqlSessionStore) Get(sessionIdOrToken string) (*model.Session, *model.AppError)
- func (me SqlSessionStore) GetSessions(userId string) ([]*model.Session, *model.AppError)
- func (me SqlSessionStore) GetSessionsWithActiveDeviceIds(userId string) ([]*model.Session, *model.AppError)
- func (me SqlSessionStore) PermanentDeleteSessionsByUser(userId string) *model.AppError
- func (me SqlSessionStore) Remove(sessionIdOrToken string) *model.AppError
- func (me SqlSessionStore) RemoveAllSessions() *model.AppError
- func (me SqlSessionStore) Save(session *model.Session) (*model.Session, *model.AppError)
- func (me SqlSessionStore) UpdateDeviceId(id string, deviceId string, expiresAt int64) (string, *model.AppError)
- func (me SqlSessionStore) UpdateLastActivityAt(sessionId string, time int64) *model.AppError
- func (me SqlSessionStore) UpdateProps(session *model.Session) *model.AppError
- func (me SqlSessionStore) UpdateRoles(userId, roles string) (string, *model.AppError)
- type SqlStatusStore
- func (s SqlStatusStore) Get(userId string) (*model.Status, *model.AppError)
- func (s SqlStatusStore) GetByIds(userIds []string) ([]*model.Status, *model.AppError)
- func (s SqlStatusStore) GetTotalActiveUsersCount() (int64, *model.AppError)
- func (s SqlStatusStore) ResetAll() *model.AppError
- func (s SqlStatusStore) SaveOrUpdate(status *model.Status) *model.AppError
- func (s SqlStatusStore) UpdateLastActivityAt(userId string, lastActivityAt int64) *model.AppError
- type SqlStore
- type SqlSupplier
- func (ss *SqlSupplier) AlterColumnDefaultIfExists(tableName string, columnName string, mySqlColDefault *string, ...) bool
- func (ss *SqlSupplier) AlterColumnTypeIfExists(tableName string, columnName string, mySqlColType string, ...) bool
- func (ss *SqlSupplier) AlterPrimaryKey(tableName string, columnNames []string) bool
- func (ss *SqlSupplier) Audit() store.AuditStore
- func (ss *SqlSupplier) Branch() store.BranchStore
- func (ss *SqlSupplier) CheckIntegrity() <-chan store.IntegrityCheckResult
- func (ss *SqlSupplier) Class() store.ClassStore
- func (ss *SqlSupplier) Close()
- func (ss *SqlSupplier) ClusterDiscovery() store.ClusterDiscoveryStore
- func (ss *SqlSupplier) Command() store.CommandStore
- func (ss *SqlSupplier) CommandWebhook() store.CommandWebhookStore
- func (ss *SqlSupplier) Compliance() store.ComplianceStore
- func (ss *SqlSupplier) Context() context.Context
- func (ss *SqlSupplier) CreateColumnIfNotExists(tableName string, columnName string, mySqlColType string, ...) bool
- func (ss *SqlSupplier) CreateColumnIfNotExistsNoDefault(tableName string, columnName string, mySqlColType string, ...) bool
- func (ss *SqlSupplier) CreateCompositeIndexIfNotExists(indexName string, tableName string, columnNames []string) bool
- func (ss *SqlSupplier) CreateFullTextIndexIfNotExists(indexName string, tableName string, columnName string) bool
- func (ss *SqlSupplier) CreateIndexIfNotExists(indexName string, tableName string, columnName string) bool
- func (ss *SqlSupplier) CreateUniqueIndexIfNotExists(indexName string, tableName string, columnName string) bool
- func (ss *SqlSupplier) DoesColumnExist(tableName string, columnName string) bool
- func (ss *SqlSupplier) DoesTableExist(tableName string) bool
- func (ss *SqlSupplier) DoesTriggerExist(triggerName string) bool
- func (ss *SqlSupplier) DriverName() string
- func (ss *SqlSupplier) DropAllTables()
- func (ss *SqlSupplier) Emoji() store.EmojiStore
- func (ss *SqlSupplier) FileInfo() store.FileInfoStore
- func (ss *SqlSupplier) GetAllConns() []*gorp.DbMap
- func (ss *SqlSupplier) GetCurrentSchemaVersion() string
- func (ss *SqlSupplier) GetMaster() *gorp.DbMap
- func (ss *SqlSupplier) GetMaxLengthOfColumnIfExists(tableName string, columnName string) string
- func (ss *SqlSupplier) GetReplica() *gorp.DbMap
- func (ss *SqlSupplier) GetSearchReplica() *gorp.DbMap
- func (ss *SqlSupplier) Job() store.JobStore
- func (ss *SqlSupplier) License() store.LicenseStore
- func (ss *SqlSupplier) LinkMetadata() store.LinkMetadataStore
- func (ss *SqlSupplier) LockToMaster()
- func (ss *SqlSupplier) MarkSystemRanUnitTests()
- func (ss *SqlSupplier) OAuth() store.OAuthStore
- func (ss *SqlSupplier) Preference() store.PreferenceStore
- func (ss *SqlSupplier) Reaction() store.ReactionStore
- func (ss *SqlSupplier) RemoveColumnIfExists(tableName string, columnName string) bool
- func (ss *SqlSupplier) RemoveIndexIfExists(indexName string, tableName string) bool
- func (ss *SqlSupplier) RemoveTableIfExists(tableName string) bool
- func (ss *SqlSupplier) RenameColumnIfExists(tableName string, oldColumnName string, newColumnName string, colType string) bool
- func (ss *SqlSupplier) Role() store.RoleStore
- func (ss *SqlSupplier) Scheme() store.SchemeStore
- func (ss *SqlSupplier) Session() store.SessionStore
- func (ss *SqlSupplier) SetContext(context context.Context)
- func (ss *SqlSupplier) Status() store.StatusStore
- func (ss *SqlSupplier) System() store.SystemStore
- func (ss *SqlSupplier) TermsOfService() store.TermsOfServiceStore
- func (ss *SqlSupplier) Token() store.TokenStore
- func (ss *SqlSupplier) TotalMasterDbConnections() int
- func (ss *SqlSupplier) TotalReadDbConnections() int
- func (ss *SqlSupplier) TotalSearchDbConnections() int
- func (ss *SqlSupplier) UnlockFromMaster()
- func (ss *SqlSupplier) User() store.UserStore
- func (ss *SqlSupplier) UserAccessToken() store.UserAccessTokenStore
- func (ss *SqlSupplier) UserTermsOfService() store.UserTermsOfServiceStore
- func (ss *SqlSupplier) Webhook() store.WebhookStore
- type SqlSupplierStores
- type SqlSystemStore
- func (s SqlSystemStore) Get() (model.StringMap, *model.AppError)
- func (s SqlSystemStore) GetByName(name string) (*model.System, *model.AppError)
- func (s SqlSystemStore) PermanentDeleteByName(name string) (*model.System, *model.AppError)
- func (s SqlSystemStore) Save(system *model.System) *model.AppError
- func (s SqlSystemStore) SaveOrUpdate(system *model.System) *model.AppError
- func (s SqlSystemStore) Update(system *model.System) *model.AppError
- type SqlTermsOfServiceStore
- func (s SqlTermsOfServiceStore) Get(id string, allowFromCache bool) (*model.TermsOfService, *model.AppError)
- func (s SqlTermsOfServiceStore) GetLatest(allowFromCache bool) (*model.TermsOfService, *model.AppError)
- func (s SqlTermsOfServiceStore) Save(termsOfService *model.TermsOfService) (*model.TermsOfService, *model.AppError)
- type SqlTokenStore
- func (s SqlTokenStore) Cleanup()
- func (s SqlTokenStore) Delete(token string) *model.AppError
- func (s SqlTokenStore) GetByToken(tokenString string) (*model.Token, *model.AppError)
- func (s SqlTokenStore) RemoveAllTokensByType(tokenType string) *model.AppError
- func (s SqlTokenStore) Save(token *model.Token) *model.AppError
- type SqlUserAccessTokenStore
- func (s SqlUserAccessTokenStore) Delete(tokenId string) *model.AppError
- func (s SqlUserAccessTokenStore) DeleteAllForUser(userId string) *model.AppError
- func (s SqlUserAccessTokenStore) Get(tokenId string) (*model.UserAccessToken, *model.AppError)
- func (s SqlUserAccessTokenStore) GetAll(offset, limit int) ([]*model.UserAccessToken, *model.AppError)
- func (s SqlUserAccessTokenStore) GetByToken(tokenString string) (*model.UserAccessToken, *model.AppError)
- func (s SqlUserAccessTokenStore) GetByUser(userId string, offset, limit int) ([]*model.UserAccessToken, *model.AppError)
- func (s SqlUserAccessTokenStore) Save(token *model.UserAccessToken) (*model.UserAccessToken, *model.AppError)
- func (s SqlUserAccessTokenStore) Search(term string) ([]*model.UserAccessToken, *model.AppError)
- func (s SqlUserAccessTokenStore) UpdateTokenDisable(tokenId string) *model.AppError
- func (s SqlUserAccessTokenStore) UpdateTokenEnable(tokenId string) *model.AppError
- type SqlUserStore
- func (us SqlUserStore) AnalyticsActiveCount(timePeriod int64, options model.UserCountOptions) (int64, *model.AppError)
- func (us SqlUserStore) AnalyticsGetInactiveUsersCount() (int64, *model.AppError)
- func (us SqlUserStore) AnalyticsGetSystemAdminCount() (int64, *model.AppError)
- func (us SqlUserStore) ClearAllCustomRoleAssignments() *model.AppError
- func (us SqlUserStore) ClearCaches()
- func (us SqlUserStore) Count(options model.UserCountOptions) (int64, *model.AppError)
- func (us SqlUserStore) Get(id string) (*model.User, *model.AppError)
- func (us SqlUserStore) GetAll() ([]*model.User, *model.AppError)
- func (us SqlUserStore) GetAllAfter(limit int, afterId string) ([]*model.User, *model.AppError)
- func (us SqlUserStore) GetAllProfiles(options *model.UserGetOptions) ([]*model.User, *model.AppError)
- func (us SqlUserStore) GetAllProfilesInClass(classId string, allowFromCache bool) (map[string]*model.User, *model.AppError)
- func (us SqlUserStore) GetAllUsingAuthService(authService string) ([]*model.User, *model.AppError)
- func (us SqlUserStore) GetByAuth(authData *string, authService string) (*model.User, *model.AppError)
- func (us SqlUserStore) GetByEmail(email string) (*model.User, *model.AppError)
- func (us SqlUserStore) GetByUsername(username string) (*model.User, *model.AppError)
- func (us SqlUserStore) GetEtagForAllProfiles() string
- func (us SqlUserStore) GetEtagForProfiles(teamId string) string
- func (us SqlUserStore) GetForLogin(loginId string, allowSignInWithUsername, allowSignInWithEmail bool) (*model.User, *model.AppError)
- func (us SqlUserStore) GetNewUsersForBranch(teamId string, offset, limit int, ...) ([]*model.User, *model.AppError)
- func (us SqlUserStore) GetProfileByIds(userIds []string, options *store.UserGetByIdsOpts, _ bool) ([]*model.User, *model.AppError)
- func (us SqlUserStore) GetProfiles(options *model.UserGetOptions) ([]*model.User, *model.AppError)
- func (us SqlUserStore) GetProfilesByUsernames(usernames []string, viewRestrictions *model.ViewUsersRestrictions) ([]*model.User, *model.AppError)
- func (us SqlUserStore) GetProfilesInClass(classId string, offset int, limit int) ([]*model.User, *model.AppError)
- func (us SqlUserStore) GetProfilesInClassByStatus(classId string, offset int, limit int) ([]*model.User, *model.AppError)
- func (us SqlUserStore) GetProfilesNotInClass(teamId string, classId string, groupConstrained bool, offset int, limit int, ...) ([]*model.User, *model.AppError)
- func (us SqlUserStore) GetProfilesWithoutBranch(options *model.UserGetOptions) ([]*model.User, *model.AppError)
- func (us SqlUserStore) GetRecentlyActiveUsersForBranch(teamId string, offset, limit int, ...) ([]*model.User, *model.AppError)
- func (us SqlUserStore) GetSystemAdminProfiles() (map[string]*model.User, *model.AppError)
- func (us SqlUserStore) GetUsersBatchForIndexing(startTime, endTime int64, limit int) ([]*model.UserForIndexing, *model.AppError)
- func (us SqlUserStore) InferSystemInstallDate() (int64, *model.AppError)
- func (us SqlUserStore) InvalidateProfileCacheForUser(userId string)
- func (us SqlUserStore) InvalidateProfilesInClassCache(classId string)
- func (us SqlUserStore) InvalidateProfilesInClassCacheByUser(userId string)
- func (us SqlUserStore) PermanentDelete(userId string) *model.AppError
- func (us SqlUserStore) ResetLastPictureUpdate(userId string) *model.AppError
- func (us SqlUserStore) Save(user *model.User) (*model.User, *model.AppError)
- func (us SqlUserStore) Update(user *model.User, trustedUpdateData bool) (*model.UserUpdate, *model.AppError)
- func (us SqlUserStore) UpdateAuthData(userId string, service string, authData *string, email string, resetMfa bool) (string, *model.AppError)
- func (us SqlUserStore) UpdateFailedPasswordAttempts(userId string, attempts int) *model.AppError
- func (us SqlUserStore) UpdateLastPictureUpdate(userId string) *model.AppError
- func (us SqlUserStore) UpdateMfaActive(userId string, active bool) *model.AppError
- func (us SqlUserStore) UpdateMfaSecret(userId, secret string) *model.AppError
- func (us SqlUserStore) UpdatePassword(userId, hashedPassword string) *model.AppError
- func (us SqlUserStore) UpdateUpdateAt(userId string) (int64, *model.AppError)
- func (us SqlUserStore) VerifyEmail(userId, email string) (string, *model.AppError)
- type SqlUserTermsOfServiceStore
- func (s SqlUserTermsOfServiceStore) Delete(userId, termsOfServiceId string) *model.AppError
- func (s SqlUserTermsOfServiceStore) GetByUser(userId string) (*model.UserTermsOfService, *model.AppError)
- func (s SqlUserTermsOfServiceStore) Save(userTermsOfService *model.UserTermsOfService) (*model.UserTermsOfService, *model.AppError)
- type SqlWebhookStore
- func (s SqlWebhookStore) AnalyticsIncomingCount(teamId string) (int64, *model.AppError)
- func (s SqlWebhookStore) AnalyticsOutgoingCount(teamId string) (int64, *model.AppError)
- func (s SqlWebhookStore) ClearCaches()
- func (s SqlWebhookStore) DeleteIncoming(webhookId string, time int64) *model.AppError
- func (s SqlWebhookStore) DeleteOutgoing(webhookId string, time int64) *model.AppError
- func (s SqlWebhookStore) GetIncoming(id string, allowFromCache bool) (*model.IncomingWebhook, *model.AppError)
- func (s SqlWebhookStore) GetIncomingByChannel(channelId string) ([]*model.IncomingWebhook, *model.AppError)
- func (s SqlWebhookStore) GetIncomingByTeam(teamId string, offset, limit int) ([]*model.IncomingWebhook, *model.AppError)
- func (s SqlWebhookStore) GetIncomingByTeamByUser(teamId string, userId string, offset, limit int) ([]*model.IncomingWebhook, *model.AppError)
- func (s SqlWebhookStore) GetIncomingList(offset, limit int) ([]*model.IncomingWebhook, *model.AppError)
- func (s SqlWebhookStore) GetIncomingListByUser(userId string, offset, limit int) ([]*model.IncomingWebhook, *model.AppError)
- func (s SqlWebhookStore) GetOutgoing(id string) (*model.OutgoingWebhook, *model.AppError)
- func (s SqlWebhookStore) GetOutgoingByChannel(channelId string, offset, limit int) ([]*model.OutgoingWebhook, *model.AppError)
- func (s SqlWebhookStore) GetOutgoingByChannelByUser(channelId string, userId string, offset, limit int) ([]*model.OutgoingWebhook, *model.AppError)
- func (s SqlWebhookStore) GetOutgoingByTeam(teamId string, offset, limit int) ([]*model.OutgoingWebhook, *model.AppError)
- func (s SqlWebhookStore) GetOutgoingByTeamByUser(teamId string, userId string, offset, limit int) ([]*model.OutgoingWebhook, *model.AppError)
- func (s SqlWebhookStore) GetOutgoingList(offset, limit int) ([]*model.OutgoingWebhook, *model.AppError)
- func (s SqlWebhookStore) GetOutgoingListByUser(userId string, offset, limit int) ([]*model.OutgoingWebhook, *model.AppError)
- func (s SqlWebhookStore) InvalidateWebhookCache(webhookId string)
- func (s SqlWebhookStore) PermanentDeleteIncomingByChannel(channelId string) *model.AppError
- func (s SqlWebhookStore) PermanentDeleteIncomingByUser(userId string) *model.AppError
- func (s SqlWebhookStore) PermanentDeleteOutgoingByChannel(channelId string) *model.AppError
- func (s SqlWebhookStore) PermanentDeleteOutgoingByUser(userId string) *model.AppError
- func (s SqlWebhookStore) SaveIncoming(webhook *model.IncomingWebhook) (*model.IncomingWebhook, *model.AppError)
- func (s SqlWebhookStore) SaveOutgoing(webhook *model.OutgoingWebhook) (*model.OutgoingWebhook, *model.AppError)
- func (s SqlWebhookStore) UpdateIncoming(hook *model.IncomingWebhook) (*model.IncomingWebhook, *model.AppError)
- func (s SqlWebhookStore) UpdateOutgoing(hook *model.OutgoingWebhook) (*model.OutgoingWebhook, *model.AppError)
- type TraceOnAdapter
- type UserWithClass
- type UserWithLastActivityAt
Constants ¶
const ( ALL_CLASS_MEMBERS_FOR_USER_CACHE_SIZE = model.SESSION_CACHE_SIZE ALL_CLASS_MEMBERS_FOR_USER_CACHE_SEC = 900 // 15 mins ALL_CLASS_MEMBERS_NOTIFY_PROPS_FOR_CLASS_CACHE_SIZE = model.SESSION_CACHE_SIZE ALL_CLASS_MEMBERS_NOTIFY_PROPS_FOR_CLASS_CACHE_SEC = 1800 // 30 mins CLASS_CACHE_SEC = 900 // 15 mins )
const ( INDEX_TYPE_FULL_TEXT = "full_text" INDEX_TYPE_DEFAULT = "default" DB_PING_ATTEMPTS = 18 DB_PING_TIMEOUT_SECS = 10 )
const ( EXIT_GENERIC_FAILURE = 1 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 EXIT_REMOVE_TABLE = 134 EXIT_CREATE_INDEX_SQLITE = 135 EXIT_REMOVE_INDEX_SQLITE = 136 EXIT_TABLE_EXISTS_SQLITE = 137 EXIT_DOES_COLUMN_EXISTS_SQLITE = 138 EXIT_ALTER_PRIMARY_KEY = 139 )
const (
BRANCH_MEMBER_EXISTS_ERROR = "store.sql_branch.save_member.exists.app_error"
)
const (
MAX_GROUP_CHANNELS_FOR_PROFILES = 50
)
const (
MISSING_STATUS_ERROR = "store.sql_status.get.missing.app_error"
)
const (
SESSIONS_CLEANUP_DELAY_MILLISECONDS = 100
)
const (
UPDATE_POST_HAS_REACTIONS_ON_DELETE_QUERY = `` /* 148-byte string literal not displayed */
)
Variables ¶
var ( USER_SEARCH_TYPE_NAMES_NO_FULL_NAME = []string{"Username", "Nickname"} USER_SEARCH_TYPE_NAMES = []string{"Username", "FirstName", "LastName", "Nickname"} USER_SEARCH_TYPE_ALL_NO_FULL_NAME = []string{"Username", "Nickname", "Email"} USER_SEARCH_TYPE_ALL = []string{"Username", "FirstName", "LastName", "Nickname", "Email"} )
var CLASS_MEMBERS_WITH_SCHEME_SELECT_QUERY = `` /* 565-byte string literal not displayed */
Functions ¶
func CheckRelationalIntegrity ¶
func CheckRelationalIntegrity(ss *SqlSupplier, results chan<- store.IntegrityCheckResult)
func IsUniqueConstraintError ¶
func MapStringsToQueryParams ¶
Converts a list of strings into a list of query parameters and a named parameter map that can be used as part of a SQL query.
func NewBranchMemberFromModel ¶
func NewBranchMemberFromModel(tm *model.BranchMember) *branchMember
func NewClassMemberFromModel ¶
func NewClassMemberFromModel(cm *model.ClassMember) *classMember
Types ¶
type JSONSerializable ¶
type JSONSerializable interface {
ToJson() string
}
type Role ¶
type Role struct { Id string Name string DisplayName string Description string CreateAt int64 UpdateAt int64 DeleteAt int64 Permissions string SchemeManaged bool BuiltIn bool }
func NewRoleFromModel ¶
type SqlAuditStore ¶
type SqlAuditStore struct {
SqlStore
}
func (SqlAuditStore) PermanentDeleteByUser ¶
func (s SqlAuditStore) PermanentDeleteByUser(userId string) *model.AppError
type SqlBranchStore ¶
type SqlBranchStore struct {
SqlStore
}
func (SqlBranchStore) AnalyticsBranchCount ¶
func (s SqlBranchStore) AnalyticsBranchCount(includeDeleted bool) (int64, *model.AppError)
func (SqlBranchStore) AnalyticsGetBranchCountForScheme ¶
func (s SqlBranchStore) AnalyticsGetBranchCountForScheme(schemeId string) (int64, *model.AppError)
func (SqlBranchStore) ClearAllCustomRoleAssignments ¶
func (s SqlBranchStore) ClearAllCustomRoleAssignments() *model.AppError
func (SqlBranchStore) ClearCaches ¶
func (s SqlBranchStore) ClearCaches()
func (SqlBranchStore) GetActiveMemberCount ¶
func (s SqlBranchStore) GetActiveMemberCount(branchId string, restrictions *model.ViewUsersRestrictions) (int64, *model.AppError)
func (SqlBranchStore) GetAllForExportAfter ¶
func (s SqlBranchStore) GetAllForExportAfter(limit int, afterId string) ([]*model.BranchForExport, *model.AppError)
func (SqlBranchStore) GetAllPage ¶
func (SqlBranchStore) GetBranchMembersForExport ¶
func (s SqlBranchStore) GetBranchMembersForExport(userId string) ([]*model.BranchMemberForExport, *model.AppError)
func (SqlBranchStore) GetBranchesByScheme ¶
func (SqlBranchStore) GetBranchesByUserId ¶
func (SqlBranchStore) GetBranchesForUser ¶
func (s SqlBranchStore) GetBranchesForUser(userId string) ([]*model.BranchMember, *model.AppError)
func (SqlBranchStore) GetBranchesForUserWithPagination ¶
func (s SqlBranchStore) GetBranchesForUserWithPagination(userId string, page, perPage int) ([]*model.BranchMember, *model.AppError)
func (SqlBranchStore) GetByNames ¶
func (SqlBranchStore) GetBySchoolId ¶
func (SqlBranchStore) GetMember ¶
func (s SqlBranchStore) GetMember(branchId string, userId string) (*model.BranchMember, *model.AppError)
func (SqlBranchStore) GetMembers ¶
func (s SqlBranchStore) GetMembers(branchId string, offset int, limit int, branchMembersGetOptions *model.BranchMembersGetOptions) ([]*model.BranchMember, *model.AppError)
func (SqlBranchStore) GetMembersByIds ¶
func (s SqlBranchStore) GetMembersByIds(branchId string, userIds []string, restrictions *model.ViewUsersRestrictions) ([]*model.BranchMember, *model.AppError)
func (SqlBranchStore) GetTotalMemberCount ¶
func (s SqlBranchStore) GetTotalMemberCount(branchId string, restrictions *model.ViewUsersRestrictions) (int64, *model.AppError)
func (SqlBranchStore) GetUserBranchIds ¶
func (s SqlBranchStore) GetUserBranchIds(userID string, allowFromCache bool) ([]string, *model.AppError)
GetUserBranchIds get the branch ids to which the user belongs to. allowFromCache parameter does not have any effect in this Store
func (SqlBranchStore) InvalidateAllBranchIdsForUser ¶
func (s SqlBranchStore) InvalidateAllBranchIdsForUser(userId string)
func (SqlBranchStore) MigrateBranchMembers ¶
func (s SqlBranchStore) MigrateBranchMembers(fromBranchId string, fromUserId string) (map[string]string, *model.AppError)
This function does the Advanced Permissions Phase 2 migration for BranchMember objects. It performs the migration in batches as a single transaction per batch to ensure consistency but to also minimise execution time to avoid causing unnecessary table locks. **THIS FUNCTION SHOULD NOT BE USED FOR ANY OTHER PURPOSE.** Executing this function *after* the new Schemes functionality has been used on an installation will have unintended consequences.
func (SqlBranchStore) PermanentDelete ¶
func (s SqlBranchStore) PermanentDelete(branchId string) *model.AppError
func (SqlBranchStore) RemoveAllMembersByBranch ¶
func (s SqlBranchStore) RemoveAllMembersByBranch(branchId string) *model.AppError
func (SqlBranchStore) RemoveAllMembersByUser ¶
func (s SqlBranchStore) RemoveAllMembersByUser(userId string) *model.AppError
func (SqlBranchStore) RemoveMember ¶
func (s SqlBranchStore) RemoveMember(branchId string, userId string) *model.AppError
func (SqlBranchStore) RemoveMembers ¶
func (s SqlBranchStore) RemoveMembers(branchId string, userIds []string) *model.AppError
func (SqlBranchStore) ResetAllBranchSchemes ¶
func (s SqlBranchStore) ResetAllBranchSchemes() *model.AppError
func (SqlBranchStore) Save ¶
Save adds the branch to the database if a branch with the same name does not already exist in the database. It returns the branch added if the operation is successful.
func (SqlBranchStore) SaveMember ¶
func (s SqlBranchStore) SaveMember(member *model.BranchMember, maxUsersPerBranch int) (*model.BranchMember, *model.AppError)
func (SqlBranchStore) SaveMultipleMembers ¶
func (s SqlBranchStore) SaveMultipleMembers(members []*model.BranchMember, maxUsersPerBranch int) ([]*model.BranchMember, *model.AppError)
func (SqlBranchStore) Update ¶
Update updates the details of the branch passed as the parameter using the branch Id if the branch exists in the database. It returns the updated branch if the operation is successful.
func (SqlBranchStore) UpdateLastBranchIconUpdate ¶
func (s SqlBranchStore) UpdateLastBranchIconUpdate(branchId string, curTime int64) *model.AppError
func (SqlBranchStore) UpdateMember ¶
func (s SqlBranchStore) UpdateMember(member *model.BranchMember) (*model.BranchMember, *model.AppError)
func (SqlBranchStore) UpdateMembersRole ¶
func (s SqlBranchStore) UpdateMembersRole(branchID string, userIDs []string) *model.AppError
func (SqlBranchStore) UpdateMultipleMembers ¶
func (s SqlBranchStore) UpdateMultipleMembers(members []*model.BranchMember) ([]*model.BranchMember, *model.AppError)
func (SqlBranchStore) UserBelongsToBranches ¶
type SqlClassStore ¶
type SqlClassStore struct { SqlStore // contains filtered or unexported fields }
func (SqlClassStore) ClearAllCustomRoleAssignments ¶
func (s SqlClassStore) ClearAllCustomRoleAssignments() *model.AppError
func (SqlClassStore) ClearCaches ¶
func (s SqlClassStore) ClearCaches()
func (SqlClassStore) CreateDirectClass ¶
func (SqlClassStore) Delete ¶
func (s SqlClassStore) Delete(classId string, time int64) *model.AppError
Delete records the given deleted timestamp to the class in question.
func (SqlClassStore) GetAllClassMembersForUser ¶
func (SqlClassStore) GetAllClassMembersNotifyPropsForClass ¶
func (SqlClassStore) GetAllClasses ¶
func (s SqlClassStore) GetAllClasses(offset, limit int, opts store.ClassSearchOpts) (*model.ClassListWithBranchData, *model.AppError)
func (SqlClassStore) GetAllClassesCount ¶
func (s SqlClassStore) GetAllClassesCount(opts store.ClassSearchOpts) (int64, *model.AppError)
func (SqlClassStore) GetAllClassesForExportAfter ¶
func (s SqlClassStore) GetAllClassesForExportAfter(limit int, afterId string) ([]*model.ClassForExport, *model.AppError)
func (SqlClassStore) GetBranchClasses ¶
func (SqlClassStore) GetByNameIncludeDeleted ¶
func (SqlClassStore) GetByNames ¶
func (SqlClassStore) GetClassMembersForExport ¶
func (s SqlClassStore) GetClassMembersForExport(userId string, branchId string) ([]*model.ClassMemberForExport, *model.AppError)
func (SqlClassStore) GetClassMembersTimezones ¶
func (SqlClassStore) GetClasses ¶
func (SqlClassStore) GetClassesBatchForIndexing ¶
func (SqlClassStore) GetClassesByIds ¶
func (SqlClassStore) GetClassesByScheme ¶
func (SqlClassStore) GetDeleted ¶
func (SqlClassStore) GetDeletedByName ¶
func (SqlClassStore) GetFromMaster ¶
func (SqlClassStore) GetMember ¶
func (s SqlClassStore) GetMember(classId string, userId string) (*model.ClassMember, *model.AppError)
func (SqlClassStore) GetMemberCount ¶
func (SqlClassStore) GetMemberCountFromCache ¶
func (s SqlClassStore) GetMemberCountFromCache(classId string) int64
func (SqlClassStore) GetMembers ¶
func (s SqlClassStore) GetMembers(classId string, offset, limit int) (*model.ClassMembers, *model.AppError)
func (SqlClassStore) GetMembersByIds ¶
func (s SqlClassStore) GetMembersByIds(classId string, userIds []string) (*model.ClassMembers, *model.AppError)
func (SqlClassStore) GetMembersForUser ¶
func (s SqlClassStore) GetMembersForUser(branchId string, userId string) (*model.ClassMembers, *model.AppError)
func (SqlClassStore) GetMembersForUserWithPagination ¶
func (s SqlClassStore) GetMembersForUserWithPagination(branchId, userId string, page, perPage int) (*model.ClassMembers, *model.AppError)
func (SqlClassStore) GetMoreClasses ¶
func (SqlClassStore) GetPublicClassesForBranch ¶
func (SqlClassStore) InvalidateAllClassMembersForUser ¶
func (s SqlClassStore) InvalidateAllClassMembersForUser(userId string)
func (SqlClassStore) InvalidateCacheForClassMembersNotifyProps ¶
func (s SqlClassStore) InvalidateCacheForClassMembersNotifyProps(classId string)
func (SqlClassStore) InvalidateClass ¶
func (s SqlClassStore) InvalidateClass(id string)
func (SqlClassStore) InvalidateClassByName ¶
func (s SqlClassStore) InvalidateClassByName(branchId, name string)
func (SqlClassStore) InvalidateGuestCount ¶
func (s SqlClassStore) InvalidateGuestCount(classId string)
func (SqlClassStore) InvalidateMemberCount ¶
func (s SqlClassStore) InvalidateMemberCount(classId string)
func (SqlClassStore) InvalidatePinnedPostCount ¶
func (s SqlClassStore) InvalidatePinnedPostCount(classId string)
func (SqlClassStore) IsUserInClassUseCache ¶
func (s SqlClassStore) IsUserInClassUseCache(userId string, classId string) bool
func (SqlClassStore) MigrateClassMembers ¶
func (s SqlClassStore) MigrateClassMembers(fromClassId string, fromUserId string) (map[string]string, *model.AppError)
This function does the Advanced Permissions Phase 2 migration for ClassMember objects. It performs the migration in batches as a single transaction per batch to ensure consistency but to also minimise execution time to avoid causing unnecessary table locks. **THIS FUNCTION SHOULD NOT BE USED FOR ANY OTHER PURPOSE.** Executing this function *after* the new Schemes functionality has been used on an installation will have unintended consequences.
func (SqlClassStore) PermanentDelete ¶
func (s SqlClassStore) PermanentDelete(classId string) *model.AppError
PermanentDelete removes the given class from the database.
func (SqlClassStore) PermanentDeleteByBranch ¶
func (s SqlClassStore) PermanentDeleteByBranch(branchId string) *model.AppError
PermanentDeleteByBranch removes all classes for the given branch from the database.
func (SqlClassStore) PermanentDeleteMembersByClass ¶
func (s SqlClassStore) PermanentDeleteMembersByClass(classId string) *model.AppError
func (SqlClassStore) PermanentDeleteMembersByUser ¶
func (s SqlClassStore) PermanentDeleteMembersByUser(userId string) *model.AppError
func (SqlClassStore) RemoveAllDeactivatedMembers ¶
func (s SqlClassStore) RemoveAllDeactivatedMembers(classId string) *model.AppError
func (SqlClassStore) RemoveMember ¶
func (s SqlClassStore) RemoveMember(classId string, userId string) *model.AppError
func (SqlClassStore) RemoveMembers ¶
func (s SqlClassStore) RemoveMembers(classId string, userIds []string) *model.AppError
func (SqlClassStore) ResetAllClassSchemes ¶
func (s SqlClassStore) ResetAllClassSchemes() *model.AppError
func (SqlClassStore) Restore ¶
func (s SqlClassStore) Restore(classId string, time int64) *model.AppError
Restore reverts a previous deleted timestamp from the class in question.
func (SqlClassStore) Save ¶
func (s SqlClassStore) Save(class *model.Class, maxClassesPerBranch int64) (*model.Class, *model.AppError)
Save writes the (non-direct) class class to the database.
func (SqlClassStore) SaveDirectClass ¶
func (s SqlClassStore) SaveDirectClass(directclass *model.Class, member1 *model.ClassMember, member2 *model.ClassMember) (*model.Class, *model.AppError)
func (SqlClassStore) SaveMember ¶
func (s SqlClassStore) SaveMember(member *model.ClassMember) (*model.ClassMember, *model.AppError)
func (SqlClassStore) SaveMultipleMembers ¶
func (s SqlClassStore) SaveMultipleMembers(members []*model.ClassMember) ([]*model.ClassMember, *model.AppError)
func (SqlClassStore) SetDeleteAt ¶
func (s SqlClassStore) SetDeleteAt(classId string, deleteAt, updateAt int64) *model.AppError
SetDeleteAt records the given deleted and updated timestamp to the class in question.
func (SqlClassStore) UpdateMember ¶
func (s SqlClassStore) UpdateMember(member *model.ClassMember) (*model.ClassMember, *model.AppError)
func (SqlClassStore) UpdateMembersRole ¶
func (s SqlClassStore) UpdateMembersRole(classID string, userIDs []string) *model.AppError
func (SqlClassStore) UpdateMultipleMembers ¶
func (s SqlClassStore) UpdateMultipleMembers(members []*model.ClassMember) ([]*model.ClassMember, *model.AppError)
func (SqlClassStore) UserBelongsToClasses ¶
type SqlCommandStore ¶
type SqlCommandStore struct {
SqlStore
}
func (SqlCommandStore) AnalyticsCommandCount ¶
func (s SqlCommandStore) AnalyticsCommandCount(teamId string) (int64, *model.AppError)
func (SqlCommandStore) Delete ¶
func (s SqlCommandStore) Delete(commandId string, time int64) *model.AppError
func (SqlCommandStore) GetByTrigger ¶
func (SqlCommandStore) PermanentDeleteByTeam ¶
func (s SqlCommandStore) PermanentDeleteByTeam(teamId string) *model.AppError
func (SqlCommandStore) PermanentDeleteByUser ¶
func (s SqlCommandStore) PermanentDeleteByUser(userId string) *model.AppError
type SqlCommandWebhookStore ¶
type SqlCommandWebhookStore struct {
SqlStore
}
func (SqlCommandWebhookStore) Cleanup ¶
func (s SqlCommandWebhookStore) Cleanup()
func (SqlCommandWebhookStore) Get ¶
func (s SqlCommandWebhookStore) Get(id string) (*model.CommandWebhook, *model.AppError)
func (SqlCommandWebhookStore) Save ¶
func (s SqlCommandWebhookStore) Save(webhook *model.CommandWebhook) (*model.CommandWebhook, *model.AppError)
type SqlComplianceStore ¶
type SqlComplianceStore struct {
SqlStore
}
func (SqlComplianceStore) ComplianceExport ¶
func (s SqlComplianceStore) ComplianceExport(job *model.Compliance) ([]*model.CompliancePost, *model.AppError)
func (SqlComplianceStore) Get ¶
func (s SqlComplianceStore) Get(id string) (*model.Compliance, *model.AppError)
func (SqlComplianceStore) GetAll ¶
func (s SqlComplianceStore) GetAll(offset, limit int) (model.Compliances, *model.AppError)
func (SqlComplianceStore) MessageExport ¶
func (s SqlComplianceStore) MessageExport(after int64, limit int) ([]*model.MessageExport, *model.AppError)
func (SqlComplianceStore) Save ¶
func (s SqlComplianceStore) Save(compliance *model.Compliance) (*model.Compliance, *model.AppError)
func (SqlComplianceStore) Update ¶
func (s SqlComplianceStore) Update(compliance *model.Compliance) (*model.Compliance, *model.AppError)
type SqlEmojiStore ¶
type SqlEmojiStore struct { SqlStore // contains filtered or unexported fields }
func (SqlEmojiStore) GetMultipleByName ¶
type SqlFileInfoStore ¶
type SqlFileInfoStore struct { SqlStore // contains filtered or unexported fields }
func (SqlFileInfoStore) AttachToPost ¶
func (fs SqlFileInfoStore) AttachToPost(fileId, postId, creatorId string) *model.AppError
func (SqlFileInfoStore) ClearCaches ¶
func (fs SqlFileInfoStore) ClearCaches()
func (SqlFileInfoStore) DeleteForPost ¶
func (fs SqlFileInfoStore) DeleteForPost(postId string) (string, *model.AppError)
func (SqlFileInfoStore) GetForPost ¶
func (SqlFileInfoStore) GetForUser ¶
func (SqlFileInfoStore) GetWithOptions ¶
func (fs SqlFileInfoStore) GetWithOptions(page, perPage int, opt *model.GetFileInfosOptions) ([]*model.FileInfo, *model.AppError)
func (SqlFileInfoStore) InvalidateFileInfosForPostCache ¶
func (fs SqlFileInfoStore) InvalidateFileInfosForPostCache(postId string, deleted bool)
func (SqlFileInfoStore) PermanentDelete ¶
func (fs SqlFileInfoStore) PermanentDelete(fileId string) *model.AppError
func (SqlFileInfoStore) PermanentDeleteBatch ¶
func (SqlFileInfoStore) PermanentDeleteByUser ¶
func (fs SqlFileInfoStore) PermanentDeleteByUser(userId string) (int64, *model.AppError)
type SqlJobStore ¶
type SqlJobStore struct {
SqlStore
}
func (SqlJobStore) GetAllByStatus ¶
func (SqlJobStore) GetAllByType ¶
func (SqlJobStore) GetAllByTypePage ¶
func (SqlJobStore) GetAllPage ¶
func (SqlJobStore) GetCountByStatusAndType ¶
func (SqlJobStore) GetNewestJobByStatusAndType ¶
func (SqlJobStore) UpdateOptimistically ¶
func (SqlJobStore) UpdateStatus ¶
func (SqlJobStore) UpdateStatusOptimistically ¶
type SqlLicenseStore ¶
type SqlLicenseStore struct {
SqlStore
}
SqlLicenseStore encapsulates the database writes and reads for model.LicenseRecord objects.
func (SqlLicenseStore) Get ¶
func (ls SqlLicenseStore) Get(id string) (*model.LicenseRecord, *model.AppError)
Get obtains the license with the provided id parameter from the database. If the license doesn't exist it returns a model.AppError with http.StatusNotFound in the StatusCode field.
func (SqlLicenseStore) Save ¶
func (ls SqlLicenseStore) Save(license *model.LicenseRecord) (*model.LicenseRecord, *model.AppError)
Save validates and stores the license instance in the database. The Id and Bytes fields are mandatory. The Bytes field is limited to a maximum of 10000 bytes. If the license ID matches an existing license in the database it returns the license stored in the database. If not, it saves the new database and returns the created license with the CreateAt field updated.
type SqlLinkMetadataStore ¶
type SqlLinkMetadataStore struct {
SqlStore
}
func (SqlLinkMetadataStore) Get ¶
func (s SqlLinkMetadataStore) Get(url string, timestamp int64) (*model.LinkMetadata, *model.AppError)
func (SqlLinkMetadataStore) Save ¶
func (s SqlLinkMetadataStore) Save(metadata *model.LinkMetadata) (*model.LinkMetadata, *model.AppError)
type SqlOAuthStore ¶
type SqlOAuthStore struct {
SqlStore
}
func (SqlOAuthStore) GetAccessData ¶
func (as SqlOAuthStore) GetAccessData(token string) (*model.AccessData, *model.AppError)
func (SqlOAuthStore) GetAccessDataByRefreshToken ¶
func (as SqlOAuthStore) GetAccessDataByRefreshToken(token string) (*model.AccessData, *model.AppError)
func (SqlOAuthStore) GetAccessDataByUserForApp ¶
func (as SqlOAuthStore) GetAccessDataByUserForApp(userId, clientId string) ([]*model.AccessData, *model.AppError)
func (SqlOAuthStore) GetAppByUser ¶
func (SqlOAuthStore) GetAuthData ¶
func (SqlOAuthStore) GetAuthorizedApps ¶
func (SqlOAuthStore) GetPreviousAccessData ¶
func (as SqlOAuthStore) GetPreviousAccessData(userId, clientId string) (*model.AccessData, *model.AppError)
func (SqlOAuthStore) PermanentDeleteAuthDataByUser ¶
func (as SqlOAuthStore) PermanentDeleteAuthDataByUser(userId string) *model.AppError
func (SqlOAuthStore) RemoveAccessData ¶
func (as SqlOAuthStore) RemoveAccessData(token string) *model.AppError
func (SqlOAuthStore) RemoveAllAccessData ¶
func (as SqlOAuthStore) RemoveAllAccessData() *model.AppError
func (SqlOAuthStore) RemoveAuthData ¶
func (as SqlOAuthStore) RemoveAuthData(code string) *model.AppError
func (SqlOAuthStore) SaveAccessData ¶
func (as SqlOAuthStore) SaveAccessData(accessData *model.AccessData) (*model.AccessData, *model.AppError)
func (SqlOAuthStore) SaveAuthData ¶
func (SqlOAuthStore) UpdateAccessData ¶
func (as SqlOAuthStore) UpdateAccessData(accessData *model.AccessData) (*model.AccessData, *model.AppError)
type SqlPreferenceStore ¶
type SqlPreferenceStore struct {
SqlStore
}
func (SqlPreferenceStore) CleanupFlagsBatch ¶
func (s SqlPreferenceStore) CleanupFlagsBatch(limit int64) (int64, *model.AppError)
func (SqlPreferenceStore) Delete ¶
func (s SqlPreferenceStore) Delete(userId, category, name string) *model.AppError
func (SqlPreferenceStore) DeleteCategory ¶
func (s SqlPreferenceStore) DeleteCategory(userId string, category string) *model.AppError
func (SqlPreferenceStore) DeleteCategoryAndName ¶
func (s SqlPreferenceStore) DeleteCategoryAndName(category string, name string) *model.AppError
func (SqlPreferenceStore) Get ¶
func (s SqlPreferenceStore) Get(userId string, category string, name string) (*model.Preference, *model.AppError)
func (SqlPreferenceStore) GetAll ¶
func (s SqlPreferenceStore) GetAll(userId string) (model.Preferences, *model.AppError)
func (SqlPreferenceStore) GetCategory ¶
func (s SqlPreferenceStore) GetCategory(userId string, category string) (model.Preferences, *model.AppError)
func (SqlPreferenceStore) PermanentDeleteByUser ¶
func (s SqlPreferenceStore) PermanentDeleteByUser(userId string) *model.AppError
func (SqlPreferenceStore) Save ¶
func (s SqlPreferenceStore) Save(preferences *model.Preferences) *model.AppError
type SqlReactionStore ¶
type SqlReactionStore struct {
SqlStore
}
func (*SqlReactionStore) BulkGetForPosts ¶
func (*SqlReactionStore) DeleteAllWithEmojiName ¶
func (s *SqlReactionStore) DeleteAllWithEmojiName(emojiName string) *model.AppError
func (*SqlReactionStore) GetForPost ¶
func (*SqlReactionStore) PermanentDeleteBatch ¶
type SqlRoleStore ¶
type SqlRoleStore struct {
SqlStore
}
func (*SqlRoleStore) AllClassSchemeRoles ¶
func (s *SqlRoleStore) AllClassSchemeRoles() ([]*model.Role, *model.AppError)
func (*SqlRoleStore) ClassHigherScopedPermissions ¶
func (s *SqlRoleStore) ClassHigherScopedPermissions(roleNames []string) (map[string]*model.RolePermissions, *model.AppError)
func (*SqlRoleStore) ClassRolesUnderBranchRole ¶
ClassRolesUnderBranchRole finds all of the class-scheme roles under the branch of the given branch-scheme role.
func (*SqlRoleStore) GetByNames ¶
func (*SqlRoleStore) PermanentDeleteAll ¶
func (s *SqlRoleStore) PermanentDeleteAll() *model.AppError
type SqlSchemeStore ¶
type SqlSchemeStore struct {
SqlStore
}
func (*SqlSchemeStore) CountByScope ¶
func (s *SqlSchemeStore) CountByScope(scope string) (int64, *model.AppError)
func (*SqlSchemeStore) CountWithoutPermission ¶
func (*SqlSchemeStore) GetAllPage ¶
func (*SqlSchemeStore) PermanentDeleteAll ¶
func (s *SqlSchemeStore) PermanentDeleteAll() *model.AppError
type SqlSessionStore ¶
type SqlSessionStore struct {
SqlStore
}
func (SqlSessionStore) AnalyticsSessionCount ¶
func (me SqlSessionStore) AnalyticsSessionCount() (int64, *model.AppError)
func (SqlSessionStore) Cleanup ¶
func (me SqlSessionStore) Cleanup(expiryTime int64, batchSize int64)
func (SqlSessionStore) GetSessions ¶
func (SqlSessionStore) GetSessionsWithActiveDeviceIds ¶
func (SqlSessionStore) PermanentDeleteSessionsByUser ¶
func (me SqlSessionStore) PermanentDeleteSessionsByUser(userId string) *model.AppError
func (SqlSessionStore) Remove ¶
func (me SqlSessionStore) Remove(sessionIdOrToken string) *model.AppError
func (SqlSessionStore) RemoveAllSessions ¶
func (me SqlSessionStore) RemoveAllSessions() *model.AppError
func (SqlSessionStore) UpdateDeviceId ¶
func (SqlSessionStore) UpdateLastActivityAt ¶
func (me SqlSessionStore) UpdateLastActivityAt(sessionId string, time int64) *model.AppError
func (SqlSessionStore) UpdateProps ¶
func (me SqlSessionStore) UpdateProps(session *model.Session) *model.AppError
func (SqlSessionStore) UpdateRoles ¶
func (me SqlSessionStore) UpdateRoles(userId, roles string) (string, *model.AppError)
type SqlStatusStore ¶
type SqlStatusStore struct {
SqlStore
}
func (SqlStatusStore) GetTotalActiveUsersCount ¶
func (s SqlStatusStore) GetTotalActiveUsersCount() (int64, *model.AppError)
func (SqlStatusStore) ResetAll ¶
func (s SqlStatusStore) ResetAll() *model.AppError
func (SqlStatusStore) SaveOrUpdate ¶
func (s SqlStatusStore) SaveOrUpdate(status *model.Status) *model.AppError
func (SqlStatusStore) UpdateLastActivityAt ¶
func (s SqlStatusStore) UpdateLastActivityAt(userId string, lastActivityAt int64) *model.AppError
type SqlStore ¶
type SqlStore interface { DriverName() string GetCurrentSchemaVersion() string GetMaster() *gorp.DbMap GetSearchReplica() *gorp.DbMap GetReplica() *gorp.DbMap TotalMasterDbConnections() int TotalReadDbConnections() int TotalSearchDbConnections() int MarkSystemRanUnitTests() DoesTableExist(tablename string) bool DoesColumnExist(tableName string, columName string) bool DoesTriggerExist(triggerName string) bool CreateColumnIfNotExists(tableName string, columnName string, mySqlColType string, postgresColType string, defaultValue string) bool CreateColumnIfNotExistsNoDefault(tableName string, columnName string, mySqlColType string, postgresColType string) bool RemoveColumnIfExists(tableName string, columnName string) bool RemoveTableIfExists(tableName string) bool RenameColumnIfExists(tableName string, oldColumnName string, newColumnName string, colType string) bool GetMaxLengthOfColumnIfExists(tableName string, columnName string) string AlterColumnTypeIfExists(tableName string, columnName string, mySqlColType string, postgresColType string) bool AlterColumnDefaultIfExists(tableName string, columnName string, mySqlColDefault *string, postgresColDefault *string) bool AlterPrimaryKey(tableName string, columnNames []string) bool CreateUniqueIndexIfNotExists(indexName string, tableName string, columnName string) bool CreateIndexIfNotExists(indexName string, tableName string, columnName string) bool CreateCompositeIndexIfNotExists(indexName string, tableName string, columnNames []string) bool CreateFullTextIndexIfNotExists(indexName string, tableName string, columnName string) bool RemoveIndexIfExists(indexName string, tableName string) bool GetAllConns() []*gorp.DbMap Close() LockToMaster() UnlockFromMaster() Branch() store.BranchStore Class() store.ClassStore User() store.UserStore Audit() store.AuditStore ClusterDiscovery() store.ClusterDiscoveryStore Compliance() store.ComplianceStore Session() store.SessionStore OAuth() store.OAuthStore System() store.SystemStore Webhook() store.WebhookStore Command() store.CommandStore CommandWebhook() store.CommandWebhookStore Preference() store.PreferenceStore License() store.LicenseStore Token() store.TokenStore Emoji() store.EmojiStore Status() store.StatusStore FileInfo() store.FileInfoStore Reaction() store.ReactionStore Job() store.JobStore UserAccessToken() store.UserAccessTokenStore Role() store.RoleStore Scheme() store.SchemeStore TermsOfService() store.TermsOfServiceStore UserTermsOfService() store.UserTermsOfServiceStore LinkMetadata() store.LinkMetadataStore // contains filtered or unexported methods }
type SqlSupplier ¶
type SqlSupplier struct {
// contains filtered or unexported fields
}
func NewSqlSupplier ¶
func NewSqlSupplier(settings model.SqlSettings, metrics einterfaces.MetricsInterface) *SqlSupplier
func (*SqlSupplier) AlterColumnDefaultIfExists ¶
func (*SqlSupplier) AlterColumnTypeIfExists ¶
func (*SqlSupplier) AlterPrimaryKey ¶
func (ss *SqlSupplier) AlterPrimaryKey(tableName string, columnNames []string) bool
func (*SqlSupplier) Audit ¶
func (ss *SqlSupplier) Audit() store.AuditStore
func (*SqlSupplier) Branch ¶
func (ss *SqlSupplier) Branch() store.BranchStore
func (*SqlSupplier) CheckIntegrity ¶
func (ss *SqlSupplier) CheckIntegrity() <-chan store.IntegrityCheckResult
func (*SqlSupplier) Class ¶
func (ss *SqlSupplier) Class() store.ClassStore
func (*SqlSupplier) Close ¶
func (ss *SqlSupplier) Close()
func (*SqlSupplier) ClusterDiscovery ¶
func (ss *SqlSupplier) ClusterDiscovery() store.ClusterDiscoveryStore
func (*SqlSupplier) Command ¶
func (ss *SqlSupplier) Command() store.CommandStore
func (*SqlSupplier) CommandWebhook ¶
func (ss *SqlSupplier) CommandWebhook() store.CommandWebhookStore
func (*SqlSupplier) Compliance ¶
func (ss *SqlSupplier) Compliance() store.ComplianceStore
func (*SqlSupplier) Context ¶
func (ss *SqlSupplier) Context() context.Context
func (*SqlSupplier) CreateColumnIfNotExists ¶
func (*SqlSupplier) CreateColumnIfNotExistsNoDefault ¶
func (*SqlSupplier) CreateCompositeIndexIfNotExists ¶
func (ss *SqlSupplier) CreateCompositeIndexIfNotExists(indexName string, tableName string, columnNames []string) bool
func (*SqlSupplier) CreateFullTextIndexIfNotExists ¶
func (ss *SqlSupplier) CreateFullTextIndexIfNotExists(indexName string, tableName string, columnName string) bool
func (*SqlSupplier) CreateIndexIfNotExists ¶
func (ss *SqlSupplier) CreateIndexIfNotExists(indexName string, tableName string, columnName string) bool
func (*SqlSupplier) CreateUniqueIndexIfNotExists ¶
func (ss *SqlSupplier) CreateUniqueIndexIfNotExists(indexName string, tableName string, columnName string) bool
func (*SqlSupplier) DoesColumnExist ¶
func (ss *SqlSupplier) DoesColumnExist(tableName string, columnName string) bool
func (*SqlSupplier) DoesTableExist ¶
func (ss *SqlSupplier) DoesTableExist(tableName string) bool
func (*SqlSupplier) DoesTriggerExist ¶
func (ss *SqlSupplier) DoesTriggerExist(triggerName string) bool
func (*SqlSupplier) DriverName ¶
func (ss *SqlSupplier) DriverName() string
func (*SqlSupplier) DropAllTables ¶
func (ss *SqlSupplier) DropAllTables()
func (*SqlSupplier) Emoji ¶
func (ss *SqlSupplier) Emoji() store.EmojiStore
func (*SqlSupplier) FileInfo ¶
func (ss *SqlSupplier) FileInfo() store.FileInfoStore
func (*SqlSupplier) GetAllConns ¶
func (ss *SqlSupplier) GetAllConns() []*gorp.DbMap
func (*SqlSupplier) GetCurrentSchemaVersion ¶
func (ss *SqlSupplier) GetCurrentSchemaVersion() string
func (*SqlSupplier) GetMaster ¶
func (ss *SqlSupplier) GetMaster() *gorp.DbMap
func (*SqlSupplier) GetMaxLengthOfColumnIfExists ¶
func (ss *SqlSupplier) GetMaxLengthOfColumnIfExists(tableName string, columnName string) string
func (*SqlSupplier) GetReplica ¶
func (ss *SqlSupplier) GetReplica() *gorp.DbMap
func (*SqlSupplier) GetSearchReplica ¶
func (ss *SqlSupplier) GetSearchReplica() *gorp.DbMap
func (*SqlSupplier) Job ¶
func (ss *SqlSupplier) Job() store.JobStore
func (*SqlSupplier) License ¶
func (ss *SqlSupplier) License() store.LicenseStore
func (*SqlSupplier) LinkMetadata ¶
func (ss *SqlSupplier) LinkMetadata() store.LinkMetadataStore
func (*SqlSupplier) LockToMaster ¶
func (ss *SqlSupplier) LockToMaster()
func (*SqlSupplier) MarkSystemRanUnitTests ¶
func (ss *SqlSupplier) MarkSystemRanUnitTests()
func (*SqlSupplier) OAuth ¶
func (ss *SqlSupplier) OAuth() store.OAuthStore
func (*SqlSupplier) Preference ¶
func (ss *SqlSupplier) Preference() store.PreferenceStore
func (*SqlSupplier) Reaction ¶
func (ss *SqlSupplier) Reaction() store.ReactionStore
func (*SqlSupplier) RemoveColumnIfExists ¶
func (ss *SqlSupplier) RemoveColumnIfExists(tableName string, columnName string) bool
func (*SqlSupplier) RemoveIndexIfExists ¶
func (ss *SqlSupplier) RemoveIndexIfExists(indexName string, tableName string) bool
func (*SqlSupplier) RemoveTableIfExists ¶
func (ss *SqlSupplier) RemoveTableIfExists(tableName string) bool
func (*SqlSupplier) RenameColumnIfExists ¶
func (*SqlSupplier) Role ¶
func (ss *SqlSupplier) Role() store.RoleStore
func (*SqlSupplier) Scheme ¶
func (ss *SqlSupplier) Scheme() store.SchemeStore
func (*SqlSupplier) Session ¶
func (ss *SqlSupplier) Session() store.SessionStore
func (*SqlSupplier) SetContext ¶
func (ss *SqlSupplier) SetContext(context context.Context)
func (*SqlSupplier) Status ¶
func (ss *SqlSupplier) Status() store.StatusStore
func (*SqlSupplier) System ¶
func (ss *SqlSupplier) System() store.SystemStore
func (*SqlSupplier) TermsOfService ¶
func (ss *SqlSupplier) TermsOfService() store.TermsOfServiceStore
func (*SqlSupplier) Token ¶
func (ss *SqlSupplier) Token() store.TokenStore
func (*SqlSupplier) TotalMasterDbConnections ¶
func (ss *SqlSupplier) TotalMasterDbConnections() int
func (*SqlSupplier) TotalReadDbConnections ¶
func (ss *SqlSupplier) TotalReadDbConnections() int
func (*SqlSupplier) TotalSearchDbConnections ¶
func (ss *SqlSupplier) TotalSearchDbConnections() int
func (*SqlSupplier) UnlockFromMaster ¶
func (ss *SqlSupplier) UnlockFromMaster()
func (*SqlSupplier) User ¶
func (ss *SqlSupplier) User() store.UserStore
func (*SqlSupplier) UserAccessToken ¶
func (ss *SqlSupplier) UserAccessToken() store.UserAccessTokenStore
func (*SqlSupplier) UserTermsOfService ¶
func (ss *SqlSupplier) UserTermsOfService() store.UserTermsOfServiceStore
func (*SqlSupplier) Webhook ¶
func (ss *SqlSupplier) Webhook() store.WebhookStore
type SqlSupplierStores ¶
type SqlSupplierStores struct { TermsOfService store.TermsOfServiceStore UserTermsOfService store.UserTermsOfServiceStore // contains filtered or unexported fields }
type SqlSystemStore ¶
type SqlSystemStore struct {
SqlStore
}
func (SqlSystemStore) PermanentDeleteByName ¶
func (SqlSystemStore) SaveOrUpdate ¶
func (s SqlSystemStore) SaveOrUpdate(system *model.System) *model.AppError
type SqlTermsOfServiceStore ¶
type SqlTermsOfServiceStore struct { SqlStore // contains filtered or unexported fields }
func (SqlTermsOfServiceStore) Get ¶
func (s SqlTermsOfServiceStore) Get(id string, allowFromCache bool) (*model.TermsOfService, *model.AppError)
func (SqlTermsOfServiceStore) GetLatest ¶
func (s SqlTermsOfServiceStore) GetLatest(allowFromCache bool) (*model.TermsOfService, *model.AppError)
func (SqlTermsOfServiceStore) Save ¶
func (s SqlTermsOfServiceStore) Save(termsOfService *model.TermsOfService) (*model.TermsOfService, *model.AppError)
type SqlTokenStore ¶
type SqlTokenStore struct {
SqlStore
}
func (SqlTokenStore) Cleanup ¶
func (s SqlTokenStore) Cleanup()
func (SqlTokenStore) GetByToken ¶
func (SqlTokenStore) RemoveAllTokensByType ¶
func (s SqlTokenStore) RemoveAllTokensByType(tokenType string) *model.AppError
type SqlUserAccessTokenStore ¶
type SqlUserAccessTokenStore struct {
SqlStore
}
func (SqlUserAccessTokenStore) Delete ¶
func (s SqlUserAccessTokenStore) Delete(tokenId string) *model.AppError
func (SqlUserAccessTokenStore) DeleteAllForUser ¶
func (s SqlUserAccessTokenStore) DeleteAllForUser(userId string) *model.AppError
func (SqlUserAccessTokenStore) Get ¶
func (s SqlUserAccessTokenStore) Get(tokenId string) (*model.UserAccessToken, *model.AppError)
func (SqlUserAccessTokenStore) GetAll ¶
func (s SqlUserAccessTokenStore) GetAll(offset, limit int) ([]*model.UserAccessToken, *model.AppError)
func (SqlUserAccessTokenStore) GetByToken ¶
func (s SqlUserAccessTokenStore) GetByToken(tokenString string) (*model.UserAccessToken, *model.AppError)
func (SqlUserAccessTokenStore) GetByUser ¶
func (s SqlUserAccessTokenStore) GetByUser(userId string, offset, limit int) ([]*model.UserAccessToken, *model.AppError)
func (SqlUserAccessTokenStore) Save ¶
func (s SqlUserAccessTokenStore) Save(token *model.UserAccessToken) (*model.UserAccessToken, *model.AppError)
func (SqlUserAccessTokenStore) Search ¶
func (s SqlUserAccessTokenStore) Search(term string) ([]*model.UserAccessToken, *model.AppError)
func (SqlUserAccessTokenStore) UpdateTokenDisable ¶
func (s SqlUserAccessTokenStore) UpdateTokenDisable(tokenId string) *model.AppError
func (SqlUserAccessTokenStore) UpdateTokenEnable ¶
func (s SqlUserAccessTokenStore) UpdateTokenEnable(tokenId string) *model.AppError
type SqlUserStore ¶
type SqlUserStore struct { SqlStore // contains filtered or unexported fields }
func (SqlUserStore) AnalyticsActiveCount ¶
func (us SqlUserStore) AnalyticsActiveCount(timePeriod int64, options model.UserCountOptions) (int64, *model.AppError)
func (SqlUserStore) AnalyticsGetInactiveUsersCount ¶
func (us SqlUserStore) AnalyticsGetInactiveUsersCount() (int64, *model.AppError)
func (SqlUserStore) AnalyticsGetSystemAdminCount ¶
func (us SqlUserStore) AnalyticsGetSystemAdminCount() (int64, *model.AppError)
func (SqlUserStore) ClearAllCustomRoleAssignments ¶
func (us SqlUserStore) ClearAllCustomRoleAssignments() *model.AppError
func (SqlUserStore) ClearCaches ¶
func (us SqlUserStore) ClearCaches()
func (SqlUserStore) Count ¶
func (us SqlUserStore) Count(options model.UserCountOptions) (int64, *model.AppError)
func (SqlUserStore) GetAllAfter ¶
func (SqlUserStore) GetAllProfiles ¶
func (us SqlUserStore) GetAllProfiles(options *model.UserGetOptions) ([]*model.User, *model.AppError)
func (SqlUserStore) GetAllProfilesInClass ¶
func (SqlUserStore) GetAllUsingAuthService ¶
func (SqlUserStore) GetByEmail ¶
func (SqlUserStore) GetByUsername ¶
func (SqlUserStore) GetEtagForAllProfiles ¶
func (us SqlUserStore) GetEtagForAllProfiles() string
func (SqlUserStore) GetEtagForProfiles ¶
func (us SqlUserStore) GetEtagForProfiles(teamId string) string
func (SqlUserStore) GetForLogin ¶
func (SqlUserStore) GetNewUsersForBranch ¶
func (us SqlUserStore) GetNewUsersForBranch(teamId string, offset, limit int, viewRestrictions *model.ViewUsersRestrictions) ([]*model.User, *model.AppError)
func (SqlUserStore) GetProfileByIds ¶
func (us SqlUserStore) GetProfileByIds(userIds []string, options *store.UserGetByIdsOpts, _ bool) ([]*model.User, *model.AppError)
func (SqlUserStore) GetProfiles ¶
func (us SqlUserStore) GetProfiles(options *model.UserGetOptions) ([]*model.User, *model.AppError)
func (SqlUserStore) GetProfilesByUsernames ¶
func (us SqlUserStore) GetProfilesByUsernames(usernames []string, viewRestrictions *model.ViewUsersRestrictions) ([]*model.User, *model.AppError)
func (SqlUserStore) GetProfilesInClass ¶
func (SqlUserStore) GetProfilesInClassByStatus ¶
func (SqlUserStore) GetProfilesNotInClass ¶
func (SqlUserStore) GetProfilesWithoutBranch ¶
func (us SqlUserStore) GetProfilesWithoutBranch(options *model.UserGetOptions) ([]*model.User, *model.AppError)
func (SqlUserStore) GetRecentlyActiveUsersForBranch ¶
func (us SqlUserStore) GetRecentlyActiveUsersForBranch(teamId string, offset, limit int, viewRestrictions *model.ViewUsersRestrictions) ([]*model.User, *model.AppError)
func (SqlUserStore) GetSystemAdminProfiles ¶
func (SqlUserStore) GetUsersBatchForIndexing ¶
func (us SqlUserStore) GetUsersBatchForIndexing(startTime, endTime int64, limit int) ([]*model.UserForIndexing, *model.AppError)
func (SqlUserStore) InferSystemInstallDate ¶
func (us SqlUserStore) InferSystemInstallDate() (int64, *model.AppError)
func (SqlUserStore) InvalidateProfileCacheForUser ¶
func (us SqlUserStore) InvalidateProfileCacheForUser(userId string)
func (SqlUserStore) InvalidateProfilesInClassCache ¶
func (us SqlUserStore) InvalidateProfilesInClassCache(classId string)
func (SqlUserStore) InvalidateProfilesInClassCacheByUser ¶
func (us SqlUserStore) InvalidateProfilesInClassCacheByUser(userId string)
func (SqlUserStore) PermanentDelete ¶
func (us SqlUserStore) PermanentDelete(userId string) *model.AppError
func (SqlUserStore) ResetLastPictureUpdate ¶
func (us SqlUserStore) ResetLastPictureUpdate(userId string) *model.AppError
func (SqlUserStore) Update ¶
func (us SqlUserStore) Update(user *model.User, trustedUpdateData bool) (*model.UserUpdate, *model.AppError)
func (SqlUserStore) UpdateAuthData ¶
func (SqlUserStore) UpdateFailedPasswordAttempts ¶
func (us SqlUserStore) UpdateFailedPasswordAttempts(userId string, attempts int) *model.AppError
func (SqlUserStore) UpdateLastPictureUpdate ¶
func (us SqlUserStore) UpdateLastPictureUpdate(userId string) *model.AppError
func (SqlUserStore) UpdateMfaActive ¶
func (us SqlUserStore) UpdateMfaActive(userId string, active bool) *model.AppError
func (SqlUserStore) UpdateMfaSecret ¶
func (us SqlUserStore) UpdateMfaSecret(userId, secret string) *model.AppError
func (SqlUserStore) UpdatePassword ¶
func (us SqlUserStore) UpdatePassword(userId, hashedPassword string) *model.AppError
func (SqlUserStore) UpdateUpdateAt ¶
func (us SqlUserStore) UpdateUpdateAt(userId string) (int64, *model.AppError)
func (SqlUserStore) VerifyEmail ¶
func (us SqlUserStore) VerifyEmail(userId, email string) (string, *model.AppError)
type SqlUserTermsOfServiceStore ¶
type SqlUserTermsOfServiceStore struct {
SqlStore
}
func (SqlUserTermsOfServiceStore) Delete ¶
func (s SqlUserTermsOfServiceStore) Delete(userId, termsOfServiceId string) *model.AppError
func (SqlUserTermsOfServiceStore) GetByUser ¶
func (s SqlUserTermsOfServiceStore) GetByUser(userId string) (*model.UserTermsOfService, *model.AppError)
func (SqlUserTermsOfServiceStore) Save ¶
func (s SqlUserTermsOfServiceStore) Save(userTermsOfService *model.UserTermsOfService) (*model.UserTermsOfService, *model.AppError)
type SqlWebhookStore ¶
type SqlWebhookStore struct { SqlStore // contains filtered or unexported fields }
func (SqlWebhookStore) AnalyticsIncomingCount ¶
func (s SqlWebhookStore) AnalyticsIncomingCount(teamId string) (int64, *model.AppError)
func (SqlWebhookStore) AnalyticsOutgoingCount ¶
func (s SqlWebhookStore) AnalyticsOutgoingCount(teamId string) (int64, *model.AppError)
func (SqlWebhookStore) ClearCaches ¶
func (s SqlWebhookStore) ClearCaches()
func (SqlWebhookStore) DeleteIncoming ¶
func (s SqlWebhookStore) DeleteIncoming(webhookId string, time int64) *model.AppError
func (SqlWebhookStore) DeleteOutgoing ¶
func (s SqlWebhookStore) DeleteOutgoing(webhookId string, time int64) *model.AppError
func (SqlWebhookStore) GetIncoming ¶
func (s SqlWebhookStore) GetIncoming(id string, allowFromCache bool) (*model.IncomingWebhook, *model.AppError)
func (SqlWebhookStore) GetIncomingByChannel ¶
func (s SqlWebhookStore) GetIncomingByChannel(channelId string) ([]*model.IncomingWebhook, *model.AppError)
func (SqlWebhookStore) GetIncomingByTeam ¶
func (s SqlWebhookStore) GetIncomingByTeam(teamId string, offset, limit int) ([]*model.IncomingWebhook, *model.AppError)
func (SqlWebhookStore) GetIncomingByTeamByUser ¶
func (s SqlWebhookStore) GetIncomingByTeamByUser(teamId string, userId string, offset, limit int) ([]*model.IncomingWebhook, *model.AppError)
func (SqlWebhookStore) GetIncomingList ¶
func (s SqlWebhookStore) GetIncomingList(offset, limit int) ([]*model.IncomingWebhook, *model.AppError)
func (SqlWebhookStore) GetIncomingListByUser ¶
func (s SqlWebhookStore) GetIncomingListByUser(userId string, offset, limit int) ([]*model.IncomingWebhook, *model.AppError)
func (SqlWebhookStore) GetOutgoing ¶
func (s SqlWebhookStore) GetOutgoing(id string) (*model.OutgoingWebhook, *model.AppError)
func (SqlWebhookStore) GetOutgoingByChannel ¶
func (s SqlWebhookStore) GetOutgoingByChannel(channelId string, offset, limit int) ([]*model.OutgoingWebhook, *model.AppError)
func (SqlWebhookStore) GetOutgoingByChannelByUser ¶
func (s SqlWebhookStore) GetOutgoingByChannelByUser(channelId string, userId string, offset, limit int) ([]*model.OutgoingWebhook, *model.AppError)
func (SqlWebhookStore) GetOutgoingByTeam ¶
func (s SqlWebhookStore) GetOutgoingByTeam(teamId string, offset, limit int) ([]*model.OutgoingWebhook, *model.AppError)
func (SqlWebhookStore) GetOutgoingByTeamByUser ¶
func (s SqlWebhookStore) GetOutgoingByTeamByUser(teamId string, userId string, offset, limit int) ([]*model.OutgoingWebhook, *model.AppError)
func (SqlWebhookStore) GetOutgoingList ¶
func (s SqlWebhookStore) GetOutgoingList(offset, limit int) ([]*model.OutgoingWebhook, *model.AppError)
func (SqlWebhookStore) GetOutgoingListByUser ¶
func (s SqlWebhookStore) GetOutgoingListByUser(userId string, offset, limit int) ([]*model.OutgoingWebhook, *model.AppError)
func (SqlWebhookStore) InvalidateWebhookCache ¶
func (s SqlWebhookStore) InvalidateWebhookCache(webhookId string)
func (SqlWebhookStore) PermanentDeleteIncomingByChannel ¶
func (s SqlWebhookStore) PermanentDeleteIncomingByChannel(channelId string) *model.AppError
func (SqlWebhookStore) PermanentDeleteIncomingByUser ¶
func (s SqlWebhookStore) PermanentDeleteIncomingByUser(userId string) *model.AppError
func (SqlWebhookStore) PermanentDeleteOutgoingByChannel ¶
func (s SqlWebhookStore) PermanentDeleteOutgoingByChannel(channelId string) *model.AppError
func (SqlWebhookStore) PermanentDeleteOutgoingByUser ¶
func (s SqlWebhookStore) PermanentDeleteOutgoingByUser(userId string) *model.AppError
func (SqlWebhookStore) SaveIncoming ¶
func (s SqlWebhookStore) SaveIncoming(webhook *model.IncomingWebhook) (*model.IncomingWebhook, *model.AppError)
func (SqlWebhookStore) SaveOutgoing ¶
func (s SqlWebhookStore) SaveOutgoing(webhook *model.OutgoingWebhook) (*model.OutgoingWebhook, *model.AppError)
func (SqlWebhookStore) UpdateIncoming ¶
func (s SqlWebhookStore) UpdateIncoming(hook *model.IncomingWebhook) (*model.IncomingWebhook, *model.AppError)
func (SqlWebhookStore) UpdateOutgoing ¶
func (s SqlWebhookStore) UpdateOutgoing(hook *model.OutgoingWebhook) (*model.OutgoingWebhook, *model.AppError)
type TraceOnAdapter ¶
type TraceOnAdapter struct{}
func (*TraceOnAdapter) Printf ¶
func (t *TraceOnAdapter) Printf(format string, v ...interface{})
type UserWithClass ¶
type UserWithLastActivityAt ¶
Source Files ¶
- audit_store.go
- branch_store.go
- class_store.go
- cluster_discovery_store.go
- command_store.go
- command_webhook_store.go
- compliance_store.go
- emoji_store.go
- file_info_store.go
- integrity.go
- job_store.go
- license_store.go
- link_metadata_store.go
- oauth_store.go
- preference_store.go
- role_store.go
- scheme_store.go
- session_store.go
- status_store.go
- store.go
- supplier.go
- supplier_reactions.go
- system_store.go
- terms_of_service_store.go
- tokens_store.go
- user_access_token_store.go
- user_store.go
- user_terms_of_service.go
- utils.go
- webhook_store.go