MM-15848 migrating getFlaggedPostsForTeam to sync by default (#10996)
Этот коммит содержится в:
коммит произвёл
Hanzei
родитель
3b25e09b99
Коммит
28d668cd91
@@ -649,11 +649,7 @@ func (a *App) GetFlaggedPosts(userId string, offset int, limit int) (*model.Post
|
|||||||
}
|
}
|
||||||
|
|
||||||
func (a *App) GetFlaggedPostsForTeam(userId, teamId string, offset int, limit int) (*model.PostList, *model.AppError) {
|
func (a *App) GetFlaggedPostsForTeam(userId, teamId string, offset int, limit int) (*model.PostList, *model.AppError) {
|
||||||
result := <-a.Srv.Store.Post().GetFlaggedPostsForTeam(userId, teamId, offset, limit)
|
return a.Srv.Store.Post().GetFlaggedPostsForTeam(userId, teamId, offset, limit)
|
||||||
if result.Err != nil {
|
|
||||||
return nil, result.Err
|
|
||||||
}
|
|
||||||
return result.Data.(*model.PostList), nil
|
|
||||||
}
|
}
|
||||||
|
|
||||||
func (a *App) GetFlaggedPostsForChannel(userId, channelId string, offset int, limit int) (*model.PostList, *model.AppError) {
|
func (a *App) GetFlaggedPostsForChannel(userId, channelId string, offset int, limit int) (*model.PostList, *model.AppError) {
|
||||||
|
|||||||
@@ -197,13 +197,12 @@ func (s *SqlPostStore) GetFlaggedPosts(userId string, offset int, limit int) sto
|
|||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
func (s *SqlPostStore) GetFlaggedPostsForTeam(userId, teamId string, offset int, limit int) store.StoreChannel {
|
func (s *SqlPostStore) GetFlaggedPostsForTeam(userId, teamId string, offset int, limit int) (*model.PostList, *model.AppError) {
|
||||||
return store.Do(func(result *store.StoreResult) {
|
pl := model.NewPostList()
|
||||||
pl := model.NewPostList()
|
|
||||||
|
|
||||||
var posts []*model.Post
|
var posts []*model.Post
|
||||||
|
|
||||||
query := `
|
query := `
|
||||||
SELECT
|
SELECT
|
||||||
A.*
|
A.*
|
||||||
FROM
|
FROM
|
||||||
@@ -229,17 +228,16 @@ func (s *SqlPostStore) GetFlaggedPostsForTeam(userId, teamId string, offset int,
|
|||||||
ORDER BY CreateAt DESC
|
ORDER BY CreateAt DESC
|
||||||
LIMIT :Limit OFFSET :Offset`
|
LIMIT :Limit OFFSET :Offset`
|
||||||
|
|
||||||
if _, err := s.GetReplica().Select(&posts, query, map[string]interface{}{"UserId": userId, "Category": model.PREFERENCE_CATEGORY_FLAGGED_POST, "Offset": offset, "Limit": limit, "TeamId": teamId}); err != nil {
|
if _, err := s.GetReplica().Select(&posts, query, map[string]interface{}{"UserId": userId, "Category": model.PREFERENCE_CATEGORY_FLAGGED_POST, "Offset": offset, "Limit": limit, "TeamId": teamId}); err != nil {
|
||||||
result.Err = model.NewAppError("SqlPostStore.GetFlaggedPostsForTeam", "store.sql_post.get_flagged_posts.app_error", nil, err.Error(), http.StatusInternalServerError)
|
return nil, model.NewAppError("SqlPostStore.GetFlaggedPostsForTeam", "store.sql_post.get_flagged_posts.app_error", nil, err.Error(), http.StatusInternalServerError)
|
||||||
} else {
|
}
|
||||||
for _, post := range posts {
|
|
||||||
pl.AddPost(post)
|
|
||||||
pl.AddOrder(post.Id)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
result.Data = pl
|
for _, post := range posts {
|
||||||
})
|
pl.AddPost(post)
|
||||||
|
pl.AddOrder(post.Id)
|
||||||
|
}
|
||||||
|
|
||||||
|
return pl, nil
|
||||||
}
|
}
|
||||||
|
|
||||||
func (s *SqlPostStore) GetFlaggedPostsForChannel(userId, channelId string, offset int, limit int) store.StoreChannel {
|
func (s *SqlPostStore) GetFlaggedPostsForChannel(userId, channelId string, offset int, limit int) store.StoreChannel {
|
||||||
|
|||||||
@@ -219,7 +219,7 @@ type PostStore interface {
|
|||||||
PermanentDeleteByChannel(channelId string) *model.AppError
|
PermanentDeleteByChannel(channelId string) *model.AppError
|
||||||
GetPosts(channelId string, offset int, limit int, allowFromCache bool) StoreChannel
|
GetPosts(channelId string, offset int, limit int, allowFromCache bool) StoreChannel
|
||||||
GetFlaggedPosts(userId string, offset int, limit int) StoreChannel
|
GetFlaggedPosts(userId string, offset int, limit int) StoreChannel
|
||||||
GetFlaggedPostsForTeam(userId, teamId string, offset int, limit int) StoreChannel
|
GetFlaggedPostsForTeam(userId, teamId string, offset int, limit int) (*model.PostList, *model.AppError)
|
||||||
GetFlaggedPostsForChannel(userId, channelId string, offset int, limit int) StoreChannel
|
GetFlaggedPostsForChannel(userId, channelId string, offset int, limit int) StoreChannel
|
||||||
GetPostsBefore(channelId string, postId string, numPosts int, offset int) StoreChannel
|
GetPostsBefore(channelId string, postId string, numPosts int, offset int) StoreChannel
|
||||||
GetPostsAfter(channelId string, postId string, numPosts int, offset int) StoreChannel
|
GetPostsAfter(channelId string, postId string, numPosts int, offset int) StoreChannel
|
||||||
|
|||||||
@@ -78,52 +78,6 @@ func (_m *LayeredStoreDatabaseLayer) ChannelMemberHistory() store.ChannelMemberH
|
|||||||
return r0
|
return r0
|
||||||
}
|
}
|
||||||
|
|
||||||
// ChannelMembersToAdd provides a mock function with given fields: ctx, since, hints
|
|
||||||
func (_m *LayeredStoreDatabaseLayer) ChannelMembersToAdd(ctx context.Context, since int64, hints ...store.LayeredStoreHint) *store.LayeredStoreSupplierResult {
|
|
||||||
_va := make([]interface{}, len(hints))
|
|
||||||
for _i := range hints {
|
|
||||||
_va[_i] = hints[_i]
|
|
||||||
}
|
|
||||||
var _ca []interface{}
|
|
||||||
_ca = append(_ca, ctx, since)
|
|
||||||
_ca = append(_ca, _va...)
|
|
||||||
ret := _m.Called(_ca...)
|
|
||||||
|
|
||||||
var r0 *store.LayeredStoreSupplierResult
|
|
||||||
if rf, ok := ret.Get(0).(func(context.Context, int64, ...store.LayeredStoreHint) *store.LayeredStoreSupplierResult); ok {
|
|
||||||
r0 = rf(ctx, since, hints...)
|
|
||||||
} else {
|
|
||||||
if ret.Get(0) != nil {
|
|
||||||
r0 = ret.Get(0).(*store.LayeredStoreSupplierResult)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
return r0
|
|
||||||
}
|
|
||||||
|
|
||||||
// ChannelMembersToRemove provides a mock function with given fields: ctx, hints
|
|
||||||
func (_m *LayeredStoreDatabaseLayer) ChannelMembersToRemove(ctx context.Context, hints ...store.LayeredStoreHint) *store.LayeredStoreSupplierResult {
|
|
||||||
_va := make([]interface{}, len(hints))
|
|
||||||
for _i := range hints {
|
|
||||||
_va[_i] = hints[_i]
|
|
||||||
}
|
|
||||||
var _ca []interface{}
|
|
||||||
_ca = append(_ca, ctx)
|
|
||||||
_ca = append(_ca, _va...)
|
|
||||||
ret := _m.Called(_ca...)
|
|
||||||
|
|
||||||
var r0 *store.LayeredStoreSupplierResult
|
|
||||||
if rf, ok := ret.Get(0).(func(context.Context, ...store.LayeredStoreHint) *store.LayeredStoreSupplierResult); ok {
|
|
||||||
r0 = rf(ctx, hints...)
|
|
||||||
} else {
|
|
||||||
if ret.Get(0) != nil {
|
|
||||||
r0 = ret.Get(0).(*store.LayeredStoreSupplierResult)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
return r0
|
|
||||||
}
|
|
||||||
|
|
||||||
// Close provides a mock function with given fields:
|
// Close provides a mock function with given fields:
|
||||||
func (_m *LayeredStoreDatabaseLayer) Close() {
|
func (_m *LayeredStoreDatabaseLayer) Close() {
|
||||||
_m.Called()
|
_m.Called()
|
||||||
@@ -193,52 +147,6 @@ func (_m *LayeredStoreDatabaseLayer) Compliance() store.ComplianceStore {
|
|||||||
return r0
|
return r0
|
||||||
}
|
}
|
||||||
|
|
||||||
// CountGroupsByChannel provides a mock function with given fields: ctx, channelId, opts, hints
|
|
||||||
func (_m *LayeredStoreDatabaseLayer) CountGroupsByChannel(ctx context.Context, channelId string, opts model.GroupSearchOpts, hints ...store.LayeredStoreHint) *store.LayeredStoreSupplierResult {
|
|
||||||
_va := make([]interface{}, len(hints))
|
|
||||||
for _i := range hints {
|
|
||||||
_va[_i] = hints[_i]
|
|
||||||
}
|
|
||||||
var _ca []interface{}
|
|
||||||
_ca = append(_ca, ctx, channelId, opts)
|
|
||||||
_ca = append(_ca, _va...)
|
|
||||||
ret := _m.Called(_ca...)
|
|
||||||
|
|
||||||
var r0 *store.LayeredStoreSupplierResult
|
|
||||||
if rf, ok := ret.Get(0).(func(context.Context, string, model.GroupSearchOpts, ...store.LayeredStoreHint) *store.LayeredStoreSupplierResult); ok {
|
|
||||||
r0 = rf(ctx, channelId, opts, hints...)
|
|
||||||
} else {
|
|
||||||
if ret.Get(0) != nil {
|
|
||||||
r0 = ret.Get(0).(*store.LayeredStoreSupplierResult)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
return r0
|
|
||||||
}
|
|
||||||
|
|
||||||
// CountGroupsByTeam provides a mock function with given fields: ctx, teamId, opts, hints
|
|
||||||
func (_m *LayeredStoreDatabaseLayer) CountGroupsByTeam(ctx context.Context, teamId string, opts model.GroupSearchOpts, hints ...store.LayeredStoreHint) *store.LayeredStoreSupplierResult {
|
|
||||||
_va := make([]interface{}, len(hints))
|
|
||||||
for _i := range hints {
|
|
||||||
_va[_i] = hints[_i]
|
|
||||||
}
|
|
||||||
var _ca []interface{}
|
|
||||||
_ca = append(_ca, ctx, teamId, opts)
|
|
||||||
_ca = append(_ca, _va...)
|
|
||||||
ret := _m.Called(_ca...)
|
|
||||||
|
|
||||||
var r0 *store.LayeredStoreSupplierResult
|
|
||||||
if rf, ok := ret.Get(0).(func(context.Context, string, model.GroupSearchOpts, ...store.LayeredStoreHint) *store.LayeredStoreSupplierResult); ok {
|
|
||||||
r0 = rf(ctx, teamId, opts, hints...)
|
|
||||||
} else {
|
|
||||||
if ret.Get(0) != nil {
|
|
||||||
r0 = ret.Get(0).(*store.LayeredStoreSupplierResult)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
return r0
|
|
||||||
}
|
|
||||||
|
|
||||||
// DropAllTables provides a mock function with given fields:
|
// DropAllTables provides a mock function with given fields:
|
||||||
func (_m *LayeredStoreDatabaseLayer) DropAllTables() {
|
func (_m *LayeredStoreDatabaseLayer) DropAllTables() {
|
||||||
_m.Called()
|
_m.Called()
|
||||||
@@ -276,75 +184,6 @@ func (_m *LayeredStoreDatabaseLayer) FileInfo() store.FileInfoStore {
|
|||||||
return r0
|
return r0
|
||||||
}
|
}
|
||||||
|
|
||||||
// GetGroups provides a mock function with given fields: ctx, page, perPage, opts, hints
|
|
||||||
func (_m *LayeredStoreDatabaseLayer) GetGroups(ctx context.Context, page int, perPage int, opts model.GroupSearchOpts, hints ...store.LayeredStoreHint) *store.LayeredStoreSupplierResult {
|
|
||||||
_va := make([]interface{}, len(hints))
|
|
||||||
for _i := range hints {
|
|
||||||
_va[_i] = hints[_i]
|
|
||||||
}
|
|
||||||
var _ca []interface{}
|
|
||||||
_ca = append(_ca, ctx, page, perPage, opts)
|
|
||||||
_ca = append(_ca, _va...)
|
|
||||||
ret := _m.Called(_ca...)
|
|
||||||
|
|
||||||
var r0 *store.LayeredStoreSupplierResult
|
|
||||||
if rf, ok := ret.Get(0).(func(context.Context, int, int, model.GroupSearchOpts, ...store.LayeredStoreHint) *store.LayeredStoreSupplierResult); ok {
|
|
||||||
r0 = rf(ctx, page, perPage, opts, hints...)
|
|
||||||
} else {
|
|
||||||
if ret.Get(0) != nil {
|
|
||||||
r0 = ret.Get(0).(*store.LayeredStoreSupplierResult)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
return r0
|
|
||||||
}
|
|
||||||
|
|
||||||
// GetGroupsByChannel provides a mock function with given fields: ctx, channelId, opts, hints
|
|
||||||
func (_m *LayeredStoreDatabaseLayer) GetGroupsByChannel(ctx context.Context, channelId string, opts model.GroupSearchOpts, hints ...store.LayeredStoreHint) *store.LayeredStoreSupplierResult {
|
|
||||||
_va := make([]interface{}, len(hints))
|
|
||||||
for _i := range hints {
|
|
||||||
_va[_i] = hints[_i]
|
|
||||||
}
|
|
||||||
var _ca []interface{}
|
|
||||||
_ca = append(_ca, ctx, channelId, opts)
|
|
||||||
_ca = append(_ca, _va...)
|
|
||||||
ret := _m.Called(_ca...)
|
|
||||||
|
|
||||||
var r0 *store.LayeredStoreSupplierResult
|
|
||||||
if rf, ok := ret.Get(0).(func(context.Context, string, model.GroupSearchOpts, ...store.LayeredStoreHint) *store.LayeredStoreSupplierResult); ok {
|
|
||||||
r0 = rf(ctx, channelId, opts, hints...)
|
|
||||||
} else {
|
|
||||||
if ret.Get(0) != nil {
|
|
||||||
r0 = ret.Get(0).(*store.LayeredStoreSupplierResult)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
return r0
|
|
||||||
}
|
|
||||||
|
|
||||||
// GetGroupsByTeam provides a mock function with given fields: ctx, teamId, opts, hints
|
|
||||||
func (_m *LayeredStoreDatabaseLayer) GetGroupsByTeam(ctx context.Context, teamId string, opts model.GroupSearchOpts, hints ...store.LayeredStoreHint) *store.LayeredStoreSupplierResult {
|
|
||||||
_va := make([]interface{}, len(hints))
|
|
||||||
for _i := range hints {
|
|
||||||
_va[_i] = hints[_i]
|
|
||||||
}
|
|
||||||
var _ca []interface{}
|
|
||||||
_ca = append(_ca, ctx, teamId, opts)
|
|
||||||
_ca = append(_ca, _va...)
|
|
||||||
ret := _m.Called(_ca...)
|
|
||||||
|
|
||||||
var r0 *store.LayeredStoreSupplierResult
|
|
||||||
if rf, ok := ret.Get(0).(func(context.Context, string, model.GroupSearchOpts, ...store.LayeredStoreHint) *store.LayeredStoreSupplierResult); ok {
|
|
||||||
r0 = rf(ctx, teamId, opts, hints...)
|
|
||||||
} else {
|
|
||||||
if ret.Get(0) != nil {
|
|
||||||
r0 = ret.Get(0).(*store.LayeredStoreSupplierResult)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
return r0
|
|
||||||
}
|
|
||||||
|
|
||||||
// Group provides a mock function with given fields:
|
// Group provides a mock function with given fields:
|
||||||
func (_m *LayeredStoreDatabaseLayer) Group() store.GroupStore {
|
func (_m *LayeredStoreDatabaseLayer) Group() store.GroupStore {
|
||||||
ret := _m.Called()
|
ret := _m.Called()
|
||||||
@@ -361,374 +200,6 @@ func (_m *LayeredStoreDatabaseLayer) Group() store.GroupStore {
|
|||||||
return r0
|
return r0
|
||||||
}
|
}
|
||||||
|
|
||||||
// GroupCreate provides a mock function with given fields: ctx, group, hints
|
|
||||||
func (_m *LayeredStoreDatabaseLayer) GroupCreate(ctx context.Context, group *model.Group, hints ...store.LayeredStoreHint) *store.LayeredStoreSupplierResult {
|
|
||||||
_va := make([]interface{}, len(hints))
|
|
||||||
for _i := range hints {
|
|
||||||
_va[_i] = hints[_i]
|
|
||||||
}
|
|
||||||
var _ca []interface{}
|
|
||||||
_ca = append(_ca, ctx, group)
|
|
||||||
_ca = append(_ca, _va...)
|
|
||||||
ret := _m.Called(_ca...)
|
|
||||||
|
|
||||||
var r0 *store.LayeredStoreSupplierResult
|
|
||||||
if rf, ok := ret.Get(0).(func(context.Context, *model.Group, ...store.LayeredStoreHint) *store.LayeredStoreSupplierResult); ok {
|
|
||||||
r0 = rf(ctx, group, hints...)
|
|
||||||
} else {
|
|
||||||
if ret.Get(0) != nil {
|
|
||||||
r0 = ret.Get(0).(*store.LayeredStoreSupplierResult)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
return r0
|
|
||||||
}
|
|
||||||
|
|
||||||
// GroupCreateGroupSyncable provides a mock function with given fields: ctx, groupSyncable, hints
|
|
||||||
func (_m *LayeredStoreDatabaseLayer) GroupCreateGroupSyncable(ctx context.Context, groupSyncable *model.GroupSyncable, hints ...store.LayeredStoreHint) *store.LayeredStoreSupplierResult {
|
|
||||||
_va := make([]interface{}, len(hints))
|
|
||||||
for _i := range hints {
|
|
||||||
_va[_i] = hints[_i]
|
|
||||||
}
|
|
||||||
var _ca []interface{}
|
|
||||||
_ca = append(_ca, ctx, groupSyncable)
|
|
||||||
_ca = append(_ca, _va...)
|
|
||||||
ret := _m.Called(_ca...)
|
|
||||||
|
|
||||||
var r0 *store.LayeredStoreSupplierResult
|
|
||||||
if rf, ok := ret.Get(0).(func(context.Context, *model.GroupSyncable, ...store.LayeredStoreHint) *store.LayeredStoreSupplierResult); ok {
|
|
||||||
r0 = rf(ctx, groupSyncable, hints...)
|
|
||||||
} else {
|
|
||||||
if ret.Get(0) != nil {
|
|
||||||
r0 = ret.Get(0).(*store.LayeredStoreSupplierResult)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
return r0
|
|
||||||
}
|
|
||||||
|
|
||||||
// GroupCreateOrRestoreMember provides a mock function with given fields: ctx, groupID, userID, hints
|
|
||||||
func (_m *LayeredStoreDatabaseLayer) GroupCreateOrRestoreMember(ctx context.Context, groupID string, userID string, hints ...store.LayeredStoreHint) *store.LayeredStoreSupplierResult {
|
|
||||||
_va := make([]interface{}, len(hints))
|
|
||||||
for _i := range hints {
|
|
||||||
_va[_i] = hints[_i]
|
|
||||||
}
|
|
||||||
var _ca []interface{}
|
|
||||||
_ca = append(_ca, ctx, groupID, userID)
|
|
||||||
_ca = append(_ca, _va...)
|
|
||||||
ret := _m.Called(_ca...)
|
|
||||||
|
|
||||||
var r0 *store.LayeredStoreSupplierResult
|
|
||||||
if rf, ok := ret.Get(0).(func(context.Context, string, string, ...store.LayeredStoreHint) *store.LayeredStoreSupplierResult); ok {
|
|
||||||
r0 = rf(ctx, groupID, userID, hints...)
|
|
||||||
} else {
|
|
||||||
if ret.Get(0) != nil {
|
|
||||||
r0 = ret.Get(0).(*store.LayeredStoreSupplierResult)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
return r0
|
|
||||||
}
|
|
||||||
|
|
||||||
// GroupDelete provides a mock function with given fields: ctx, groupID, hints
|
|
||||||
func (_m *LayeredStoreDatabaseLayer) GroupDelete(ctx context.Context, groupID string, hints ...store.LayeredStoreHint) *store.LayeredStoreSupplierResult {
|
|
||||||
_va := make([]interface{}, len(hints))
|
|
||||||
for _i := range hints {
|
|
||||||
_va[_i] = hints[_i]
|
|
||||||
}
|
|
||||||
var _ca []interface{}
|
|
||||||
_ca = append(_ca, ctx, groupID)
|
|
||||||
_ca = append(_ca, _va...)
|
|
||||||
ret := _m.Called(_ca...)
|
|
||||||
|
|
||||||
var r0 *store.LayeredStoreSupplierResult
|
|
||||||
if rf, ok := ret.Get(0).(func(context.Context, string, ...store.LayeredStoreHint) *store.LayeredStoreSupplierResult); ok {
|
|
||||||
r0 = rf(ctx, groupID, hints...)
|
|
||||||
} else {
|
|
||||||
if ret.Get(0) != nil {
|
|
||||||
r0 = ret.Get(0).(*store.LayeredStoreSupplierResult)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
return r0
|
|
||||||
}
|
|
||||||
|
|
||||||
// GroupDeleteGroupSyncable provides a mock function with given fields: ctx, groupID, syncableID, syncableType, hints
|
|
||||||
func (_m *LayeredStoreDatabaseLayer) GroupDeleteGroupSyncable(ctx context.Context, groupID string, syncableID string, syncableType model.GroupSyncableType, hints ...store.LayeredStoreHint) *store.LayeredStoreSupplierResult {
|
|
||||||
_va := make([]interface{}, len(hints))
|
|
||||||
for _i := range hints {
|
|
||||||
_va[_i] = hints[_i]
|
|
||||||
}
|
|
||||||
var _ca []interface{}
|
|
||||||
_ca = append(_ca, ctx, groupID, syncableID, syncableType)
|
|
||||||
_ca = append(_ca, _va...)
|
|
||||||
ret := _m.Called(_ca...)
|
|
||||||
|
|
||||||
var r0 *store.LayeredStoreSupplierResult
|
|
||||||
if rf, ok := ret.Get(0).(func(context.Context, string, string, model.GroupSyncableType, ...store.LayeredStoreHint) *store.LayeredStoreSupplierResult); ok {
|
|
||||||
r0 = rf(ctx, groupID, syncableID, syncableType, hints...)
|
|
||||||
} else {
|
|
||||||
if ret.Get(0) != nil {
|
|
||||||
r0 = ret.Get(0).(*store.LayeredStoreSupplierResult)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
return r0
|
|
||||||
}
|
|
||||||
|
|
||||||
// GroupDeleteMember provides a mock function with given fields: ctx, groupID, userID, hints
|
|
||||||
func (_m *LayeredStoreDatabaseLayer) GroupDeleteMember(ctx context.Context, groupID string, userID string, hints ...store.LayeredStoreHint) *store.LayeredStoreSupplierResult {
|
|
||||||
_va := make([]interface{}, len(hints))
|
|
||||||
for _i := range hints {
|
|
||||||
_va[_i] = hints[_i]
|
|
||||||
}
|
|
||||||
var _ca []interface{}
|
|
||||||
_ca = append(_ca, ctx, groupID, userID)
|
|
||||||
_ca = append(_ca, _va...)
|
|
||||||
ret := _m.Called(_ca...)
|
|
||||||
|
|
||||||
var r0 *store.LayeredStoreSupplierResult
|
|
||||||
if rf, ok := ret.Get(0).(func(context.Context, string, string, ...store.LayeredStoreHint) *store.LayeredStoreSupplierResult); ok {
|
|
||||||
r0 = rf(ctx, groupID, userID, hints...)
|
|
||||||
} else {
|
|
||||||
if ret.Get(0) != nil {
|
|
||||||
r0 = ret.Get(0).(*store.LayeredStoreSupplierResult)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
return r0
|
|
||||||
}
|
|
||||||
|
|
||||||
// GroupGet provides a mock function with given fields: ctx, groupID, hints
|
|
||||||
func (_m *LayeredStoreDatabaseLayer) GroupGet(ctx context.Context, groupID string, hints ...store.LayeredStoreHint) *store.LayeredStoreSupplierResult {
|
|
||||||
_va := make([]interface{}, len(hints))
|
|
||||||
for _i := range hints {
|
|
||||||
_va[_i] = hints[_i]
|
|
||||||
}
|
|
||||||
var _ca []interface{}
|
|
||||||
_ca = append(_ca, ctx, groupID)
|
|
||||||
_ca = append(_ca, _va...)
|
|
||||||
ret := _m.Called(_ca...)
|
|
||||||
|
|
||||||
var r0 *store.LayeredStoreSupplierResult
|
|
||||||
if rf, ok := ret.Get(0).(func(context.Context, string, ...store.LayeredStoreHint) *store.LayeredStoreSupplierResult); ok {
|
|
||||||
r0 = rf(ctx, groupID, hints...)
|
|
||||||
} else {
|
|
||||||
if ret.Get(0) != nil {
|
|
||||||
r0 = ret.Get(0).(*store.LayeredStoreSupplierResult)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
return r0
|
|
||||||
}
|
|
||||||
|
|
||||||
// GroupGetAllBySource provides a mock function with given fields: ctx, groupSource, hints
|
|
||||||
func (_m *LayeredStoreDatabaseLayer) GroupGetAllBySource(ctx context.Context, groupSource model.GroupSource, hints ...store.LayeredStoreHint) *store.LayeredStoreSupplierResult {
|
|
||||||
_va := make([]interface{}, len(hints))
|
|
||||||
for _i := range hints {
|
|
||||||
_va[_i] = hints[_i]
|
|
||||||
}
|
|
||||||
var _ca []interface{}
|
|
||||||
_ca = append(_ca, ctx, groupSource)
|
|
||||||
_ca = append(_ca, _va...)
|
|
||||||
ret := _m.Called(_ca...)
|
|
||||||
|
|
||||||
var r0 *store.LayeredStoreSupplierResult
|
|
||||||
if rf, ok := ret.Get(0).(func(context.Context, model.GroupSource, ...store.LayeredStoreHint) *store.LayeredStoreSupplierResult); ok {
|
|
||||||
r0 = rf(ctx, groupSource, hints...)
|
|
||||||
} else {
|
|
||||||
if ret.Get(0) != nil {
|
|
||||||
r0 = ret.Get(0).(*store.LayeredStoreSupplierResult)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
return r0
|
|
||||||
}
|
|
||||||
|
|
||||||
// GroupGetAllGroupSyncablesByGroup provides a mock function with given fields: ctx, groupID, syncableType, hints
|
|
||||||
func (_m *LayeredStoreDatabaseLayer) GroupGetAllGroupSyncablesByGroup(ctx context.Context, groupID string, syncableType model.GroupSyncableType, hints ...store.LayeredStoreHint) *store.LayeredStoreSupplierResult {
|
|
||||||
_va := make([]interface{}, len(hints))
|
|
||||||
for _i := range hints {
|
|
||||||
_va[_i] = hints[_i]
|
|
||||||
}
|
|
||||||
var _ca []interface{}
|
|
||||||
_ca = append(_ca, ctx, groupID, syncableType)
|
|
||||||
_ca = append(_ca, _va...)
|
|
||||||
ret := _m.Called(_ca...)
|
|
||||||
|
|
||||||
var r0 *store.LayeredStoreSupplierResult
|
|
||||||
if rf, ok := ret.Get(0).(func(context.Context, string, model.GroupSyncableType, ...store.LayeredStoreHint) *store.LayeredStoreSupplierResult); ok {
|
|
||||||
r0 = rf(ctx, groupID, syncableType, hints...)
|
|
||||||
} else {
|
|
||||||
if ret.Get(0) != nil {
|
|
||||||
r0 = ret.Get(0).(*store.LayeredStoreSupplierResult)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
return r0
|
|
||||||
}
|
|
||||||
|
|
||||||
// GroupGetByRemoteID provides a mock function with given fields: ctx, remoteID, groupSource, hints
|
|
||||||
func (_m *LayeredStoreDatabaseLayer) GroupGetByRemoteID(ctx context.Context, remoteID string, groupSource model.GroupSource, hints ...store.LayeredStoreHint) *store.LayeredStoreSupplierResult {
|
|
||||||
_va := make([]interface{}, len(hints))
|
|
||||||
for _i := range hints {
|
|
||||||
_va[_i] = hints[_i]
|
|
||||||
}
|
|
||||||
var _ca []interface{}
|
|
||||||
_ca = append(_ca, ctx, remoteID, groupSource)
|
|
||||||
_ca = append(_ca, _va...)
|
|
||||||
ret := _m.Called(_ca...)
|
|
||||||
|
|
||||||
var r0 *store.LayeredStoreSupplierResult
|
|
||||||
if rf, ok := ret.Get(0).(func(context.Context, string, model.GroupSource, ...store.LayeredStoreHint) *store.LayeredStoreSupplierResult); ok {
|
|
||||||
r0 = rf(ctx, remoteID, groupSource, hints...)
|
|
||||||
} else {
|
|
||||||
if ret.Get(0) != nil {
|
|
||||||
r0 = ret.Get(0).(*store.LayeredStoreSupplierResult)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
return r0
|
|
||||||
}
|
|
||||||
|
|
||||||
// GroupGetGroupSyncable provides a mock function with given fields: ctx, groupID, syncableID, syncableType, hints
|
|
||||||
func (_m *LayeredStoreDatabaseLayer) GroupGetGroupSyncable(ctx context.Context, groupID string, syncableID string, syncableType model.GroupSyncableType, hints ...store.LayeredStoreHint) *store.LayeredStoreSupplierResult {
|
|
||||||
_va := make([]interface{}, len(hints))
|
|
||||||
for _i := range hints {
|
|
||||||
_va[_i] = hints[_i]
|
|
||||||
}
|
|
||||||
var _ca []interface{}
|
|
||||||
_ca = append(_ca, ctx, groupID, syncableID, syncableType)
|
|
||||||
_ca = append(_ca, _va...)
|
|
||||||
ret := _m.Called(_ca...)
|
|
||||||
|
|
||||||
var r0 *store.LayeredStoreSupplierResult
|
|
||||||
if rf, ok := ret.Get(0).(func(context.Context, string, string, model.GroupSyncableType, ...store.LayeredStoreHint) *store.LayeredStoreSupplierResult); ok {
|
|
||||||
r0 = rf(ctx, groupID, syncableID, syncableType, hints...)
|
|
||||||
} else {
|
|
||||||
if ret.Get(0) != nil {
|
|
||||||
r0 = ret.Get(0).(*store.LayeredStoreSupplierResult)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
return r0
|
|
||||||
}
|
|
||||||
|
|
||||||
// GroupGetMemberCount provides a mock function with given fields: ctx, groupID, hints
|
|
||||||
func (_m *LayeredStoreDatabaseLayer) GroupGetMemberCount(ctx context.Context, groupID string, hints ...store.LayeredStoreHint) *store.LayeredStoreSupplierResult {
|
|
||||||
_va := make([]interface{}, len(hints))
|
|
||||||
for _i := range hints {
|
|
||||||
_va[_i] = hints[_i]
|
|
||||||
}
|
|
||||||
var _ca []interface{}
|
|
||||||
_ca = append(_ca, ctx, groupID)
|
|
||||||
_ca = append(_ca, _va...)
|
|
||||||
ret := _m.Called(_ca...)
|
|
||||||
|
|
||||||
var r0 *store.LayeredStoreSupplierResult
|
|
||||||
if rf, ok := ret.Get(0).(func(context.Context, string, ...store.LayeredStoreHint) *store.LayeredStoreSupplierResult); ok {
|
|
||||||
r0 = rf(ctx, groupID, hints...)
|
|
||||||
} else {
|
|
||||||
if ret.Get(0) != nil {
|
|
||||||
r0 = ret.Get(0).(*store.LayeredStoreSupplierResult)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
return r0
|
|
||||||
}
|
|
||||||
|
|
||||||
// GroupGetMemberUsers provides a mock function with given fields: ctx, groupID, hints
|
|
||||||
func (_m *LayeredStoreDatabaseLayer) GroupGetMemberUsers(ctx context.Context, groupID string, hints ...store.LayeredStoreHint) *store.LayeredStoreSupplierResult {
|
|
||||||
_va := make([]interface{}, len(hints))
|
|
||||||
for _i := range hints {
|
|
||||||
_va[_i] = hints[_i]
|
|
||||||
}
|
|
||||||
var _ca []interface{}
|
|
||||||
_ca = append(_ca, ctx, groupID)
|
|
||||||
_ca = append(_ca, _va...)
|
|
||||||
ret := _m.Called(_ca...)
|
|
||||||
|
|
||||||
var r0 *store.LayeredStoreSupplierResult
|
|
||||||
if rf, ok := ret.Get(0).(func(context.Context, string, ...store.LayeredStoreHint) *store.LayeredStoreSupplierResult); ok {
|
|
||||||
r0 = rf(ctx, groupID, hints...)
|
|
||||||
} else {
|
|
||||||
if ret.Get(0) != nil {
|
|
||||||
r0 = ret.Get(0).(*store.LayeredStoreSupplierResult)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
return r0
|
|
||||||
}
|
|
||||||
|
|
||||||
// GroupGetMemberUsersPage provides a mock function with given fields: ctx, groupID, offset, limit, hints
|
|
||||||
func (_m *LayeredStoreDatabaseLayer) GroupGetMemberUsersPage(ctx context.Context, groupID string, offset int, limit int, hints ...store.LayeredStoreHint) *store.LayeredStoreSupplierResult {
|
|
||||||
_va := make([]interface{}, len(hints))
|
|
||||||
for _i := range hints {
|
|
||||||
_va[_i] = hints[_i]
|
|
||||||
}
|
|
||||||
var _ca []interface{}
|
|
||||||
_ca = append(_ca, ctx, groupID, offset, limit)
|
|
||||||
_ca = append(_ca, _va...)
|
|
||||||
ret := _m.Called(_ca...)
|
|
||||||
|
|
||||||
var r0 *store.LayeredStoreSupplierResult
|
|
||||||
if rf, ok := ret.Get(0).(func(context.Context, string, int, int, ...store.LayeredStoreHint) *store.LayeredStoreSupplierResult); ok {
|
|
||||||
r0 = rf(ctx, groupID, offset, limit, hints...)
|
|
||||||
} else {
|
|
||||||
if ret.Get(0) != nil {
|
|
||||||
r0 = ret.Get(0).(*store.LayeredStoreSupplierResult)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
return r0
|
|
||||||
}
|
|
||||||
|
|
||||||
// GroupUpdate provides a mock function with given fields: ctx, group, hints
|
|
||||||
func (_m *LayeredStoreDatabaseLayer) GroupUpdate(ctx context.Context, group *model.Group, hints ...store.LayeredStoreHint) *store.LayeredStoreSupplierResult {
|
|
||||||
_va := make([]interface{}, len(hints))
|
|
||||||
for _i := range hints {
|
|
||||||
_va[_i] = hints[_i]
|
|
||||||
}
|
|
||||||
var _ca []interface{}
|
|
||||||
_ca = append(_ca, ctx, group)
|
|
||||||
_ca = append(_ca, _va...)
|
|
||||||
ret := _m.Called(_ca...)
|
|
||||||
|
|
||||||
var r0 *store.LayeredStoreSupplierResult
|
|
||||||
if rf, ok := ret.Get(0).(func(context.Context, *model.Group, ...store.LayeredStoreHint) *store.LayeredStoreSupplierResult); ok {
|
|
||||||
r0 = rf(ctx, group, hints...)
|
|
||||||
} else {
|
|
||||||
if ret.Get(0) != nil {
|
|
||||||
r0 = ret.Get(0).(*store.LayeredStoreSupplierResult)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
return r0
|
|
||||||
}
|
|
||||||
|
|
||||||
// GroupUpdateGroupSyncable provides a mock function with given fields: ctx, groupSyncable, hints
|
|
||||||
func (_m *LayeredStoreDatabaseLayer) GroupUpdateGroupSyncable(ctx context.Context, groupSyncable *model.GroupSyncable, hints ...store.LayeredStoreHint) *store.LayeredStoreSupplierResult {
|
|
||||||
_va := make([]interface{}, len(hints))
|
|
||||||
for _i := range hints {
|
|
||||||
_va[_i] = hints[_i]
|
|
||||||
}
|
|
||||||
var _ca []interface{}
|
|
||||||
_ca = append(_ca, ctx, groupSyncable)
|
|
||||||
_ca = append(_ca, _va...)
|
|
||||||
ret := _m.Called(_ca...)
|
|
||||||
|
|
||||||
var r0 *store.LayeredStoreSupplierResult
|
|
||||||
if rf, ok := ret.Get(0).(func(context.Context, *model.GroupSyncable, ...store.LayeredStoreHint) *store.LayeredStoreSupplierResult); ok {
|
|
||||||
r0 = rf(ctx, groupSyncable, hints...)
|
|
||||||
} else {
|
|
||||||
if ret.Get(0) != nil {
|
|
||||||
r0 = ret.Get(0).(*store.LayeredStoreSupplierResult)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
return r0
|
|
||||||
}
|
|
||||||
|
|
||||||
// Job provides a mock function with given fields:
|
// Job provides a mock function with given fields:
|
||||||
func (_m *LayeredStoreDatabaseLayer) Job() store.JobStore {
|
func (_m *LayeredStoreDatabaseLayer) Job() store.JobStore {
|
||||||
ret := _m.Called()
|
ret := _m.Called()
|
||||||
@@ -1518,52 +989,6 @@ func (_m *LayeredStoreDatabaseLayer) Team() store.TeamStore {
|
|||||||
return r0
|
return r0
|
||||||
}
|
}
|
||||||
|
|
||||||
// TeamMembersToAdd provides a mock function with given fields: ctx, since, hints
|
|
||||||
func (_m *LayeredStoreDatabaseLayer) TeamMembersToAdd(ctx context.Context, since int64, hints ...store.LayeredStoreHint) *store.LayeredStoreSupplierResult {
|
|
||||||
_va := make([]interface{}, len(hints))
|
|
||||||
for _i := range hints {
|
|
||||||
_va[_i] = hints[_i]
|
|
||||||
}
|
|
||||||
var _ca []interface{}
|
|
||||||
_ca = append(_ca, ctx, since)
|
|
||||||
_ca = append(_ca, _va...)
|
|
||||||
ret := _m.Called(_ca...)
|
|
||||||
|
|
||||||
var r0 *store.LayeredStoreSupplierResult
|
|
||||||
if rf, ok := ret.Get(0).(func(context.Context, int64, ...store.LayeredStoreHint) *store.LayeredStoreSupplierResult); ok {
|
|
||||||
r0 = rf(ctx, since, hints...)
|
|
||||||
} else {
|
|
||||||
if ret.Get(0) != nil {
|
|
||||||
r0 = ret.Get(0).(*store.LayeredStoreSupplierResult)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
return r0
|
|
||||||
}
|
|
||||||
|
|
||||||
// TeamMembersToRemove provides a mock function with given fields: ctx, hints
|
|
||||||
func (_m *LayeredStoreDatabaseLayer) TeamMembersToRemove(ctx context.Context, hints ...store.LayeredStoreHint) *store.LayeredStoreSupplierResult {
|
|
||||||
_va := make([]interface{}, len(hints))
|
|
||||||
for _i := range hints {
|
|
||||||
_va[_i] = hints[_i]
|
|
||||||
}
|
|
||||||
var _ca []interface{}
|
|
||||||
_ca = append(_ca, ctx)
|
|
||||||
_ca = append(_ca, _va...)
|
|
||||||
ret := _m.Called(_ca...)
|
|
||||||
|
|
||||||
var r0 *store.LayeredStoreSupplierResult
|
|
||||||
if rf, ok := ret.Get(0).(func(context.Context, ...store.LayeredStoreHint) *store.LayeredStoreSupplierResult); ok {
|
|
||||||
r0 = rf(ctx, hints...)
|
|
||||||
} else {
|
|
||||||
if ret.Get(0) != nil {
|
|
||||||
r0 = ret.Get(0).(*store.LayeredStoreSupplierResult)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
return r0
|
|
||||||
}
|
|
||||||
|
|
||||||
// TermsOfService provides a mock function with given fields:
|
// TermsOfService provides a mock function with given fields:
|
||||||
func (_m *LayeredStoreDatabaseLayer) TermsOfService() store.TermsOfServiceStore {
|
func (_m *LayeredStoreDatabaseLayer) TermsOfService() store.TermsOfServiceStore {
|
||||||
ret := _m.Called()
|
ret := _m.Called()
|
||||||
|
|||||||
@@ -14,535 +14,6 @@ type LayeredStoreSupplier struct {
|
|||||||
mock.Mock
|
mock.Mock
|
||||||
}
|
}
|
||||||
|
|
||||||
// ChannelMembersToAdd provides a mock function with given fields: ctx, since, hints
|
|
||||||
func (_m *LayeredStoreSupplier) ChannelMembersToAdd(ctx context.Context, since int64, hints ...store.LayeredStoreHint) *store.LayeredStoreSupplierResult {
|
|
||||||
_va := make([]interface{}, len(hints))
|
|
||||||
for _i := range hints {
|
|
||||||
_va[_i] = hints[_i]
|
|
||||||
}
|
|
||||||
var _ca []interface{}
|
|
||||||
_ca = append(_ca, ctx, since)
|
|
||||||
_ca = append(_ca, _va...)
|
|
||||||
ret := _m.Called(_ca...)
|
|
||||||
|
|
||||||
var r0 *store.LayeredStoreSupplierResult
|
|
||||||
if rf, ok := ret.Get(0).(func(context.Context, int64, ...store.LayeredStoreHint) *store.LayeredStoreSupplierResult); ok {
|
|
||||||
r0 = rf(ctx, since, hints...)
|
|
||||||
} else {
|
|
||||||
if ret.Get(0) != nil {
|
|
||||||
r0 = ret.Get(0).(*store.LayeredStoreSupplierResult)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
return r0
|
|
||||||
}
|
|
||||||
|
|
||||||
// ChannelMembersToRemove provides a mock function with given fields: ctx, hints
|
|
||||||
func (_m *LayeredStoreSupplier) ChannelMembersToRemove(ctx context.Context, hints ...store.LayeredStoreHint) *store.LayeredStoreSupplierResult {
|
|
||||||
_va := make([]interface{}, len(hints))
|
|
||||||
for _i := range hints {
|
|
||||||
_va[_i] = hints[_i]
|
|
||||||
}
|
|
||||||
var _ca []interface{}
|
|
||||||
_ca = append(_ca, ctx)
|
|
||||||
_ca = append(_ca, _va...)
|
|
||||||
ret := _m.Called(_ca...)
|
|
||||||
|
|
||||||
var r0 *store.LayeredStoreSupplierResult
|
|
||||||
if rf, ok := ret.Get(0).(func(context.Context, ...store.LayeredStoreHint) *store.LayeredStoreSupplierResult); ok {
|
|
||||||
r0 = rf(ctx, hints...)
|
|
||||||
} else {
|
|
||||||
if ret.Get(0) != nil {
|
|
||||||
r0 = ret.Get(0).(*store.LayeredStoreSupplierResult)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
return r0
|
|
||||||
}
|
|
||||||
|
|
||||||
// CountGroupsByChannel provides a mock function with given fields: ctx, channelId, opts, hints
|
|
||||||
func (_m *LayeredStoreSupplier) CountGroupsByChannel(ctx context.Context, channelId string, opts model.GroupSearchOpts, hints ...store.LayeredStoreHint) *store.LayeredStoreSupplierResult {
|
|
||||||
_va := make([]interface{}, len(hints))
|
|
||||||
for _i := range hints {
|
|
||||||
_va[_i] = hints[_i]
|
|
||||||
}
|
|
||||||
var _ca []interface{}
|
|
||||||
_ca = append(_ca, ctx, channelId, opts)
|
|
||||||
_ca = append(_ca, _va...)
|
|
||||||
ret := _m.Called(_ca...)
|
|
||||||
|
|
||||||
var r0 *store.LayeredStoreSupplierResult
|
|
||||||
if rf, ok := ret.Get(0).(func(context.Context, string, model.GroupSearchOpts, ...store.LayeredStoreHint) *store.LayeredStoreSupplierResult); ok {
|
|
||||||
r0 = rf(ctx, channelId, opts, hints...)
|
|
||||||
} else {
|
|
||||||
if ret.Get(0) != nil {
|
|
||||||
r0 = ret.Get(0).(*store.LayeredStoreSupplierResult)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
return r0
|
|
||||||
}
|
|
||||||
|
|
||||||
// CountGroupsByTeam provides a mock function with given fields: ctx, teamId, opts, hints
|
|
||||||
func (_m *LayeredStoreSupplier) CountGroupsByTeam(ctx context.Context, teamId string, opts model.GroupSearchOpts, hints ...store.LayeredStoreHint) *store.LayeredStoreSupplierResult {
|
|
||||||
_va := make([]interface{}, len(hints))
|
|
||||||
for _i := range hints {
|
|
||||||
_va[_i] = hints[_i]
|
|
||||||
}
|
|
||||||
var _ca []interface{}
|
|
||||||
_ca = append(_ca, ctx, teamId, opts)
|
|
||||||
_ca = append(_ca, _va...)
|
|
||||||
ret := _m.Called(_ca...)
|
|
||||||
|
|
||||||
var r0 *store.LayeredStoreSupplierResult
|
|
||||||
if rf, ok := ret.Get(0).(func(context.Context, string, model.GroupSearchOpts, ...store.LayeredStoreHint) *store.LayeredStoreSupplierResult); ok {
|
|
||||||
r0 = rf(ctx, teamId, opts, hints...)
|
|
||||||
} else {
|
|
||||||
if ret.Get(0) != nil {
|
|
||||||
r0 = ret.Get(0).(*store.LayeredStoreSupplierResult)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
return r0
|
|
||||||
}
|
|
||||||
|
|
||||||
// GetGroups provides a mock function with given fields: ctx, page, perPage, opts, hints
|
|
||||||
func (_m *LayeredStoreSupplier) GetGroups(ctx context.Context, page int, perPage int, opts model.GroupSearchOpts, hints ...store.LayeredStoreHint) *store.LayeredStoreSupplierResult {
|
|
||||||
_va := make([]interface{}, len(hints))
|
|
||||||
for _i := range hints {
|
|
||||||
_va[_i] = hints[_i]
|
|
||||||
}
|
|
||||||
var _ca []interface{}
|
|
||||||
_ca = append(_ca, ctx, page, perPage, opts)
|
|
||||||
_ca = append(_ca, _va...)
|
|
||||||
ret := _m.Called(_ca...)
|
|
||||||
|
|
||||||
var r0 *store.LayeredStoreSupplierResult
|
|
||||||
if rf, ok := ret.Get(0).(func(context.Context, int, int, model.GroupSearchOpts, ...store.LayeredStoreHint) *store.LayeredStoreSupplierResult); ok {
|
|
||||||
r0 = rf(ctx, page, perPage, opts, hints...)
|
|
||||||
} else {
|
|
||||||
if ret.Get(0) != nil {
|
|
||||||
r0 = ret.Get(0).(*store.LayeredStoreSupplierResult)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
return r0
|
|
||||||
}
|
|
||||||
|
|
||||||
// GetGroupsByChannel provides a mock function with given fields: ctx, channelId, opts, hints
|
|
||||||
func (_m *LayeredStoreSupplier) GetGroupsByChannel(ctx context.Context, channelId string, opts model.GroupSearchOpts, hints ...store.LayeredStoreHint) *store.LayeredStoreSupplierResult {
|
|
||||||
_va := make([]interface{}, len(hints))
|
|
||||||
for _i := range hints {
|
|
||||||
_va[_i] = hints[_i]
|
|
||||||
}
|
|
||||||
var _ca []interface{}
|
|
||||||
_ca = append(_ca, ctx, channelId, opts)
|
|
||||||
_ca = append(_ca, _va...)
|
|
||||||
ret := _m.Called(_ca...)
|
|
||||||
|
|
||||||
var r0 *store.LayeredStoreSupplierResult
|
|
||||||
if rf, ok := ret.Get(0).(func(context.Context, string, model.GroupSearchOpts, ...store.LayeredStoreHint) *store.LayeredStoreSupplierResult); ok {
|
|
||||||
r0 = rf(ctx, channelId, opts, hints...)
|
|
||||||
} else {
|
|
||||||
if ret.Get(0) != nil {
|
|
||||||
r0 = ret.Get(0).(*store.LayeredStoreSupplierResult)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
return r0
|
|
||||||
}
|
|
||||||
|
|
||||||
// GetGroupsByTeam provides a mock function with given fields: ctx, teamId, opts, hints
|
|
||||||
func (_m *LayeredStoreSupplier) GetGroupsByTeam(ctx context.Context, teamId string, opts model.GroupSearchOpts, hints ...store.LayeredStoreHint) *store.LayeredStoreSupplierResult {
|
|
||||||
_va := make([]interface{}, len(hints))
|
|
||||||
for _i := range hints {
|
|
||||||
_va[_i] = hints[_i]
|
|
||||||
}
|
|
||||||
var _ca []interface{}
|
|
||||||
_ca = append(_ca, ctx, teamId, opts)
|
|
||||||
_ca = append(_ca, _va...)
|
|
||||||
ret := _m.Called(_ca...)
|
|
||||||
|
|
||||||
var r0 *store.LayeredStoreSupplierResult
|
|
||||||
if rf, ok := ret.Get(0).(func(context.Context, string, model.GroupSearchOpts, ...store.LayeredStoreHint) *store.LayeredStoreSupplierResult); ok {
|
|
||||||
r0 = rf(ctx, teamId, opts, hints...)
|
|
||||||
} else {
|
|
||||||
if ret.Get(0) != nil {
|
|
||||||
r0 = ret.Get(0).(*store.LayeredStoreSupplierResult)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
return r0
|
|
||||||
}
|
|
||||||
|
|
||||||
// GroupCreate provides a mock function with given fields: ctx, group, hints
|
|
||||||
func (_m *LayeredStoreSupplier) GroupCreate(ctx context.Context, group *model.Group, hints ...store.LayeredStoreHint) *store.LayeredStoreSupplierResult {
|
|
||||||
_va := make([]interface{}, len(hints))
|
|
||||||
for _i := range hints {
|
|
||||||
_va[_i] = hints[_i]
|
|
||||||
}
|
|
||||||
var _ca []interface{}
|
|
||||||
_ca = append(_ca, ctx, group)
|
|
||||||
_ca = append(_ca, _va...)
|
|
||||||
ret := _m.Called(_ca...)
|
|
||||||
|
|
||||||
var r0 *store.LayeredStoreSupplierResult
|
|
||||||
if rf, ok := ret.Get(0).(func(context.Context, *model.Group, ...store.LayeredStoreHint) *store.LayeredStoreSupplierResult); ok {
|
|
||||||
r0 = rf(ctx, group, hints...)
|
|
||||||
} else {
|
|
||||||
if ret.Get(0) != nil {
|
|
||||||
r0 = ret.Get(0).(*store.LayeredStoreSupplierResult)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
return r0
|
|
||||||
}
|
|
||||||
|
|
||||||
// GroupCreateGroupSyncable provides a mock function with given fields: ctx, groupSyncable, hints
|
|
||||||
func (_m *LayeredStoreSupplier) GroupCreateGroupSyncable(ctx context.Context, groupSyncable *model.GroupSyncable, hints ...store.LayeredStoreHint) *store.LayeredStoreSupplierResult {
|
|
||||||
_va := make([]interface{}, len(hints))
|
|
||||||
for _i := range hints {
|
|
||||||
_va[_i] = hints[_i]
|
|
||||||
}
|
|
||||||
var _ca []interface{}
|
|
||||||
_ca = append(_ca, ctx, groupSyncable)
|
|
||||||
_ca = append(_ca, _va...)
|
|
||||||
ret := _m.Called(_ca...)
|
|
||||||
|
|
||||||
var r0 *store.LayeredStoreSupplierResult
|
|
||||||
if rf, ok := ret.Get(0).(func(context.Context, *model.GroupSyncable, ...store.LayeredStoreHint) *store.LayeredStoreSupplierResult); ok {
|
|
||||||
r0 = rf(ctx, groupSyncable, hints...)
|
|
||||||
} else {
|
|
||||||
if ret.Get(0) != nil {
|
|
||||||
r0 = ret.Get(0).(*store.LayeredStoreSupplierResult)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
return r0
|
|
||||||
}
|
|
||||||
|
|
||||||
// GroupCreateOrRestoreMember provides a mock function with given fields: ctx, groupID, userID, hints
|
|
||||||
func (_m *LayeredStoreSupplier) GroupCreateOrRestoreMember(ctx context.Context, groupID string, userID string, hints ...store.LayeredStoreHint) *store.LayeredStoreSupplierResult {
|
|
||||||
_va := make([]interface{}, len(hints))
|
|
||||||
for _i := range hints {
|
|
||||||
_va[_i] = hints[_i]
|
|
||||||
}
|
|
||||||
var _ca []interface{}
|
|
||||||
_ca = append(_ca, ctx, groupID, userID)
|
|
||||||
_ca = append(_ca, _va...)
|
|
||||||
ret := _m.Called(_ca...)
|
|
||||||
|
|
||||||
var r0 *store.LayeredStoreSupplierResult
|
|
||||||
if rf, ok := ret.Get(0).(func(context.Context, string, string, ...store.LayeredStoreHint) *store.LayeredStoreSupplierResult); ok {
|
|
||||||
r0 = rf(ctx, groupID, userID, hints...)
|
|
||||||
} else {
|
|
||||||
if ret.Get(0) != nil {
|
|
||||||
r0 = ret.Get(0).(*store.LayeredStoreSupplierResult)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
return r0
|
|
||||||
}
|
|
||||||
|
|
||||||
// GroupDelete provides a mock function with given fields: ctx, groupID, hints
|
|
||||||
func (_m *LayeredStoreSupplier) GroupDelete(ctx context.Context, groupID string, hints ...store.LayeredStoreHint) *store.LayeredStoreSupplierResult {
|
|
||||||
_va := make([]interface{}, len(hints))
|
|
||||||
for _i := range hints {
|
|
||||||
_va[_i] = hints[_i]
|
|
||||||
}
|
|
||||||
var _ca []interface{}
|
|
||||||
_ca = append(_ca, ctx, groupID)
|
|
||||||
_ca = append(_ca, _va...)
|
|
||||||
ret := _m.Called(_ca...)
|
|
||||||
|
|
||||||
var r0 *store.LayeredStoreSupplierResult
|
|
||||||
if rf, ok := ret.Get(0).(func(context.Context, string, ...store.LayeredStoreHint) *store.LayeredStoreSupplierResult); ok {
|
|
||||||
r0 = rf(ctx, groupID, hints...)
|
|
||||||
} else {
|
|
||||||
if ret.Get(0) != nil {
|
|
||||||
r0 = ret.Get(0).(*store.LayeredStoreSupplierResult)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
return r0
|
|
||||||
}
|
|
||||||
|
|
||||||
// GroupDeleteGroupSyncable provides a mock function with given fields: ctx, groupID, syncableID, syncableType, hints
|
|
||||||
func (_m *LayeredStoreSupplier) GroupDeleteGroupSyncable(ctx context.Context, groupID string, syncableID string, syncableType model.GroupSyncableType, hints ...store.LayeredStoreHint) *store.LayeredStoreSupplierResult {
|
|
||||||
_va := make([]interface{}, len(hints))
|
|
||||||
for _i := range hints {
|
|
||||||
_va[_i] = hints[_i]
|
|
||||||
}
|
|
||||||
var _ca []interface{}
|
|
||||||
_ca = append(_ca, ctx, groupID, syncableID, syncableType)
|
|
||||||
_ca = append(_ca, _va...)
|
|
||||||
ret := _m.Called(_ca...)
|
|
||||||
|
|
||||||
var r0 *store.LayeredStoreSupplierResult
|
|
||||||
if rf, ok := ret.Get(0).(func(context.Context, string, string, model.GroupSyncableType, ...store.LayeredStoreHint) *store.LayeredStoreSupplierResult); ok {
|
|
||||||
r0 = rf(ctx, groupID, syncableID, syncableType, hints...)
|
|
||||||
} else {
|
|
||||||
if ret.Get(0) != nil {
|
|
||||||
r0 = ret.Get(0).(*store.LayeredStoreSupplierResult)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
return r0
|
|
||||||
}
|
|
||||||
|
|
||||||
// GroupDeleteMember provides a mock function with given fields: ctx, groupID, userID, hints
|
|
||||||
func (_m *LayeredStoreSupplier) GroupDeleteMember(ctx context.Context, groupID string, userID string, hints ...store.LayeredStoreHint) *store.LayeredStoreSupplierResult {
|
|
||||||
_va := make([]interface{}, len(hints))
|
|
||||||
for _i := range hints {
|
|
||||||
_va[_i] = hints[_i]
|
|
||||||
}
|
|
||||||
var _ca []interface{}
|
|
||||||
_ca = append(_ca, ctx, groupID, userID)
|
|
||||||
_ca = append(_ca, _va...)
|
|
||||||
ret := _m.Called(_ca...)
|
|
||||||
|
|
||||||
var r0 *store.LayeredStoreSupplierResult
|
|
||||||
if rf, ok := ret.Get(0).(func(context.Context, string, string, ...store.LayeredStoreHint) *store.LayeredStoreSupplierResult); ok {
|
|
||||||
r0 = rf(ctx, groupID, userID, hints...)
|
|
||||||
} else {
|
|
||||||
if ret.Get(0) != nil {
|
|
||||||
r0 = ret.Get(0).(*store.LayeredStoreSupplierResult)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
return r0
|
|
||||||
}
|
|
||||||
|
|
||||||
// GroupGet provides a mock function with given fields: ctx, groupID, hints
|
|
||||||
func (_m *LayeredStoreSupplier) GroupGet(ctx context.Context, groupID string, hints ...store.LayeredStoreHint) *store.LayeredStoreSupplierResult {
|
|
||||||
_va := make([]interface{}, len(hints))
|
|
||||||
for _i := range hints {
|
|
||||||
_va[_i] = hints[_i]
|
|
||||||
}
|
|
||||||
var _ca []interface{}
|
|
||||||
_ca = append(_ca, ctx, groupID)
|
|
||||||
_ca = append(_ca, _va...)
|
|
||||||
ret := _m.Called(_ca...)
|
|
||||||
|
|
||||||
var r0 *store.LayeredStoreSupplierResult
|
|
||||||
if rf, ok := ret.Get(0).(func(context.Context, string, ...store.LayeredStoreHint) *store.LayeredStoreSupplierResult); ok {
|
|
||||||
r0 = rf(ctx, groupID, hints...)
|
|
||||||
} else {
|
|
||||||
if ret.Get(0) != nil {
|
|
||||||
r0 = ret.Get(0).(*store.LayeredStoreSupplierResult)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
return r0
|
|
||||||
}
|
|
||||||
|
|
||||||
// GroupGetAllBySource provides a mock function with given fields: ctx, groupSource, hints
|
|
||||||
func (_m *LayeredStoreSupplier) GroupGetAllBySource(ctx context.Context, groupSource model.GroupSource, hints ...store.LayeredStoreHint) *store.LayeredStoreSupplierResult {
|
|
||||||
_va := make([]interface{}, len(hints))
|
|
||||||
for _i := range hints {
|
|
||||||
_va[_i] = hints[_i]
|
|
||||||
}
|
|
||||||
var _ca []interface{}
|
|
||||||
_ca = append(_ca, ctx, groupSource)
|
|
||||||
_ca = append(_ca, _va...)
|
|
||||||
ret := _m.Called(_ca...)
|
|
||||||
|
|
||||||
var r0 *store.LayeredStoreSupplierResult
|
|
||||||
if rf, ok := ret.Get(0).(func(context.Context, model.GroupSource, ...store.LayeredStoreHint) *store.LayeredStoreSupplierResult); ok {
|
|
||||||
r0 = rf(ctx, groupSource, hints...)
|
|
||||||
} else {
|
|
||||||
if ret.Get(0) != nil {
|
|
||||||
r0 = ret.Get(0).(*store.LayeredStoreSupplierResult)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
return r0
|
|
||||||
}
|
|
||||||
|
|
||||||
// GroupGetAllGroupSyncablesByGroup provides a mock function with given fields: ctx, groupID, syncableType, hints
|
|
||||||
func (_m *LayeredStoreSupplier) GroupGetAllGroupSyncablesByGroup(ctx context.Context, groupID string, syncableType model.GroupSyncableType, hints ...store.LayeredStoreHint) *store.LayeredStoreSupplierResult {
|
|
||||||
_va := make([]interface{}, len(hints))
|
|
||||||
for _i := range hints {
|
|
||||||
_va[_i] = hints[_i]
|
|
||||||
}
|
|
||||||
var _ca []interface{}
|
|
||||||
_ca = append(_ca, ctx, groupID, syncableType)
|
|
||||||
_ca = append(_ca, _va...)
|
|
||||||
ret := _m.Called(_ca...)
|
|
||||||
|
|
||||||
var r0 *store.LayeredStoreSupplierResult
|
|
||||||
if rf, ok := ret.Get(0).(func(context.Context, string, model.GroupSyncableType, ...store.LayeredStoreHint) *store.LayeredStoreSupplierResult); ok {
|
|
||||||
r0 = rf(ctx, groupID, syncableType, hints...)
|
|
||||||
} else {
|
|
||||||
if ret.Get(0) != nil {
|
|
||||||
r0 = ret.Get(0).(*store.LayeredStoreSupplierResult)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
return r0
|
|
||||||
}
|
|
||||||
|
|
||||||
// GroupGetByRemoteID provides a mock function with given fields: ctx, remoteID, groupSource, hints
|
|
||||||
func (_m *LayeredStoreSupplier) GroupGetByRemoteID(ctx context.Context, remoteID string, groupSource model.GroupSource, hints ...store.LayeredStoreHint) *store.LayeredStoreSupplierResult {
|
|
||||||
_va := make([]interface{}, len(hints))
|
|
||||||
for _i := range hints {
|
|
||||||
_va[_i] = hints[_i]
|
|
||||||
}
|
|
||||||
var _ca []interface{}
|
|
||||||
_ca = append(_ca, ctx, remoteID, groupSource)
|
|
||||||
_ca = append(_ca, _va...)
|
|
||||||
ret := _m.Called(_ca...)
|
|
||||||
|
|
||||||
var r0 *store.LayeredStoreSupplierResult
|
|
||||||
if rf, ok := ret.Get(0).(func(context.Context, string, model.GroupSource, ...store.LayeredStoreHint) *store.LayeredStoreSupplierResult); ok {
|
|
||||||
r0 = rf(ctx, remoteID, groupSource, hints...)
|
|
||||||
} else {
|
|
||||||
if ret.Get(0) != nil {
|
|
||||||
r0 = ret.Get(0).(*store.LayeredStoreSupplierResult)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
return r0
|
|
||||||
}
|
|
||||||
|
|
||||||
// GroupGetGroupSyncable provides a mock function with given fields: ctx, groupID, syncableID, syncableType, hints
|
|
||||||
func (_m *LayeredStoreSupplier) GroupGetGroupSyncable(ctx context.Context, groupID string, syncableID string, syncableType model.GroupSyncableType, hints ...store.LayeredStoreHint) *store.LayeredStoreSupplierResult {
|
|
||||||
_va := make([]interface{}, len(hints))
|
|
||||||
for _i := range hints {
|
|
||||||
_va[_i] = hints[_i]
|
|
||||||
}
|
|
||||||
var _ca []interface{}
|
|
||||||
_ca = append(_ca, ctx, groupID, syncableID, syncableType)
|
|
||||||
_ca = append(_ca, _va...)
|
|
||||||
ret := _m.Called(_ca...)
|
|
||||||
|
|
||||||
var r0 *store.LayeredStoreSupplierResult
|
|
||||||
if rf, ok := ret.Get(0).(func(context.Context, string, string, model.GroupSyncableType, ...store.LayeredStoreHint) *store.LayeredStoreSupplierResult); ok {
|
|
||||||
r0 = rf(ctx, groupID, syncableID, syncableType, hints...)
|
|
||||||
} else {
|
|
||||||
if ret.Get(0) != nil {
|
|
||||||
r0 = ret.Get(0).(*store.LayeredStoreSupplierResult)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
return r0
|
|
||||||
}
|
|
||||||
|
|
||||||
// GroupGetMemberCount provides a mock function with given fields: ctx, groupID, hints
|
|
||||||
func (_m *LayeredStoreSupplier) GroupGetMemberCount(ctx context.Context, groupID string, hints ...store.LayeredStoreHint) *store.LayeredStoreSupplierResult {
|
|
||||||
_va := make([]interface{}, len(hints))
|
|
||||||
for _i := range hints {
|
|
||||||
_va[_i] = hints[_i]
|
|
||||||
}
|
|
||||||
var _ca []interface{}
|
|
||||||
_ca = append(_ca, ctx, groupID)
|
|
||||||
_ca = append(_ca, _va...)
|
|
||||||
ret := _m.Called(_ca...)
|
|
||||||
|
|
||||||
var r0 *store.LayeredStoreSupplierResult
|
|
||||||
if rf, ok := ret.Get(0).(func(context.Context, string, ...store.LayeredStoreHint) *store.LayeredStoreSupplierResult); ok {
|
|
||||||
r0 = rf(ctx, groupID, hints...)
|
|
||||||
} else {
|
|
||||||
if ret.Get(0) != nil {
|
|
||||||
r0 = ret.Get(0).(*store.LayeredStoreSupplierResult)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
return r0
|
|
||||||
}
|
|
||||||
|
|
||||||
// GroupGetMemberUsers provides a mock function with given fields: ctx, groupID, hints
|
|
||||||
func (_m *LayeredStoreSupplier) GroupGetMemberUsers(ctx context.Context, groupID string, hints ...store.LayeredStoreHint) *store.LayeredStoreSupplierResult {
|
|
||||||
_va := make([]interface{}, len(hints))
|
|
||||||
for _i := range hints {
|
|
||||||
_va[_i] = hints[_i]
|
|
||||||
}
|
|
||||||
var _ca []interface{}
|
|
||||||
_ca = append(_ca, ctx, groupID)
|
|
||||||
_ca = append(_ca, _va...)
|
|
||||||
ret := _m.Called(_ca...)
|
|
||||||
|
|
||||||
var r0 *store.LayeredStoreSupplierResult
|
|
||||||
if rf, ok := ret.Get(0).(func(context.Context, string, ...store.LayeredStoreHint) *store.LayeredStoreSupplierResult); ok {
|
|
||||||
r0 = rf(ctx, groupID, hints...)
|
|
||||||
} else {
|
|
||||||
if ret.Get(0) != nil {
|
|
||||||
r0 = ret.Get(0).(*store.LayeredStoreSupplierResult)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
return r0
|
|
||||||
}
|
|
||||||
|
|
||||||
// GroupGetMemberUsersPage provides a mock function with given fields: ctx, groupID, offset, limit, hints
|
|
||||||
func (_m *LayeredStoreSupplier) GroupGetMemberUsersPage(ctx context.Context, groupID string, offset int, limit int, hints ...store.LayeredStoreHint) *store.LayeredStoreSupplierResult {
|
|
||||||
_va := make([]interface{}, len(hints))
|
|
||||||
for _i := range hints {
|
|
||||||
_va[_i] = hints[_i]
|
|
||||||
}
|
|
||||||
var _ca []interface{}
|
|
||||||
_ca = append(_ca, ctx, groupID, offset, limit)
|
|
||||||
_ca = append(_ca, _va...)
|
|
||||||
ret := _m.Called(_ca...)
|
|
||||||
|
|
||||||
var r0 *store.LayeredStoreSupplierResult
|
|
||||||
if rf, ok := ret.Get(0).(func(context.Context, string, int, int, ...store.LayeredStoreHint) *store.LayeredStoreSupplierResult); ok {
|
|
||||||
r0 = rf(ctx, groupID, offset, limit, hints...)
|
|
||||||
} else {
|
|
||||||
if ret.Get(0) != nil {
|
|
||||||
r0 = ret.Get(0).(*store.LayeredStoreSupplierResult)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
return r0
|
|
||||||
}
|
|
||||||
|
|
||||||
// GroupUpdate provides a mock function with given fields: ctx, group, hints
|
|
||||||
func (_m *LayeredStoreSupplier) GroupUpdate(ctx context.Context, group *model.Group, hints ...store.LayeredStoreHint) *store.LayeredStoreSupplierResult {
|
|
||||||
_va := make([]interface{}, len(hints))
|
|
||||||
for _i := range hints {
|
|
||||||
_va[_i] = hints[_i]
|
|
||||||
}
|
|
||||||
var _ca []interface{}
|
|
||||||
_ca = append(_ca, ctx, group)
|
|
||||||
_ca = append(_ca, _va...)
|
|
||||||
ret := _m.Called(_ca...)
|
|
||||||
|
|
||||||
var r0 *store.LayeredStoreSupplierResult
|
|
||||||
if rf, ok := ret.Get(0).(func(context.Context, *model.Group, ...store.LayeredStoreHint) *store.LayeredStoreSupplierResult); ok {
|
|
||||||
r0 = rf(ctx, group, hints...)
|
|
||||||
} else {
|
|
||||||
if ret.Get(0) != nil {
|
|
||||||
r0 = ret.Get(0).(*store.LayeredStoreSupplierResult)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
return r0
|
|
||||||
}
|
|
||||||
|
|
||||||
// GroupUpdateGroupSyncable provides a mock function with given fields: ctx, groupSyncable, hints
|
|
||||||
func (_m *LayeredStoreSupplier) GroupUpdateGroupSyncable(ctx context.Context, groupSyncable *model.GroupSyncable, hints ...store.LayeredStoreHint) *store.LayeredStoreSupplierResult {
|
|
||||||
_va := make([]interface{}, len(hints))
|
|
||||||
for _i := range hints {
|
|
||||||
_va[_i] = hints[_i]
|
|
||||||
}
|
|
||||||
var _ca []interface{}
|
|
||||||
_ca = append(_ca, ctx, groupSyncable)
|
|
||||||
_ca = append(_ca, _va...)
|
|
||||||
ret := _m.Called(_ca...)
|
|
||||||
|
|
||||||
var r0 *store.LayeredStoreSupplierResult
|
|
||||||
if rf, ok := ret.Get(0).(func(context.Context, *model.GroupSyncable, ...store.LayeredStoreHint) *store.LayeredStoreSupplierResult); ok {
|
|
||||||
r0 = rf(ctx, groupSyncable, hints...)
|
|
||||||
} else {
|
|
||||||
if ret.Get(0) != nil {
|
|
||||||
r0 = ret.Get(0).(*store.LayeredStoreSupplierResult)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
return r0
|
|
||||||
}
|
|
||||||
|
|
||||||
// Next provides a mock function with given fields:
|
// Next provides a mock function with given fields:
|
||||||
func (_m *LayeredStoreSupplier) Next() store.LayeredStoreSupplier {
|
func (_m *LayeredStoreSupplier) Next() store.LayeredStoreSupplier {
|
||||||
ret := _m.Called()
|
ret := _m.Called()
|
||||||
@@ -1097,49 +568,3 @@ func (_m *LayeredStoreSupplier) SchemeSave(ctx context.Context, scheme *model.Sc
|
|||||||
func (_m *LayeredStoreSupplier) SetChainNext(_a0 store.LayeredStoreSupplier) {
|
func (_m *LayeredStoreSupplier) SetChainNext(_a0 store.LayeredStoreSupplier) {
|
||||||
_m.Called(_a0)
|
_m.Called(_a0)
|
||||||
}
|
}
|
||||||
|
|
||||||
// TeamMembersToAdd provides a mock function with given fields: ctx, since, hints
|
|
||||||
func (_m *LayeredStoreSupplier) TeamMembersToAdd(ctx context.Context, since int64, hints ...store.LayeredStoreHint) *store.LayeredStoreSupplierResult {
|
|
||||||
_va := make([]interface{}, len(hints))
|
|
||||||
for _i := range hints {
|
|
||||||
_va[_i] = hints[_i]
|
|
||||||
}
|
|
||||||
var _ca []interface{}
|
|
||||||
_ca = append(_ca, ctx, since)
|
|
||||||
_ca = append(_ca, _va...)
|
|
||||||
ret := _m.Called(_ca...)
|
|
||||||
|
|
||||||
var r0 *store.LayeredStoreSupplierResult
|
|
||||||
if rf, ok := ret.Get(0).(func(context.Context, int64, ...store.LayeredStoreHint) *store.LayeredStoreSupplierResult); ok {
|
|
||||||
r0 = rf(ctx, since, hints...)
|
|
||||||
} else {
|
|
||||||
if ret.Get(0) != nil {
|
|
||||||
r0 = ret.Get(0).(*store.LayeredStoreSupplierResult)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
return r0
|
|
||||||
}
|
|
||||||
|
|
||||||
// TeamMembersToRemove provides a mock function with given fields: ctx, hints
|
|
||||||
func (_m *LayeredStoreSupplier) TeamMembersToRemove(ctx context.Context, hints ...store.LayeredStoreHint) *store.LayeredStoreSupplierResult {
|
|
||||||
_va := make([]interface{}, len(hints))
|
|
||||||
for _i := range hints {
|
|
||||||
_va[_i] = hints[_i]
|
|
||||||
}
|
|
||||||
var _ca []interface{}
|
|
||||||
_ca = append(_ca, ctx)
|
|
||||||
_ca = append(_ca, _va...)
|
|
||||||
ret := _m.Called(_ca...)
|
|
||||||
|
|
||||||
var r0 *store.LayeredStoreSupplierResult
|
|
||||||
if rf, ok := ret.Get(0).(func(context.Context, ...store.LayeredStoreHint) *store.LayeredStoreSupplierResult); ok {
|
|
||||||
r0 = rf(ctx, hints...)
|
|
||||||
} else {
|
|
||||||
if ret.Get(0) != nil {
|
|
||||||
r0 = ret.Get(0).(*store.LayeredStoreSupplierResult)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
return r0
|
|
||||||
}
|
|
||||||
|
|||||||
@@ -172,19 +172,28 @@ func (_m *PostStore) GetFlaggedPostsForChannel(userId string, channelId string,
|
|||||||
}
|
}
|
||||||
|
|
||||||
// GetFlaggedPostsForTeam provides a mock function with given fields: userId, teamId, offset, limit
|
// GetFlaggedPostsForTeam provides a mock function with given fields: userId, teamId, offset, limit
|
||||||
func (_m *PostStore) GetFlaggedPostsForTeam(userId string, teamId string, offset int, limit int) store.StoreChannel {
|
func (_m *PostStore) GetFlaggedPostsForTeam(userId string, teamId string, offset int, limit int) (*model.PostList, *model.AppError) {
|
||||||
ret := _m.Called(userId, teamId, offset, limit)
|
ret := _m.Called(userId, teamId, offset, limit)
|
||||||
|
|
||||||
var r0 store.StoreChannel
|
var r0 *model.PostList
|
||||||
if rf, ok := ret.Get(0).(func(string, string, int, int) store.StoreChannel); ok {
|
if rf, ok := ret.Get(0).(func(string, string, int, int) *model.PostList); ok {
|
||||||
r0 = rf(userId, teamId, offset, limit)
|
r0 = rf(userId, teamId, offset, limit)
|
||||||
} else {
|
} else {
|
||||||
if ret.Get(0) != nil {
|
if ret.Get(0) != nil {
|
||||||
r0 = ret.Get(0).(store.StoreChannel)
|
r0 = ret.Get(0).(*model.PostList)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
return r0
|
var r1 *model.AppError
|
||||||
|
if rf, ok := ret.Get(1).(func(string, string, int, int) *model.AppError); ok {
|
||||||
|
r1 = rf(userId, teamId, offset, limit)
|
||||||
|
} else {
|
||||||
|
if ret.Get(1) != nil {
|
||||||
|
r1 = ret.Get(1).(*model.AppError)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return r0, r1
|
||||||
}
|
}
|
||||||
|
|
||||||
// GetMaxPostSize provides a mock function with given fields:
|
// GetMaxPostSize provides a mock function with given fields:
|
||||||
|
|||||||
@@ -1396,7 +1396,8 @@ func testPostStoreGetFlaggedPostsForTeam(t *testing.T, ss store.Store, s SqlSupp
|
|||||||
err = ss.Preference().Save(&preferences)
|
err = ss.Preference().Save(&preferences)
|
||||||
require.Nil(t, err)
|
require.Nil(t, err)
|
||||||
|
|
||||||
r2 := (<-ss.Post().GetFlaggedPostsForTeam(o1.UserId, c1.TeamId, 0, 2)).Data.(*model.PostList)
|
r2, err := ss.Post().GetFlaggedPostsForTeam(o1.UserId, c1.TeamId, 0, 2)
|
||||||
|
require.Nil(t, err)
|
||||||
|
|
||||||
if len(r2.Order) != 1 {
|
if len(r2.Order) != 1 {
|
||||||
t.Fatal("should have 1 post")
|
t.Fatal("should have 1 post")
|
||||||
@@ -1414,25 +1415,29 @@ func testPostStoreGetFlaggedPostsForTeam(t *testing.T, ss store.Store, s SqlSupp
|
|||||||
err = ss.Preference().Save(&preferences)
|
err = ss.Preference().Save(&preferences)
|
||||||
require.Nil(t, err)
|
require.Nil(t, err)
|
||||||
|
|
||||||
r3 := (<-ss.Post().GetFlaggedPostsForTeam(o1.UserId, c1.TeamId, 0, 1)).Data.(*model.PostList)
|
r3, err := ss.Post().GetFlaggedPostsForTeam(o1.UserId, c1.TeamId, 0, 1)
|
||||||
|
require.Nil(t, err)
|
||||||
|
|
||||||
if len(r3.Order) != 1 {
|
if len(r3.Order) != 1 {
|
||||||
t.Fatal("should have 1 post")
|
t.Fatal("should have 1 post")
|
||||||
}
|
}
|
||||||
|
|
||||||
r3 = (<-ss.Post().GetFlaggedPostsForTeam(o1.UserId, c1.TeamId, 1, 1)).Data.(*model.PostList)
|
r3, err = ss.Post().GetFlaggedPostsForTeam(o1.UserId, c1.TeamId, 1, 1)
|
||||||
|
require.Nil(t, err)
|
||||||
|
|
||||||
if len(r3.Order) != 1 {
|
if len(r3.Order) != 1 {
|
||||||
t.Fatal("should have 1 post")
|
t.Fatal("should have 1 post")
|
||||||
}
|
}
|
||||||
|
|
||||||
r3 = (<-ss.Post().GetFlaggedPostsForTeam(o1.UserId, c1.TeamId, 1000, 10)).Data.(*model.PostList)
|
r3, err = ss.Post().GetFlaggedPostsForTeam(o1.UserId, c1.TeamId, 1000, 10)
|
||||||
|
require.Nil(t, err)
|
||||||
|
|
||||||
if len(r3.Order) != 0 {
|
if len(r3.Order) != 0 {
|
||||||
t.Fatal("should be empty")
|
t.Fatal("should be empty")
|
||||||
}
|
}
|
||||||
|
|
||||||
r4 := (<-ss.Post().GetFlaggedPostsForTeam(o1.UserId, c1.TeamId, 0, 2)).Data.(*model.PostList)
|
r4, err := ss.Post().GetFlaggedPostsForTeam(o1.UserId, c1.TeamId, 0, 2)
|
||||||
|
require.Nil(t, err)
|
||||||
|
|
||||||
if len(r4.Order) != 2 {
|
if len(r4.Order) != 2 {
|
||||||
t.Fatal("should have 2 posts")
|
t.Fatal("should have 2 posts")
|
||||||
@@ -1450,7 +1455,8 @@ func testPostStoreGetFlaggedPostsForTeam(t *testing.T, ss store.Store, s SqlSupp
|
|||||||
err = ss.Preference().Save(&preferences)
|
err = ss.Preference().Save(&preferences)
|
||||||
require.Nil(t, err)
|
require.Nil(t, err)
|
||||||
|
|
||||||
r4 = (<-ss.Post().GetFlaggedPostsForTeam(o1.UserId, c1.TeamId, 0, 2)).Data.(*model.PostList)
|
r4, err = ss.Post().GetFlaggedPostsForTeam(o1.UserId, c1.TeamId, 0, 2)
|
||||||
|
require.Nil(t, err)
|
||||||
|
|
||||||
if len(r4.Order) != 2 {
|
if len(r4.Order) != 2 {
|
||||||
t.Fatal("should have 2 posts")
|
t.Fatal("should have 2 posts")
|
||||||
@@ -1467,13 +1473,15 @@ func testPostStoreGetFlaggedPostsForTeam(t *testing.T, ss store.Store, s SqlSupp
|
|||||||
err = ss.Preference().Save(&preferences)
|
err = ss.Preference().Save(&preferences)
|
||||||
require.Nil(t, err)
|
require.Nil(t, err)
|
||||||
|
|
||||||
r4 = (<-ss.Post().GetFlaggedPostsForTeam(o1.UserId, c1.TeamId, 0, 2)).Data.(*model.PostList)
|
r4, err = ss.Post().GetFlaggedPostsForTeam(o1.UserId, c1.TeamId, 0, 2)
|
||||||
|
require.Nil(t, err)
|
||||||
|
|
||||||
if len(r4.Order) != 2 {
|
if len(r4.Order) != 2 {
|
||||||
t.Fatal("should have 2 posts")
|
t.Fatal("should have 2 posts")
|
||||||
}
|
}
|
||||||
|
|
||||||
r4 = (<-ss.Post().GetFlaggedPostsForTeam(o1.UserId, model.NewId(), 0, 2)).Data.(*model.PostList)
|
r4, err = ss.Post().GetFlaggedPostsForTeam(o1.UserId, model.NewId(), 0, 2)
|
||||||
|
require.Nil(t, err)
|
||||||
|
|
||||||
if len(r4.Order) != 0 {
|
if len(r4.Order) != 0 {
|
||||||
t.Fatal("should have 0 posts")
|
t.Fatal("should have 0 posts")
|
||||||
@@ -1490,7 +1498,8 @@ func testPostStoreGetFlaggedPostsForTeam(t *testing.T, ss store.Store, s SqlSupp
|
|||||||
err = ss.Preference().Save(&preferences)
|
err = ss.Preference().Save(&preferences)
|
||||||
require.Nil(t, err)
|
require.Nil(t, err)
|
||||||
|
|
||||||
r4 = (<-ss.Post().GetFlaggedPostsForTeam(o1.UserId, c1.TeamId, 0, 10)).Data.(*model.PostList)
|
r4, err = ss.Post().GetFlaggedPostsForTeam(o1.UserId, c1.TeamId, 0, 10)
|
||||||
|
require.Nil(t, err)
|
||||||
|
|
||||||
if len(r4.Order) != 3 {
|
if len(r4.Order) != 3 {
|
||||||
t.Fatal("should have 3 posts")
|
t.Fatal("should have 3 posts")
|
||||||
|
|||||||
Ссылка в новой задаче
Block a user