GroupStore migration (#15795)
* 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>
Этот коммит содержится в:
коммит произвёл
GitHub
родитель
2ebc8ec90f
Коммит
95221d9ace
@@ -3175,7 +3175,7 @@ func (s *OpenTracingLayerFileInfoStore) Upsert(info *model.FileInfo) (*model.Fil
|
||||
return result, err
|
||||
}
|
||||
|
||||
func (s *OpenTracingLayerGroupStore) AdminRoleGroupsForSyncableMember(userID string, syncableID string, syncableType model.GroupSyncableType) ([]string, *model.AppError) {
|
||||
func (s *OpenTracingLayerGroupStore) AdminRoleGroupsForSyncableMember(userID string, syncableID string, syncableType model.GroupSyncableType) ([]string, error) {
|
||||
origCtx := s.Root.Store.Context()
|
||||
span, newCtx := tracing.StartSpanWithParentByContext(s.Root.Store.Context(), "GroupStore.AdminRoleGroupsForSyncableMember")
|
||||
s.Root.Store.SetContext(newCtx)
|
||||
@@ -3193,7 +3193,7 @@ func (s *OpenTracingLayerGroupStore) AdminRoleGroupsForSyncableMember(userID str
|
||||
return result, err
|
||||
}
|
||||
|
||||
func (s *OpenTracingLayerGroupStore) ChannelMembersMinusGroupMembers(channelID string, groupIDs []string, page int, perPage int) ([]*model.UserWithGroups, *model.AppError) {
|
||||
func (s *OpenTracingLayerGroupStore) ChannelMembersMinusGroupMembers(channelID string, groupIDs []string, page int, perPage int) ([]*model.UserWithGroups, error) {
|
||||
origCtx := s.Root.Store.Context()
|
||||
span, newCtx := tracing.StartSpanWithParentByContext(s.Root.Store.Context(), "GroupStore.ChannelMembersMinusGroupMembers")
|
||||
s.Root.Store.SetContext(newCtx)
|
||||
@@ -3211,7 +3211,7 @@ func (s *OpenTracingLayerGroupStore) ChannelMembersMinusGroupMembers(channelID s
|
||||
return result, err
|
||||
}
|
||||
|
||||
func (s *OpenTracingLayerGroupStore) ChannelMembersToAdd(since int64, channelID *string) ([]*model.UserChannelIDPair, *model.AppError) {
|
||||
func (s *OpenTracingLayerGroupStore) ChannelMembersToAdd(since int64, channelID *string) ([]*model.UserChannelIDPair, error) {
|
||||
origCtx := s.Root.Store.Context()
|
||||
span, newCtx := tracing.StartSpanWithParentByContext(s.Root.Store.Context(), "GroupStore.ChannelMembersToAdd")
|
||||
s.Root.Store.SetContext(newCtx)
|
||||
@@ -3229,7 +3229,7 @@ func (s *OpenTracingLayerGroupStore) ChannelMembersToAdd(since int64, channelID
|
||||
return result, err
|
||||
}
|
||||
|
||||
func (s *OpenTracingLayerGroupStore) ChannelMembersToRemove(channelID *string) ([]*model.ChannelMember, *model.AppError) {
|
||||
func (s *OpenTracingLayerGroupStore) ChannelMembersToRemove(channelID *string) ([]*model.ChannelMember, error) {
|
||||
origCtx := s.Root.Store.Context()
|
||||
span, newCtx := tracing.StartSpanWithParentByContext(s.Root.Store.Context(), "GroupStore.ChannelMembersToRemove")
|
||||
s.Root.Store.SetContext(newCtx)
|
||||
@@ -3247,7 +3247,7 @@ func (s *OpenTracingLayerGroupStore) ChannelMembersToRemove(channelID *string) (
|
||||
return result, err
|
||||
}
|
||||
|
||||
func (s *OpenTracingLayerGroupStore) CountChannelMembersMinusGroupMembers(channelID string, groupIDs []string) (int64, *model.AppError) {
|
||||
func (s *OpenTracingLayerGroupStore) CountChannelMembersMinusGroupMembers(channelID string, groupIDs []string) (int64, error) {
|
||||
origCtx := s.Root.Store.Context()
|
||||
span, newCtx := tracing.StartSpanWithParentByContext(s.Root.Store.Context(), "GroupStore.CountChannelMembersMinusGroupMembers")
|
||||
s.Root.Store.SetContext(newCtx)
|
||||
@@ -3265,7 +3265,7 @@ func (s *OpenTracingLayerGroupStore) CountChannelMembersMinusGroupMembers(channe
|
||||
return result, err
|
||||
}
|
||||
|
||||
func (s *OpenTracingLayerGroupStore) CountGroupsByChannel(channelId string, opts model.GroupSearchOpts) (int64, *model.AppError) {
|
||||
func (s *OpenTracingLayerGroupStore) CountGroupsByChannel(channelId string, opts model.GroupSearchOpts) (int64, error) {
|
||||
origCtx := s.Root.Store.Context()
|
||||
span, newCtx := tracing.StartSpanWithParentByContext(s.Root.Store.Context(), "GroupStore.CountGroupsByChannel")
|
||||
s.Root.Store.SetContext(newCtx)
|
||||
@@ -3283,7 +3283,7 @@ func (s *OpenTracingLayerGroupStore) CountGroupsByChannel(channelId string, opts
|
||||
return result, err
|
||||
}
|
||||
|
||||
func (s *OpenTracingLayerGroupStore) CountGroupsByTeam(teamId string, opts model.GroupSearchOpts) (int64, *model.AppError) {
|
||||
func (s *OpenTracingLayerGroupStore) CountGroupsByTeam(teamId string, opts model.GroupSearchOpts) (int64, error) {
|
||||
origCtx := s.Root.Store.Context()
|
||||
span, newCtx := tracing.StartSpanWithParentByContext(s.Root.Store.Context(), "GroupStore.CountGroupsByTeam")
|
||||
s.Root.Store.SetContext(newCtx)
|
||||
@@ -3301,7 +3301,7 @@ func (s *OpenTracingLayerGroupStore) CountGroupsByTeam(teamId string, opts model
|
||||
return result, err
|
||||
}
|
||||
|
||||
func (s *OpenTracingLayerGroupStore) CountTeamMembersMinusGroupMembers(teamID string, groupIDs []string) (int64, *model.AppError) {
|
||||
func (s *OpenTracingLayerGroupStore) CountTeamMembersMinusGroupMembers(teamID string, groupIDs []string) (int64, error) {
|
||||
origCtx := s.Root.Store.Context()
|
||||
span, newCtx := tracing.StartSpanWithParentByContext(s.Root.Store.Context(), "GroupStore.CountTeamMembersMinusGroupMembers")
|
||||
s.Root.Store.SetContext(newCtx)
|
||||
@@ -3319,7 +3319,7 @@ func (s *OpenTracingLayerGroupStore) CountTeamMembersMinusGroupMembers(teamID st
|
||||
return result, err
|
||||
}
|
||||
|
||||
func (s *OpenTracingLayerGroupStore) Create(group *model.Group) (*model.Group, *model.AppError) {
|
||||
func (s *OpenTracingLayerGroupStore) Create(group *model.Group) (*model.Group, error) {
|
||||
origCtx := s.Root.Store.Context()
|
||||
span, newCtx := tracing.StartSpanWithParentByContext(s.Root.Store.Context(), "GroupStore.Create")
|
||||
s.Root.Store.SetContext(newCtx)
|
||||
@@ -3337,7 +3337,7 @@ func (s *OpenTracingLayerGroupStore) Create(group *model.Group) (*model.Group, *
|
||||
return result, err
|
||||
}
|
||||
|
||||
func (s *OpenTracingLayerGroupStore) CreateGroupSyncable(groupSyncable *model.GroupSyncable) (*model.GroupSyncable, *model.AppError) {
|
||||
func (s *OpenTracingLayerGroupStore) CreateGroupSyncable(groupSyncable *model.GroupSyncable) (*model.GroupSyncable, error) {
|
||||
origCtx := s.Root.Store.Context()
|
||||
span, newCtx := tracing.StartSpanWithParentByContext(s.Root.Store.Context(), "GroupStore.CreateGroupSyncable")
|
||||
s.Root.Store.SetContext(newCtx)
|
||||
@@ -3355,7 +3355,7 @@ func (s *OpenTracingLayerGroupStore) CreateGroupSyncable(groupSyncable *model.Gr
|
||||
return result, err
|
||||
}
|
||||
|
||||
func (s *OpenTracingLayerGroupStore) Delete(groupID string) (*model.Group, *model.AppError) {
|
||||
func (s *OpenTracingLayerGroupStore) Delete(groupID string) (*model.Group, error) {
|
||||
origCtx := s.Root.Store.Context()
|
||||
span, newCtx := tracing.StartSpanWithParentByContext(s.Root.Store.Context(), "GroupStore.Delete")
|
||||
s.Root.Store.SetContext(newCtx)
|
||||
@@ -3373,7 +3373,7 @@ func (s *OpenTracingLayerGroupStore) Delete(groupID string) (*model.Group, *mode
|
||||
return result, err
|
||||
}
|
||||
|
||||
func (s *OpenTracingLayerGroupStore) DeleteGroupSyncable(groupID string, syncableID string, syncableType model.GroupSyncableType) (*model.GroupSyncable, *model.AppError) {
|
||||
func (s *OpenTracingLayerGroupStore) DeleteGroupSyncable(groupID string, syncableID string, syncableType model.GroupSyncableType) (*model.GroupSyncable, error) {
|
||||
origCtx := s.Root.Store.Context()
|
||||
span, newCtx := tracing.StartSpanWithParentByContext(s.Root.Store.Context(), "GroupStore.DeleteGroupSyncable")
|
||||
s.Root.Store.SetContext(newCtx)
|
||||
@@ -3391,7 +3391,7 @@ func (s *OpenTracingLayerGroupStore) DeleteGroupSyncable(groupID string, syncabl
|
||||
return result, err
|
||||
}
|
||||
|
||||
func (s *OpenTracingLayerGroupStore) DeleteMember(groupID string, userID string) (*model.GroupMember, *model.AppError) {
|
||||
func (s *OpenTracingLayerGroupStore) DeleteMember(groupID string, userID string) (*model.GroupMember, error) {
|
||||
origCtx := s.Root.Store.Context()
|
||||
span, newCtx := tracing.StartSpanWithParentByContext(s.Root.Store.Context(), "GroupStore.DeleteMember")
|
||||
s.Root.Store.SetContext(newCtx)
|
||||
@@ -3409,7 +3409,7 @@ func (s *OpenTracingLayerGroupStore) DeleteMember(groupID string, userID string)
|
||||
return result, err
|
||||
}
|
||||
|
||||
func (s *OpenTracingLayerGroupStore) DistinctGroupMemberCount() (int64, *model.AppError) {
|
||||
func (s *OpenTracingLayerGroupStore) DistinctGroupMemberCount() (int64, error) {
|
||||
origCtx := s.Root.Store.Context()
|
||||
span, newCtx := tracing.StartSpanWithParentByContext(s.Root.Store.Context(), "GroupStore.DistinctGroupMemberCount")
|
||||
s.Root.Store.SetContext(newCtx)
|
||||
@@ -3427,7 +3427,7 @@ func (s *OpenTracingLayerGroupStore) DistinctGroupMemberCount() (int64, *model.A
|
||||
return result, err
|
||||
}
|
||||
|
||||
func (s *OpenTracingLayerGroupStore) Get(groupID string) (*model.Group, *model.AppError) {
|
||||
func (s *OpenTracingLayerGroupStore) Get(groupID string) (*model.Group, error) {
|
||||
origCtx := s.Root.Store.Context()
|
||||
span, newCtx := tracing.StartSpanWithParentByContext(s.Root.Store.Context(), "GroupStore.Get")
|
||||
s.Root.Store.SetContext(newCtx)
|
||||
@@ -3445,7 +3445,7 @@ func (s *OpenTracingLayerGroupStore) Get(groupID string) (*model.Group, *model.A
|
||||
return result, err
|
||||
}
|
||||
|
||||
func (s *OpenTracingLayerGroupStore) GetAllBySource(groupSource model.GroupSource) ([]*model.Group, *model.AppError) {
|
||||
func (s *OpenTracingLayerGroupStore) GetAllBySource(groupSource model.GroupSource) ([]*model.Group, error) {
|
||||
origCtx := s.Root.Store.Context()
|
||||
span, newCtx := tracing.StartSpanWithParentByContext(s.Root.Store.Context(), "GroupStore.GetAllBySource")
|
||||
s.Root.Store.SetContext(newCtx)
|
||||
@@ -3463,7 +3463,7 @@ func (s *OpenTracingLayerGroupStore) GetAllBySource(groupSource model.GroupSourc
|
||||
return result, err
|
||||
}
|
||||
|
||||
func (s *OpenTracingLayerGroupStore) GetAllGroupSyncablesByGroupId(groupID string, syncableType model.GroupSyncableType) ([]*model.GroupSyncable, *model.AppError) {
|
||||
func (s *OpenTracingLayerGroupStore) GetAllGroupSyncablesByGroupId(groupID string, syncableType model.GroupSyncableType) ([]*model.GroupSyncable, error) {
|
||||
origCtx := s.Root.Store.Context()
|
||||
span, newCtx := tracing.StartSpanWithParentByContext(s.Root.Store.Context(), "GroupStore.GetAllGroupSyncablesByGroupId")
|
||||
s.Root.Store.SetContext(newCtx)
|
||||
@@ -3481,7 +3481,7 @@ func (s *OpenTracingLayerGroupStore) GetAllGroupSyncablesByGroupId(groupID strin
|
||||
return result, err
|
||||
}
|
||||
|
||||
func (s *OpenTracingLayerGroupStore) GetByIDs(groupIDs []string) ([]*model.Group, *model.AppError) {
|
||||
func (s *OpenTracingLayerGroupStore) GetByIDs(groupIDs []string) ([]*model.Group, error) {
|
||||
origCtx := s.Root.Store.Context()
|
||||
span, newCtx := tracing.StartSpanWithParentByContext(s.Root.Store.Context(), "GroupStore.GetByIDs")
|
||||
s.Root.Store.SetContext(newCtx)
|
||||
@@ -3499,7 +3499,7 @@ func (s *OpenTracingLayerGroupStore) GetByIDs(groupIDs []string) ([]*model.Group
|
||||
return result, err
|
||||
}
|
||||
|
||||
func (s *OpenTracingLayerGroupStore) GetByName(name string, opts model.GroupSearchOpts) (*model.Group, *model.AppError) {
|
||||
func (s *OpenTracingLayerGroupStore) GetByName(name string, opts model.GroupSearchOpts) (*model.Group, error) {
|
||||
origCtx := s.Root.Store.Context()
|
||||
span, newCtx := tracing.StartSpanWithParentByContext(s.Root.Store.Context(), "GroupStore.GetByName")
|
||||
s.Root.Store.SetContext(newCtx)
|
||||
@@ -3517,7 +3517,7 @@ func (s *OpenTracingLayerGroupStore) GetByName(name string, opts model.GroupSear
|
||||
return result, err
|
||||
}
|
||||
|
||||
func (s *OpenTracingLayerGroupStore) GetByRemoteID(remoteID string, groupSource model.GroupSource) (*model.Group, *model.AppError) {
|
||||
func (s *OpenTracingLayerGroupStore) GetByRemoteID(remoteID string, groupSource model.GroupSource) (*model.Group, error) {
|
||||
origCtx := s.Root.Store.Context()
|
||||
span, newCtx := tracing.StartSpanWithParentByContext(s.Root.Store.Context(), "GroupStore.GetByRemoteID")
|
||||
s.Root.Store.SetContext(newCtx)
|
||||
@@ -3535,7 +3535,7 @@ func (s *OpenTracingLayerGroupStore) GetByRemoteID(remoteID string, groupSource
|
||||
return result, err
|
||||
}
|
||||
|
||||
func (s *OpenTracingLayerGroupStore) GetByUser(userId string) ([]*model.Group, *model.AppError) {
|
||||
func (s *OpenTracingLayerGroupStore) GetByUser(userId string) ([]*model.Group, error) {
|
||||
origCtx := s.Root.Store.Context()
|
||||
span, newCtx := tracing.StartSpanWithParentByContext(s.Root.Store.Context(), "GroupStore.GetByUser")
|
||||
s.Root.Store.SetContext(newCtx)
|
||||
@@ -3553,7 +3553,7 @@ func (s *OpenTracingLayerGroupStore) GetByUser(userId string) ([]*model.Group, *
|
||||
return result, err
|
||||
}
|
||||
|
||||
func (s *OpenTracingLayerGroupStore) GetGroupSyncable(groupID string, syncableID string, syncableType model.GroupSyncableType) (*model.GroupSyncable, *model.AppError) {
|
||||
func (s *OpenTracingLayerGroupStore) GetGroupSyncable(groupID string, syncableID string, syncableType model.GroupSyncableType) (*model.GroupSyncable, error) {
|
||||
origCtx := s.Root.Store.Context()
|
||||
span, newCtx := tracing.StartSpanWithParentByContext(s.Root.Store.Context(), "GroupStore.GetGroupSyncable")
|
||||
s.Root.Store.SetContext(newCtx)
|
||||
@@ -3571,7 +3571,7 @@ func (s *OpenTracingLayerGroupStore) GetGroupSyncable(groupID string, syncableID
|
||||
return result, err
|
||||
}
|
||||
|
||||
func (s *OpenTracingLayerGroupStore) GetGroups(page int, perPage int, opts model.GroupSearchOpts) ([]*model.Group, *model.AppError) {
|
||||
func (s *OpenTracingLayerGroupStore) GetGroups(page int, perPage int, opts model.GroupSearchOpts) ([]*model.Group, error) {
|
||||
origCtx := s.Root.Store.Context()
|
||||
span, newCtx := tracing.StartSpanWithParentByContext(s.Root.Store.Context(), "GroupStore.GetGroups")
|
||||
s.Root.Store.SetContext(newCtx)
|
||||
@@ -3589,7 +3589,7 @@ func (s *OpenTracingLayerGroupStore) GetGroups(page int, perPage int, opts model
|
||||
return result, err
|
||||
}
|
||||
|
||||
func (s *OpenTracingLayerGroupStore) GetGroupsAssociatedToChannelsByTeam(teamId string, opts model.GroupSearchOpts) (map[string][]*model.GroupWithSchemeAdmin, *model.AppError) {
|
||||
func (s *OpenTracingLayerGroupStore) GetGroupsAssociatedToChannelsByTeam(teamId string, opts model.GroupSearchOpts) (map[string][]*model.GroupWithSchemeAdmin, error) {
|
||||
origCtx := s.Root.Store.Context()
|
||||
span, newCtx := tracing.StartSpanWithParentByContext(s.Root.Store.Context(), "GroupStore.GetGroupsAssociatedToChannelsByTeam")
|
||||
s.Root.Store.SetContext(newCtx)
|
||||
@@ -3607,7 +3607,7 @@ func (s *OpenTracingLayerGroupStore) GetGroupsAssociatedToChannelsByTeam(teamId
|
||||
return result, err
|
||||
}
|
||||
|
||||
func (s *OpenTracingLayerGroupStore) GetGroupsByChannel(channelId string, opts model.GroupSearchOpts) ([]*model.GroupWithSchemeAdmin, *model.AppError) {
|
||||
func (s *OpenTracingLayerGroupStore) GetGroupsByChannel(channelId string, opts model.GroupSearchOpts) ([]*model.GroupWithSchemeAdmin, error) {
|
||||
origCtx := s.Root.Store.Context()
|
||||
span, newCtx := tracing.StartSpanWithParentByContext(s.Root.Store.Context(), "GroupStore.GetGroupsByChannel")
|
||||
s.Root.Store.SetContext(newCtx)
|
||||
@@ -3625,7 +3625,7 @@ func (s *OpenTracingLayerGroupStore) GetGroupsByChannel(channelId string, opts m
|
||||
return result, err
|
||||
}
|
||||
|
||||
func (s *OpenTracingLayerGroupStore) GetGroupsByTeam(teamId string, opts model.GroupSearchOpts) ([]*model.GroupWithSchemeAdmin, *model.AppError) {
|
||||
func (s *OpenTracingLayerGroupStore) GetGroupsByTeam(teamId string, opts model.GroupSearchOpts) ([]*model.GroupWithSchemeAdmin, error) {
|
||||
origCtx := s.Root.Store.Context()
|
||||
span, newCtx := tracing.StartSpanWithParentByContext(s.Root.Store.Context(), "GroupStore.GetGroupsByTeam")
|
||||
s.Root.Store.SetContext(newCtx)
|
||||
@@ -3643,7 +3643,7 @@ func (s *OpenTracingLayerGroupStore) GetGroupsByTeam(teamId string, opts model.G
|
||||
return result, err
|
||||
}
|
||||
|
||||
func (s *OpenTracingLayerGroupStore) GetMemberCount(groupID string) (int64, *model.AppError) {
|
||||
func (s *OpenTracingLayerGroupStore) GetMemberCount(groupID string) (int64, error) {
|
||||
origCtx := s.Root.Store.Context()
|
||||
span, newCtx := tracing.StartSpanWithParentByContext(s.Root.Store.Context(), "GroupStore.GetMemberCount")
|
||||
s.Root.Store.SetContext(newCtx)
|
||||
@@ -3661,7 +3661,7 @@ func (s *OpenTracingLayerGroupStore) GetMemberCount(groupID string) (int64, *mod
|
||||
return result, err
|
||||
}
|
||||
|
||||
func (s *OpenTracingLayerGroupStore) GetMemberUsers(groupID string) ([]*model.User, *model.AppError) {
|
||||
func (s *OpenTracingLayerGroupStore) GetMemberUsers(groupID string) ([]*model.User, error) {
|
||||
origCtx := s.Root.Store.Context()
|
||||
span, newCtx := tracing.StartSpanWithParentByContext(s.Root.Store.Context(), "GroupStore.GetMemberUsers")
|
||||
s.Root.Store.SetContext(newCtx)
|
||||
@@ -3679,7 +3679,7 @@ func (s *OpenTracingLayerGroupStore) GetMemberUsers(groupID string) ([]*model.Us
|
||||
return result, err
|
||||
}
|
||||
|
||||
func (s *OpenTracingLayerGroupStore) GetMemberUsersInTeam(groupID string, teamID string) ([]*model.User, *model.AppError) {
|
||||
func (s *OpenTracingLayerGroupStore) GetMemberUsersInTeam(groupID string, teamID string) ([]*model.User, error) {
|
||||
origCtx := s.Root.Store.Context()
|
||||
span, newCtx := tracing.StartSpanWithParentByContext(s.Root.Store.Context(), "GroupStore.GetMemberUsersInTeam")
|
||||
s.Root.Store.SetContext(newCtx)
|
||||
@@ -3697,7 +3697,7 @@ func (s *OpenTracingLayerGroupStore) GetMemberUsersInTeam(groupID string, teamID
|
||||
return result, err
|
||||
}
|
||||
|
||||
func (s *OpenTracingLayerGroupStore) GetMemberUsersNotInChannel(groupID string, channelID string) ([]*model.User, *model.AppError) {
|
||||
func (s *OpenTracingLayerGroupStore) GetMemberUsersNotInChannel(groupID string, channelID string) ([]*model.User, error) {
|
||||
origCtx := s.Root.Store.Context()
|
||||
span, newCtx := tracing.StartSpanWithParentByContext(s.Root.Store.Context(), "GroupStore.GetMemberUsersNotInChannel")
|
||||
s.Root.Store.SetContext(newCtx)
|
||||
@@ -3715,7 +3715,7 @@ func (s *OpenTracingLayerGroupStore) GetMemberUsersNotInChannel(groupID string,
|
||||
return result, err
|
||||
}
|
||||
|
||||
func (s *OpenTracingLayerGroupStore) GetMemberUsersPage(groupID string, page int, perPage int) ([]*model.User, *model.AppError) {
|
||||
func (s *OpenTracingLayerGroupStore) GetMemberUsersPage(groupID string, page int, perPage int) ([]*model.User, error) {
|
||||
origCtx := s.Root.Store.Context()
|
||||
span, newCtx := tracing.StartSpanWithParentByContext(s.Root.Store.Context(), "GroupStore.GetMemberUsersPage")
|
||||
s.Root.Store.SetContext(newCtx)
|
||||
@@ -3733,7 +3733,7 @@ func (s *OpenTracingLayerGroupStore) GetMemberUsersPage(groupID string, page int
|
||||
return result, err
|
||||
}
|
||||
|
||||
func (s *OpenTracingLayerGroupStore) GroupChannelCount() (int64, *model.AppError) {
|
||||
func (s *OpenTracingLayerGroupStore) GroupChannelCount() (int64, error) {
|
||||
origCtx := s.Root.Store.Context()
|
||||
span, newCtx := tracing.StartSpanWithParentByContext(s.Root.Store.Context(), "GroupStore.GroupChannelCount")
|
||||
s.Root.Store.SetContext(newCtx)
|
||||
@@ -3751,7 +3751,7 @@ func (s *OpenTracingLayerGroupStore) GroupChannelCount() (int64, *model.AppError
|
||||
return result, err
|
||||
}
|
||||
|
||||
func (s *OpenTracingLayerGroupStore) GroupCount() (int64, *model.AppError) {
|
||||
func (s *OpenTracingLayerGroupStore) GroupCount() (int64, error) {
|
||||
origCtx := s.Root.Store.Context()
|
||||
span, newCtx := tracing.StartSpanWithParentByContext(s.Root.Store.Context(), "GroupStore.GroupCount")
|
||||
s.Root.Store.SetContext(newCtx)
|
||||
@@ -3769,7 +3769,7 @@ func (s *OpenTracingLayerGroupStore) GroupCount() (int64, *model.AppError) {
|
||||
return result, err
|
||||
}
|
||||
|
||||
func (s *OpenTracingLayerGroupStore) GroupCountWithAllowReference() (int64, *model.AppError) {
|
||||
func (s *OpenTracingLayerGroupStore) GroupCountWithAllowReference() (int64, error) {
|
||||
origCtx := s.Root.Store.Context()
|
||||
span, newCtx := tracing.StartSpanWithParentByContext(s.Root.Store.Context(), "GroupStore.GroupCountWithAllowReference")
|
||||
s.Root.Store.SetContext(newCtx)
|
||||
@@ -3787,7 +3787,7 @@ func (s *OpenTracingLayerGroupStore) GroupCountWithAllowReference() (int64, *mod
|
||||
return result, err
|
||||
}
|
||||
|
||||
func (s *OpenTracingLayerGroupStore) GroupMemberCount() (int64, *model.AppError) {
|
||||
func (s *OpenTracingLayerGroupStore) GroupMemberCount() (int64, error) {
|
||||
origCtx := s.Root.Store.Context()
|
||||
span, newCtx := tracing.StartSpanWithParentByContext(s.Root.Store.Context(), "GroupStore.GroupMemberCount")
|
||||
s.Root.Store.SetContext(newCtx)
|
||||
@@ -3805,7 +3805,7 @@ func (s *OpenTracingLayerGroupStore) GroupMemberCount() (int64, *model.AppError)
|
||||
return result, err
|
||||
}
|
||||
|
||||
func (s *OpenTracingLayerGroupStore) GroupTeamCount() (int64, *model.AppError) {
|
||||
func (s *OpenTracingLayerGroupStore) GroupTeamCount() (int64, error) {
|
||||
origCtx := s.Root.Store.Context()
|
||||
span, newCtx := tracing.StartSpanWithParentByContext(s.Root.Store.Context(), "GroupStore.GroupTeamCount")
|
||||
s.Root.Store.SetContext(newCtx)
|
||||
@@ -3823,7 +3823,7 @@ func (s *OpenTracingLayerGroupStore) GroupTeamCount() (int64, *model.AppError) {
|
||||
return result, err
|
||||
}
|
||||
|
||||
func (s *OpenTracingLayerGroupStore) PermanentDeleteMembersByUser(userId string) *model.AppError {
|
||||
func (s *OpenTracingLayerGroupStore) PermanentDeleteMembersByUser(userId string) error {
|
||||
origCtx := s.Root.Store.Context()
|
||||
span, newCtx := tracing.StartSpanWithParentByContext(s.Root.Store.Context(), "GroupStore.PermanentDeleteMembersByUser")
|
||||
s.Root.Store.SetContext(newCtx)
|
||||
@@ -3841,7 +3841,7 @@ func (s *OpenTracingLayerGroupStore) PermanentDeleteMembersByUser(userId string)
|
||||
return err
|
||||
}
|
||||
|
||||
func (s *OpenTracingLayerGroupStore) PermittedSyncableAdmins(syncableID string, syncableType model.GroupSyncableType) ([]string, *model.AppError) {
|
||||
func (s *OpenTracingLayerGroupStore) PermittedSyncableAdmins(syncableID string, syncableType model.GroupSyncableType) ([]string, error) {
|
||||
origCtx := s.Root.Store.Context()
|
||||
span, newCtx := tracing.StartSpanWithParentByContext(s.Root.Store.Context(), "GroupStore.PermittedSyncableAdmins")
|
||||
s.Root.Store.SetContext(newCtx)
|
||||
@@ -3859,7 +3859,7 @@ func (s *OpenTracingLayerGroupStore) PermittedSyncableAdmins(syncableID string,
|
||||
return result, err
|
||||
}
|
||||
|
||||
func (s *OpenTracingLayerGroupStore) TeamMembersMinusGroupMembers(teamID string, groupIDs []string, page int, perPage int) ([]*model.UserWithGroups, *model.AppError) {
|
||||
func (s *OpenTracingLayerGroupStore) TeamMembersMinusGroupMembers(teamID string, groupIDs []string, page int, perPage int) ([]*model.UserWithGroups, error) {
|
||||
origCtx := s.Root.Store.Context()
|
||||
span, newCtx := tracing.StartSpanWithParentByContext(s.Root.Store.Context(), "GroupStore.TeamMembersMinusGroupMembers")
|
||||
s.Root.Store.SetContext(newCtx)
|
||||
@@ -3877,7 +3877,7 @@ func (s *OpenTracingLayerGroupStore) TeamMembersMinusGroupMembers(teamID string,
|
||||
return result, err
|
||||
}
|
||||
|
||||
func (s *OpenTracingLayerGroupStore) TeamMembersToAdd(since int64, teamID *string) ([]*model.UserTeamIDPair, *model.AppError) {
|
||||
func (s *OpenTracingLayerGroupStore) TeamMembersToAdd(since int64, teamID *string) ([]*model.UserTeamIDPair, error) {
|
||||
origCtx := s.Root.Store.Context()
|
||||
span, newCtx := tracing.StartSpanWithParentByContext(s.Root.Store.Context(), "GroupStore.TeamMembersToAdd")
|
||||
s.Root.Store.SetContext(newCtx)
|
||||
@@ -3895,7 +3895,7 @@ func (s *OpenTracingLayerGroupStore) TeamMembersToAdd(since int64, teamID *strin
|
||||
return result, err
|
||||
}
|
||||
|
||||
func (s *OpenTracingLayerGroupStore) TeamMembersToRemove(teamID *string) ([]*model.TeamMember, *model.AppError) {
|
||||
func (s *OpenTracingLayerGroupStore) TeamMembersToRemove(teamID *string) ([]*model.TeamMember, error) {
|
||||
origCtx := s.Root.Store.Context()
|
||||
span, newCtx := tracing.StartSpanWithParentByContext(s.Root.Store.Context(), "GroupStore.TeamMembersToRemove")
|
||||
s.Root.Store.SetContext(newCtx)
|
||||
@@ -3913,7 +3913,7 @@ func (s *OpenTracingLayerGroupStore) TeamMembersToRemove(teamID *string) ([]*mod
|
||||
return result, err
|
||||
}
|
||||
|
||||
func (s *OpenTracingLayerGroupStore) Update(group *model.Group) (*model.Group, *model.AppError) {
|
||||
func (s *OpenTracingLayerGroupStore) Update(group *model.Group) (*model.Group, error) {
|
||||
origCtx := s.Root.Store.Context()
|
||||
span, newCtx := tracing.StartSpanWithParentByContext(s.Root.Store.Context(), "GroupStore.Update")
|
||||
s.Root.Store.SetContext(newCtx)
|
||||
@@ -3931,7 +3931,7 @@ func (s *OpenTracingLayerGroupStore) Update(group *model.Group) (*model.Group, *
|
||||
return result, err
|
||||
}
|
||||
|
||||
func (s *OpenTracingLayerGroupStore) UpdateGroupSyncable(groupSyncable *model.GroupSyncable) (*model.GroupSyncable, *model.AppError) {
|
||||
func (s *OpenTracingLayerGroupStore) UpdateGroupSyncable(groupSyncable *model.GroupSyncable) (*model.GroupSyncable, error) {
|
||||
origCtx := s.Root.Store.Context()
|
||||
span, newCtx := tracing.StartSpanWithParentByContext(s.Root.Store.Context(), "GroupStore.UpdateGroupSyncable")
|
||||
s.Root.Store.SetContext(newCtx)
|
||||
@@ -3949,7 +3949,7 @@ func (s *OpenTracingLayerGroupStore) UpdateGroupSyncable(groupSyncable *model.Gr
|
||||
return result, err
|
||||
}
|
||||
|
||||
func (s *OpenTracingLayerGroupStore) UpsertMember(groupID string, userID string) (*model.GroupMember, *model.AppError) {
|
||||
func (s *OpenTracingLayerGroupStore) UpsertMember(groupID string, userID string) (*model.GroupMember, error) {
|
||||
origCtx := s.Root.Store.Context()
|
||||
span, newCtx := tracing.StartSpanWithParentByContext(s.Root.Store.Context(), "GroupStore.UpsertMember")
|
||||
s.Root.Store.SetContext(newCtx)
|
||||
|
||||
@@ -3396,267 +3396,883 @@ func (s *RetryLayerFileInfoStore) Upsert(info *model.FileInfo) (*model.FileInfo,
|
||||
|
||||
}
|
||||
|
||||
func (s *RetryLayerGroupStore) AdminRoleGroupsForSyncableMember(userID string, syncableID string, syncableType model.GroupSyncableType) ([]string, *model.AppError) {
|
||||
func (s *RetryLayerGroupStore) AdminRoleGroupsForSyncableMember(userID string, syncableID string, syncableType model.GroupSyncableType) ([]string, error) {
|
||||
|
||||
return s.GroupStore.AdminRoleGroupsForSyncableMember(userID, syncableID, syncableType)
|
||||
tries := 0
|
||||
for {
|
||||
result, err := s.GroupStore.AdminRoleGroupsForSyncableMember(userID, syncableID, syncableType)
|
||||
if err == nil {
|
||||
return result, nil
|
||||
}
|
||||
if !isRepeatableError(err) {
|
||||
return result, err
|
||||
}
|
||||
tries++
|
||||
if tries >= 3 {
|
||||
err = errors.Wrap(err, "giving up after 3 consecutive repeatable transaction failures")
|
||||
return result, err
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
func (s *RetryLayerGroupStore) ChannelMembersMinusGroupMembers(channelID string, groupIDs []string, page int, perPage int) ([]*model.UserWithGroups, *model.AppError) {
|
||||
func (s *RetryLayerGroupStore) ChannelMembersMinusGroupMembers(channelID string, groupIDs []string, page int, perPage int) ([]*model.UserWithGroups, error) {
|
||||
|
||||
return s.GroupStore.ChannelMembersMinusGroupMembers(channelID, groupIDs, page, perPage)
|
||||
tries := 0
|
||||
for {
|
||||
result, err := s.GroupStore.ChannelMembersMinusGroupMembers(channelID, groupIDs, page, perPage)
|
||||
if err == nil {
|
||||
return result, nil
|
||||
}
|
||||
if !isRepeatableError(err) {
|
||||
return result, err
|
||||
}
|
||||
tries++
|
||||
if tries >= 3 {
|
||||
err = errors.Wrap(err, "giving up after 3 consecutive repeatable transaction failures")
|
||||
return result, err
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
func (s *RetryLayerGroupStore) ChannelMembersToAdd(since int64, channelID *string) ([]*model.UserChannelIDPair, *model.AppError) {
|
||||
func (s *RetryLayerGroupStore) ChannelMembersToAdd(since int64, channelID *string) ([]*model.UserChannelIDPair, error) {
|
||||
|
||||
return s.GroupStore.ChannelMembersToAdd(since, channelID)
|
||||
tries := 0
|
||||
for {
|
||||
result, err := s.GroupStore.ChannelMembersToAdd(since, channelID)
|
||||
if err == nil {
|
||||
return result, nil
|
||||
}
|
||||
if !isRepeatableError(err) {
|
||||
return result, err
|
||||
}
|
||||
tries++
|
||||
if tries >= 3 {
|
||||
err = errors.Wrap(err, "giving up after 3 consecutive repeatable transaction failures")
|
||||
return result, err
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
func (s *RetryLayerGroupStore) ChannelMembersToRemove(channelID *string) ([]*model.ChannelMember, *model.AppError) {
|
||||
func (s *RetryLayerGroupStore) ChannelMembersToRemove(channelID *string) ([]*model.ChannelMember, error) {
|
||||
|
||||
return s.GroupStore.ChannelMembersToRemove(channelID)
|
||||
tries := 0
|
||||
for {
|
||||
result, err := s.GroupStore.ChannelMembersToRemove(channelID)
|
||||
if err == nil {
|
||||
return result, nil
|
||||
}
|
||||
if !isRepeatableError(err) {
|
||||
return result, err
|
||||
}
|
||||
tries++
|
||||
if tries >= 3 {
|
||||
err = errors.Wrap(err, "giving up after 3 consecutive repeatable transaction failures")
|
||||
return result, err
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
func (s *RetryLayerGroupStore) CountChannelMembersMinusGroupMembers(channelID string, groupIDs []string) (int64, *model.AppError) {
|
||||
func (s *RetryLayerGroupStore) CountChannelMembersMinusGroupMembers(channelID string, groupIDs []string) (int64, error) {
|
||||
|
||||
return s.GroupStore.CountChannelMembersMinusGroupMembers(channelID, groupIDs)
|
||||
tries := 0
|
||||
for {
|
||||
result, err := s.GroupStore.CountChannelMembersMinusGroupMembers(channelID, groupIDs)
|
||||
if err == nil {
|
||||
return result, nil
|
||||
}
|
||||
if !isRepeatableError(err) {
|
||||
return result, err
|
||||
}
|
||||
tries++
|
||||
if tries >= 3 {
|
||||
err = errors.Wrap(err, "giving up after 3 consecutive repeatable transaction failures")
|
||||
return result, err
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
func (s *RetryLayerGroupStore) CountGroupsByChannel(channelId string, opts model.GroupSearchOpts) (int64, *model.AppError) {
|
||||
func (s *RetryLayerGroupStore) CountGroupsByChannel(channelId string, opts model.GroupSearchOpts) (int64, error) {
|
||||
|
||||
return s.GroupStore.CountGroupsByChannel(channelId, opts)
|
||||
tries := 0
|
||||
for {
|
||||
result, err := s.GroupStore.CountGroupsByChannel(channelId, opts)
|
||||
if err == nil {
|
||||
return result, nil
|
||||
}
|
||||
if !isRepeatableError(err) {
|
||||
return result, err
|
||||
}
|
||||
tries++
|
||||
if tries >= 3 {
|
||||
err = errors.Wrap(err, "giving up after 3 consecutive repeatable transaction failures")
|
||||
return result, err
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
func (s *RetryLayerGroupStore) CountGroupsByTeam(teamId string, opts model.GroupSearchOpts) (int64, *model.AppError) {
|
||||
func (s *RetryLayerGroupStore) CountGroupsByTeam(teamId string, opts model.GroupSearchOpts) (int64, error) {
|
||||
|
||||
return s.GroupStore.CountGroupsByTeam(teamId, opts)
|
||||
tries := 0
|
||||
for {
|
||||
result, err := s.GroupStore.CountGroupsByTeam(teamId, opts)
|
||||
if err == nil {
|
||||
return result, nil
|
||||
}
|
||||
if !isRepeatableError(err) {
|
||||
return result, err
|
||||
}
|
||||
tries++
|
||||
if tries >= 3 {
|
||||
err = errors.Wrap(err, "giving up after 3 consecutive repeatable transaction failures")
|
||||
return result, err
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
func (s *RetryLayerGroupStore) CountTeamMembersMinusGroupMembers(teamID string, groupIDs []string) (int64, *model.AppError) {
|
||||
func (s *RetryLayerGroupStore) CountTeamMembersMinusGroupMembers(teamID string, groupIDs []string) (int64, error) {
|
||||
|
||||
return s.GroupStore.CountTeamMembersMinusGroupMembers(teamID, groupIDs)
|
||||
tries := 0
|
||||
for {
|
||||
result, err := s.GroupStore.CountTeamMembersMinusGroupMembers(teamID, groupIDs)
|
||||
if err == nil {
|
||||
return result, nil
|
||||
}
|
||||
if !isRepeatableError(err) {
|
||||
return result, err
|
||||
}
|
||||
tries++
|
||||
if tries >= 3 {
|
||||
err = errors.Wrap(err, "giving up after 3 consecutive repeatable transaction failures")
|
||||
return result, err
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
func (s *RetryLayerGroupStore) Create(group *model.Group) (*model.Group, *model.AppError) {
|
||||
func (s *RetryLayerGroupStore) Create(group *model.Group) (*model.Group, error) {
|
||||
|
||||
return s.GroupStore.Create(group)
|
||||
tries := 0
|
||||
for {
|
||||
result, err := s.GroupStore.Create(group)
|
||||
if err == nil {
|
||||
return result, nil
|
||||
}
|
||||
if !isRepeatableError(err) {
|
||||
return result, err
|
||||
}
|
||||
tries++
|
||||
if tries >= 3 {
|
||||
err = errors.Wrap(err, "giving up after 3 consecutive repeatable transaction failures")
|
||||
return result, err
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
func (s *RetryLayerGroupStore) CreateGroupSyncable(groupSyncable *model.GroupSyncable) (*model.GroupSyncable, *model.AppError) {
|
||||
func (s *RetryLayerGroupStore) CreateGroupSyncable(groupSyncable *model.GroupSyncable) (*model.GroupSyncable, error) {
|
||||
|
||||
return s.GroupStore.CreateGroupSyncable(groupSyncable)
|
||||
tries := 0
|
||||
for {
|
||||
result, err := s.GroupStore.CreateGroupSyncable(groupSyncable)
|
||||
if err == nil {
|
||||
return result, nil
|
||||
}
|
||||
if !isRepeatableError(err) {
|
||||
return result, err
|
||||
}
|
||||
tries++
|
||||
if tries >= 3 {
|
||||
err = errors.Wrap(err, "giving up after 3 consecutive repeatable transaction failures")
|
||||
return result, err
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
func (s *RetryLayerGroupStore) Delete(groupID string) (*model.Group, *model.AppError) {
|
||||
func (s *RetryLayerGroupStore) Delete(groupID string) (*model.Group, error) {
|
||||
|
||||
return s.GroupStore.Delete(groupID)
|
||||
tries := 0
|
||||
for {
|
||||
result, err := s.GroupStore.Delete(groupID)
|
||||
if err == nil {
|
||||
return result, nil
|
||||
}
|
||||
if !isRepeatableError(err) {
|
||||
return result, err
|
||||
}
|
||||
tries++
|
||||
if tries >= 3 {
|
||||
err = errors.Wrap(err, "giving up after 3 consecutive repeatable transaction failures")
|
||||
return result, err
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
func (s *RetryLayerGroupStore) DeleteGroupSyncable(groupID string, syncableID string, syncableType model.GroupSyncableType) (*model.GroupSyncable, *model.AppError) {
|
||||
func (s *RetryLayerGroupStore) DeleteGroupSyncable(groupID string, syncableID string, syncableType model.GroupSyncableType) (*model.GroupSyncable, error) {
|
||||
|
||||
return s.GroupStore.DeleteGroupSyncable(groupID, syncableID, syncableType)
|
||||
tries := 0
|
||||
for {
|
||||
result, err := s.GroupStore.DeleteGroupSyncable(groupID, syncableID, syncableType)
|
||||
if err == nil {
|
||||
return result, nil
|
||||
}
|
||||
if !isRepeatableError(err) {
|
||||
return result, err
|
||||
}
|
||||
tries++
|
||||
if tries >= 3 {
|
||||
err = errors.Wrap(err, "giving up after 3 consecutive repeatable transaction failures")
|
||||
return result, err
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
func (s *RetryLayerGroupStore) DeleteMember(groupID string, userID string) (*model.GroupMember, *model.AppError) {
|
||||
func (s *RetryLayerGroupStore) DeleteMember(groupID string, userID string) (*model.GroupMember, error) {
|
||||
|
||||
return s.GroupStore.DeleteMember(groupID, userID)
|
||||
tries := 0
|
||||
for {
|
||||
result, err := s.GroupStore.DeleteMember(groupID, userID)
|
||||
if err == nil {
|
||||
return result, nil
|
||||
}
|
||||
if !isRepeatableError(err) {
|
||||
return result, err
|
||||
}
|
||||
tries++
|
||||
if tries >= 3 {
|
||||
err = errors.Wrap(err, "giving up after 3 consecutive repeatable transaction failures")
|
||||
return result, err
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
func (s *RetryLayerGroupStore) DistinctGroupMemberCount() (int64, *model.AppError) {
|
||||
func (s *RetryLayerGroupStore) DistinctGroupMemberCount() (int64, error) {
|
||||
|
||||
return s.GroupStore.DistinctGroupMemberCount()
|
||||
tries := 0
|
||||
for {
|
||||
result, err := s.GroupStore.DistinctGroupMemberCount()
|
||||
if err == nil {
|
||||
return result, nil
|
||||
}
|
||||
if !isRepeatableError(err) {
|
||||
return result, err
|
||||
}
|
||||
tries++
|
||||
if tries >= 3 {
|
||||
err = errors.Wrap(err, "giving up after 3 consecutive repeatable transaction failures")
|
||||
return result, err
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
func (s *RetryLayerGroupStore) Get(groupID string) (*model.Group, *model.AppError) {
|
||||
func (s *RetryLayerGroupStore) Get(groupID string) (*model.Group, error) {
|
||||
|
||||
return s.GroupStore.Get(groupID)
|
||||
tries := 0
|
||||
for {
|
||||
result, err := s.GroupStore.Get(groupID)
|
||||
if err == nil {
|
||||
return result, nil
|
||||
}
|
||||
if !isRepeatableError(err) {
|
||||
return result, err
|
||||
}
|
||||
tries++
|
||||
if tries >= 3 {
|
||||
err = errors.Wrap(err, "giving up after 3 consecutive repeatable transaction failures")
|
||||
return result, err
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
func (s *RetryLayerGroupStore) GetAllBySource(groupSource model.GroupSource) ([]*model.Group, *model.AppError) {
|
||||
func (s *RetryLayerGroupStore) GetAllBySource(groupSource model.GroupSource) ([]*model.Group, error) {
|
||||
|
||||
return s.GroupStore.GetAllBySource(groupSource)
|
||||
tries := 0
|
||||
for {
|
||||
result, err := s.GroupStore.GetAllBySource(groupSource)
|
||||
if err == nil {
|
||||
return result, nil
|
||||
}
|
||||
if !isRepeatableError(err) {
|
||||
return result, err
|
||||
}
|
||||
tries++
|
||||
if tries >= 3 {
|
||||
err = errors.Wrap(err, "giving up after 3 consecutive repeatable transaction failures")
|
||||
return result, err
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
func (s *RetryLayerGroupStore) GetAllGroupSyncablesByGroupId(groupID string, syncableType model.GroupSyncableType) ([]*model.GroupSyncable, *model.AppError) {
|
||||
func (s *RetryLayerGroupStore) GetAllGroupSyncablesByGroupId(groupID string, syncableType model.GroupSyncableType) ([]*model.GroupSyncable, error) {
|
||||
|
||||
return s.GroupStore.GetAllGroupSyncablesByGroupId(groupID, syncableType)
|
||||
tries := 0
|
||||
for {
|
||||
result, err := s.GroupStore.GetAllGroupSyncablesByGroupId(groupID, syncableType)
|
||||
if err == nil {
|
||||
return result, nil
|
||||
}
|
||||
if !isRepeatableError(err) {
|
||||
return result, err
|
||||
}
|
||||
tries++
|
||||
if tries >= 3 {
|
||||
err = errors.Wrap(err, "giving up after 3 consecutive repeatable transaction failures")
|
||||
return result, err
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
func (s *RetryLayerGroupStore) GetByIDs(groupIDs []string) ([]*model.Group, *model.AppError) {
|
||||
func (s *RetryLayerGroupStore) GetByIDs(groupIDs []string) ([]*model.Group, error) {
|
||||
|
||||
return s.GroupStore.GetByIDs(groupIDs)
|
||||
tries := 0
|
||||
for {
|
||||
result, err := s.GroupStore.GetByIDs(groupIDs)
|
||||
if err == nil {
|
||||
return result, nil
|
||||
}
|
||||
if !isRepeatableError(err) {
|
||||
return result, err
|
||||
}
|
||||
tries++
|
||||
if tries >= 3 {
|
||||
err = errors.Wrap(err, "giving up after 3 consecutive repeatable transaction failures")
|
||||
return result, err
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
func (s *RetryLayerGroupStore) GetByName(name string, opts model.GroupSearchOpts) (*model.Group, *model.AppError) {
|
||||
func (s *RetryLayerGroupStore) GetByName(name string, opts model.GroupSearchOpts) (*model.Group, error) {
|
||||
|
||||
return s.GroupStore.GetByName(name, opts)
|
||||
tries := 0
|
||||
for {
|
||||
result, err := s.GroupStore.GetByName(name, opts)
|
||||
if err == nil {
|
||||
return result, nil
|
||||
}
|
||||
if !isRepeatableError(err) {
|
||||
return result, err
|
||||
}
|
||||
tries++
|
||||
if tries >= 3 {
|
||||
err = errors.Wrap(err, "giving up after 3 consecutive repeatable transaction failures")
|
||||
return result, err
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
func (s *RetryLayerGroupStore) GetByRemoteID(remoteID string, groupSource model.GroupSource) (*model.Group, *model.AppError) {
|
||||
func (s *RetryLayerGroupStore) GetByRemoteID(remoteID string, groupSource model.GroupSource) (*model.Group, error) {
|
||||
|
||||
return s.GroupStore.GetByRemoteID(remoteID, groupSource)
|
||||
tries := 0
|
||||
for {
|
||||
result, err := s.GroupStore.GetByRemoteID(remoteID, groupSource)
|
||||
if err == nil {
|
||||
return result, nil
|
||||
}
|
||||
if !isRepeatableError(err) {
|
||||
return result, err
|
||||
}
|
||||
tries++
|
||||
if tries >= 3 {
|
||||
err = errors.Wrap(err, "giving up after 3 consecutive repeatable transaction failures")
|
||||
return result, err
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
func (s *RetryLayerGroupStore) GetByUser(userId string) ([]*model.Group, *model.AppError) {
|
||||
func (s *RetryLayerGroupStore) GetByUser(userId string) ([]*model.Group, error) {
|
||||
|
||||
return s.GroupStore.GetByUser(userId)
|
||||
tries := 0
|
||||
for {
|
||||
result, err := s.GroupStore.GetByUser(userId)
|
||||
if err == nil {
|
||||
return result, nil
|
||||
}
|
||||
if !isRepeatableError(err) {
|
||||
return result, err
|
||||
}
|
||||
tries++
|
||||
if tries >= 3 {
|
||||
err = errors.Wrap(err, "giving up after 3 consecutive repeatable transaction failures")
|
||||
return result, err
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
func (s *RetryLayerGroupStore) GetGroupSyncable(groupID string, syncableID string, syncableType model.GroupSyncableType) (*model.GroupSyncable, *model.AppError) {
|
||||
func (s *RetryLayerGroupStore) GetGroupSyncable(groupID string, syncableID string, syncableType model.GroupSyncableType) (*model.GroupSyncable, error) {
|
||||
|
||||
return s.GroupStore.GetGroupSyncable(groupID, syncableID, syncableType)
|
||||
tries := 0
|
||||
for {
|
||||
result, err := s.GroupStore.GetGroupSyncable(groupID, syncableID, syncableType)
|
||||
if err == nil {
|
||||
return result, nil
|
||||
}
|
||||
if !isRepeatableError(err) {
|
||||
return result, err
|
||||
}
|
||||
tries++
|
||||
if tries >= 3 {
|
||||
err = errors.Wrap(err, "giving up after 3 consecutive repeatable transaction failures")
|
||||
return result, err
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
func (s *RetryLayerGroupStore) GetGroups(page int, perPage int, opts model.GroupSearchOpts) ([]*model.Group, *model.AppError) {
|
||||
func (s *RetryLayerGroupStore) GetGroups(page int, perPage int, opts model.GroupSearchOpts) ([]*model.Group, error) {
|
||||
|
||||
return s.GroupStore.GetGroups(page, perPage, opts)
|
||||
tries := 0
|
||||
for {
|
||||
result, err := s.GroupStore.GetGroups(page, perPage, opts)
|
||||
if err == nil {
|
||||
return result, nil
|
||||
}
|
||||
if !isRepeatableError(err) {
|
||||
return result, err
|
||||
}
|
||||
tries++
|
||||
if tries >= 3 {
|
||||
err = errors.Wrap(err, "giving up after 3 consecutive repeatable transaction failures")
|
||||
return result, err
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
func (s *RetryLayerGroupStore) GetGroupsAssociatedToChannelsByTeam(teamId string, opts model.GroupSearchOpts) (map[string][]*model.GroupWithSchemeAdmin, *model.AppError) {
|
||||
func (s *RetryLayerGroupStore) GetGroupsAssociatedToChannelsByTeam(teamId string, opts model.GroupSearchOpts) (map[string][]*model.GroupWithSchemeAdmin, error) {
|
||||
|
||||
return s.GroupStore.GetGroupsAssociatedToChannelsByTeam(teamId, opts)
|
||||
tries := 0
|
||||
for {
|
||||
result, err := s.GroupStore.GetGroupsAssociatedToChannelsByTeam(teamId, opts)
|
||||
if err == nil {
|
||||
return result, nil
|
||||
}
|
||||
if !isRepeatableError(err) {
|
||||
return result, err
|
||||
}
|
||||
tries++
|
||||
if tries >= 3 {
|
||||
err = errors.Wrap(err, "giving up after 3 consecutive repeatable transaction failures")
|
||||
return result, err
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
func (s *RetryLayerGroupStore) GetGroupsByChannel(channelId string, opts model.GroupSearchOpts) ([]*model.GroupWithSchemeAdmin, *model.AppError) {
|
||||
func (s *RetryLayerGroupStore) GetGroupsByChannel(channelId string, opts model.GroupSearchOpts) ([]*model.GroupWithSchemeAdmin, error) {
|
||||
|
||||
return s.GroupStore.GetGroupsByChannel(channelId, opts)
|
||||
tries := 0
|
||||
for {
|
||||
result, err := s.GroupStore.GetGroupsByChannel(channelId, opts)
|
||||
if err == nil {
|
||||
return result, nil
|
||||
}
|
||||
if !isRepeatableError(err) {
|
||||
return result, err
|
||||
}
|
||||
tries++
|
||||
if tries >= 3 {
|
||||
err = errors.Wrap(err, "giving up after 3 consecutive repeatable transaction failures")
|
||||
return result, err
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
func (s *RetryLayerGroupStore) GetGroupsByTeam(teamId string, opts model.GroupSearchOpts) ([]*model.GroupWithSchemeAdmin, *model.AppError) {
|
||||
func (s *RetryLayerGroupStore) GetGroupsByTeam(teamId string, opts model.GroupSearchOpts) ([]*model.GroupWithSchemeAdmin, error) {
|
||||
|
||||
return s.GroupStore.GetGroupsByTeam(teamId, opts)
|
||||
tries := 0
|
||||
for {
|
||||
result, err := s.GroupStore.GetGroupsByTeam(teamId, opts)
|
||||
if err == nil {
|
||||
return result, nil
|
||||
}
|
||||
if !isRepeatableError(err) {
|
||||
return result, err
|
||||
}
|
||||
tries++
|
||||
if tries >= 3 {
|
||||
err = errors.Wrap(err, "giving up after 3 consecutive repeatable transaction failures")
|
||||
return result, err
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
func (s *RetryLayerGroupStore) GetMemberCount(groupID string) (int64, *model.AppError) {
|
||||
func (s *RetryLayerGroupStore) GetMemberCount(groupID string) (int64, error) {
|
||||
|
||||
return s.GroupStore.GetMemberCount(groupID)
|
||||
tries := 0
|
||||
for {
|
||||
result, err := s.GroupStore.GetMemberCount(groupID)
|
||||
if err == nil {
|
||||
return result, nil
|
||||
}
|
||||
if !isRepeatableError(err) {
|
||||
return result, err
|
||||
}
|
||||
tries++
|
||||
if tries >= 3 {
|
||||
err = errors.Wrap(err, "giving up after 3 consecutive repeatable transaction failures")
|
||||
return result, err
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
func (s *RetryLayerGroupStore) GetMemberUsers(groupID string) ([]*model.User, *model.AppError) {
|
||||
func (s *RetryLayerGroupStore) GetMemberUsers(groupID string) ([]*model.User, error) {
|
||||
|
||||
return s.GroupStore.GetMemberUsers(groupID)
|
||||
tries := 0
|
||||
for {
|
||||
result, err := s.GroupStore.GetMemberUsers(groupID)
|
||||
if err == nil {
|
||||
return result, nil
|
||||
}
|
||||
if !isRepeatableError(err) {
|
||||
return result, err
|
||||
}
|
||||
tries++
|
||||
if tries >= 3 {
|
||||
err = errors.Wrap(err, "giving up after 3 consecutive repeatable transaction failures")
|
||||
return result, err
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
func (s *RetryLayerGroupStore) GetMemberUsersInTeam(groupID string, teamID string) ([]*model.User, *model.AppError) {
|
||||
func (s *RetryLayerGroupStore) GetMemberUsersInTeam(groupID string, teamID string) ([]*model.User, error) {
|
||||
|
||||
return s.GroupStore.GetMemberUsersInTeam(groupID, teamID)
|
||||
tries := 0
|
||||
for {
|
||||
result, err := s.GroupStore.GetMemberUsersInTeam(groupID, teamID)
|
||||
if err == nil {
|
||||
return result, nil
|
||||
}
|
||||
if !isRepeatableError(err) {
|
||||
return result, err
|
||||
}
|
||||
tries++
|
||||
if tries >= 3 {
|
||||
err = errors.Wrap(err, "giving up after 3 consecutive repeatable transaction failures")
|
||||
return result, err
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
func (s *RetryLayerGroupStore) GetMemberUsersNotInChannel(groupID string, channelID string) ([]*model.User, *model.AppError) {
|
||||
func (s *RetryLayerGroupStore) GetMemberUsersNotInChannel(groupID string, channelID string) ([]*model.User, error) {
|
||||
|
||||
return s.GroupStore.GetMemberUsersNotInChannel(groupID, channelID)
|
||||
tries := 0
|
||||
for {
|
||||
result, err := s.GroupStore.GetMemberUsersNotInChannel(groupID, channelID)
|
||||
if err == nil {
|
||||
return result, nil
|
||||
}
|
||||
if !isRepeatableError(err) {
|
||||
return result, err
|
||||
}
|
||||
tries++
|
||||
if tries >= 3 {
|
||||
err = errors.Wrap(err, "giving up after 3 consecutive repeatable transaction failures")
|
||||
return result, err
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
func (s *RetryLayerGroupStore) GetMemberUsersPage(groupID string, page int, perPage int) ([]*model.User, *model.AppError) {
|
||||
func (s *RetryLayerGroupStore) GetMemberUsersPage(groupID string, page int, perPage int) ([]*model.User, error) {
|
||||
|
||||
return s.GroupStore.GetMemberUsersPage(groupID, page, perPage)
|
||||
tries := 0
|
||||
for {
|
||||
result, err := s.GroupStore.GetMemberUsersPage(groupID, page, perPage)
|
||||
if err == nil {
|
||||
return result, nil
|
||||
}
|
||||
if !isRepeatableError(err) {
|
||||
return result, err
|
||||
}
|
||||
tries++
|
||||
if tries >= 3 {
|
||||
err = errors.Wrap(err, "giving up after 3 consecutive repeatable transaction failures")
|
||||
return result, err
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
func (s *RetryLayerGroupStore) GroupChannelCount() (int64, *model.AppError) {
|
||||
func (s *RetryLayerGroupStore) GroupChannelCount() (int64, error) {
|
||||
|
||||
return s.GroupStore.GroupChannelCount()
|
||||
tries := 0
|
||||
for {
|
||||
result, err := s.GroupStore.GroupChannelCount()
|
||||
if err == nil {
|
||||
return result, nil
|
||||
}
|
||||
if !isRepeatableError(err) {
|
||||
return result, err
|
||||
}
|
||||
tries++
|
||||
if tries >= 3 {
|
||||
err = errors.Wrap(err, "giving up after 3 consecutive repeatable transaction failures")
|
||||
return result, err
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
func (s *RetryLayerGroupStore) GroupCount() (int64, *model.AppError) {
|
||||
func (s *RetryLayerGroupStore) GroupCount() (int64, error) {
|
||||
|
||||
return s.GroupStore.GroupCount()
|
||||
tries := 0
|
||||
for {
|
||||
result, err := s.GroupStore.GroupCount()
|
||||
if err == nil {
|
||||
return result, nil
|
||||
}
|
||||
if !isRepeatableError(err) {
|
||||
return result, err
|
||||
}
|
||||
tries++
|
||||
if tries >= 3 {
|
||||
err = errors.Wrap(err, "giving up after 3 consecutive repeatable transaction failures")
|
||||
return result, err
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
func (s *RetryLayerGroupStore) GroupCountWithAllowReference() (int64, *model.AppError) {
|
||||
func (s *RetryLayerGroupStore) GroupCountWithAllowReference() (int64, error) {
|
||||
|
||||
return s.GroupStore.GroupCountWithAllowReference()
|
||||
tries := 0
|
||||
for {
|
||||
result, err := s.GroupStore.GroupCountWithAllowReference()
|
||||
if err == nil {
|
||||
return result, nil
|
||||
}
|
||||
if !isRepeatableError(err) {
|
||||
return result, err
|
||||
}
|
||||
tries++
|
||||
if tries >= 3 {
|
||||
err = errors.Wrap(err, "giving up after 3 consecutive repeatable transaction failures")
|
||||
return result, err
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
func (s *RetryLayerGroupStore) GroupMemberCount() (int64, *model.AppError) {
|
||||
func (s *RetryLayerGroupStore) GroupMemberCount() (int64, error) {
|
||||
|
||||
return s.GroupStore.GroupMemberCount()
|
||||
tries := 0
|
||||
for {
|
||||
result, err := s.GroupStore.GroupMemberCount()
|
||||
if err == nil {
|
||||
return result, nil
|
||||
}
|
||||
if !isRepeatableError(err) {
|
||||
return result, err
|
||||
}
|
||||
tries++
|
||||
if tries >= 3 {
|
||||
err = errors.Wrap(err, "giving up after 3 consecutive repeatable transaction failures")
|
||||
return result, err
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
func (s *RetryLayerGroupStore) GroupTeamCount() (int64, *model.AppError) {
|
||||
func (s *RetryLayerGroupStore) GroupTeamCount() (int64, error) {
|
||||
|
||||
return s.GroupStore.GroupTeamCount()
|
||||
tries := 0
|
||||
for {
|
||||
result, err := s.GroupStore.GroupTeamCount()
|
||||
if err == nil {
|
||||
return result, nil
|
||||
}
|
||||
if !isRepeatableError(err) {
|
||||
return result, err
|
||||
}
|
||||
tries++
|
||||
if tries >= 3 {
|
||||
err = errors.Wrap(err, "giving up after 3 consecutive repeatable transaction failures")
|
||||
return result, err
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
func (s *RetryLayerGroupStore) PermanentDeleteMembersByUser(userId string) *model.AppError {
|
||||
func (s *RetryLayerGroupStore) PermanentDeleteMembersByUser(userId string) error {
|
||||
|
||||
return s.GroupStore.PermanentDeleteMembersByUser(userId)
|
||||
tries := 0
|
||||
for {
|
||||
err := s.GroupStore.PermanentDeleteMembersByUser(userId)
|
||||
if err == nil {
|
||||
return nil
|
||||
}
|
||||
if !isRepeatableError(err) {
|
||||
return err
|
||||
}
|
||||
tries++
|
||||
if tries >= 3 {
|
||||
err = errors.Wrap(err, "giving up after 3 consecutive repeatable transaction failures")
|
||||
return err
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
func (s *RetryLayerGroupStore) PermittedSyncableAdmins(syncableID string, syncableType model.GroupSyncableType) ([]string, *model.AppError) {
|
||||
func (s *RetryLayerGroupStore) PermittedSyncableAdmins(syncableID string, syncableType model.GroupSyncableType) ([]string, error) {
|
||||
|
||||
return s.GroupStore.PermittedSyncableAdmins(syncableID, syncableType)
|
||||
tries := 0
|
||||
for {
|
||||
result, err := s.GroupStore.PermittedSyncableAdmins(syncableID, syncableType)
|
||||
if err == nil {
|
||||
return result, nil
|
||||
}
|
||||
if !isRepeatableError(err) {
|
||||
return result, err
|
||||
}
|
||||
tries++
|
||||
if tries >= 3 {
|
||||
err = errors.Wrap(err, "giving up after 3 consecutive repeatable transaction failures")
|
||||
return result, err
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
func (s *RetryLayerGroupStore) TeamMembersMinusGroupMembers(teamID string, groupIDs []string, page int, perPage int) ([]*model.UserWithGroups, *model.AppError) {
|
||||
func (s *RetryLayerGroupStore) TeamMembersMinusGroupMembers(teamID string, groupIDs []string, page int, perPage int) ([]*model.UserWithGroups, error) {
|
||||
|
||||
return s.GroupStore.TeamMembersMinusGroupMembers(teamID, groupIDs, page, perPage)
|
||||
tries := 0
|
||||
for {
|
||||
result, err := s.GroupStore.TeamMembersMinusGroupMembers(teamID, groupIDs, page, perPage)
|
||||
if err == nil {
|
||||
return result, nil
|
||||
}
|
||||
if !isRepeatableError(err) {
|
||||
return result, err
|
||||
}
|
||||
tries++
|
||||
if tries >= 3 {
|
||||
err = errors.Wrap(err, "giving up after 3 consecutive repeatable transaction failures")
|
||||
return result, err
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
func (s *RetryLayerGroupStore) TeamMembersToAdd(since int64, teamID *string) ([]*model.UserTeamIDPair, *model.AppError) {
|
||||
func (s *RetryLayerGroupStore) TeamMembersToAdd(since int64, teamID *string) ([]*model.UserTeamIDPair, error) {
|
||||
|
||||
return s.GroupStore.TeamMembersToAdd(since, teamID)
|
||||
tries := 0
|
||||
for {
|
||||
result, err := s.GroupStore.TeamMembersToAdd(since, teamID)
|
||||
if err == nil {
|
||||
return result, nil
|
||||
}
|
||||
if !isRepeatableError(err) {
|
||||
return result, err
|
||||
}
|
||||
tries++
|
||||
if tries >= 3 {
|
||||
err = errors.Wrap(err, "giving up after 3 consecutive repeatable transaction failures")
|
||||
return result, err
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
func (s *RetryLayerGroupStore) TeamMembersToRemove(teamID *string) ([]*model.TeamMember, *model.AppError) {
|
||||
func (s *RetryLayerGroupStore) TeamMembersToRemove(teamID *string) ([]*model.TeamMember, error) {
|
||||
|
||||
return s.GroupStore.TeamMembersToRemove(teamID)
|
||||
tries := 0
|
||||
for {
|
||||
result, err := s.GroupStore.TeamMembersToRemove(teamID)
|
||||
if err == nil {
|
||||
return result, nil
|
||||
}
|
||||
if !isRepeatableError(err) {
|
||||
return result, err
|
||||
}
|
||||
tries++
|
||||
if tries >= 3 {
|
||||
err = errors.Wrap(err, "giving up after 3 consecutive repeatable transaction failures")
|
||||
return result, err
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
func (s *RetryLayerGroupStore) Update(group *model.Group) (*model.Group, *model.AppError) {
|
||||
func (s *RetryLayerGroupStore) Update(group *model.Group) (*model.Group, error) {
|
||||
|
||||
return s.GroupStore.Update(group)
|
||||
tries := 0
|
||||
for {
|
||||
result, err := s.GroupStore.Update(group)
|
||||
if err == nil {
|
||||
return result, nil
|
||||
}
|
||||
if !isRepeatableError(err) {
|
||||
return result, err
|
||||
}
|
||||
tries++
|
||||
if tries >= 3 {
|
||||
err = errors.Wrap(err, "giving up after 3 consecutive repeatable transaction failures")
|
||||
return result, err
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
func (s *RetryLayerGroupStore) UpdateGroupSyncable(groupSyncable *model.GroupSyncable) (*model.GroupSyncable, *model.AppError) {
|
||||
func (s *RetryLayerGroupStore) UpdateGroupSyncable(groupSyncable *model.GroupSyncable) (*model.GroupSyncable, error) {
|
||||
|
||||
return s.GroupStore.UpdateGroupSyncable(groupSyncable)
|
||||
tries := 0
|
||||
for {
|
||||
result, err := s.GroupStore.UpdateGroupSyncable(groupSyncable)
|
||||
if err == nil {
|
||||
return result, nil
|
||||
}
|
||||
if !isRepeatableError(err) {
|
||||
return result, err
|
||||
}
|
||||
tries++
|
||||
if tries >= 3 {
|
||||
err = errors.Wrap(err, "giving up after 3 consecutive repeatable transaction failures")
|
||||
return result, err
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
func (s *RetryLayerGroupStore) UpsertMember(groupID string, userID string) (*model.GroupMember, *model.AppError) {
|
||||
func (s *RetryLayerGroupStore) UpsertMember(groupID string, userID string) (*model.GroupMember, error) {
|
||||
|
||||
return s.GroupStore.UpsertMember(groupID, userID)
|
||||
tries := 0
|
||||
for {
|
||||
result, err := s.GroupStore.UpsertMember(groupID, userID)
|
||||
if err == nil {
|
||||
return result, nil
|
||||
}
|
||||
if !isRepeatableError(err) {
|
||||
return result, err
|
||||
}
|
||||
tries++
|
||||
if tries >= 3 {
|
||||
err = errors.Wrap(err, "giving up after 3 consecutive repeatable transaction failures")
|
||||
return result, err
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
Разница между файлами не показана из-за своего большого размера
Загрузить разницу
@@ -688,90 +688,90 @@ type UserTermsOfServiceStore interface {
|
||||
}
|
||||
|
||||
type GroupStore interface {
|
||||
Create(group *model.Group) (*model.Group, *model.AppError)
|
||||
Get(groupID string) (*model.Group, *model.AppError)
|
||||
GetByName(name string, opts model.GroupSearchOpts) (*model.Group, *model.AppError)
|
||||
GetByIDs(groupIDs []string) ([]*model.Group, *model.AppError)
|
||||
GetByRemoteID(remoteID string, groupSource model.GroupSource) (*model.Group, *model.AppError)
|
||||
GetAllBySource(groupSource model.GroupSource) ([]*model.Group, *model.AppError)
|
||||
GetByUser(userId string) ([]*model.Group, *model.AppError)
|
||||
Update(group *model.Group) (*model.Group, *model.AppError)
|
||||
Delete(groupID string) (*model.Group, *model.AppError)
|
||||
Create(group *model.Group) (*model.Group, error)
|
||||
Get(groupID string) (*model.Group, error)
|
||||
GetByName(name string, opts model.GroupSearchOpts) (*model.Group, error)
|
||||
GetByIDs(groupIDs []string) ([]*model.Group, error)
|
||||
GetByRemoteID(remoteID string, groupSource model.GroupSource) (*model.Group, error)
|
||||
GetAllBySource(groupSource model.GroupSource) ([]*model.Group, error)
|
||||
GetByUser(userId string) ([]*model.Group, error)
|
||||
Update(group *model.Group) (*model.Group, error)
|
||||
Delete(groupID string) (*model.Group, error)
|
||||
|
||||
GetMemberUsers(groupID string) ([]*model.User, *model.AppError)
|
||||
GetMemberUsersPage(groupID string, page int, perPage int) ([]*model.User, *model.AppError)
|
||||
GetMemberCount(groupID string) (int64, *model.AppError)
|
||||
GetMemberUsers(groupID string) ([]*model.User, error)
|
||||
GetMemberUsersPage(groupID string, page int, perPage int) ([]*model.User, error)
|
||||
GetMemberCount(groupID string) (int64, error)
|
||||
|
||||
GetMemberUsersInTeam(groupID string, teamID string) ([]*model.User, *model.AppError)
|
||||
GetMemberUsersNotInChannel(groupID string, channelID string) ([]*model.User, *model.AppError)
|
||||
GetMemberUsersInTeam(groupID string, teamID string) ([]*model.User, error)
|
||||
GetMemberUsersNotInChannel(groupID string, channelID string) ([]*model.User, error)
|
||||
|
||||
UpsertMember(groupID string, userID string) (*model.GroupMember, *model.AppError)
|
||||
DeleteMember(groupID string, userID string) (*model.GroupMember, *model.AppError)
|
||||
PermanentDeleteMembersByUser(userId string) *model.AppError
|
||||
UpsertMember(groupID string, userID string) (*model.GroupMember, error)
|
||||
DeleteMember(groupID string, userID string) (*model.GroupMember, error)
|
||||
PermanentDeleteMembersByUser(userId string) error
|
||||
|
||||
CreateGroupSyncable(groupSyncable *model.GroupSyncable) (*model.GroupSyncable, *model.AppError)
|
||||
GetGroupSyncable(groupID string, syncableID string, syncableType model.GroupSyncableType) (*model.GroupSyncable, *model.AppError)
|
||||
GetAllGroupSyncablesByGroupId(groupID string, syncableType model.GroupSyncableType) ([]*model.GroupSyncable, *model.AppError)
|
||||
UpdateGroupSyncable(groupSyncable *model.GroupSyncable) (*model.GroupSyncable, *model.AppError)
|
||||
DeleteGroupSyncable(groupID string, syncableID string, syncableType model.GroupSyncableType) (*model.GroupSyncable, *model.AppError)
|
||||
CreateGroupSyncable(groupSyncable *model.GroupSyncable) (*model.GroupSyncable, error)
|
||||
GetGroupSyncable(groupID string, syncableID string, syncableType model.GroupSyncableType) (*model.GroupSyncable, error)
|
||||
GetAllGroupSyncablesByGroupId(groupID string, syncableType model.GroupSyncableType) ([]*model.GroupSyncable, error)
|
||||
UpdateGroupSyncable(groupSyncable *model.GroupSyncable) (*model.GroupSyncable, error)
|
||||
DeleteGroupSyncable(groupID string, syncableID string, syncableType model.GroupSyncableType) (*model.GroupSyncable, error)
|
||||
|
||||
// TeamMembersToAdd returns a slice of UserTeamIDPair that need newly created memberships
|
||||
// based on the groups configurations. The returned list can be optionally scoped to a single given team.
|
||||
//
|
||||
// Typically since will be the last successful group sync time.
|
||||
TeamMembersToAdd(since int64, teamID *string) ([]*model.UserTeamIDPair, *model.AppError)
|
||||
TeamMembersToAdd(since int64, teamID *string) ([]*model.UserTeamIDPair, error)
|
||||
|
||||
// ChannelMembersToAdd returns a slice of UserChannelIDPair that need newly created memberships
|
||||
// based on the groups configurations. The returned list can be optionally scoped to a single given channel.
|
||||
//
|
||||
// Typically since will be the last successful group sync time.
|
||||
ChannelMembersToAdd(since int64, channelID *string) ([]*model.UserChannelIDPair, *model.AppError)
|
||||
ChannelMembersToAdd(since int64, channelID *string) ([]*model.UserChannelIDPair, error)
|
||||
|
||||
// TeamMembersToRemove returns all team members that should be removed based on group constraints.
|
||||
TeamMembersToRemove(teamID *string) ([]*model.TeamMember, *model.AppError)
|
||||
TeamMembersToRemove(teamID *string) ([]*model.TeamMember, error)
|
||||
|
||||
// ChannelMembersToRemove returns all channel members that should be removed based on group constraints.
|
||||
ChannelMembersToRemove(channelID *string) ([]*model.ChannelMember, *model.AppError)
|
||||
ChannelMembersToRemove(channelID *string) ([]*model.ChannelMember, error)
|
||||
|
||||
GetGroupsByChannel(channelId string, opts model.GroupSearchOpts) ([]*model.GroupWithSchemeAdmin, *model.AppError)
|
||||
CountGroupsByChannel(channelId string, opts model.GroupSearchOpts) (int64, *model.AppError)
|
||||
GetGroupsByChannel(channelId string, opts model.GroupSearchOpts) ([]*model.GroupWithSchemeAdmin, error)
|
||||
CountGroupsByChannel(channelId string, opts model.GroupSearchOpts) (int64, error)
|
||||
|
||||
GetGroupsByTeam(teamId string, opts model.GroupSearchOpts) ([]*model.GroupWithSchemeAdmin, *model.AppError)
|
||||
GetGroupsAssociatedToChannelsByTeam(teamId string, opts model.GroupSearchOpts) (map[string][]*model.GroupWithSchemeAdmin, *model.AppError)
|
||||
CountGroupsByTeam(teamId string, opts model.GroupSearchOpts) (int64, *model.AppError)
|
||||
GetGroupsByTeam(teamId string, opts model.GroupSearchOpts) ([]*model.GroupWithSchemeAdmin, error)
|
||||
GetGroupsAssociatedToChannelsByTeam(teamId string, opts model.GroupSearchOpts) (map[string][]*model.GroupWithSchemeAdmin, error)
|
||||
CountGroupsByTeam(teamId string, opts model.GroupSearchOpts) (int64, error)
|
||||
|
||||
GetGroups(page, perPage int, opts model.GroupSearchOpts) ([]*model.Group, *model.AppError)
|
||||
GetGroups(page, perPage int, opts model.GroupSearchOpts) ([]*model.Group, error)
|
||||
|
||||
TeamMembersMinusGroupMembers(teamID string, groupIDs []string, page, perPage int) ([]*model.UserWithGroups, *model.AppError)
|
||||
CountTeamMembersMinusGroupMembers(teamID string, groupIDs []string) (int64, *model.AppError)
|
||||
ChannelMembersMinusGroupMembers(channelID string, groupIDs []string, page, perPage int) ([]*model.UserWithGroups, *model.AppError)
|
||||
CountChannelMembersMinusGroupMembers(channelID string, groupIDs []string) (int64, *model.AppError)
|
||||
TeamMembersMinusGroupMembers(teamID string, groupIDs []string, page, perPage int) ([]*model.UserWithGroups, error)
|
||||
CountTeamMembersMinusGroupMembers(teamID string, groupIDs []string) (int64, error)
|
||||
ChannelMembersMinusGroupMembers(channelID string, groupIDs []string, page, perPage int) ([]*model.UserWithGroups, error)
|
||||
CountChannelMembersMinusGroupMembers(channelID string, groupIDs []string) (int64, error)
|
||||
|
||||
// AdminRoleGroupsForSyncableMember returns the IDs of all of the groups that the user is a member of that are
|
||||
// configured as SchemeAdmin: true for the given syncable.
|
||||
AdminRoleGroupsForSyncableMember(userID, syncableID string, syncableType model.GroupSyncableType) ([]string, *model.AppError)
|
||||
AdminRoleGroupsForSyncableMember(userID, syncableID string, syncableType model.GroupSyncableType) ([]string, error)
|
||||
|
||||
// PermittedSyncableAdmins returns the IDs of all of the user who are permitted by the group syncable to have
|
||||
// the admin role for the given syncable.
|
||||
PermittedSyncableAdmins(syncableID string, syncableType model.GroupSyncableType) ([]string, *model.AppError)
|
||||
PermittedSyncableAdmins(syncableID string, syncableType model.GroupSyncableType) ([]string, error)
|
||||
|
||||
// GroupCount returns the total count of records in the UserGroups table.
|
||||
GroupCount() (int64, *model.AppError)
|
||||
GroupCount() (int64, error)
|
||||
|
||||
// GroupTeamCount returns the total count of records in the GroupTeams table.
|
||||
GroupTeamCount() (int64, *model.AppError)
|
||||
GroupTeamCount() (int64, error)
|
||||
|
||||
// GroupChannelCount returns the total count of records in the GroupChannels table.
|
||||
GroupChannelCount() (int64, *model.AppError)
|
||||
GroupChannelCount() (int64, error)
|
||||
|
||||
// GroupMemberCount returns the total count of records in the GroupMembers table.
|
||||
GroupMemberCount() (int64, *model.AppError)
|
||||
GroupMemberCount() (int64, error)
|
||||
|
||||
// DistinctGroupMemberCount returns the count of records in the GroupMembers table with distinct UserId values.
|
||||
DistinctGroupMemberCount() (int64, *model.AppError)
|
||||
DistinctGroupMemberCount() (int64, error)
|
||||
|
||||
// GroupCountWithAllowReference returns the count of records in the Groups table with AllowReference set to true.
|
||||
GroupCountWithAllowReference() (int64, *model.AppError)
|
||||
GroupCountWithAllowReference() (int64, error)
|
||||
}
|
||||
|
||||
type LinkMetadataStore interface {
|
||||
|
||||
@@ -4,6 +4,7 @@
|
||||
package storetest
|
||||
|
||||
import (
|
||||
"errors"
|
||||
"fmt"
|
||||
"math"
|
||||
"sort"
|
||||
@@ -116,7 +117,9 @@ func testGroupStoreCreate(t *testing.T, ss store.Store) {
|
||||
data, err := ss.Group().Create(g2)
|
||||
require.Nil(t, data)
|
||||
require.NotNil(t, err)
|
||||
require.Equal(t, err.Id, "model.group.display_name.app_error")
|
||||
var appErr *model.AppError
|
||||
require.True(t, errors.As(err, &appErr))
|
||||
require.Equal(t, appErr.Id, "model.group.display_name.app_error")
|
||||
|
||||
// Won't accept a duplicate name
|
||||
g4 := &model.Group{
|
||||
@@ -135,7 +138,8 @@ func testGroupStoreCreate(t *testing.T, ss store.Store) {
|
||||
}
|
||||
data, err = ss.Group().Create(g4b)
|
||||
require.Nil(t, data)
|
||||
require.Equal(t, err.Id, "store.sql_group.unique_constraint")
|
||||
require.Error(t, err)
|
||||
require.Contains(t, err.Error(), fmt.Sprintf("Group with name %s already exists", *g4b.Name))
|
||||
|
||||
// Fields cannot be greater than max values
|
||||
g5 := &model.Group{
|
||||
@@ -211,7 +215,8 @@ func testGroupStoreGet(t *testing.T, ss store.Store) {
|
||||
// Get an invalid group
|
||||
_, err = ss.Group().Get(model.NewId())
|
||||
require.NotNil(t, err)
|
||||
require.Equal(t, err.Id, "store.sql_group.no_rows")
|
||||
var nfErr *store.ErrNotFound
|
||||
require.True(t, errors.As(err, &nfErr))
|
||||
}
|
||||
|
||||
func testGroupStoreGetByName(t *testing.T, ss store.Store) {
|
||||
@@ -246,7 +251,8 @@ func testGroupStoreGetByName(t *testing.T, ss store.Store) {
|
||||
// Get an invalid group
|
||||
_, err = ss.Group().GetByName(model.NewId(), g1Opts)
|
||||
require.NotNil(t, err)
|
||||
require.Equal(t, err.Id, "store.sql_group.no_rows")
|
||||
var nfErr *store.ErrNotFound
|
||||
require.True(t, errors.As(err, &nfErr))
|
||||
}
|
||||
|
||||
func testGroupStoreGetByIDs(t *testing.T, ss store.Store) {
|
||||
@@ -310,7 +316,8 @@ func testGroupStoreGetByRemoteID(t *testing.T, ss store.Store) {
|
||||
// Get an invalid group
|
||||
_, err = ss.Group().GetByRemoteID(model.NewId(), model.GroupSource("fake"))
|
||||
require.NotNil(t, err)
|
||||
require.Equal(t, err.Id, "store.sql_group.no_rows")
|
||||
var nfErr *store.ErrNotFound
|
||||
require.True(t, errors.As(err, &nfErr))
|
||||
}
|
||||
|
||||
func testGroupStoreGetAllByType(t *testing.T, ss store.Store) {
|
||||
@@ -464,7 +471,9 @@ func testGroupStoreUpdate(t *testing.T, ss store.Store) {
|
||||
})
|
||||
require.Nil(t, data)
|
||||
require.NotNil(t, err)
|
||||
require.Equal(t, err.Id, "model.group.display_name.app_error")
|
||||
var appErr *model.AppError
|
||||
require.True(t, errors.As(err, &appErr))
|
||||
require.Equal(t, appErr.Id, "model.group.display_name.app_error")
|
||||
|
||||
// Create another Group
|
||||
g2 := &model.Group{
|
||||
@@ -486,7 +495,8 @@ func testGroupStoreUpdate(t *testing.T, ss store.Store) {
|
||||
Description: model.NewId(),
|
||||
RemoteId: model.NewId(),
|
||||
})
|
||||
require.Equal(t, err.Id, "store.sql_group.unique_constraint")
|
||||
require.Error(t, err)
|
||||
require.Contains(t, err.Error(), fmt.Sprintf("Group with name %s already exists", *g1Update.Name))
|
||||
|
||||
// Cannot update CreateAt
|
||||
someVal := model.GetMillis()
|
||||
@@ -498,7 +508,8 @@ func testGroupStoreUpdate(t *testing.T, ss store.Store) {
|
||||
// Cannot update DeleteAt to non-zero
|
||||
d1.DeleteAt = 1
|
||||
_, err = ss.Group().Update(d1)
|
||||
require.Equal(t, "model.group.delete_at.app_error", err.Id)
|
||||
require.Error(t, err)
|
||||
require.Contains(t, err.Error(), "DeleteAt should be 0 when updating")
|
||||
|
||||
//...except for 0 for DeleteAt
|
||||
d1.DeleteAt = 0
|
||||
@@ -548,11 +559,12 @@ func testGroupStoreDelete(t *testing.T, ss store.Store) {
|
||||
// Try and delete a nonexistent group
|
||||
_, err = ss.Group().Delete(model.NewId())
|
||||
require.NotNil(t, err)
|
||||
require.Equal(t, err.Id, "store.sql_group.no_rows")
|
||||
var nfErr *store.ErrNotFound
|
||||
require.True(t, errors.As(err, &nfErr))
|
||||
|
||||
// Cannot delete again
|
||||
_, err = ss.Group().Delete(d1.Id)
|
||||
require.Equal(t, err.Id, "store.sql_group.no_rows")
|
||||
require.True(t, errors.As(err, &nfErr))
|
||||
}
|
||||
|
||||
func testGroupGetMemberUsers(t *testing.T, ss store.Store) {
|
||||
@@ -942,7 +954,8 @@ func testUpsertMember(t *testing.T, ss store.Store) {
|
||||
|
||||
// Invalid GroupId
|
||||
_, err = ss.Group().UpsertMember(model.NewId(), user.Id)
|
||||
require.Equal(t, err.Id, "store.insert_error")
|
||||
require.Error(t, err)
|
||||
require.Contains(t, err.Error(), "failed to get UserGroup with")
|
||||
|
||||
// Restores a deleted member
|
||||
// Ensure new CreateAt > previous CreateAt for the same (groupId, userId)
|
||||
@@ -998,15 +1011,16 @@ func testGroupDeleteMember(t *testing.T, ss store.Store) {
|
||||
|
||||
// Delete an already deleted member
|
||||
_, err = ss.Group().DeleteMember(group.Id, user.Id)
|
||||
require.Equal(t, err.Id, "store.sql_group.no_rows")
|
||||
var nfErr *store.ErrNotFound
|
||||
require.True(t, errors.As(err, &nfErr))
|
||||
|
||||
// Delete with non-existent User
|
||||
_, err = ss.Group().DeleteMember(group.Id, model.NewId())
|
||||
require.Equal(t, err.Id, "store.sql_group.no_rows")
|
||||
require.True(t, errors.As(err, &nfErr))
|
||||
|
||||
// Delete non-existent Group
|
||||
_, err = ss.Group().DeleteMember(model.NewId(), group.Id)
|
||||
require.Equal(t, err.Id, "store.sql_group.no_rows")
|
||||
require.True(t, errors.As(err, &nfErr))
|
||||
}
|
||||
|
||||
func testGroupPermanentDeleteMembersByUser(t *testing.T, ss store.Store) {
|
||||
@@ -1048,7 +1062,9 @@ func testGroupPermanentDeleteMembersByUser(t *testing.T, ss store.Store) {
|
||||
func testCreateGroupSyncable(t *testing.T, ss store.Store) {
|
||||
// Invalid GroupID
|
||||
_, err := ss.Group().CreateGroupSyncable(model.NewGroupTeam("x", model.NewId(), false))
|
||||
require.Equal(t, err.Id, "model.group_syncable.group_id.app_error")
|
||||
var appErr *model.AppError
|
||||
require.True(t, errors.As(err, &appErr))
|
||||
require.Equal(t, appErr.Id, "model.group_syncable.group_id.app_error")
|
||||
|
||||
// Create Group
|
||||
g1 := &model.Group{
|
||||
@@ -1225,12 +1241,13 @@ func testUpdateGroupSyncable(t *testing.T, ss store.Store) {
|
||||
// Non-existent Group
|
||||
gt2 := model.NewGroupTeam(model.NewId(), team.Id, false)
|
||||
_, err = ss.Group().UpdateGroupSyncable(gt2)
|
||||
require.Equal(t, err.Id, "store.sql_group.no_rows")
|
||||
var nfErr *store.ErrNotFound
|
||||
require.True(t, errors.As(err, &nfErr))
|
||||
|
||||
// Non-existent Team
|
||||
gt3 := model.NewGroupTeam(group.Id, model.NewId(), false)
|
||||
_, err = ss.Group().UpdateGroupSyncable(gt3)
|
||||
require.Equal(t, err.Id, "store.sql_group.no_rows")
|
||||
require.True(t, errors.As(err, &nfErr))
|
||||
|
||||
// Cannot update CreateAt or DeleteAt
|
||||
origCreateAt := d1.CreateAt
|
||||
@@ -1243,7 +1260,8 @@ func testUpdateGroupSyncable(t *testing.T, ss store.Store) {
|
||||
// Cannot update DeleteAt to arbitrary value
|
||||
d1.DeleteAt = 1
|
||||
_, err = ss.Group().UpdateGroupSyncable(d1)
|
||||
require.Equal(t, "model.group.delete_at.app_error", err.Id)
|
||||
require.Error(t, err)
|
||||
require.Contains(t, err.Error(), "DeleteAt should be 0 when updating")
|
||||
|
||||
// Can update DeleteAt to 0
|
||||
d1.DeleteAt = 0
|
||||
@@ -1284,11 +1302,12 @@ func testDeleteGroupSyncable(t *testing.T, ss store.Store) {
|
||||
|
||||
// Non-existent Group
|
||||
_, err = ss.Group().DeleteGroupSyncable(model.NewId(), groupTeam.SyncableId, model.GroupSyncableTypeTeam)
|
||||
require.Equal(t, err.Id, "store.sql_group.no_rows")
|
||||
var nfErr *store.ErrNotFound
|
||||
require.True(t, errors.As(err, &nfErr))
|
||||
|
||||
// Non-existent Team
|
||||
_, err = ss.Group().DeleteGroupSyncable(groupTeam.GroupId, model.NewId(), model.GroupSyncableTypeTeam)
|
||||
require.Equal(t, err.Id, "store.sql_group.no_rows")
|
||||
require.True(t, errors.As(err, &nfErr))
|
||||
|
||||
// Happy path...
|
||||
d1, err := ss.Group().DeleteGroupSyncable(groupTeam.GroupId, groupTeam.SyncableId, model.GroupSyncableTypeTeam)
|
||||
@@ -1303,7 +1322,8 @@ func testDeleteGroupSyncable(t *testing.T, ss store.Store) {
|
||||
// Record already deleted
|
||||
_, err = ss.Group().DeleteGroupSyncable(d1.GroupId, d1.SyncableId, d1.Type)
|
||||
require.NotNil(t, err)
|
||||
require.Equal(t, err.Id, "store.sql_group.group_syncable_already_deleted")
|
||||
var invErr *store.ErrInvalidInput
|
||||
require.True(t, errors.As(err, &invErr))
|
||||
}
|
||||
|
||||
func testTeamMembersToAdd(t *testing.T, ss store.Store) {
|
||||
|
||||
Разница между файлами не показана из-за своего большого размера
Загрузить разницу
@@ -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)
|
||||
|
||||
Ссылка в новой задаче
Block a user