ChannelStore migration Part 2 (#15405)
* Migration completed * Several corrections in tests * Fix imports * Fix some errors after testing * Trigger CI * Fix tests * Suggestions * Suggestions * Add license Co-authored-by: Mattermod <mattermod@users.noreply.github.com>
Этот коммит содержится в:
коммит произвёл
GitHub
родитель
7abc4f5383
Коммит
9ee9c78412
@@ -474,7 +474,7 @@ func (s *TimerLayerChannelStore) AnalyticsDeletedTypeCount(teamId string, channe
|
||||
return result, err
|
||||
}
|
||||
|
||||
func (s *TimerLayerChannelStore) AnalyticsTypeCount(teamId string, channelType string) (int64, *model.AppError) {
|
||||
func (s *TimerLayerChannelStore) AnalyticsTypeCount(teamId string, channelType string) (int64, error) {
|
||||
start := timemodule.Now()
|
||||
|
||||
result, err := s.ChannelStore.AnalyticsTypeCount(teamId, channelType)
|
||||
@@ -569,7 +569,7 @@ func (s *TimerLayerChannelStore) ClearSidebarOnTeamLeave(userId string, teamId s
|
||||
return err
|
||||
}
|
||||
|
||||
func (s *TimerLayerChannelStore) CountPostsAfter(channelId string, timestamp int64, userId string) (int, *model.AppError) {
|
||||
func (s *TimerLayerChannelStore) CountPostsAfter(channelId string, timestamp int64, userId string) (int, error) {
|
||||
start := timemodule.Now()
|
||||
|
||||
result, err := s.ChannelStore.CountPostsAfter(channelId, timestamp, userId)
|
||||
@@ -713,7 +713,7 @@ func (s *TimerLayerChannelStore) GetAll(teamId string) ([]*model.Channel, error)
|
||||
return result, err
|
||||
}
|
||||
|
||||
func (s *TimerLayerChannelStore) GetAllChannelMembersForUser(userId string, allowFromCache bool, includeDeleted bool) (map[string]string, *model.AppError) {
|
||||
func (s *TimerLayerChannelStore) GetAllChannelMembersForUser(userId string, allowFromCache bool, includeDeleted bool) (map[string]string, error) {
|
||||
start := timemodule.Now()
|
||||
|
||||
result, err := s.ChannelStore.GetAllChannelMembersForUser(userId, allowFromCache, includeDeleted)
|
||||
@@ -729,7 +729,7 @@ func (s *TimerLayerChannelStore) GetAllChannelMembersForUser(userId string, allo
|
||||
return result, err
|
||||
}
|
||||
|
||||
func (s *TimerLayerChannelStore) GetAllChannelMembersNotifyPropsForChannel(channelId string, allowFromCache bool) (map[string]model.StringMap, *model.AppError) {
|
||||
func (s *TimerLayerChannelStore) GetAllChannelMembersNotifyPropsForChannel(channelId string, allowFromCache bool) (map[string]model.StringMap, error) {
|
||||
start := timemodule.Now()
|
||||
|
||||
result, err := s.ChannelStore.GetAllChannelMembersNotifyPropsForChannel(channelId, allowFromCache)
|
||||
@@ -889,7 +889,7 @@ func (s *TimerLayerChannelStore) GetChannelMembersForExport(userId string, teamI
|
||||
return result, err
|
||||
}
|
||||
|
||||
func (s *TimerLayerChannelStore) GetChannelMembersTimezones(channelId string) ([]model.StringMap, *model.AppError) {
|
||||
func (s *TimerLayerChannelStore) GetChannelMembersTimezones(channelId string) ([]model.StringMap, error) {
|
||||
start := timemodule.Now()
|
||||
|
||||
result, err := s.ChannelStore.GetChannelMembersTimezones(channelId)
|
||||
@@ -1049,7 +1049,7 @@ func (s *TimerLayerChannelStore) GetFromMaster(id string) (*model.Channel, error
|
||||
return result, err
|
||||
}
|
||||
|
||||
func (s *TimerLayerChannelStore) GetGuestCount(channelId string, allowFromCache bool) (int64, *model.AppError) {
|
||||
func (s *TimerLayerChannelStore) GetGuestCount(channelId string, allowFromCache bool) (int64, error) {
|
||||
start := timemodule.Now()
|
||||
|
||||
result, err := s.ChannelStore.GetGuestCount(channelId, allowFromCache)
|
||||
@@ -1065,7 +1065,7 @@ func (s *TimerLayerChannelStore) GetGuestCount(channelId string, allowFromCache
|
||||
return result, err
|
||||
}
|
||||
|
||||
func (s *TimerLayerChannelStore) GetMember(channelId string, userId string) (*model.ChannelMember, *model.AppError) {
|
||||
func (s *TimerLayerChannelStore) GetMember(channelId string, userId string) (*model.ChannelMember, error) {
|
||||
start := timemodule.Now()
|
||||
|
||||
result, err := s.ChannelStore.GetMember(channelId, userId)
|
||||
@@ -1081,7 +1081,7 @@ func (s *TimerLayerChannelStore) GetMember(channelId string, userId string) (*mo
|
||||
return result, err
|
||||
}
|
||||
|
||||
func (s *TimerLayerChannelStore) GetMemberCount(channelId string, allowFromCache bool) (int64, *model.AppError) {
|
||||
func (s *TimerLayerChannelStore) GetMemberCount(channelId string, allowFromCache bool) (int64, error) {
|
||||
start := timemodule.Now()
|
||||
|
||||
result, err := s.ChannelStore.GetMemberCount(channelId, allowFromCache)
|
||||
@@ -1113,7 +1113,7 @@ func (s *TimerLayerChannelStore) GetMemberCountFromCache(channelId string) int64
|
||||
return result
|
||||
}
|
||||
|
||||
func (s *TimerLayerChannelStore) GetMemberCountsByGroup(channelID string, includeTimezones bool) ([]*model.ChannelMemberCountByGroup, *model.AppError) {
|
||||
func (s *TimerLayerChannelStore) GetMemberCountsByGroup(channelID string, includeTimezones bool) ([]*model.ChannelMemberCountByGroup, error) {
|
||||
start := timemodule.Now()
|
||||
|
||||
result, err := s.ChannelStore.GetMemberCountsByGroup(channelID, includeTimezones)
|
||||
@@ -1129,7 +1129,7 @@ func (s *TimerLayerChannelStore) GetMemberCountsByGroup(channelID string, includ
|
||||
return result, err
|
||||
}
|
||||
|
||||
func (s *TimerLayerChannelStore) GetMemberForPost(postId string, userId string) (*model.ChannelMember, *model.AppError) {
|
||||
func (s *TimerLayerChannelStore) GetMemberForPost(postId string, userId string) (*model.ChannelMember, error) {
|
||||
start := timemodule.Now()
|
||||
|
||||
result, err := s.ChannelStore.GetMemberForPost(postId, userId)
|
||||
@@ -1145,7 +1145,7 @@ func (s *TimerLayerChannelStore) GetMemberForPost(postId string, userId string)
|
||||
return result, err
|
||||
}
|
||||
|
||||
func (s *TimerLayerChannelStore) GetMembers(channelId string, offset int, limit int) (*model.ChannelMembers, *model.AppError) {
|
||||
func (s *TimerLayerChannelStore) GetMembers(channelId string, offset int, limit int) (*model.ChannelMembers, error) {
|
||||
start := timemodule.Now()
|
||||
|
||||
result, err := s.ChannelStore.GetMembers(channelId, offset, limit)
|
||||
@@ -1177,7 +1177,7 @@ func (s *TimerLayerChannelStore) GetMembersByIds(channelId string, userIds []str
|
||||
return result, err
|
||||
}
|
||||
|
||||
func (s *TimerLayerChannelStore) GetMembersForUser(teamId string, userId string) (*model.ChannelMembers, *model.AppError) {
|
||||
func (s *TimerLayerChannelStore) GetMembersForUser(teamId string, userId string) (*model.ChannelMembers, error) {
|
||||
start := timemodule.Now()
|
||||
|
||||
result, err := s.ChannelStore.GetMembersForUser(teamId, userId)
|
||||
@@ -1193,7 +1193,7 @@ func (s *TimerLayerChannelStore) GetMembersForUser(teamId string, userId string)
|
||||
return result, err
|
||||
}
|
||||
|
||||
func (s *TimerLayerChannelStore) GetMembersForUserWithPagination(teamId string, userId string, page int, perPage int) (*model.ChannelMembers, *model.AppError) {
|
||||
func (s *TimerLayerChannelStore) GetMembersForUserWithPagination(teamId string, userId string, page int, perPage int) (*model.ChannelMembers, error) {
|
||||
start := timemodule.Now()
|
||||
|
||||
result, err := s.ChannelStore.GetMembersForUserWithPagination(teamId, userId, page, perPage)
|
||||
@@ -1225,7 +1225,7 @@ func (s *TimerLayerChannelStore) GetMoreChannels(teamId string, userId string, o
|
||||
return result, err
|
||||
}
|
||||
|
||||
func (s *TimerLayerChannelStore) GetPinnedPostCount(channelId string, allowFromCache bool) (int64, *model.AppError) {
|
||||
func (s *TimerLayerChannelStore) GetPinnedPostCount(channelId string, allowFromCache bool) (int64, error) {
|
||||
start := timemodule.Now()
|
||||
|
||||
result, err := s.ChannelStore.GetPinnedPostCount(channelId, allowFromCache)
|
||||
@@ -1241,7 +1241,7 @@ func (s *TimerLayerChannelStore) GetPinnedPostCount(channelId string, allowFromC
|
||||
return result, err
|
||||
}
|
||||
|
||||
func (s *TimerLayerChannelStore) GetPinnedPosts(channelId string) (*model.PostList, *model.AppError) {
|
||||
func (s *TimerLayerChannelStore) GetPinnedPosts(channelId string) (*model.PostList, error) {
|
||||
start := timemodule.Now()
|
||||
|
||||
result, err := s.ChannelStore.GetPinnedPosts(channelId)
|
||||
@@ -1385,7 +1385,7 @@ func (s *TimerLayerChannelStore) GroupSyncedChannelCount() (int64, *model.AppErr
|
||||
return result, err
|
||||
}
|
||||
|
||||
func (s *TimerLayerChannelStore) IncrementMentionCount(channelId string, userId string) *model.AppError {
|
||||
func (s *TimerLayerChannelStore) IncrementMentionCount(channelId string, userId string) error {
|
||||
start := timemodule.Now()
|
||||
|
||||
err := s.ChannelStore.IncrementMentionCount(channelId, userId)
|
||||
@@ -1586,7 +1586,7 @@ func (s *TimerLayerChannelStore) PermanentDeleteByTeam(teamId string) error {
|
||||
return err
|
||||
}
|
||||
|
||||
func (s *TimerLayerChannelStore) PermanentDeleteMembersByChannel(channelId string) *model.AppError {
|
||||
func (s *TimerLayerChannelStore) PermanentDeleteMembersByChannel(channelId string) error {
|
||||
start := timemodule.Now()
|
||||
|
||||
err := s.ChannelStore.PermanentDeleteMembersByChannel(channelId)
|
||||
@@ -1602,7 +1602,7 @@ func (s *TimerLayerChannelStore) PermanentDeleteMembersByChannel(channelId strin
|
||||
return err
|
||||
}
|
||||
|
||||
func (s *TimerLayerChannelStore) PermanentDeleteMembersByUser(userId string) *model.AppError {
|
||||
func (s *TimerLayerChannelStore) PermanentDeleteMembersByUser(userId string) error {
|
||||
start := timemodule.Now()
|
||||
|
||||
err := s.ChannelStore.PermanentDeleteMembersByUser(userId)
|
||||
@@ -1634,7 +1634,7 @@ func (s *TimerLayerChannelStore) RemoveAllDeactivatedMembers(channelId string) *
|
||||
return err
|
||||
}
|
||||
|
||||
func (s *TimerLayerChannelStore) RemoveMember(channelId string, userId string) *model.AppError {
|
||||
func (s *TimerLayerChannelStore) RemoveMember(channelId string, userId string) error {
|
||||
start := timemodule.Now()
|
||||
|
||||
err := s.ChannelStore.RemoveMember(channelId, userId)
|
||||
@@ -1650,7 +1650,7 @@ func (s *TimerLayerChannelStore) RemoveMember(channelId string, userId string) *
|
||||
return err
|
||||
}
|
||||
|
||||
func (s *TimerLayerChannelStore) RemoveMembers(channelId string, userIds []string) *model.AppError {
|
||||
func (s *TimerLayerChannelStore) RemoveMembers(channelId string, userIds []string) error {
|
||||
start := timemodule.Now()
|
||||
|
||||
err := s.ChannelStore.RemoveMembers(channelId, userIds)
|
||||
@@ -1730,7 +1730,7 @@ func (s *TimerLayerChannelStore) SaveDirectChannel(channel *model.Channel, membe
|
||||
return result, err
|
||||
}
|
||||
|
||||
func (s *TimerLayerChannelStore) SaveMember(member *model.ChannelMember) (*model.ChannelMember, *model.AppError) {
|
||||
func (s *TimerLayerChannelStore) SaveMember(member *model.ChannelMember) (*model.ChannelMember, error) {
|
||||
start := timemodule.Now()
|
||||
|
||||
result, err := s.ChannelStore.SaveMember(member)
|
||||
@@ -1746,7 +1746,7 @@ func (s *TimerLayerChannelStore) SaveMember(member *model.ChannelMember) (*model
|
||||
return result, err
|
||||
}
|
||||
|
||||
func (s *TimerLayerChannelStore) SaveMultipleMembers(members []*model.ChannelMember) ([]*model.ChannelMember, *model.AppError) {
|
||||
func (s *TimerLayerChannelStore) SaveMultipleMembers(members []*model.ChannelMember) ([]*model.ChannelMember, error) {
|
||||
start := timemodule.Now()
|
||||
|
||||
result, err := s.ChannelStore.SaveMultipleMembers(members)
|
||||
@@ -1890,7 +1890,7 @@ func (s *TimerLayerChannelStore) Update(channel *model.Channel) (*model.Channel,
|
||||
return result, err
|
||||
}
|
||||
|
||||
func (s *TimerLayerChannelStore) UpdateLastViewedAt(channelIds []string, userId string) (map[string]int64, *model.AppError) {
|
||||
func (s *TimerLayerChannelStore) UpdateLastViewedAt(channelIds []string, userId string) (map[string]int64, error) {
|
||||
start := timemodule.Now()
|
||||
|
||||
result, err := s.ChannelStore.UpdateLastViewedAt(channelIds, userId)
|
||||
@@ -1906,7 +1906,7 @@ func (s *TimerLayerChannelStore) UpdateLastViewedAt(channelIds []string, userId
|
||||
return result, err
|
||||
}
|
||||
|
||||
func (s *TimerLayerChannelStore) UpdateLastViewedAtPost(unreadPost *model.Post, userID string, mentionCount int) (*model.ChannelUnreadAt, *model.AppError) {
|
||||
func (s *TimerLayerChannelStore) UpdateLastViewedAtPost(unreadPost *model.Post, userID string, mentionCount int) (*model.ChannelUnreadAt, error) {
|
||||
start := timemodule.Now()
|
||||
|
||||
result, err := s.ChannelStore.UpdateLastViewedAtPost(unreadPost, userID, mentionCount)
|
||||
@@ -1922,7 +1922,7 @@ func (s *TimerLayerChannelStore) UpdateLastViewedAtPost(unreadPost *model.Post,
|
||||
return result, err
|
||||
}
|
||||
|
||||
func (s *TimerLayerChannelStore) UpdateMember(member *model.ChannelMember) (*model.ChannelMember, *model.AppError) {
|
||||
func (s *TimerLayerChannelStore) UpdateMember(member *model.ChannelMember) (*model.ChannelMember, error) {
|
||||
start := timemodule.Now()
|
||||
|
||||
result, err := s.ChannelStore.UpdateMember(member)
|
||||
@@ -1954,7 +1954,7 @@ func (s *TimerLayerChannelStore) UpdateMembersRole(channelID string, userIDs []s
|
||||
return err
|
||||
}
|
||||
|
||||
func (s *TimerLayerChannelStore) UpdateMultipleMembers(members []*model.ChannelMember) ([]*model.ChannelMember, *model.AppError) {
|
||||
func (s *TimerLayerChannelStore) UpdateMultipleMembers(members []*model.ChannelMember) ([]*model.ChannelMember, error) {
|
||||
start := timemodule.Now()
|
||||
|
||||
result, err := s.ChannelStore.UpdateMultipleMembers(members)
|
||||
|
||||
Ссылка в новой задаче
Block a user