* Migration completed

* Fix tests

* Fix tests

* Fix tests

* Suggestions

* Trigger CI

* Suggestions

* Merge with master

* Migration completed

* Fix typo

* fix err check

Co-authored-by: Mattermod <mattermod@users.noreply.github.com>
Co-authored-by: Agniva De Sarker <agnivade@yahoo.co.in>
Этот коммит содержится в:
Rodrigo Villablanca
2020-11-17 00:32:36 -03:00
коммит произвёл GitHub
родитель 2ebc8ec90f
Коммит 95221d9ace
14 изменённых файлов: 1524 добавлений и 816 удалений

Просмотреть файл

@@ -2909,7 +2909,7 @@ func (s *TimerLayerFileInfoStore) Upsert(info *model.FileInfo) (*model.FileInfo,
return result, err
}
func (s *TimerLayerGroupStore) AdminRoleGroupsForSyncableMember(userID string, syncableID string, syncableType model.GroupSyncableType) ([]string, *model.AppError) {
func (s *TimerLayerGroupStore) AdminRoleGroupsForSyncableMember(userID string, syncableID string, syncableType model.GroupSyncableType) ([]string, error) {
start := timemodule.Now()
result, err := s.GroupStore.AdminRoleGroupsForSyncableMember(userID, syncableID, syncableType)
@@ -2925,7 +2925,7 @@ func (s *TimerLayerGroupStore) AdminRoleGroupsForSyncableMember(userID string, s
return result, err
}
func (s *TimerLayerGroupStore) ChannelMembersMinusGroupMembers(channelID string, groupIDs []string, page int, perPage int) ([]*model.UserWithGroups, *model.AppError) {
func (s *TimerLayerGroupStore) ChannelMembersMinusGroupMembers(channelID string, groupIDs []string, page int, perPage int) ([]*model.UserWithGroups, error) {
start := timemodule.Now()
result, err := s.GroupStore.ChannelMembersMinusGroupMembers(channelID, groupIDs, page, perPage)
@@ -2941,7 +2941,7 @@ func (s *TimerLayerGroupStore) ChannelMembersMinusGroupMembers(channelID string,
return result, err
}
func (s *TimerLayerGroupStore) ChannelMembersToAdd(since int64, channelID *string) ([]*model.UserChannelIDPair, *model.AppError) {
func (s *TimerLayerGroupStore) ChannelMembersToAdd(since int64, channelID *string) ([]*model.UserChannelIDPair, error) {
start := timemodule.Now()
result, err := s.GroupStore.ChannelMembersToAdd(since, channelID)
@@ -2957,7 +2957,7 @@ func (s *TimerLayerGroupStore) ChannelMembersToAdd(since int64, channelID *strin
return result, err
}
func (s *TimerLayerGroupStore) ChannelMembersToRemove(channelID *string) ([]*model.ChannelMember, *model.AppError) {
func (s *TimerLayerGroupStore) ChannelMembersToRemove(channelID *string) ([]*model.ChannelMember, error) {
start := timemodule.Now()
result, err := s.GroupStore.ChannelMembersToRemove(channelID)
@@ -2973,7 +2973,7 @@ func (s *TimerLayerGroupStore) ChannelMembersToRemove(channelID *string) ([]*mod
return result, err
}
func (s *TimerLayerGroupStore) CountChannelMembersMinusGroupMembers(channelID string, groupIDs []string) (int64, *model.AppError) {
func (s *TimerLayerGroupStore) CountChannelMembersMinusGroupMembers(channelID string, groupIDs []string) (int64, error) {
start := timemodule.Now()
result, err := s.GroupStore.CountChannelMembersMinusGroupMembers(channelID, groupIDs)
@@ -2989,7 +2989,7 @@ func (s *TimerLayerGroupStore) CountChannelMembersMinusGroupMembers(channelID st
return result, err
}
func (s *TimerLayerGroupStore) CountGroupsByChannel(channelId string, opts model.GroupSearchOpts) (int64, *model.AppError) {
func (s *TimerLayerGroupStore) CountGroupsByChannel(channelId string, opts model.GroupSearchOpts) (int64, error) {
start := timemodule.Now()
result, err := s.GroupStore.CountGroupsByChannel(channelId, opts)
@@ -3005,7 +3005,7 @@ func (s *TimerLayerGroupStore) CountGroupsByChannel(channelId string, opts model
return result, err
}
func (s *TimerLayerGroupStore) CountGroupsByTeam(teamId string, opts model.GroupSearchOpts) (int64, *model.AppError) {
func (s *TimerLayerGroupStore) CountGroupsByTeam(teamId string, opts model.GroupSearchOpts) (int64, error) {
start := timemodule.Now()
result, err := s.GroupStore.CountGroupsByTeam(teamId, opts)
@@ -3021,7 +3021,7 @@ func (s *TimerLayerGroupStore) CountGroupsByTeam(teamId string, opts model.Group
return result, err
}
func (s *TimerLayerGroupStore) CountTeamMembersMinusGroupMembers(teamID string, groupIDs []string) (int64, *model.AppError) {
func (s *TimerLayerGroupStore) CountTeamMembersMinusGroupMembers(teamID string, groupIDs []string) (int64, error) {
start := timemodule.Now()
result, err := s.GroupStore.CountTeamMembersMinusGroupMembers(teamID, groupIDs)
@@ -3037,7 +3037,7 @@ func (s *TimerLayerGroupStore) CountTeamMembersMinusGroupMembers(teamID string,
return result, err
}
func (s *TimerLayerGroupStore) Create(group *model.Group) (*model.Group, *model.AppError) {
func (s *TimerLayerGroupStore) Create(group *model.Group) (*model.Group, error) {
start := timemodule.Now()
result, err := s.GroupStore.Create(group)
@@ -3053,7 +3053,7 @@ func (s *TimerLayerGroupStore) Create(group *model.Group) (*model.Group, *model.
return result, err
}
func (s *TimerLayerGroupStore) CreateGroupSyncable(groupSyncable *model.GroupSyncable) (*model.GroupSyncable, *model.AppError) {
func (s *TimerLayerGroupStore) CreateGroupSyncable(groupSyncable *model.GroupSyncable) (*model.GroupSyncable, error) {
start := timemodule.Now()
result, err := s.GroupStore.CreateGroupSyncable(groupSyncable)
@@ -3069,7 +3069,7 @@ func (s *TimerLayerGroupStore) CreateGroupSyncable(groupSyncable *model.GroupSyn
return result, err
}
func (s *TimerLayerGroupStore) Delete(groupID string) (*model.Group, *model.AppError) {
func (s *TimerLayerGroupStore) Delete(groupID string) (*model.Group, error) {
start := timemodule.Now()
result, err := s.GroupStore.Delete(groupID)
@@ -3085,7 +3085,7 @@ func (s *TimerLayerGroupStore) Delete(groupID string) (*model.Group, *model.AppE
return result, err
}
func (s *TimerLayerGroupStore) DeleteGroupSyncable(groupID string, syncableID string, syncableType model.GroupSyncableType) (*model.GroupSyncable, *model.AppError) {
func (s *TimerLayerGroupStore) DeleteGroupSyncable(groupID string, syncableID string, syncableType model.GroupSyncableType) (*model.GroupSyncable, error) {
start := timemodule.Now()
result, err := s.GroupStore.DeleteGroupSyncable(groupID, syncableID, syncableType)
@@ -3101,7 +3101,7 @@ func (s *TimerLayerGroupStore) DeleteGroupSyncable(groupID string, syncableID st
return result, err
}
func (s *TimerLayerGroupStore) DeleteMember(groupID string, userID string) (*model.GroupMember, *model.AppError) {
func (s *TimerLayerGroupStore) DeleteMember(groupID string, userID string) (*model.GroupMember, error) {
start := timemodule.Now()
result, err := s.GroupStore.DeleteMember(groupID, userID)
@@ -3117,7 +3117,7 @@ func (s *TimerLayerGroupStore) DeleteMember(groupID string, userID string) (*mod
return result, err
}
func (s *TimerLayerGroupStore) DistinctGroupMemberCount() (int64, *model.AppError) {
func (s *TimerLayerGroupStore) DistinctGroupMemberCount() (int64, error) {
start := timemodule.Now()
result, err := s.GroupStore.DistinctGroupMemberCount()
@@ -3133,7 +3133,7 @@ func (s *TimerLayerGroupStore) DistinctGroupMemberCount() (int64, *model.AppErro
return result, err
}
func (s *TimerLayerGroupStore) Get(groupID string) (*model.Group, *model.AppError) {
func (s *TimerLayerGroupStore) Get(groupID string) (*model.Group, error) {
start := timemodule.Now()
result, err := s.GroupStore.Get(groupID)
@@ -3149,7 +3149,7 @@ func (s *TimerLayerGroupStore) Get(groupID string) (*model.Group, *model.AppErro
return result, err
}
func (s *TimerLayerGroupStore) GetAllBySource(groupSource model.GroupSource) ([]*model.Group, *model.AppError) {
func (s *TimerLayerGroupStore) GetAllBySource(groupSource model.GroupSource) ([]*model.Group, error) {
start := timemodule.Now()
result, err := s.GroupStore.GetAllBySource(groupSource)
@@ -3165,7 +3165,7 @@ func (s *TimerLayerGroupStore) GetAllBySource(groupSource model.GroupSource) ([]
return result, err
}
func (s *TimerLayerGroupStore) GetAllGroupSyncablesByGroupId(groupID string, syncableType model.GroupSyncableType) ([]*model.GroupSyncable, *model.AppError) {
func (s *TimerLayerGroupStore) GetAllGroupSyncablesByGroupId(groupID string, syncableType model.GroupSyncableType) ([]*model.GroupSyncable, error) {
start := timemodule.Now()
result, err := s.GroupStore.GetAllGroupSyncablesByGroupId(groupID, syncableType)
@@ -3181,7 +3181,7 @@ func (s *TimerLayerGroupStore) GetAllGroupSyncablesByGroupId(groupID string, syn
return result, err
}
func (s *TimerLayerGroupStore) GetByIDs(groupIDs []string) ([]*model.Group, *model.AppError) {
func (s *TimerLayerGroupStore) GetByIDs(groupIDs []string) ([]*model.Group, error) {
start := timemodule.Now()
result, err := s.GroupStore.GetByIDs(groupIDs)
@@ -3197,7 +3197,7 @@ func (s *TimerLayerGroupStore) GetByIDs(groupIDs []string) ([]*model.Group, *mod
return result, err
}
func (s *TimerLayerGroupStore) GetByName(name string, opts model.GroupSearchOpts) (*model.Group, *model.AppError) {
func (s *TimerLayerGroupStore) GetByName(name string, opts model.GroupSearchOpts) (*model.Group, error) {
start := timemodule.Now()
result, err := s.GroupStore.GetByName(name, opts)
@@ -3213,7 +3213,7 @@ func (s *TimerLayerGroupStore) GetByName(name string, opts model.GroupSearchOpts
return result, err
}
func (s *TimerLayerGroupStore) GetByRemoteID(remoteID string, groupSource model.GroupSource) (*model.Group, *model.AppError) {
func (s *TimerLayerGroupStore) GetByRemoteID(remoteID string, groupSource model.GroupSource) (*model.Group, error) {
start := timemodule.Now()
result, err := s.GroupStore.GetByRemoteID(remoteID, groupSource)
@@ -3229,7 +3229,7 @@ func (s *TimerLayerGroupStore) GetByRemoteID(remoteID string, groupSource model.
return result, err
}
func (s *TimerLayerGroupStore) GetByUser(userId string) ([]*model.Group, *model.AppError) {
func (s *TimerLayerGroupStore) GetByUser(userId string) ([]*model.Group, error) {
start := timemodule.Now()
result, err := s.GroupStore.GetByUser(userId)
@@ -3245,7 +3245,7 @@ func (s *TimerLayerGroupStore) GetByUser(userId string) ([]*model.Group, *model.
return result, err
}
func (s *TimerLayerGroupStore) GetGroupSyncable(groupID string, syncableID string, syncableType model.GroupSyncableType) (*model.GroupSyncable, *model.AppError) {
func (s *TimerLayerGroupStore) GetGroupSyncable(groupID string, syncableID string, syncableType model.GroupSyncableType) (*model.GroupSyncable, error) {
start := timemodule.Now()
result, err := s.GroupStore.GetGroupSyncable(groupID, syncableID, syncableType)
@@ -3261,7 +3261,7 @@ func (s *TimerLayerGroupStore) GetGroupSyncable(groupID string, syncableID strin
return result, err
}
func (s *TimerLayerGroupStore) GetGroups(page int, perPage int, opts model.GroupSearchOpts) ([]*model.Group, *model.AppError) {
func (s *TimerLayerGroupStore) GetGroups(page int, perPage int, opts model.GroupSearchOpts) ([]*model.Group, error) {
start := timemodule.Now()
result, err := s.GroupStore.GetGroups(page, perPage, opts)
@@ -3277,7 +3277,7 @@ func (s *TimerLayerGroupStore) GetGroups(page int, perPage int, opts model.Group
return result, err
}
func (s *TimerLayerGroupStore) GetGroupsAssociatedToChannelsByTeam(teamId string, opts model.GroupSearchOpts) (map[string][]*model.GroupWithSchemeAdmin, *model.AppError) {
func (s *TimerLayerGroupStore) GetGroupsAssociatedToChannelsByTeam(teamId string, opts model.GroupSearchOpts) (map[string][]*model.GroupWithSchemeAdmin, error) {
start := timemodule.Now()
result, err := s.GroupStore.GetGroupsAssociatedToChannelsByTeam(teamId, opts)
@@ -3293,7 +3293,7 @@ func (s *TimerLayerGroupStore) GetGroupsAssociatedToChannelsByTeam(teamId string
return result, err
}
func (s *TimerLayerGroupStore) GetGroupsByChannel(channelId string, opts model.GroupSearchOpts) ([]*model.GroupWithSchemeAdmin, *model.AppError) {
func (s *TimerLayerGroupStore) GetGroupsByChannel(channelId string, opts model.GroupSearchOpts) ([]*model.GroupWithSchemeAdmin, error) {
start := timemodule.Now()
result, err := s.GroupStore.GetGroupsByChannel(channelId, opts)
@@ -3309,7 +3309,7 @@ func (s *TimerLayerGroupStore) GetGroupsByChannel(channelId string, opts model.G
return result, err
}
func (s *TimerLayerGroupStore) GetGroupsByTeam(teamId string, opts model.GroupSearchOpts) ([]*model.GroupWithSchemeAdmin, *model.AppError) {
func (s *TimerLayerGroupStore) GetGroupsByTeam(teamId string, opts model.GroupSearchOpts) ([]*model.GroupWithSchemeAdmin, error) {
start := timemodule.Now()
result, err := s.GroupStore.GetGroupsByTeam(teamId, opts)
@@ -3325,7 +3325,7 @@ func (s *TimerLayerGroupStore) GetGroupsByTeam(teamId string, opts model.GroupSe
return result, err
}
func (s *TimerLayerGroupStore) GetMemberCount(groupID string) (int64, *model.AppError) {
func (s *TimerLayerGroupStore) GetMemberCount(groupID string) (int64, error) {
start := timemodule.Now()
result, err := s.GroupStore.GetMemberCount(groupID)
@@ -3341,7 +3341,7 @@ func (s *TimerLayerGroupStore) GetMemberCount(groupID string) (int64, *model.App
return result, err
}
func (s *TimerLayerGroupStore) GetMemberUsers(groupID string) ([]*model.User, *model.AppError) {
func (s *TimerLayerGroupStore) GetMemberUsers(groupID string) ([]*model.User, error) {
start := timemodule.Now()
result, err := s.GroupStore.GetMemberUsers(groupID)
@@ -3357,7 +3357,7 @@ func (s *TimerLayerGroupStore) GetMemberUsers(groupID string) ([]*model.User, *m
return result, err
}
func (s *TimerLayerGroupStore) GetMemberUsersInTeam(groupID string, teamID string) ([]*model.User, *model.AppError) {
func (s *TimerLayerGroupStore) GetMemberUsersInTeam(groupID string, teamID string) ([]*model.User, error) {
start := timemodule.Now()
result, err := s.GroupStore.GetMemberUsersInTeam(groupID, teamID)
@@ -3373,7 +3373,7 @@ func (s *TimerLayerGroupStore) GetMemberUsersInTeam(groupID string, teamID strin
return result, err
}
func (s *TimerLayerGroupStore) GetMemberUsersNotInChannel(groupID string, channelID string) ([]*model.User, *model.AppError) {
func (s *TimerLayerGroupStore) GetMemberUsersNotInChannel(groupID string, channelID string) ([]*model.User, error) {
start := timemodule.Now()
result, err := s.GroupStore.GetMemberUsersNotInChannel(groupID, channelID)
@@ -3389,7 +3389,7 @@ func (s *TimerLayerGroupStore) GetMemberUsersNotInChannel(groupID string, channe
return result, err
}
func (s *TimerLayerGroupStore) GetMemberUsersPage(groupID string, page int, perPage int) ([]*model.User, *model.AppError) {
func (s *TimerLayerGroupStore) GetMemberUsersPage(groupID string, page int, perPage int) ([]*model.User, error) {
start := timemodule.Now()
result, err := s.GroupStore.GetMemberUsersPage(groupID, page, perPage)
@@ -3405,7 +3405,7 @@ func (s *TimerLayerGroupStore) GetMemberUsersPage(groupID string, page int, perP
return result, err
}
func (s *TimerLayerGroupStore) GroupChannelCount() (int64, *model.AppError) {
func (s *TimerLayerGroupStore) GroupChannelCount() (int64, error) {
start := timemodule.Now()
result, err := s.GroupStore.GroupChannelCount()
@@ -3421,7 +3421,7 @@ func (s *TimerLayerGroupStore) GroupChannelCount() (int64, *model.AppError) {
return result, err
}
func (s *TimerLayerGroupStore) GroupCount() (int64, *model.AppError) {
func (s *TimerLayerGroupStore) GroupCount() (int64, error) {
start := timemodule.Now()
result, err := s.GroupStore.GroupCount()
@@ -3437,7 +3437,7 @@ func (s *TimerLayerGroupStore) GroupCount() (int64, *model.AppError) {
return result, err
}
func (s *TimerLayerGroupStore) GroupCountWithAllowReference() (int64, *model.AppError) {
func (s *TimerLayerGroupStore) GroupCountWithAllowReference() (int64, error) {
start := timemodule.Now()
result, err := s.GroupStore.GroupCountWithAllowReference()
@@ -3453,7 +3453,7 @@ func (s *TimerLayerGroupStore) GroupCountWithAllowReference() (int64, *model.App
return result, err
}
func (s *TimerLayerGroupStore) GroupMemberCount() (int64, *model.AppError) {
func (s *TimerLayerGroupStore) GroupMemberCount() (int64, error) {
start := timemodule.Now()
result, err := s.GroupStore.GroupMemberCount()
@@ -3469,7 +3469,7 @@ func (s *TimerLayerGroupStore) GroupMemberCount() (int64, *model.AppError) {
return result, err
}
func (s *TimerLayerGroupStore) GroupTeamCount() (int64, *model.AppError) {
func (s *TimerLayerGroupStore) GroupTeamCount() (int64, error) {
start := timemodule.Now()
result, err := s.GroupStore.GroupTeamCount()
@@ -3485,7 +3485,7 @@ func (s *TimerLayerGroupStore) GroupTeamCount() (int64, *model.AppError) {
return result, err
}
func (s *TimerLayerGroupStore) PermanentDeleteMembersByUser(userId string) *model.AppError {
func (s *TimerLayerGroupStore) PermanentDeleteMembersByUser(userId string) error {
start := timemodule.Now()
err := s.GroupStore.PermanentDeleteMembersByUser(userId)
@@ -3501,7 +3501,7 @@ func (s *TimerLayerGroupStore) PermanentDeleteMembersByUser(userId string) *mode
return err
}
func (s *TimerLayerGroupStore) PermittedSyncableAdmins(syncableID string, syncableType model.GroupSyncableType) ([]string, *model.AppError) {
func (s *TimerLayerGroupStore) PermittedSyncableAdmins(syncableID string, syncableType model.GroupSyncableType) ([]string, error) {
start := timemodule.Now()
result, err := s.GroupStore.PermittedSyncableAdmins(syncableID, syncableType)
@@ -3517,7 +3517,7 @@ func (s *TimerLayerGroupStore) PermittedSyncableAdmins(syncableID string, syncab
return result, err
}
func (s *TimerLayerGroupStore) TeamMembersMinusGroupMembers(teamID string, groupIDs []string, page int, perPage int) ([]*model.UserWithGroups, *model.AppError) {
func (s *TimerLayerGroupStore) TeamMembersMinusGroupMembers(teamID string, groupIDs []string, page int, perPage int) ([]*model.UserWithGroups, error) {
start := timemodule.Now()
result, err := s.GroupStore.TeamMembersMinusGroupMembers(teamID, groupIDs, page, perPage)
@@ -3533,7 +3533,7 @@ func (s *TimerLayerGroupStore) TeamMembersMinusGroupMembers(teamID string, group
return result, err
}
func (s *TimerLayerGroupStore) TeamMembersToAdd(since int64, teamID *string) ([]*model.UserTeamIDPair, *model.AppError) {
func (s *TimerLayerGroupStore) TeamMembersToAdd(since int64, teamID *string) ([]*model.UserTeamIDPair, error) {
start := timemodule.Now()
result, err := s.GroupStore.TeamMembersToAdd(since, teamID)
@@ -3549,7 +3549,7 @@ func (s *TimerLayerGroupStore) TeamMembersToAdd(since int64, teamID *string) ([]
return result, err
}
func (s *TimerLayerGroupStore) TeamMembersToRemove(teamID *string) ([]*model.TeamMember, *model.AppError) {
func (s *TimerLayerGroupStore) TeamMembersToRemove(teamID *string) ([]*model.TeamMember, error) {
start := timemodule.Now()
result, err := s.GroupStore.TeamMembersToRemove(teamID)
@@ -3565,7 +3565,7 @@ func (s *TimerLayerGroupStore) TeamMembersToRemove(teamID *string) ([]*model.Tea
return result, err
}
func (s *TimerLayerGroupStore) Update(group *model.Group) (*model.Group, *model.AppError) {
func (s *TimerLayerGroupStore) Update(group *model.Group) (*model.Group, error) {
start := timemodule.Now()
result, err := s.GroupStore.Update(group)
@@ -3581,7 +3581,7 @@ func (s *TimerLayerGroupStore) Update(group *model.Group) (*model.Group, *model.
return result, err
}
func (s *TimerLayerGroupStore) UpdateGroupSyncable(groupSyncable *model.GroupSyncable) (*model.GroupSyncable, *model.AppError) {
func (s *TimerLayerGroupStore) UpdateGroupSyncable(groupSyncable *model.GroupSyncable) (*model.GroupSyncable, error) {
start := timemodule.Now()
result, err := s.GroupStore.UpdateGroupSyncable(groupSyncable)
@@ -3597,7 +3597,7 @@ func (s *TimerLayerGroupStore) UpdateGroupSyncable(groupSyncable *model.GroupSyn
return result, err
}
func (s *TimerLayerGroupStore) UpsertMember(groupID string, userID string) (*model.GroupMember, *model.AppError) {
func (s *TimerLayerGroupStore) UpsertMember(groupID string, userID string) (*model.GroupMember, error) {
start := timemodule.Now()
result, err := s.GroupStore.UpsertMember(groupID, userID)