mirror of
https://github.com/mattermost/mattermost.git
synced 2025-02-25 18:55:24 -06:00
[MM-28985] Remove pointers to slice (part 1) (#18034)
* Remove pointers to slice (part 1) * Remove use of pointers to slice from model package (#18045) * Fix after merge
This commit is contained in:
@@ -550,7 +550,7 @@ func (s *TimerLayerChannelStore) AnalyticsTypeCount(teamID string, channelType m
|
||||
return result, err
|
||||
}
|
||||
|
||||
func (s *TimerLayerChannelStore) AutocompleteInTeam(teamID string, term string, includeDeleted bool) (*model.ChannelList, error) {
|
||||
func (s *TimerLayerChannelStore) AutocompleteInTeam(teamID string, term string, includeDeleted bool) (model.ChannelList, error) {
|
||||
start := timemodule.Now()
|
||||
|
||||
result, err := s.ChannelStore.AutocompleteInTeam(teamID, term, includeDeleted)
|
||||
@@ -566,7 +566,7 @@ func (s *TimerLayerChannelStore) AutocompleteInTeam(teamID string, term string,
|
||||
return result, err
|
||||
}
|
||||
|
||||
func (s *TimerLayerChannelStore) AutocompleteInTeamForSearch(teamID string, userID string, term string, includeDeleted bool) (*model.ChannelList, error) {
|
||||
func (s *TimerLayerChannelStore) AutocompleteInTeamForSearch(teamID string, userID string, term string, includeDeleted bool) (model.ChannelList, error) {
|
||||
start := timemodule.Now()
|
||||
|
||||
result, err := s.ChannelStore.AutocompleteInTeamForSearch(teamID, userID, term, includeDeleted)
|
||||
@@ -725,7 +725,7 @@ func (s *TimerLayerChannelStore) DeleteSidebarCategory(categoryID string) error
|
||||
return err
|
||||
}
|
||||
|
||||
func (s *TimerLayerChannelStore) DeleteSidebarChannelsByPreferences(preferences *model.Preferences) error {
|
||||
func (s *TimerLayerChannelStore) DeleteSidebarChannelsByPreferences(preferences model.Preferences) error {
|
||||
start := timemodule.Now()
|
||||
|
||||
err := s.ChannelStore.DeleteSidebarChannelsByPreferences(preferences)
|
||||
@@ -805,7 +805,7 @@ func (s *TimerLayerChannelStore) GetAllChannelMembersNotifyPropsForChannel(chann
|
||||
return result, err
|
||||
}
|
||||
|
||||
func (s *TimerLayerChannelStore) GetAllChannels(page int, perPage int, opts store.ChannelSearchOpts) (*model.ChannelListWithTeamData, error) {
|
||||
func (s *TimerLayerChannelStore) GetAllChannels(page int, perPage int, opts store.ChannelSearchOpts) (model.ChannelListWithTeamData, error) {
|
||||
start := timemodule.Now()
|
||||
|
||||
result, err := s.ChannelStore.GetAllChannels(page, perPage, opts)
|
||||
@@ -981,7 +981,7 @@ func (s *TimerLayerChannelStore) GetChannelUnread(channelID string, userID strin
|
||||
return result, err
|
||||
}
|
||||
|
||||
func (s *TimerLayerChannelStore) GetChannels(teamID string, userID string, includeDeleted bool, lastDeleteAt int) (*model.ChannelList, error) {
|
||||
func (s *TimerLayerChannelStore) GetChannels(teamID string, userID string, includeDeleted bool, lastDeleteAt int) (model.ChannelList, error) {
|
||||
start := timemodule.Now()
|
||||
|
||||
result, err := s.ChannelStore.GetChannels(teamID, userID, includeDeleted, lastDeleteAt)
|
||||
@@ -1045,7 +1045,7 @@ func (s *TimerLayerChannelStore) GetChannelsByScheme(schemeID string, offset int
|
||||
return result, err
|
||||
}
|
||||
|
||||
func (s *TimerLayerChannelStore) GetDeleted(team_id string, offset int, limit int, userID string) (*model.ChannelList, error) {
|
||||
func (s *TimerLayerChannelStore) GetDeleted(team_id string, offset int, limit int, userID string) (model.ChannelList, error) {
|
||||
start := timemodule.Now()
|
||||
|
||||
result, err := s.ChannelStore.GetDeleted(team_id, offset, limit, userID)
|
||||
@@ -1205,7 +1205,7 @@ func (s *TimerLayerChannelStore) GetMemberForPost(postID string, userID string)
|
||||
return result, err
|
||||
}
|
||||
|
||||
func (s *TimerLayerChannelStore) GetMembers(channelID string, offset int, limit int) (*model.ChannelMembers, error) {
|
||||
func (s *TimerLayerChannelStore) GetMembers(channelID string, offset int, limit int) (model.ChannelMembers, error) {
|
||||
start := timemodule.Now()
|
||||
|
||||
result, err := s.ChannelStore.GetMembers(channelID, offset, limit)
|
||||
@@ -1221,7 +1221,7 @@ func (s *TimerLayerChannelStore) GetMembers(channelID string, offset int, limit
|
||||
return result, err
|
||||
}
|
||||
|
||||
func (s *TimerLayerChannelStore) GetMembersByChannelIds(channelIds []string, userID string) (*model.ChannelMembers, error) {
|
||||
func (s *TimerLayerChannelStore) GetMembersByChannelIds(channelIds []string, userID string) (model.ChannelMembers, error) {
|
||||
start := timemodule.Now()
|
||||
|
||||
result, err := s.ChannelStore.GetMembersByChannelIds(channelIds, userID)
|
||||
@@ -1237,7 +1237,7 @@ func (s *TimerLayerChannelStore) GetMembersByChannelIds(channelIds []string, use
|
||||
return result, err
|
||||
}
|
||||
|
||||
func (s *TimerLayerChannelStore) GetMembersByIds(channelID string, userIds []string) (*model.ChannelMembers, error) {
|
||||
func (s *TimerLayerChannelStore) GetMembersByIds(channelID string, userIds []string) (model.ChannelMembers, error) {
|
||||
start := timemodule.Now()
|
||||
|
||||
result, err := s.ChannelStore.GetMembersByIds(channelID, userIds)
|
||||
@@ -1253,7 +1253,7 @@ func (s *TimerLayerChannelStore) GetMembersByIds(channelID string, userIds []str
|
||||
return result, err
|
||||
}
|
||||
|
||||
func (s *TimerLayerChannelStore) GetMembersForUser(teamID string, userID string) (*model.ChannelMembers, error) {
|
||||
func (s *TimerLayerChannelStore) GetMembersForUser(teamID string, userID string) (model.ChannelMembers, error) {
|
||||
start := timemodule.Now()
|
||||
|
||||
result, err := s.ChannelStore.GetMembersForUser(teamID, userID)
|
||||
@@ -1269,7 +1269,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, error) {
|
||||
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)
|
||||
@@ -1285,7 +1285,7 @@ func (s *TimerLayerChannelStore) GetMembersForUserWithPagination(teamID string,
|
||||
return result, err
|
||||
}
|
||||
|
||||
func (s *TimerLayerChannelStore) GetMoreChannels(teamID string, userID string, offset int, limit int) (*model.ChannelList, error) {
|
||||
func (s *TimerLayerChannelStore) GetMoreChannels(teamID string, userID string, offset int, limit int) (model.ChannelList, error) {
|
||||
start := timemodule.Now()
|
||||
|
||||
result, err := s.ChannelStore.GetMoreChannels(teamID, userID, offset, limit)
|
||||
@@ -1333,7 +1333,7 @@ func (s *TimerLayerChannelStore) GetPinnedPosts(channelID string) (*model.PostLi
|
||||
return result, err
|
||||
}
|
||||
|
||||
func (s *TimerLayerChannelStore) GetPrivateChannelsForTeam(teamID string, offset int, limit int) (*model.ChannelList, error) {
|
||||
func (s *TimerLayerChannelStore) GetPrivateChannelsForTeam(teamID string, offset int, limit int) (model.ChannelList, error) {
|
||||
start := timemodule.Now()
|
||||
|
||||
result, err := s.ChannelStore.GetPrivateChannelsForTeam(teamID, offset, limit)
|
||||
@@ -1349,7 +1349,7 @@ func (s *TimerLayerChannelStore) GetPrivateChannelsForTeam(teamID string, offset
|
||||
return result, err
|
||||
}
|
||||
|
||||
func (s *TimerLayerChannelStore) GetPublicChannelsByIdsForTeam(teamID string, channelIds []string) (*model.ChannelList, error) {
|
||||
func (s *TimerLayerChannelStore) GetPublicChannelsByIdsForTeam(teamID string, channelIds []string) (model.ChannelList, error) {
|
||||
start := timemodule.Now()
|
||||
|
||||
result, err := s.ChannelStore.GetPublicChannelsByIdsForTeam(teamID, channelIds)
|
||||
@@ -1365,7 +1365,7 @@ func (s *TimerLayerChannelStore) GetPublicChannelsByIdsForTeam(teamID string, ch
|
||||
return result, err
|
||||
}
|
||||
|
||||
func (s *TimerLayerChannelStore) GetPublicChannelsForTeam(teamID string, offset int, limit int) (*model.ChannelList, error) {
|
||||
func (s *TimerLayerChannelStore) GetPublicChannelsForTeam(teamID string, offset int, limit int) (model.ChannelList, error) {
|
||||
start := timemodule.Now()
|
||||
|
||||
result, err := s.ChannelStore.GetPublicChannelsForTeam(teamID, offset, limit)
|
||||
@@ -1429,7 +1429,7 @@ func (s *TimerLayerChannelStore) GetSidebarCategoryOrder(userID string, teamID s
|
||||
return result, err
|
||||
}
|
||||
|
||||
func (s *TimerLayerChannelStore) GetTeamChannels(teamID string) (*model.ChannelList, error) {
|
||||
func (s *TimerLayerChannelStore) GetTeamChannels(teamID string) (model.ChannelList, error) {
|
||||
start := timemodule.Now()
|
||||
|
||||
result, err := s.ChannelStore.GetTeamChannels(teamID)
|
||||
@@ -1854,7 +1854,7 @@ func (s *TimerLayerChannelStore) SaveMultipleMembers(members []*model.ChannelMem
|
||||
return result, err
|
||||
}
|
||||
|
||||
func (s *TimerLayerChannelStore) SearchAllChannels(term string, opts store.ChannelSearchOpts) (*model.ChannelListWithTeamData, int64, error) {
|
||||
func (s *TimerLayerChannelStore) SearchAllChannels(term string, opts store.ChannelSearchOpts) (model.ChannelListWithTeamData, int64, error) {
|
||||
start := timemodule.Now()
|
||||
|
||||
result, resultVar1, err := s.ChannelStore.SearchAllChannels(term, opts)
|
||||
@@ -1870,7 +1870,7 @@ func (s *TimerLayerChannelStore) SearchAllChannels(term string, opts store.Chann
|
||||
return result, resultVar1, err
|
||||
}
|
||||
|
||||
func (s *TimerLayerChannelStore) SearchArchivedInTeam(teamID string, term string, userID string) (*model.ChannelList, error) {
|
||||
func (s *TimerLayerChannelStore) SearchArchivedInTeam(teamID string, term string, userID string) (model.ChannelList, error) {
|
||||
start := timemodule.Now()
|
||||
|
||||
result, err := s.ChannelStore.SearchArchivedInTeam(teamID, term, userID)
|
||||
@@ -1886,7 +1886,7 @@ func (s *TimerLayerChannelStore) SearchArchivedInTeam(teamID string, term string
|
||||
return result, err
|
||||
}
|
||||
|
||||
func (s *TimerLayerChannelStore) SearchForUserInTeam(userID string, teamID string, term string, includeDeleted bool) (*model.ChannelList, error) {
|
||||
func (s *TimerLayerChannelStore) SearchForUserInTeam(userID string, teamID string, term string, includeDeleted bool) (model.ChannelList, error) {
|
||||
start := timemodule.Now()
|
||||
|
||||
result, err := s.ChannelStore.SearchForUserInTeam(userID, teamID, term, includeDeleted)
|
||||
@@ -1902,7 +1902,7 @@ func (s *TimerLayerChannelStore) SearchForUserInTeam(userID string, teamID strin
|
||||
return result, err
|
||||
}
|
||||
|
||||
func (s *TimerLayerChannelStore) SearchGroupChannels(userID string, term string) (*model.ChannelList, error) {
|
||||
func (s *TimerLayerChannelStore) SearchGroupChannels(userID string, term string) (model.ChannelList, error) {
|
||||
start := timemodule.Now()
|
||||
|
||||
result, err := s.ChannelStore.SearchGroupChannels(userID, term)
|
||||
@@ -1918,7 +1918,7 @@ func (s *TimerLayerChannelStore) SearchGroupChannels(userID string, term string)
|
||||
return result, err
|
||||
}
|
||||
|
||||
func (s *TimerLayerChannelStore) SearchInTeam(teamID string, term string, includeDeleted bool) (*model.ChannelList, error) {
|
||||
func (s *TimerLayerChannelStore) SearchInTeam(teamID string, term string, includeDeleted bool) (model.ChannelList, error) {
|
||||
start := timemodule.Now()
|
||||
|
||||
result, err := s.ChannelStore.SearchInTeam(teamID, term, includeDeleted)
|
||||
@@ -1934,7 +1934,7 @@ func (s *TimerLayerChannelStore) SearchInTeam(teamID string, term string, includ
|
||||
return result, err
|
||||
}
|
||||
|
||||
func (s *TimerLayerChannelStore) SearchMore(userID string, teamID string, term string) (*model.ChannelList, error) {
|
||||
func (s *TimerLayerChannelStore) SearchMore(userID string, teamID string, term string) (model.ChannelList, error) {
|
||||
start := timemodule.Now()
|
||||
|
||||
result, err := s.ChannelStore.SearchMore(userID, teamID, term)
|
||||
@@ -2126,7 +2126,7 @@ func (s *TimerLayerChannelStore) UpdateSidebarChannelCategoryOnMove(channel *mod
|
||||
return err
|
||||
}
|
||||
|
||||
func (s *TimerLayerChannelStore) UpdateSidebarChannelsByPreferences(preferences *model.Preferences) error {
|
||||
func (s *TimerLayerChannelStore) UpdateSidebarChannelsByPreferences(preferences model.Preferences) error {
|
||||
start := timemodule.Now()
|
||||
|
||||
err := s.ChannelStore.UpdateSidebarChannelsByPreferences(preferences)
|
||||
@@ -5353,7 +5353,7 @@ func (s *TimerLayerPreferenceStore) PermanentDeleteByUser(userID string) error {
|
||||
return err
|
||||
}
|
||||
|
||||
func (s *TimerLayerPreferenceStore) Save(preferences *model.Preferences) error {
|
||||
func (s *TimerLayerPreferenceStore) Save(preferences model.Preferences) error {
|
||||
start := timemodule.Now()
|
||||
|
||||
err := s.PreferenceStore.Save(preferences)
|
||||
@@ -5385,7 +5385,7 @@ func (s *TimerLayerProductNoticesStore) Clear(notices []string) error {
|
||||
return err
|
||||
}
|
||||
|
||||
func (s *TimerLayerProductNoticesStore) ClearOldNotices(currentNotices *model.ProductNotices) error {
|
||||
func (s *TimerLayerProductNoticesStore) ClearOldNotices(currentNotices model.ProductNotices) error {
|
||||
start := timemodule.Now()
|
||||
|
||||
err := s.ProductNoticesStore.ClearOldNotices(currentNotices)
|
||||
|
||||
Reference in New Issue
Block a user