Upgrade mockery to fix errors (#22892)
Mockery started to throw errors like "Unexpected package creation during export data loading". This was consistently reproducible locally and on upgrade, it has gone away. ```release-note NONE ```
Этот коммит содержится в:
коммит произвёл
GitHub
родитель
6be0ed0d19
Коммит
bcf115e315
Разница между файлами не показана из-за своего большого размера
Загрузить разницу
@@ -1,4 +1,4 @@
|
||||
// Code generated by mockery v2.10.4. DO NOT EDIT.
|
||||
// Code generated by mockery v2.23.2. DO NOT EDIT.
|
||||
|
||||
// Regenerate this file using `make plugin-mocks`.
|
||||
|
||||
@@ -22,13 +22,16 @@ func (_m *Driver) Conn(isMaster bool) (string, error) {
|
||||
ret := _m.Called(isMaster)
|
||||
|
||||
var r0 string
|
||||
var r1 error
|
||||
if rf, ok := ret.Get(0).(func(bool) (string, error)); ok {
|
||||
return rf(isMaster)
|
||||
}
|
||||
if rf, ok := ret.Get(0).(func(bool) string); ok {
|
||||
r0 = rf(isMaster)
|
||||
} else {
|
||||
r0 = ret.Get(0).(string)
|
||||
}
|
||||
|
||||
var r1 error
|
||||
if rf, ok := ret.Get(1).(func(bool) error); ok {
|
||||
r1 = rf(isMaster)
|
||||
} else {
|
||||
@@ -57,13 +60,16 @@ func (_m *Driver) ConnExec(connID string, q string, args []driver.NamedValue) (p
|
||||
ret := _m.Called(connID, q, args)
|
||||
|
||||
var r0 plugin.ResultContainer
|
||||
var r1 error
|
||||
if rf, ok := ret.Get(0).(func(string, string, []driver.NamedValue) (plugin.ResultContainer, error)); ok {
|
||||
return rf(connID, q, args)
|
||||
}
|
||||
if rf, ok := ret.Get(0).(func(string, string, []driver.NamedValue) plugin.ResultContainer); ok {
|
||||
r0 = rf(connID, q, args)
|
||||
} else {
|
||||
r0 = ret.Get(0).(plugin.ResultContainer)
|
||||
}
|
||||
|
||||
var r1 error
|
||||
if rf, ok := ret.Get(1).(func(string, string, []driver.NamedValue) error); ok {
|
||||
r1 = rf(connID, q, args)
|
||||
} else {
|
||||
@@ -92,13 +98,16 @@ func (_m *Driver) ConnQuery(connID string, q string, args []driver.NamedValue) (
|
||||
ret := _m.Called(connID, q, args)
|
||||
|
||||
var r0 string
|
||||
var r1 error
|
||||
if rf, ok := ret.Get(0).(func(string, string, []driver.NamedValue) (string, error)); ok {
|
||||
return rf(connID, q, args)
|
||||
}
|
||||
if rf, ok := ret.Get(0).(func(string, string, []driver.NamedValue) string); ok {
|
||||
r0 = rf(connID, q, args)
|
||||
} else {
|
||||
r0 = ret.Get(0).(string)
|
||||
}
|
||||
|
||||
var r1 error
|
||||
if rf, ok := ret.Get(1).(func(string, string, []driver.NamedValue) error); ok {
|
||||
r1 = rf(connID, q, args)
|
||||
} else {
|
||||
@@ -141,20 +150,23 @@ func (_m *Driver) RowsColumnTypePrecisionScale(rowsID string, index int) (int64,
|
||||
ret := _m.Called(rowsID, index)
|
||||
|
||||
var r0 int64
|
||||
var r1 int64
|
||||
var r2 bool
|
||||
if rf, ok := ret.Get(0).(func(string, int) (int64, int64, bool)); ok {
|
||||
return rf(rowsID, index)
|
||||
}
|
||||
if rf, ok := ret.Get(0).(func(string, int) int64); ok {
|
||||
r0 = rf(rowsID, index)
|
||||
} else {
|
||||
r0 = ret.Get(0).(int64)
|
||||
}
|
||||
|
||||
var r1 int64
|
||||
if rf, ok := ret.Get(1).(func(string, int) int64); ok {
|
||||
r1 = rf(rowsID, index)
|
||||
} else {
|
||||
r1 = ret.Get(1).(int64)
|
||||
}
|
||||
|
||||
var r2 bool
|
||||
if rf, ok := ret.Get(2).(func(string, int) bool); ok {
|
||||
r2 = rf(rowsID, index)
|
||||
} else {
|
||||
@@ -227,13 +239,16 @@ func (_m *Driver) Stmt(connID string, q string) (string, error) {
|
||||
ret := _m.Called(connID, q)
|
||||
|
||||
var r0 string
|
||||
var r1 error
|
||||
if rf, ok := ret.Get(0).(func(string, string) (string, error)); ok {
|
||||
return rf(connID, q)
|
||||
}
|
||||
if rf, ok := ret.Get(0).(func(string, string) string); ok {
|
||||
r0 = rf(connID, q)
|
||||
} else {
|
||||
r0 = ret.Get(0).(string)
|
||||
}
|
||||
|
||||
var r1 error
|
||||
if rf, ok := ret.Get(1).(func(string, string) error); ok {
|
||||
r1 = rf(connID, q)
|
||||
} else {
|
||||
@@ -262,13 +277,16 @@ func (_m *Driver) StmtExec(stID string, args []driver.NamedValue) (plugin.Result
|
||||
ret := _m.Called(stID, args)
|
||||
|
||||
var r0 plugin.ResultContainer
|
||||
var r1 error
|
||||
if rf, ok := ret.Get(0).(func(string, []driver.NamedValue) (plugin.ResultContainer, error)); ok {
|
||||
return rf(stID, args)
|
||||
}
|
||||
if rf, ok := ret.Get(0).(func(string, []driver.NamedValue) plugin.ResultContainer); ok {
|
||||
r0 = rf(stID, args)
|
||||
} else {
|
||||
r0 = ret.Get(0).(plugin.ResultContainer)
|
||||
}
|
||||
|
||||
var r1 error
|
||||
if rf, ok := ret.Get(1).(func(string, []driver.NamedValue) error); ok {
|
||||
r1 = rf(stID, args)
|
||||
} else {
|
||||
@@ -297,13 +315,16 @@ func (_m *Driver) StmtQuery(stID string, args []driver.NamedValue) (string, erro
|
||||
ret := _m.Called(stID, args)
|
||||
|
||||
var r0 string
|
||||
var r1 error
|
||||
if rf, ok := ret.Get(0).(func(string, []driver.NamedValue) (string, error)); ok {
|
||||
return rf(stID, args)
|
||||
}
|
||||
if rf, ok := ret.Get(0).(func(string, []driver.NamedValue) string); ok {
|
||||
r0 = rf(stID, args)
|
||||
} else {
|
||||
r0 = ret.Get(0).(string)
|
||||
}
|
||||
|
||||
var r1 error
|
||||
if rf, ok := ret.Get(1).(func(string, []driver.NamedValue) error); ok {
|
||||
r1 = rf(stID, args)
|
||||
} else {
|
||||
@@ -318,13 +339,16 @@ func (_m *Driver) Tx(connID string, opts driver.TxOptions) (string, error) {
|
||||
ret := _m.Called(connID, opts)
|
||||
|
||||
var r0 string
|
||||
var r1 error
|
||||
if rf, ok := ret.Get(0).(func(string, driver.TxOptions) (string, error)); ok {
|
||||
return rf(connID, opts)
|
||||
}
|
||||
if rf, ok := ret.Get(0).(func(string, driver.TxOptions) string); ok {
|
||||
r0 = rf(connID, opts)
|
||||
} else {
|
||||
r0 = ret.Get(0).(string)
|
||||
}
|
||||
|
||||
var r1 error
|
||||
if rf, ok := ret.Get(1).(func(string, driver.TxOptions) error); ok {
|
||||
r1 = rf(connID, opts)
|
||||
} else {
|
||||
@@ -361,3 +385,18 @@ func (_m *Driver) TxRollback(txID string) error {
|
||||
|
||||
return r0
|
||||
}
|
||||
|
||||
type mockConstructorTestingTNewDriver interface {
|
||||
mock.TestingT
|
||||
Cleanup(func())
|
||||
}
|
||||
|
||||
// NewDriver creates a new instance of Driver. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations.
|
||||
func NewDriver(t mockConstructorTestingTNewDriver) *Driver {
|
||||
mock := &Driver{}
|
||||
mock.Mock.Test(t)
|
||||
|
||||
t.Cleanup(func() { mock.AssertExpectations(t) })
|
||||
|
||||
return mock
|
||||
}
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
// Code generated by mockery v2.10.4. DO NOT EDIT.
|
||||
// Code generated by mockery v2.23.2. DO NOT EDIT.
|
||||
|
||||
// Regenerate this file using `make plugin-mocks`.
|
||||
|
||||
@@ -30,6 +30,10 @@ func (_m *Hooks) ExecuteCommand(c *plugin.Context, args *model.CommandArgs) (*mo
|
||||
ret := _m.Called(c, args)
|
||||
|
||||
var r0 *model.CommandResponse
|
||||
var r1 *model.AppError
|
||||
if rf, ok := ret.Get(0).(func(*plugin.Context, *model.CommandArgs) (*model.CommandResponse, *model.AppError)); ok {
|
||||
return rf(c, args)
|
||||
}
|
||||
if rf, ok := ret.Get(0).(func(*plugin.Context, *model.CommandArgs) *model.CommandResponse); ok {
|
||||
r0 = rf(c, args)
|
||||
} else {
|
||||
@@ -38,7 +42,6 @@ func (_m *Hooks) ExecuteCommand(c *plugin.Context, args *model.CommandArgs) (*mo
|
||||
}
|
||||
}
|
||||
|
||||
var r1 *model.AppError
|
||||
if rf, ok := ret.Get(1).(func(*plugin.Context, *model.CommandArgs) *model.AppError); ok {
|
||||
r1 = rf(c, args)
|
||||
} else {
|
||||
@@ -55,6 +58,10 @@ func (_m *Hooks) FileWillBeUploaded(c *plugin.Context, info *model.FileInfo, fil
|
||||
ret := _m.Called(c, info, file, output)
|
||||
|
||||
var r0 *model.FileInfo
|
||||
var r1 string
|
||||
if rf, ok := ret.Get(0).(func(*plugin.Context, *model.FileInfo, io.Reader, io.Writer) (*model.FileInfo, string)); ok {
|
||||
return rf(c, info, file, output)
|
||||
}
|
||||
if rf, ok := ret.Get(0).(func(*plugin.Context, *model.FileInfo, io.Reader, io.Writer) *model.FileInfo); ok {
|
||||
r0 = rf(c, info, file, output)
|
||||
} else {
|
||||
@@ -63,7 +70,6 @@ func (_m *Hooks) FileWillBeUploaded(c *plugin.Context, info *model.FileInfo, fil
|
||||
}
|
||||
}
|
||||
|
||||
var r1 string
|
||||
if rf, ok := ret.Get(1).(func(*plugin.Context, *model.FileInfo, io.Reader, io.Writer) string); ok {
|
||||
r1 = rf(c, info, file, output)
|
||||
} else {
|
||||
@@ -78,6 +84,10 @@ func (_m *Hooks) GetAllCollectionIDsForUser(c *plugin.Context, userID string, co
|
||||
ret := _m.Called(c, userID, collectionType)
|
||||
|
||||
var r0 []string
|
||||
var r1 error
|
||||
if rf, ok := ret.Get(0).(func(*plugin.Context, string, string) ([]string, error)); ok {
|
||||
return rf(c, userID, collectionType)
|
||||
}
|
||||
if rf, ok := ret.Get(0).(func(*plugin.Context, string, string) []string); ok {
|
||||
r0 = rf(c, userID, collectionType)
|
||||
} else {
|
||||
@@ -86,7 +96,6 @@ func (_m *Hooks) GetAllCollectionIDsForUser(c *plugin.Context, userID string, co
|
||||
}
|
||||
}
|
||||
|
||||
var r1 error
|
||||
if rf, ok := ret.Get(1).(func(*plugin.Context, string, string) error); ok {
|
||||
r1 = rf(c, userID, collectionType)
|
||||
} else {
|
||||
@@ -101,6 +110,10 @@ func (_m *Hooks) GetAllUserIdsForCollection(c *plugin.Context, collectionType st
|
||||
ret := _m.Called(c, collectionType, collectionID)
|
||||
|
||||
var r0 []string
|
||||
var r1 error
|
||||
if rf, ok := ret.Get(0).(func(*plugin.Context, string, string) ([]string, error)); ok {
|
||||
return rf(c, collectionType, collectionID)
|
||||
}
|
||||
if rf, ok := ret.Get(0).(func(*plugin.Context, string, string) []string); ok {
|
||||
r0 = rf(c, collectionType, collectionID)
|
||||
} else {
|
||||
@@ -109,7 +122,6 @@ func (_m *Hooks) GetAllUserIdsForCollection(c *plugin.Context, collectionType st
|
||||
}
|
||||
}
|
||||
|
||||
var r1 error
|
||||
if rf, ok := ret.Get(1).(func(*plugin.Context, string, string) error); ok {
|
||||
r1 = rf(c, collectionType, collectionID)
|
||||
} else {
|
||||
@@ -124,6 +136,10 @@ func (_m *Hooks) GetCollectionMetadataByIds(c *plugin.Context, collectionType st
|
||||
ret := _m.Called(c, collectionType, collectionIds)
|
||||
|
||||
var r0 map[string]*model.CollectionMetadata
|
||||
var r1 error
|
||||
if rf, ok := ret.Get(0).(func(*plugin.Context, string, []string) (map[string]*model.CollectionMetadata, error)); ok {
|
||||
return rf(c, collectionType, collectionIds)
|
||||
}
|
||||
if rf, ok := ret.Get(0).(func(*plugin.Context, string, []string) map[string]*model.CollectionMetadata); ok {
|
||||
r0 = rf(c, collectionType, collectionIds)
|
||||
} else {
|
||||
@@ -132,7 +148,6 @@ func (_m *Hooks) GetCollectionMetadataByIds(c *plugin.Context, collectionType st
|
||||
}
|
||||
}
|
||||
|
||||
var r1 error
|
||||
if rf, ok := ret.Get(1).(func(*plugin.Context, string, []string) error); ok {
|
||||
r1 = rf(c, collectionType, collectionIds)
|
||||
} else {
|
||||
@@ -147,6 +162,10 @@ func (_m *Hooks) GetTopicMetadataByIds(c *plugin.Context, topicType string, topi
|
||||
ret := _m.Called(c, topicType, topicIds)
|
||||
|
||||
var r0 map[string]*model.TopicMetadata
|
||||
var r1 error
|
||||
if rf, ok := ret.Get(0).(func(*plugin.Context, string, []string) (map[string]*model.TopicMetadata, error)); ok {
|
||||
return rf(c, topicType, topicIds)
|
||||
}
|
||||
if rf, ok := ret.Get(0).(func(*plugin.Context, string, []string) map[string]*model.TopicMetadata); ok {
|
||||
r0 = rf(c, topicType, topicIds)
|
||||
} else {
|
||||
@@ -155,7 +174,6 @@ func (_m *Hooks) GetTopicMetadataByIds(c *plugin.Context, topicType string, topi
|
||||
}
|
||||
}
|
||||
|
||||
var r1 error
|
||||
if rf, ok := ret.Get(1).(func(*plugin.Context, string, []string) error); ok {
|
||||
r1 = rf(c, topicType, topicIds)
|
||||
} else {
|
||||
@@ -170,13 +188,16 @@ func (_m *Hooks) GetTopicRedirect(c *plugin.Context, topicType string, topicID s
|
||||
ret := _m.Called(c, topicType, topicID)
|
||||
|
||||
var r0 string
|
||||
var r1 error
|
||||
if rf, ok := ret.Get(0).(func(*plugin.Context, string, string) (string, error)); ok {
|
||||
return rf(c, topicType, topicID)
|
||||
}
|
||||
if rf, ok := ret.Get(0).(func(*plugin.Context, string, string) string); ok {
|
||||
r0 = rf(c, topicType, topicID)
|
||||
} else {
|
||||
r0 = ret.Get(0).(string)
|
||||
}
|
||||
|
||||
var r1 error
|
||||
if rf, ok := ret.Get(1).(func(*plugin.Context, string, string) error); ok {
|
||||
r1 = rf(c, topicType, topicID)
|
||||
} else {
|
||||
@@ -191,6 +212,10 @@ func (_m *Hooks) Implemented() ([]string, error) {
|
||||
ret := _m.Called()
|
||||
|
||||
var r0 []string
|
||||
var r1 error
|
||||
if rf, ok := ret.Get(0).(func() ([]string, error)); ok {
|
||||
return rf()
|
||||
}
|
||||
if rf, ok := ret.Get(0).(func() []string); ok {
|
||||
r0 = rf()
|
||||
} else {
|
||||
@@ -199,7 +224,6 @@ func (_m *Hooks) Implemented() ([]string, error) {
|
||||
}
|
||||
}
|
||||
|
||||
var r1 error
|
||||
if rf, ok := ret.Get(1).(func() error); ok {
|
||||
r1 = rf()
|
||||
} else {
|
||||
@@ -224,6 +248,10 @@ func (_m *Hooks) MessageWillBePosted(c *plugin.Context, post *model.Post) (*mode
|
||||
ret := _m.Called(c, post)
|
||||
|
||||
var r0 *model.Post
|
||||
var r1 string
|
||||
if rf, ok := ret.Get(0).(func(*plugin.Context, *model.Post) (*model.Post, string)); ok {
|
||||
return rf(c, post)
|
||||
}
|
||||
if rf, ok := ret.Get(0).(func(*plugin.Context, *model.Post) *model.Post); ok {
|
||||
r0 = rf(c, post)
|
||||
} else {
|
||||
@@ -232,7 +260,6 @@ func (_m *Hooks) MessageWillBePosted(c *plugin.Context, post *model.Post) (*mode
|
||||
}
|
||||
}
|
||||
|
||||
var r1 string
|
||||
if rf, ok := ret.Get(1).(func(*plugin.Context, *model.Post) string); ok {
|
||||
r1 = rf(c, post)
|
||||
} else {
|
||||
@@ -247,6 +274,10 @@ func (_m *Hooks) MessageWillBeUpdated(c *plugin.Context, newPost *model.Post, ol
|
||||
ret := _m.Called(c, newPost, oldPost)
|
||||
|
||||
var r0 *model.Post
|
||||
var r1 string
|
||||
if rf, ok := ret.Get(0).(func(*plugin.Context, *model.Post, *model.Post) (*model.Post, string)); ok {
|
||||
return rf(c, newPost, oldPost)
|
||||
}
|
||||
if rf, ok := ret.Get(0).(func(*plugin.Context, *model.Post, *model.Post) *model.Post); ok {
|
||||
r0 = rf(c, newPost, oldPost)
|
||||
} else {
|
||||
@@ -255,7 +286,6 @@ func (_m *Hooks) MessageWillBeUpdated(c *plugin.Context, newPost *model.Post, ol
|
||||
}
|
||||
}
|
||||
|
||||
var r1 string
|
||||
if rf, ok := ret.Get(1).(func(*plugin.Context, *model.Post, *model.Post) string); ok {
|
||||
r1 = rf(c, newPost, oldPost)
|
||||
} else {
|
||||
@@ -361,13 +391,16 @@ func (_m *Hooks) RunDataRetention(nowTime int64, batchSize int64) (int64, error)
|
||||
ret := _m.Called(nowTime, batchSize)
|
||||
|
||||
var r0 int64
|
||||
var r1 error
|
||||
if rf, ok := ret.Get(0).(func(int64, int64) (int64, error)); ok {
|
||||
return rf(nowTime, batchSize)
|
||||
}
|
||||
if rf, ok := ret.Get(0).(func(int64, int64) int64); ok {
|
||||
r0 = rf(nowTime, batchSize)
|
||||
} else {
|
||||
r0 = ret.Get(0).(int64)
|
||||
}
|
||||
|
||||
var r1 error
|
||||
if rf, ok := ret.Get(1).(func(int64, int64) error); ok {
|
||||
r1 = rf(nowTime, batchSize)
|
||||
} else {
|
||||
@@ -417,13 +450,16 @@ func (_m *Hooks) UserHasPermissionToCollection(c *plugin.Context, userID string,
|
||||
ret := _m.Called(c, userID, collectionType, collectionId, permission)
|
||||
|
||||
var r0 bool
|
||||
var r1 error
|
||||
if rf, ok := ret.Get(0).(func(*plugin.Context, string, string, string, *model.Permission) (bool, error)); ok {
|
||||
return rf(c, userID, collectionType, collectionId, permission)
|
||||
}
|
||||
if rf, ok := ret.Get(0).(func(*plugin.Context, string, string, string, *model.Permission) bool); ok {
|
||||
r0 = rf(c, userID, collectionType, collectionId, permission)
|
||||
} else {
|
||||
r0 = ret.Get(0).(bool)
|
||||
}
|
||||
|
||||
var r1 error
|
||||
if rf, ok := ret.Get(1).(func(*plugin.Context, string, string, string, *model.Permission) error); ok {
|
||||
r1 = rf(c, userID, collectionType, collectionId, permission)
|
||||
} else {
|
||||
@@ -451,3 +487,18 @@ func (_m *Hooks) UserWillLogIn(c *plugin.Context, user *model.User) string {
|
||||
func (_m *Hooks) WebSocketMessageHasBeenPosted(webConnID string, userID string, req *model.WebSocketRequest) {
|
||||
_m.Called(webConnID, userID, req)
|
||||
}
|
||||
|
||||
type mockConstructorTestingTNewHooks interface {
|
||||
mock.TestingT
|
||||
Cleanup(func())
|
||||
}
|
||||
|
||||
// NewHooks creates a new instance of Hooks. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations.
|
||||
func NewHooks(t mockConstructorTestingTNewHooks) *Hooks {
|
||||
mock := &Hooks{}
|
||||
mock.Mock.Test(t)
|
||||
|
||||
t.Cleanup(func() { mock.AssertExpectations(t) })
|
||||
|
||||
return mock
|
||||
}
|
||||
|
||||
@@ -318,11 +318,11 @@ i18n-check: ## Exit on empty translation strings and translation source strings
|
||||
$(GOBIN)/mmgotool i18n check-empty-src --portal-dir=""
|
||||
|
||||
store-mocks: ## Creates mock files.
|
||||
$(GO) install github.com/vektra/mockery/v2/...@v2.10.4
|
||||
$(GO) install github.com/vektra/mockery/v2/...@v2.23.2
|
||||
$(GOBIN)/mockery --dir channels/store --name ".*Store" --output channels/store/storetest/mocks --note 'Regenerate this file using `make store-mocks`.'
|
||||
|
||||
telemetry-mocks: ## Creates mock files.
|
||||
$(GO) install github.com/vektra/mockery/v2/...@v2.10.4
|
||||
$(GO) install github.com/vektra/mockery/v2/...@v2.23.2
|
||||
$(GOBIN)/mockery --dir platform/services/telemetry --all --output platform/services/telemetry/mocks --note 'Regenerate this file using `make telemetry-mocks`.'
|
||||
|
||||
store-layers: ## Generate layers for the store
|
||||
@@ -340,39 +340,39 @@ new-migration: ## Creates a new migration. Run with make new-migration name=<>
|
||||
$(GOBIN)/morph generate $(name) --driver postgres --dir channels/db/migrations --sequence
|
||||
|
||||
filestore-mocks: ## Creates mock files.
|
||||
$(GO) install github.com/vektra/mockery/v2/...@v2.10.4
|
||||
$(GO) install github.com/vektra/mockery/v2/...@v2.23.2
|
||||
$(GOBIN)/mockery --dir platform/shared/filestore --all --output platform/shared/filestore/mocks --note 'Regenerate this file using `make filestore-mocks`.'
|
||||
|
||||
ldap-mocks: ## Creates mock files for ldap.
|
||||
$(GO) install github.com/vektra/mockery/v2/...@v2.10.4
|
||||
$(GO) install github.com/vektra/mockery/v2/...@v2.23.2
|
||||
$(GOBIN)/mockery --dir $(BUILD_ENTERPRISE_DIR)/ldap --all --output $(BUILD_ENTERPRISE_DIR)/ldap/mocks --note 'Regenerate this file using `make ldap-mocks`.'
|
||||
|
||||
plugin-mocks: ## Creates mock files for plugins.
|
||||
$(GO) install github.com/vektra/mockery/v2/...@v2.10.4
|
||||
$(GO) install github.com/vektra/mockery/v2/...@v2.23.2
|
||||
$(GOBIN)/mockery --dir ../plugin --name API --output ../plugin/plugintest --outpkg plugintest --case underscore --note 'Regenerate this file using `make plugin-mocks`.'
|
||||
$(GOBIN)/mockery --dir ../plugin --name Hooks --output ../plugin/plugintest --outpkg plugintest --case underscore --note 'Regenerate this file using `make plugin-mocks`.'
|
||||
$(GOBIN)/mockery --dir ../plugin --name Driver --output ../plugin/plugintest --outpkg plugintest --case underscore --note 'Regenerate this file using `make plugin-mocks`.'
|
||||
|
||||
einterfaces-mocks: ## Creates mock files for einterfaces.
|
||||
$(GO) install github.com/vektra/mockery/v2/...@v2.10.4
|
||||
$(GO) install github.com/vektra/mockery/v2/...@v2.23.2
|
||||
$(GOBIN)/mockery --dir channels/einterfaces --all --output channels/einterfaces/mocks --note 'Regenerate this file using `make einterfaces-mocks`.'
|
||||
|
||||
searchengine-mocks: ## Creates mock files for searchengines.
|
||||
$(GO) install github.com/vektra/mockery/v2/...@v2.10.4
|
||||
$(GO) install github.com/vektra/mockery/v2/...@v2.23.2
|
||||
$(GOBIN)/mockery --dir platform/services/searchengine --all --output platform/services/searchengine/mocks --note 'Regenerate this file using `make searchengine-mocks`.'
|
||||
|
||||
sharedchannel-mocks: ## Creates mock files for shared channels.
|
||||
$(GO) install github.com/vektra/mockery/v2/...@v2.10.4
|
||||
$(GO) install github.com/vektra/mockery/v2/...@v2.23.2
|
||||
$(GOBIN)/mockery --dir=./platform/services/sharedchannel --name=ServerIface --output=./platform/services/sharedchannel --inpackage --outpkg=sharedchannel --testonly --note 'Regenerate this file using `make sharedchannel-mocks`.'
|
||||
$(GOBIN)/mockery --dir=./platform/services/sharedchannel --name=AppIface --output=./platform/services/sharedchannel --inpackage --outpkg=sharedchannel --testonly --note 'Regenerate this file using `make sharedchannel-mocks`.'
|
||||
|
||||
misc-mocks: ## Creates mocks for misc interfaces.
|
||||
$(GO) install github.com/vektra/mockery/v2/...@v2.10.4
|
||||
$(GO) install github.com/vektra/mockery/v2/...@v2.23.2
|
||||
$(GOBIN)/mockery --dir channels/utils --name LicenseValidatorIface --output channels/utils/mocks --note 'Regenerate this file using `make misc-mocks`.'
|
||||
$(GOBIN)/mockery --dir channels/app --name WorkTemplateExecutor --output channels/app/mocks --note 'Regenerate this file using `make misc-mocks`.'
|
||||
|
||||
email-mocks: ## Creates mocks for misc interfaces.
|
||||
$(GO) install github.com/vektra/mockery/v2/...@v2.10.4
|
||||
$(GO) install github.com/vektra/mockery/v2/...@v2.23.2
|
||||
$(GOBIN)/mockery --dir channels/app/email --name ServiceInterface --output channels/app/email/mocks --note 'Regenerate this file using `make email-mocks`.'
|
||||
|
||||
platform-mocks: ## Creates mocks for platform interfaces.
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
// Code generated by mockery v2.10.4. DO NOT EDIT.
|
||||
// Code generated by mockery v2.23.2. DO NOT EDIT.
|
||||
|
||||
// Regenerate this file using `make email-mocks`.
|
||||
|
||||
@@ -44,6 +44,10 @@ func (_m *ServiceInterface) CreateVerifyEmailToken(userID string, newEmail strin
|
||||
ret := _m.Called(userID, newEmail)
|
||||
|
||||
var r0 *model.Token
|
||||
var r1 error
|
||||
if rf, ok := ret.Get(0).(func(string, string) (*model.Token, error)); ok {
|
||||
return rf(userID, newEmail)
|
||||
}
|
||||
if rf, ok := ret.Get(0).(func(string, string) *model.Token); ok {
|
||||
r0 = rf(userID, newEmail)
|
||||
} else {
|
||||
@@ -52,7 +56,6 @@ func (_m *ServiceInterface) CreateVerifyEmailToken(userID string, newEmail strin
|
||||
}
|
||||
}
|
||||
|
||||
var r1 error
|
||||
if rf, ok := ret.Get(1).(func(string, string) error); ok {
|
||||
r1 = rf(userID, newEmail)
|
||||
} else {
|
||||
@@ -326,6 +329,10 @@ func (_m *ServiceInterface) SendInviteEmailsToTeamAndChannels(team *model.Team,
|
||||
ret := _m.Called(team, channels, senderName, senderUserId, senderProfileImage, invites, siteURL, reminderData, message, errorWhenNotSent, isSystemAdmin, isFirstAdmin)
|
||||
|
||||
var r0 []*model.EmailInviteWithError
|
||||
var r1 error
|
||||
if rf, ok := ret.Get(0).(func(*model.Team, []*model.Channel, string, string, []byte, []string, string, *model.TeamInviteReminderData, string, bool, bool, bool) ([]*model.EmailInviteWithError, error)); ok {
|
||||
return rf(team, channels, senderName, senderUserId, senderProfileImage, invites, siteURL, reminderData, message, errorWhenNotSent, isSystemAdmin, isFirstAdmin)
|
||||
}
|
||||
if rf, ok := ret.Get(0).(func(*model.Team, []*model.Channel, string, string, []byte, []string, string, *model.TeamInviteReminderData, string, bool, bool, bool) []*model.EmailInviteWithError); ok {
|
||||
r0 = rf(team, channels, senderName, senderUserId, senderProfileImage, invites, siteURL, reminderData, message, errorWhenNotSent, isSystemAdmin, isFirstAdmin)
|
||||
} else {
|
||||
@@ -334,7 +341,6 @@ func (_m *ServiceInterface) SendInviteEmailsToTeamAndChannels(team *model.Team,
|
||||
}
|
||||
}
|
||||
|
||||
var r1 error
|
||||
if rf, ok := ret.Get(1).(func(*model.Team, []*model.Channel, string, string, []byte, []string, string, *model.TeamInviteReminderData, string, bool, bool, bool) error); ok {
|
||||
r1 = rf(team, channels, senderName, senderUserId, senderProfileImage, invites, siteURL, reminderData, message, errorWhenNotSent, isSystemAdmin, isFirstAdmin)
|
||||
} else {
|
||||
@@ -433,13 +439,16 @@ func (_m *ServiceInterface) SendPasswordResetEmail(_a0 string, token *model.Toke
|
||||
ret := _m.Called(_a0, token, locale, siteURL)
|
||||
|
||||
var r0 bool
|
||||
var r1 error
|
||||
if rf, ok := ret.Get(0).(func(string, *model.Token, string, string) (bool, error)); ok {
|
||||
return rf(_a0, token, locale, siteURL)
|
||||
}
|
||||
if rf, ok := ret.Get(0).(func(string, *model.Token, string, string) bool); ok {
|
||||
r0 = rf(_a0, token, locale, siteURL)
|
||||
} else {
|
||||
r0 = ret.Get(0).(bool)
|
||||
}
|
||||
|
||||
var r1 error
|
||||
if rf, ok := ret.Get(1).(func(string, *model.Token, string, string) error); ok {
|
||||
r1 = rf(_a0, token, locale, siteURL)
|
||||
} else {
|
||||
@@ -454,13 +463,16 @@ func (_m *ServiceInterface) SendPaymentFailedEmail(_a0 string, locale string, fa
|
||||
ret := _m.Called(_a0, locale, failedPayment, planName, siteURL)
|
||||
|
||||
var r0 bool
|
||||
var r1 error
|
||||
if rf, ok := ret.Get(0).(func(string, string, *model.FailedPayment, string, string) (bool, error)); ok {
|
||||
return rf(_a0, locale, failedPayment, planName, siteURL)
|
||||
}
|
||||
if rf, ok := ret.Get(0).(func(string, string, *model.FailedPayment, string, string) bool); ok {
|
||||
r0 = rf(_a0, locale, failedPayment, planName, siteURL)
|
||||
} else {
|
||||
r0 = ret.Get(0).(bool)
|
||||
}
|
||||
|
||||
var r1 error
|
||||
if rf, ok := ret.Get(1).(func(string, string, *model.FailedPayment, string, string) error); ok {
|
||||
r1 = rf(_a0, locale, failedPayment, planName, siteURL)
|
||||
} else {
|
||||
@@ -544,3 +556,18 @@ func (_m *ServiceInterface) SendWelcomeEmail(userID string, _a1 string, verified
|
||||
func (_m *ServiceInterface) Stop() {
|
||||
_m.Called()
|
||||
}
|
||||
|
||||
type mockConstructorTestingTNewServiceInterface interface {
|
||||
mock.TestingT
|
||||
Cleanup(func())
|
||||
}
|
||||
|
||||
// NewServiceInterface creates a new instance of ServiceInterface. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations.
|
||||
func NewServiceInterface(t mockConstructorTestingTNewServiceInterface) *ServiceInterface {
|
||||
mock := &ServiceInterface{}
|
||||
mock.Mock.Test(t)
|
||||
|
||||
t.Cleanup(func() { mock.AssertExpectations(t) })
|
||||
|
||||
return mock
|
||||
}
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
// Code generated by mockery v2.10.4. DO NOT EDIT.
|
||||
// Code generated by mockery v2.23.2. DO NOT EDIT.
|
||||
|
||||
// Regenerate this file using `make misc-mocks`.
|
||||
|
||||
@@ -22,13 +22,16 @@ func (_m *WorkTemplateExecutor) CreateBoard(c *request.Context, wtcr *worktempla
|
||||
ret := _m.Called(c, wtcr, cBoard, linkToChannelID)
|
||||
|
||||
var r0 string
|
||||
var r1 error
|
||||
if rf, ok := ret.Get(0).(func(*request.Context, *worktemplates.ExecutionRequest, *model.WorkTemplateBoard, string) (string, error)); ok {
|
||||
return rf(c, wtcr, cBoard, linkToChannelID)
|
||||
}
|
||||
if rf, ok := ret.Get(0).(func(*request.Context, *worktemplates.ExecutionRequest, *model.WorkTemplateBoard, string) string); ok {
|
||||
r0 = rf(c, wtcr, cBoard, linkToChannelID)
|
||||
} else {
|
||||
r0 = ret.Get(0).(string)
|
||||
}
|
||||
|
||||
var r1 error
|
||||
if rf, ok := ret.Get(1).(func(*request.Context, *worktemplates.ExecutionRequest, *model.WorkTemplateBoard, string) error); ok {
|
||||
r1 = rf(c, wtcr, cBoard, linkToChannelID)
|
||||
} else {
|
||||
@@ -43,13 +46,16 @@ func (_m *WorkTemplateExecutor) CreateChannel(c *request.Context, wtcr *worktemp
|
||||
ret := _m.Called(c, wtcr, cChannel)
|
||||
|
||||
var r0 string
|
||||
var r1 error
|
||||
if rf, ok := ret.Get(0).(func(*request.Context, *worktemplates.ExecutionRequest, *model.WorkTemplateChannel) (string, error)); ok {
|
||||
return rf(c, wtcr, cChannel)
|
||||
}
|
||||
if rf, ok := ret.Get(0).(func(*request.Context, *worktemplates.ExecutionRequest, *model.WorkTemplateChannel) string); ok {
|
||||
r0 = rf(c, wtcr, cChannel)
|
||||
} else {
|
||||
r0 = ret.Get(0).(string)
|
||||
}
|
||||
|
||||
var r1 error
|
||||
if rf, ok := ret.Get(1).(func(*request.Context, *worktemplates.ExecutionRequest, *model.WorkTemplateChannel) error); ok {
|
||||
r1 = rf(c, wtcr, cChannel)
|
||||
} else {
|
||||
@@ -64,13 +70,16 @@ func (_m *WorkTemplateExecutor) CreatePlaybook(c *request.Context, wtcr *worktem
|
||||
ret := _m.Called(c, wtcr, playbook, channel)
|
||||
|
||||
var r0 string
|
||||
var r1 error
|
||||
if rf, ok := ret.Get(0).(func(*request.Context, *worktemplates.ExecutionRequest, *model.WorkTemplatePlaybook, model.WorkTemplateChannel) (string, error)); ok {
|
||||
return rf(c, wtcr, playbook, channel)
|
||||
}
|
||||
if rf, ok := ret.Get(0).(func(*request.Context, *worktemplates.ExecutionRequest, *model.WorkTemplatePlaybook, model.WorkTemplateChannel) string); ok {
|
||||
r0 = rf(c, wtcr, playbook, channel)
|
||||
} else {
|
||||
r0 = ret.Get(0).(string)
|
||||
}
|
||||
|
||||
var r1 error
|
||||
if rf, ok := ret.Get(1).(func(*request.Context, *worktemplates.ExecutionRequest, *model.WorkTemplatePlaybook, model.WorkTemplateChannel) error); ok {
|
||||
r1 = rf(c, wtcr, playbook, channel)
|
||||
} else {
|
||||
@@ -93,3 +102,18 @@ func (_m *WorkTemplateExecutor) InstallPlugin(c *request.Context, wtcr *worktemp
|
||||
|
||||
return r0
|
||||
}
|
||||
|
||||
type mockConstructorTestingTNewWorkTemplateExecutor interface {
|
||||
mock.TestingT
|
||||
Cleanup(func())
|
||||
}
|
||||
|
||||
// NewWorkTemplateExecutor creates a new instance of WorkTemplateExecutor. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations.
|
||||
func NewWorkTemplateExecutor(t mockConstructorTestingTNewWorkTemplateExecutor) *WorkTemplateExecutor {
|
||||
mock := &WorkTemplateExecutor{}
|
||||
mock.Mock.Test(t)
|
||||
|
||||
t.Cleanup(func() { mock.AssertExpectations(t) })
|
||||
|
||||
return mock
|
||||
}
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
// Code generated by mockery v2.10.4. DO NOT EDIT.
|
||||
// Code generated by mockery v2.23.2. DO NOT EDIT.
|
||||
|
||||
// Regenerate this file using `make einterfaces-mocks`.
|
||||
|
||||
@@ -45,3 +45,18 @@ func (_m *AccountMigrationInterface) MigrateToSaml(fromAuthService string, users
|
||||
|
||||
return r0
|
||||
}
|
||||
|
||||
type mockConstructorTestingTNewAccountMigrationInterface interface {
|
||||
mock.TestingT
|
||||
Cleanup(func())
|
||||
}
|
||||
|
||||
// NewAccountMigrationInterface creates a new instance of AccountMigrationInterface. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations.
|
||||
func NewAccountMigrationInterface(t mockConstructorTestingTNewAccountMigrationInterface) *AccountMigrationInterface {
|
||||
mock := &AccountMigrationInterface{}
|
||||
mock.Mock.Test(t)
|
||||
|
||||
t.Cleanup(func() { mock.AssertExpectations(t) })
|
||||
|
||||
return mock
|
||||
}
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
// Code generated by mockery v2.10.4. DO NOT EDIT.
|
||||
// Code generated by mockery v2.23.2. DO NOT EDIT.
|
||||
|
||||
// Regenerate this file using `make einterfaces-mocks`.
|
||||
|
||||
@@ -19,6 +19,10 @@ func (_m *CloudInterface) BootstrapSelfHostedSignup(req model.BootstrapSelfHoste
|
||||
ret := _m.Called(req)
|
||||
|
||||
var r0 *model.BootstrapSelfHostedSignupResponse
|
||||
var r1 error
|
||||
if rf, ok := ret.Get(0).(func(model.BootstrapSelfHostedSignupRequest) (*model.BootstrapSelfHostedSignupResponse, error)); ok {
|
||||
return rf(req)
|
||||
}
|
||||
if rf, ok := ret.Get(0).(func(model.BootstrapSelfHostedSignupRequest) *model.BootstrapSelfHostedSignupResponse); ok {
|
||||
r0 = rf(req)
|
||||
} else {
|
||||
@@ -27,7 +31,6 @@ func (_m *CloudInterface) BootstrapSelfHostedSignup(req model.BootstrapSelfHoste
|
||||
}
|
||||
}
|
||||
|
||||
var r1 error
|
||||
if rf, ok := ret.Get(1).(func(model.BootstrapSelfHostedSignupRequest) error); ok {
|
||||
r1 = rf(req)
|
||||
} else {
|
||||
@@ -42,6 +45,10 @@ func (_m *CloudInterface) ChangeSubscription(userID string, subscriptionID strin
|
||||
ret := _m.Called(userID, subscriptionID, subscriptionChange)
|
||||
|
||||
var r0 *model.Subscription
|
||||
var r1 error
|
||||
if rf, ok := ret.Get(0).(func(string, string, *model.SubscriptionChange) (*model.Subscription, error)); ok {
|
||||
return rf(userID, subscriptionID, subscriptionChange)
|
||||
}
|
||||
if rf, ok := ret.Get(0).(func(string, string, *model.SubscriptionChange) *model.Subscription); ok {
|
||||
r0 = rf(userID, subscriptionID, subscriptionChange)
|
||||
} else {
|
||||
@@ -50,7 +57,6 @@ func (_m *CloudInterface) ChangeSubscription(userID string, subscriptionID strin
|
||||
}
|
||||
}
|
||||
|
||||
var r1 error
|
||||
if rf, ok := ret.Get(1).(func(string, string, *model.SubscriptionChange) error); ok {
|
||||
r1 = rf(userID, subscriptionID, subscriptionChange)
|
||||
} else {
|
||||
@@ -93,6 +99,10 @@ func (_m *CloudInterface) ConfirmSelfHostedSignup(req model.SelfHostedConfirmPay
|
||||
ret := _m.Called(req, requesterEmail)
|
||||
|
||||
var r0 *model.SelfHostedSignupConfirmResponse
|
||||
var r1 error
|
||||
if rf, ok := ret.Get(0).(func(model.SelfHostedConfirmPaymentMethodRequest, string) (*model.SelfHostedSignupConfirmResponse, error)); ok {
|
||||
return rf(req, requesterEmail)
|
||||
}
|
||||
if rf, ok := ret.Get(0).(func(model.SelfHostedConfirmPaymentMethodRequest, string) *model.SelfHostedSignupConfirmResponse); ok {
|
||||
r0 = rf(req, requesterEmail)
|
||||
} else {
|
||||
@@ -101,7 +111,6 @@ func (_m *CloudInterface) ConfirmSelfHostedSignup(req model.SelfHostedConfirmPay
|
||||
}
|
||||
}
|
||||
|
||||
var r1 error
|
||||
if rf, ok := ret.Get(1).(func(model.SelfHostedConfirmPaymentMethodRequest, string) error); ok {
|
||||
r1 = rf(req, requesterEmail)
|
||||
} else {
|
||||
@@ -130,6 +139,10 @@ func (_m *CloudInterface) CreateCustomerPayment(userID string) (*model.StripeSet
|
||||
ret := _m.Called(userID)
|
||||
|
||||
var r0 *model.StripeSetupIntent
|
||||
var r1 error
|
||||
if rf, ok := ret.Get(0).(func(string) (*model.StripeSetupIntent, error)); ok {
|
||||
return rf(userID)
|
||||
}
|
||||
if rf, ok := ret.Get(0).(func(string) *model.StripeSetupIntent); ok {
|
||||
r0 = rf(userID)
|
||||
} else {
|
||||
@@ -138,7 +151,6 @@ func (_m *CloudInterface) CreateCustomerPayment(userID string) (*model.StripeSet
|
||||
}
|
||||
}
|
||||
|
||||
var r1 error
|
||||
if rf, ok := ret.Get(1).(func(string) error); ok {
|
||||
r1 = rf(userID)
|
||||
} else {
|
||||
@@ -153,6 +165,10 @@ func (_m *CloudInterface) CreateCustomerSelfHostedSignup(req model.SelfHostedCus
|
||||
ret := _m.Called(req, requesterEmail)
|
||||
|
||||
var r0 *model.SelfHostedSignupCustomerResponse
|
||||
var r1 error
|
||||
if rf, ok := ret.Get(0).(func(model.SelfHostedCustomerForm, string) (*model.SelfHostedSignupCustomerResponse, error)); ok {
|
||||
return rf(req, requesterEmail)
|
||||
}
|
||||
if rf, ok := ret.Get(0).(func(model.SelfHostedCustomerForm, string) *model.SelfHostedSignupCustomerResponse); ok {
|
||||
r0 = rf(req, requesterEmail)
|
||||
} else {
|
||||
@@ -161,7 +177,6 @@ func (_m *CloudInterface) CreateCustomerSelfHostedSignup(req model.SelfHostedCus
|
||||
}
|
||||
}
|
||||
|
||||
var r1 error
|
||||
if rf, ok := ret.Get(1).(func(model.SelfHostedCustomerForm, string) error); ok {
|
||||
r1 = rf(req, requesterEmail)
|
||||
} else {
|
||||
@@ -176,6 +191,10 @@ func (_m *CloudInterface) CreateOrUpdateSubscriptionHistoryEvent(userID string,
|
||||
ret := _m.Called(userID, userCount)
|
||||
|
||||
var r0 *model.SubscriptionHistory
|
||||
var r1 error
|
||||
if rf, ok := ret.Get(0).(func(string, int) (*model.SubscriptionHistory, error)); ok {
|
||||
return rf(userID, userCount)
|
||||
}
|
||||
if rf, ok := ret.Get(0).(func(string, int) *model.SubscriptionHistory); ok {
|
||||
r0 = rf(userID, userCount)
|
||||
} else {
|
||||
@@ -184,7 +203,6 @@ func (_m *CloudInterface) CreateOrUpdateSubscriptionHistoryEvent(userID string,
|
||||
}
|
||||
}
|
||||
|
||||
var r1 error
|
||||
if rf, ok := ret.Get(1).(func(string, int) error); ok {
|
||||
r1 = rf(userID, userCount)
|
||||
} else {
|
||||
@@ -199,6 +217,10 @@ func (_m *CloudInterface) GetCloudCustomer(userID string) (*model.CloudCustomer,
|
||||
ret := _m.Called(userID)
|
||||
|
||||
var r0 *model.CloudCustomer
|
||||
var r1 error
|
||||
if rf, ok := ret.Get(0).(func(string) (*model.CloudCustomer, error)); ok {
|
||||
return rf(userID)
|
||||
}
|
||||
if rf, ok := ret.Get(0).(func(string) *model.CloudCustomer); ok {
|
||||
r0 = rf(userID)
|
||||
} else {
|
||||
@@ -207,7 +229,6 @@ func (_m *CloudInterface) GetCloudCustomer(userID string) (*model.CloudCustomer,
|
||||
}
|
||||
}
|
||||
|
||||
var r1 error
|
||||
if rf, ok := ret.Get(1).(func(string) error); ok {
|
||||
r1 = rf(userID)
|
||||
} else {
|
||||
@@ -222,6 +243,10 @@ func (_m *CloudInterface) GetCloudLimits(userID string) (*model.ProductLimits, e
|
||||
ret := _m.Called(userID)
|
||||
|
||||
var r0 *model.ProductLimits
|
||||
var r1 error
|
||||
if rf, ok := ret.Get(0).(func(string) (*model.ProductLimits, error)); ok {
|
||||
return rf(userID)
|
||||
}
|
||||
if rf, ok := ret.Get(0).(func(string) *model.ProductLimits); ok {
|
||||
r0 = rf(userID)
|
||||
} else {
|
||||
@@ -230,7 +255,6 @@ func (_m *CloudInterface) GetCloudLimits(userID string) (*model.ProductLimits, e
|
||||
}
|
||||
}
|
||||
|
||||
var r1 error
|
||||
if rf, ok := ret.Get(1).(func(string) error); ok {
|
||||
r1 = rf(userID)
|
||||
} else {
|
||||
@@ -245,6 +269,10 @@ func (_m *CloudInterface) GetCloudProduct(userID string, productID string) (*mod
|
||||
ret := _m.Called(userID, productID)
|
||||
|
||||
var r0 *model.Product
|
||||
var r1 error
|
||||
if rf, ok := ret.Get(0).(func(string, string) (*model.Product, error)); ok {
|
||||
return rf(userID, productID)
|
||||
}
|
||||
if rf, ok := ret.Get(0).(func(string, string) *model.Product); ok {
|
||||
r0 = rf(userID, productID)
|
||||
} else {
|
||||
@@ -253,7 +281,6 @@ func (_m *CloudInterface) GetCloudProduct(userID string, productID string) (*mod
|
||||
}
|
||||
}
|
||||
|
||||
var r1 error
|
||||
if rf, ok := ret.Get(1).(func(string, string) error); ok {
|
||||
r1 = rf(userID, productID)
|
||||
} else {
|
||||
@@ -268,6 +295,10 @@ func (_m *CloudInterface) GetCloudProducts(userID string, includeLegacyProducts
|
||||
ret := _m.Called(userID, includeLegacyProducts)
|
||||
|
||||
var r0 []*model.Product
|
||||
var r1 error
|
||||
if rf, ok := ret.Get(0).(func(string, bool) ([]*model.Product, error)); ok {
|
||||
return rf(userID, includeLegacyProducts)
|
||||
}
|
||||
if rf, ok := ret.Get(0).(func(string, bool) []*model.Product); ok {
|
||||
r0 = rf(userID, includeLegacyProducts)
|
||||
} else {
|
||||
@@ -276,7 +307,6 @@ func (_m *CloudInterface) GetCloudProducts(userID string, includeLegacyProducts
|
||||
}
|
||||
}
|
||||
|
||||
var r1 error
|
||||
if rf, ok := ret.Get(1).(func(string, bool) error); ok {
|
||||
r1 = rf(userID, includeLegacyProducts)
|
||||
} else {
|
||||
@@ -291,6 +321,11 @@ func (_m *CloudInterface) GetInvoicePDF(userID string, invoiceID string) ([]byte
|
||||
ret := _m.Called(userID, invoiceID)
|
||||
|
||||
var r0 []byte
|
||||
var r1 string
|
||||
var r2 error
|
||||
if rf, ok := ret.Get(0).(func(string, string) ([]byte, string, error)); ok {
|
||||
return rf(userID, invoiceID)
|
||||
}
|
||||
if rf, ok := ret.Get(0).(func(string, string) []byte); ok {
|
||||
r0 = rf(userID, invoiceID)
|
||||
} else {
|
||||
@@ -299,14 +334,12 @@ func (_m *CloudInterface) GetInvoicePDF(userID string, invoiceID string) ([]byte
|
||||
}
|
||||
}
|
||||
|
||||
var r1 string
|
||||
if rf, ok := ret.Get(1).(func(string, string) string); ok {
|
||||
r1 = rf(userID, invoiceID)
|
||||
} else {
|
||||
r1 = ret.Get(1).(string)
|
||||
}
|
||||
|
||||
var r2 error
|
||||
if rf, ok := ret.Get(2).(func(string, string) error); ok {
|
||||
r2 = rf(userID, invoiceID)
|
||||
} else {
|
||||
@@ -321,6 +354,10 @@ func (_m *CloudInterface) GetInvoicesForSubscription(userID string) ([]*model.In
|
||||
ret := _m.Called(userID)
|
||||
|
||||
var r0 []*model.Invoice
|
||||
var r1 error
|
||||
if rf, ok := ret.Get(0).(func(string) ([]*model.Invoice, error)); ok {
|
||||
return rf(userID)
|
||||
}
|
||||
if rf, ok := ret.Get(0).(func(string) []*model.Invoice); ok {
|
||||
r0 = rf(userID)
|
||||
} else {
|
||||
@@ -329,7 +366,6 @@ func (_m *CloudInterface) GetInvoicesForSubscription(userID string) ([]*model.In
|
||||
}
|
||||
}
|
||||
|
||||
var r1 error
|
||||
if rf, ok := ret.Get(1).(func(string) error); ok {
|
||||
r1 = rf(userID)
|
||||
} else {
|
||||
@@ -344,6 +380,10 @@ func (_m *CloudInterface) GetLicenseSelfServeStatus(userID string, token string)
|
||||
ret := _m.Called(userID, token)
|
||||
|
||||
var r0 *model.SubscriptionLicenseSelfServeStatusResponse
|
||||
var r1 error
|
||||
if rf, ok := ret.Get(0).(func(string, string) (*model.SubscriptionLicenseSelfServeStatusResponse, error)); ok {
|
||||
return rf(userID, token)
|
||||
}
|
||||
if rf, ok := ret.Get(0).(func(string, string) *model.SubscriptionLicenseSelfServeStatusResponse); ok {
|
||||
r0 = rf(userID, token)
|
||||
} else {
|
||||
@@ -352,7 +392,6 @@ func (_m *CloudInterface) GetLicenseSelfServeStatus(userID string, token string)
|
||||
}
|
||||
}
|
||||
|
||||
var r1 error
|
||||
if rf, ok := ret.Get(1).(func(string, string) error); ok {
|
||||
r1 = rf(userID, token)
|
||||
} else {
|
||||
@@ -367,6 +406,11 @@ func (_m *CloudInterface) GetSelfHostedInvoicePDF(invoiceID string) ([]byte, str
|
||||
ret := _m.Called(invoiceID)
|
||||
|
||||
var r0 []byte
|
||||
var r1 string
|
||||
var r2 error
|
||||
if rf, ok := ret.Get(0).(func(string) ([]byte, string, error)); ok {
|
||||
return rf(invoiceID)
|
||||
}
|
||||
if rf, ok := ret.Get(0).(func(string) []byte); ok {
|
||||
r0 = rf(invoiceID)
|
||||
} else {
|
||||
@@ -375,14 +419,12 @@ func (_m *CloudInterface) GetSelfHostedInvoicePDF(invoiceID string) ([]byte, str
|
||||
}
|
||||
}
|
||||
|
||||
var r1 string
|
||||
if rf, ok := ret.Get(1).(func(string) string); ok {
|
||||
r1 = rf(invoiceID)
|
||||
} else {
|
||||
r1 = ret.Get(1).(string)
|
||||
}
|
||||
|
||||
var r2 error
|
||||
if rf, ok := ret.Get(2).(func(string) error); ok {
|
||||
r2 = rf(invoiceID)
|
||||
} else {
|
||||
@@ -397,6 +439,10 @@ func (_m *CloudInterface) GetSelfHostedInvoices() ([]*model.Invoice, error) {
|
||||
ret := _m.Called()
|
||||
|
||||
var r0 []*model.Invoice
|
||||
var r1 error
|
||||
if rf, ok := ret.Get(0).(func() ([]*model.Invoice, error)); ok {
|
||||
return rf()
|
||||
}
|
||||
if rf, ok := ret.Get(0).(func() []*model.Invoice); ok {
|
||||
r0 = rf()
|
||||
} else {
|
||||
@@ -405,7 +451,6 @@ func (_m *CloudInterface) GetSelfHostedInvoices() ([]*model.Invoice, error) {
|
||||
}
|
||||
}
|
||||
|
||||
var r1 error
|
||||
if rf, ok := ret.Get(1).(func() error); ok {
|
||||
r1 = rf()
|
||||
} else {
|
||||
@@ -420,6 +465,10 @@ func (_m *CloudInterface) GetSelfHostedProducts(userID string) ([]*model.Product
|
||||
ret := _m.Called(userID)
|
||||
|
||||
var r0 []*model.Product
|
||||
var r1 error
|
||||
if rf, ok := ret.Get(0).(func(string) ([]*model.Product, error)); ok {
|
||||
return rf(userID)
|
||||
}
|
||||
if rf, ok := ret.Get(0).(func(string) []*model.Product); ok {
|
||||
r0 = rf(userID)
|
||||
} else {
|
||||
@@ -428,7 +477,6 @@ func (_m *CloudInterface) GetSelfHostedProducts(userID string) ([]*model.Product
|
||||
}
|
||||
}
|
||||
|
||||
var r1 error
|
||||
if rf, ok := ret.Get(1).(func(string) error); ok {
|
||||
r1 = rf(userID)
|
||||
} else {
|
||||
@@ -443,6 +491,10 @@ func (_m *CloudInterface) GetSubscription(userID string) (*model.Subscription, e
|
||||
ret := _m.Called(userID)
|
||||
|
||||
var r0 *model.Subscription
|
||||
var r1 error
|
||||
if rf, ok := ret.Get(0).(func(string) (*model.Subscription, error)); ok {
|
||||
return rf(userID)
|
||||
}
|
||||
if rf, ok := ret.Get(0).(func(string) *model.Subscription); ok {
|
||||
r0 = rf(userID)
|
||||
} else {
|
||||
@@ -451,7 +503,6 @@ func (_m *CloudInterface) GetSubscription(userID string) (*model.Subscription, e
|
||||
}
|
||||
}
|
||||
|
||||
var r1 error
|
||||
if rf, ok := ret.Get(1).(func(string) error); ok {
|
||||
r1 = rf(userID)
|
||||
} else {
|
||||
@@ -494,6 +545,10 @@ func (_m *CloudInterface) RequestCloudTrial(userID string, subscriptionID string
|
||||
ret := _m.Called(userID, subscriptionID, newValidBusinessEmail)
|
||||
|
||||
var r0 *model.Subscription
|
||||
var r1 error
|
||||
if rf, ok := ret.Get(0).(func(string, string, string) (*model.Subscription, error)); ok {
|
||||
return rf(userID, subscriptionID, newValidBusinessEmail)
|
||||
}
|
||||
if rf, ok := ret.Get(0).(func(string, string, string) *model.Subscription); ok {
|
||||
r0 = rf(userID, subscriptionID, newValidBusinessEmail)
|
||||
} else {
|
||||
@@ -502,7 +557,6 @@ func (_m *CloudInterface) RequestCloudTrial(userID string, subscriptionID string
|
||||
}
|
||||
}
|
||||
|
||||
var r1 error
|
||||
if rf, ok := ret.Get(1).(func(string, string, string) error); ok {
|
||||
r1 = rf(userID, subscriptionID, newValidBusinessEmail)
|
||||
} else {
|
||||
@@ -559,6 +613,10 @@ func (_m *CloudInterface) UpdateCloudCustomer(userID string, customerInfo *model
|
||||
ret := _m.Called(userID, customerInfo)
|
||||
|
||||
var r0 *model.CloudCustomer
|
||||
var r1 error
|
||||
if rf, ok := ret.Get(0).(func(string, *model.CloudCustomerInfo) (*model.CloudCustomer, error)); ok {
|
||||
return rf(userID, customerInfo)
|
||||
}
|
||||
if rf, ok := ret.Get(0).(func(string, *model.CloudCustomerInfo) *model.CloudCustomer); ok {
|
||||
r0 = rf(userID, customerInfo)
|
||||
} else {
|
||||
@@ -567,7 +625,6 @@ func (_m *CloudInterface) UpdateCloudCustomer(userID string, customerInfo *model
|
||||
}
|
||||
}
|
||||
|
||||
var r1 error
|
||||
if rf, ok := ret.Get(1).(func(string, *model.CloudCustomerInfo) error); ok {
|
||||
r1 = rf(userID, customerInfo)
|
||||
} else {
|
||||
@@ -582,6 +639,10 @@ func (_m *CloudInterface) UpdateCloudCustomerAddress(userID string, address *mod
|
||||
ret := _m.Called(userID, address)
|
||||
|
||||
var r0 *model.CloudCustomer
|
||||
var r1 error
|
||||
if rf, ok := ret.Get(0).(func(string, *model.Address) (*model.CloudCustomer, error)); ok {
|
||||
return rf(userID, address)
|
||||
}
|
||||
if rf, ok := ret.Get(0).(func(string, *model.Address) *model.CloudCustomer); ok {
|
||||
r0 = rf(userID, address)
|
||||
} else {
|
||||
@@ -590,7 +651,6 @@ func (_m *CloudInterface) UpdateCloudCustomerAddress(userID string, address *mod
|
||||
}
|
||||
}
|
||||
|
||||
var r1 error
|
||||
if rf, ok := ret.Get(1).(func(string, *model.Address) error); ok {
|
||||
r1 = rf(userID, address)
|
||||
} else {
|
||||
@@ -613,3 +673,18 @@ func (_m *CloudInterface) ValidateBusinessEmail(userID string, email string) err
|
||||
|
||||
return r0
|
||||
}
|
||||
|
||||
type mockConstructorTestingTNewCloudInterface interface {
|
||||
mock.TestingT
|
||||
Cleanup(func())
|
||||
}
|
||||
|
||||
// NewCloudInterface creates a new instance of CloudInterface. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations.
|
||||
func NewCloudInterface(t mockConstructorTestingTNewCloudInterface) *CloudInterface {
|
||||
mock := &CloudInterface{}
|
||||
mock.Mock.Test(t)
|
||||
|
||||
t.Cleanup(func() { mock.AssertExpectations(t) })
|
||||
|
||||
return mock
|
||||
}
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
// Code generated by mockery v2.10.4. DO NOT EDIT.
|
||||
// Code generated by mockery v2.23.2. DO NOT EDIT.
|
||||
|
||||
// Regenerate this file using `make einterfaces-mocks`.
|
||||
|
||||
@@ -45,3 +45,18 @@ func (_m *CloudJobInterface) MakeWorker() model.Worker {
|
||||
|
||||
return r0
|
||||
}
|
||||
|
||||
type mockConstructorTestingTNewCloudJobInterface interface {
|
||||
mock.TestingT
|
||||
Cleanup(func())
|
||||
}
|
||||
|
||||
// NewCloudJobInterface creates a new instance of CloudJobInterface. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations.
|
||||
func NewCloudJobInterface(t mockConstructorTestingTNewCloudJobInterface) *CloudJobInterface {
|
||||
mock := &CloudJobInterface{}
|
||||
mock.Mock.Test(t)
|
||||
|
||||
t.Cleanup(func() { mock.AssertExpectations(t) })
|
||||
|
||||
return mock
|
||||
}
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
// Code generated by mockery v2.10.4. DO NOT EDIT.
|
||||
// Code generated by mockery v2.23.2. DO NOT EDIT.
|
||||
|
||||
// Regenerate this file using `make einterfaces-mocks`.
|
||||
|
||||
@@ -67,6 +67,10 @@ func (_m *ClusterInterface) GetClusterStats() ([]*model.ClusterStats, *model.App
|
||||
ret := _m.Called()
|
||||
|
||||
var r0 []*model.ClusterStats
|
||||
var r1 *model.AppError
|
||||
if rf, ok := ret.Get(0).(func() ([]*model.ClusterStats, *model.AppError)); ok {
|
||||
return rf()
|
||||
}
|
||||
if rf, ok := ret.Get(0).(func() []*model.ClusterStats); ok {
|
||||
r0 = rf()
|
||||
} else {
|
||||
@@ -75,7 +79,6 @@ func (_m *ClusterInterface) GetClusterStats() ([]*model.ClusterStats, *model.App
|
||||
}
|
||||
}
|
||||
|
||||
var r1 *model.AppError
|
||||
if rf, ok := ret.Get(1).(func() *model.AppError); ok {
|
||||
r1 = rf()
|
||||
} else {
|
||||
@@ -92,6 +95,10 @@ func (_m *ClusterInterface) GetLogs(page int, perPage int) ([]string, *model.App
|
||||
ret := _m.Called(page, perPage)
|
||||
|
||||
var r0 []string
|
||||
var r1 *model.AppError
|
||||
if rf, ok := ret.Get(0).(func(int, int) ([]string, *model.AppError)); ok {
|
||||
return rf(page, perPage)
|
||||
}
|
||||
if rf, ok := ret.Get(0).(func(int, int) []string); ok {
|
||||
r0 = rf(page, perPage)
|
||||
} else {
|
||||
@@ -100,7 +107,6 @@ func (_m *ClusterInterface) GetLogs(page int, perPage int) ([]string, *model.App
|
||||
}
|
||||
}
|
||||
|
||||
var r1 *model.AppError
|
||||
if rf, ok := ret.Get(1).(func(int, int) *model.AppError); ok {
|
||||
r1 = rf(page, perPage)
|
||||
} else {
|
||||
@@ -133,6 +139,10 @@ func (_m *ClusterInterface) GetPluginStatuses() (model.PluginStatuses, *model.Ap
|
||||
ret := _m.Called()
|
||||
|
||||
var r0 model.PluginStatuses
|
||||
var r1 *model.AppError
|
||||
if rf, ok := ret.Get(0).(func() (model.PluginStatuses, *model.AppError)); ok {
|
||||
return rf()
|
||||
}
|
||||
if rf, ok := ret.Get(0).(func() model.PluginStatuses); ok {
|
||||
r0 = rf()
|
||||
} else {
|
||||
@@ -141,7 +151,6 @@ func (_m *ClusterInterface) GetPluginStatuses() (model.PluginStatuses, *model.Ap
|
||||
}
|
||||
}
|
||||
|
||||
var r1 *model.AppError
|
||||
if rf, ok := ret.Get(1).(func() *model.AppError); ok {
|
||||
r1 = rf()
|
||||
} else {
|
||||
@@ -191,6 +200,10 @@ func (_m *ClusterInterface) QueryLogs(page int, perPage int) (map[string][]strin
|
||||
ret := _m.Called(page, perPage)
|
||||
|
||||
var r0 map[string][]string
|
||||
var r1 *model.AppError
|
||||
if rf, ok := ret.Get(0).(func(int, int) (map[string][]string, *model.AppError)); ok {
|
||||
return rf(page, perPage)
|
||||
}
|
||||
if rf, ok := ret.Get(0).(func(int, int) map[string][]string); ok {
|
||||
r0 = rf(page, perPage)
|
||||
} else {
|
||||
@@ -199,7 +212,6 @@ func (_m *ClusterInterface) QueryLogs(page int, perPage int) (map[string][]strin
|
||||
}
|
||||
}
|
||||
|
||||
var r1 *model.AppError
|
||||
if rf, ok := ret.Get(1).(func(int, int) *model.AppError); ok {
|
||||
r1 = rf(page, perPage)
|
||||
} else {
|
||||
@@ -244,3 +256,18 @@ func (_m *ClusterInterface) StartInterNodeCommunication() {
|
||||
func (_m *ClusterInterface) StopInterNodeCommunication() {
|
||||
_m.Called()
|
||||
}
|
||||
|
||||
type mockConstructorTestingTNewClusterInterface interface {
|
||||
mock.TestingT
|
||||
Cleanup(func())
|
||||
}
|
||||
|
||||
// NewClusterInterface creates a new instance of ClusterInterface. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations.
|
||||
func NewClusterInterface(t mockConstructorTestingTNewClusterInterface) *ClusterInterface {
|
||||
mock := &ClusterInterface{}
|
||||
mock.Mock.Test(t)
|
||||
|
||||
t.Cleanup(func() { mock.AssertExpectations(t) })
|
||||
|
||||
return mock
|
||||
}
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
// Code generated by mockery v2.10.4. DO NOT EDIT.
|
||||
// Code generated by mockery v2.23.2. DO NOT EDIT.
|
||||
|
||||
// Regenerate this file using `make einterfaces-mocks`.
|
||||
|
||||
@@ -18,3 +18,18 @@ type ClusterMessageHandler struct {
|
||||
func (_m *ClusterMessageHandler) Execute(msg *model.ClusterMessage) {
|
||||
_m.Called(msg)
|
||||
}
|
||||
|
||||
type mockConstructorTestingTNewClusterMessageHandler interface {
|
||||
mock.TestingT
|
||||
Cleanup(func())
|
||||
}
|
||||
|
||||
// NewClusterMessageHandler creates a new instance of ClusterMessageHandler. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations.
|
||||
func NewClusterMessageHandler(t mockConstructorTestingTNewClusterMessageHandler) *ClusterMessageHandler {
|
||||
mock := &ClusterMessageHandler{}
|
||||
mock.Mock.Test(t)
|
||||
|
||||
t.Cleanup(func() { mock.AssertExpectations(t) })
|
||||
|
||||
return mock
|
||||
}
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
// Code generated by mockery v2.10.4. DO NOT EDIT.
|
||||
// Code generated by mockery v2.23.2. DO NOT EDIT.
|
||||
|
||||
// Regenerate this file using `make einterfaces-mocks`.
|
||||
|
||||
@@ -34,3 +34,18 @@ func (_m *ComplianceInterface) RunComplianceJob(job *model.Compliance) *model.Ap
|
||||
func (_m *ComplianceInterface) StartComplianceDailyJob() {
|
||||
_m.Called()
|
||||
}
|
||||
|
||||
type mockConstructorTestingTNewComplianceInterface interface {
|
||||
mock.TestingT
|
||||
Cleanup(func())
|
||||
}
|
||||
|
||||
// NewComplianceInterface creates a new instance of ComplianceInterface. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations.
|
||||
func NewComplianceInterface(t mockConstructorTestingTNewComplianceInterface) *ComplianceInterface {
|
||||
mock := &ComplianceInterface{}
|
||||
mock.Mock.Test(t)
|
||||
|
||||
t.Cleanup(func() { mock.AssertExpectations(t) })
|
||||
|
||||
return mock
|
||||
}
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
// Code generated by mockery v2.10.4. DO NOT EDIT.
|
||||
// Code generated by mockery v2.23.2. DO NOT EDIT.
|
||||
|
||||
// Regenerate this file using `make einterfaces-mocks`.
|
||||
|
||||
@@ -51,6 +51,10 @@ func (_m *DataRetentionInterface) CreatePolicy(policy *model.RetentionPolicyWith
|
||||
ret := _m.Called(policy)
|
||||
|
||||
var r0 *model.RetentionPolicyWithTeamAndChannelCounts
|
||||
var r1 *model.AppError
|
||||
if rf, ok := ret.Get(0).(func(*model.RetentionPolicyWithTeamAndChannelIDs) (*model.RetentionPolicyWithTeamAndChannelCounts, *model.AppError)); ok {
|
||||
return rf(policy)
|
||||
}
|
||||
if rf, ok := ret.Get(0).(func(*model.RetentionPolicyWithTeamAndChannelIDs) *model.RetentionPolicyWithTeamAndChannelCounts); ok {
|
||||
r0 = rf(policy)
|
||||
} else {
|
||||
@@ -59,7 +63,6 @@ func (_m *DataRetentionInterface) CreatePolicy(policy *model.RetentionPolicyWith
|
||||
}
|
||||
}
|
||||
|
||||
var r1 *model.AppError
|
||||
if rf, ok := ret.Get(1).(func(*model.RetentionPolicyWithTeamAndChannelIDs) *model.AppError); ok {
|
||||
r1 = rf(policy)
|
||||
} else {
|
||||
@@ -92,6 +95,10 @@ func (_m *DataRetentionInterface) GetChannelPoliciesForUser(userID string, offse
|
||||
ret := _m.Called(userID, offset, limit)
|
||||
|
||||
var r0 *model.RetentionPolicyForChannelList
|
||||
var r1 *model.AppError
|
||||
if rf, ok := ret.Get(0).(func(string, int, int) (*model.RetentionPolicyForChannelList, *model.AppError)); ok {
|
||||
return rf(userID, offset, limit)
|
||||
}
|
||||
if rf, ok := ret.Get(0).(func(string, int, int) *model.RetentionPolicyForChannelList); ok {
|
||||
r0 = rf(userID, offset, limit)
|
||||
} else {
|
||||
@@ -100,7 +107,6 @@ func (_m *DataRetentionInterface) GetChannelPoliciesForUser(userID string, offse
|
||||
}
|
||||
}
|
||||
|
||||
var r1 *model.AppError
|
||||
if rf, ok := ret.Get(1).(func(string, int, int) *model.AppError); ok {
|
||||
r1 = rf(userID, offset, limit)
|
||||
} else {
|
||||
@@ -117,6 +123,10 @@ func (_m *DataRetentionInterface) GetChannelsForPolicy(policyID string, offset i
|
||||
ret := _m.Called(policyID, offset, limit)
|
||||
|
||||
var r0 *model.ChannelsWithCount
|
||||
var r1 *model.AppError
|
||||
if rf, ok := ret.Get(0).(func(string, int, int) (*model.ChannelsWithCount, *model.AppError)); ok {
|
||||
return rf(policyID, offset, limit)
|
||||
}
|
||||
if rf, ok := ret.Get(0).(func(string, int, int) *model.ChannelsWithCount); ok {
|
||||
r0 = rf(policyID, offset, limit)
|
||||
} else {
|
||||
@@ -125,7 +135,6 @@ func (_m *DataRetentionInterface) GetChannelsForPolicy(policyID string, offset i
|
||||
}
|
||||
}
|
||||
|
||||
var r1 *model.AppError
|
||||
if rf, ok := ret.Get(1).(func(string, int, int) *model.AppError); ok {
|
||||
r1 = rf(policyID, offset, limit)
|
||||
} else {
|
||||
@@ -142,6 +151,10 @@ func (_m *DataRetentionInterface) GetGlobalPolicy() (*model.GlobalRetentionPolic
|
||||
ret := _m.Called()
|
||||
|
||||
var r0 *model.GlobalRetentionPolicy
|
||||
var r1 *model.AppError
|
||||
if rf, ok := ret.Get(0).(func() (*model.GlobalRetentionPolicy, *model.AppError)); ok {
|
||||
return rf()
|
||||
}
|
||||
if rf, ok := ret.Get(0).(func() *model.GlobalRetentionPolicy); ok {
|
||||
r0 = rf()
|
||||
} else {
|
||||
@@ -150,7 +163,6 @@ func (_m *DataRetentionInterface) GetGlobalPolicy() (*model.GlobalRetentionPolic
|
||||
}
|
||||
}
|
||||
|
||||
var r1 *model.AppError
|
||||
if rf, ok := ret.Get(1).(func() *model.AppError); ok {
|
||||
r1 = rf()
|
||||
} else {
|
||||
@@ -167,6 +179,10 @@ func (_m *DataRetentionInterface) GetPolicies(offset int, limit int) (*model.Ret
|
||||
ret := _m.Called(offset, limit)
|
||||
|
||||
var r0 *model.RetentionPolicyWithTeamAndChannelCountsList
|
||||
var r1 *model.AppError
|
||||
if rf, ok := ret.Get(0).(func(int, int) (*model.RetentionPolicyWithTeamAndChannelCountsList, *model.AppError)); ok {
|
||||
return rf(offset, limit)
|
||||
}
|
||||
if rf, ok := ret.Get(0).(func(int, int) *model.RetentionPolicyWithTeamAndChannelCountsList); ok {
|
||||
r0 = rf(offset, limit)
|
||||
} else {
|
||||
@@ -175,7 +191,6 @@ func (_m *DataRetentionInterface) GetPolicies(offset int, limit int) (*model.Ret
|
||||
}
|
||||
}
|
||||
|
||||
var r1 *model.AppError
|
||||
if rf, ok := ret.Get(1).(func(int, int) *model.AppError); ok {
|
||||
r1 = rf(offset, limit)
|
||||
} else {
|
||||
@@ -192,13 +207,16 @@ func (_m *DataRetentionInterface) GetPoliciesCount() (int64, *model.AppError) {
|
||||
ret := _m.Called()
|
||||
|
||||
var r0 int64
|
||||
var r1 *model.AppError
|
||||
if rf, ok := ret.Get(0).(func() (int64, *model.AppError)); ok {
|
||||
return rf()
|
||||
}
|
||||
if rf, ok := ret.Get(0).(func() int64); ok {
|
||||
r0 = rf()
|
||||
} else {
|
||||
r0 = ret.Get(0).(int64)
|
||||
}
|
||||
|
||||
var r1 *model.AppError
|
||||
if rf, ok := ret.Get(1).(func() *model.AppError); ok {
|
||||
r1 = rf()
|
||||
} else {
|
||||
@@ -215,6 +233,10 @@ func (_m *DataRetentionInterface) GetPolicy(policyID string) (*model.RetentionPo
|
||||
ret := _m.Called(policyID)
|
||||
|
||||
var r0 *model.RetentionPolicyWithTeamAndChannelCounts
|
||||
var r1 *model.AppError
|
||||
if rf, ok := ret.Get(0).(func(string) (*model.RetentionPolicyWithTeamAndChannelCounts, *model.AppError)); ok {
|
||||
return rf(policyID)
|
||||
}
|
||||
if rf, ok := ret.Get(0).(func(string) *model.RetentionPolicyWithTeamAndChannelCounts); ok {
|
||||
r0 = rf(policyID)
|
||||
} else {
|
||||
@@ -223,7 +245,6 @@ func (_m *DataRetentionInterface) GetPolicy(policyID string) (*model.RetentionPo
|
||||
}
|
||||
}
|
||||
|
||||
var r1 *model.AppError
|
||||
if rf, ok := ret.Get(1).(func(string) *model.AppError); ok {
|
||||
r1 = rf(policyID)
|
||||
} else {
|
||||
@@ -240,6 +261,10 @@ func (_m *DataRetentionInterface) GetTeamPoliciesForUser(userID string, offset i
|
||||
ret := _m.Called(userID, offset, limit)
|
||||
|
||||
var r0 *model.RetentionPolicyForTeamList
|
||||
var r1 *model.AppError
|
||||
if rf, ok := ret.Get(0).(func(string, int, int) (*model.RetentionPolicyForTeamList, *model.AppError)); ok {
|
||||
return rf(userID, offset, limit)
|
||||
}
|
||||
if rf, ok := ret.Get(0).(func(string, int, int) *model.RetentionPolicyForTeamList); ok {
|
||||
r0 = rf(userID, offset, limit)
|
||||
} else {
|
||||
@@ -248,7 +273,6 @@ func (_m *DataRetentionInterface) GetTeamPoliciesForUser(userID string, offset i
|
||||
}
|
||||
}
|
||||
|
||||
var r1 *model.AppError
|
||||
if rf, ok := ret.Get(1).(func(string, int, int) *model.AppError); ok {
|
||||
r1 = rf(userID, offset, limit)
|
||||
} else {
|
||||
@@ -265,6 +289,10 @@ func (_m *DataRetentionInterface) GetTeamsForPolicy(policyID string, offset int,
|
||||
ret := _m.Called(policyID, offset, limit)
|
||||
|
||||
var r0 *model.TeamsWithCount
|
||||
var r1 *model.AppError
|
||||
if rf, ok := ret.Get(0).(func(string, int, int) (*model.TeamsWithCount, *model.AppError)); ok {
|
||||
return rf(policyID, offset, limit)
|
||||
}
|
||||
if rf, ok := ret.Get(0).(func(string, int, int) *model.TeamsWithCount); ok {
|
||||
r0 = rf(policyID, offset, limit)
|
||||
} else {
|
||||
@@ -273,7 +301,6 @@ func (_m *DataRetentionInterface) GetTeamsForPolicy(policyID string, offset int,
|
||||
}
|
||||
}
|
||||
|
||||
var r1 *model.AppError
|
||||
if rf, ok := ret.Get(1).(func(string, int, int) *model.AppError); ok {
|
||||
r1 = rf(policyID, offset, limit)
|
||||
} else {
|
||||
@@ -290,6 +317,10 @@ func (_m *DataRetentionInterface) PatchPolicy(patch *model.RetentionPolicyWithTe
|
||||
ret := _m.Called(patch)
|
||||
|
||||
var r0 *model.RetentionPolicyWithTeamAndChannelCounts
|
||||
var r1 *model.AppError
|
||||
if rf, ok := ret.Get(0).(func(*model.RetentionPolicyWithTeamAndChannelIDs) (*model.RetentionPolicyWithTeamAndChannelCounts, *model.AppError)); ok {
|
||||
return rf(patch)
|
||||
}
|
||||
if rf, ok := ret.Get(0).(func(*model.RetentionPolicyWithTeamAndChannelIDs) *model.RetentionPolicyWithTeamAndChannelCounts); ok {
|
||||
r0 = rf(patch)
|
||||
} else {
|
||||
@@ -298,7 +329,6 @@ func (_m *DataRetentionInterface) PatchPolicy(patch *model.RetentionPolicyWithTe
|
||||
}
|
||||
}
|
||||
|
||||
var r1 *model.AppError
|
||||
if rf, ok := ret.Get(1).(func(*model.RetentionPolicyWithTeamAndChannelIDs) *model.AppError); ok {
|
||||
r1 = rf(patch)
|
||||
} else {
|
||||
@@ -341,3 +371,18 @@ func (_m *DataRetentionInterface) RemoveTeamsFromPolicy(policyID string, teamIDs
|
||||
|
||||
return r0
|
||||
}
|
||||
|
||||
type mockConstructorTestingTNewDataRetentionInterface interface {
|
||||
mock.TestingT
|
||||
Cleanup(func())
|
||||
}
|
||||
|
||||
// NewDataRetentionInterface creates a new instance of DataRetentionInterface. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations.
|
||||
func NewDataRetentionInterface(t mockConstructorTestingTNewDataRetentionInterface) *DataRetentionInterface {
|
||||
mock := &DataRetentionInterface{}
|
||||
mock.Mock.Test(t)
|
||||
|
||||
t.Cleanup(func() { mock.AssertExpectations(t) })
|
||||
|
||||
return mock
|
||||
}
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
// Code generated by mockery v2.10.4. DO NOT EDIT.
|
||||
// Code generated by mockery v2.23.2. DO NOT EDIT.
|
||||
|
||||
// Regenerate this file using `make einterfaces-mocks`.
|
||||
|
||||
@@ -45,3 +45,18 @@ func (_m *DataRetentionJobInterface) MakeWorker() model.Worker {
|
||||
|
||||
return r0
|
||||
}
|
||||
|
||||
type mockConstructorTestingTNewDataRetentionJobInterface interface {
|
||||
mock.TestingT
|
||||
Cleanup(func())
|
||||
}
|
||||
|
||||
// NewDataRetentionJobInterface creates a new instance of DataRetentionJobInterface. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations.
|
||||
func NewDataRetentionJobInterface(t mockConstructorTestingTNewDataRetentionJobInterface) *DataRetentionJobInterface {
|
||||
mock := &DataRetentionJobInterface{}
|
||||
mock.Mock.Test(t)
|
||||
|
||||
t.Cleanup(func() { mock.AssertExpectations(t) })
|
||||
|
||||
return mock
|
||||
}
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
// Code generated by mockery v2.10.4. DO NOT EDIT.
|
||||
// Code generated by mockery v2.23.2. DO NOT EDIT.
|
||||
|
||||
// Regenerate this file using `make einterfaces-mocks`.
|
||||
|
||||
@@ -45,3 +45,18 @@ func (_m *ElasticsearchAggregatorInterface) MakeWorker() model.Worker {
|
||||
|
||||
return r0
|
||||
}
|
||||
|
||||
type mockConstructorTestingTNewElasticsearchAggregatorInterface interface {
|
||||
mock.TestingT
|
||||
Cleanup(func())
|
||||
}
|
||||
|
||||
// NewElasticsearchAggregatorInterface creates a new instance of ElasticsearchAggregatorInterface. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations.
|
||||
func NewElasticsearchAggregatorInterface(t mockConstructorTestingTNewElasticsearchAggregatorInterface) *ElasticsearchAggregatorInterface {
|
||||
mock := &ElasticsearchAggregatorInterface{}
|
||||
mock.Mock.Test(t)
|
||||
|
||||
t.Cleanup(func() { mock.AssertExpectations(t) })
|
||||
|
||||
return mock
|
||||
}
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
// Code generated by mockery v2.10.4. DO NOT EDIT.
|
||||
// Code generated by mockery v2.23.2. DO NOT EDIT.
|
||||
|
||||
// Regenerate this file using `make einterfaces-mocks`.
|
||||
|
||||
@@ -29,3 +29,18 @@ func (_m *ElasticsearchIndexerInterface) MakeWorker() model.Worker {
|
||||
|
||||
return r0
|
||||
}
|
||||
|
||||
type mockConstructorTestingTNewElasticsearchIndexerInterface interface {
|
||||
mock.TestingT
|
||||
Cleanup(func())
|
||||
}
|
||||
|
||||
// NewElasticsearchIndexerInterface creates a new instance of ElasticsearchIndexerInterface. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations.
|
||||
func NewElasticsearchIndexerInterface(t mockConstructorTestingTNewElasticsearchIndexerInterface) *ElasticsearchIndexerInterface {
|
||||
mock := &ElasticsearchIndexerInterface{}
|
||||
mock.Mock.Test(t)
|
||||
|
||||
t.Cleanup(func() { mock.AssertExpectations(t) })
|
||||
|
||||
return mock
|
||||
}
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
// Code generated by mockery v2.10.4. DO NOT EDIT.
|
||||
// Code generated by mockery v2.23.2. DO NOT EDIT.
|
||||
|
||||
// Regenerate this file using `make einterfaces-mocks`.
|
||||
|
||||
@@ -29,3 +29,18 @@ func (_m *IndexerJobInterface) MakeWorker() model.Worker {
|
||||
|
||||
return r0
|
||||
}
|
||||
|
||||
type mockConstructorTestingTNewIndexerJobInterface interface {
|
||||
mock.TestingT
|
||||
Cleanup(func())
|
||||
}
|
||||
|
||||
// NewIndexerJobInterface creates a new instance of IndexerJobInterface. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations.
|
||||
func NewIndexerJobInterface(t mockConstructorTestingTNewIndexerJobInterface) *IndexerJobInterface {
|
||||
mock := &IndexerJobInterface{}
|
||||
mock.Mock.Test(t)
|
||||
|
||||
t.Cleanup(func() { mock.AssertExpectations(t) })
|
||||
|
||||
return mock
|
||||
}
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
// Code generated by mockery v2.10.4. DO NOT EDIT.
|
||||
// Code generated by mockery v2.23.2. DO NOT EDIT.
|
||||
|
||||
// Regenerate this file using `make einterfaces-mocks`.
|
||||
|
||||
@@ -66,6 +66,10 @@ func (_m *LdapInterface) DoLogin(c *request.Context, id string, password string)
|
||||
ret := _m.Called(c, id, password)
|
||||
|
||||
var r0 *model.User
|
||||
var r1 *model.AppError
|
||||
if rf, ok := ret.Get(0).(func(*request.Context, string, string) (*model.User, *model.AppError)); ok {
|
||||
return rf(c, id, password)
|
||||
}
|
||||
if rf, ok := ret.Get(0).(func(*request.Context, string, string) *model.User); ok {
|
||||
r0 = rf(c, id, password)
|
||||
} else {
|
||||
@@ -74,7 +78,6 @@ func (_m *LdapInterface) DoLogin(c *request.Context, id string, password string)
|
||||
}
|
||||
}
|
||||
|
||||
var r1 *model.AppError
|
||||
if rf, ok := ret.Get(1).(func(*request.Context, string, string) *model.AppError); ok {
|
||||
r1 = rf(c, id, password)
|
||||
} else {
|
||||
@@ -121,6 +124,11 @@ func (_m *LdapInterface) GetAllGroupsPage(page int, perPage int, opts model.Ldap
|
||||
ret := _m.Called(page, perPage, opts)
|
||||
|
||||
var r0 []*model.Group
|
||||
var r1 int
|
||||
var r2 *model.AppError
|
||||
if rf, ok := ret.Get(0).(func(int, int, model.LdapGroupSearchOpts) ([]*model.Group, int, *model.AppError)); ok {
|
||||
return rf(page, perPage, opts)
|
||||
}
|
||||
if rf, ok := ret.Get(0).(func(int, int, model.LdapGroupSearchOpts) []*model.Group); ok {
|
||||
r0 = rf(page, perPage, opts)
|
||||
} else {
|
||||
@@ -129,14 +137,12 @@ func (_m *LdapInterface) GetAllGroupsPage(page int, perPage int, opts model.Ldap
|
||||
}
|
||||
}
|
||||
|
||||
var r1 int
|
||||
if rf, ok := ret.Get(1).(func(int, int, model.LdapGroupSearchOpts) int); ok {
|
||||
r1 = rf(page, perPage, opts)
|
||||
} else {
|
||||
r1 = ret.Get(1).(int)
|
||||
}
|
||||
|
||||
var r2 *model.AppError
|
||||
if rf, ok := ret.Get(2).(func(int, int, model.LdapGroupSearchOpts) *model.AppError); ok {
|
||||
r2 = rf(page, perPage, opts)
|
||||
} else {
|
||||
@@ -153,6 +159,10 @@ func (_m *LdapInterface) GetAllLdapUsers() ([]*model.User, *model.AppError) {
|
||||
ret := _m.Called()
|
||||
|
||||
var r0 []*model.User
|
||||
var r1 *model.AppError
|
||||
if rf, ok := ret.Get(0).(func() ([]*model.User, *model.AppError)); ok {
|
||||
return rf()
|
||||
}
|
||||
if rf, ok := ret.Get(0).(func() []*model.User); ok {
|
||||
r0 = rf()
|
||||
} else {
|
||||
@@ -161,7 +171,6 @@ func (_m *LdapInterface) GetAllLdapUsers() ([]*model.User, *model.AppError) {
|
||||
}
|
||||
}
|
||||
|
||||
var r1 *model.AppError
|
||||
if rf, ok := ret.Get(1).(func() *model.AppError); ok {
|
||||
r1 = rf()
|
||||
} else {
|
||||
@@ -178,6 +187,10 @@ func (_m *LdapInterface) GetGroup(groupUID string) (*model.Group, *model.AppErro
|
||||
ret := _m.Called(groupUID)
|
||||
|
||||
var r0 *model.Group
|
||||
var r1 *model.AppError
|
||||
if rf, ok := ret.Get(0).(func(string) (*model.Group, *model.AppError)); ok {
|
||||
return rf(groupUID)
|
||||
}
|
||||
if rf, ok := ret.Get(0).(func(string) *model.Group); ok {
|
||||
r0 = rf(groupUID)
|
||||
} else {
|
||||
@@ -186,7 +199,6 @@ func (_m *LdapInterface) GetGroup(groupUID string) (*model.Group, *model.AppErro
|
||||
}
|
||||
}
|
||||
|
||||
var r1 *model.AppError
|
||||
if rf, ok := ret.Get(1).(func(string) *model.AppError); ok {
|
||||
r1 = rf(groupUID)
|
||||
} else {
|
||||
@@ -217,6 +229,10 @@ func (_m *LdapInterface) GetUser(id string) (*model.User, *model.AppError) {
|
||||
ret := _m.Called(id)
|
||||
|
||||
var r0 *model.User
|
||||
var r1 *model.AppError
|
||||
if rf, ok := ret.Get(0).(func(string) (*model.User, *model.AppError)); ok {
|
||||
return rf(id)
|
||||
}
|
||||
if rf, ok := ret.Get(0).(func(string) *model.User); ok {
|
||||
r0 = rf(id)
|
||||
} else {
|
||||
@@ -225,7 +241,6 @@ func (_m *LdapInterface) GetUser(id string) (*model.User, *model.AppError) {
|
||||
}
|
||||
}
|
||||
|
||||
var r1 *model.AppError
|
||||
if rf, ok := ret.Get(1).(func(string) *model.AppError); ok {
|
||||
r1 = rf(id)
|
||||
} else {
|
||||
@@ -242,6 +257,10 @@ func (_m *LdapInterface) GetUserAttributes(id string, attributes []string) (map[
|
||||
ret := _m.Called(id, attributes)
|
||||
|
||||
var r0 map[string]string
|
||||
var r1 *model.AppError
|
||||
if rf, ok := ret.Get(0).(func(string, []string) (map[string]string, *model.AppError)); ok {
|
||||
return rf(id, attributes)
|
||||
}
|
||||
if rf, ok := ret.Get(0).(func(string, []string) map[string]string); ok {
|
||||
r0 = rf(id, attributes)
|
||||
} else {
|
||||
@@ -250,7 +269,6 @@ func (_m *LdapInterface) GetUserAttributes(id string, attributes []string) (map[
|
||||
}
|
||||
}
|
||||
|
||||
var r1 *model.AppError
|
||||
if rf, ok := ret.Get(1).(func(string, []string) *model.AppError); ok {
|
||||
r1 = rf(id, attributes)
|
||||
} else {
|
||||
@@ -267,13 +285,16 @@ func (_m *LdapInterface) GetVendorNameAndVendorVersion() (string, string) {
|
||||
ret := _m.Called()
|
||||
|
||||
var r0 string
|
||||
var r1 string
|
||||
if rf, ok := ret.Get(0).(func() (string, string)); ok {
|
||||
return rf()
|
||||
}
|
||||
if rf, ok := ret.Get(0).(func() string); ok {
|
||||
r0 = rf()
|
||||
} else {
|
||||
r0 = ret.Get(0).(string)
|
||||
}
|
||||
|
||||
var r1 string
|
||||
if rf, ok := ret.Get(1).(func() string); ok {
|
||||
r1 = rf()
|
||||
} else {
|
||||
@@ -318,6 +339,10 @@ func (_m *LdapInterface) StartSynchronizeJob(waitForJobToFinish bool, includeRem
|
||||
ret := _m.Called(waitForJobToFinish, includeRemovedMembers)
|
||||
|
||||
var r0 *model.Job
|
||||
var r1 *model.AppError
|
||||
if rf, ok := ret.Get(0).(func(bool, bool) (*model.Job, *model.AppError)); ok {
|
||||
return rf(waitForJobToFinish, includeRemovedMembers)
|
||||
}
|
||||
if rf, ok := ret.Get(0).(func(bool, bool) *model.Job); ok {
|
||||
r0 = rf(waitForJobToFinish, includeRemovedMembers)
|
||||
} else {
|
||||
@@ -326,7 +351,6 @@ func (_m *LdapInterface) StartSynchronizeJob(waitForJobToFinish bool, includeRem
|
||||
}
|
||||
}
|
||||
|
||||
var r1 *model.AppError
|
||||
if rf, ok := ret.Get(1).(func(bool, bool) *model.AppError); ok {
|
||||
r1 = rf(waitForJobToFinish, includeRemovedMembers)
|
||||
} else {
|
||||
@@ -358,3 +382,18 @@ func (_m *LdapInterface) SwitchToLdap(userID string, ldapID string, ldapPassword
|
||||
func (_m *LdapInterface) UpdateProfilePictureIfNecessary(_a0 request.CTX, _a1 model.User, _a2 model.Session) {
|
||||
_m.Called(_a0, _a1, _a2)
|
||||
}
|
||||
|
||||
type mockConstructorTestingTNewLdapInterface interface {
|
||||
mock.TestingT
|
||||
Cleanup(func())
|
||||
}
|
||||
|
||||
// NewLdapInterface creates a new instance of LdapInterface. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations.
|
||||
func NewLdapInterface(t mockConstructorTestingTNewLdapInterface) *LdapInterface {
|
||||
mock := &LdapInterface{}
|
||||
mock.Mock.Test(t)
|
||||
|
||||
t.Cleanup(func() { mock.AssertExpectations(t) })
|
||||
|
||||
return mock
|
||||
}
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
// Code generated by mockery v2.10.4. DO NOT EDIT.
|
||||
// Code generated by mockery v2.23.2. DO NOT EDIT.
|
||||
|
||||
// Regenerate this file using `make einterfaces-mocks`.
|
||||
|
||||
@@ -45,3 +45,18 @@ func (_m *LdapSyncInterface) MakeWorker() model.Worker {
|
||||
|
||||
return r0
|
||||
}
|
||||
|
||||
type mockConstructorTestingTNewLdapSyncInterface interface {
|
||||
mock.TestingT
|
||||
Cleanup(func())
|
||||
}
|
||||
|
||||
// NewLdapSyncInterface creates a new instance of LdapSyncInterface. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations.
|
||||
func NewLdapSyncInterface(t mockConstructorTestingTNewLdapSyncInterface) *LdapSyncInterface {
|
||||
mock := &LdapSyncInterface{}
|
||||
mock.Mock.Test(t)
|
||||
|
||||
t.Cleanup(func() { mock.AssertExpectations(t) })
|
||||
|
||||
return mock
|
||||
}
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
// Code generated by mockery v2.10.4. DO NOT EDIT.
|
||||
// Code generated by mockery v2.23.2. DO NOT EDIT.
|
||||
|
||||
// Regenerate this file using `make einterfaces-mocks`.
|
||||
|
||||
@@ -19,13 +19,16 @@ func (_m *LicenseInterface) CanStartTrial() (bool, error) {
|
||||
ret := _m.Called()
|
||||
|
||||
var r0 bool
|
||||
var r1 error
|
||||
if rf, ok := ret.Get(0).(func() (bool, error)); ok {
|
||||
return rf()
|
||||
}
|
||||
if rf, ok := ret.Get(0).(func() bool); ok {
|
||||
r0 = rf()
|
||||
} else {
|
||||
r0 = ret.Get(0).(bool)
|
||||
}
|
||||
|
||||
var r1 error
|
||||
if rf, ok := ret.Get(1).(func() error); ok {
|
||||
r1 = rf()
|
||||
} else {
|
||||
@@ -40,6 +43,10 @@ func (_m *LicenseInterface) GetPrevTrial() (*model.License, error) {
|
||||
ret := _m.Called()
|
||||
|
||||
var r0 *model.License
|
||||
var r1 error
|
||||
if rf, ok := ret.Get(0).(func() (*model.License, error)); ok {
|
||||
return rf()
|
||||
}
|
||||
if rf, ok := ret.Get(0).(func() *model.License); ok {
|
||||
r0 = rf()
|
||||
} else {
|
||||
@@ -48,7 +55,6 @@ func (_m *LicenseInterface) GetPrevTrial() (*model.License, error) {
|
||||
}
|
||||
}
|
||||
|
||||
var r1 error
|
||||
if rf, ok := ret.Get(1).(func() error); ok {
|
||||
r1 = rf()
|
||||
} else {
|
||||
@@ -57,3 +63,18 @@ func (_m *LicenseInterface) GetPrevTrial() (*model.License, error) {
|
||||
|
||||
return r0, r1
|
||||
}
|
||||
|
||||
type mockConstructorTestingTNewLicenseInterface interface {
|
||||
mock.TestingT
|
||||
Cleanup(func())
|
||||
}
|
||||
|
||||
// NewLicenseInterface creates a new instance of LicenseInterface. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations.
|
||||
func NewLicenseInterface(t mockConstructorTestingTNewLicenseInterface) *LicenseInterface {
|
||||
mock := &LicenseInterface{}
|
||||
mock.Mock.Test(t)
|
||||
|
||||
t.Cleanup(func() { mock.AssertExpectations(t) })
|
||||
|
||||
return mock
|
||||
}
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
// Code generated by mockery v2.10.4. DO NOT EDIT.
|
||||
// Code generated by mockery v2.23.2. DO NOT EDIT.
|
||||
|
||||
// Regenerate this file using `make einterfaces-mocks`.
|
||||
|
||||
@@ -22,13 +22,16 @@ func (_m *MessageExportInterface) RunExport(format string, since int64, limit in
|
||||
ret := _m.Called(format, since, limit)
|
||||
|
||||
var r0 int64
|
||||
var r1 *model.AppError
|
||||
if rf, ok := ret.Get(0).(func(string, int64, int) (int64, *model.AppError)); ok {
|
||||
return rf(format, since, limit)
|
||||
}
|
||||
if rf, ok := ret.Get(0).(func(string, int64, int) int64); ok {
|
||||
r0 = rf(format, since, limit)
|
||||
} else {
|
||||
r0 = ret.Get(0).(int64)
|
||||
}
|
||||
|
||||
var r1 *model.AppError
|
||||
if rf, ok := ret.Get(1).(func(string, int64, int) *model.AppError); ok {
|
||||
r1 = rf(format, since, limit)
|
||||
} else {
|
||||
@@ -45,6 +48,10 @@ func (_m *MessageExportInterface) StartSynchronizeJob(ctx context.Context, expor
|
||||
ret := _m.Called(ctx, exportFromTimestamp)
|
||||
|
||||
var r0 *model.Job
|
||||
var r1 *model.AppError
|
||||
if rf, ok := ret.Get(0).(func(context.Context, int64) (*model.Job, *model.AppError)); ok {
|
||||
return rf(ctx, exportFromTimestamp)
|
||||
}
|
||||
if rf, ok := ret.Get(0).(func(context.Context, int64) *model.Job); ok {
|
||||
r0 = rf(ctx, exportFromTimestamp)
|
||||
} else {
|
||||
@@ -53,7 +60,6 @@ func (_m *MessageExportInterface) StartSynchronizeJob(ctx context.Context, expor
|
||||
}
|
||||
}
|
||||
|
||||
var r1 *model.AppError
|
||||
if rf, ok := ret.Get(1).(func(context.Context, int64) *model.AppError); ok {
|
||||
r1 = rf(ctx, exportFromTimestamp)
|
||||
} else {
|
||||
@@ -64,3 +70,18 @@ func (_m *MessageExportInterface) StartSynchronizeJob(ctx context.Context, expor
|
||||
|
||||
return r0, r1
|
||||
}
|
||||
|
||||
type mockConstructorTestingTNewMessageExportInterface interface {
|
||||
mock.TestingT
|
||||
Cleanup(func())
|
||||
}
|
||||
|
||||
// NewMessageExportInterface creates a new instance of MessageExportInterface. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations.
|
||||
func NewMessageExportInterface(t mockConstructorTestingTNewMessageExportInterface) *MessageExportInterface {
|
||||
mock := &MessageExportInterface{}
|
||||
mock.Mock.Test(t)
|
||||
|
||||
t.Cleanup(func() { mock.AssertExpectations(t) })
|
||||
|
||||
return mock
|
||||
}
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
// Code generated by mockery v2.10.4. DO NOT EDIT.
|
||||
// Code generated by mockery v2.23.2. DO NOT EDIT.
|
||||
|
||||
// Regenerate this file using `make einterfaces-mocks`.
|
||||
|
||||
@@ -45,3 +45,18 @@ func (_m *MessageExportJobInterface) MakeWorker() model.Worker {
|
||||
|
||||
return r0
|
||||
}
|
||||
|
||||
type mockConstructorTestingTNewMessageExportJobInterface interface {
|
||||
mock.TestingT
|
||||
Cleanup(func())
|
||||
}
|
||||
|
||||
// NewMessageExportJobInterface creates a new instance of MessageExportJobInterface. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations.
|
||||
func NewMessageExportJobInterface(t mockConstructorTestingTNewMessageExportJobInterface) *MessageExportJobInterface {
|
||||
mock := &MessageExportJobInterface{}
|
||||
mock.Mock.Test(t)
|
||||
|
||||
t.Cleanup(func() { mock.AssertExpectations(t) })
|
||||
|
||||
return mock
|
||||
}
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
// Code generated by mockery v2.10.4. DO NOT EDIT.
|
||||
// Code generated by mockery v2.23.2. DO NOT EDIT.
|
||||
|
||||
// Regenerate this file using `make einterfaces-mocks`.
|
||||
|
||||
@@ -318,3 +318,18 @@ func (_m *MetricsInterface) SetReplicaLagAbsolute(node string, value float64) {
|
||||
func (_m *MetricsInterface) SetReplicaLagTime(node string, value float64) {
|
||||
_m.Called(node, value)
|
||||
}
|
||||
|
||||
type mockConstructorTestingTNewMetricsInterface interface {
|
||||
mock.TestingT
|
||||
Cleanup(func())
|
||||
}
|
||||
|
||||
// NewMetricsInterface creates a new instance of MetricsInterface. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations.
|
||||
func NewMetricsInterface(t mockConstructorTestingTNewMetricsInterface) *MetricsInterface {
|
||||
mock := &MetricsInterface{}
|
||||
mock.Mock.Test(t)
|
||||
|
||||
t.Cleanup(func() { mock.AssertExpectations(t) })
|
||||
|
||||
return mock
|
||||
}
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
// Code generated by mockery v2.10.4. DO NOT EDIT.
|
||||
// Code generated by mockery v2.23.2. DO NOT EDIT.
|
||||
|
||||
// Regenerate this file using `make einterfaces-mocks`.
|
||||
|
||||
@@ -51,13 +51,17 @@ func (_m *MfaInterface) GenerateSecret(user *model.User) (string, []byte, *model
|
||||
ret := _m.Called(user)
|
||||
|
||||
var r0 string
|
||||
var r1 []byte
|
||||
var r2 *model.AppError
|
||||
if rf, ok := ret.Get(0).(func(*model.User) (string, []byte, *model.AppError)); ok {
|
||||
return rf(user)
|
||||
}
|
||||
if rf, ok := ret.Get(0).(func(*model.User) string); ok {
|
||||
r0 = rf(user)
|
||||
} else {
|
||||
r0 = ret.Get(0).(string)
|
||||
}
|
||||
|
||||
var r1 []byte
|
||||
if rf, ok := ret.Get(1).(func(*model.User) []byte); ok {
|
||||
r1 = rf(user)
|
||||
} else {
|
||||
@@ -66,7 +70,6 @@ func (_m *MfaInterface) GenerateSecret(user *model.User) (string, []byte, *model
|
||||
}
|
||||
}
|
||||
|
||||
var r2 *model.AppError
|
||||
if rf, ok := ret.Get(2).(func(*model.User) *model.AppError); ok {
|
||||
r2 = rf(user)
|
||||
} else {
|
||||
@@ -83,13 +86,16 @@ func (_m *MfaInterface) ValidateToken(secret string, token string) (bool, *model
|
||||
ret := _m.Called(secret, token)
|
||||
|
||||
var r0 bool
|
||||
var r1 *model.AppError
|
||||
if rf, ok := ret.Get(0).(func(string, string) (bool, *model.AppError)); ok {
|
||||
return rf(secret, token)
|
||||
}
|
||||
if rf, ok := ret.Get(0).(func(string, string) bool); ok {
|
||||
r0 = rf(secret, token)
|
||||
} else {
|
||||
r0 = ret.Get(0).(bool)
|
||||
}
|
||||
|
||||
var r1 *model.AppError
|
||||
if rf, ok := ret.Get(1).(func(string, string) *model.AppError); ok {
|
||||
r1 = rf(secret, token)
|
||||
} else {
|
||||
@@ -100,3 +106,18 @@ func (_m *MfaInterface) ValidateToken(secret string, token string) (bool, *model
|
||||
|
||||
return r0, r1
|
||||
}
|
||||
|
||||
type mockConstructorTestingTNewMfaInterface interface {
|
||||
mock.TestingT
|
||||
Cleanup(func())
|
||||
}
|
||||
|
||||
// NewMfaInterface creates a new instance of MfaInterface. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations.
|
||||
func NewMfaInterface(t mockConstructorTestingTNewMfaInterface) *MfaInterface {
|
||||
mock := &MfaInterface{}
|
||||
mock.Mock.Test(t)
|
||||
|
||||
t.Cleanup(func() { mock.AssertExpectations(t) })
|
||||
|
||||
return mock
|
||||
}
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
// Code generated by mockery v2.10.4. DO NOT EDIT.
|
||||
// Code generated by mockery v2.23.2. DO NOT EDIT.
|
||||
|
||||
// Regenerate this file using `make einterfaces-mocks`.
|
||||
|
||||
@@ -35,6 +35,10 @@ func (_m *NotificationInterface) GetNotificationMessage(ack *model.PushNotificat
|
||||
ret := _m.Called(ack, userID)
|
||||
|
||||
var r0 *model.PushNotification
|
||||
var r1 *model.AppError
|
||||
if rf, ok := ret.Get(0).(func(*model.PushNotificationAck, string) (*model.PushNotification, *model.AppError)); ok {
|
||||
return rf(ack, userID)
|
||||
}
|
||||
if rf, ok := ret.Get(0).(func(*model.PushNotificationAck, string) *model.PushNotification); ok {
|
||||
r0 = rf(ack, userID)
|
||||
} else {
|
||||
@@ -43,7 +47,6 @@ func (_m *NotificationInterface) GetNotificationMessage(ack *model.PushNotificat
|
||||
}
|
||||
}
|
||||
|
||||
var r1 *model.AppError
|
||||
if rf, ok := ret.Get(1).(func(*model.PushNotificationAck, string) *model.AppError); ok {
|
||||
r1 = rf(ack, userID)
|
||||
} else {
|
||||
@@ -54,3 +57,18 @@ func (_m *NotificationInterface) GetNotificationMessage(ack *model.PushNotificat
|
||||
|
||||
return r0, r1
|
||||
}
|
||||
|
||||
type mockConstructorTestingTNewNotificationInterface interface {
|
||||
mock.TestingT
|
||||
Cleanup(func())
|
||||
}
|
||||
|
||||
// NewNotificationInterface creates a new instance of NotificationInterface. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations.
|
||||
func NewNotificationInterface(t mockConstructorTestingTNewNotificationInterface) *NotificationInterface {
|
||||
mock := &NotificationInterface{}
|
||||
mock.Mock.Test(t)
|
||||
|
||||
t.Cleanup(func() { mock.AssertExpectations(t) })
|
||||
|
||||
return mock
|
||||
}
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
// Code generated by mockery v2.10.4. DO NOT EDIT.
|
||||
// Code generated by mockery v2.23.2. DO NOT EDIT.
|
||||
|
||||
// Regenerate this file using `make einterfaces-mocks`.
|
||||
|
||||
@@ -21,6 +21,10 @@ func (_m *OAuthProvider) GetSSOSettings(config *model.Config, service string) (*
|
||||
ret := _m.Called(config, service)
|
||||
|
||||
var r0 *model.SSOSettings
|
||||
var r1 error
|
||||
if rf, ok := ret.Get(0).(func(*model.Config, string) (*model.SSOSettings, error)); ok {
|
||||
return rf(config, service)
|
||||
}
|
||||
if rf, ok := ret.Get(0).(func(*model.Config, string) *model.SSOSettings); ok {
|
||||
r0 = rf(config, service)
|
||||
} else {
|
||||
@@ -29,7 +33,6 @@ func (_m *OAuthProvider) GetSSOSettings(config *model.Config, service string) (*
|
||||
}
|
||||
}
|
||||
|
||||
var r1 error
|
||||
if rf, ok := ret.Get(1).(func(*model.Config, string) error); ok {
|
||||
r1 = rf(config, service)
|
||||
} else {
|
||||
@@ -44,6 +47,10 @@ func (_m *OAuthProvider) GetUserFromIdToken(idToken string) (*model.User, error)
|
||||
ret := _m.Called(idToken)
|
||||
|
||||
var r0 *model.User
|
||||
var r1 error
|
||||
if rf, ok := ret.Get(0).(func(string) (*model.User, error)); ok {
|
||||
return rf(idToken)
|
||||
}
|
||||
if rf, ok := ret.Get(0).(func(string) *model.User); ok {
|
||||
r0 = rf(idToken)
|
||||
} else {
|
||||
@@ -52,7 +59,6 @@ func (_m *OAuthProvider) GetUserFromIdToken(idToken string) (*model.User, error)
|
||||
}
|
||||
}
|
||||
|
||||
var r1 error
|
||||
if rf, ok := ret.Get(1).(func(string) error); ok {
|
||||
r1 = rf(idToken)
|
||||
} else {
|
||||
@@ -67,6 +73,10 @@ func (_m *OAuthProvider) GetUserFromJSON(data io.Reader, tokenUser *model.User)
|
||||
ret := _m.Called(data, tokenUser)
|
||||
|
||||
var r0 *model.User
|
||||
var r1 error
|
||||
if rf, ok := ret.Get(0).(func(io.Reader, *model.User) (*model.User, error)); ok {
|
||||
return rf(data, tokenUser)
|
||||
}
|
||||
if rf, ok := ret.Get(0).(func(io.Reader, *model.User) *model.User); ok {
|
||||
r0 = rf(data, tokenUser)
|
||||
} else {
|
||||
@@ -75,7 +85,6 @@ func (_m *OAuthProvider) GetUserFromJSON(data io.Reader, tokenUser *model.User)
|
||||
}
|
||||
}
|
||||
|
||||
var r1 error
|
||||
if rf, ok := ret.Get(1).(func(io.Reader, *model.User) error); ok {
|
||||
r1 = rf(data, tokenUser)
|
||||
} else {
|
||||
@@ -98,3 +107,18 @@ func (_m *OAuthProvider) IsSameUser(dbUser *model.User, oAuthUser *model.User) b
|
||||
|
||||
return r0
|
||||
}
|
||||
|
||||
type mockConstructorTestingTNewOAuthProvider interface {
|
||||
mock.TestingT
|
||||
Cleanup(func())
|
||||
}
|
||||
|
||||
// NewOAuthProvider creates a new instance of OAuthProvider. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations.
|
||||
func NewOAuthProvider(t mockConstructorTestingTNewOAuthProvider) *OAuthProvider {
|
||||
mock := &OAuthProvider{}
|
||||
mock.Mock.Test(t)
|
||||
|
||||
t.Cleanup(func() { mock.AssertExpectations(t) })
|
||||
|
||||
return mock
|
||||
}
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
// Code generated by mockery v2.10.4. DO NOT EDIT.
|
||||
// Code generated by mockery v2.23.2. DO NOT EDIT.
|
||||
|
||||
// Regenerate this file using `make einterfaces-mocks`.
|
||||
|
||||
@@ -20,6 +20,10 @@ func (_m *SamlInterface) BuildRequest(relayState string) (*model.SamlAuthRequest
|
||||
ret := _m.Called(relayState)
|
||||
|
||||
var r0 *model.SamlAuthRequest
|
||||
var r1 *model.AppError
|
||||
if rf, ok := ret.Get(0).(func(string) (*model.SamlAuthRequest, *model.AppError)); ok {
|
||||
return rf(relayState)
|
||||
}
|
||||
if rf, ok := ret.Get(0).(func(string) *model.SamlAuthRequest); ok {
|
||||
r0 = rf(relayState)
|
||||
} else {
|
||||
@@ -28,7 +32,6 @@ func (_m *SamlInterface) BuildRequest(relayState string) (*model.SamlAuthRequest
|
||||
}
|
||||
}
|
||||
|
||||
var r1 *model.AppError
|
||||
if rf, ok := ret.Get(1).(func(string) *model.AppError); ok {
|
||||
r1 = rf(relayState)
|
||||
} else {
|
||||
@@ -73,6 +76,10 @@ func (_m *SamlInterface) DoLogin(c *request.Context, encodedXML string, relaySta
|
||||
ret := _m.Called(c, encodedXML, relayState)
|
||||
|
||||
var r0 *model.User
|
||||
var r1 *model.AppError
|
||||
if rf, ok := ret.Get(0).(func(*request.Context, string, map[string]string) (*model.User, *model.AppError)); ok {
|
||||
return rf(c, encodedXML, relayState)
|
||||
}
|
||||
if rf, ok := ret.Get(0).(func(*request.Context, string, map[string]string) *model.User); ok {
|
||||
r0 = rf(c, encodedXML, relayState)
|
||||
} else {
|
||||
@@ -81,7 +88,6 @@ func (_m *SamlInterface) DoLogin(c *request.Context, encodedXML string, relaySta
|
||||
}
|
||||
}
|
||||
|
||||
var r1 *model.AppError
|
||||
if rf, ok := ret.Get(1).(func(*request.Context, string, map[string]string) *model.AppError); ok {
|
||||
r1 = rf(c, encodedXML, relayState)
|
||||
} else {
|
||||
@@ -98,13 +104,16 @@ func (_m *SamlInterface) GetMetadata() (string, *model.AppError) {
|
||||
ret := _m.Called()
|
||||
|
||||
var r0 string
|
||||
var r1 *model.AppError
|
||||
if rf, ok := ret.Get(0).(func() (string, *model.AppError)); ok {
|
||||
return rf()
|
||||
}
|
||||
if rf, ok := ret.Get(0).(func() string); ok {
|
||||
r0 = rf()
|
||||
} else {
|
||||
r0 = ret.Get(0).(string)
|
||||
}
|
||||
|
||||
var r1 *model.AppError
|
||||
if rf, ok := ret.Get(1).(func() *model.AppError); ok {
|
||||
r1 = rf()
|
||||
} else {
|
||||
@@ -115,3 +124,18 @@ func (_m *SamlInterface) GetMetadata() (string, *model.AppError) {
|
||||
|
||||
return r0, r1
|
||||
}
|
||||
|
||||
type mockConstructorTestingTNewSamlInterface interface {
|
||||
mock.TestingT
|
||||
Cleanup(func())
|
||||
}
|
||||
|
||||
// NewSamlInterface creates a new instance of SamlInterface. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations.
|
||||
func NewSamlInterface(t mockConstructorTestingTNewSamlInterface) *SamlInterface {
|
||||
mock := &SamlInterface{}
|
||||
mock.Mock.Test(t)
|
||||
|
||||
t.Cleanup(func() { mock.AssertExpectations(t) })
|
||||
|
||||
return mock
|
||||
}
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
// Code generated by mockery v2.10.4. DO NOT EDIT.
|
||||
// Code generated by mockery v2.23.2. DO NOT EDIT.
|
||||
|
||||
// Regenerate this file using `make store-mocks`.
|
||||
|
||||
@@ -19,6 +19,10 @@ func (_m *AuditStore) Get(user_id string, offset int, limit int) (model.Audits,
|
||||
ret := _m.Called(user_id, offset, limit)
|
||||
|
||||
var r0 model.Audits
|
||||
var r1 error
|
||||
if rf, ok := ret.Get(0).(func(string, int, int) (model.Audits, error)); ok {
|
||||
return rf(user_id, offset, limit)
|
||||
}
|
||||
if rf, ok := ret.Get(0).(func(string, int, int) model.Audits); ok {
|
||||
r0 = rf(user_id, offset, limit)
|
||||
} else {
|
||||
@@ -27,7 +31,6 @@ func (_m *AuditStore) Get(user_id string, offset int, limit int) (model.Audits,
|
||||
}
|
||||
}
|
||||
|
||||
var r1 error
|
||||
if rf, ok := ret.Get(1).(func(string, int, int) error); ok {
|
||||
r1 = rf(user_id, offset, limit)
|
||||
} else {
|
||||
@@ -64,3 +67,18 @@ func (_m *AuditStore) Save(audit *model.Audit) error {
|
||||
|
||||
return r0
|
||||
}
|
||||
|
||||
type mockConstructorTestingTNewAuditStore interface {
|
||||
mock.TestingT
|
||||
Cleanup(func())
|
||||
}
|
||||
|
||||
// NewAuditStore creates a new instance of AuditStore. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations.
|
||||
func NewAuditStore(t mockConstructorTestingTNewAuditStore) *AuditStore {
|
||||
mock := &AuditStore{}
|
||||
mock.Mock.Test(t)
|
||||
|
||||
t.Cleanup(func() { mock.AssertExpectations(t) })
|
||||
|
||||
return mock
|
||||
}
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
// Code generated by mockery v2.10.4. DO NOT EDIT.
|
||||
// Code generated by mockery v2.23.2. DO NOT EDIT.
|
||||
|
||||
// Regenerate this file using `make store-mocks`.
|
||||
|
||||
@@ -19,6 +19,10 @@ func (_m *BotStore) Get(userID string, includeDeleted bool) (*model.Bot, error)
|
||||
ret := _m.Called(userID, includeDeleted)
|
||||
|
||||
var r0 *model.Bot
|
||||
var r1 error
|
||||
if rf, ok := ret.Get(0).(func(string, bool) (*model.Bot, error)); ok {
|
||||
return rf(userID, includeDeleted)
|
||||
}
|
||||
if rf, ok := ret.Get(0).(func(string, bool) *model.Bot); ok {
|
||||
r0 = rf(userID, includeDeleted)
|
||||
} else {
|
||||
@@ -27,7 +31,6 @@ func (_m *BotStore) Get(userID string, includeDeleted bool) (*model.Bot, error)
|
||||
}
|
||||
}
|
||||
|
||||
var r1 error
|
||||
if rf, ok := ret.Get(1).(func(string, bool) error); ok {
|
||||
r1 = rf(userID, includeDeleted)
|
||||
} else {
|
||||
@@ -42,6 +45,10 @@ func (_m *BotStore) GetAll(options *model.BotGetOptions) ([]*model.Bot, error) {
|
||||
ret := _m.Called(options)
|
||||
|
||||
var r0 []*model.Bot
|
||||
var r1 error
|
||||
if rf, ok := ret.Get(0).(func(*model.BotGetOptions) ([]*model.Bot, error)); ok {
|
||||
return rf(options)
|
||||
}
|
||||
if rf, ok := ret.Get(0).(func(*model.BotGetOptions) []*model.Bot); ok {
|
||||
r0 = rf(options)
|
||||
} else {
|
||||
@@ -50,7 +57,6 @@ func (_m *BotStore) GetAll(options *model.BotGetOptions) ([]*model.Bot, error) {
|
||||
}
|
||||
}
|
||||
|
||||
var r1 error
|
||||
if rf, ok := ret.Get(1).(func(*model.BotGetOptions) error); ok {
|
||||
r1 = rf(options)
|
||||
} else {
|
||||
@@ -79,6 +85,10 @@ func (_m *BotStore) Save(bot *model.Bot) (*model.Bot, error) {
|
||||
ret := _m.Called(bot)
|
||||
|
||||
var r0 *model.Bot
|
||||
var r1 error
|
||||
if rf, ok := ret.Get(0).(func(*model.Bot) (*model.Bot, error)); ok {
|
||||
return rf(bot)
|
||||
}
|
||||
if rf, ok := ret.Get(0).(func(*model.Bot) *model.Bot); ok {
|
||||
r0 = rf(bot)
|
||||
} else {
|
||||
@@ -87,7 +97,6 @@ func (_m *BotStore) Save(bot *model.Bot) (*model.Bot, error) {
|
||||
}
|
||||
}
|
||||
|
||||
var r1 error
|
||||
if rf, ok := ret.Get(1).(func(*model.Bot) error); ok {
|
||||
r1 = rf(bot)
|
||||
} else {
|
||||
@@ -102,6 +111,10 @@ func (_m *BotStore) Update(bot *model.Bot) (*model.Bot, error) {
|
||||
ret := _m.Called(bot)
|
||||
|
||||
var r0 *model.Bot
|
||||
var r1 error
|
||||
if rf, ok := ret.Get(0).(func(*model.Bot) (*model.Bot, error)); ok {
|
||||
return rf(bot)
|
||||
}
|
||||
if rf, ok := ret.Get(0).(func(*model.Bot) *model.Bot); ok {
|
||||
r0 = rf(bot)
|
||||
} else {
|
||||
@@ -110,7 +123,6 @@ func (_m *BotStore) Update(bot *model.Bot) (*model.Bot, error) {
|
||||
}
|
||||
}
|
||||
|
||||
var r1 error
|
||||
if rf, ok := ret.Get(1).(func(*model.Bot) error); ok {
|
||||
r1 = rf(bot)
|
||||
} else {
|
||||
@@ -119,3 +131,18 @@ func (_m *BotStore) Update(bot *model.Bot) (*model.Bot, error) {
|
||||
|
||||
return r0, r1
|
||||
}
|
||||
|
||||
type mockConstructorTestingTNewBotStore interface {
|
||||
mock.TestingT
|
||||
Cleanup(func())
|
||||
}
|
||||
|
||||
// NewBotStore creates a new instance of BotStore. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations.
|
||||
func NewBotStore(t mockConstructorTestingTNewBotStore) *BotStore {
|
||||
mock := &BotStore{}
|
||||
mock.Mock.Test(t)
|
||||
|
||||
t.Cleanup(func() { mock.AssertExpectations(t) })
|
||||
|
||||
return mock
|
||||
}
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
// Code generated by mockery v2.10.4. DO NOT EDIT.
|
||||
// Code generated by mockery v2.23.2. DO NOT EDIT.
|
||||
|
||||
// Regenerate this file using `make store-mocks`.
|
||||
|
||||
@@ -19,13 +19,16 @@ func (_m *ChannelMemberHistoryStore) DeleteOrphanedRows(limit int) (int64, error
|
||||
ret := _m.Called(limit)
|
||||
|
||||
var r0 int64
|
||||
var r1 error
|
||||
if rf, ok := ret.Get(0).(func(int) (int64, error)); ok {
|
||||
return rf(limit)
|
||||
}
|
||||
if rf, ok := ret.Get(0).(func(int) int64); ok {
|
||||
r0 = rf(limit)
|
||||
} else {
|
||||
r0 = ret.Get(0).(int64)
|
||||
}
|
||||
|
||||
var r1 error
|
||||
if rf, ok := ret.Get(1).(func(int) error); ok {
|
||||
r1 = rf(limit)
|
||||
} else {
|
||||
@@ -40,6 +43,10 @@ func (_m *ChannelMemberHistoryStore) GetChannelsLeftSince(userID string, since i
|
||||
ret := _m.Called(userID, since)
|
||||
|
||||
var r0 []string
|
||||
var r1 error
|
||||
if rf, ok := ret.Get(0).(func(string, int64) ([]string, error)); ok {
|
||||
return rf(userID, since)
|
||||
}
|
||||
if rf, ok := ret.Get(0).(func(string, int64) []string); ok {
|
||||
r0 = rf(userID, since)
|
||||
} else {
|
||||
@@ -48,7 +55,6 @@ func (_m *ChannelMemberHistoryStore) GetChannelsLeftSince(userID string, since i
|
||||
}
|
||||
}
|
||||
|
||||
var r1 error
|
||||
if rf, ok := ret.Get(1).(func(string, int64) error); ok {
|
||||
r1 = rf(userID, since)
|
||||
} else {
|
||||
@@ -63,6 +69,10 @@ func (_m *ChannelMemberHistoryStore) GetUsersInChannelDuring(startTime int64, en
|
||||
ret := _m.Called(startTime, endTime, channelID)
|
||||
|
||||
var r0 []*model.ChannelMemberHistoryResult
|
||||
var r1 error
|
||||
if rf, ok := ret.Get(0).(func(int64, int64, string) ([]*model.ChannelMemberHistoryResult, error)); ok {
|
||||
return rf(startTime, endTime, channelID)
|
||||
}
|
||||
if rf, ok := ret.Get(0).(func(int64, int64, string) []*model.ChannelMemberHistoryResult); ok {
|
||||
r0 = rf(startTime, endTime, channelID)
|
||||
} else {
|
||||
@@ -71,7 +81,6 @@ func (_m *ChannelMemberHistoryStore) GetUsersInChannelDuring(startTime int64, en
|
||||
}
|
||||
}
|
||||
|
||||
var r1 error
|
||||
if rf, ok := ret.Get(1).(func(int64, int64, string) error); ok {
|
||||
r1 = rf(startTime, endTime, channelID)
|
||||
} else {
|
||||
@@ -114,13 +123,16 @@ func (_m *ChannelMemberHistoryStore) PermanentDeleteBatch(endTime int64, limit i
|
||||
ret := _m.Called(endTime, limit)
|
||||
|
||||
var r0 int64
|
||||
var r1 error
|
||||
if rf, ok := ret.Get(0).(func(int64, int64) (int64, error)); ok {
|
||||
return rf(endTime, limit)
|
||||
}
|
||||
if rf, ok := ret.Get(0).(func(int64, int64) int64); ok {
|
||||
r0 = rf(endTime, limit)
|
||||
} else {
|
||||
r0 = ret.Get(0).(int64)
|
||||
}
|
||||
|
||||
var r1 error
|
||||
if rf, ok := ret.Get(1).(func(int64, int64) error); ok {
|
||||
r1 = rf(endTime, limit)
|
||||
} else {
|
||||
@@ -135,20 +147,23 @@ func (_m *ChannelMemberHistoryStore) PermanentDeleteBatchForRetentionPolicies(no
|
||||
ret := _m.Called(now, globalPolicyEndTime, limit, cursor)
|
||||
|
||||
var r0 int64
|
||||
var r1 model.RetentionPolicyCursor
|
||||
var r2 error
|
||||
if rf, ok := ret.Get(0).(func(int64, int64, int64, model.RetentionPolicyCursor) (int64, model.RetentionPolicyCursor, error)); ok {
|
||||
return rf(now, globalPolicyEndTime, limit, cursor)
|
||||
}
|
||||
if rf, ok := ret.Get(0).(func(int64, int64, int64, model.RetentionPolicyCursor) int64); ok {
|
||||
r0 = rf(now, globalPolicyEndTime, limit, cursor)
|
||||
} else {
|
||||
r0 = ret.Get(0).(int64)
|
||||
}
|
||||
|
||||
var r1 model.RetentionPolicyCursor
|
||||
if rf, ok := ret.Get(1).(func(int64, int64, int64, model.RetentionPolicyCursor) model.RetentionPolicyCursor); ok {
|
||||
r1 = rf(now, globalPolicyEndTime, limit, cursor)
|
||||
} else {
|
||||
r1 = ret.Get(1).(model.RetentionPolicyCursor)
|
||||
}
|
||||
|
||||
var r2 error
|
||||
if rf, ok := ret.Get(2).(func(int64, int64, int64, model.RetentionPolicyCursor) error); ok {
|
||||
r2 = rf(now, globalPolicyEndTime, limit, cursor)
|
||||
} else {
|
||||
@@ -157,3 +172,18 @@ func (_m *ChannelMemberHistoryStore) PermanentDeleteBatchForRetentionPolicies(no
|
||||
|
||||
return r0, r1, r2
|
||||
}
|
||||
|
||||
type mockConstructorTestingTNewChannelMemberHistoryStore interface {
|
||||
mock.TestingT
|
||||
Cleanup(func())
|
||||
}
|
||||
|
||||
// NewChannelMemberHistoryStore creates a new instance of ChannelMemberHistoryStore. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations.
|
||||
func NewChannelMemberHistoryStore(t mockConstructorTestingTNewChannelMemberHistoryStore) *ChannelMemberHistoryStore {
|
||||
mock := &ChannelMemberHistoryStore{}
|
||||
mock.Mock.Test(t)
|
||||
|
||||
t.Cleanup(func() { mock.AssertExpectations(t) })
|
||||
|
||||
return mock
|
||||
}
|
||||
|
||||
Разница между файлами не показана из-за своего большого размера
Загрузить разницу
@@ -1,4 +1,4 @@
|
||||
// Code generated by mockery v2.10.4. DO NOT EDIT.
|
||||
// Code generated by mockery v2.23.2. DO NOT EDIT.
|
||||
|
||||
// Regenerate this file using `make store-mocks`.
|
||||
|
||||
@@ -33,13 +33,16 @@ func (_m *ClusterDiscoveryStore) Delete(discovery *model.ClusterDiscovery) (bool
|
||||
ret := _m.Called(discovery)
|
||||
|
||||
var r0 bool
|
||||
var r1 error
|
||||
if rf, ok := ret.Get(0).(func(*model.ClusterDiscovery) (bool, error)); ok {
|
||||
return rf(discovery)
|
||||
}
|
||||
if rf, ok := ret.Get(0).(func(*model.ClusterDiscovery) bool); ok {
|
||||
r0 = rf(discovery)
|
||||
} else {
|
||||
r0 = ret.Get(0).(bool)
|
||||
}
|
||||
|
||||
var r1 error
|
||||
if rf, ok := ret.Get(1).(func(*model.ClusterDiscovery) error); ok {
|
||||
r1 = rf(discovery)
|
||||
} else {
|
||||
@@ -54,13 +57,16 @@ func (_m *ClusterDiscoveryStore) Exists(discovery *model.ClusterDiscovery) (bool
|
||||
ret := _m.Called(discovery)
|
||||
|
||||
var r0 bool
|
||||
var r1 error
|
||||
if rf, ok := ret.Get(0).(func(*model.ClusterDiscovery) (bool, error)); ok {
|
||||
return rf(discovery)
|
||||
}
|
||||
if rf, ok := ret.Get(0).(func(*model.ClusterDiscovery) bool); ok {
|
||||
r0 = rf(discovery)
|
||||
} else {
|
||||
r0 = ret.Get(0).(bool)
|
||||
}
|
||||
|
||||
var r1 error
|
||||
if rf, ok := ret.Get(1).(func(*model.ClusterDiscovery) error); ok {
|
||||
r1 = rf(discovery)
|
||||
} else {
|
||||
@@ -75,6 +81,10 @@ func (_m *ClusterDiscoveryStore) GetAll(discoveryType string, clusterName string
|
||||
ret := _m.Called(discoveryType, clusterName)
|
||||
|
||||
var r0 []*model.ClusterDiscovery
|
||||
var r1 error
|
||||
if rf, ok := ret.Get(0).(func(string, string) ([]*model.ClusterDiscovery, error)); ok {
|
||||
return rf(discoveryType, clusterName)
|
||||
}
|
||||
if rf, ok := ret.Get(0).(func(string, string) []*model.ClusterDiscovery); ok {
|
||||
r0 = rf(discoveryType, clusterName)
|
||||
} else {
|
||||
@@ -83,7 +93,6 @@ func (_m *ClusterDiscoveryStore) GetAll(discoveryType string, clusterName string
|
||||
}
|
||||
}
|
||||
|
||||
var r1 error
|
||||
if rf, ok := ret.Get(1).(func(string, string) error); ok {
|
||||
r1 = rf(discoveryType, clusterName)
|
||||
} else {
|
||||
@@ -120,3 +129,18 @@ func (_m *ClusterDiscoveryStore) SetLastPingAt(discovery *model.ClusterDiscovery
|
||||
|
||||
return r0
|
||||
}
|
||||
|
||||
type mockConstructorTestingTNewClusterDiscoveryStore interface {
|
||||
mock.TestingT
|
||||
Cleanup(func())
|
||||
}
|
||||
|
||||
// NewClusterDiscoveryStore creates a new instance of ClusterDiscoveryStore. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations.
|
||||
func NewClusterDiscoveryStore(t mockConstructorTestingTNewClusterDiscoveryStore) *ClusterDiscoveryStore {
|
||||
mock := &ClusterDiscoveryStore{}
|
||||
mock.Mock.Test(t)
|
||||
|
||||
t.Cleanup(func() { mock.AssertExpectations(t) })
|
||||
|
||||
return mock
|
||||
}
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
// Code generated by mockery v2.10.4. DO NOT EDIT.
|
||||
// Code generated by mockery v2.23.2. DO NOT EDIT.
|
||||
|
||||
// Regenerate this file using `make store-mocks`.
|
||||
|
||||
@@ -19,13 +19,16 @@ func (_m *CommandStore) AnalyticsCommandCount(teamID string) (int64, error) {
|
||||
ret := _m.Called(teamID)
|
||||
|
||||
var r0 int64
|
||||
var r1 error
|
||||
if rf, ok := ret.Get(0).(func(string) (int64, error)); ok {
|
||||
return rf(teamID)
|
||||
}
|
||||
if rf, ok := ret.Get(0).(func(string) int64); ok {
|
||||
r0 = rf(teamID)
|
||||
} else {
|
||||
r0 = ret.Get(0).(int64)
|
||||
}
|
||||
|
||||
var r1 error
|
||||
if rf, ok := ret.Get(1).(func(string) error); ok {
|
||||
r1 = rf(teamID)
|
||||
} else {
|
||||
@@ -54,6 +57,10 @@ func (_m *CommandStore) Get(id string) (*model.Command, error) {
|
||||
ret := _m.Called(id)
|
||||
|
||||
var r0 *model.Command
|
||||
var r1 error
|
||||
if rf, ok := ret.Get(0).(func(string) (*model.Command, error)); ok {
|
||||
return rf(id)
|
||||
}
|
||||
if rf, ok := ret.Get(0).(func(string) *model.Command); ok {
|
||||
r0 = rf(id)
|
||||
} else {
|
||||
@@ -62,7 +69,6 @@ func (_m *CommandStore) Get(id string) (*model.Command, error) {
|
||||
}
|
||||
}
|
||||
|
||||
var r1 error
|
||||
if rf, ok := ret.Get(1).(func(string) error); ok {
|
||||
r1 = rf(id)
|
||||
} else {
|
||||
@@ -77,6 +83,10 @@ func (_m *CommandStore) GetByTeam(teamID string) ([]*model.Command, error) {
|
||||
ret := _m.Called(teamID)
|
||||
|
||||
var r0 []*model.Command
|
||||
var r1 error
|
||||
if rf, ok := ret.Get(0).(func(string) ([]*model.Command, error)); ok {
|
||||
return rf(teamID)
|
||||
}
|
||||
if rf, ok := ret.Get(0).(func(string) []*model.Command); ok {
|
||||
r0 = rf(teamID)
|
||||
} else {
|
||||
@@ -85,7 +95,6 @@ func (_m *CommandStore) GetByTeam(teamID string) ([]*model.Command, error) {
|
||||
}
|
||||
}
|
||||
|
||||
var r1 error
|
||||
if rf, ok := ret.Get(1).(func(string) error); ok {
|
||||
r1 = rf(teamID)
|
||||
} else {
|
||||
@@ -100,6 +109,10 @@ func (_m *CommandStore) GetByTrigger(teamID string, trigger string) (*model.Comm
|
||||
ret := _m.Called(teamID, trigger)
|
||||
|
||||
var r0 *model.Command
|
||||
var r1 error
|
||||
if rf, ok := ret.Get(0).(func(string, string) (*model.Command, error)); ok {
|
||||
return rf(teamID, trigger)
|
||||
}
|
||||
if rf, ok := ret.Get(0).(func(string, string) *model.Command); ok {
|
||||
r0 = rf(teamID, trigger)
|
||||
} else {
|
||||
@@ -108,7 +121,6 @@ func (_m *CommandStore) GetByTrigger(teamID string, trigger string) (*model.Comm
|
||||
}
|
||||
}
|
||||
|
||||
var r1 error
|
||||
if rf, ok := ret.Get(1).(func(string, string) error); ok {
|
||||
r1 = rf(teamID, trigger)
|
||||
} else {
|
||||
@@ -151,6 +163,10 @@ func (_m *CommandStore) Save(webhook *model.Command) (*model.Command, error) {
|
||||
ret := _m.Called(webhook)
|
||||
|
||||
var r0 *model.Command
|
||||
var r1 error
|
||||
if rf, ok := ret.Get(0).(func(*model.Command) (*model.Command, error)); ok {
|
||||
return rf(webhook)
|
||||
}
|
||||
if rf, ok := ret.Get(0).(func(*model.Command) *model.Command); ok {
|
||||
r0 = rf(webhook)
|
||||
} else {
|
||||
@@ -159,7 +175,6 @@ func (_m *CommandStore) Save(webhook *model.Command) (*model.Command, error) {
|
||||
}
|
||||
}
|
||||
|
||||
var r1 error
|
||||
if rf, ok := ret.Get(1).(func(*model.Command) error); ok {
|
||||
r1 = rf(webhook)
|
||||
} else {
|
||||
@@ -174,6 +189,10 @@ func (_m *CommandStore) Update(hook *model.Command) (*model.Command, error) {
|
||||
ret := _m.Called(hook)
|
||||
|
||||
var r0 *model.Command
|
||||
var r1 error
|
||||
if rf, ok := ret.Get(0).(func(*model.Command) (*model.Command, error)); ok {
|
||||
return rf(hook)
|
||||
}
|
||||
if rf, ok := ret.Get(0).(func(*model.Command) *model.Command); ok {
|
||||
r0 = rf(hook)
|
||||
} else {
|
||||
@@ -182,7 +201,6 @@ func (_m *CommandStore) Update(hook *model.Command) (*model.Command, error) {
|
||||
}
|
||||
}
|
||||
|
||||
var r1 error
|
||||
if rf, ok := ret.Get(1).(func(*model.Command) error); ok {
|
||||
r1 = rf(hook)
|
||||
} else {
|
||||
@@ -191,3 +209,18 @@ func (_m *CommandStore) Update(hook *model.Command) (*model.Command, error) {
|
||||
|
||||
return r0, r1
|
||||
}
|
||||
|
||||
type mockConstructorTestingTNewCommandStore interface {
|
||||
mock.TestingT
|
||||
Cleanup(func())
|
||||
}
|
||||
|
||||
// NewCommandStore creates a new instance of CommandStore. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations.
|
||||
func NewCommandStore(t mockConstructorTestingTNewCommandStore) *CommandStore {
|
||||
mock := &CommandStore{}
|
||||
mock.Mock.Test(t)
|
||||
|
||||
t.Cleanup(func() { mock.AssertExpectations(t) })
|
||||
|
||||
return mock
|
||||
}
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
// Code generated by mockery v2.10.4. DO NOT EDIT.
|
||||
// Code generated by mockery v2.23.2. DO NOT EDIT.
|
||||
|
||||
// Regenerate this file using `make store-mocks`.
|
||||
|
||||
@@ -24,6 +24,10 @@ func (_m *CommandWebhookStore) Get(id string) (*model.CommandWebhook, error) {
|
||||
ret := _m.Called(id)
|
||||
|
||||
var r0 *model.CommandWebhook
|
||||
var r1 error
|
||||
if rf, ok := ret.Get(0).(func(string) (*model.CommandWebhook, error)); ok {
|
||||
return rf(id)
|
||||
}
|
||||
if rf, ok := ret.Get(0).(func(string) *model.CommandWebhook); ok {
|
||||
r0 = rf(id)
|
||||
} else {
|
||||
@@ -32,7 +36,6 @@ func (_m *CommandWebhookStore) Get(id string) (*model.CommandWebhook, error) {
|
||||
}
|
||||
}
|
||||
|
||||
var r1 error
|
||||
if rf, ok := ret.Get(1).(func(string) error); ok {
|
||||
r1 = rf(id)
|
||||
} else {
|
||||
@@ -47,6 +50,10 @@ func (_m *CommandWebhookStore) Save(webhook *model.CommandWebhook) (*model.Comma
|
||||
ret := _m.Called(webhook)
|
||||
|
||||
var r0 *model.CommandWebhook
|
||||
var r1 error
|
||||
if rf, ok := ret.Get(0).(func(*model.CommandWebhook) (*model.CommandWebhook, error)); ok {
|
||||
return rf(webhook)
|
||||
}
|
||||
if rf, ok := ret.Get(0).(func(*model.CommandWebhook) *model.CommandWebhook); ok {
|
||||
r0 = rf(webhook)
|
||||
} else {
|
||||
@@ -55,7 +62,6 @@ func (_m *CommandWebhookStore) Save(webhook *model.CommandWebhook) (*model.Comma
|
||||
}
|
||||
}
|
||||
|
||||
var r1 error
|
||||
if rf, ok := ret.Get(1).(func(*model.CommandWebhook) error); ok {
|
||||
r1 = rf(webhook)
|
||||
} else {
|
||||
@@ -78,3 +84,18 @@ func (_m *CommandWebhookStore) TryUse(id string, limit int) error {
|
||||
|
||||
return r0
|
||||
}
|
||||
|
||||
type mockConstructorTestingTNewCommandWebhookStore interface {
|
||||
mock.TestingT
|
||||
Cleanup(func())
|
||||
}
|
||||
|
||||
// NewCommandWebhookStore creates a new instance of CommandWebhookStore. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations.
|
||||
func NewCommandWebhookStore(t mockConstructorTestingTNewCommandWebhookStore) *CommandWebhookStore {
|
||||
mock := &CommandWebhookStore{}
|
||||
mock.Mock.Test(t)
|
||||
|
||||
t.Cleanup(func() { mock.AssertExpectations(t) })
|
||||
|
||||
return mock
|
||||
}
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
// Code generated by mockery v2.10.4. DO NOT EDIT.
|
||||
// Code generated by mockery v2.23.2. DO NOT EDIT.
|
||||
|
||||
// Regenerate this file using `make store-mocks`.
|
||||
|
||||
@@ -21,6 +21,11 @@ func (_m *ComplianceStore) ComplianceExport(compliance *model.Compliance, cursor
|
||||
ret := _m.Called(compliance, cursor, limit)
|
||||
|
||||
var r0 []*model.CompliancePost
|
||||
var r1 model.ComplianceExportCursor
|
||||
var r2 error
|
||||
if rf, ok := ret.Get(0).(func(*model.Compliance, model.ComplianceExportCursor, int) ([]*model.CompliancePost, model.ComplianceExportCursor, error)); ok {
|
||||
return rf(compliance, cursor, limit)
|
||||
}
|
||||
if rf, ok := ret.Get(0).(func(*model.Compliance, model.ComplianceExportCursor, int) []*model.CompliancePost); ok {
|
||||
r0 = rf(compliance, cursor, limit)
|
||||
} else {
|
||||
@@ -29,14 +34,12 @@ func (_m *ComplianceStore) ComplianceExport(compliance *model.Compliance, cursor
|
||||
}
|
||||
}
|
||||
|
||||
var r1 model.ComplianceExportCursor
|
||||
if rf, ok := ret.Get(1).(func(*model.Compliance, model.ComplianceExportCursor, int) model.ComplianceExportCursor); ok {
|
||||
r1 = rf(compliance, cursor, limit)
|
||||
} else {
|
||||
r1 = ret.Get(1).(model.ComplianceExportCursor)
|
||||
}
|
||||
|
||||
var r2 error
|
||||
if rf, ok := ret.Get(2).(func(*model.Compliance, model.ComplianceExportCursor, int) error); ok {
|
||||
r2 = rf(compliance, cursor, limit)
|
||||
} else {
|
||||
@@ -51,6 +54,10 @@ func (_m *ComplianceStore) Get(id string) (*model.Compliance, error) {
|
||||
ret := _m.Called(id)
|
||||
|
||||
var r0 *model.Compliance
|
||||
var r1 error
|
||||
if rf, ok := ret.Get(0).(func(string) (*model.Compliance, error)); ok {
|
||||
return rf(id)
|
||||
}
|
||||
if rf, ok := ret.Get(0).(func(string) *model.Compliance); ok {
|
||||
r0 = rf(id)
|
||||
} else {
|
||||
@@ -59,7 +66,6 @@ func (_m *ComplianceStore) Get(id string) (*model.Compliance, error) {
|
||||
}
|
||||
}
|
||||
|
||||
var r1 error
|
||||
if rf, ok := ret.Get(1).(func(string) error); ok {
|
||||
r1 = rf(id)
|
||||
} else {
|
||||
@@ -74,6 +80,10 @@ func (_m *ComplianceStore) GetAll(offset int, limit int) (model.Compliances, err
|
||||
ret := _m.Called(offset, limit)
|
||||
|
||||
var r0 model.Compliances
|
||||
var r1 error
|
||||
if rf, ok := ret.Get(0).(func(int, int) (model.Compliances, error)); ok {
|
||||
return rf(offset, limit)
|
||||
}
|
||||
if rf, ok := ret.Get(0).(func(int, int) model.Compliances); ok {
|
||||
r0 = rf(offset, limit)
|
||||
} else {
|
||||
@@ -82,7 +92,6 @@ func (_m *ComplianceStore) GetAll(offset int, limit int) (model.Compliances, err
|
||||
}
|
||||
}
|
||||
|
||||
var r1 error
|
||||
if rf, ok := ret.Get(1).(func(int, int) error); ok {
|
||||
r1 = rf(offset, limit)
|
||||
} else {
|
||||
@@ -97,6 +106,11 @@ func (_m *ComplianceStore) MessageExport(ctx context.Context, cursor model.Messa
|
||||
ret := _m.Called(ctx, cursor, limit)
|
||||
|
||||
var r0 []*model.MessageExport
|
||||
var r1 model.MessageExportCursor
|
||||
var r2 error
|
||||
if rf, ok := ret.Get(0).(func(context.Context, model.MessageExportCursor, int) ([]*model.MessageExport, model.MessageExportCursor, error)); ok {
|
||||
return rf(ctx, cursor, limit)
|
||||
}
|
||||
if rf, ok := ret.Get(0).(func(context.Context, model.MessageExportCursor, int) []*model.MessageExport); ok {
|
||||
r0 = rf(ctx, cursor, limit)
|
||||
} else {
|
||||
@@ -105,14 +119,12 @@ func (_m *ComplianceStore) MessageExport(ctx context.Context, cursor model.Messa
|
||||
}
|
||||
}
|
||||
|
||||
var r1 model.MessageExportCursor
|
||||
if rf, ok := ret.Get(1).(func(context.Context, model.MessageExportCursor, int) model.MessageExportCursor); ok {
|
||||
r1 = rf(ctx, cursor, limit)
|
||||
} else {
|
||||
r1 = ret.Get(1).(model.MessageExportCursor)
|
||||
}
|
||||
|
||||
var r2 error
|
||||
if rf, ok := ret.Get(2).(func(context.Context, model.MessageExportCursor, int) error); ok {
|
||||
r2 = rf(ctx, cursor, limit)
|
||||
} else {
|
||||
@@ -127,6 +139,10 @@ func (_m *ComplianceStore) Save(compliance *model.Compliance) (*model.Compliance
|
||||
ret := _m.Called(compliance)
|
||||
|
||||
var r0 *model.Compliance
|
||||
var r1 error
|
||||
if rf, ok := ret.Get(0).(func(*model.Compliance) (*model.Compliance, error)); ok {
|
||||
return rf(compliance)
|
||||
}
|
||||
if rf, ok := ret.Get(0).(func(*model.Compliance) *model.Compliance); ok {
|
||||
r0 = rf(compliance)
|
||||
} else {
|
||||
@@ -135,7 +151,6 @@ func (_m *ComplianceStore) Save(compliance *model.Compliance) (*model.Compliance
|
||||
}
|
||||
}
|
||||
|
||||
var r1 error
|
||||
if rf, ok := ret.Get(1).(func(*model.Compliance) error); ok {
|
||||
r1 = rf(compliance)
|
||||
} else {
|
||||
@@ -150,6 +165,10 @@ func (_m *ComplianceStore) Update(compliance *model.Compliance) (*model.Complian
|
||||
ret := _m.Called(compliance)
|
||||
|
||||
var r0 *model.Compliance
|
||||
var r1 error
|
||||
if rf, ok := ret.Get(0).(func(*model.Compliance) (*model.Compliance, error)); ok {
|
||||
return rf(compliance)
|
||||
}
|
||||
if rf, ok := ret.Get(0).(func(*model.Compliance) *model.Compliance); ok {
|
||||
r0 = rf(compliance)
|
||||
} else {
|
||||
@@ -158,7 +177,6 @@ func (_m *ComplianceStore) Update(compliance *model.Compliance) (*model.Complian
|
||||
}
|
||||
}
|
||||
|
||||
var r1 error
|
||||
if rf, ok := ret.Get(1).(func(*model.Compliance) error); ok {
|
||||
r1 = rf(compliance)
|
||||
} else {
|
||||
@@ -167,3 +185,18 @@ func (_m *ComplianceStore) Update(compliance *model.Compliance) (*model.Complian
|
||||
|
||||
return r0, r1
|
||||
}
|
||||
|
||||
type mockConstructorTestingTNewComplianceStore interface {
|
||||
mock.TestingT
|
||||
Cleanup(func())
|
||||
}
|
||||
|
||||
// NewComplianceStore creates a new instance of ComplianceStore. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations.
|
||||
func NewComplianceStore(t mockConstructorTestingTNewComplianceStore) *ComplianceStore {
|
||||
mock := &ComplianceStore{}
|
||||
mock.Mock.Test(t)
|
||||
|
||||
t.Cleanup(func() { mock.AssertExpectations(t) })
|
||||
|
||||
return mock
|
||||
}
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
// Code generated by mockery v2.10.4. DO NOT EDIT.
|
||||
// Code generated by mockery v2.23.2. DO NOT EDIT.
|
||||
|
||||
// Regenerate this file using `make store-mocks`.
|
||||
|
||||
@@ -33,6 +33,10 @@ func (_m *DraftStore) Get(userID string, channelID string, rootID string, includ
|
||||
ret := _m.Called(userID, channelID, rootID, includeDeleted)
|
||||
|
||||
var r0 *model.Draft
|
||||
var r1 error
|
||||
if rf, ok := ret.Get(0).(func(string, string, string, bool) (*model.Draft, error)); ok {
|
||||
return rf(userID, channelID, rootID, includeDeleted)
|
||||
}
|
||||
if rf, ok := ret.Get(0).(func(string, string, string, bool) *model.Draft); ok {
|
||||
r0 = rf(userID, channelID, rootID, includeDeleted)
|
||||
} else {
|
||||
@@ -41,7 +45,6 @@ func (_m *DraftStore) Get(userID string, channelID string, rootID string, includ
|
||||
}
|
||||
}
|
||||
|
||||
var r1 error
|
||||
if rf, ok := ret.Get(1).(func(string, string, string, bool) error); ok {
|
||||
r1 = rf(userID, channelID, rootID, includeDeleted)
|
||||
} else {
|
||||
@@ -56,6 +59,10 @@ func (_m *DraftStore) GetDraftsForUser(userID string, teamID string) ([]*model.D
|
||||
ret := _m.Called(userID, teamID)
|
||||
|
||||
var r0 []*model.Draft
|
||||
var r1 error
|
||||
if rf, ok := ret.Get(0).(func(string, string) ([]*model.Draft, error)); ok {
|
||||
return rf(userID, teamID)
|
||||
}
|
||||
if rf, ok := ret.Get(0).(func(string, string) []*model.Draft); ok {
|
||||
r0 = rf(userID, teamID)
|
||||
} else {
|
||||
@@ -64,7 +71,6 @@ func (_m *DraftStore) GetDraftsForUser(userID string, teamID string) ([]*model.D
|
||||
}
|
||||
}
|
||||
|
||||
var r1 error
|
||||
if rf, ok := ret.Get(1).(func(string, string) error); ok {
|
||||
r1 = rf(userID, teamID)
|
||||
} else {
|
||||
@@ -79,6 +85,10 @@ func (_m *DraftStore) Upsert(d *model.Draft) (*model.Draft, error) {
|
||||
ret := _m.Called(d)
|
||||
|
||||
var r0 *model.Draft
|
||||
var r1 error
|
||||
if rf, ok := ret.Get(0).(func(*model.Draft) (*model.Draft, error)); ok {
|
||||
return rf(d)
|
||||
}
|
||||
if rf, ok := ret.Get(0).(func(*model.Draft) *model.Draft); ok {
|
||||
r0 = rf(d)
|
||||
} else {
|
||||
@@ -87,7 +97,6 @@ func (_m *DraftStore) Upsert(d *model.Draft) (*model.Draft, error) {
|
||||
}
|
||||
}
|
||||
|
||||
var r1 error
|
||||
if rf, ok := ret.Get(1).(func(*model.Draft) error); ok {
|
||||
r1 = rf(d)
|
||||
} else {
|
||||
@@ -96,3 +105,18 @@ func (_m *DraftStore) Upsert(d *model.Draft) (*model.Draft, error) {
|
||||
|
||||
return r0, r1
|
||||
}
|
||||
|
||||
type mockConstructorTestingTNewDraftStore interface {
|
||||
mock.TestingT
|
||||
Cleanup(func())
|
||||
}
|
||||
|
||||
// NewDraftStore creates a new instance of DraftStore. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations.
|
||||
func NewDraftStore(t mockConstructorTestingTNewDraftStore) *DraftStore {
|
||||
mock := &DraftStore{}
|
||||
mock.Mock.Test(t)
|
||||
|
||||
t.Cleanup(func() { mock.AssertExpectations(t) })
|
||||
|
||||
return mock
|
||||
}
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
// Code generated by mockery v2.10.4. DO NOT EDIT.
|
||||
// Code generated by mockery v2.23.2. DO NOT EDIT.
|
||||
|
||||
// Regenerate this file using `make store-mocks`.
|
||||
|
||||
@@ -35,6 +35,10 @@ func (_m *EmojiStore) Get(ctx context.Context, id string, allowFromCache bool) (
|
||||
ret := _m.Called(ctx, id, allowFromCache)
|
||||
|
||||
var r0 *model.Emoji
|
||||
var r1 error
|
||||
if rf, ok := ret.Get(0).(func(context.Context, string, bool) (*model.Emoji, error)); ok {
|
||||
return rf(ctx, id, allowFromCache)
|
||||
}
|
||||
if rf, ok := ret.Get(0).(func(context.Context, string, bool) *model.Emoji); ok {
|
||||
r0 = rf(ctx, id, allowFromCache)
|
||||
} else {
|
||||
@@ -43,7 +47,6 @@ func (_m *EmojiStore) Get(ctx context.Context, id string, allowFromCache bool) (
|
||||
}
|
||||
}
|
||||
|
||||
var r1 error
|
||||
if rf, ok := ret.Get(1).(func(context.Context, string, bool) error); ok {
|
||||
r1 = rf(ctx, id, allowFromCache)
|
||||
} else {
|
||||
@@ -58,6 +61,10 @@ func (_m *EmojiStore) GetByName(ctx context.Context, name string, allowFromCache
|
||||
ret := _m.Called(ctx, name, allowFromCache)
|
||||
|
||||
var r0 *model.Emoji
|
||||
var r1 error
|
||||
if rf, ok := ret.Get(0).(func(context.Context, string, bool) (*model.Emoji, error)); ok {
|
||||
return rf(ctx, name, allowFromCache)
|
||||
}
|
||||
if rf, ok := ret.Get(0).(func(context.Context, string, bool) *model.Emoji); ok {
|
||||
r0 = rf(ctx, name, allowFromCache)
|
||||
} else {
|
||||
@@ -66,7 +73,6 @@ func (_m *EmojiStore) GetByName(ctx context.Context, name string, allowFromCache
|
||||
}
|
||||
}
|
||||
|
||||
var r1 error
|
||||
if rf, ok := ret.Get(1).(func(context.Context, string, bool) error); ok {
|
||||
r1 = rf(ctx, name, allowFromCache)
|
||||
} else {
|
||||
@@ -81,6 +87,10 @@ func (_m *EmojiStore) GetList(offset int, limit int, sort string) ([]*model.Emoj
|
||||
ret := _m.Called(offset, limit, sort)
|
||||
|
||||
var r0 []*model.Emoji
|
||||
var r1 error
|
||||
if rf, ok := ret.Get(0).(func(int, int, string) ([]*model.Emoji, error)); ok {
|
||||
return rf(offset, limit, sort)
|
||||
}
|
||||
if rf, ok := ret.Get(0).(func(int, int, string) []*model.Emoji); ok {
|
||||
r0 = rf(offset, limit, sort)
|
||||
} else {
|
||||
@@ -89,7 +99,6 @@ func (_m *EmojiStore) GetList(offset int, limit int, sort string) ([]*model.Emoj
|
||||
}
|
||||
}
|
||||
|
||||
var r1 error
|
||||
if rf, ok := ret.Get(1).(func(int, int, string) error); ok {
|
||||
r1 = rf(offset, limit, sort)
|
||||
} else {
|
||||
@@ -104,6 +113,10 @@ func (_m *EmojiStore) GetMultipleByName(names []string) ([]*model.Emoji, error)
|
||||
ret := _m.Called(names)
|
||||
|
||||
var r0 []*model.Emoji
|
||||
var r1 error
|
||||
if rf, ok := ret.Get(0).(func([]string) ([]*model.Emoji, error)); ok {
|
||||
return rf(names)
|
||||
}
|
||||
if rf, ok := ret.Get(0).(func([]string) []*model.Emoji); ok {
|
||||
r0 = rf(names)
|
||||
} else {
|
||||
@@ -112,7 +125,6 @@ func (_m *EmojiStore) GetMultipleByName(names []string) ([]*model.Emoji, error)
|
||||
}
|
||||
}
|
||||
|
||||
var r1 error
|
||||
if rf, ok := ret.Get(1).(func([]string) error); ok {
|
||||
r1 = rf(names)
|
||||
} else {
|
||||
@@ -127,6 +139,10 @@ func (_m *EmojiStore) Save(emoji *model.Emoji) (*model.Emoji, error) {
|
||||
ret := _m.Called(emoji)
|
||||
|
||||
var r0 *model.Emoji
|
||||
var r1 error
|
||||
if rf, ok := ret.Get(0).(func(*model.Emoji) (*model.Emoji, error)); ok {
|
||||
return rf(emoji)
|
||||
}
|
||||
if rf, ok := ret.Get(0).(func(*model.Emoji) *model.Emoji); ok {
|
||||
r0 = rf(emoji)
|
||||
} else {
|
||||
@@ -135,7 +151,6 @@ func (_m *EmojiStore) Save(emoji *model.Emoji) (*model.Emoji, error) {
|
||||
}
|
||||
}
|
||||
|
||||
var r1 error
|
||||
if rf, ok := ret.Get(1).(func(*model.Emoji) error); ok {
|
||||
r1 = rf(emoji)
|
||||
} else {
|
||||
@@ -150,6 +165,10 @@ func (_m *EmojiStore) Search(name string, prefixOnly bool, limit int) ([]*model.
|
||||
ret := _m.Called(name, prefixOnly, limit)
|
||||
|
||||
var r0 []*model.Emoji
|
||||
var r1 error
|
||||
if rf, ok := ret.Get(0).(func(string, bool, int) ([]*model.Emoji, error)); ok {
|
||||
return rf(name, prefixOnly, limit)
|
||||
}
|
||||
if rf, ok := ret.Get(0).(func(string, bool, int) []*model.Emoji); ok {
|
||||
r0 = rf(name, prefixOnly, limit)
|
||||
} else {
|
||||
@@ -158,7 +177,6 @@ func (_m *EmojiStore) Search(name string, prefixOnly bool, limit int) ([]*model.
|
||||
}
|
||||
}
|
||||
|
||||
var r1 error
|
||||
if rf, ok := ret.Get(1).(func(string, bool, int) error); ok {
|
||||
r1 = rf(name, prefixOnly, limit)
|
||||
} else {
|
||||
@@ -167,3 +185,18 @@ func (_m *EmojiStore) Search(name string, prefixOnly bool, limit int) ([]*model.
|
||||
|
||||
return r0, r1
|
||||
}
|
||||
|
||||
type mockConstructorTestingTNewEmojiStore interface {
|
||||
mock.TestingT
|
||||
Cleanup(func())
|
||||
}
|
||||
|
||||
// NewEmojiStore creates a new instance of EmojiStore. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations.
|
||||
func NewEmojiStore(t mockConstructorTestingTNewEmojiStore) *EmojiStore {
|
||||
mock := &EmojiStore{}
|
||||
mock.Mock.Test(t)
|
||||
|
||||
t.Cleanup(func() { mock.AssertExpectations(t) })
|
||||
|
||||
return mock
|
||||
}
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
// Code generated by mockery v2.10.4. DO NOT EDIT.
|
||||
// Code generated by mockery v2.23.2. DO NOT EDIT.
|
||||
|
||||
// Regenerate this file using `make store-mocks`.
|
||||
|
||||
@@ -38,13 +38,16 @@ func (_m *FileInfoStore) CountAll() (int64, error) {
|
||||
ret := _m.Called()
|
||||
|
||||
var r0 int64
|
||||
var r1 error
|
||||
if rf, ok := ret.Get(0).(func() (int64, error)); ok {
|
||||
return rf()
|
||||
}
|
||||
if rf, ok := ret.Get(0).(func() int64); ok {
|
||||
r0 = rf()
|
||||
} else {
|
||||
r0 = ret.Get(0).(int64)
|
||||
}
|
||||
|
||||
var r1 error
|
||||
if rf, ok := ret.Get(1).(func() error); ok {
|
||||
r1 = rf()
|
||||
} else {
|
||||
@@ -59,13 +62,16 @@ func (_m *FileInfoStore) DeleteForPost(postID string) (string, error) {
|
||||
ret := _m.Called(postID)
|
||||
|
||||
var r0 string
|
||||
var r1 error
|
||||
if rf, ok := ret.Get(0).(func(string) (string, error)); ok {
|
||||
return rf(postID)
|
||||
}
|
||||
if rf, ok := ret.Get(0).(func(string) string); ok {
|
||||
r0 = rf(postID)
|
||||
} else {
|
||||
r0 = ret.Get(0).(string)
|
||||
}
|
||||
|
||||
var r1 error
|
||||
if rf, ok := ret.Get(1).(func(string) error); ok {
|
||||
r1 = rf(postID)
|
||||
} else {
|
||||
@@ -80,6 +86,10 @@ func (_m *FileInfoStore) Get(id string) (*model.FileInfo, error) {
|
||||
ret := _m.Called(id)
|
||||
|
||||
var r0 *model.FileInfo
|
||||
var r1 error
|
||||
if rf, ok := ret.Get(0).(func(string) (*model.FileInfo, error)); ok {
|
||||
return rf(id)
|
||||
}
|
||||
if rf, ok := ret.Get(0).(func(string) *model.FileInfo); ok {
|
||||
r0 = rf(id)
|
||||
} else {
|
||||
@@ -88,7 +98,6 @@ func (_m *FileInfoStore) Get(id string) (*model.FileInfo, error) {
|
||||
}
|
||||
}
|
||||
|
||||
var r1 error
|
||||
if rf, ok := ret.Get(1).(func(string) error); ok {
|
||||
r1 = rf(id)
|
||||
} else {
|
||||
@@ -103,6 +112,10 @@ func (_m *FileInfoStore) GetByIds(ids []string) ([]*model.FileInfo, error) {
|
||||
ret := _m.Called(ids)
|
||||
|
||||
var r0 []*model.FileInfo
|
||||
var r1 error
|
||||
if rf, ok := ret.Get(0).(func([]string) ([]*model.FileInfo, error)); ok {
|
||||
return rf(ids)
|
||||
}
|
||||
if rf, ok := ret.Get(0).(func([]string) []*model.FileInfo); ok {
|
||||
r0 = rf(ids)
|
||||
} else {
|
||||
@@ -111,7 +124,6 @@ func (_m *FileInfoStore) GetByIds(ids []string) ([]*model.FileInfo, error) {
|
||||
}
|
||||
}
|
||||
|
||||
var r1 error
|
||||
if rf, ok := ret.Get(1).(func([]string) error); ok {
|
||||
r1 = rf(ids)
|
||||
} else {
|
||||
@@ -126,6 +138,10 @@ func (_m *FileInfoStore) GetByPath(path string) (*model.FileInfo, error) {
|
||||
ret := _m.Called(path)
|
||||
|
||||
var r0 *model.FileInfo
|
||||
var r1 error
|
||||
if rf, ok := ret.Get(0).(func(string) (*model.FileInfo, error)); ok {
|
||||
return rf(path)
|
||||
}
|
||||
if rf, ok := ret.Get(0).(func(string) *model.FileInfo); ok {
|
||||
r0 = rf(path)
|
||||
} else {
|
||||
@@ -134,7 +150,6 @@ func (_m *FileInfoStore) GetByPath(path string) (*model.FileInfo, error) {
|
||||
}
|
||||
}
|
||||
|
||||
var r1 error
|
||||
if rf, ok := ret.Get(1).(func(string) error); ok {
|
||||
r1 = rf(path)
|
||||
} else {
|
||||
@@ -149,6 +164,10 @@ func (_m *FileInfoStore) GetFilesBatchForIndexing(startTime int64, startFileID s
|
||||
ret := _m.Called(startTime, startFileID, limit)
|
||||
|
||||
var r0 []*model.FileForIndexing
|
||||
var r1 error
|
||||
if rf, ok := ret.Get(0).(func(int64, string, int) ([]*model.FileForIndexing, error)); ok {
|
||||
return rf(startTime, startFileID, limit)
|
||||
}
|
||||
if rf, ok := ret.Get(0).(func(int64, string, int) []*model.FileForIndexing); ok {
|
||||
r0 = rf(startTime, startFileID, limit)
|
||||
} else {
|
||||
@@ -157,7 +176,6 @@ func (_m *FileInfoStore) GetFilesBatchForIndexing(startTime int64, startFileID s
|
||||
}
|
||||
}
|
||||
|
||||
var r1 error
|
||||
if rf, ok := ret.Get(1).(func(int64, string, int) error); ok {
|
||||
r1 = rf(startTime, startFileID, limit)
|
||||
} else {
|
||||
@@ -172,6 +190,10 @@ func (_m *FileInfoStore) GetForPost(postID string, readFromMaster bool, includeD
|
||||
ret := _m.Called(postID, readFromMaster, includeDeleted, allowFromCache)
|
||||
|
||||
var r0 []*model.FileInfo
|
||||
var r1 error
|
||||
if rf, ok := ret.Get(0).(func(string, bool, bool, bool) ([]*model.FileInfo, error)); ok {
|
||||
return rf(postID, readFromMaster, includeDeleted, allowFromCache)
|
||||
}
|
||||
if rf, ok := ret.Get(0).(func(string, bool, bool, bool) []*model.FileInfo); ok {
|
||||
r0 = rf(postID, readFromMaster, includeDeleted, allowFromCache)
|
||||
} else {
|
||||
@@ -180,7 +202,6 @@ func (_m *FileInfoStore) GetForPost(postID string, readFromMaster bool, includeD
|
||||
}
|
||||
}
|
||||
|
||||
var r1 error
|
||||
if rf, ok := ret.Get(1).(func(string, bool, bool, bool) error); ok {
|
||||
r1 = rf(postID, readFromMaster, includeDeleted, allowFromCache)
|
||||
} else {
|
||||
@@ -195,6 +216,10 @@ func (_m *FileInfoStore) GetForUser(userID string) ([]*model.FileInfo, error) {
|
||||
ret := _m.Called(userID)
|
||||
|
||||
var r0 []*model.FileInfo
|
||||
var r1 error
|
||||
if rf, ok := ret.Get(0).(func(string) ([]*model.FileInfo, error)); ok {
|
||||
return rf(userID)
|
||||
}
|
||||
if rf, ok := ret.Get(0).(func(string) []*model.FileInfo); ok {
|
||||
r0 = rf(userID)
|
||||
} else {
|
||||
@@ -203,7 +228,6 @@ func (_m *FileInfoStore) GetForUser(userID string) ([]*model.FileInfo, error) {
|
||||
}
|
||||
}
|
||||
|
||||
var r1 error
|
||||
if rf, ok := ret.Get(1).(func(string) error); ok {
|
||||
r1 = rf(userID)
|
||||
} else {
|
||||
@@ -218,6 +242,10 @@ func (_m *FileInfoStore) GetFromMaster(id string) (*model.FileInfo, error) {
|
||||
ret := _m.Called(id)
|
||||
|
||||
var r0 *model.FileInfo
|
||||
var r1 error
|
||||
if rf, ok := ret.Get(0).(func(string) (*model.FileInfo, error)); ok {
|
||||
return rf(id)
|
||||
}
|
||||
if rf, ok := ret.Get(0).(func(string) *model.FileInfo); ok {
|
||||
r0 = rf(id)
|
||||
} else {
|
||||
@@ -226,7 +254,6 @@ func (_m *FileInfoStore) GetFromMaster(id string) (*model.FileInfo, error) {
|
||||
}
|
||||
}
|
||||
|
||||
var r1 error
|
||||
if rf, ok := ret.Get(1).(func(string) error); ok {
|
||||
r1 = rf(id)
|
||||
} else {
|
||||
@@ -241,13 +268,16 @@ func (_m *FileInfoStore) GetStorageUsage(allowFromCache bool, includeDeleted boo
|
||||
ret := _m.Called(allowFromCache, includeDeleted)
|
||||
|
||||
var r0 int64
|
||||
var r1 error
|
||||
if rf, ok := ret.Get(0).(func(bool, bool) (int64, error)); ok {
|
||||
return rf(allowFromCache, includeDeleted)
|
||||
}
|
||||
if rf, ok := ret.Get(0).(func(bool, bool) int64); ok {
|
||||
r0 = rf(allowFromCache, includeDeleted)
|
||||
} else {
|
||||
r0 = ret.Get(0).(int64)
|
||||
}
|
||||
|
||||
var r1 error
|
||||
if rf, ok := ret.Get(1).(func(bool, bool) error); ok {
|
||||
r1 = rf(allowFromCache, includeDeleted)
|
||||
} else {
|
||||
@@ -262,13 +292,16 @@ func (_m *FileInfoStore) GetUptoNSizeFileTime(n int64) (int64, error) {
|
||||
ret := _m.Called(n)
|
||||
|
||||
var r0 int64
|
||||
var r1 error
|
||||
if rf, ok := ret.Get(0).(func(int64) (int64, error)); ok {
|
||||
return rf(n)
|
||||
}
|
||||
if rf, ok := ret.Get(0).(func(int64) int64); ok {
|
||||
r0 = rf(n)
|
||||
} else {
|
||||
r0 = ret.Get(0).(int64)
|
||||
}
|
||||
|
||||
var r1 error
|
||||
if rf, ok := ret.Get(1).(func(int64) error); ok {
|
||||
r1 = rf(n)
|
||||
} else {
|
||||
@@ -283,6 +316,10 @@ func (_m *FileInfoStore) GetWithOptions(page int, perPage int, opt *model.GetFil
|
||||
ret := _m.Called(page, perPage, opt)
|
||||
|
||||
var r0 []*model.FileInfo
|
||||
var r1 error
|
||||
if rf, ok := ret.Get(0).(func(int, int, *model.GetFileInfosOptions) ([]*model.FileInfo, error)); ok {
|
||||
return rf(page, perPage, opt)
|
||||
}
|
||||
if rf, ok := ret.Get(0).(func(int, int, *model.GetFileInfosOptions) []*model.FileInfo); ok {
|
||||
r0 = rf(page, perPage, opt)
|
||||
} else {
|
||||
@@ -291,7 +328,6 @@ func (_m *FileInfoStore) GetWithOptions(page int, perPage int, opt *model.GetFil
|
||||
}
|
||||
}
|
||||
|
||||
var r1 error
|
||||
if rf, ok := ret.Get(1).(func(int, int, *model.GetFileInfosOptions) error); ok {
|
||||
r1 = rf(page, perPage, opt)
|
||||
} else {
|
||||
@@ -325,13 +361,16 @@ func (_m *FileInfoStore) PermanentDeleteBatch(endTime int64, limit int64) (int64
|
||||
ret := _m.Called(endTime, limit)
|
||||
|
||||
var r0 int64
|
||||
var r1 error
|
||||
if rf, ok := ret.Get(0).(func(int64, int64) (int64, error)); ok {
|
||||
return rf(endTime, limit)
|
||||
}
|
||||
if rf, ok := ret.Get(0).(func(int64, int64) int64); ok {
|
||||
r0 = rf(endTime, limit)
|
||||
} else {
|
||||
r0 = ret.Get(0).(int64)
|
||||
}
|
||||
|
||||
var r1 error
|
||||
if rf, ok := ret.Get(1).(func(int64, int64) error); ok {
|
||||
r1 = rf(endTime, limit)
|
||||
} else {
|
||||
@@ -346,13 +385,16 @@ func (_m *FileInfoStore) PermanentDeleteByUser(userID string) (int64, error) {
|
||||
ret := _m.Called(userID)
|
||||
|
||||
var r0 int64
|
||||
var r1 error
|
||||
if rf, ok := ret.Get(0).(func(string) (int64, error)); ok {
|
||||
return rf(userID)
|
||||
}
|
||||
if rf, ok := ret.Get(0).(func(string) int64); ok {
|
||||
r0 = rf(userID)
|
||||
} else {
|
||||
r0 = ret.Get(0).(int64)
|
||||
}
|
||||
|
||||
var r1 error
|
||||
if rf, ok := ret.Get(1).(func(string) error); ok {
|
||||
r1 = rf(userID)
|
||||
} else {
|
||||
@@ -367,6 +409,10 @@ func (_m *FileInfoStore) Save(info *model.FileInfo) (*model.FileInfo, error) {
|
||||
ret := _m.Called(info)
|
||||
|
||||
var r0 *model.FileInfo
|
||||
var r1 error
|
||||
if rf, ok := ret.Get(0).(func(*model.FileInfo) (*model.FileInfo, error)); ok {
|
||||
return rf(info)
|
||||
}
|
||||
if rf, ok := ret.Get(0).(func(*model.FileInfo) *model.FileInfo); ok {
|
||||
r0 = rf(info)
|
||||
} else {
|
||||
@@ -375,7 +421,6 @@ func (_m *FileInfoStore) Save(info *model.FileInfo) (*model.FileInfo, error) {
|
||||
}
|
||||
}
|
||||
|
||||
var r1 error
|
||||
if rf, ok := ret.Get(1).(func(*model.FileInfo) error); ok {
|
||||
r1 = rf(info)
|
||||
} else {
|
||||
@@ -390,6 +435,10 @@ func (_m *FileInfoStore) Search(paramsList []*model.SearchParams, userID string,
|
||||
ret := _m.Called(paramsList, userID, teamID, page, perPage)
|
||||
|
||||
var r0 *model.FileInfoList
|
||||
var r1 error
|
||||
if rf, ok := ret.Get(0).(func([]*model.SearchParams, string, string, int, int) (*model.FileInfoList, error)); ok {
|
||||
return rf(paramsList, userID, teamID, page, perPage)
|
||||
}
|
||||
if rf, ok := ret.Get(0).(func([]*model.SearchParams, string, string, int, int) *model.FileInfoList); ok {
|
||||
r0 = rf(paramsList, userID, teamID, page, perPage)
|
||||
} else {
|
||||
@@ -398,7 +447,6 @@ func (_m *FileInfoStore) Search(paramsList []*model.SearchParams, userID string,
|
||||
}
|
||||
}
|
||||
|
||||
var r1 error
|
||||
if rf, ok := ret.Get(1).(func([]*model.SearchParams, string, string, int, int) error); ok {
|
||||
r1 = rf(paramsList, userID, teamID, page, perPage)
|
||||
} else {
|
||||
@@ -427,6 +475,10 @@ func (_m *FileInfoStore) Upsert(info *model.FileInfo) (*model.FileInfo, error) {
|
||||
ret := _m.Called(info)
|
||||
|
||||
var r0 *model.FileInfo
|
||||
var r1 error
|
||||
if rf, ok := ret.Get(0).(func(*model.FileInfo) (*model.FileInfo, error)); ok {
|
||||
return rf(info)
|
||||
}
|
||||
if rf, ok := ret.Get(0).(func(*model.FileInfo) *model.FileInfo); ok {
|
||||
r0 = rf(info)
|
||||
} else {
|
||||
@@ -435,7 +487,6 @@ func (_m *FileInfoStore) Upsert(info *model.FileInfo) (*model.FileInfo, error) {
|
||||
}
|
||||
}
|
||||
|
||||
var r1 error
|
||||
if rf, ok := ret.Get(1).(func(*model.FileInfo) error); ok {
|
||||
r1 = rf(info)
|
||||
} else {
|
||||
@@ -444,3 +495,18 @@ func (_m *FileInfoStore) Upsert(info *model.FileInfo) (*model.FileInfo, error) {
|
||||
|
||||
return r0, r1
|
||||
}
|
||||
|
||||
type mockConstructorTestingTNewFileInfoStore interface {
|
||||
mock.TestingT
|
||||
Cleanup(func())
|
||||
}
|
||||
|
||||
// NewFileInfoStore creates a new instance of FileInfoStore. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations.
|
||||
func NewFileInfoStore(t mockConstructorTestingTNewFileInfoStore) *FileInfoStore {
|
||||
mock := &FileInfoStore{}
|
||||
mock.Mock.Test(t)
|
||||
|
||||
t.Cleanup(func() { mock.AssertExpectations(t) })
|
||||
|
||||
return mock
|
||||
}
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
// Code generated by mockery v2.10.4. DO NOT EDIT.
|
||||
// Code generated by mockery v2.23.2. DO NOT EDIT.
|
||||
|
||||
// Regenerate this file using `make store-mocks`.
|
||||
|
||||
@@ -19,6 +19,10 @@ func (_m *GroupStore) AdminRoleGroupsForSyncableMember(userID string, syncableID
|
||||
ret := _m.Called(userID, syncableID, syncableType)
|
||||
|
||||
var r0 []string
|
||||
var r1 error
|
||||
if rf, ok := ret.Get(0).(func(string, string, model.GroupSyncableType) ([]string, error)); ok {
|
||||
return rf(userID, syncableID, syncableType)
|
||||
}
|
||||
if rf, ok := ret.Get(0).(func(string, string, model.GroupSyncableType) []string); ok {
|
||||
r0 = rf(userID, syncableID, syncableType)
|
||||
} else {
|
||||
@@ -27,7 +31,6 @@ func (_m *GroupStore) AdminRoleGroupsForSyncableMember(userID string, syncableID
|
||||
}
|
||||
}
|
||||
|
||||
var r1 error
|
||||
if rf, ok := ret.Get(1).(func(string, string, model.GroupSyncableType) error); ok {
|
||||
r1 = rf(userID, syncableID, syncableType)
|
||||
} else {
|
||||
@@ -42,6 +45,10 @@ func (_m *GroupStore) ChannelMembersMinusGroupMembers(channelID string, groupIDs
|
||||
ret := _m.Called(channelID, groupIDs, page, perPage)
|
||||
|
||||
var r0 []*model.UserWithGroups
|
||||
var r1 error
|
||||
if rf, ok := ret.Get(0).(func(string, []string, int, int) ([]*model.UserWithGroups, error)); ok {
|
||||
return rf(channelID, groupIDs, page, perPage)
|
||||
}
|
||||
if rf, ok := ret.Get(0).(func(string, []string, int, int) []*model.UserWithGroups); ok {
|
||||
r0 = rf(channelID, groupIDs, page, perPage)
|
||||
} else {
|
||||
@@ -50,7 +57,6 @@ func (_m *GroupStore) ChannelMembersMinusGroupMembers(channelID string, groupIDs
|
||||
}
|
||||
}
|
||||
|
||||
var r1 error
|
||||
if rf, ok := ret.Get(1).(func(string, []string, int, int) error); ok {
|
||||
r1 = rf(channelID, groupIDs, page, perPage)
|
||||
} else {
|
||||
@@ -65,6 +71,10 @@ func (_m *GroupStore) ChannelMembersToAdd(since int64, channelID *string, includ
|
||||
ret := _m.Called(since, channelID, includeRemovedMembers)
|
||||
|
||||
var r0 []*model.UserChannelIDPair
|
||||
var r1 error
|
||||
if rf, ok := ret.Get(0).(func(int64, *string, bool) ([]*model.UserChannelIDPair, error)); ok {
|
||||
return rf(since, channelID, includeRemovedMembers)
|
||||
}
|
||||
if rf, ok := ret.Get(0).(func(int64, *string, bool) []*model.UserChannelIDPair); ok {
|
||||
r0 = rf(since, channelID, includeRemovedMembers)
|
||||
} else {
|
||||
@@ -73,7 +83,6 @@ func (_m *GroupStore) ChannelMembersToAdd(since int64, channelID *string, includ
|
||||
}
|
||||
}
|
||||
|
||||
var r1 error
|
||||
if rf, ok := ret.Get(1).(func(int64, *string, bool) error); ok {
|
||||
r1 = rf(since, channelID, includeRemovedMembers)
|
||||
} else {
|
||||
@@ -88,6 +97,10 @@ func (_m *GroupStore) ChannelMembersToRemove(channelID *string) ([]*model.Channe
|
||||
ret := _m.Called(channelID)
|
||||
|
||||
var r0 []*model.ChannelMember
|
||||
var r1 error
|
||||
if rf, ok := ret.Get(0).(func(*string) ([]*model.ChannelMember, error)); ok {
|
||||
return rf(channelID)
|
||||
}
|
||||
if rf, ok := ret.Get(0).(func(*string) []*model.ChannelMember); ok {
|
||||
r0 = rf(channelID)
|
||||
} else {
|
||||
@@ -96,7 +109,6 @@ func (_m *GroupStore) ChannelMembersToRemove(channelID *string) ([]*model.Channe
|
||||
}
|
||||
}
|
||||
|
||||
var r1 error
|
||||
if rf, ok := ret.Get(1).(func(*string) error); ok {
|
||||
r1 = rf(channelID)
|
||||
} else {
|
||||
@@ -111,13 +123,16 @@ func (_m *GroupStore) CountChannelMembersMinusGroupMembers(channelID string, gro
|
||||
ret := _m.Called(channelID, groupIDs)
|
||||
|
||||
var r0 int64
|
||||
var r1 error
|
||||
if rf, ok := ret.Get(0).(func(string, []string) (int64, error)); ok {
|
||||
return rf(channelID, groupIDs)
|
||||
}
|
||||
if rf, ok := ret.Get(0).(func(string, []string) int64); ok {
|
||||
r0 = rf(channelID, groupIDs)
|
||||
} else {
|
||||
r0 = ret.Get(0).(int64)
|
||||
}
|
||||
|
||||
var r1 error
|
||||
if rf, ok := ret.Get(1).(func(string, []string) error); ok {
|
||||
r1 = rf(channelID, groupIDs)
|
||||
} else {
|
||||
@@ -132,13 +147,16 @@ func (_m *GroupStore) CountGroupsByChannel(channelID string, opts model.GroupSea
|
||||
ret := _m.Called(channelID, opts)
|
||||
|
||||
var r0 int64
|
||||
var r1 error
|
||||
if rf, ok := ret.Get(0).(func(string, model.GroupSearchOpts) (int64, error)); ok {
|
||||
return rf(channelID, opts)
|
||||
}
|
||||
if rf, ok := ret.Get(0).(func(string, model.GroupSearchOpts) int64); ok {
|
||||
r0 = rf(channelID, opts)
|
||||
} else {
|
||||
r0 = ret.Get(0).(int64)
|
||||
}
|
||||
|
||||
var r1 error
|
||||
if rf, ok := ret.Get(1).(func(string, model.GroupSearchOpts) error); ok {
|
||||
r1 = rf(channelID, opts)
|
||||
} else {
|
||||
@@ -153,13 +171,16 @@ func (_m *GroupStore) CountGroupsByTeam(teamID string, opts model.GroupSearchOpt
|
||||
ret := _m.Called(teamID, opts)
|
||||
|
||||
var r0 int64
|
||||
var r1 error
|
||||
if rf, ok := ret.Get(0).(func(string, model.GroupSearchOpts) (int64, error)); ok {
|
||||
return rf(teamID, opts)
|
||||
}
|
||||
if rf, ok := ret.Get(0).(func(string, model.GroupSearchOpts) int64); ok {
|
||||
r0 = rf(teamID, opts)
|
||||
} else {
|
||||
r0 = ret.Get(0).(int64)
|
||||
}
|
||||
|
||||
var r1 error
|
||||
if rf, ok := ret.Get(1).(func(string, model.GroupSearchOpts) error); ok {
|
||||
r1 = rf(teamID, opts)
|
||||
} else {
|
||||
@@ -174,13 +195,16 @@ func (_m *GroupStore) CountTeamMembersMinusGroupMembers(teamID string, groupIDs
|
||||
ret := _m.Called(teamID, groupIDs)
|
||||
|
||||
var r0 int64
|
||||
var r1 error
|
||||
if rf, ok := ret.Get(0).(func(string, []string) (int64, error)); ok {
|
||||
return rf(teamID, groupIDs)
|
||||
}
|
||||
if rf, ok := ret.Get(0).(func(string, []string) int64); ok {
|
||||
r0 = rf(teamID, groupIDs)
|
||||
} else {
|
||||
r0 = ret.Get(0).(int64)
|
||||
}
|
||||
|
||||
var r1 error
|
||||
if rf, ok := ret.Get(1).(func(string, []string) error); ok {
|
||||
r1 = rf(teamID, groupIDs)
|
||||
} else {
|
||||
@@ -195,6 +219,10 @@ func (_m *GroupStore) Create(group *model.Group) (*model.Group, error) {
|
||||
ret := _m.Called(group)
|
||||
|
||||
var r0 *model.Group
|
||||
var r1 error
|
||||
if rf, ok := ret.Get(0).(func(*model.Group) (*model.Group, error)); ok {
|
||||
return rf(group)
|
||||
}
|
||||
if rf, ok := ret.Get(0).(func(*model.Group) *model.Group); ok {
|
||||
r0 = rf(group)
|
||||
} else {
|
||||
@@ -203,7 +231,6 @@ func (_m *GroupStore) Create(group *model.Group) (*model.Group, error) {
|
||||
}
|
||||
}
|
||||
|
||||
var r1 error
|
||||
if rf, ok := ret.Get(1).(func(*model.Group) error); ok {
|
||||
r1 = rf(group)
|
||||
} else {
|
||||
@@ -218,6 +245,10 @@ func (_m *GroupStore) CreateGroupSyncable(groupSyncable *model.GroupSyncable) (*
|
||||
ret := _m.Called(groupSyncable)
|
||||
|
||||
var r0 *model.GroupSyncable
|
||||
var r1 error
|
||||
if rf, ok := ret.Get(0).(func(*model.GroupSyncable) (*model.GroupSyncable, error)); ok {
|
||||
return rf(groupSyncable)
|
||||
}
|
||||
if rf, ok := ret.Get(0).(func(*model.GroupSyncable) *model.GroupSyncable); ok {
|
||||
r0 = rf(groupSyncable)
|
||||
} else {
|
||||
@@ -226,7 +257,6 @@ func (_m *GroupStore) CreateGroupSyncable(groupSyncable *model.GroupSyncable) (*
|
||||
}
|
||||
}
|
||||
|
||||
var r1 error
|
||||
if rf, ok := ret.Get(1).(func(*model.GroupSyncable) error); ok {
|
||||
r1 = rf(groupSyncable)
|
||||
} else {
|
||||
@@ -241,6 +271,10 @@ func (_m *GroupStore) CreateWithUserIds(group *model.GroupWithUserIds) (*model.G
|
||||
ret := _m.Called(group)
|
||||
|
||||
var r0 *model.Group
|
||||
var r1 error
|
||||
if rf, ok := ret.Get(0).(func(*model.GroupWithUserIds) (*model.Group, error)); ok {
|
||||
return rf(group)
|
||||
}
|
||||
if rf, ok := ret.Get(0).(func(*model.GroupWithUserIds) *model.Group); ok {
|
||||
r0 = rf(group)
|
||||
} else {
|
||||
@@ -249,7 +283,6 @@ func (_m *GroupStore) CreateWithUserIds(group *model.GroupWithUserIds) (*model.G
|
||||
}
|
||||
}
|
||||
|
||||
var r1 error
|
||||
if rf, ok := ret.Get(1).(func(*model.GroupWithUserIds) error); ok {
|
||||
r1 = rf(group)
|
||||
} else {
|
||||
@@ -264,6 +297,10 @@ func (_m *GroupStore) Delete(groupID string) (*model.Group, error) {
|
||||
ret := _m.Called(groupID)
|
||||
|
||||
var r0 *model.Group
|
||||
var r1 error
|
||||
if rf, ok := ret.Get(0).(func(string) (*model.Group, error)); ok {
|
||||
return rf(groupID)
|
||||
}
|
||||
if rf, ok := ret.Get(0).(func(string) *model.Group); ok {
|
||||
r0 = rf(groupID)
|
||||
} else {
|
||||
@@ -272,7 +309,6 @@ func (_m *GroupStore) Delete(groupID string) (*model.Group, error) {
|
||||
}
|
||||
}
|
||||
|
||||
var r1 error
|
||||
if rf, ok := ret.Get(1).(func(string) error); ok {
|
||||
r1 = rf(groupID)
|
||||
} else {
|
||||
@@ -287,6 +323,10 @@ func (_m *GroupStore) DeleteGroupSyncable(groupID string, syncableID string, syn
|
||||
ret := _m.Called(groupID, syncableID, syncableType)
|
||||
|
||||
var r0 *model.GroupSyncable
|
||||
var r1 error
|
||||
if rf, ok := ret.Get(0).(func(string, string, model.GroupSyncableType) (*model.GroupSyncable, error)); ok {
|
||||
return rf(groupID, syncableID, syncableType)
|
||||
}
|
||||
if rf, ok := ret.Get(0).(func(string, string, model.GroupSyncableType) *model.GroupSyncable); ok {
|
||||
r0 = rf(groupID, syncableID, syncableType)
|
||||
} else {
|
||||
@@ -295,7 +335,6 @@ func (_m *GroupStore) DeleteGroupSyncable(groupID string, syncableID string, syn
|
||||
}
|
||||
}
|
||||
|
||||
var r1 error
|
||||
if rf, ok := ret.Get(1).(func(string, string, model.GroupSyncableType) error); ok {
|
||||
r1 = rf(groupID, syncableID, syncableType)
|
||||
} else {
|
||||
@@ -310,6 +349,10 @@ func (_m *GroupStore) DeleteMember(groupID string, userID string) (*model.GroupM
|
||||
ret := _m.Called(groupID, userID)
|
||||
|
||||
var r0 *model.GroupMember
|
||||
var r1 error
|
||||
if rf, ok := ret.Get(0).(func(string, string) (*model.GroupMember, error)); ok {
|
||||
return rf(groupID, userID)
|
||||
}
|
||||
if rf, ok := ret.Get(0).(func(string, string) *model.GroupMember); ok {
|
||||
r0 = rf(groupID, userID)
|
||||
} else {
|
||||
@@ -318,7 +361,6 @@ func (_m *GroupStore) DeleteMember(groupID string, userID string) (*model.GroupM
|
||||
}
|
||||
}
|
||||
|
||||
var r1 error
|
||||
if rf, ok := ret.Get(1).(func(string, string) error); ok {
|
||||
r1 = rf(groupID, userID)
|
||||
} else {
|
||||
@@ -333,6 +375,10 @@ func (_m *GroupStore) DeleteMembers(groupID string, userIDs []string) ([]*model.
|
||||
ret := _m.Called(groupID, userIDs)
|
||||
|
||||
var r0 []*model.GroupMember
|
||||
var r1 error
|
||||
if rf, ok := ret.Get(0).(func(string, []string) ([]*model.GroupMember, error)); ok {
|
||||
return rf(groupID, userIDs)
|
||||
}
|
||||
if rf, ok := ret.Get(0).(func(string, []string) []*model.GroupMember); ok {
|
||||
r0 = rf(groupID, userIDs)
|
||||
} else {
|
||||
@@ -341,7 +387,6 @@ func (_m *GroupStore) DeleteMembers(groupID string, userIDs []string) ([]*model.
|
||||
}
|
||||
}
|
||||
|
||||
var r1 error
|
||||
if rf, ok := ret.Get(1).(func(string, []string) error); ok {
|
||||
r1 = rf(groupID, userIDs)
|
||||
} else {
|
||||
@@ -356,13 +401,16 @@ func (_m *GroupStore) DistinctGroupMemberCount() (int64, error) {
|
||||
ret := _m.Called()
|
||||
|
||||
var r0 int64
|
||||
var r1 error
|
||||
if rf, ok := ret.Get(0).(func() (int64, error)); ok {
|
||||
return rf()
|
||||
}
|
||||
if rf, ok := ret.Get(0).(func() int64); ok {
|
||||
r0 = rf()
|
||||
} else {
|
||||
r0 = ret.Get(0).(int64)
|
||||
}
|
||||
|
||||
var r1 error
|
||||
if rf, ok := ret.Get(1).(func() error); ok {
|
||||
r1 = rf()
|
||||
} else {
|
||||
@@ -377,13 +425,16 @@ func (_m *GroupStore) DistinctGroupMemberCountForSource(source model.GroupSource
|
||||
ret := _m.Called(source)
|
||||
|
||||
var r0 int64
|
||||
var r1 error
|
||||
if rf, ok := ret.Get(0).(func(model.GroupSource) (int64, error)); ok {
|
||||
return rf(source)
|
||||
}
|
||||
if rf, ok := ret.Get(0).(func(model.GroupSource) int64); ok {
|
||||
r0 = rf(source)
|
||||
} else {
|
||||
r0 = ret.Get(0).(int64)
|
||||
}
|
||||
|
||||
var r1 error
|
||||
if rf, ok := ret.Get(1).(func(model.GroupSource) error); ok {
|
||||
r1 = rf(source)
|
||||
} else {
|
||||
@@ -398,6 +449,10 @@ func (_m *GroupStore) Get(groupID string) (*model.Group, error) {
|
||||
ret := _m.Called(groupID)
|
||||
|
||||
var r0 *model.Group
|
||||
var r1 error
|
||||
if rf, ok := ret.Get(0).(func(string) (*model.Group, error)); ok {
|
||||
return rf(groupID)
|
||||
}
|
||||
if rf, ok := ret.Get(0).(func(string) *model.Group); ok {
|
||||
r0 = rf(groupID)
|
||||
} else {
|
||||
@@ -406,7 +461,6 @@ func (_m *GroupStore) Get(groupID string) (*model.Group, error) {
|
||||
}
|
||||
}
|
||||
|
||||
var r1 error
|
||||
if rf, ok := ret.Get(1).(func(string) error); ok {
|
||||
r1 = rf(groupID)
|
||||
} else {
|
||||
@@ -421,6 +475,10 @@ func (_m *GroupStore) GetAllBySource(groupSource model.GroupSource) ([]*model.Gr
|
||||
ret := _m.Called(groupSource)
|
||||
|
||||
var r0 []*model.Group
|
||||
var r1 error
|
||||
if rf, ok := ret.Get(0).(func(model.GroupSource) ([]*model.Group, error)); ok {
|
||||
return rf(groupSource)
|
||||
}
|
||||
if rf, ok := ret.Get(0).(func(model.GroupSource) []*model.Group); ok {
|
||||
r0 = rf(groupSource)
|
||||
} else {
|
||||
@@ -429,7 +487,6 @@ func (_m *GroupStore) GetAllBySource(groupSource model.GroupSource) ([]*model.Gr
|
||||
}
|
||||
}
|
||||
|
||||
var r1 error
|
||||
if rf, ok := ret.Get(1).(func(model.GroupSource) error); ok {
|
||||
r1 = rf(groupSource)
|
||||
} else {
|
||||
@@ -444,6 +501,10 @@ func (_m *GroupStore) GetAllGroupSyncablesByGroupId(groupID string, syncableType
|
||||
ret := _m.Called(groupID, syncableType)
|
||||
|
||||
var r0 []*model.GroupSyncable
|
||||
var r1 error
|
||||
if rf, ok := ret.Get(0).(func(string, model.GroupSyncableType) ([]*model.GroupSyncable, error)); ok {
|
||||
return rf(groupID, syncableType)
|
||||
}
|
||||
if rf, ok := ret.Get(0).(func(string, model.GroupSyncableType) []*model.GroupSyncable); ok {
|
||||
r0 = rf(groupID, syncableType)
|
||||
} else {
|
||||
@@ -452,7 +513,6 @@ func (_m *GroupStore) GetAllGroupSyncablesByGroupId(groupID string, syncableType
|
||||
}
|
||||
}
|
||||
|
||||
var r1 error
|
||||
if rf, ok := ret.Get(1).(func(string, model.GroupSyncableType) error); ok {
|
||||
r1 = rf(groupID, syncableType)
|
||||
} else {
|
||||
@@ -467,6 +527,10 @@ func (_m *GroupStore) GetByIDs(groupIDs []string) ([]*model.Group, error) {
|
||||
ret := _m.Called(groupIDs)
|
||||
|
||||
var r0 []*model.Group
|
||||
var r1 error
|
||||
if rf, ok := ret.Get(0).(func([]string) ([]*model.Group, error)); ok {
|
||||
return rf(groupIDs)
|
||||
}
|
||||
if rf, ok := ret.Get(0).(func([]string) []*model.Group); ok {
|
||||
r0 = rf(groupIDs)
|
||||
} else {
|
||||
@@ -475,7 +539,6 @@ func (_m *GroupStore) GetByIDs(groupIDs []string) ([]*model.Group, error) {
|
||||
}
|
||||
}
|
||||
|
||||
var r1 error
|
||||
if rf, ok := ret.Get(1).(func([]string) error); ok {
|
||||
r1 = rf(groupIDs)
|
||||
} else {
|
||||
@@ -490,6 +553,10 @@ func (_m *GroupStore) GetByName(name string, opts model.GroupSearchOpts) (*model
|
||||
ret := _m.Called(name, opts)
|
||||
|
||||
var r0 *model.Group
|
||||
var r1 error
|
||||
if rf, ok := ret.Get(0).(func(string, model.GroupSearchOpts) (*model.Group, error)); ok {
|
||||
return rf(name, opts)
|
||||
}
|
||||
if rf, ok := ret.Get(0).(func(string, model.GroupSearchOpts) *model.Group); ok {
|
||||
r0 = rf(name, opts)
|
||||
} else {
|
||||
@@ -498,7 +565,6 @@ func (_m *GroupStore) GetByName(name string, opts model.GroupSearchOpts) (*model
|
||||
}
|
||||
}
|
||||
|
||||
var r1 error
|
||||
if rf, ok := ret.Get(1).(func(string, model.GroupSearchOpts) error); ok {
|
||||
r1 = rf(name, opts)
|
||||
} else {
|
||||
@@ -513,6 +579,10 @@ func (_m *GroupStore) GetByRemoteID(remoteID string, groupSource model.GroupSour
|
||||
ret := _m.Called(remoteID, groupSource)
|
||||
|
||||
var r0 *model.Group
|
||||
var r1 error
|
||||
if rf, ok := ret.Get(0).(func(string, model.GroupSource) (*model.Group, error)); ok {
|
||||
return rf(remoteID, groupSource)
|
||||
}
|
||||
if rf, ok := ret.Get(0).(func(string, model.GroupSource) *model.Group); ok {
|
||||
r0 = rf(remoteID, groupSource)
|
||||
} else {
|
||||
@@ -521,7 +591,6 @@ func (_m *GroupStore) GetByRemoteID(remoteID string, groupSource model.GroupSour
|
||||
}
|
||||
}
|
||||
|
||||
var r1 error
|
||||
if rf, ok := ret.Get(1).(func(string, model.GroupSource) error); ok {
|
||||
r1 = rf(remoteID, groupSource)
|
||||
} else {
|
||||
@@ -536,6 +605,10 @@ func (_m *GroupStore) GetByUser(userID string) ([]*model.Group, error) {
|
||||
ret := _m.Called(userID)
|
||||
|
||||
var r0 []*model.Group
|
||||
var r1 error
|
||||
if rf, ok := ret.Get(0).(func(string) ([]*model.Group, error)); ok {
|
||||
return rf(userID)
|
||||
}
|
||||
if rf, ok := ret.Get(0).(func(string) []*model.Group); ok {
|
||||
r0 = rf(userID)
|
||||
} else {
|
||||
@@ -544,7 +617,6 @@ func (_m *GroupStore) GetByUser(userID string) ([]*model.Group, error) {
|
||||
}
|
||||
}
|
||||
|
||||
var r1 error
|
||||
if rf, ok := ret.Get(1).(func(string) error); ok {
|
||||
r1 = rf(userID)
|
||||
} else {
|
||||
@@ -559,6 +631,10 @@ func (_m *GroupStore) GetGroupSyncable(groupID string, syncableID string, syncab
|
||||
ret := _m.Called(groupID, syncableID, syncableType)
|
||||
|
||||
var r0 *model.GroupSyncable
|
||||
var r1 error
|
||||
if rf, ok := ret.Get(0).(func(string, string, model.GroupSyncableType) (*model.GroupSyncable, error)); ok {
|
||||
return rf(groupID, syncableID, syncableType)
|
||||
}
|
||||
if rf, ok := ret.Get(0).(func(string, string, model.GroupSyncableType) *model.GroupSyncable); ok {
|
||||
r0 = rf(groupID, syncableID, syncableType)
|
||||
} else {
|
||||
@@ -567,7 +643,6 @@ func (_m *GroupStore) GetGroupSyncable(groupID string, syncableID string, syncab
|
||||
}
|
||||
}
|
||||
|
||||
var r1 error
|
||||
if rf, ok := ret.Get(1).(func(string, string, model.GroupSyncableType) error); ok {
|
||||
r1 = rf(groupID, syncableID, syncableType)
|
||||
} else {
|
||||
@@ -582,6 +657,10 @@ func (_m *GroupStore) GetGroups(page int, perPage int, opts model.GroupSearchOpt
|
||||
ret := _m.Called(page, perPage, opts, viewRestrictions)
|
||||
|
||||
var r0 []*model.Group
|
||||
var r1 error
|
||||
if rf, ok := ret.Get(0).(func(int, int, model.GroupSearchOpts, *model.ViewUsersRestrictions) ([]*model.Group, error)); ok {
|
||||
return rf(page, perPage, opts, viewRestrictions)
|
||||
}
|
||||
if rf, ok := ret.Get(0).(func(int, int, model.GroupSearchOpts, *model.ViewUsersRestrictions) []*model.Group); ok {
|
||||
r0 = rf(page, perPage, opts, viewRestrictions)
|
||||
} else {
|
||||
@@ -590,7 +669,6 @@ func (_m *GroupStore) GetGroups(page int, perPage int, opts model.GroupSearchOpt
|
||||
}
|
||||
}
|
||||
|
||||
var r1 error
|
||||
if rf, ok := ret.Get(1).(func(int, int, model.GroupSearchOpts, *model.ViewUsersRestrictions) error); ok {
|
||||
r1 = rf(page, perPage, opts, viewRestrictions)
|
||||
} else {
|
||||
@@ -605,6 +683,10 @@ func (_m *GroupStore) GetGroupsAssociatedToChannelsByTeam(teamID string, opts mo
|
||||
ret := _m.Called(teamID, opts)
|
||||
|
||||
var r0 map[string][]*model.GroupWithSchemeAdmin
|
||||
var r1 error
|
||||
if rf, ok := ret.Get(0).(func(string, model.GroupSearchOpts) (map[string][]*model.GroupWithSchemeAdmin, error)); ok {
|
||||
return rf(teamID, opts)
|
||||
}
|
||||
if rf, ok := ret.Get(0).(func(string, model.GroupSearchOpts) map[string][]*model.GroupWithSchemeAdmin); ok {
|
||||
r0 = rf(teamID, opts)
|
||||
} else {
|
||||
@@ -613,7 +695,6 @@ func (_m *GroupStore) GetGroupsAssociatedToChannelsByTeam(teamID string, opts mo
|
||||
}
|
||||
}
|
||||
|
||||
var r1 error
|
||||
if rf, ok := ret.Get(1).(func(string, model.GroupSearchOpts) error); ok {
|
||||
r1 = rf(teamID, opts)
|
||||
} else {
|
||||
@@ -628,6 +709,10 @@ func (_m *GroupStore) GetGroupsByChannel(channelID string, opts model.GroupSearc
|
||||
ret := _m.Called(channelID, opts)
|
||||
|
||||
var r0 []*model.GroupWithSchemeAdmin
|
||||
var r1 error
|
||||
if rf, ok := ret.Get(0).(func(string, model.GroupSearchOpts) ([]*model.GroupWithSchemeAdmin, error)); ok {
|
||||
return rf(channelID, opts)
|
||||
}
|
||||
if rf, ok := ret.Get(0).(func(string, model.GroupSearchOpts) []*model.GroupWithSchemeAdmin); ok {
|
||||
r0 = rf(channelID, opts)
|
||||
} else {
|
||||
@@ -636,7 +721,6 @@ func (_m *GroupStore) GetGroupsByChannel(channelID string, opts model.GroupSearc
|
||||
}
|
||||
}
|
||||
|
||||
var r1 error
|
||||
if rf, ok := ret.Get(1).(func(string, model.GroupSearchOpts) error); ok {
|
||||
r1 = rf(channelID, opts)
|
||||
} else {
|
||||
@@ -651,6 +735,10 @@ func (_m *GroupStore) GetGroupsByTeam(teamID string, opts model.GroupSearchOpts)
|
||||
ret := _m.Called(teamID, opts)
|
||||
|
||||
var r0 []*model.GroupWithSchemeAdmin
|
||||
var r1 error
|
||||
if rf, ok := ret.Get(0).(func(string, model.GroupSearchOpts) ([]*model.GroupWithSchemeAdmin, error)); ok {
|
||||
return rf(teamID, opts)
|
||||
}
|
||||
if rf, ok := ret.Get(0).(func(string, model.GroupSearchOpts) []*model.GroupWithSchemeAdmin); ok {
|
||||
r0 = rf(teamID, opts)
|
||||
} else {
|
||||
@@ -659,7 +747,6 @@ func (_m *GroupStore) GetGroupsByTeam(teamID string, opts model.GroupSearchOpts)
|
||||
}
|
||||
}
|
||||
|
||||
var r1 error
|
||||
if rf, ok := ret.Get(1).(func(string, model.GroupSearchOpts) error); ok {
|
||||
r1 = rf(teamID, opts)
|
||||
} else {
|
||||
@@ -674,6 +761,10 @@ func (_m *GroupStore) GetMember(groupID string, userID string) (*model.GroupMemb
|
||||
ret := _m.Called(groupID, userID)
|
||||
|
||||
var r0 *model.GroupMember
|
||||
var r1 error
|
||||
if rf, ok := ret.Get(0).(func(string, string) (*model.GroupMember, error)); ok {
|
||||
return rf(groupID, userID)
|
||||
}
|
||||
if rf, ok := ret.Get(0).(func(string, string) *model.GroupMember); ok {
|
||||
r0 = rf(groupID, userID)
|
||||
} else {
|
||||
@@ -682,7 +773,6 @@ func (_m *GroupStore) GetMember(groupID string, userID string) (*model.GroupMemb
|
||||
}
|
||||
}
|
||||
|
||||
var r1 error
|
||||
if rf, ok := ret.Get(1).(func(string, string) error); ok {
|
||||
r1 = rf(groupID, userID)
|
||||
} else {
|
||||
@@ -697,13 +787,16 @@ func (_m *GroupStore) GetMemberCount(groupID string) (int64, error) {
|
||||
ret := _m.Called(groupID)
|
||||
|
||||
var r0 int64
|
||||
var r1 error
|
||||
if rf, ok := ret.Get(0).(func(string) (int64, error)); ok {
|
||||
return rf(groupID)
|
||||
}
|
||||
if rf, ok := ret.Get(0).(func(string) int64); ok {
|
||||
r0 = rf(groupID)
|
||||
} else {
|
||||
r0 = ret.Get(0).(int64)
|
||||
}
|
||||
|
||||
var r1 error
|
||||
if rf, ok := ret.Get(1).(func(string) error); ok {
|
||||
r1 = rf(groupID)
|
||||
} else {
|
||||
@@ -718,13 +811,16 @@ func (_m *GroupStore) GetMemberCountWithRestrictions(groupID string, viewRestric
|
||||
ret := _m.Called(groupID, viewRestrictions)
|
||||
|
||||
var r0 int64
|
||||
var r1 error
|
||||
if rf, ok := ret.Get(0).(func(string, *model.ViewUsersRestrictions) (int64, error)); ok {
|
||||
return rf(groupID, viewRestrictions)
|
||||
}
|
||||
if rf, ok := ret.Get(0).(func(string, *model.ViewUsersRestrictions) int64); ok {
|
||||
r0 = rf(groupID, viewRestrictions)
|
||||
} else {
|
||||
r0 = ret.Get(0).(int64)
|
||||
}
|
||||
|
||||
var r1 error
|
||||
if rf, ok := ret.Get(1).(func(string, *model.ViewUsersRestrictions) error); ok {
|
||||
r1 = rf(groupID, viewRestrictions)
|
||||
} else {
|
||||
@@ -739,6 +835,10 @@ func (_m *GroupStore) GetMemberUsers(groupID string) ([]*model.User, error) {
|
||||
ret := _m.Called(groupID)
|
||||
|
||||
var r0 []*model.User
|
||||
var r1 error
|
||||
if rf, ok := ret.Get(0).(func(string) ([]*model.User, error)); ok {
|
||||
return rf(groupID)
|
||||
}
|
||||
if rf, ok := ret.Get(0).(func(string) []*model.User); ok {
|
||||
r0 = rf(groupID)
|
||||
} else {
|
||||
@@ -747,7 +847,6 @@ func (_m *GroupStore) GetMemberUsers(groupID string) ([]*model.User, error) {
|
||||
}
|
||||
}
|
||||
|
||||
var r1 error
|
||||
if rf, ok := ret.Get(1).(func(string) error); ok {
|
||||
r1 = rf(groupID)
|
||||
} else {
|
||||
@@ -762,6 +861,10 @@ func (_m *GroupStore) GetMemberUsersInTeam(groupID string, teamID string) ([]*mo
|
||||
ret := _m.Called(groupID, teamID)
|
||||
|
||||
var r0 []*model.User
|
||||
var r1 error
|
||||
if rf, ok := ret.Get(0).(func(string, string) ([]*model.User, error)); ok {
|
||||
return rf(groupID, teamID)
|
||||
}
|
||||
if rf, ok := ret.Get(0).(func(string, string) []*model.User); ok {
|
||||
r0 = rf(groupID, teamID)
|
||||
} else {
|
||||
@@ -770,7 +873,6 @@ func (_m *GroupStore) GetMemberUsersInTeam(groupID string, teamID string) ([]*mo
|
||||
}
|
||||
}
|
||||
|
||||
var r1 error
|
||||
if rf, ok := ret.Get(1).(func(string, string) error); ok {
|
||||
r1 = rf(groupID, teamID)
|
||||
} else {
|
||||
@@ -785,6 +887,10 @@ func (_m *GroupStore) GetMemberUsersNotInChannel(groupID string, channelID strin
|
||||
ret := _m.Called(groupID, channelID)
|
||||
|
||||
var r0 []*model.User
|
||||
var r1 error
|
||||
if rf, ok := ret.Get(0).(func(string, string) ([]*model.User, error)); ok {
|
||||
return rf(groupID, channelID)
|
||||
}
|
||||
if rf, ok := ret.Get(0).(func(string, string) []*model.User); ok {
|
||||
r0 = rf(groupID, channelID)
|
||||
} else {
|
||||
@@ -793,7 +899,6 @@ func (_m *GroupStore) GetMemberUsersNotInChannel(groupID string, channelID strin
|
||||
}
|
||||
}
|
||||
|
||||
var r1 error
|
||||
if rf, ok := ret.Get(1).(func(string, string) error); ok {
|
||||
r1 = rf(groupID, channelID)
|
||||
} else {
|
||||
@@ -808,6 +913,10 @@ func (_m *GroupStore) GetMemberUsersPage(groupID string, page int, perPage int,
|
||||
ret := _m.Called(groupID, page, perPage, viewRestrictions)
|
||||
|
||||
var r0 []*model.User
|
||||
var r1 error
|
||||
if rf, ok := ret.Get(0).(func(string, int, int, *model.ViewUsersRestrictions) ([]*model.User, error)); ok {
|
||||
return rf(groupID, page, perPage, viewRestrictions)
|
||||
}
|
||||
if rf, ok := ret.Get(0).(func(string, int, int, *model.ViewUsersRestrictions) []*model.User); ok {
|
||||
r0 = rf(groupID, page, perPage, viewRestrictions)
|
||||
} else {
|
||||
@@ -816,7 +925,6 @@ func (_m *GroupStore) GetMemberUsersPage(groupID string, page int, perPage int,
|
||||
}
|
||||
}
|
||||
|
||||
var r1 error
|
||||
if rf, ok := ret.Get(1).(func(string, int, int, *model.ViewUsersRestrictions) error); ok {
|
||||
r1 = rf(groupID, page, perPage, viewRestrictions)
|
||||
} else {
|
||||
@@ -831,6 +939,10 @@ func (_m *GroupStore) GetMemberUsersSortedPage(groupID string, page int, perPage
|
||||
ret := _m.Called(groupID, page, perPage, viewRestrictions, teammateNameDisplay)
|
||||
|
||||
var r0 []*model.User
|
||||
var r1 error
|
||||
if rf, ok := ret.Get(0).(func(string, int, int, *model.ViewUsersRestrictions, string) ([]*model.User, error)); ok {
|
||||
return rf(groupID, page, perPage, viewRestrictions, teammateNameDisplay)
|
||||
}
|
||||
if rf, ok := ret.Get(0).(func(string, int, int, *model.ViewUsersRestrictions, string) []*model.User); ok {
|
||||
r0 = rf(groupID, page, perPage, viewRestrictions, teammateNameDisplay)
|
||||
} else {
|
||||
@@ -839,7 +951,6 @@ func (_m *GroupStore) GetMemberUsersSortedPage(groupID string, page int, perPage
|
||||
}
|
||||
}
|
||||
|
||||
var r1 error
|
||||
if rf, ok := ret.Get(1).(func(string, int, int, *model.ViewUsersRestrictions, string) error); ok {
|
||||
r1 = rf(groupID, page, perPage, viewRestrictions, teammateNameDisplay)
|
||||
} else {
|
||||
@@ -854,6 +965,10 @@ func (_m *GroupStore) GetNonMemberUsersPage(groupID string, page int, perPage in
|
||||
ret := _m.Called(groupID, page, perPage, viewRestrictions)
|
||||
|
||||
var r0 []*model.User
|
||||
var r1 error
|
||||
if rf, ok := ret.Get(0).(func(string, int, int, *model.ViewUsersRestrictions) ([]*model.User, error)); ok {
|
||||
return rf(groupID, page, perPage, viewRestrictions)
|
||||
}
|
||||
if rf, ok := ret.Get(0).(func(string, int, int, *model.ViewUsersRestrictions) []*model.User); ok {
|
||||
r0 = rf(groupID, page, perPage, viewRestrictions)
|
||||
} else {
|
||||
@@ -862,7 +977,6 @@ func (_m *GroupStore) GetNonMemberUsersPage(groupID string, page int, perPage in
|
||||
}
|
||||
}
|
||||
|
||||
var r1 error
|
||||
if rf, ok := ret.Get(1).(func(string, int, int, *model.ViewUsersRestrictions) error); ok {
|
||||
r1 = rf(groupID, page, perPage, viewRestrictions)
|
||||
} else {
|
||||
@@ -877,13 +991,16 @@ func (_m *GroupStore) GroupChannelCount() (int64, error) {
|
||||
ret := _m.Called()
|
||||
|
||||
var r0 int64
|
||||
var r1 error
|
||||
if rf, ok := ret.Get(0).(func() (int64, error)); ok {
|
||||
return rf()
|
||||
}
|
||||
if rf, ok := ret.Get(0).(func() int64); ok {
|
||||
r0 = rf()
|
||||
} else {
|
||||
r0 = ret.Get(0).(int64)
|
||||
}
|
||||
|
||||
var r1 error
|
||||
if rf, ok := ret.Get(1).(func() error); ok {
|
||||
r1 = rf()
|
||||
} else {
|
||||
@@ -898,13 +1015,16 @@ func (_m *GroupStore) GroupCount() (int64, error) {
|
||||
ret := _m.Called()
|
||||
|
||||
var r0 int64
|
||||
var r1 error
|
||||
if rf, ok := ret.Get(0).(func() (int64, error)); ok {
|
||||
return rf()
|
||||
}
|
||||
if rf, ok := ret.Get(0).(func() int64); ok {
|
||||
r0 = rf()
|
||||
} else {
|
||||
r0 = ret.Get(0).(int64)
|
||||
}
|
||||
|
||||
var r1 error
|
||||
if rf, ok := ret.Get(1).(func() error); ok {
|
||||
r1 = rf()
|
||||
} else {
|
||||
@@ -919,13 +1039,16 @@ func (_m *GroupStore) GroupCountBySource(source model.GroupSource) (int64, error
|
||||
ret := _m.Called(source)
|
||||
|
||||
var r0 int64
|
||||
var r1 error
|
||||
if rf, ok := ret.Get(0).(func(model.GroupSource) (int64, error)); ok {
|
||||
return rf(source)
|
||||
}
|
||||
if rf, ok := ret.Get(0).(func(model.GroupSource) int64); ok {
|
||||
r0 = rf(source)
|
||||
} else {
|
||||
r0 = ret.Get(0).(int64)
|
||||
}
|
||||
|
||||
var r1 error
|
||||
if rf, ok := ret.Get(1).(func(model.GroupSource) error); ok {
|
||||
r1 = rf(source)
|
||||
} else {
|
||||
@@ -940,13 +1063,16 @@ func (_m *GroupStore) GroupCountWithAllowReference() (int64, error) {
|
||||
ret := _m.Called()
|
||||
|
||||
var r0 int64
|
||||
var r1 error
|
||||
if rf, ok := ret.Get(0).(func() (int64, error)); ok {
|
||||
return rf()
|
||||
}
|
||||
if rf, ok := ret.Get(0).(func() int64); ok {
|
||||
r0 = rf()
|
||||
} else {
|
||||
r0 = ret.Get(0).(int64)
|
||||
}
|
||||
|
||||
var r1 error
|
||||
if rf, ok := ret.Get(1).(func() error); ok {
|
||||
r1 = rf()
|
||||
} else {
|
||||
@@ -961,13 +1087,16 @@ func (_m *GroupStore) GroupMemberCount() (int64, error) {
|
||||
ret := _m.Called()
|
||||
|
||||
var r0 int64
|
||||
var r1 error
|
||||
if rf, ok := ret.Get(0).(func() (int64, error)); ok {
|
||||
return rf()
|
||||
}
|
||||
if rf, ok := ret.Get(0).(func() int64); ok {
|
||||
r0 = rf()
|
||||
} else {
|
||||
r0 = ret.Get(0).(int64)
|
||||
}
|
||||
|
||||
var r1 error
|
||||
if rf, ok := ret.Get(1).(func() error); ok {
|
||||
r1 = rf()
|
||||
} else {
|
||||
@@ -982,13 +1111,16 @@ func (_m *GroupStore) GroupTeamCount() (int64, error) {
|
||||
ret := _m.Called()
|
||||
|
||||
var r0 int64
|
||||
var r1 error
|
||||
if rf, ok := ret.Get(0).(func() (int64, error)); ok {
|
||||
return rf()
|
||||
}
|
||||
if rf, ok := ret.Get(0).(func() int64); ok {
|
||||
r0 = rf()
|
||||
} else {
|
||||
r0 = ret.Get(0).(int64)
|
||||
}
|
||||
|
||||
var r1 error
|
||||
if rf, ok := ret.Get(1).(func() error); ok {
|
||||
r1 = rf()
|
||||
} else {
|
||||
@@ -1017,6 +1149,10 @@ func (_m *GroupStore) PermittedSyncableAdmins(syncableID string, syncableType mo
|
||||
ret := _m.Called(syncableID, syncableType)
|
||||
|
||||
var r0 []string
|
||||
var r1 error
|
||||
if rf, ok := ret.Get(0).(func(string, model.GroupSyncableType) ([]string, error)); ok {
|
||||
return rf(syncableID, syncableType)
|
||||
}
|
||||
if rf, ok := ret.Get(0).(func(string, model.GroupSyncableType) []string); ok {
|
||||
r0 = rf(syncableID, syncableType)
|
||||
} else {
|
||||
@@ -1025,7 +1161,6 @@ func (_m *GroupStore) PermittedSyncableAdmins(syncableID string, syncableType mo
|
||||
}
|
||||
}
|
||||
|
||||
var r1 error
|
||||
if rf, ok := ret.Get(1).(func(string, model.GroupSyncableType) error); ok {
|
||||
r1 = rf(syncableID, syncableType)
|
||||
} else {
|
||||
@@ -1040,6 +1175,10 @@ func (_m *GroupStore) Restore(groupID string) (*model.Group, error) {
|
||||
ret := _m.Called(groupID)
|
||||
|
||||
var r0 *model.Group
|
||||
var r1 error
|
||||
if rf, ok := ret.Get(0).(func(string) (*model.Group, error)); ok {
|
||||
return rf(groupID)
|
||||
}
|
||||
if rf, ok := ret.Get(0).(func(string) *model.Group); ok {
|
||||
r0 = rf(groupID)
|
||||
} else {
|
||||
@@ -1048,7 +1187,6 @@ func (_m *GroupStore) Restore(groupID string) (*model.Group, error) {
|
||||
}
|
||||
}
|
||||
|
||||
var r1 error
|
||||
if rf, ok := ret.Get(1).(func(string) error); ok {
|
||||
r1 = rf(groupID)
|
||||
} else {
|
||||
@@ -1063,6 +1201,10 @@ func (_m *GroupStore) TeamMembersMinusGroupMembers(teamID string, groupIDs []str
|
||||
ret := _m.Called(teamID, groupIDs, page, perPage)
|
||||
|
||||
var r0 []*model.UserWithGroups
|
||||
var r1 error
|
||||
if rf, ok := ret.Get(0).(func(string, []string, int, int) ([]*model.UserWithGroups, error)); ok {
|
||||
return rf(teamID, groupIDs, page, perPage)
|
||||
}
|
||||
if rf, ok := ret.Get(0).(func(string, []string, int, int) []*model.UserWithGroups); ok {
|
||||
r0 = rf(teamID, groupIDs, page, perPage)
|
||||
} else {
|
||||
@@ -1071,7 +1213,6 @@ func (_m *GroupStore) TeamMembersMinusGroupMembers(teamID string, groupIDs []str
|
||||
}
|
||||
}
|
||||
|
||||
var r1 error
|
||||
if rf, ok := ret.Get(1).(func(string, []string, int, int) error); ok {
|
||||
r1 = rf(teamID, groupIDs, page, perPage)
|
||||
} else {
|
||||
@@ -1086,6 +1227,10 @@ func (_m *GroupStore) TeamMembersToAdd(since int64, teamID *string, includeRemov
|
||||
ret := _m.Called(since, teamID, includeRemovedMembers)
|
||||
|
||||
var r0 []*model.UserTeamIDPair
|
||||
var r1 error
|
||||
if rf, ok := ret.Get(0).(func(int64, *string, bool) ([]*model.UserTeamIDPair, error)); ok {
|
||||
return rf(since, teamID, includeRemovedMembers)
|
||||
}
|
||||
if rf, ok := ret.Get(0).(func(int64, *string, bool) []*model.UserTeamIDPair); ok {
|
||||
r0 = rf(since, teamID, includeRemovedMembers)
|
||||
} else {
|
||||
@@ -1094,7 +1239,6 @@ func (_m *GroupStore) TeamMembersToAdd(since int64, teamID *string, includeRemov
|
||||
}
|
||||
}
|
||||
|
||||
var r1 error
|
||||
if rf, ok := ret.Get(1).(func(int64, *string, bool) error); ok {
|
||||
r1 = rf(since, teamID, includeRemovedMembers)
|
||||
} else {
|
||||
@@ -1109,6 +1253,10 @@ func (_m *GroupStore) TeamMembersToRemove(teamID *string) ([]*model.TeamMember,
|
||||
ret := _m.Called(teamID)
|
||||
|
||||
var r0 []*model.TeamMember
|
||||
var r1 error
|
||||
if rf, ok := ret.Get(0).(func(*string) ([]*model.TeamMember, error)); ok {
|
||||
return rf(teamID)
|
||||
}
|
||||
if rf, ok := ret.Get(0).(func(*string) []*model.TeamMember); ok {
|
||||
r0 = rf(teamID)
|
||||
} else {
|
||||
@@ -1117,7 +1265,6 @@ func (_m *GroupStore) TeamMembersToRemove(teamID *string) ([]*model.TeamMember,
|
||||
}
|
||||
}
|
||||
|
||||
var r1 error
|
||||
if rf, ok := ret.Get(1).(func(*string) error); ok {
|
||||
r1 = rf(teamID)
|
||||
} else {
|
||||
@@ -1132,6 +1279,10 @@ func (_m *GroupStore) Update(group *model.Group) (*model.Group, error) {
|
||||
ret := _m.Called(group)
|
||||
|
||||
var r0 *model.Group
|
||||
var r1 error
|
||||
if rf, ok := ret.Get(0).(func(*model.Group) (*model.Group, error)); ok {
|
||||
return rf(group)
|
||||
}
|
||||
if rf, ok := ret.Get(0).(func(*model.Group) *model.Group); ok {
|
||||
r0 = rf(group)
|
||||
} else {
|
||||
@@ -1140,7 +1291,6 @@ func (_m *GroupStore) Update(group *model.Group) (*model.Group, error) {
|
||||
}
|
||||
}
|
||||
|
||||
var r1 error
|
||||
if rf, ok := ret.Get(1).(func(*model.Group) error); ok {
|
||||
r1 = rf(group)
|
||||
} else {
|
||||
@@ -1155,6 +1305,10 @@ func (_m *GroupStore) UpdateGroupSyncable(groupSyncable *model.GroupSyncable) (*
|
||||
ret := _m.Called(groupSyncable)
|
||||
|
||||
var r0 *model.GroupSyncable
|
||||
var r1 error
|
||||
if rf, ok := ret.Get(0).(func(*model.GroupSyncable) (*model.GroupSyncable, error)); ok {
|
||||
return rf(groupSyncable)
|
||||
}
|
||||
if rf, ok := ret.Get(0).(func(*model.GroupSyncable) *model.GroupSyncable); ok {
|
||||
r0 = rf(groupSyncable)
|
||||
} else {
|
||||
@@ -1163,7 +1317,6 @@ func (_m *GroupStore) UpdateGroupSyncable(groupSyncable *model.GroupSyncable) (*
|
||||
}
|
||||
}
|
||||
|
||||
var r1 error
|
||||
if rf, ok := ret.Get(1).(func(*model.GroupSyncable) error); ok {
|
||||
r1 = rf(groupSyncable)
|
||||
} else {
|
||||
@@ -1178,6 +1331,10 @@ func (_m *GroupStore) UpsertMember(groupID string, userID string) (*model.GroupM
|
||||
ret := _m.Called(groupID, userID)
|
||||
|
||||
var r0 *model.GroupMember
|
||||
var r1 error
|
||||
if rf, ok := ret.Get(0).(func(string, string) (*model.GroupMember, error)); ok {
|
||||
return rf(groupID, userID)
|
||||
}
|
||||
if rf, ok := ret.Get(0).(func(string, string) *model.GroupMember); ok {
|
||||
r0 = rf(groupID, userID)
|
||||
} else {
|
||||
@@ -1186,7 +1343,6 @@ func (_m *GroupStore) UpsertMember(groupID string, userID string) (*model.GroupM
|
||||
}
|
||||
}
|
||||
|
||||
var r1 error
|
||||
if rf, ok := ret.Get(1).(func(string, string) error); ok {
|
||||
r1 = rf(groupID, userID)
|
||||
} else {
|
||||
@@ -1201,6 +1357,10 @@ func (_m *GroupStore) UpsertMembers(groupID string, userIDs []string) ([]*model.
|
||||
ret := _m.Called(groupID, userIDs)
|
||||
|
||||
var r0 []*model.GroupMember
|
||||
var r1 error
|
||||
if rf, ok := ret.Get(0).(func(string, []string) ([]*model.GroupMember, error)); ok {
|
||||
return rf(groupID, userIDs)
|
||||
}
|
||||
if rf, ok := ret.Get(0).(func(string, []string) []*model.GroupMember); ok {
|
||||
r0 = rf(groupID, userIDs)
|
||||
} else {
|
||||
@@ -1209,7 +1369,6 @@ func (_m *GroupStore) UpsertMembers(groupID string, userIDs []string) ([]*model.
|
||||
}
|
||||
}
|
||||
|
||||
var r1 error
|
||||
if rf, ok := ret.Get(1).(func(string, []string) error); ok {
|
||||
r1 = rf(groupID, userIDs)
|
||||
} else {
|
||||
@@ -1218,3 +1377,18 @@ func (_m *GroupStore) UpsertMembers(groupID string, userIDs []string) ([]*model.
|
||||
|
||||
return r0, r1
|
||||
}
|
||||
|
||||
type mockConstructorTestingTNewGroupStore interface {
|
||||
mock.TestingT
|
||||
Cleanup(func())
|
||||
}
|
||||
|
||||
// NewGroupStore creates a new instance of GroupStore. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations.
|
||||
func NewGroupStore(t mockConstructorTestingTNewGroupStore) *GroupStore {
|
||||
mock := &GroupStore{}
|
||||
mock.Mock.Test(t)
|
||||
|
||||
t.Cleanup(func() { mock.AssertExpectations(t) })
|
||||
|
||||
return mock
|
||||
}
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
// Code generated by mockery v2.10.4. DO NOT EDIT.
|
||||
// Code generated by mockery v2.23.2. DO NOT EDIT.
|
||||
|
||||
// Regenerate this file using `make store-mocks`.
|
||||
|
||||
@@ -33,13 +33,16 @@ func (_m *JobStore) Delete(id string) (string, error) {
|
||||
ret := _m.Called(id)
|
||||
|
||||
var r0 string
|
||||
var r1 error
|
||||
if rf, ok := ret.Get(0).(func(string) (string, error)); ok {
|
||||
return rf(id)
|
||||
}
|
||||
if rf, ok := ret.Get(0).(func(string) string); ok {
|
||||
r0 = rf(id)
|
||||
} else {
|
||||
r0 = ret.Get(0).(string)
|
||||
}
|
||||
|
||||
var r1 error
|
||||
if rf, ok := ret.Get(1).(func(string) error); ok {
|
||||
r1 = rf(id)
|
||||
} else {
|
||||
@@ -54,6 +57,10 @@ func (_m *JobStore) Get(id string) (*model.Job, error) {
|
||||
ret := _m.Called(id)
|
||||
|
||||
var r0 *model.Job
|
||||
var r1 error
|
||||
if rf, ok := ret.Get(0).(func(string) (*model.Job, error)); ok {
|
||||
return rf(id)
|
||||
}
|
||||
if rf, ok := ret.Get(0).(func(string) *model.Job); ok {
|
||||
r0 = rf(id)
|
||||
} else {
|
||||
@@ -62,7 +69,6 @@ func (_m *JobStore) Get(id string) (*model.Job, error) {
|
||||
}
|
||||
}
|
||||
|
||||
var r1 error
|
||||
if rf, ok := ret.Get(1).(func(string) error); ok {
|
||||
r1 = rf(id)
|
||||
} else {
|
||||
@@ -77,6 +83,10 @@ func (_m *JobStore) GetAllByStatus(status string) ([]*model.Job, error) {
|
||||
ret := _m.Called(status)
|
||||
|
||||
var r0 []*model.Job
|
||||
var r1 error
|
||||
if rf, ok := ret.Get(0).(func(string) ([]*model.Job, error)); ok {
|
||||
return rf(status)
|
||||
}
|
||||
if rf, ok := ret.Get(0).(func(string) []*model.Job); ok {
|
||||
r0 = rf(status)
|
||||
} else {
|
||||
@@ -85,7 +95,6 @@ func (_m *JobStore) GetAllByStatus(status string) ([]*model.Job, error) {
|
||||
}
|
||||
}
|
||||
|
||||
var r1 error
|
||||
if rf, ok := ret.Get(1).(func(string) error); ok {
|
||||
r1 = rf(status)
|
||||
} else {
|
||||
@@ -100,6 +109,10 @@ func (_m *JobStore) GetAllByType(jobType string) ([]*model.Job, error) {
|
||||
ret := _m.Called(jobType)
|
||||
|
||||
var r0 []*model.Job
|
||||
var r1 error
|
||||
if rf, ok := ret.Get(0).(func(string) ([]*model.Job, error)); ok {
|
||||
return rf(jobType)
|
||||
}
|
||||
if rf, ok := ret.Get(0).(func(string) []*model.Job); ok {
|
||||
r0 = rf(jobType)
|
||||
} else {
|
||||
@@ -108,7 +121,6 @@ func (_m *JobStore) GetAllByType(jobType string) ([]*model.Job, error) {
|
||||
}
|
||||
}
|
||||
|
||||
var r1 error
|
||||
if rf, ok := ret.Get(1).(func(string) error); ok {
|
||||
r1 = rf(jobType)
|
||||
} else {
|
||||
@@ -123,6 +135,10 @@ func (_m *JobStore) GetAllByTypeAndStatus(jobType string, status string) ([]*mod
|
||||
ret := _m.Called(jobType, status)
|
||||
|
||||
var r0 []*model.Job
|
||||
var r1 error
|
||||
if rf, ok := ret.Get(0).(func(string, string) ([]*model.Job, error)); ok {
|
||||
return rf(jobType, status)
|
||||
}
|
||||
if rf, ok := ret.Get(0).(func(string, string) []*model.Job); ok {
|
||||
r0 = rf(jobType, status)
|
||||
} else {
|
||||
@@ -131,7 +147,6 @@ func (_m *JobStore) GetAllByTypeAndStatus(jobType string, status string) ([]*mod
|
||||
}
|
||||
}
|
||||
|
||||
var r1 error
|
||||
if rf, ok := ret.Get(1).(func(string, string) error); ok {
|
||||
r1 = rf(jobType, status)
|
||||
} else {
|
||||
@@ -146,6 +161,10 @@ func (_m *JobStore) GetAllByTypePage(jobType string, offset int, limit int) ([]*
|
||||
ret := _m.Called(jobType, offset, limit)
|
||||
|
||||
var r0 []*model.Job
|
||||
var r1 error
|
||||
if rf, ok := ret.Get(0).(func(string, int, int) ([]*model.Job, error)); ok {
|
||||
return rf(jobType, offset, limit)
|
||||
}
|
||||
if rf, ok := ret.Get(0).(func(string, int, int) []*model.Job); ok {
|
||||
r0 = rf(jobType, offset, limit)
|
||||
} else {
|
||||
@@ -154,7 +173,6 @@ func (_m *JobStore) GetAllByTypePage(jobType string, offset int, limit int) ([]*
|
||||
}
|
||||
}
|
||||
|
||||
var r1 error
|
||||
if rf, ok := ret.Get(1).(func(string, int, int) error); ok {
|
||||
r1 = rf(jobType, offset, limit)
|
||||
} else {
|
||||
@@ -169,6 +187,10 @@ func (_m *JobStore) GetAllByTypesPage(jobTypes []string, offset int, limit int)
|
||||
ret := _m.Called(jobTypes, offset, limit)
|
||||
|
||||
var r0 []*model.Job
|
||||
var r1 error
|
||||
if rf, ok := ret.Get(0).(func([]string, int, int) ([]*model.Job, error)); ok {
|
||||
return rf(jobTypes, offset, limit)
|
||||
}
|
||||
if rf, ok := ret.Get(0).(func([]string, int, int) []*model.Job); ok {
|
||||
r0 = rf(jobTypes, offset, limit)
|
||||
} else {
|
||||
@@ -177,7 +199,6 @@ func (_m *JobStore) GetAllByTypesPage(jobTypes []string, offset int, limit int)
|
||||
}
|
||||
}
|
||||
|
||||
var r1 error
|
||||
if rf, ok := ret.Get(1).(func([]string, int, int) error); ok {
|
||||
r1 = rf(jobTypes, offset, limit)
|
||||
} else {
|
||||
@@ -192,6 +213,10 @@ func (_m *JobStore) GetAllPage(offset int, limit int) ([]*model.Job, error) {
|
||||
ret := _m.Called(offset, limit)
|
||||
|
||||
var r0 []*model.Job
|
||||
var r1 error
|
||||
if rf, ok := ret.Get(0).(func(int, int) ([]*model.Job, error)); ok {
|
||||
return rf(offset, limit)
|
||||
}
|
||||
if rf, ok := ret.Get(0).(func(int, int) []*model.Job); ok {
|
||||
r0 = rf(offset, limit)
|
||||
} else {
|
||||
@@ -200,7 +225,6 @@ func (_m *JobStore) GetAllPage(offset int, limit int) ([]*model.Job, error) {
|
||||
}
|
||||
}
|
||||
|
||||
var r1 error
|
||||
if rf, ok := ret.Get(1).(func(int, int) error); ok {
|
||||
r1 = rf(offset, limit)
|
||||
} else {
|
||||
@@ -215,13 +239,16 @@ func (_m *JobStore) GetCountByStatusAndType(status string, jobType string) (int6
|
||||
ret := _m.Called(status, jobType)
|
||||
|
||||
var r0 int64
|
||||
var r1 error
|
||||
if rf, ok := ret.Get(0).(func(string, string) (int64, error)); ok {
|
||||
return rf(status, jobType)
|
||||
}
|
||||
if rf, ok := ret.Get(0).(func(string, string) int64); ok {
|
||||
r0 = rf(status, jobType)
|
||||
} else {
|
||||
r0 = ret.Get(0).(int64)
|
||||
}
|
||||
|
||||
var r1 error
|
||||
if rf, ok := ret.Get(1).(func(string, string) error); ok {
|
||||
r1 = rf(status, jobType)
|
||||
} else {
|
||||
@@ -236,6 +263,10 @@ func (_m *JobStore) GetNewestJobByStatusAndType(status string, jobType string) (
|
||||
ret := _m.Called(status, jobType)
|
||||
|
||||
var r0 *model.Job
|
||||
var r1 error
|
||||
if rf, ok := ret.Get(0).(func(string, string) (*model.Job, error)); ok {
|
||||
return rf(status, jobType)
|
||||
}
|
||||
if rf, ok := ret.Get(0).(func(string, string) *model.Job); ok {
|
||||
r0 = rf(status, jobType)
|
||||
} else {
|
||||
@@ -244,7 +275,6 @@ func (_m *JobStore) GetNewestJobByStatusAndType(status string, jobType string) (
|
||||
}
|
||||
}
|
||||
|
||||
var r1 error
|
||||
if rf, ok := ret.Get(1).(func(string, string) error); ok {
|
||||
r1 = rf(status, jobType)
|
||||
} else {
|
||||
@@ -259,6 +289,10 @@ func (_m *JobStore) GetNewestJobByStatusesAndType(statuses []string, jobType str
|
||||
ret := _m.Called(statuses, jobType)
|
||||
|
||||
var r0 *model.Job
|
||||
var r1 error
|
||||
if rf, ok := ret.Get(0).(func([]string, string) (*model.Job, error)); ok {
|
||||
return rf(statuses, jobType)
|
||||
}
|
||||
if rf, ok := ret.Get(0).(func([]string, string) *model.Job); ok {
|
||||
r0 = rf(statuses, jobType)
|
||||
} else {
|
||||
@@ -267,7 +301,6 @@ func (_m *JobStore) GetNewestJobByStatusesAndType(statuses []string, jobType str
|
||||
}
|
||||
}
|
||||
|
||||
var r1 error
|
||||
if rf, ok := ret.Get(1).(func([]string, string) error); ok {
|
||||
r1 = rf(statuses, jobType)
|
||||
} else {
|
||||
@@ -282,6 +315,10 @@ func (_m *JobStore) Save(job *model.Job) (*model.Job, error) {
|
||||
ret := _m.Called(job)
|
||||
|
||||
var r0 *model.Job
|
||||
var r1 error
|
||||
if rf, ok := ret.Get(0).(func(*model.Job) (*model.Job, error)); ok {
|
||||
return rf(job)
|
||||
}
|
||||
if rf, ok := ret.Get(0).(func(*model.Job) *model.Job); ok {
|
||||
r0 = rf(job)
|
||||
} else {
|
||||
@@ -290,7 +327,6 @@ func (_m *JobStore) Save(job *model.Job) (*model.Job, error) {
|
||||
}
|
||||
}
|
||||
|
||||
var r1 error
|
||||
if rf, ok := ret.Get(1).(func(*model.Job) error); ok {
|
||||
r1 = rf(job)
|
||||
} else {
|
||||
@@ -305,13 +341,16 @@ func (_m *JobStore) UpdateOptimistically(job *model.Job, currentStatus string) (
|
||||
ret := _m.Called(job, currentStatus)
|
||||
|
||||
var r0 bool
|
||||
var r1 error
|
||||
if rf, ok := ret.Get(0).(func(*model.Job, string) (bool, error)); ok {
|
||||
return rf(job, currentStatus)
|
||||
}
|
||||
if rf, ok := ret.Get(0).(func(*model.Job, string) bool); ok {
|
||||
r0 = rf(job, currentStatus)
|
||||
} else {
|
||||
r0 = ret.Get(0).(bool)
|
||||
}
|
||||
|
||||
var r1 error
|
||||
if rf, ok := ret.Get(1).(func(*model.Job, string) error); ok {
|
||||
r1 = rf(job, currentStatus)
|
||||
} else {
|
||||
@@ -326,6 +365,10 @@ func (_m *JobStore) UpdateStatus(id string, status string) (*model.Job, error) {
|
||||
ret := _m.Called(id, status)
|
||||
|
||||
var r0 *model.Job
|
||||
var r1 error
|
||||
if rf, ok := ret.Get(0).(func(string, string) (*model.Job, error)); ok {
|
||||
return rf(id, status)
|
||||
}
|
||||
if rf, ok := ret.Get(0).(func(string, string) *model.Job); ok {
|
||||
r0 = rf(id, status)
|
||||
} else {
|
||||
@@ -334,7 +377,6 @@ func (_m *JobStore) UpdateStatus(id string, status string) (*model.Job, error) {
|
||||
}
|
||||
}
|
||||
|
||||
var r1 error
|
||||
if rf, ok := ret.Get(1).(func(string, string) error); ok {
|
||||
r1 = rf(id, status)
|
||||
} else {
|
||||
@@ -349,13 +391,16 @@ func (_m *JobStore) UpdateStatusOptimistically(id string, currentStatus string,
|
||||
ret := _m.Called(id, currentStatus, newStatus)
|
||||
|
||||
var r0 bool
|
||||
var r1 error
|
||||
if rf, ok := ret.Get(0).(func(string, string, string) (bool, error)); ok {
|
||||
return rf(id, currentStatus, newStatus)
|
||||
}
|
||||
if rf, ok := ret.Get(0).(func(string, string, string) bool); ok {
|
||||
r0 = rf(id, currentStatus, newStatus)
|
||||
} else {
|
||||
r0 = ret.Get(0).(bool)
|
||||
}
|
||||
|
||||
var r1 error
|
||||
if rf, ok := ret.Get(1).(func(string, string, string) error); ok {
|
||||
r1 = rf(id, currentStatus, newStatus)
|
||||
} else {
|
||||
@@ -364,3 +409,18 @@ func (_m *JobStore) UpdateStatusOptimistically(id string, currentStatus string,
|
||||
|
||||
return r0, r1
|
||||
}
|
||||
|
||||
type mockConstructorTestingTNewJobStore interface {
|
||||
mock.TestingT
|
||||
Cleanup(func())
|
||||
}
|
||||
|
||||
// NewJobStore creates a new instance of JobStore. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations.
|
||||
func NewJobStore(t mockConstructorTestingTNewJobStore) *JobStore {
|
||||
mock := &JobStore{}
|
||||
mock.Mock.Test(t)
|
||||
|
||||
t.Cleanup(func() { mock.AssertExpectations(t) })
|
||||
|
||||
return mock
|
||||
}
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
// Code generated by mockery v2.10.4. DO NOT EDIT.
|
||||
// Code generated by mockery v2.23.2. DO NOT EDIT.
|
||||
|
||||
// Regenerate this file using `make store-mocks`.
|
||||
|
||||
@@ -19,6 +19,10 @@ func (_m *LicenseStore) Get(id string) (*model.LicenseRecord, error) {
|
||||
ret := _m.Called(id)
|
||||
|
||||
var r0 *model.LicenseRecord
|
||||
var r1 error
|
||||
if rf, ok := ret.Get(0).(func(string) (*model.LicenseRecord, error)); ok {
|
||||
return rf(id)
|
||||
}
|
||||
if rf, ok := ret.Get(0).(func(string) *model.LicenseRecord); ok {
|
||||
r0 = rf(id)
|
||||
} else {
|
||||
@@ -27,7 +31,6 @@ func (_m *LicenseStore) Get(id string) (*model.LicenseRecord, error) {
|
||||
}
|
||||
}
|
||||
|
||||
var r1 error
|
||||
if rf, ok := ret.Get(1).(func(string) error); ok {
|
||||
r1 = rf(id)
|
||||
} else {
|
||||
@@ -42,6 +45,10 @@ func (_m *LicenseStore) GetAll() ([]*model.LicenseRecord, error) {
|
||||
ret := _m.Called()
|
||||
|
||||
var r0 []*model.LicenseRecord
|
||||
var r1 error
|
||||
if rf, ok := ret.Get(0).(func() ([]*model.LicenseRecord, error)); ok {
|
||||
return rf()
|
||||
}
|
||||
if rf, ok := ret.Get(0).(func() []*model.LicenseRecord); ok {
|
||||
r0 = rf()
|
||||
} else {
|
||||
@@ -50,7 +57,6 @@ func (_m *LicenseStore) GetAll() ([]*model.LicenseRecord, error) {
|
||||
}
|
||||
}
|
||||
|
||||
var r1 error
|
||||
if rf, ok := ret.Get(1).(func() error); ok {
|
||||
r1 = rf()
|
||||
} else {
|
||||
@@ -65,6 +71,10 @@ func (_m *LicenseStore) Save(license *model.LicenseRecord) (*model.LicenseRecord
|
||||
ret := _m.Called(license)
|
||||
|
||||
var r0 *model.LicenseRecord
|
||||
var r1 error
|
||||
if rf, ok := ret.Get(0).(func(*model.LicenseRecord) (*model.LicenseRecord, error)); ok {
|
||||
return rf(license)
|
||||
}
|
||||
if rf, ok := ret.Get(0).(func(*model.LicenseRecord) *model.LicenseRecord); ok {
|
||||
r0 = rf(license)
|
||||
} else {
|
||||
@@ -73,7 +83,6 @@ func (_m *LicenseStore) Save(license *model.LicenseRecord) (*model.LicenseRecord
|
||||
}
|
||||
}
|
||||
|
||||
var r1 error
|
||||
if rf, ok := ret.Get(1).(func(*model.LicenseRecord) error); ok {
|
||||
r1 = rf(license)
|
||||
} else {
|
||||
@@ -82,3 +91,18 @@ func (_m *LicenseStore) Save(license *model.LicenseRecord) (*model.LicenseRecord
|
||||
|
||||
return r0, r1
|
||||
}
|
||||
|
||||
type mockConstructorTestingTNewLicenseStore interface {
|
||||
mock.TestingT
|
||||
Cleanup(func())
|
||||
}
|
||||
|
||||
// NewLicenseStore creates a new instance of LicenseStore. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations.
|
||||
func NewLicenseStore(t mockConstructorTestingTNewLicenseStore) *LicenseStore {
|
||||
mock := &LicenseStore{}
|
||||
mock.Mock.Test(t)
|
||||
|
||||
t.Cleanup(func() { mock.AssertExpectations(t) })
|
||||
|
||||
return mock
|
||||
}
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
// Code generated by mockery v2.10.4. DO NOT EDIT.
|
||||
// Code generated by mockery v2.23.2. DO NOT EDIT.
|
||||
|
||||
// Regenerate this file using `make store-mocks`.
|
||||
|
||||
@@ -19,6 +19,10 @@ func (_m *LinkMetadataStore) Get(url string, timestamp int64) (*model.LinkMetada
|
||||
ret := _m.Called(url, timestamp)
|
||||
|
||||
var r0 *model.LinkMetadata
|
||||
var r1 error
|
||||
if rf, ok := ret.Get(0).(func(string, int64) (*model.LinkMetadata, error)); ok {
|
||||
return rf(url, timestamp)
|
||||
}
|
||||
if rf, ok := ret.Get(0).(func(string, int64) *model.LinkMetadata); ok {
|
||||
r0 = rf(url, timestamp)
|
||||
} else {
|
||||
@@ -27,7 +31,6 @@ func (_m *LinkMetadataStore) Get(url string, timestamp int64) (*model.LinkMetada
|
||||
}
|
||||
}
|
||||
|
||||
var r1 error
|
||||
if rf, ok := ret.Get(1).(func(string, int64) error); ok {
|
||||
r1 = rf(url, timestamp)
|
||||
} else {
|
||||
@@ -42,6 +45,10 @@ func (_m *LinkMetadataStore) Save(linkMetadata *model.LinkMetadata) (*model.Link
|
||||
ret := _m.Called(linkMetadata)
|
||||
|
||||
var r0 *model.LinkMetadata
|
||||
var r1 error
|
||||
if rf, ok := ret.Get(0).(func(*model.LinkMetadata) (*model.LinkMetadata, error)); ok {
|
||||
return rf(linkMetadata)
|
||||
}
|
||||
if rf, ok := ret.Get(0).(func(*model.LinkMetadata) *model.LinkMetadata); ok {
|
||||
r0 = rf(linkMetadata)
|
||||
} else {
|
||||
@@ -50,7 +57,6 @@ func (_m *LinkMetadataStore) Save(linkMetadata *model.LinkMetadata) (*model.Link
|
||||
}
|
||||
}
|
||||
|
||||
var r1 error
|
||||
if rf, ok := ret.Get(1).(func(*model.LinkMetadata) error); ok {
|
||||
r1 = rf(linkMetadata)
|
||||
} else {
|
||||
@@ -59,3 +65,18 @@ func (_m *LinkMetadataStore) Save(linkMetadata *model.LinkMetadata) (*model.Link
|
||||
|
||||
return r0, r1
|
||||
}
|
||||
|
||||
type mockConstructorTestingTNewLinkMetadataStore interface {
|
||||
mock.TestingT
|
||||
Cleanup(func())
|
||||
}
|
||||
|
||||
// NewLinkMetadataStore creates a new instance of LinkMetadataStore. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations.
|
||||
func NewLinkMetadataStore(t mockConstructorTestingTNewLinkMetadataStore) *LinkMetadataStore {
|
||||
mock := &LinkMetadataStore{}
|
||||
mock.Mock.Test(t)
|
||||
|
||||
t.Cleanup(func() { mock.AssertExpectations(t) })
|
||||
|
||||
return mock
|
||||
}
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
// Code generated by mockery v2.10.4. DO NOT EDIT.
|
||||
// Code generated by mockery v2.23.2. DO NOT EDIT.
|
||||
|
||||
// Regenerate this file using `make store-mocks`.
|
||||
|
||||
@@ -33,6 +33,10 @@ func (_m *NotifyAdminStore) Get(trial bool) ([]*model.NotifyAdminData, error) {
|
||||
ret := _m.Called(trial)
|
||||
|
||||
var r0 []*model.NotifyAdminData
|
||||
var r1 error
|
||||
if rf, ok := ret.Get(0).(func(bool) ([]*model.NotifyAdminData, error)); ok {
|
||||
return rf(trial)
|
||||
}
|
||||
if rf, ok := ret.Get(0).(func(bool) []*model.NotifyAdminData); ok {
|
||||
r0 = rf(trial)
|
||||
} else {
|
||||
@@ -41,7 +45,6 @@ func (_m *NotifyAdminStore) Get(trial bool) ([]*model.NotifyAdminData, error) {
|
||||
}
|
||||
}
|
||||
|
||||
var r1 error
|
||||
if rf, ok := ret.Get(1).(func(bool) error); ok {
|
||||
r1 = rf(trial)
|
||||
} else {
|
||||
@@ -56,6 +59,10 @@ func (_m *NotifyAdminStore) GetDataByUserIdAndFeature(userId string, feature mod
|
||||
ret := _m.Called(userId, feature)
|
||||
|
||||
var r0 []*model.NotifyAdminData
|
||||
var r1 error
|
||||
if rf, ok := ret.Get(0).(func(string, model.MattermostFeature) ([]*model.NotifyAdminData, error)); ok {
|
||||
return rf(userId, feature)
|
||||
}
|
||||
if rf, ok := ret.Get(0).(func(string, model.MattermostFeature) []*model.NotifyAdminData); ok {
|
||||
r0 = rf(userId, feature)
|
||||
} else {
|
||||
@@ -64,7 +71,6 @@ func (_m *NotifyAdminStore) GetDataByUserIdAndFeature(userId string, feature mod
|
||||
}
|
||||
}
|
||||
|
||||
var r1 error
|
||||
if rf, ok := ret.Get(1).(func(string, model.MattermostFeature) error); ok {
|
||||
r1 = rf(userId, feature)
|
||||
} else {
|
||||
@@ -79,6 +85,10 @@ func (_m *NotifyAdminStore) Save(data *model.NotifyAdminData) (*model.NotifyAdmi
|
||||
ret := _m.Called(data)
|
||||
|
||||
var r0 *model.NotifyAdminData
|
||||
var r1 error
|
||||
if rf, ok := ret.Get(0).(func(*model.NotifyAdminData) (*model.NotifyAdminData, error)); ok {
|
||||
return rf(data)
|
||||
}
|
||||
if rf, ok := ret.Get(0).(func(*model.NotifyAdminData) *model.NotifyAdminData); ok {
|
||||
r0 = rf(data)
|
||||
} else {
|
||||
@@ -87,7 +97,6 @@ func (_m *NotifyAdminStore) Save(data *model.NotifyAdminData) (*model.NotifyAdmi
|
||||
}
|
||||
}
|
||||
|
||||
var r1 error
|
||||
if rf, ok := ret.Get(1).(func(*model.NotifyAdminData) error); ok {
|
||||
r1 = rf(data)
|
||||
} else {
|
||||
@@ -110,3 +119,18 @@ func (_m *NotifyAdminStore) Update(userId string, requiredPlan string, requiredF
|
||||
|
||||
return r0
|
||||
}
|
||||
|
||||
type mockConstructorTestingTNewNotifyAdminStore interface {
|
||||
mock.TestingT
|
||||
Cleanup(func())
|
||||
}
|
||||
|
||||
// NewNotifyAdminStore creates a new instance of NotifyAdminStore. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations.
|
||||
func NewNotifyAdminStore(t mockConstructorTestingTNewNotifyAdminStore) *NotifyAdminStore {
|
||||
mock := &NotifyAdminStore{}
|
||||
mock.Mock.Test(t)
|
||||
|
||||
t.Cleanup(func() { mock.AssertExpectations(t) })
|
||||
|
||||
return mock
|
||||
}
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
// Code generated by mockery v2.10.4. DO NOT EDIT.
|
||||
// Code generated by mockery v2.23.2. DO NOT EDIT.
|
||||
|
||||
// Regenerate this file using `make store-mocks`.
|
||||
|
||||
@@ -33,6 +33,10 @@ func (_m *OAuthStore) GetAccessData(token string) (*model.AccessData, error) {
|
||||
ret := _m.Called(token)
|
||||
|
||||
var r0 *model.AccessData
|
||||
var r1 error
|
||||
if rf, ok := ret.Get(0).(func(string) (*model.AccessData, error)); ok {
|
||||
return rf(token)
|
||||
}
|
||||
if rf, ok := ret.Get(0).(func(string) *model.AccessData); ok {
|
||||
r0 = rf(token)
|
||||
} else {
|
||||
@@ -41,7 +45,6 @@ func (_m *OAuthStore) GetAccessData(token string) (*model.AccessData, error) {
|
||||
}
|
||||
}
|
||||
|
||||
var r1 error
|
||||
if rf, ok := ret.Get(1).(func(string) error); ok {
|
||||
r1 = rf(token)
|
||||
} else {
|
||||
@@ -56,6 +59,10 @@ func (_m *OAuthStore) GetAccessDataByRefreshToken(token string) (*model.AccessDa
|
||||
ret := _m.Called(token)
|
||||
|
||||
var r0 *model.AccessData
|
||||
var r1 error
|
||||
if rf, ok := ret.Get(0).(func(string) (*model.AccessData, error)); ok {
|
||||
return rf(token)
|
||||
}
|
||||
if rf, ok := ret.Get(0).(func(string) *model.AccessData); ok {
|
||||
r0 = rf(token)
|
||||
} else {
|
||||
@@ -64,7 +71,6 @@ func (_m *OAuthStore) GetAccessDataByRefreshToken(token string) (*model.AccessDa
|
||||
}
|
||||
}
|
||||
|
||||
var r1 error
|
||||
if rf, ok := ret.Get(1).(func(string) error); ok {
|
||||
r1 = rf(token)
|
||||
} else {
|
||||
@@ -79,6 +85,10 @@ func (_m *OAuthStore) GetAccessDataByUserForApp(userID string, clientId string)
|
||||
ret := _m.Called(userID, clientId)
|
||||
|
||||
var r0 []*model.AccessData
|
||||
var r1 error
|
||||
if rf, ok := ret.Get(0).(func(string, string) ([]*model.AccessData, error)); ok {
|
||||
return rf(userID, clientId)
|
||||
}
|
||||
if rf, ok := ret.Get(0).(func(string, string) []*model.AccessData); ok {
|
||||
r0 = rf(userID, clientId)
|
||||
} else {
|
||||
@@ -87,7 +97,6 @@ func (_m *OAuthStore) GetAccessDataByUserForApp(userID string, clientId string)
|
||||
}
|
||||
}
|
||||
|
||||
var r1 error
|
||||
if rf, ok := ret.Get(1).(func(string, string) error); ok {
|
||||
r1 = rf(userID, clientId)
|
||||
} else {
|
||||
@@ -102,6 +111,10 @@ func (_m *OAuthStore) GetApp(id string) (*model.OAuthApp, error) {
|
||||
ret := _m.Called(id)
|
||||
|
||||
var r0 *model.OAuthApp
|
||||
var r1 error
|
||||
if rf, ok := ret.Get(0).(func(string) (*model.OAuthApp, error)); ok {
|
||||
return rf(id)
|
||||
}
|
||||
if rf, ok := ret.Get(0).(func(string) *model.OAuthApp); ok {
|
||||
r0 = rf(id)
|
||||
} else {
|
||||
@@ -110,7 +123,6 @@ func (_m *OAuthStore) GetApp(id string) (*model.OAuthApp, error) {
|
||||
}
|
||||
}
|
||||
|
||||
var r1 error
|
||||
if rf, ok := ret.Get(1).(func(string) error); ok {
|
||||
r1 = rf(id)
|
||||
} else {
|
||||
@@ -125,6 +137,10 @@ func (_m *OAuthStore) GetAppByUser(userID string, offset int, limit int) ([]*mod
|
||||
ret := _m.Called(userID, offset, limit)
|
||||
|
||||
var r0 []*model.OAuthApp
|
||||
var r1 error
|
||||
if rf, ok := ret.Get(0).(func(string, int, int) ([]*model.OAuthApp, error)); ok {
|
||||
return rf(userID, offset, limit)
|
||||
}
|
||||
if rf, ok := ret.Get(0).(func(string, int, int) []*model.OAuthApp); ok {
|
||||
r0 = rf(userID, offset, limit)
|
||||
} else {
|
||||
@@ -133,7 +149,6 @@ func (_m *OAuthStore) GetAppByUser(userID string, offset int, limit int) ([]*mod
|
||||
}
|
||||
}
|
||||
|
||||
var r1 error
|
||||
if rf, ok := ret.Get(1).(func(string, int, int) error); ok {
|
||||
r1 = rf(userID, offset, limit)
|
||||
} else {
|
||||
@@ -148,6 +163,10 @@ func (_m *OAuthStore) GetApps(offset int, limit int) ([]*model.OAuthApp, error)
|
||||
ret := _m.Called(offset, limit)
|
||||
|
||||
var r0 []*model.OAuthApp
|
||||
var r1 error
|
||||
if rf, ok := ret.Get(0).(func(int, int) ([]*model.OAuthApp, error)); ok {
|
||||
return rf(offset, limit)
|
||||
}
|
||||
if rf, ok := ret.Get(0).(func(int, int) []*model.OAuthApp); ok {
|
||||
r0 = rf(offset, limit)
|
||||
} else {
|
||||
@@ -156,7 +175,6 @@ func (_m *OAuthStore) GetApps(offset int, limit int) ([]*model.OAuthApp, error)
|
||||
}
|
||||
}
|
||||
|
||||
var r1 error
|
||||
if rf, ok := ret.Get(1).(func(int, int) error); ok {
|
||||
r1 = rf(offset, limit)
|
||||
} else {
|
||||
@@ -171,6 +189,10 @@ func (_m *OAuthStore) GetAuthData(code string) (*model.AuthData, error) {
|
||||
ret := _m.Called(code)
|
||||
|
||||
var r0 *model.AuthData
|
||||
var r1 error
|
||||
if rf, ok := ret.Get(0).(func(string) (*model.AuthData, error)); ok {
|
||||
return rf(code)
|
||||
}
|
||||
if rf, ok := ret.Get(0).(func(string) *model.AuthData); ok {
|
||||
r0 = rf(code)
|
||||
} else {
|
||||
@@ -179,7 +201,6 @@ func (_m *OAuthStore) GetAuthData(code string) (*model.AuthData, error) {
|
||||
}
|
||||
}
|
||||
|
||||
var r1 error
|
||||
if rf, ok := ret.Get(1).(func(string) error); ok {
|
||||
r1 = rf(code)
|
||||
} else {
|
||||
@@ -194,6 +215,10 @@ func (_m *OAuthStore) GetAuthorizedApps(userID string, offset int, limit int) ([
|
||||
ret := _m.Called(userID, offset, limit)
|
||||
|
||||
var r0 []*model.OAuthApp
|
||||
var r1 error
|
||||
if rf, ok := ret.Get(0).(func(string, int, int) ([]*model.OAuthApp, error)); ok {
|
||||
return rf(userID, offset, limit)
|
||||
}
|
||||
if rf, ok := ret.Get(0).(func(string, int, int) []*model.OAuthApp); ok {
|
||||
r0 = rf(userID, offset, limit)
|
||||
} else {
|
||||
@@ -202,7 +227,6 @@ func (_m *OAuthStore) GetAuthorizedApps(userID string, offset int, limit int) ([
|
||||
}
|
||||
}
|
||||
|
||||
var r1 error
|
||||
if rf, ok := ret.Get(1).(func(string, int, int) error); ok {
|
||||
r1 = rf(userID, offset, limit)
|
||||
} else {
|
||||
@@ -217,6 +241,10 @@ func (_m *OAuthStore) GetPreviousAccessData(userID string, clientId string) (*mo
|
||||
ret := _m.Called(userID, clientId)
|
||||
|
||||
var r0 *model.AccessData
|
||||
var r1 error
|
||||
if rf, ok := ret.Get(0).(func(string, string) (*model.AccessData, error)); ok {
|
||||
return rf(userID, clientId)
|
||||
}
|
||||
if rf, ok := ret.Get(0).(func(string, string) *model.AccessData); ok {
|
||||
r0 = rf(userID, clientId)
|
||||
} else {
|
||||
@@ -225,7 +253,6 @@ func (_m *OAuthStore) GetPreviousAccessData(userID string, clientId string) (*mo
|
||||
}
|
||||
}
|
||||
|
||||
var r1 error
|
||||
if rf, ok := ret.Get(1).(func(string, string) error); ok {
|
||||
r1 = rf(userID, clientId)
|
||||
} else {
|
||||
@@ -324,6 +351,10 @@ func (_m *OAuthStore) SaveAccessData(accessData *model.AccessData) (*model.Acces
|
||||
ret := _m.Called(accessData)
|
||||
|
||||
var r0 *model.AccessData
|
||||
var r1 error
|
||||
if rf, ok := ret.Get(0).(func(*model.AccessData) (*model.AccessData, error)); ok {
|
||||
return rf(accessData)
|
||||
}
|
||||
if rf, ok := ret.Get(0).(func(*model.AccessData) *model.AccessData); ok {
|
||||
r0 = rf(accessData)
|
||||
} else {
|
||||
@@ -332,7 +363,6 @@ func (_m *OAuthStore) SaveAccessData(accessData *model.AccessData) (*model.Acces
|
||||
}
|
||||
}
|
||||
|
||||
var r1 error
|
||||
if rf, ok := ret.Get(1).(func(*model.AccessData) error); ok {
|
||||
r1 = rf(accessData)
|
||||
} else {
|
||||
@@ -347,6 +377,10 @@ func (_m *OAuthStore) SaveApp(app *model.OAuthApp) (*model.OAuthApp, error) {
|
||||
ret := _m.Called(app)
|
||||
|
||||
var r0 *model.OAuthApp
|
||||
var r1 error
|
||||
if rf, ok := ret.Get(0).(func(*model.OAuthApp) (*model.OAuthApp, error)); ok {
|
||||
return rf(app)
|
||||
}
|
||||
if rf, ok := ret.Get(0).(func(*model.OAuthApp) *model.OAuthApp); ok {
|
||||
r0 = rf(app)
|
||||
} else {
|
||||
@@ -355,7 +389,6 @@ func (_m *OAuthStore) SaveApp(app *model.OAuthApp) (*model.OAuthApp, error) {
|
||||
}
|
||||
}
|
||||
|
||||
var r1 error
|
||||
if rf, ok := ret.Get(1).(func(*model.OAuthApp) error); ok {
|
||||
r1 = rf(app)
|
||||
} else {
|
||||
@@ -370,6 +403,10 @@ func (_m *OAuthStore) SaveAuthData(authData *model.AuthData) (*model.AuthData, e
|
||||
ret := _m.Called(authData)
|
||||
|
||||
var r0 *model.AuthData
|
||||
var r1 error
|
||||
if rf, ok := ret.Get(0).(func(*model.AuthData) (*model.AuthData, error)); ok {
|
||||
return rf(authData)
|
||||
}
|
||||
if rf, ok := ret.Get(0).(func(*model.AuthData) *model.AuthData); ok {
|
||||
r0 = rf(authData)
|
||||
} else {
|
||||
@@ -378,7 +415,6 @@ func (_m *OAuthStore) SaveAuthData(authData *model.AuthData) (*model.AuthData, e
|
||||
}
|
||||
}
|
||||
|
||||
var r1 error
|
||||
if rf, ok := ret.Get(1).(func(*model.AuthData) error); ok {
|
||||
r1 = rf(authData)
|
||||
} else {
|
||||
@@ -393,6 +429,10 @@ func (_m *OAuthStore) UpdateAccessData(accessData *model.AccessData) (*model.Acc
|
||||
ret := _m.Called(accessData)
|
||||
|
||||
var r0 *model.AccessData
|
||||
var r1 error
|
||||
if rf, ok := ret.Get(0).(func(*model.AccessData) (*model.AccessData, error)); ok {
|
||||
return rf(accessData)
|
||||
}
|
||||
if rf, ok := ret.Get(0).(func(*model.AccessData) *model.AccessData); ok {
|
||||
r0 = rf(accessData)
|
||||
} else {
|
||||
@@ -401,7 +441,6 @@ func (_m *OAuthStore) UpdateAccessData(accessData *model.AccessData) (*model.Acc
|
||||
}
|
||||
}
|
||||
|
||||
var r1 error
|
||||
if rf, ok := ret.Get(1).(func(*model.AccessData) error); ok {
|
||||
r1 = rf(accessData)
|
||||
} else {
|
||||
@@ -416,6 +455,10 @@ func (_m *OAuthStore) UpdateApp(app *model.OAuthApp) (*model.OAuthApp, error) {
|
||||
ret := _m.Called(app)
|
||||
|
||||
var r0 *model.OAuthApp
|
||||
var r1 error
|
||||
if rf, ok := ret.Get(0).(func(*model.OAuthApp) (*model.OAuthApp, error)); ok {
|
||||
return rf(app)
|
||||
}
|
||||
if rf, ok := ret.Get(0).(func(*model.OAuthApp) *model.OAuthApp); ok {
|
||||
r0 = rf(app)
|
||||
} else {
|
||||
@@ -424,7 +467,6 @@ func (_m *OAuthStore) UpdateApp(app *model.OAuthApp) (*model.OAuthApp, error) {
|
||||
}
|
||||
}
|
||||
|
||||
var r1 error
|
||||
if rf, ok := ret.Get(1).(func(*model.OAuthApp) error); ok {
|
||||
r1 = rf(app)
|
||||
} else {
|
||||
@@ -433,3 +475,18 @@ func (_m *OAuthStore) UpdateApp(app *model.OAuthApp) (*model.OAuthApp, error) {
|
||||
|
||||
return r0, r1
|
||||
}
|
||||
|
||||
type mockConstructorTestingTNewOAuthStore interface {
|
||||
mock.TestingT
|
||||
Cleanup(func())
|
||||
}
|
||||
|
||||
// NewOAuthStore creates a new instance of OAuthStore. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations.
|
||||
func NewOAuthStore(t mockConstructorTestingTNewOAuthStore) *OAuthStore {
|
||||
mock := &OAuthStore{}
|
||||
mock.Mock.Test(t)
|
||||
|
||||
t.Cleanup(func() { mock.AssertExpectations(t) })
|
||||
|
||||
return mock
|
||||
}
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
// Code generated by mockery v2.10.4. DO NOT EDIT.
|
||||
// Code generated by mockery v2.23.2. DO NOT EDIT.
|
||||
|
||||
// Regenerate this file using `make store-mocks`.
|
||||
|
||||
@@ -19,13 +19,16 @@ func (_m *PluginStore) CompareAndDelete(keyVal *model.PluginKeyValue, oldValue [
|
||||
ret := _m.Called(keyVal, oldValue)
|
||||
|
||||
var r0 bool
|
||||
var r1 error
|
||||
if rf, ok := ret.Get(0).(func(*model.PluginKeyValue, []byte) (bool, error)); ok {
|
||||
return rf(keyVal, oldValue)
|
||||
}
|
||||
if rf, ok := ret.Get(0).(func(*model.PluginKeyValue, []byte) bool); ok {
|
||||
r0 = rf(keyVal, oldValue)
|
||||
} else {
|
||||
r0 = ret.Get(0).(bool)
|
||||
}
|
||||
|
||||
var r1 error
|
||||
if rf, ok := ret.Get(1).(func(*model.PluginKeyValue, []byte) error); ok {
|
||||
r1 = rf(keyVal, oldValue)
|
||||
} else {
|
||||
@@ -40,13 +43,16 @@ func (_m *PluginStore) CompareAndSet(keyVal *model.PluginKeyValue, oldValue []by
|
||||
ret := _m.Called(keyVal, oldValue)
|
||||
|
||||
var r0 bool
|
||||
var r1 error
|
||||
if rf, ok := ret.Get(0).(func(*model.PluginKeyValue, []byte) (bool, error)); ok {
|
||||
return rf(keyVal, oldValue)
|
||||
}
|
||||
if rf, ok := ret.Get(0).(func(*model.PluginKeyValue, []byte) bool); ok {
|
||||
r0 = rf(keyVal, oldValue)
|
||||
} else {
|
||||
r0 = ret.Get(0).(bool)
|
||||
}
|
||||
|
||||
var r1 error
|
||||
if rf, ok := ret.Get(1).(func(*model.PluginKeyValue, []byte) error); ok {
|
||||
r1 = rf(keyVal, oldValue)
|
||||
} else {
|
||||
@@ -103,6 +109,10 @@ func (_m *PluginStore) Get(pluginID string, key string) (*model.PluginKeyValue,
|
||||
ret := _m.Called(pluginID, key)
|
||||
|
||||
var r0 *model.PluginKeyValue
|
||||
var r1 error
|
||||
if rf, ok := ret.Get(0).(func(string, string) (*model.PluginKeyValue, error)); ok {
|
||||
return rf(pluginID, key)
|
||||
}
|
||||
if rf, ok := ret.Get(0).(func(string, string) *model.PluginKeyValue); ok {
|
||||
r0 = rf(pluginID, key)
|
||||
} else {
|
||||
@@ -111,7 +121,6 @@ func (_m *PluginStore) Get(pluginID string, key string) (*model.PluginKeyValue,
|
||||
}
|
||||
}
|
||||
|
||||
var r1 error
|
||||
if rf, ok := ret.Get(1).(func(string, string) error); ok {
|
||||
r1 = rf(pluginID, key)
|
||||
} else {
|
||||
@@ -126,6 +135,10 @@ func (_m *PluginStore) List(pluginID string, page int, perPage int) ([]string, e
|
||||
ret := _m.Called(pluginID, page, perPage)
|
||||
|
||||
var r0 []string
|
||||
var r1 error
|
||||
if rf, ok := ret.Get(0).(func(string, int, int) ([]string, error)); ok {
|
||||
return rf(pluginID, page, perPage)
|
||||
}
|
||||
if rf, ok := ret.Get(0).(func(string, int, int) []string); ok {
|
||||
r0 = rf(pluginID, page, perPage)
|
||||
} else {
|
||||
@@ -134,7 +147,6 @@ func (_m *PluginStore) List(pluginID string, page int, perPage int) ([]string, e
|
||||
}
|
||||
}
|
||||
|
||||
var r1 error
|
||||
if rf, ok := ret.Get(1).(func(string, int, int) error); ok {
|
||||
r1 = rf(pluginID, page, perPage)
|
||||
} else {
|
||||
@@ -149,6 +161,10 @@ func (_m *PluginStore) SaveOrUpdate(keyVal *model.PluginKeyValue) (*model.Plugin
|
||||
ret := _m.Called(keyVal)
|
||||
|
||||
var r0 *model.PluginKeyValue
|
||||
var r1 error
|
||||
if rf, ok := ret.Get(0).(func(*model.PluginKeyValue) (*model.PluginKeyValue, error)); ok {
|
||||
return rf(keyVal)
|
||||
}
|
||||
if rf, ok := ret.Get(0).(func(*model.PluginKeyValue) *model.PluginKeyValue); ok {
|
||||
r0 = rf(keyVal)
|
||||
} else {
|
||||
@@ -157,7 +173,6 @@ func (_m *PluginStore) SaveOrUpdate(keyVal *model.PluginKeyValue) (*model.Plugin
|
||||
}
|
||||
}
|
||||
|
||||
var r1 error
|
||||
if rf, ok := ret.Get(1).(func(*model.PluginKeyValue) error); ok {
|
||||
r1 = rf(keyVal)
|
||||
} else {
|
||||
@@ -172,13 +187,16 @@ func (_m *PluginStore) SetWithOptions(pluginID string, key string, value []byte,
|
||||
ret := _m.Called(pluginID, key, value, options)
|
||||
|
||||
var r0 bool
|
||||
var r1 error
|
||||
if rf, ok := ret.Get(0).(func(string, string, []byte, model.PluginKVSetOptions) (bool, error)); ok {
|
||||
return rf(pluginID, key, value, options)
|
||||
}
|
||||
if rf, ok := ret.Get(0).(func(string, string, []byte, model.PluginKVSetOptions) bool); ok {
|
||||
r0 = rf(pluginID, key, value, options)
|
||||
} else {
|
||||
r0 = ret.Get(0).(bool)
|
||||
}
|
||||
|
||||
var r1 error
|
||||
if rf, ok := ret.Get(1).(func(string, string, []byte, model.PluginKVSetOptions) error); ok {
|
||||
r1 = rf(pluginID, key, value, options)
|
||||
} else {
|
||||
@@ -187,3 +205,18 @@ func (_m *PluginStore) SetWithOptions(pluginID string, key string, value []byte,
|
||||
|
||||
return r0, r1
|
||||
}
|
||||
|
||||
type mockConstructorTestingTNewPluginStore interface {
|
||||
mock.TestingT
|
||||
Cleanup(func())
|
||||
}
|
||||
|
||||
// NewPluginStore creates a new instance of PluginStore. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations.
|
||||
func NewPluginStore(t mockConstructorTestingTNewPluginStore) *PluginStore {
|
||||
mock := &PluginStore{}
|
||||
mock.Mock.Test(t)
|
||||
|
||||
t.Cleanup(func() { mock.AssertExpectations(t) })
|
||||
|
||||
return mock
|
||||
}
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
// Code generated by mockery v2.10.4. DO NOT EDIT.
|
||||
// Code generated by mockery v2.23.2. DO NOT EDIT.
|
||||
|
||||
// Regenerate this file using `make store-mocks`.
|
||||
|
||||
@@ -33,6 +33,10 @@ func (_m *PostAcknowledgementStore) Get(postID string, userID string) (*model.Po
|
||||
ret := _m.Called(postID, userID)
|
||||
|
||||
var r0 *model.PostAcknowledgement
|
||||
var r1 error
|
||||
if rf, ok := ret.Get(0).(func(string, string) (*model.PostAcknowledgement, error)); ok {
|
||||
return rf(postID, userID)
|
||||
}
|
||||
if rf, ok := ret.Get(0).(func(string, string) *model.PostAcknowledgement); ok {
|
||||
r0 = rf(postID, userID)
|
||||
} else {
|
||||
@@ -41,7 +45,6 @@ func (_m *PostAcknowledgementStore) Get(postID string, userID string) (*model.Po
|
||||
}
|
||||
}
|
||||
|
||||
var r1 error
|
||||
if rf, ok := ret.Get(1).(func(string, string) error); ok {
|
||||
r1 = rf(postID, userID)
|
||||
} else {
|
||||
@@ -56,6 +59,10 @@ func (_m *PostAcknowledgementStore) GetForPost(postID string) ([]*model.PostAckn
|
||||
ret := _m.Called(postID)
|
||||
|
||||
var r0 []*model.PostAcknowledgement
|
||||
var r1 error
|
||||
if rf, ok := ret.Get(0).(func(string) ([]*model.PostAcknowledgement, error)); ok {
|
||||
return rf(postID)
|
||||
}
|
||||
if rf, ok := ret.Get(0).(func(string) []*model.PostAcknowledgement); ok {
|
||||
r0 = rf(postID)
|
||||
} else {
|
||||
@@ -64,7 +71,6 @@ func (_m *PostAcknowledgementStore) GetForPost(postID string) ([]*model.PostAckn
|
||||
}
|
||||
}
|
||||
|
||||
var r1 error
|
||||
if rf, ok := ret.Get(1).(func(string) error); ok {
|
||||
r1 = rf(postID)
|
||||
} else {
|
||||
@@ -79,6 +85,10 @@ func (_m *PostAcknowledgementStore) GetForPosts(postIds []string) ([]*model.Post
|
||||
ret := _m.Called(postIds)
|
||||
|
||||
var r0 []*model.PostAcknowledgement
|
||||
var r1 error
|
||||
if rf, ok := ret.Get(0).(func([]string) ([]*model.PostAcknowledgement, error)); ok {
|
||||
return rf(postIds)
|
||||
}
|
||||
if rf, ok := ret.Get(0).(func([]string) []*model.PostAcknowledgement); ok {
|
||||
r0 = rf(postIds)
|
||||
} else {
|
||||
@@ -87,7 +97,6 @@ func (_m *PostAcknowledgementStore) GetForPosts(postIds []string) ([]*model.Post
|
||||
}
|
||||
}
|
||||
|
||||
var r1 error
|
||||
if rf, ok := ret.Get(1).(func([]string) error); ok {
|
||||
r1 = rf(postIds)
|
||||
} else {
|
||||
@@ -102,6 +111,10 @@ func (_m *PostAcknowledgementStore) Save(postID string, userID string, acknowled
|
||||
ret := _m.Called(postID, userID, acknowledgedAt)
|
||||
|
||||
var r0 *model.PostAcknowledgement
|
||||
var r1 error
|
||||
if rf, ok := ret.Get(0).(func(string, string, int64) (*model.PostAcknowledgement, error)); ok {
|
||||
return rf(postID, userID, acknowledgedAt)
|
||||
}
|
||||
if rf, ok := ret.Get(0).(func(string, string, int64) *model.PostAcknowledgement); ok {
|
||||
r0 = rf(postID, userID, acknowledgedAt)
|
||||
} else {
|
||||
@@ -110,7 +123,6 @@ func (_m *PostAcknowledgementStore) Save(postID string, userID string, acknowled
|
||||
}
|
||||
}
|
||||
|
||||
var r1 error
|
||||
if rf, ok := ret.Get(1).(func(string, string, int64) error); ok {
|
||||
r1 = rf(postID, userID, acknowledgedAt)
|
||||
} else {
|
||||
@@ -119,3 +131,18 @@ func (_m *PostAcknowledgementStore) Save(postID string, userID string, acknowled
|
||||
|
||||
return r0, r1
|
||||
}
|
||||
|
||||
type mockConstructorTestingTNewPostAcknowledgementStore interface {
|
||||
mock.TestingT
|
||||
Cleanup(func())
|
||||
}
|
||||
|
||||
// NewPostAcknowledgementStore creates a new instance of PostAcknowledgementStore. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations.
|
||||
func NewPostAcknowledgementStore(t mockConstructorTestingTNewPostAcknowledgementStore) *PostAcknowledgementStore {
|
||||
mock := &PostAcknowledgementStore{}
|
||||
mock.Mock.Test(t)
|
||||
|
||||
t.Cleanup(func() { mock.AssertExpectations(t) })
|
||||
|
||||
return mock
|
||||
}
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
// Code generated by mockery v2.10.4. DO NOT EDIT.
|
||||
// Code generated by mockery v2.23.2. DO NOT EDIT.
|
||||
|
||||
// Regenerate this file using `make store-mocks`.
|
||||
|
||||
@@ -19,6 +19,10 @@ func (_m *PostPriorityStore) GetForPost(postId string) (*model.PostPriority, err
|
||||
ret := _m.Called(postId)
|
||||
|
||||
var r0 *model.PostPriority
|
||||
var r1 error
|
||||
if rf, ok := ret.Get(0).(func(string) (*model.PostPriority, error)); ok {
|
||||
return rf(postId)
|
||||
}
|
||||
if rf, ok := ret.Get(0).(func(string) *model.PostPriority); ok {
|
||||
r0 = rf(postId)
|
||||
} else {
|
||||
@@ -27,7 +31,6 @@ func (_m *PostPriorityStore) GetForPost(postId string) (*model.PostPriority, err
|
||||
}
|
||||
}
|
||||
|
||||
var r1 error
|
||||
if rf, ok := ret.Get(1).(func(string) error); ok {
|
||||
r1 = rf(postId)
|
||||
} else {
|
||||
@@ -42,6 +45,10 @@ func (_m *PostPriorityStore) GetForPosts(ids []string) ([]*model.PostPriority, e
|
||||
ret := _m.Called(ids)
|
||||
|
||||
var r0 []*model.PostPriority
|
||||
var r1 error
|
||||
if rf, ok := ret.Get(0).(func([]string) ([]*model.PostPriority, error)); ok {
|
||||
return rf(ids)
|
||||
}
|
||||
if rf, ok := ret.Get(0).(func([]string) []*model.PostPriority); ok {
|
||||
r0 = rf(ids)
|
||||
} else {
|
||||
@@ -50,7 +57,6 @@ func (_m *PostPriorityStore) GetForPosts(ids []string) ([]*model.PostPriority, e
|
||||
}
|
||||
}
|
||||
|
||||
var r1 error
|
||||
if rf, ok := ret.Get(1).(func([]string) error); ok {
|
||||
r1 = rf(ids)
|
||||
} else {
|
||||
@@ -59,3 +65,18 @@ func (_m *PostPriorityStore) GetForPosts(ids []string) ([]*model.PostPriority, e
|
||||
|
||||
return r0, r1
|
||||
}
|
||||
|
||||
type mockConstructorTestingTNewPostPriorityStore interface {
|
||||
mock.TestingT
|
||||
Cleanup(func())
|
||||
}
|
||||
|
||||
// NewPostPriorityStore creates a new instance of PostPriorityStore. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations.
|
||||
func NewPostPriorityStore(t mockConstructorTestingTNewPostPriorityStore) *PostPriorityStore {
|
||||
mock := &PostPriorityStore{}
|
||||
mock.Mock.Test(t)
|
||||
|
||||
t.Cleanup(func() { mock.AssertExpectations(t) })
|
||||
|
||||
return mock
|
||||
}
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
// Code generated by mockery v2.10.4. DO NOT EDIT.
|
||||
// Code generated by mockery v2.23.2. DO NOT EDIT.
|
||||
|
||||
// Regenerate this file using `make store-mocks`.
|
||||
|
||||
@@ -23,13 +23,16 @@ func (_m *PostStore) AnalyticsPostCount(options *model.PostCountOptions) (int64,
|
||||
ret := _m.Called(options)
|
||||
|
||||
var r0 int64
|
||||
var r1 error
|
||||
if rf, ok := ret.Get(0).(func(*model.PostCountOptions) (int64, error)); ok {
|
||||
return rf(options)
|
||||
}
|
||||
if rf, ok := ret.Get(0).(func(*model.PostCountOptions) int64); ok {
|
||||
r0 = rf(options)
|
||||
} else {
|
||||
r0 = ret.Get(0).(int64)
|
||||
}
|
||||
|
||||
var r1 error
|
||||
if rf, ok := ret.Get(1).(func(*model.PostCountOptions) error); ok {
|
||||
r1 = rf(options)
|
||||
} else {
|
||||
@@ -44,6 +47,10 @@ func (_m *PostStore) AnalyticsPostCountsByDay(options *model.AnalyticsPostCounts
|
||||
ret := _m.Called(options)
|
||||
|
||||
var r0 model.AnalyticsRows
|
||||
var r1 error
|
||||
if rf, ok := ret.Get(0).(func(*model.AnalyticsPostCountsOptions) (model.AnalyticsRows, error)); ok {
|
||||
return rf(options)
|
||||
}
|
||||
if rf, ok := ret.Get(0).(func(*model.AnalyticsPostCountsOptions) model.AnalyticsRows); ok {
|
||||
r0 = rf(options)
|
||||
} else {
|
||||
@@ -52,7 +59,6 @@ func (_m *PostStore) AnalyticsPostCountsByDay(options *model.AnalyticsPostCounts
|
||||
}
|
||||
}
|
||||
|
||||
var r1 error
|
||||
if rf, ok := ret.Get(1).(func(*model.AnalyticsPostCountsOptions) error); ok {
|
||||
r1 = rf(options)
|
||||
} else {
|
||||
@@ -67,6 +73,10 @@ func (_m *PostStore) AnalyticsUserCountsWithPostsByDay(teamID string) (model.Ana
|
||||
ret := _m.Called(teamID)
|
||||
|
||||
var r0 model.AnalyticsRows
|
||||
var r1 error
|
||||
if rf, ok := ret.Get(0).(func(string) (model.AnalyticsRows, error)); ok {
|
||||
return rf(teamID)
|
||||
}
|
||||
if rf, ok := ret.Get(0).(func(string) model.AnalyticsRows); ok {
|
||||
r0 = rf(teamID)
|
||||
} else {
|
||||
@@ -75,7 +85,6 @@ func (_m *PostStore) AnalyticsUserCountsWithPostsByDay(teamID string) (model.Ana
|
||||
}
|
||||
}
|
||||
|
||||
var r1 error
|
||||
if rf, ok := ret.Get(1).(func(string) error); ok {
|
||||
r1 = rf(teamID)
|
||||
} else {
|
||||
@@ -109,13 +118,16 @@ func (_m *PostStore) DeleteOrphanedRows(limit int) (int64, error) {
|
||||
ret := _m.Called(limit)
|
||||
|
||||
var r0 int64
|
||||
var r1 error
|
||||
if rf, ok := ret.Get(0).(func(int) (int64, error)); ok {
|
||||
return rf(limit)
|
||||
}
|
||||
if rf, ok := ret.Get(0).(func(int) int64); ok {
|
||||
r0 = rf(limit)
|
||||
} else {
|
||||
r0 = ret.Get(0).(int64)
|
||||
}
|
||||
|
||||
var r1 error
|
||||
if rf, ok := ret.Get(1).(func(int) error); ok {
|
||||
r1 = rf(limit)
|
||||
} else {
|
||||
@@ -130,6 +142,10 @@ func (_m *PostStore) Get(ctx context.Context, id string, opts model.GetPostsOpti
|
||||
ret := _m.Called(ctx, id, opts, userID, sanitizeOptions)
|
||||
|
||||
var r0 *model.PostList
|
||||
var r1 error
|
||||
if rf, ok := ret.Get(0).(func(context.Context, string, model.GetPostsOptions, string, map[string]bool) (*model.PostList, error)); ok {
|
||||
return rf(ctx, id, opts, userID, sanitizeOptions)
|
||||
}
|
||||
if rf, ok := ret.Get(0).(func(context.Context, string, model.GetPostsOptions, string, map[string]bool) *model.PostList); ok {
|
||||
r0 = rf(ctx, id, opts, userID, sanitizeOptions)
|
||||
} else {
|
||||
@@ -138,7 +154,6 @@ func (_m *PostStore) Get(ctx context.Context, id string, opts model.GetPostsOpti
|
||||
}
|
||||
}
|
||||
|
||||
var r1 error
|
||||
if rf, ok := ret.Get(1).(func(context.Context, string, model.GetPostsOptions, string, map[string]bool) error); ok {
|
||||
r1 = rf(ctx, id, opts, userID, sanitizeOptions)
|
||||
} else {
|
||||
@@ -153,6 +168,10 @@ func (_m *PostStore) GetDirectPostParentsForExportAfter(limit int, afterID strin
|
||||
ret := _m.Called(limit, afterID)
|
||||
|
||||
var r0 []*model.DirectPostForExport
|
||||
var r1 error
|
||||
if rf, ok := ret.Get(0).(func(int, string) ([]*model.DirectPostForExport, error)); ok {
|
||||
return rf(limit, afterID)
|
||||
}
|
||||
if rf, ok := ret.Get(0).(func(int, string) []*model.DirectPostForExport); ok {
|
||||
r0 = rf(limit, afterID)
|
||||
} else {
|
||||
@@ -161,7 +180,6 @@ func (_m *PostStore) GetDirectPostParentsForExportAfter(limit int, afterID strin
|
||||
}
|
||||
}
|
||||
|
||||
var r1 error
|
||||
if rf, ok := ret.Get(1).(func(int, string) error); ok {
|
||||
r1 = rf(limit, afterID)
|
||||
} else {
|
||||
@@ -176,6 +194,10 @@ func (_m *PostStore) GetEditHistoryForPost(postId string) ([]*model.Post, error)
|
||||
ret := _m.Called(postId)
|
||||
|
||||
var r0 []*model.Post
|
||||
var r1 error
|
||||
if rf, ok := ret.Get(0).(func(string) ([]*model.Post, error)); ok {
|
||||
return rf(postId)
|
||||
}
|
||||
if rf, ok := ret.Get(0).(func(string) []*model.Post); ok {
|
||||
r0 = rf(postId)
|
||||
} else {
|
||||
@@ -184,7 +206,6 @@ func (_m *PostStore) GetEditHistoryForPost(postId string) ([]*model.Post, error)
|
||||
}
|
||||
}
|
||||
|
||||
var r1 error
|
||||
if rf, ok := ret.Get(1).(func(string) error); ok {
|
||||
r1 = rf(postId)
|
||||
} else {
|
||||
@@ -213,6 +234,10 @@ func (_m *PostStore) GetFlaggedPosts(userID string, offset int, limit int) (*mod
|
||||
ret := _m.Called(userID, offset, limit)
|
||||
|
||||
var r0 *model.PostList
|
||||
var r1 error
|
||||
if rf, ok := ret.Get(0).(func(string, int, int) (*model.PostList, error)); ok {
|
||||
return rf(userID, offset, limit)
|
||||
}
|
||||
if rf, ok := ret.Get(0).(func(string, int, int) *model.PostList); ok {
|
||||
r0 = rf(userID, offset, limit)
|
||||
} else {
|
||||
@@ -221,7 +246,6 @@ func (_m *PostStore) GetFlaggedPosts(userID string, offset int, limit int) (*mod
|
||||
}
|
||||
}
|
||||
|
||||
var r1 error
|
||||
if rf, ok := ret.Get(1).(func(string, int, int) error); ok {
|
||||
r1 = rf(userID, offset, limit)
|
||||
} else {
|
||||
@@ -236,6 +260,10 @@ func (_m *PostStore) GetFlaggedPostsForChannel(userID string, channelID string,
|
||||
ret := _m.Called(userID, channelID, offset, limit)
|
||||
|
||||
var r0 *model.PostList
|
||||
var r1 error
|
||||
if rf, ok := ret.Get(0).(func(string, string, int, int) (*model.PostList, error)); ok {
|
||||
return rf(userID, channelID, offset, limit)
|
||||
}
|
||||
if rf, ok := ret.Get(0).(func(string, string, int, int) *model.PostList); ok {
|
||||
r0 = rf(userID, channelID, offset, limit)
|
||||
} else {
|
||||
@@ -244,7 +272,6 @@ func (_m *PostStore) GetFlaggedPostsForChannel(userID string, channelID string,
|
||||
}
|
||||
}
|
||||
|
||||
var r1 error
|
||||
if rf, ok := ret.Get(1).(func(string, string, int, int) error); ok {
|
||||
r1 = rf(userID, channelID, offset, limit)
|
||||
} else {
|
||||
@@ -259,6 +286,10 @@ func (_m *PostStore) GetFlaggedPostsForTeam(userID string, teamID string, offset
|
||||
ret := _m.Called(userID, teamID, offset, limit)
|
||||
|
||||
var r0 *model.PostList
|
||||
var r1 error
|
||||
if rf, ok := ret.Get(0).(func(string, string, int, int) (*model.PostList, error)); ok {
|
||||
return rf(userID, teamID, offset, limit)
|
||||
}
|
||||
if rf, ok := ret.Get(0).(func(string, string, int, int) *model.PostList); ok {
|
||||
r0 = rf(userID, teamID, offset, limit)
|
||||
} else {
|
||||
@@ -267,7 +298,6 @@ func (_m *PostStore) GetFlaggedPostsForTeam(userID string, teamID string, offset
|
||||
}
|
||||
}
|
||||
|
||||
var r1 error
|
||||
if rf, ok := ret.Get(1).(func(string, string, int, int) error); ok {
|
||||
r1 = rf(userID, teamID, offset, limit)
|
||||
} else {
|
||||
@@ -296,13 +326,16 @@ func (_m *PostStore) GetNthRecentPostTime(n int64) (int64, error) {
|
||||
ret := _m.Called(n)
|
||||
|
||||
var r0 int64
|
||||
var r1 error
|
||||
if rf, ok := ret.Get(0).(func(int64) (int64, error)); ok {
|
||||
return rf(n)
|
||||
}
|
||||
if rf, ok := ret.Get(0).(func(int64) int64); ok {
|
||||
r0 = rf(n)
|
||||
} else {
|
||||
r0 = ret.Get(0).(int64)
|
||||
}
|
||||
|
||||
var r1 error
|
||||
if rf, ok := ret.Get(1).(func(int64) error); ok {
|
||||
r1 = rf(n)
|
||||
} else {
|
||||
@@ -317,6 +350,10 @@ func (_m *PostStore) GetOldest() (*model.Post, error) {
|
||||
ret := _m.Called()
|
||||
|
||||
var r0 *model.Post
|
||||
var r1 error
|
||||
if rf, ok := ret.Get(0).(func() (*model.Post, error)); ok {
|
||||
return rf()
|
||||
}
|
||||
if rf, ok := ret.Get(0).(func() *model.Post); ok {
|
||||
r0 = rf()
|
||||
} else {
|
||||
@@ -325,7 +362,6 @@ func (_m *PostStore) GetOldest() (*model.Post, error) {
|
||||
}
|
||||
}
|
||||
|
||||
var r1 error
|
||||
if rf, ok := ret.Get(1).(func() error); ok {
|
||||
r1 = rf()
|
||||
} else {
|
||||
@@ -340,13 +376,16 @@ func (_m *PostStore) GetOldestEntityCreationTime() (int64, error) {
|
||||
ret := _m.Called()
|
||||
|
||||
var r0 int64
|
||||
var r1 error
|
||||
if rf, ok := ret.Get(0).(func() (int64, error)); ok {
|
||||
return rf()
|
||||
}
|
||||
if rf, ok := ret.Get(0).(func() int64); ok {
|
||||
r0 = rf()
|
||||
} else {
|
||||
r0 = ret.Get(0).(int64)
|
||||
}
|
||||
|
||||
var r1 error
|
||||
if rf, ok := ret.Get(1).(func() error); ok {
|
||||
r1 = rf()
|
||||
} else {
|
||||
@@ -361,6 +400,10 @@ func (_m *PostStore) GetParentsForExportAfter(limit int, afterID string) ([]*mod
|
||||
ret := _m.Called(limit, afterID)
|
||||
|
||||
var r0 []*model.PostForExport
|
||||
var r1 error
|
||||
if rf, ok := ret.Get(0).(func(int, string) ([]*model.PostForExport, error)); ok {
|
||||
return rf(limit, afterID)
|
||||
}
|
||||
if rf, ok := ret.Get(0).(func(int, string) []*model.PostForExport); ok {
|
||||
r0 = rf(limit, afterID)
|
||||
} else {
|
||||
@@ -369,7 +412,6 @@ func (_m *PostStore) GetParentsForExportAfter(limit int, afterID string) ([]*mod
|
||||
}
|
||||
}
|
||||
|
||||
var r1 error
|
||||
if rf, ok := ret.Get(1).(func(int, string) error); ok {
|
||||
r1 = rf(limit, afterID)
|
||||
} else {
|
||||
@@ -384,6 +426,10 @@ func (_m *PostStore) GetPostAfterTime(channelID string, timestamp int64, collaps
|
||||
ret := _m.Called(channelID, timestamp, collapsedThreads)
|
||||
|
||||
var r0 *model.Post
|
||||
var r1 error
|
||||
if rf, ok := ret.Get(0).(func(string, int64, bool) (*model.Post, error)); ok {
|
||||
return rf(channelID, timestamp, collapsedThreads)
|
||||
}
|
||||
if rf, ok := ret.Get(0).(func(string, int64, bool) *model.Post); ok {
|
||||
r0 = rf(channelID, timestamp, collapsedThreads)
|
||||
} else {
|
||||
@@ -392,7 +438,6 @@ func (_m *PostStore) GetPostAfterTime(channelID string, timestamp int64, collaps
|
||||
}
|
||||
}
|
||||
|
||||
var r1 error
|
||||
if rf, ok := ret.Get(1).(func(string, int64, bool) error); ok {
|
||||
r1 = rf(channelID, timestamp, collapsedThreads)
|
||||
} else {
|
||||
@@ -407,13 +452,16 @@ func (_m *PostStore) GetPostIdAfterTime(channelID string, timestamp int64, colla
|
||||
ret := _m.Called(channelID, timestamp, collapsedThreads)
|
||||
|
||||
var r0 string
|
||||
var r1 error
|
||||
if rf, ok := ret.Get(0).(func(string, int64, bool) (string, error)); ok {
|
||||
return rf(channelID, timestamp, collapsedThreads)
|
||||
}
|
||||
if rf, ok := ret.Get(0).(func(string, int64, bool) string); ok {
|
||||
r0 = rf(channelID, timestamp, collapsedThreads)
|
||||
} else {
|
||||
r0 = ret.Get(0).(string)
|
||||
}
|
||||
|
||||
var r1 error
|
||||
if rf, ok := ret.Get(1).(func(string, int64, bool) error); ok {
|
||||
r1 = rf(channelID, timestamp, collapsedThreads)
|
||||
} else {
|
||||
@@ -428,13 +476,16 @@ func (_m *PostStore) GetPostIdBeforeTime(channelID string, timestamp int64, coll
|
||||
ret := _m.Called(channelID, timestamp, collapsedThreads)
|
||||
|
||||
var r0 string
|
||||
var r1 error
|
||||
if rf, ok := ret.Get(0).(func(string, int64, bool) (string, error)); ok {
|
||||
return rf(channelID, timestamp, collapsedThreads)
|
||||
}
|
||||
if rf, ok := ret.Get(0).(func(string, int64, bool) string); ok {
|
||||
r0 = rf(channelID, timestamp, collapsedThreads)
|
||||
} else {
|
||||
r0 = ret.Get(0).(string)
|
||||
}
|
||||
|
||||
var r1 error
|
||||
if rf, ok := ret.Get(1).(func(string, int64, bool) error); ok {
|
||||
r1 = rf(channelID, timestamp, collapsedThreads)
|
||||
} else {
|
||||
@@ -449,6 +500,10 @@ func (_m *PostStore) GetPostReminderMetadata(postID string) (*store.PostReminder
|
||||
ret := _m.Called(postID)
|
||||
|
||||
var r0 *store.PostReminderMetadata
|
||||
var r1 error
|
||||
if rf, ok := ret.Get(0).(func(string) (*store.PostReminderMetadata, error)); ok {
|
||||
return rf(postID)
|
||||
}
|
||||
if rf, ok := ret.Get(0).(func(string) *store.PostReminderMetadata); ok {
|
||||
r0 = rf(postID)
|
||||
} else {
|
||||
@@ -457,7 +512,6 @@ func (_m *PostStore) GetPostReminderMetadata(postID string) (*store.PostReminder
|
||||
}
|
||||
}
|
||||
|
||||
var r1 error
|
||||
if rf, ok := ret.Get(1).(func(string) error); ok {
|
||||
r1 = rf(postID)
|
||||
} else {
|
||||
@@ -472,6 +526,10 @@ func (_m *PostStore) GetPostReminders(now int64) ([]*model.PostReminder, error)
|
||||
ret := _m.Called(now)
|
||||
|
||||
var r0 []*model.PostReminder
|
||||
var r1 error
|
||||
if rf, ok := ret.Get(0).(func(int64) ([]*model.PostReminder, error)); ok {
|
||||
return rf(now)
|
||||
}
|
||||
if rf, ok := ret.Get(0).(func(int64) []*model.PostReminder); ok {
|
||||
r0 = rf(now)
|
||||
} else {
|
||||
@@ -480,7 +538,6 @@ func (_m *PostStore) GetPostReminders(now int64) ([]*model.PostReminder, error)
|
||||
}
|
||||
}
|
||||
|
||||
var r1 error
|
||||
if rf, ok := ret.Get(1).(func(int64) error); ok {
|
||||
r1 = rf(now)
|
||||
} else {
|
||||
@@ -495,6 +552,10 @@ func (_m *PostStore) GetPosts(options model.GetPostsOptions, allowFromCache bool
|
||||
ret := _m.Called(options, allowFromCache, sanitizeOptions)
|
||||
|
||||
var r0 *model.PostList
|
||||
var r1 error
|
||||
if rf, ok := ret.Get(0).(func(model.GetPostsOptions, bool, map[string]bool) (*model.PostList, error)); ok {
|
||||
return rf(options, allowFromCache, sanitizeOptions)
|
||||
}
|
||||
if rf, ok := ret.Get(0).(func(model.GetPostsOptions, bool, map[string]bool) *model.PostList); ok {
|
||||
r0 = rf(options, allowFromCache, sanitizeOptions)
|
||||
} else {
|
||||
@@ -503,7 +564,6 @@ func (_m *PostStore) GetPosts(options model.GetPostsOptions, allowFromCache bool
|
||||
}
|
||||
}
|
||||
|
||||
var r1 error
|
||||
if rf, ok := ret.Get(1).(func(model.GetPostsOptions, bool, map[string]bool) error); ok {
|
||||
r1 = rf(options, allowFromCache, sanitizeOptions)
|
||||
} else {
|
||||
@@ -518,6 +578,10 @@ func (_m *PostStore) GetPostsAfter(options model.GetPostsOptions, sanitizeOption
|
||||
ret := _m.Called(options, sanitizeOptions)
|
||||
|
||||
var r0 *model.PostList
|
||||
var r1 error
|
||||
if rf, ok := ret.Get(0).(func(model.GetPostsOptions, map[string]bool) (*model.PostList, error)); ok {
|
||||
return rf(options, sanitizeOptions)
|
||||
}
|
||||
if rf, ok := ret.Get(0).(func(model.GetPostsOptions, map[string]bool) *model.PostList); ok {
|
||||
r0 = rf(options, sanitizeOptions)
|
||||
} else {
|
||||
@@ -526,7 +590,6 @@ func (_m *PostStore) GetPostsAfter(options model.GetPostsOptions, sanitizeOption
|
||||
}
|
||||
}
|
||||
|
||||
var r1 error
|
||||
if rf, ok := ret.Get(1).(func(model.GetPostsOptions, map[string]bool) error); ok {
|
||||
r1 = rf(options, sanitizeOptions)
|
||||
} else {
|
||||
@@ -541,6 +604,10 @@ func (_m *PostStore) GetPostsBatchForIndexing(startTime int64, startPostID strin
|
||||
ret := _m.Called(startTime, startPostID, limit)
|
||||
|
||||
var r0 []*model.PostForIndexing
|
||||
var r1 error
|
||||
if rf, ok := ret.Get(0).(func(int64, string, int) ([]*model.PostForIndexing, error)); ok {
|
||||
return rf(startTime, startPostID, limit)
|
||||
}
|
||||
if rf, ok := ret.Get(0).(func(int64, string, int) []*model.PostForIndexing); ok {
|
||||
r0 = rf(startTime, startPostID, limit)
|
||||
} else {
|
||||
@@ -549,7 +616,6 @@ func (_m *PostStore) GetPostsBatchForIndexing(startTime int64, startPostID strin
|
||||
}
|
||||
}
|
||||
|
||||
var r1 error
|
||||
if rf, ok := ret.Get(1).(func(int64, string, int) error); ok {
|
||||
r1 = rf(startTime, startPostID, limit)
|
||||
} else {
|
||||
@@ -564,6 +630,10 @@ func (_m *PostStore) GetPostsBefore(options model.GetPostsOptions, sanitizeOptio
|
||||
ret := _m.Called(options, sanitizeOptions)
|
||||
|
||||
var r0 *model.PostList
|
||||
var r1 error
|
||||
if rf, ok := ret.Get(0).(func(model.GetPostsOptions, map[string]bool) (*model.PostList, error)); ok {
|
||||
return rf(options, sanitizeOptions)
|
||||
}
|
||||
if rf, ok := ret.Get(0).(func(model.GetPostsOptions, map[string]bool) *model.PostList); ok {
|
||||
r0 = rf(options, sanitizeOptions)
|
||||
} else {
|
||||
@@ -572,7 +642,6 @@ func (_m *PostStore) GetPostsBefore(options model.GetPostsOptions, sanitizeOptio
|
||||
}
|
||||
}
|
||||
|
||||
var r1 error
|
||||
if rf, ok := ret.Get(1).(func(model.GetPostsOptions, map[string]bool) error); ok {
|
||||
r1 = rf(options, sanitizeOptions)
|
||||
} else {
|
||||
@@ -587,6 +656,10 @@ func (_m *PostStore) GetPostsByIds(postIds []string) ([]*model.Post, error) {
|
||||
ret := _m.Called(postIds)
|
||||
|
||||
var r0 []*model.Post
|
||||
var r1 error
|
||||
if rf, ok := ret.Get(0).(func([]string) ([]*model.Post, error)); ok {
|
||||
return rf(postIds)
|
||||
}
|
||||
if rf, ok := ret.Get(0).(func([]string) []*model.Post); ok {
|
||||
r0 = rf(postIds)
|
||||
} else {
|
||||
@@ -595,7 +668,6 @@ func (_m *PostStore) GetPostsByIds(postIds []string) ([]*model.Post, error) {
|
||||
}
|
||||
}
|
||||
|
||||
var r1 error
|
||||
if rf, ok := ret.Get(1).(func([]string) error); ok {
|
||||
r1 = rf(postIds)
|
||||
} else {
|
||||
@@ -610,6 +682,10 @@ func (_m *PostStore) GetPostsByThread(threadID string, since int64) ([]*model.Po
|
||||
ret := _m.Called(threadID, since)
|
||||
|
||||
var r0 []*model.Post
|
||||
var r1 error
|
||||
if rf, ok := ret.Get(0).(func(string, int64) ([]*model.Post, error)); ok {
|
||||
return rf(threadID, since)
|
||||
}
|
||||
if rf, ok := ret.Get(0).(func(string, int64) []*model.Post); ok {
|
||||
r0 = rf(threadID, since)
|
||||
} else {
|
||||
@@ -618,7 +694,6 @@ func (_m *PostStore) GetPostsByThread(threadID string, since int64) ([]*model.Po
|
||||
}
|
||||
}
|
||||
|
||||
var r1 error
|
||||
if rf, ok := ret.Get(1).(func(string, int64) error); ok {
|
||||
r1 = rf(threadID, since)
|
||||
} else {
|
||||
@@ -633,6 +708,10 @@ func (_m *PostStore) GetPostsCreatedAt(channelID string, timestamp int64) ([]*mo
|
||||
ret := _m.Called(channelID, timestamp)
|
||||
|
||||
var r0 []*model.Post
|
||||
var r1 error
|
||||
if rf, ok := ret.Get(0).(func(string, int64) ([]*model.Post, error)); ok {
|
||||
return rf(channelID, timestamp)
|
||||
}
|
||||
if rf, ok := ret.Get(0).(func(string, int64) []*model.Post); ok {
|
||||
r0 = rf(channelID, timestamp)
|
||||
} else {
|
||||
@@ -641,7 +720,6 @@ func (_m *PostStore) GetPostsCreatedAt(channelID string, timestamp int64) ([]*mo
|
||||
}
|
||||
}
|
||||
|
||||
var r1 error
|
||||
if rf, ok := ret.Get(1).(func(string, int64) error); ok {
|
||||
r1 = rf(channelID, timestamp)
|
||||
} else {
|
||||
@@ -656,6 +734,10 @@ func (_m *PostStore) GetPostsSince(options model.GetPostsSinceOptions, allowFrom
|
||||
ret := _m.Called(options, allowFromCache, sanitizeOptions)
|
||||
|
||||
var r0 *model.PostList
|
||||
var r1 error
|
||||
if rf, ok := ret.Get(0).(func(model.GetPostsSinceOptions, bool, map[string]bool) (*model.PostList, error)); ok {
|
||||
return rf(options, allowFromCache, sanitizeOptions)
|
||||
}
|
||||
if rf, ok := ret.Get(0).(func(model.GetPostsSinceOptions, bool, map[string]bool) *model.PostList); ok {
|
||||
r0 = rf(options, allowFromCache, sanitizeOptions)
|
||||
} else {
|
||||
@@ -664,7 +746,6 @@ func (_m *PostStore) GetPostsSince(options model.GetPostsSinceOptions, allowFrom
|
||||
}
|
||||
}
|
||||
|
||||
var r1 error
|
||||
if rf, ok := ret.Get(1).(func(model.GetPostsSinceOptions, bool, map[string]bool) error); ok {
|
||||
r1 = rf(options, allowFromCache, sanitizeOptions)
|
||||
} else {
|
||||
@@ -679,6 +760,11 @@ func (_m *PostStore) GetPostsSinceForSync(options model.GetPostsSinceForSyncOpti
|
||||
ret := _m.Called(options, cursor, limit)
|
||||
|
||||
var r0 []*model.Post
|
||||
var r1 model.GetPostsSinceForSyncCursor
|
||||
var r2 error
|
||||
if rf, ok := ret.Get(0).(func(model.GetPostsSinceForSyncOptions, model.GetPostsSinceForSyncCursor, int) ([]*model.Post, model.GetPostsSinceForSyncCursor, error)); ok {
|
||||
return rf(options, cursor, limit)
|
||||
}
|
||||
if rf, ok := ret.Get(0).(func(model.GetPostsSinceForSyncOptions, model.GetPostsSinceForSyncCursor, int) []*model.Post); ok {
|
||||
r0 = rf(options, cursor, limit)
|
||||
} else {
|
||||
@@ -687,14 +773,12 @@ func (_m *PostStore) GetPostsSinceForSync(options model.GetPostsSinceForSyncOpti
|
||||
}
|
||||
}
|
||||
|
||||
var r1 model.GetPostsSinceForSyncCursor
|
||||
if rf, ok := ret.Get(1).(func(model.GetPostsSinceForSyncOptions, model.GetPostsSinceForSyncCursor, int) model.GetPostsSinceForSyncCursor); ok {
|
||||
r1 = rf(options, cursor, limit)
|
||||
} else {
|
||||
r1 = ret.Get(1).(model.GetPostsSinceForSyncCursor)
|
||||
}
|
||||
|
||||
var r2 error
|
||||
if rf, ok := ret.Get(2).(func(model.GetPostsSinceForSyncOptions, model.GetPostsSinceForSyncCursor, int) error); ok {
|
||||
r2 = rf(options, cursor, limit)
|
||||
} else {
|
||||
@@ -709,6 +793,10 @@ func (_m *PostStore) GetRecentSearchesForUser(userID string) ([]*model.SearchPar
|
||||
ret := _m.Called(userID)
|
||||
|
||||
var r0 []*model.SearchParams
|
||||
var r1 error
|
||||
if rf, ok := ret.Get(0).(func(string) ([]*model.SearchParams, error)); ok {
|
||||
return rf(userID)
|
||||
}
|
||||
if rf, ok := ret.Get(0).(func(string) []*model.SearchParams); ok {
|
||||
r0 = rf(userID)
|
||||
} else {
|
||||
@@ -717,7 +805,6 @@ func (_m *PostStore) GetRecentSearchesForUser(userID string) ([]*model.SearchPar
|
||||
}
|
||||
}
|
||||
|
||||
var r1 error
|
||||
if rf, ok := ret.Get(1).(func(string) error); ok {
|
||||
r1 = rf(userID)
|
||||
} else {
|
||||
@@ -732,6 +819,10 @@ func (_m *PostStore) GetRepliesForExport(parentID string) ([]*model.ReplyForExpo
|
||||
ret := _m.Called(parentID)
|
||||
|
||||
var r0 []*model.ReplyForExport
|
||||
var r1 error
|
||||
if rf, ok := ret.Get(0).(func(string) ([]*model.ReplyForExport, error)); ok {
|
||||
return rf(parentID)
|
||||
}
|
||||
if rf, ok := ret.Get(0).(func(string) []*model.ReplyForExport); ok {
|
||||
r0 = rf(parentID)
|
||||
} else {
|
||||
@@ -740,7 +831,6 @@ func (_m *PostStore) GetRepliesForExport(parentID string) ([]*model.ReplyForExpo
|
||||
}
|
||||
}
|
||||
|
||||
var r1 error
|
||||
if rf, ok := ret.Get(1).(func(string) error); ok {
|
||||
r1 = rf(parentID)
|
||||
} else {
|
||||
@@ -755,6 +845,10 @@ func (_m *PostStore) GetSingle(id string, inclDeleted bool) (*model.Post, error)
|
||||
ret := _m.Called(id, inclDeleted)
|
||||
|
||||
var r0 *model.Post
|
||||
var r1 error
|
||||
if rf, ok := ret.Get(0).(func(string, bool) (*model.Post, error)); ok {
|
||||
return rf(id, inclDeleted)
|
||||
}
|
||||
if rf, ok := ret.Get(0).(func(string, bool) *model.Post); ok {
|
||||
r0 = rf(id, inclDeleted)
|
||||
} else {
|
||||
@@ -763,7 +857,6 @@ func (_m *PostStore) GetSingle(id string, inclDeleted bool) (*model.Post, error)
|
||||
}
|
||||
}
|
||||
|
||||
var r1 error
|
||||
if rf, ok := ret.Get(1).(func(string, bool) error); ok {
|
||||
r1 = rf(id, inclDeleted)
|
||||
} else {
|
||||
@@ -778,6 +871,10 @@ func (_m *PostStore) GetTopDMsForUserSince(userID string, since int64, offset in
|
||||
ret := _m.Called(userID, since, offset, limit)
|
||||
|
||||
var r0 *model.TopDMList
|
||||
var r1 error
|
||||
if rf, ok := ret.Get(0).(func(string, int64, int, int) (*model.TopDMList, error)); ok {
|
||||
return rf(userID, since, offset, limit)
|
||||
}
|
||||
if rf, ok := ret.Get(0).(func(string, int64, int, int) *model.TopDMList); ok {
|
||||
r0 = rf(userID, since, offset, limit)
|
||||
} else {
|
||||
@@ -786,7 +883,6 @@ func (_m *PostStore) GetTopDMsForUserSince(userID string, since int64, offset in
|
||||
}
|
||||
}
|
||||
|
||||
var r1 error
|
||||
if rf, ok := ret.Get(1).(func(string, int64, int, int) error); ok {
|
||||
r1 = rf(userID, since, offset, limit)
|
||||
} else {
|
||||
@@ -801,13 +897,16 @@ func (_m *PostStore) HasAutoResponsePostByUserSince(options model.GetPostsSinceO
|
||||
ret := _m.Called(options, userId)
|
||||
|
||||
var r0 bool
|
||||
var r1 error
|
||||
if rf, ok := ret.Get(0).(func(model.GetPostsSinceOptions, string) (bool, error)); ok {
|
||||
return rf(options, userId)
|
||||
}
|
||||
if rf, ok := ret.Get(0).(func(model.GetPostsSinceOptions, string) bool); ok {
|
||||
r0 = rf(options, userId)
|
||||
} else {
|
||||
r0 = ret.Get(0).(bool)
|
||||
}
|
||||
|
||||
var r1 error
|
||||
if rf, ok := ret.Get(1).(func(model.GetPostsSinceOptions, string) error); ok {
|
||||
r1 = rf(options, userId)
|
||||
} else {
|
||||
@@ -841,6 +940,10 @@ func (_m *PostStore) Overwrite(post *model.Post) (*model.Post, error) {
|
||||
ret := _m.Called(post)
|
||||
|
||||
var r0 *model.Post
|
||||
var r1 error
|
||||
if rf, ok := ret.Get(0).(func(*model.Post) (*model.Post, error)); ok {
|
||||
return rf(post)
|
||||
}
|
||||
if rf, ok := ret.Get(0).(func(*model.Post) *model.Post); ok {
|
||||
r0 = rf(post)
|
||||
} else {
|
||||
@@ -849,7 +952,6 @@ func (_m *PostStore) Overwrite(post *model.Post) (*model.Post, error) {
|
||||
}
|
||||
}
|
||||
|
||||
var r1 error
|
||||
if rf, ok := ret.Get(1).(func(*model.Post) error); ok {
|
||||
r1 = rf(post)
|
||||
} else {
|
||||
@@ -864,6 +966,11 @@ func (_m *PostStore) OverwriteMultiple(posts []*model.Post) ([]*model.Post, int,
|
||||
ret := _m.Called(posts)
|
||||
|
||||
var r0 []*model.Post
|
||||
var r1 int
|
||||
var r2 error
|
||||
if rf, ok := ret.Get(0).(func([]*model.Post) ([]*model.Post, int, error)); ok {
|
||||
return rf(posts)
|
||||
}
|
||||
if rf, ok := ret.Get(0).(func([]*model.Post) []*model.Post); ok {
|
||||
r0 = rf(posts)
|
||||
} else {
|
||||
@@ -872,14 +979,12 @@ func (_m *PostStore) OverwriteMultiple(posts []*model.Post) ([]*model.Post, int,
|
||||
}
|
||||
}
|
||||
|
||||
var r1 int
|
||||
if rf, ok := ret.Get(1).(func([]*model.Post) int); ok {
|
||||
r1 = rf(posts)
|
||||
} else {
|
||||
r1 = ret.Get(1).(int)
|
||||
}
|
||||
|
||||
var r2 error
|
||||
if rf, ok := ret.Get(2).(func([]*model.Post) error); ok {
|
||||
r2 = rf(posts)
|
||||
} else {
|
||||
@@ -894,13 +999,16 @@ func (_m *PostStore) PermanentDeleteBatch(endTime int64, limit int64) (int64, er
|
||||
ret := _m.Called(endTime, limit)
|
||||
|
||||
var r0 int64
|
||||
var r1 error
|
||||
if rf, ok := ret.Get(0).(func(int64, int64) (int64, error)); ok {
|
||||
return rf(endTime, limit)
|
||||
}
|
||||
if rf, ok := ret.Get(0).(func(int64, int64) int64); ok {
|
||||
r0 = rf(endTime, limit)
|
||||
} else {
|
||||
r0 = ret.Get(0).(int64)
|
||||
}
|
||||
|
||||
var r1 error
|
||||
if rf, ok := ret.Get(1).(func(int64, int64) error); ok {
|
||||
r1 = rf(endTime, limit)
|
||||
} else {
|
||||
@@ -915,20 +1023,23 @@ func (_m *PostStore) PermanentDeleteBatchForRetentionPolicies(now int64, globalP
|
||||
ret := _m.Called(now, globalPolicyEndTime, limit, cursor)
|
||||
|
||||
var r0 int64
|
||||
var r1 model.RetentionPolicyCursor
|
||||
var r2 error
|
||||
if rf, ok := ret.Get(0).(func(int64, int64, int64, model.RetentionPolicyCursor) (int64, model.RetentionPolicyCursor, error)); ok {
|
||||
return rf(now, globalPolicyEndTime, limit, cursor)
|
||||
}
|
||||
if rf, ok := ret.Get(0).(func(int64, int64, int64, model.RetentionPolicyCursor) int64); ok {
|
||||
r0 = rf(now, globalPolicyEndTime, limit, cursor)
|
||||
} else {
|
||||
r0 = ret.Get(0).(int64)
|
||||
}
|
||||
|
||||
var r1 model.RetentionPolicyCursor
|
||||
if rf, ok := ret.Get(1).(func(int64, int64, int64, model.RetentionPolicyCursor) model.RetentionPolicyCursor); ok {
|
||||
r1 = rf(now, globalPolicyEndTime, limit, cursor)
|
||||
} else {
|
||||
r1 = ret.Get(1).(model.RetentionPolicyCursor)
|
||||
}
|
||||
|
||||
var r2 error
|
||||
if rf, ok := ret.Get(2).(func(int64, int64, int64, model.RetentionPolicyCursor) error); ok {
|
||||
r2 = rf(now, globalPolicyEndTime, limit, cursor)
|
||||
} else {
|
||||
@@ -971,6 +1082,10 @@ func (_m *PostStore) Save(post *model.Post) (*model.Post, error) {
|
||||
ret := _m.Called(post)
|
||||
|
||||
var r0 *model.Post
|
||||
var r1 error
|
||||
if rf, ok := ret.Get(0).(func(*model.Post) (*model.Post, error)); ok {
|
||||
return rf(post)
|
||||
}
|
||||
if rf, ok := ret.Get(0).(func(*model.Post) *model.Post); ok {
|
||||
r0 = rf(post)
|
||||
} else {
|
||||
@@ -979,7 +1094,6 @@ func (_m *PostStore) Save(post *model.Post) (*model.Post, error) {
|
||||
}
|
||||
}
|
||||
|
||||
var r1 error
|
||||
if rf, ok := ret.Get(1).(func(*model.Post) error); ok {
|
||||
r1 = rf(post)
|
||||
} else {
|
||||
@@ -994,6 +1108,11 @@ func (_m *PostStore) SaveMultiple(posts []*model.Post) ([]*model.Post, int, erro
|
||||
ret := _m.Called(posts)
|
||||
|
||||
var r0 []*model.Post
|
||||
var r1 int
|
||||
var r2 error
|
||||
if rf, ok := ret.Get(0).(func([]*model.Post) ([]*model.Post, int, error)); ok {
|
||||
return rf(posts)
|
||||
}
|
||||
if rf, ok := ret.Get(0).(func([]*model.Post) []*model.Post); ok {
|
||||
r0 = rf(posts)
|
||||
} else {
|
||||
@@ -1002,14 +1121,12 @@ func (_m *PostStore) SaveMultiple(posts []*model.Post) ([]*model.Post, int, erro
|
||||
}
|
||||
}
|
||||
|
||||
var r1 int
|
||||
if rf, ok := ret.Get(1).(func([]*model.Post) int); ok {
|
||||
r1 = rf(posts)
|
||||
} else {
|
||||
r1 = ret.Get(1).(int)
|
||||
}
|
||||
|
||||
var r2 error
|
||||
if rf, ok := ret.Get(2).(func([]*model.Post) error); ok {
|
||||
r2 = rf(posts)
|
||||
} else {
|
||||
@@ -1024,6 +1141,10 @@ func (_m *PostStore) Search(teamID string, userID string, params *model.SearchPa
|
||||
ret := _m.Called(teamID, userID, params)
|
||||
|
||||
var r0 *model.PostList
|
||||
var r1 error
|
||||
if rf, ok := ret.Get(0).(func(string, string, *model.SearchParams) (*model.PostList, error)); ok {
|
||||
return rf(teamID, userID, params)
|
||||
}
|
||||
if rf, ok := ret.Get(0).(func(string, string, *model.SearchParams) *model.PostList); ok {
|
||||
r0 = rf(teamID, userID, params)
|
||||
} else {
|
||||
@@ -1032,7 +1153,6 @@ func (_m *PostStore) Search(teamID string, userID string, params *model.SearchPa
|
||||
}
|
||||
}
|
||||
|
||||
var r1 error
|
||||
if rf, ok := ret.Get(1).(func(string, string, *model.SearchParams) error); ok {
|
||||
r1 = rf(teamID, userID, params)
|
||||
} else {
|
||||
@@ -1047,6 +1167,10 @@ func (_m *PostStore) SearchPostsForUser(paramsList []*model.SearchParams, userID
|
||||
ret := _m.Called(paramsList, userID, teamID, page, perPage)
|
||||
|
||||
var r0 *model.PostSearchResults
|
||||
var r1 error
|
||||
if rf, ok := ret.Get(0).(func([]*model.SearchParams, string, string, int, int) (*model.PostSearchResults, error)); ok {
|
||||
return rf(paramsList, userID, teamID, page, perPage)
|
||||
}
|
||||
if rf, ok := ret.Get(0).(func([]*model.SearchParams, string, string, int, int) *model.PostSearchResults); ok {
|
||||
r0 = rf(paramsList, userID, teamID, page, perPage)
|
||||
} else {
|
||||
@@ -1055,7 +1179,6 @@ func (_m *PostStore) SearchPostsForUser(paramsList []*model.SearchParams, userID
|
||||
}
|
||||
}
|
||||
|
||||
var r1 error
|
||||
if rf, ok := ret.Get(1).(func([]*model.SearchParams, string, string, int, int) error); ok {
|
||||
r1 = rf(paramsList, userID, teamID, page, perPage)
|
||||
} else {
|
||||
@@ -1084,6 +1207,10 @@ func (_m *PostStore) Update(newPost *model.Post, oldPost *model.Post) (*model.Po
|
||||
ret := _m.Called(newPost, oldPost)
|
||||
|
||||
var r0 *model.Post
|
||||
var r1 error
|
||||
if rf, ok := ret.Get(0).(func(*model.Post, *model.Post) (*model.Post, error)); ok {
|
||||
return rf(newPost, oldPost)
|
||||
}
|
||||
if rf, ok := ret.Get(0).(func(*model.Post, *model.Post) *model.Post); ok {
|
||||
r0 = rf(newPost, oldPost)
|
||||
} else {
|
||||
@@ -1092,7 +1219,6 @@ func (_m *PostStore) Update(newPost *model.Post, oldPost *model.Post) (*model.Po
|
||||
}
|
||||
}
|
||||
|
||||
var r1 error
|
||||
if rf, ok := ret.Get(1).(func(*model.Post, *model.Post) error); ok {
|
||||
r1 = rf(newPost, oldPost)
|
||||
} else {
|
||||
@@ -1101,3 +1227,18 @@ func (_m *PostStore) Update(newPost *model.Post, oldPost *model.Post) (*model.Po
|
||||
|
||||
return r0, r1
|
||||
}
|
||||
|
||||
type mockConstructorTestingTNewPostStore interface {
|
||||
mock.TestingT
|
||||
Cleanup(func())
|
||||
}
|
||||
|
||||
// NewPostStore creates a new instance of PostStore. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations.
|
||||
func NewPostStore(t mockConstructorTestingTNewPostStore) *PostStore {
|
||||
mock := &PostStore{}
|
||||
mock.Mock.Test(t)
|
||||
|
||||
t.Cleanup(func() { mock.AssertExpectations(t) })
|
||||
|
||||
return mock
|
||||
}
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
// Code generated by mockery v2.10.4. DO NOT EDIT.
|
||||
// Code generated by mockery v2.23.2. DO NOT EDIT.
|
||||
|
||||
// Regenerate this file using `make store-mocks`.
|
||||
|
||||
@@ -19,13 +19,16 @@ func (_m *PreferenceStore) CleanupFlagsBatch(limit int64) (int64, error) {
|
||||
ret := _m.Called(limit)
|
||||
|
||||
var r0 int64
|
||||
var r1 error
|
||||
if rf, ok := ret.Get(0).(func(int64) (int64, error)); ok {
|
||||
return rf(limit)
|
||||
}
|
||||
if rf, ok := ret.Get(0).(func(int64) int64); ok {
|
||||
r0 = rf(limit)
|
||||
} else {
|
||||
r0 = ret.Get(0).(int64)
|
||||
}
|
||||
|
||||
var r1 error
|
||||
if rf, ok := ret.Get(1).(func(int64) error); ok {
|
||||
r1 = rf(limit)
|
||||
} else {
|
||||
@@ -82,13 +85,16 @@ func (_m *PreferenceStore) DeleteOrphanedRows(limit int) (int64, error) {
|
||||
ret := _m.Called(limit)
|
||||
|
||||
var r0 int64
|
||||
var r1 error
|
||||
if rf, ok := ret.Get(0).(func(int) (int64, error)); ok {
|
||||
return rf(limit)
|
||||
}
|
||||
if rf, ok := ret.Get(0).(func(int) int64); ok {
|
||||
r0 = rf(limit)
|
||||
} else {
|
||||
r0 = ret.Get(0).(int64)
|
||||
}
|
||||
|
||||
var r1 error
|
||||
if rf, ok := ret.Get(1).(func(int) error); ok {
|
||||
r1 = rf(limit)
|
||||
} else {
|
||||
@@ -103,6 +109,10 @@ func (_m *PreferenceStore) Get(userID string, category string, name string) (*mo
|
||||
ret := _m.Called(userID, category, name)
|
||||
|
||||
var r0 *model.Preference
|
||||
var r1 error
|
||||
if rf, ok := ret.Get(0).(func(string, string, string) (*model.Preference, error)); ok {
|
||||
return rf(userID, category, name)
|
||||
}
|
||||
if rf, ok := ret.Get(0).(func(string, string, string) *model.Preference); ok {
|
||||
r0 = rf(userID, category, name)
|
||||
} else {
|
||||
@@ -111,7 +121,6 @@ func (_m *PreferenceStore) Get(userID string, category string, name string) (*mo
|
||||
}
|
||||
}
|
||||
|
||||
var r1 error
|
||||
if rf, ok := ret.Get(1).(func(string, string, string) error); ok {
|
||||
r1 = rf(userID, category, name)
|
||||
} else {
|
||||
@@ -126,6 +135,10 @@ func (_m *PreferenceStore) GetAll(userID string) (model.Preferences, error) {
|
||||
ret := _m.Called(userID)
|
||||
|
||||
var r0 model.Preferences
|
||||
var r1 error
|
||||
if rf, ok := ret.Get(0).(func(string) (model.Preferences, error)); ok {
|
||||
return rf(userID)
|
||||
}
|
||||
if rf, ok := ret.Get(0).(func(string) model.Preferences); ok {
|
||||
r0 = rf(userID)
|
||||
} else {
|
||||
@@ -134,7 +147,6 @@ func (_m *PreferenceStore) GetAll(userID string) (model.Preferences, error) {
|
||||
}
|
||||
}
|
||||
|
||||
var r1 error
|
||||
if rf, ok := ret.Get(1).(func(string) error); ok {
|
||||
r1 = rf(userID)
|
||||
} else {
|
||||
@@ -149,6 +161,10 @@ func (_m *PreferenceStore) GetCategory(userID string, category string) (model.Pr
|
||||
ret := _m.Called(userID, category)
|
||||
|
||||
var r0 model.Preferences
|
||||
var r1 error
|
||||
if rf, ok := ret.Get(0).(func(string, string) (model.Preferences, error)); ok {
|
||||
return rf(userID, category)
|
||||
}
|
||||
if rf, ok := ret.Get(0).(func(string, string) model.Preferences); ok {
|
||||
r0 = rf(userID, category)
|
||||
} else {
|
||||
@@ -157,7 +173,6 @@ func (_m *PreferenceStore) GetCategory(userID string, category string) (model.Pr
|
||||
}
|
||||
}
|
||||
|
||||
var r1 error
|
||||
if rf, ok := ret.Get(1).(func(string, string) error); ok {
|
||||
r1 = rf(userID, category)
|
||||
} else {
|
||||
@@ -172,6 +187,10 @@ func (_m *PreferenceStore) GetCategoryAndName(category string, nane string) (mod
|
||||
ret := _m.Called(category, nane)
|
||||
|
||||
var r0 model.Preferences
|
||||
var r1 error
|
||||
if rf, ok := ret.Get(0).(func(string, string) (model.Preferences, error)); ok {
|
||||
return rf(category, nane)
|
||||
}
|
||||
if rf, ok := ret.Get(0).(func(string, string) model.Preferences); ok {
|
||||
r0 = rf(category, nane)
|
||||
} else {
|
||||
@@ -180,7 +199,6 @@ func (_m *PreferenceStore) GetCategoryAndName(category string, nane string) (mod
|
||||
}
|
||||
}
|
||||
|
||||
var r1 error
|
||||
if rf, ok := ret.Get(1).(func(string, string) error); ok {
|
||||
r1 = rf(category, nane)
|
||||
} else {
|
||||
@@ -217,3 +235,18 @@ func (_m *PreferenceStore) Save(preferences model.Preferences) error {
|
||||
|
||||
return r0
|
||||
}
|
||||
|
||||
type mockConstructorTestingTNewPreferenceStore interface {
|
||||
mock.TestingT
|
||||
Cleanup(func())
|
||||
}
|
||||
|
||||
// NewPreferenceStore creates a new instance of PreferenceStore. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations.
|
||||
func NewPreferenceStore(t mockConstructorTestingTNewPreferenceStore) *PreferenceStore {
|
||||
mock := &PreferenceStore{}
|
||||
mock.Mock.Test(t)
|
||||
|
||||
t.Cleanup(func() { mock.AssertExpectations(t) })
|
||||
|
||||
return mock
|
||||
}
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
// Code generated by mockery v2.10.4. DO NOT EDIT.
|
||||
// Code generated by mockery v2.23.2. DO NOT EDIT.
|
||||
|
||||
// Regenerate this file using `make store-mocks`.
|
||||
|
||||
@@ -47,6 +47,10 @@ func (_m *ProductNoticesStore) GetViews(userID string) ([]model.ProductNoticeVie
|
||||
ret := _m.Called(userID)
|
||||
|
||||
var r0 []model.ProductNoticeViewState
|
||||
var r1 error
|
||||
if rf, ok := ret.Get(0).(func(string) ([]model.ProductNoticeViewState, error)); ok {
|
||||
return rf(userID)
|
||||
}
|
||||
if rf, ok := ret.Get(0).(func(string) []model.ProductNoticeViewState); ok {
|
||||
r0 = rf(userID)
|
||||
} else {
|
||||
@@ -55,7 +59,6 @@ func (_m *ProductNoticesStore) GetViews(userID string) ([]model.ProductNoticeVie
|
||||
}
|
||||
}
|
||||
|
||||
var r1 error
|
||||
if rf, ok := ret.Get(1).(func(string) error); ok {
|
||||
r1 = rf(userID)
|
||||
} else {
|
||||
@@ -78,3 +81,18 @@ func (_m *ProductNoticesStore) View(userID string, notices []string) error {
|
||||
|
||||
return r0
|
||||
}
|
||||
|
||||
type mockConstructorTestingTNewProductNoticesStore interface {
|
||||
mock.TestingT
|
||||
Cleanup(func())
|
||||
}
|
||||
|
||||
// NewProductNoticesStore creates a new instance of ProductNoticesStore. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations.
|
||||
func NewProductNoticesStore(t mockConstructorTestingTNewProductNoticesStore) *ProductNoticesStore {
|
||||
mock := &ProductNoticesStore{}
|
||||
mock.Mock.Test(t)
|
||||
|
||||
t.Cleanup(func() { mock.AssertExpectations(t) })
|
||||
|
||||
return mock
|
||||
}
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
// Code generated by mockery v2.10.4. DO NOT EDIT.
|
||||
// Code generated by mockery v2.23.2. DO NOT EDIT.
|
||||
|
||||
// Regenerate this file using `make store-mocks`.
|
||||
|
||||
@@ -19,6 +19,10 @@ func (_m *ReactionStore) BulkGetForPosts(postIds []string) ([]*model.Reaction, e
|
||||
ret := _m.Called(postIds)
|
||||
|
||||
var r0 []*model.Reaction
|
||||
var r1 error
|
||||
if rf, ok := ret.Get(0).(func([]string) ([]*model.Reaction, error)); ok {
|
||||
return rf(postIds)
|
||||
}
|
||||
if rf, ok := ret.Get(0).(func([]string) []*model.Reaction); ok {
|
||||
r0 = rf(postIds)
|
||||
} else {
|
||||
@@ -27,7 +31,6 @@ func (_m *ReactionStore) BulkGetForPosts(postIds []string) ([]*model.Reaction, e
|
||||
}
|
||||
}
|
||||
|
||||
var r1 error
|
||||
if rf, ok := ret.Get(1).(func([]string) error); ok {
|
||||
r1 = rf(postIds)
|
||||
} else {
|
||||
@@ -42,6 +45,10 @@ func (_m *ReactionStore) Delete(reaction *model.Reaction) (*model.Reaction, erro
|
||||
ret := _m.Called(reaction)
|
||||
|
||||
var r0 *model.Reaction
|
||||
var r1 error
|
||||
if rf, ok := ret.Get(0).(func(*model.Reaction) (*model.Reaction, error)); ok {
|
||||
return rf(reaction)
|
||||
}
|
||||
if rf, ok := ret.Get(0).(func(*model.Reaction) *model.Reaction); ok {
|
||||
r0 = rf(reaction)
|
||||
} else {
|
||||
@@ -50,7 +57,6 @@ func (_m *ReactionStore) Delete(reaction *model.Reaction) (*model.Reaction, erro
|
||||
}
|
||||
}
|
||||
|
||||
var r1 error
|
||||
if rf, ok := ret.Get(1).(func(*model.Reaction) error); ok {
|
||||
r1 = rf(reaction)
|
||||
} else {
|
||||
@@ -79,13 +85,16 @@ func (_m *ReactionStore) DeleteOrphanedRows(limit int) (int64, error) {
|
||||
ret := _m.Called(limit)
|
||||
|
||||
var r0 int64
|
||||
var r1 error
|
||||
if rf, ok := ret.Get(0).(func(int) (int64, error)); ok {
|
||||
return rf(limit)
|
||||
}
|
||||
if rf, ok := ret.Get(0).(func(int) int64); ok {
|
||||
r0 = rf(limit)
|
||||
} else {
|
||||
r0 = ret.Get(0).(int64)
|
||||
}
|
||||
|
||||
var r1 error
|
||||
if rf, ok := ret.Get(1).(func(int) error); ok {
|
||||
r1 = rf(limit)
|
||||
} else {
|
||||
@@ -100,6 +109,10 @@ func (_m *ReactionStore) GetForPost(postID string, allowFromCache bool) ([]*mode
|
||||
ret := _m.Called(postID, allowFromCache)
|
||||
|
||||
var r0 []*model.Reaction
|
||||
var r1 error
|
||||
if rf, ok := ret.Get(0).(func(string, bool) ([]*model.Reaction, error)); ok {
|
||||
return rf(postID, allowFromCache)
|
||||
}
|
||||
if rf, ok := ret.Get(0).(func(string, bool) []*model.Reaction); ok {
|
||||
r0 = rf(postID, allowFromCache)
|
||||
} else {
|
||||
@@ -108,7 +121,6 @@ func (_m *ReactionStore) GetForPost(postID string, allowFromCache bool) ([]*mode
|
||||
}
|
||||
}
|
||||
|
||||
var r1 error
|
||||
if rf, ok := ret.Get(1).(func(string, bool) error); ok {
|
||||
r1 = rf(postID, allowFromCache)
|
||||
} else {
|
||||
@@ -123,6 +135,10 @@ func (_m *ReactionStore) GetForPostSince(postId string, since int64, excludeRemo
|
||||
ret := _m.Called(postId, since, excludeRemoteId, inclDeleted)
|
||||
|
||||
var r0 []*model.Reaction
|
||||
var r1 error
|
||||
if rf, ok := ret.Get(0).(func(string, int64, string, bool) ([]*model.Reaction, error)); ok {
|
||||
return rf(postId, since, excludeRemoteId, inclDeleted)
|
||||
}
|
||||
if rf, ok := ret.Get(0).(func(string, int64, string, bool) []*model.Reaction); ok {
|
||||
r0 = rf(postId, since, excludeRemoteId, inclDeleted)
|
||||
} else {
|
||||
@@ -131,7 +147,6 @@ func (_m *ReactionStore) GetForPostSince(postId string, since int64, excludeRemo
|
||||
}
|
||||
}
|
||||
|
||||
var r1 error
|
||||
if rf, ok := ret.Get(1).(func(string, int64, string, bool) error); ok {
|
||||
r1 = rf(postId, since, excludeRemoteId, inclDeleted)
|
||||
} else {
|
||||
@@ -146,6 +161,10 @@ func (_m *ReactionStore) GetTopForTeamSince(teamID string, userID string, since
|
||||
ret := _m.Called(teamID, userID, since, offset, limit)
|
||||
|
||||
var r0 *model.TopReactionList
|
||||
var r1 error
|
||||
if rf, ok := ret.Get(0).(func(string, string, int64, int, int) (*model.TopReactionList, error)); ok {
|
||||
return rf(teamID, userID, since, offset, limit)
|
||||
}
|
||||
if rf, ok := ret.Get(0).(func(string, string, int64, int, int) *model.TopReactionList); ok {
|
||||
r0 = rf(teamID, userID, since, offset, limit)
|
||||
} else {
|
||||
@@ -154,7 +173,6 @@ func (_m *ReactionStore) GetTopForTeamSince(teamID string, userID string, since
|
||||
}
|
||||
}
|
||||
|
||||
var r1 error
|
||||
if rf, ok := ret.Get(1).(func(string, string, int64, int, int) error); ok {
|
||||
r1 = rf(teamID, userID, since, offset, limit)
|
||||
} else {
|
||||
@@ -169,6 +187,10 @@ func (_m *ReactionStore) GetTopForUserSince(userID string, teamID string, since
|
||||
ret := _m.Called(userID, teamID, since, offset, limit)
|
||||
|
||||
var r0 *model.TopReactionList
|
||||
var r1 error
|
||||
if rf, ok := ret.Get(0).(func(string, string, int64, int, int) (*model.TopReactionList, error)); ok {
|
||||
return rf(userID, teamID, since, offset, limit)
|
||||
}
|
||||
if rf, ok := ret.Get(0).(func(string, string, int64, int, int) *model.TopReactionList); ok {
|
||||
r0 = rf(userID, teamID, since, offset, limit)
|
||||
} else {
|
||||
@@ -177,7 +199,6 @@ func (_m *ReactionStore) GetTopForUserSince(userID string, teamID string, since
|
||||
}
|
||||
}
|
||||
|
||||
var r1 error
|
||||
if rf, ok := ret.Get(1).(func(string, string, int64, int, int) error); ok {
|
||||
r1 = rf(userID, teamID, since, offset, limit)
|
||||
} else {
|
||||
@@ -192,13 +213,16 @@ func (_m *ReactionStore) PermanentDeleteBatch(endTime int64, limit int64) (int64
|
||||
ret := _m.Called(endTime, limit)
|
||||
|
||||
var r0 int64
|
||||
var r1 error
|
||||
if rf, ok := ret.Get(0).(func(int64, int64) (int64, error)); ok {
|
||||
return rf(endTime, limit)
|
||||
}
|
||||
if rf, ok := ret.Get(0).(func(int64, int64) int64); ok {
|
||||
r0 = rf(endTime, limit)
|
||||
} else {
|
||||
r0 = ret.Get(0).(int64)
|
||||
}
|
||||
|
||||
var r1 error
|
||||
if rf, ok := ret.Get(1).(func(int64, int64) error); ok {
|
||||
r1 = rf(endTime, limit)
|
||||
} else {
|
||||
@@ -213,6 +237,10 @@ func (_m *ReactionStore) Save(reaction *model.Reaction) (*model.Reaction, error)
|
||||
ret := _m.Called(reaction)
|
||||
|
||||
var r0 *model.Reaction
|
||||
var r1 error
|
||||
if rf, ok := ret.Get(0).(func(*model.Reaction) (*model.Reaction, error)); ok {
|
||||
return rf(reaction)
|
||||
}
|
||||
if rf, ok := ret.Get(0).(func(*model.Reaction) *model.Reaction); ok {
|
||||
r0 = rf(reaction)
|
||||
} else {
|
||||
@@ -221,7 +249,6 @@ func (_m *ReactionStore) Save(reaction *model.Reaction) (*model.Reaction, error)
|
||||
}
|
||||
}
|
||||
|
||||
var r1 error
|
||||
if rf, ok := ret.Get(1).(func(*model.Reaction) error); ok {
|
||||
r1 = rf(reaction)
|
||||
} else {
|
||||
@@ -230,3 +257,18 @@ func (_m *ReactionStore) Save(reaction *model.Reaction) (*model.Reaction, error)
|
||||
|
||||
return r0, r1
|
||||
}
|
||||
|
||||
type mockConstructorTestingTNewReactionStore interface {
|
||||
mock.TestingT
|
||||
Cleanup(func())
|
||||
}
|
||||
|
||||
// NewReactionStore creates a new instance of ReactionStore. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations.
|
||||
func NewReactionStore(t mockConstructorTestingTNewReactionStore) *ReactionStore {
|
||||
mock := &ReactionStore{}
|
||||
mock.Mock.Test(t)
|
||||
|
||||
t.Cleanup(func() { mock.AssertExpectations(t) })
|
||||
|
||||
return mock
|
||||
}
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
// Code generated by mockery v2.10.4. DO NOT EDIT.
|
||||
// Code generated by mockery v2.23.2. DO NOT EDIT.
|
||||
|
||||
// Regenerate this file using `make store-mocks`.
|
||||
|
||||
@@ -19,13 +19,16 @@ func (_m *RemoteClusterStore) Delete(remoteClusterId string) (bool, error) {
|
||||
ret := _m.Called(remoteClusterId)
|
||||
|
||||
var r0 bool
|
||||
var r1 error
|
||||
if rf, ok := ret.Get(0).(func(string) (bool, error)); ok {
|
||||
return rf(remoteClusterId)
|
||||
}
|
||||
if rf, ok := ret.Get(0).(func(string) bool); ok {
|
||||
r0 = rf(remoteClusterId)
|
||||
} else {
|
||||
r0 = ret.Get(0).(bool)
|
||||
}
|
||||
|
||||
var r1 error
|
||||
if rf, ok := ret.Get(1).(func(string) error); ok {
|
||||
r1 = rf(remoteClusterId)
|
||||
} else {
|
||||
@@ -40,6 +43,10 @@ func (_m *RemoteClusterStore) Get(remoteClusterId string) (*model.RemoteCluster,
|
||||
ret := _m.Called(remoteClusterId)
|
||||
|
||||
var r0 *model.RemoteCluster
|
||||
var r1 error
|
||||
if rf, ok := ret.Get(0).(func(string) (*model.RemoteCluster, error)); ok {
|
||||
return rf(remoteClusterId)
|
||||
}
|
||||
if rf, ok := ret.Get(0).(func(string) *model.RemoteCluster); ok {
|
||||
r0 = rf(remoteClusterId)
|
||||
} else {
|
||||
@@ -48,7 +55,6 @@ func (_m *RemoteClusterStore) Get(remoteClusterId string) (*model.RemoteCluster,
|
||||
}
|
||||
}
|
||||
|
||||
var r1 error
|
||||
if rf, ok := ret.Get(1).(func(string) error); ok {
|
||||
r1 = rf(remoteClusterId)
|
||||
} else {
|
||||
@@ -63,6 +69,10 @@ func (_m *RemoteClusterStore) GetAll(filter model.RemoteClusterQueryFilter) ([]*
|
||||
ret := _m.Called(filter)
|
||||
|
||||
var r0 []*model.RemoteCluster
|
||||
var r1 error
|
||||
if rf, ok := ret.Get(0).(func(model.RemoteClusterQueryFilter) ([]*model.RemoteCluster, error)); ok {
|
||||
return rf(filter)
|
||||
}
|
||||
if rf, ok := ret.Get(0).(func(model.RemoteClusterQueryFilter) []*model.RemoteCluster); ok {
|
||||
r0 = rf(filter)
|
||||
} else {
|
||||
@@ -71,7 +81,6 @@ func (_m *RemoteClusterStore) GetAll(filter model.RemoteClusterQueryFilter) ([]*
|
||||
}
|
||||
}
|
||||
|
||||
var r1 error
|
||||
if rf, ok := ret.Get(1).(func(model.RemoteClusterQueryFilter) error); ok {
|
||||
r1 = rf(filter)
|
||||
} else {
|
||||
@@ -86,6 +95,10 @@ func (_m *RemoteClusterStore) Save(rc *model.RemoteCluster) (*model.RemoteCluste
|
||||
ret := _m.Called(rc)
|
||||
|
||||
var r0 *model.RemoteCluster
|
||||
var r1 error
|
||||
if rf, ok := ret.Get(0).(func(*model.RemoteCluster) (*model.RemoteCluster, error)); ok {
|
||||
return rf(rc)
|
||||
}
|
||||
if rf, ok := ret.Get(0).(func(*model.RemoteCluster) *model.RemoteCluster); ok {
|
||||
r0 = rf(rc)
|
||||
} else {
|
||||
@@ -94,7 +107,6 @@ func (_m *RemoteClusterStore) Save(rc *model.RemoteCluster) (*model.RemoteCluste
|
||||
}
|
||||
}
|
||||
|
||||
var r1 error
|
||||
if rf, ok := ret.Get(1).(func(*model.RemoteCluster) error); ok {
|
||||
r1 = rf(rc)
|
||||
} else {
|
||||
@@ -123,6 +135,10 @@ func (_m *RemoteClusterStore) Update(rc *model.RemoteCluster) (*model.RemoteClus
|
||||
ret := _m.Called(rc)
|
||||
|
||||
var r0 *model.RemoteCluster
|
||||
var r1 error
|
||||
if rf, ok := ret.Get(0).(func(*model.RemoteCluster) (*model.RemoteCluster, error)); ok {
|
||||
return rf(rc)
|
||||
}
|
||||
if rf, ok := ret.Get(0).(func(*model.RemoteCluster) *model.RemoteCluster); ok {
|
||||
r0 = rf(rc)
|
||||
} else {
|
||||
@@ -131,7 +147,6 @@ func (_m *RemoteClusterStore) Update(rc *model.RemoteCluster) (*model.RemoteClus
|
||||
}
|
||||
}
|
||||
|
||||
var r1 error
|
||||
if rf, ok := ret.Get(1).(func(*model.RemoteCluster) error); ok {
|
||||
r1 = rf(rc)
|
||||
} else {
|
||||
@@ -146,6 +161,10 @@ func (_m *RemoteClusterStore) UpdateTopics(remoteClusterId string, topics string
|
||||
ret := _m.Called(remoteClusterId, topics)
|
||||
|
||||
var r0 *model.RemoteCluster
|
||||
var r1 error
|
||||
if rf, ok := ret.Get(0).(func(string, string) (*model.RemoteCluster, error)); ok {
|
||||
return rf(remoteClusterId, topics)
|
||||
}
|
||||
if rf, ok := ret.Get(0).(func(string, string) *model.RemoteCluster); ok {
|
||||
r0 = rf(remoteClusterId, topics)
|
||||
} else {
|
||||
@@ -154,7 +173,6 @@ func (_m *RemoteClusterStore) UpdateTopics(remoteClusterId string, topics string
|
||||
}
|
||||
}
|
||||
|
||||
var r1 error
|
||||
if rf, ok := ret.Get(1).(func(string, string) error); ok {
|
||||
r1 = rf(remoteClusterId, topics)
|
||||
} else {
|
||||
@@ -163,3 +181,18 @@ func (_m *RemoteClusterStore) UpdateTopics(remoteClusterId string, topics string
|
||||
|
||||
return r0, r1
|
||||
}
|
||||
|
||||
type mockConstructorTestingTNewRemoteClusterStore interface {
|
||||
mock.TestingT
|
||||
Cleanup(func())
|
||||
}
|
||||
|
||||
// NewRemoteClusterStore creates a new instance of RemoteClusterStore. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations.
|
||||
func NewRemoteClusterStore(t mockConstructorTestingTNewRemoteClusterStore) *RemoteClusterStore {
|
||||
mock := &RemoteClusterStore{}
|
||||
mock.Mock.Test(t)
|
||||
|
||||
t.Cleanup(func() { mock.AssertExpectations(t) })
|
||||
|
||||
return mock
|
||||
}
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
// Code generated by mockery v2.10.4. DO NOT EDIT.
|
||||
// Code generated by mockery v2.23.2. DO NOT EDIT.
|
||||
|
||||
// Regenerate this file using `make store-mocks`.
|
||||
|
||||
@@ -61,13 +61,16 @@ func (_m *RetentionPolicyStore) DeleteOrphanedRows(limit int) (int64, error) {
|
||||
ret := _m.Called(limit)
|
||||
|
||||
var r0 int64
|
||||
var r1 error
|
||||
if rf, ok := ret.Get(0).(func(int) (int64, error)); ok {
|
||||
return rf(limit)
|
||||
}
|
||||
if rf, ok := ret.Get(0).(func(int) int64); ok {
|
||||
r0 = rf(limit)
|
||||
} else {
|
||||
r0 = ret.Get(0).(int64)
|
||||
}
|
||||
|
||||
var r1 error
|
||||
if rf, ok := ret.Get(1).(func(int) error); ok {
|
||||
r1 = rf(limit)
|
||||
} else {
|
||||
@@ -82,6 +85,10 @@ func (_m *RetentionPolicyStore) Get(id string) (*model.RetentionPolicyWithTeamAn
|
||||
ret := _m.Called(id)
|
||||
|
||||
var r0 *model.RetentionPolicyWithTeamAndChannelCounts
|
||||
var r1 error
|
||||
if rf, ok := ret.Get(0).(func(string) (*model.RetentionPolicyWithTeamAndChannelCounts, error)); ok {
|
||||
return rf(id)
|
||||
}
|
||||
if rf, ok := ret.Get(0).(func(string) *model.RetentionPolicyWithTeamAndChannelCounts); ok {
|
||||
r0 = rf(id)
|
||||
} else {
|
||||
@@ -90,7 +97,6 @@ func (_m *RetentionPolicyStore) Get(id string) (*model.RetentionPolicyWithTeamAn
|
||||
}
|
||||
}
|
||||
|
||||
var r1 error
|
||||
if rf, ok := ret.Get(1).(func(string) error); ok {
|
||||
r1 = rf(id)
|
||||
} else {
|
||||
@@ -105,6 +111,10 @@ func (_m *RetentionPolicyStore) GetAll(offset int, limit int) ([]*model.Retentio
|
||||
ret := _m.Called(offset, limit)
|
||||
|
||||
var r0 []*model.RetentionPolicyWithTeamAndChannelCounts
|
||||
var r1 error
|
||||
if rf, ok := ret.Get(0).(func(int, int) ([]*model.RetentionPolicyWithTeamAndChannelCounts, error)); ok {
|
||||
return rf(offset, limit)
|
||||
}
|
||||
if rf, ok := ret.Get(0).(func(int, int) []*model.RetentionPolicyWithTeamAndChannelCounts); ok {
|
||||
r0 = rf(offset, limit)
|
||||
} else {
|
||||
@@ -113,7 +123,6 @@ func (_m *RetentionPolicyStore) GetAll(offset int, limit int) ([]*model.Retentio
|
||||
}
|
||||
}
|
||||
|
||||
var r1 error
|
||||
if rf, ok := ret.Get(1).(func(int, int) error); ok {
|
||||
r1 = rf(offset, limit)
|
||||
} else {
|
||||
@@ -128,13 +137,16 @@ func (_m *RetentionPolicyStore) GetChannelPoliciesCountForUser(userID string) (i
|
||||
ret := _m.Called(userID)
|
||||
|
||||
var r0 int64
|
||||
var r1 error
|
||||
if rf, ok := ret.Get(0).(func(string) (int64, error)); ok {
|
||||
return rf(userID)
|
||||
}
|
||||
if rf, ok := ret.Get(0).(func(string) int64); ok {
|
||||
r0 = rf(userID)
|
||||
} else {
|
||||
r0 = ret.Get(0).(int64)
|
||||
}
|
||||
|
||||
var r1 error
|
||||
if rf, ok := ret.Get(1).(func(string) error); ok {
|
||||
r1 = rf(userID)
|
||||
} else {
|
||||
@@ -149,6 +161,10 @@ func (_m *RetentionPolicyStore) GetChannelPoliciesForUser(userID string, offset
|
||||
ret := _m.Called(userID, offset, limit)
|
||||
|
||||
var r0 []*model.RetentionPolicyForChannel
|
||||
var r1 error
|
||||
if rf, ok := ret.Get(0).(func(string, int, int) ([]*model.RetentionPolicyForChannel, error)); ok {
|
||||
return rf(userID, offset, limit)
|
||||
}
|
||||
if rf, ok := ret.Get(0).(func(string, int, int) []*model.RetentionPolicyForChannel); ok {
|
||||
r0 = rf(userID, offset, limit)
|
||||
} else {
|
||||
@@ -157,7 +173,6 @@ func (_m *RetentionPolicyStore) GetChannelPoliciesForUser(userID string, offset
|
||||
}
|
||||
}
|
||||
|
||||
var r1 error
|
||||
if rf, ok := ret.Get(1).(func(string, int, int) error); ok {
|
||||
r1 = rf(userID, offset, limit)
|
||||
} else {
|
||||
@@ -172,6 +187,10 @@ func (_m *RetentionPolicyStore) GetChannels(policyId string, offset int, limit i
|
||||
ret := _m.Called(policyId, offset, limit)
|
||||
|
||||
var r0 model.ChannelListWithTeamData
|
||||
var r1 error
|
||||
if rf, ok := ret.Get(0).(func(string, int, int) (model.ChannelListWithTeamData, error)); ok {
|
||||
return rf(policyId, offset, limit)
|
||||
}
|
||||
if rf, ok := ret.Get(0).(func(string, int, int) model.ChannelListWithTeamData); ok {
|
||||
r0 = rf(policyId, offset, limit)
|
||||
} else {
|
||||
@@ -180,7 +199,6 @@ func (_m *RetentionPolicyStore) GetChannels(policyId string, offset int, limit i
|
||||
}
|
||||
}
|
||||
|
||||
var r1 error
|
||||
if rf, ok := ret.Get(1).(func(string, int, int) error); ok {
|
||||
r1 = rf(policyId, offset, limit)
|
||||
} else {
|
||||
@@ -195,13 +213,16 @@ func (_m *RetentionPolicyStore) GetChannelsCount(policyId string) (int64, error)
|
||||
ret := _m.Called(policyId)
|
||||
|
||||
var r0 int64
|
||||
var r1 error
|
||||
if rf, ok := ret.Get(0).(func(string) (int64, error)); ok {
|
||||
return rf(policyId)
|
||||
}
|
||||
if rf, ok := ret.Get(0).(func(string) int64); ok {
|
||||
r0 = rf(policyId)
|
||||
} else {
|
||||
r0 = ret.Get(0).(int64)
|
||||
}
|
||||
|
||||
var r1 error
|
||||
if rf, ok := ret.Get(1).(func(string) error); ok {
|
||||
r1 = rf(policyId)
|
||||
} else {
|
||||
@@ -216,13 +237,16 @@ func (_m *RetentionPolicyStore) GetCount() (int64, error) {
|
||||
ret := _m.Called()
|
||||
|
||||
var r0 int64
|
||||
var r1 error
|
||||
if rf, ok := ret.Get(0).(func() (int64, error)); ok {
|
||||
return rf()
|
||||
}
|
||||
if rf, ok := ret.Get(0).(func() int64); ok {
|
||||
r0 = rf()
|
||||
} else {
|
||||
r0 = ret.Get(0).(int64)
|
||||
}
|
||||
|
||||
var r1 error
|
||||
if rf, ok := ret.Get(1).(func() error); ok {
|
||||
r1 = rf()
|
||||
} else {
|
||||
@@ -237,13 +261,16 @@ func (_m *RetentionPolicyStore) GetTeamPoliciesCountForUser(userID string) (int6
|
||||
ret := _m.Called(userID)
|
||||
|
||||
var r0 int64
|
||||
var r1 error
|
||||
if rf, ok := ret.Get(0).(func(string) (int64, error)); ok {
|
||||
return rf(userID)
|
||||
}
|
||||
if rf, ok := ret.Get(0).(func(string) int64); ok {
|
||||
r0 = rf(userID)
|
||||
} else {
|
||||
r0 = ret.Get(0).(int64)
|
||||
}
|
||||
|
||||
var r1 error
|
||||
if rf, ok := ret.Get(1).(func(string) error); ok {
|
||||
r1 = rf(userID)
|
||||
} else {
|
||||
@@ -258,6 +285,10 @@ func (_m *RetentionPolicyStore) GetTeamPoliciesForUser(userID string, offset int
|
||||
ret := _m.Called(userID, offset, limit)
|
||||
|
||||
var r0 []*model.RetentionPolicyForTeam
|
||||
var r1 error
|
||||
if rf, ok := ret.Get(0).(func(string, int, int) ([]*model.RetentionPolicyForTeam, error)); ok {
|
||||
return rf(userID, offset, limit)
|
||||
}
|
||||
if rf, ok := ret.Get(0).(func(string, int, int) []*model.RetentionPolicyForTeam); ok {
|
||||
r0 = rf(userID, offset, limit)
|
||||
} else {
|
||||
@@ -266,7 +297,6 @@ func (_m *RetentionPolicyStore) GetTeamPoliciesForUser(userID string, offset int
|
||||
}
|
||||
}
|
||||
|
||||
var r1 error
|
||||
if rf, ok := ret.Get(1).(func(string, int, int) error); ok {
|
||||
r1 = rf(userID, offset, limit)
|
||||
} else {
|
||||
@@ -281,6 +311,10 @@ func (_m *RetentionPolicyStore) GetTeams(policyId string, offset int, limit int)
|
||||
ret := _m.Called(policyId, offset, limit)
|
||||
|
||||
var r0 []*model.Team
|
||||
var r1 error
|
||||
if rf, ok := ret.Get(0).(func(string, int, int) ([]*model.Team, error)); ok {
|
||||
return rf(policyId, offset, limit)
|
||||
}
|
||||
if rf, ok := ret.Get(0).(func(string, int, int) []*model.Team); ok {
|
||||
r0 = rf(policyId, offset, limit)
|
||||
} else {
|
||||
@@ -289,7 +323,6 @@ func (_m *RetentionPolicyStore) GetTeams(policyId string, offset int, limit int)
|
||||
}
|
||||
}
|
||||
|
||||
var r1 error
|
||||
if rf, ok := ret.Get(1).(func(string, int, int) error); ok {
|
||||
r1 = rf(policyId, offset, limit)
|
||||
} else {
|
||||
@@ -304,13 +337,16 @@ func (_m *RetentionPolicyStore) GetTeamsCount(policyId string) (int64, error) {
|
||||
ret := _m.Called(policyId)
|
||||
|
||||
var r0 int64
|
||||
var r1 error
|
||||
if rf, ok := ret.Get(0).(func(string) (int64, error)); ok {
|
||||
return rf(policyId)
|
||||
}
|
||||
if rf, ok := ret.Get(0).(func(string) int64); ok {
|
||||
r0 = rf(policyId)
|
||||
} else {
|
||||
r0 = ret.Get(0).(int64)
|
||||
}
|
||||
|
||||
var r1 error
|
||||
if rf, ok := ret.Get(1).(func(string) error); ok {
|
||||
r1 = rf(policyId)
|
||||
} else {
|
||||
@@ -325,6 +361,10 @@ func (_m *RetentionPolicyStore) Patch(patch *model.RetentionPolicyWithTeamAndCha
|
||||
ret := _m.Called(patch)
|
||||
|
||||
var r0 *model.RetentionPolicyWithTeamAndChannelCounts
|
||||
var r1 error
|
||||
if rf, ok := ret.Get(0).(func(*model.RetentionPolicyWithTeamAndChannelIDs) (*model.RetentionPolicyWithTeamAndChannelCounts, error)); ok {
|
||||
return rf(patch)
|
||||
}
|
||||
if rf, ok := ret.Get(0).(func(*model.RetentionPolicyWithTeamAndChannelIDs) *model.RetentionPolicyWithTeamAndChannelCounts); ok {
|
||||
r0 = rf(patch)
|
||||
} else {
|
||||
@@ -333,7 +373,6 @@ func (_m *RetentionPolicyStore) Patch(patch *model.RetentionPolicyWithTeamAndCha
|
||||
}
|
||||
}
|
||||
|
||||
var r1 error
|
||||
if rf, ok := ret.Get(1).(func(*model.RetentionPolicyWithTeamAndChannelIDs) error); ok {
|
||||
r1 = rf(patch)
|
||||
} else {
|
||||
@@ -376,6 +415,10 @@ func (_m *RetentionPolicyStore) Save(policy *model.RetentionPolicyWithTeamAndCha
|
||||
ret := _m.Called(policy)
|
||||
|
||||
var r0 *model.RetentionPolicyWithTeamAndChannelCounts
|
||||
var r1 error
|
||||
if rf, ok := ret.Get(0).(func(*model.RetentionPolicyWithTeamAndChannelIDs) (*model.RetentionPolicyWithTeamAndChannelCounts, error)); ok {
|
||||
return rf(policy)
|
||||
}
|
||||
if rf, ok := ret.Get(0).(func(*model.RetentionPolicyWithTeamAndChannelIDs) *model.RetentionPolicyWithTeamAndChannelCounts); ok {
|
||||
r0 = rf(policy)
|
||||
} else {
|
||||
@@ -384,7 +427,6 @@ func (_m *RetentionPolicyStore) Save(policy *model.RetentionPolicyWithTeamAndCha
|
||||
}
|
||||
}
|
||||
|
||||
var r1 error
|
||||
if rf, ok := ret.Get(1).(func(*model.RetentionPolicyWithTeamAndChannelIDs) error); ok {
|
||||
r1 = rf(policy)
|
||||
} else {
|
||||
@@ -393,3 +435,18 @@ func (_m *RetentionPolicyStore) Save(policy *model.RetentionPolicyWithTeamAndCha
|
||||
|
||||
return r0, r1
|
||||
}
|
||||
|
||||
type mockConstructorTestingTNewRetentionPolicyStore interface {
|
||||
mock.TestingT
|
||||
Cleanup(func())
|
||||
}
|
||||
|
||||
// NewRetentionPolicyStore creates a new instance of RetentionPolicyStore. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations.
|
||||
func NewRetentionPolicyStore(t mockConstructorTestingTNewRetentionPolicyStore) *RetentionPolicyStore {
|
||||
mock := &RetentionPolicyStore{}
|
||||
mock.Mock.Test(t)
|
||||
|
||||
t.Cleanup(func() { mock.AssertExpectations(t) })
|
||||
|
||||
return mock
|
||||
}
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
// Code generated by mockery v2.10.4. DO NOT EDIT.
|
||||
// Code generated by mockery v2.23.2. DO NOT EDIT.
|
||||
|
||||
// Regenerate this file using `make store-mocks`.
|
||||
|
||||
@@ -21,6 +21,10 @@ func (_m *RoleStore) AllChannelSchemeRoles() ([]*model.Role, error) {
|
||||
ret := _m.Called()
|
||||
|
||||
var r0 []*model.Role
|
||||
var r1 error
|
||||
if rf, ok := ret.Get(0).(func() ([]*model.Role, error)); ok {
|
||||
return rf()
|
||||
}
|
||||
if rf, ok := ret.Get(0).(func() []*model.Role); ok {
|
||||
r0 = rf()
|
||||
} else {
|
||||
@@ -29,7 +33,6 @@ func (_m *RoleStore) AllChannelSchemeRoles() ([]*model.Role, error) {
|
||||
}
|
||||
}
|
||||
|
||||
var r1 error
|
||||
if rf, ok := ret.Get(1).(func() error); ok {
|
||||
r1 = rf()
|
||||
} else {
|
||||
@@ -44,6 +47,10 @@ func (_m *RoleStore) ChannelHigherScopedPermissions(roleNames []string) (map[str
|
||||
ret := _m.Called(roleNames)
|
||||
|
||||
var r0 map[string]*model.RolePermissions
|
||||
var r1 error
|
||||
if rf, ok := ret.Get(0).(func([]string) (map[string]*model.RolePermissions, error)); ok {
|
||||
return rf(roleNames)
|
||||
}
|
||||
if rf, ok := ret.Get(0).(func([]string) map[string]*model.RolePermissions); ok {
|
||||
r0 = rf(roleNames)
|
||||
} else {
|
||||
@@ -52,7 +59,6 @@ func (_m *RoleStore) ChannelHigherScopedPermissions(roleNames []string) (map[str
|
||||
}
|
||||
}
|
||||
|
||||
var r1 error
|
||||
if rf, ok := ret.Get(1).(func([]string) error); ok {
|
||||
r1 = rf(roleNames)
|
||||
} else {
|
||||
@@ -67,6 +73,10 @@ func (_m *RoleStore) ChannelRolesUnderTeamRole(roleName string) ([]*model.Role,
|
||||
ret := _m.Called(roleName)
|
||||
|
||||
var r0 []*model.Role
|
||||
var r1 error
|
||||
if rf, ok := ret.Get(0).(func(string) ([]*model.Role, error)); ok {
|
||||
return rf(roleName)
|
||||
}
|
||||
if rf, ok := ret.Get(0).(func(string) []*model.Role); ok {
|
||||
r0 = rf(roleName)
|
||||
} else {
|
||||
@@ -75,7 +85,6 @@ func (_m *RoleStore) ChannelRolesUnderTeamRole(roleName string) ([]*model.Role,
|
||||
}
|
||||
}
|
||||
|
||||
var r1 error
|
||||
if rf, ok := ret.Get(1).(func(string) error); ok {
|
||||
r1 = rf(roleName)
|
||||
} else {
|
||||
@@ -90,6 +99,10 @@ func (_m *RoleStore) Delete(roleID string) (*model.Role, error) {
|
||||
ret := _m.Called(roleID)
|
||||
|
||||
var r0 *model.Role
|
||||
var r1 error
|
||||
if rf, ok := ret.Get(0).(func(string) (*model.Role, error)); ok {
|
||||
return rf(roleID)
|
||||
}
|
||||
if rf, ok := ret.Get(0).(func(string) *model.Role); ok {
|
||||
r0 = rf(roleID)
|
||||
} else {
|
||||
@@ -98,7 +111,6 @@ func (_m *RoleStore) Delete(roleID string) (*model.Role, error) {
|
||||
}
|
||||
}
|
||||
|
||||
var r1 error
|
||||
if rf, ok := ret.Get(1).(func(string) error); ok {
|
||||
r1 = rf(roleID)
|
||||
} else {
|
||||
@@ -113,6 +125,10 @@ func (_m *RoleStore) Get(roleID string) (*model.Role, error) {
|
||||
ret := _m.Called(roleID)
|
||||
|
||||
var r0 *model.Role
|
||||
var r1 error
|
||||
if rf, ok := ret.Get(0).(func(string) (*model.Role, error)); ok {
|
||||
return rf(roleID)
|
||||
}
|
||||
if rf, ok := ret.Get(0).(func(string) *model.Role); ok {
|
||||
r0 = rf(roleID)
|
||||
} else {
|
||||
@@ -121,7 +137,6 @@ func (_m *RoleStore) Get(roleID string) (*model.Role, error) {
|
||||
}
|
||||
}
|
||||
|
||||
var r1 error
|
||||
if rf, ok := ret.Get(1).(func(string) error); ok {
|
||||
r1 = rf(roleID)
|
||||
} else {
|
||||
@@ -136,6 +151,10 @@ func (_m *RoleStore) GetAll() ([]*model.Role, error) {
|
||||
ret := _m.Called()
|
||||
|
||||
var r0 []*model.Role
|
||||
var r1 error
|
||||
if rf, ok := ret.Get(0).(func() ([]*model.Role, error)); ok {
|
||||
return rf()
|
||||
}
|
||||
if rf, ok := ret.Get(0).(func() []*model.Role); ok {
|
||||
r0 = rf()
|
||||
} else {
|
||||
@@ -144,7 +163,6 @@ func (_m *RoleStore) GetAll() ([]*model.Role, error) {
|
||||
}
|
||||
}
|
||||
|
||||
var r1 error
|
||||
if rf, ok := ret.Get(1).(func() error); ok {
|
||||
r1 = rf()
|
||||
} else {
|
||||
@@ -159,6 +177,10 @@ func (_m *RoleStore) GetByName(ctx context.Context, name string) (*model.Role, e
|
||||
ret := _m.Called(ctx, name)
|
||||
|
||||
var r0 *model.Role
|
||||
var r1 error
|
||||
if rf, ok := ret.Get(0).(func(context.Context, string) (*model.Role, error)); ok {
|
||||
return rf(ctx, name)
|
||||
}
|
||||
if rf, ok := ret.Get(0).(func(context.Context, string) *model.Role); ok {
|
||||
r0 = rf(ctx, name)
|
||||
} else {
|
||||
@@ -167,7 +189,6 @@ func (_m *RoleStore) GetByName(ctx context.Context, name string) (*model.Role, e
|
||||
}
|
||||
}
|
||||
|
||||
var r1 error
|
||||
if rf, ok := ret.Get(1).(func(context.Context, string) error); ok {
|
||||
r1 = rf(ctx, name)
|
||||
} else {
|
||||
@@ -182,6 +203,10 @@ func (_m *RoleStore) GetByNames(names []string) ([]*model.Role, error) {
|
||||
ret := _m.Called(names)
|
||||
|
||||
var r0 []*model.Role
|
||||
var r1 error
|
||||
if rf, ok := ret.Get(0).(func([]string) ([]*model.Role, error)); ok {
|
||||
return rf(names)
|
||||
}
|
||||
if rf, ok := ret.Get(0).(func([]string) []*model.Role); ok {
|
||||
r0 = rf(names)
|
||||
} else {
|
||||
@@ -190,7 +215,6 @@ func (_m *RoleStore) GetByNames(names []string) ([]*model.Role, error) {
|
||||
}
|
||||
}
|
||||
|
||||
var r1 error
|
||||
if rf, ok := ret.Get(1).(func([]string) error); ok {
|
||||
r1 = rf(names)
|
||||
} else {
|
||||
@@ -219,6 +243,10 @@ func (_m *RoleStore) Save(role *model.Role) (*model.Role, error) {
|
||||
ret := _m.Called(role)
|
||||
|
||||
var r0 *model.Role
|
||||
var r1 error
|
||||
if rf, ok := ret.Get(0).(func(*model.Role) (*model.Role, error)); ok {
|
||||
return rf(role)
|
||||
}
|
||||
if rf, ok := ret.Get(0).(func(*model.Role) *model.Role); ok {
|
||||
r0 = rf(role)
|
||||
} else {
|
||||
@@ -227,7 +255,6 @@ func (_m *RoleStore) Save(role *model.Role) (*model.Role, error) {
|
||||
}
|
||||
}
|
||||
|
||||
var r1 error
|
||||
if rf, ok := ret.Get(1).(func(*model.Role) error); ok {
|
||||
r1 = rf(role)
|
||||
} else {
|
||||
@@ -236,3 +263,18 @@ func (_m *RoleStore) Save(role *model.Role) (*model.Role, error) {
|
||||
|
||||
return r0, r1
|
||||
}
|
||||
|
||||
type mockConstructorTestingTNewRoleStore interface {
|
||||
mock.TestingT
|
||||
Cleanup(func())
|
||||
}
|
||||
|
||||
// NewRoleStore creates a new instance of RoleStore. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations.
|
||||
func NewRoleStore(t mockConstructorTestingTNewRoleStore) *RoleStore {
|
||||
mock := &RoleStore{}
|
||||
mock.Mock.Test(t)
|
||||
|
||||
t.Cleanup(func() { mock.AssertExpectations(t) })
|
||||
|
||||
return mock
|
||||
}
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
// Code generated by mockery v2.10.4. DO NOT EDIT.
|
||||
// Code generated by mockery v2.23.2. DO NOT EDIT.
|
||||
|
||||
// Regenerate this file using `make store-mocks`.
|
||||
|
||||
@@ -19,13 +19,16 @@ func (_m *SchemeStore) CountByScope(scope string) (int64, error) {
|
||||
ret := _m.Called(scope)
|
||||
|
||||
var r0 int64
|
||||
var r1 error
|
||||
if rf, ok := ret.Get(0).(func(string) (int64, error)); ok {
|
||||
return rf(scope)
|
||||
}
|
||||
if rf, ok := ret.Get(0).(func(string) int64); ok {
|
||||
r0 = rf(scope)
|
||||
} else {
|
||||
r0 = ret.Get(0).(int64)
|
||||
}
|
||||
|
||||
var r1 error
|
||||
if rf, ok := ret.Get(1).(func(string) error); ok {
|
||||
r1 = rf(scope)
|
||||
} else {
|
||||
@@ -40,13 +43,16 @@ func (_m *SchemeStore) CountWithoutPermission(scope string, permissionID string,
|
||||
ret := _m.Called(scope, permissionID, roleScope, roleType)
|
||||
|
||||
var r0 int64
|
||||
var r1 error
|
||||
if rf, ok := ret.Get(0).(func(string, string, model.RoleScope, model.RoleType) (int64, error)); ok {
|
||||
return rf(scope, permissionID, roleScope, roleType)
|
||||
}
|
||||
if rf, ok := ret.Get(0).(func(string, string, model.RoleScope, model.RoleType) int64); ok {
|
||||
r0 = rf(scope, permissionID, roleScope, roleType)
|
||||
} else {
|
||||
r0 = ret.Get(0).(int64)
|
||||
}
|
||||
|
||||
var r1 error
|
||||
if rf, ok := ret.Get(1).(func(string, string, model.RoleScope, model.RoleType) error); ok {
|
||||
r1 = rf(scope, permissionID, roleScope, roleType)
|
||||
} else {
|
||||
@@ -61,6 +67,10 @@ func (_m *SchemeStore) Delete(schemeID string) (*model.Scheme, error) {
|
||||
ret := _m.Called(schemeID)
|
||||
|
||||
var r0 *model.Scheme
|
||||
var r1 error
|
||||
if rf, ok := ret.Get(0).(func(string) (*model.Scheme, error)); ok {
|
||||
return rf(schemeID)
|
||||
}
|
||||
if rf, ok := ret.Get(0).(func(string) *model.Scheme); ok {
|
||||
r0 = rf(schemeID)
|
||||
} else {
|
||||
@@ -69,7 +79,6 @@ func (_m *SchemeStore) Delete(schemeID string) (*model.Scheme, error) {
|
||||
}
|
||||
}
|
||||
|
||||
var r1 error
|
||||
if rf, ok := ret.Get(1).(func(string) error); ok {
|
||||
r1 = rf(schemeID)
|
||||
} else {
|
||||
@@ -84,6 +93,10 @@ func (_m *SchemeStore) Get(schemeID string) (*model.Scheme, error) {
|
||||
ret := _m.Called(schemeID)
|
||||
|
||||
var r0 *model.Scheme
|
||||
var r1 error
|
||||
if rf, ok := ret.Get(0).(func(string) (*model.Scheme, error)); ok {
|
||||
return rf(schemeID)
|
||||
}
|
||||
if rf, ok := ret.Get(0).(func(string) *model.Scheme); ok {
|
||||
r0 = rf(schemeID)
|
||||
} else {
|
||||
@@ -92,7 +105,6 @@ func (_m *SchemeStore) Get(schemeID string) (*model.Scheme, error) {
|
||||
}
|
||||
}
|
||||
|
||||
var r1 error
|
||||
if rf, ok := ret.Get(1).(func(string) error); ok {
|
||||
r1 = rf(schemeID)
|
||||
} else {
|
||||
@@ -107,6 +119,10 @@ func (_m *SchemeStore) GetAllPage(scope string, offset int, limit int) ([]*model
|
||||
ret := _m.Called(scope, offset, limit)
|
||||
|
||||
var r0 []*model.Scheme
|
||||
var r1 error
|
||||
if rf, ok := ret.Get(0).(func(string, int, int) ([]*model.Scheme, error)); ok {
|
||||
return rf(scope, offset, limit)
|
||||
}
|
||||
if rf, ok := ret.Get(0).(func(string, int, int) []*model.Scheme); ok {
|
||||
r0 = rf(scope, offset, limit)
|
||||
} else {
|
||||
@@ -115,7 +131,6 @@ func (_m *SchemeStore) GetAllPage(scope string, offset int, limit int) ([]*model
|
||||
}
|
||||
}
|
||||
|
||||
var r1 error
|
||||
if rf, ok := ret.Get(1).(func(string, int, int) error); ok {
|
||||
r1 = rf(scope, offset, limit)
|
||||
} else {
|
||||
@@ -130,6 +145,10 @@ func (_m *SchemeStore) GetByName(schemeName string) (*model.Scheme, error) {
|
||||
ret := _m.Called(schemeName)
|
||||
|
||||
var r0 *model.Scheme
|
||||
var r1 error
|
||||
if rf, ok := ret.Get(0).(func(string) (*model.Scheme, error)); ok {
|
||||
return rf(schemeName)
|
||||
}
|
||||
if rf, ok := ret.Get(0).(func(string) *model.Scheme); ok {
|
||||
r0 = rf(schemeName)
|
||||
} else {
|
||||
@@ -138,7 +157,6 @@ func (_m *SchemeStore) GetByName(schemeName string) (*model.Scheme, error) {
|
||||
}
|
||||
}
|
||||
|
||||
var r1 error
|
||||
if rf, ok := ret.Get(1).(func(string) error); ok {
|
||||
r1 = rf(schemeName)
|
||||
} else {
|
||||
@@ -167,6 +185,10 @@ func (_m *SchemeStore) Save(scheme *model.Scheme) (*model.Scheme, error) {
|
||||
ret := _m.Called(scheme)
|
||||
|
||||
var r0 *model.Scheme
|
||||
var r1 error
|
||||
if rf, ok := ret.Get(0).(func(*model.Scheme) (*model.Scheme, error)); ok {
|
||||
return rf(scheme)
|
||||
}
|
||||
if rf, ok := ret.Get(0).(func(*model.Scheme) *model.Scheme); ok {
|
||||
r0 = rf(scheme)
|
||||
} else {
|
||||
@@ -175,7 +197,6 @@ func (_m *SchemeStore) Save(scheme *model.Scheme) (*model.Scheme, error) {
|
||||
}
|
||||
}
|
||||
|
||||
var r1 error
|
||||
if rf, ok := ret.Get(1).(func(*model.Scheme) error); ok {
|
||||
r1 = rf(scheme)
|
||||
} else {
|
||||
@@ -184,3 +205,18 @@ func (_m *SchemeStore) Save(scheme *model.Scheme) (*model.Scheme, error) {
|
||||
|
||||
return r0, r1
|
||||
}
|
||||
|
||||
type mockConstructorTestingTNewSchemeStore interface {
|
||||
mock.TestingT
|
||||
Cleanup(func())
|
||||
}
|
||||
|
||||
// NewSchemeStore creates a new instance of SchemeStore. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations.
|
||||
func NewSchemeStore(t mockConstructorTestingTNewSchemeStore) *SchemeStore {
|
||||
mock := &SchemeStore{}
|
||||
mock.Mock.Test(t)
|
||||
|
||||
t.Cleanup(func() { mock.AssertExpectations(t) })
|
||||
|
||||
return mock
|
||||
}
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
// Code generated by mockery v2.10.4. DO NOT EDIT.
|
||||
// Code generated by mockery v2.23.2. DO NOT EDIT.
|
||||
|
||||
// Regenerate this file using `make store-mocks`.
|
||||
|
||||
@@ -21,13 +21,16 @@ func (_m *SessionStore) AnalyticsSessionCount() (int64, error) {
|
||||
ret := _m.Called()
|
||||
|
||||
var r0 int64
|
||||
var r1 error
|
||||
if rf, ok := ret.Get(0).(func() (int64, error)); ok {
|
||||
return rf()
|
||||
}
|
||||
if rf, ok := ret.Get(0).(func() int64); ok {
|
||||
r0 = rf()
|
||||
} else {
|
||||
r0 = ret.Get(0).(int64)
|
||||
}
|
||||
|
||||
var r1 error
|
||||
if rf, ok := ret.Get(1).(func() error); ok {
|
||||
r1 = rf()
|
||||
} else {
|
||||
@@ -56,6 +59,10 @@ func (_m *SessionStore) Get(ctx context.Context, sessionIDOrToken string) (*mode
|
||||
ret := _m.Called(ctx, sessionIDOrToken)
|
||||
|
||||
var r0 *model.Session
|
||||
var r1 error
|
||||
if rf, ok := ret.Get(0).(func(context.Context, string) (*model.Session, error)); ok {
|
||||
return rf(ctx, sessionIDOrToken)
|
||||
}
|
||||
if rf, ok := ret.Get(0).(func(context.Context, string) *model.Session); ok {
|
||||
r0 = rf(ctx, sessionIDOrToken)
|
||||
} else {
|
||||
@@ -64,7 +71,6 @@ func (_m *SessionStore) Get(ctx context.Context, sessionIDOrToken string) (*mode
|
||||
}
|
||||
}
|
||||
|
||||
var r1 error
|
||||
if rf, ok := ret.Get(1).(func(context.Context, string) error); ok {
|
||||
r1 = rf(ctx, sessionIDOrToken)
|
||||
} else {
|
||||
@@ -79,6 +85,10 @@ func (_m *SessionStore) GetSessions(userID string) ([]*model.Session, error) {
|
||||
ret := _m.Called(userID)
|
||||
|
||||
var r0 []*model.Session
|
||||
var r1 error
|
||||
if rf, ok := ret.Get(0).(func(string) ([]*model.Session, error)); ok {
|
||||
return rf(userID)
|
||||
}
|
||||
if rf, ok := ret.Get(0).(func(string) []*model.Session); ok {
|
||||
r0 = rf(userID)
|
||||
} else {
|
||||
@@ -87,7 +97,6 @@ func (_m *SessionStore) GetSessions(userID string) ([]*model.Session, error) {
|
||||
}
|
||||
}
|
||||
|
||||
var r1 error
|
||||
if rf, ok := ret.Get(1).(func(string) error); ok {
|
||||
r1 = rf(userID)
|
||||
} else {
|
||||
@@ -102,6 +111,10 @@ func (_m *SessionStore) GetSessionsExpired(thresholdMillis int64, mobileOnly boo
|
||||
ret := _m.Called(thresholdMillis, mobileOnly, unnotifiedOnly)
|
||||
|
||||
var r0 []*model.Session
|
||||
var r1 error
|
||||
if rf, ok := ret.Get(0).(func(int64, bool, bool) ([]*model.Session, error)); ok {
|
||||
return rf(thresholdMillis, mobileOnly, unnotifiedOnly)
|
||||
}
|
||||
if rf, ok := ret.Get(0).(func(int64, bool, bool) []*model.Session); ok {
|
||||
r0 = rf(thresholdMillis, mobileOnly, unnotifiedOnly)
|
||||
} else {
|
||||
@@ -110,7 +123,6 @@ func (_m *SessionStore) GetSessionsExpired(thresholdMillis int64, mobileOnly boo
|
||||
}
|
||||
}
|
||||
|
||||
var r1 error
|
||||
if rf, ok := ret.Get(1).(func(int64, bool, bool) error); ok {
|
||||
r1 = rf(thresholdMillis, mobileOnly, unnotifiedOnly)
|
||||
} else {
|
||||
@@ -125,6 +137,10 @@ func (_m *SessionStore) GetSessionsWithActiveDeviceIds(userID string) ([]*model.
|
||||
ret := _m.Called(userID)
|
||||
|
||||
var r0 []*model.Session
|
||||
var r1 error
|
||||
if rf, ok := ret.Get(0).(func(string) ([]*model.Session, error)); ok {
|
||||
return rf(userID)
|
||||
}
|
||||
if rf, ok := ret.Get(0).(func(string) []*model.Session); ok {
|
||||
r0 = rf(userID)
|
||||
} else {
|
||||
@@ -133,7 +149,6 @@ func (_m *SessionStore) GetSessionsWithActiveDeviceIds(userID string) ([]*model.
|
||||
}
|
||||
}
|
||||
|
||||
var r1 error
|
||||
if rf, ok := ret.Get(1).(func(string) error); ok {
|
||||
r1 = rf(userID)
|
||||
} else {
|
||||
@@ -190,6 +205,10 @@ func (_m *SessionStore) Save(session *model.Session) (*model.Session, error) {
|
||||
ret := _m.Called(session)
|
||||
|
||||
var r0 *model.Session
|
||||
var r1 error
|
||||
if rf, ok := ret.Get(0).(func(*model.Session) (*model.Session, error)); ok {
|
||||
return rf(session)
|
||||
}
|
||||
if rf, ok := ret.Get(0).(func(*model.Session) *model.Session); ok {
|
||||
r0 = rf(session)
|
||||
} else {
|
||||
@@ -198,7 +217,6 @@ func (_m *SessionStore) Save(session *model.Session) (*model.Session, error) {
|
||||
}
|
||||
}
|
||||
|
||||
var r1 error
|
||||
if rf, ok := ret.Get(1).(func(*model.Session) error); ok {
|
||||
r1 = rf(session)
|
||||
} else {
|
||||
@@ -213,13 +231,16 @@ func (_m *SessionStore) UpdateDeviceId(id string, deviceID string, expiresAt int
|
||||
ret := _m.Called(id, deviceID, expiresAt)
|
||||
|
||||
var r0 string
|
||||
var r1 error
|
||||
if rf, ok := ret.Get(0).(func(string, string, int64) (string, error)); ok {
|
||||
return rf(id, deviceID, expiresAt)
|
||||
}
|
||||
if rf, ok := ret.Get(0).(func(string, string, int64) string); ok {
|
||||
r0 = rf(id, deviceID, expiresAt)
|
||||
} else {
|
||||
r0 = ret.Get(0).(string)
|
||||
}
|
||||
|
||||
var r1 error
|
||||
if rf, ok := ret.Get(1).(func(string, string, int64) error); ok {
|
||||
r1 = rf(id, deviceID, expiresAt)
|
||||
} else {
|
||||
@@ -290,13 +311,16 @@ func (_m *SessionStore) UpdateRoles(userID string, roles string) (string, error)
|
||||
ret := _m.Called(userID, roles)
|
||||
|
||||
var r0 string
|
||||
var r1 error
|
||||
if rf, ok := ret.Get(0).(func(string, string) (string, error)); ok {
|
||||
return rf(userID, roles)
|
||||
}
|
||||
if rf, ok := ret.Get(0).(func(string, string) string); ok {
|
||||
r0 = rf(userID, roles)
|
||||
} else {
|
||||
r0 = ret.Get(0).(string)
|
||||
}
|
||||
|
||||
var r1 error
|
||||
if rf, ok := ret.Get(1).(func(string, string) error); ok {
|
||||
r1 = rf(userID, roles)
|
||||
} else {
|
||||
@@ -305,3 +329,18 @@ func (_m *SessionStore) UpdateRoles(userID string, roles string) (string, error)
|
||||
|
||||
return r0, r1
|
||||
}
|
||||
|
||||
type mockConstructorTestingTNewSessionStore interface {
|
||||
mock.TestingT
|
||||
Cleanup(func())
|
||||
}
|
||||
|
||||
// NewSessionStore creates a new instance of SessionStore. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations.
|
||||
func NewSessionStore(t mockConstructorTestingTNewSessionStore) *SessionStore {
|
||||
mock := &SessionStore{}
|
||||
mock.Mock.Test(t)
|
||||
|
||||
t.Cleanup(func() { mock.AssertExpectations(t) })
|
||||
|
||||
return mock
|
||||
}
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
// Code generated by mockery v2.10.4. DO NOT EDIT.
|
||||
// Code generated by mockery v2.23.2. DO NOT EDIT.
|
||||
|
||||
// Regenerate this file using `make store-mocks`.
|
||||
|
||||
@@ -19,13 +19,16 @@ func (_m *SharedChannelStore) Delete(channelId string) (bool, error) {
|
||||
ret := _m.Called(channelId)
|
||||
|
||||
var r0 bool
|
||||
var r1 error
|
||||
if rf, ok := ret.Get(0).(func(string) (bool, error)); ok {
|
||||
return rf(channelId)
|
||||
}
|
||||
if rf, ok := ret.Get(0).(func(string) bool); ok {
|
||||
r0 = rf(channelId)
|
||||
} else {
|
||||
r0 = ret.Get(0).(bool)
|
||||
}
|
||||
|
||||
var r1 error
|
||||
if rf, ok := ret.Get(1).(func(string) error); ok {
|
||||
r1 = rf(channelId)
|
||||
} else {
|
||||
@@ -40,13 +43,16 @@ func (_m *SharedChannelStore) DeleteRemote(remoteId string) (bool, error) {
|
||||
ret := _m.Called(remoteId)
|
||||
|
||||
var r0 bool
|
||||
var r1 error
|
||||
if rf, ok := ret.Get(0).(func(string) (bool, error)); ok {
|
||||
return rf(remoteId)
|
||||
}
|
||||
if rf, ok := ret.Get(0).(func(string) bool); ok {
|
||||
r0 = rf(remoteId)
|
||||
} else {
|
||||
r0 = ret.Get(0).(bool)
|
||||
}
|
||||
|
||||
var r1 error
|
||||
if rf, ok := ret.Get(1).(func(string) error); ok {
|
||||
r1 = rf(remoteId)
|
||||
} else {
|
||||
@@ -61,6 +67,10 @@ func (_m *SharedChannelStore) Get(channelId string) (*model.SharedChannel, error
|
||||
ret := _m.Called(channelId)
|
||||
|
||||
var r0 *model.SharedChannel
|
||||
var r1 error
|
||||
if rf, ok := ret.Get(0).(func(string) (*model.SharedChannel, error)); ok {
|
||||
return rf(channelId)
|
||||
}
|
||||
if rf, ok := ret.Get(0).(func(string) *model.SharedChannel); ok {
|
||||
r0 = rf(channelId)
|
||||
} else {
|
||||
@@ -69,7 +79,6 @@ func (_m *SharedChannelStore) Get(channelId string) (*model.SharedChannel, error
|
||||
}
|
||||
}
|
||||
|
||||
var r1 error
|
||||
if rf, ok := ret.Get(1).(func(string) error); ok {
|
||||
r1 = rf(channelId)
|
||||
} else {
|
||||
@@ -84,6 +93,10 @@ func (_m *SharedChannelStore) GetAll(offset int, limit int, opts model.SharedCha
|
||||
ret := _m.Called(offset, limit, opts)
|
||||
|
||||
var r0 []*model.SharedChannel
|
||||
var r1 error
|
||||
if rf, ok := ret.Get(0).(func(int, int, model.SharedChannelFilterOpts) ([]*model.SharedChannel, error)); ok {
|
||||
return rf(offset, limit, opts)
|
||||
}
|
||||
if rf, ok := ret.Get(0).(func(int, int, model.SharedChannelFilterOpts) []*model.SharedChannel); ok {
|
||||
r0 = rf(offset, limit, opts)
|
||||
} else {
|
||||
@@ -92,7 +105,6 @@ func (_m *SharedChannelStore) GetAll(offset int, limit int, opts model.SharedCha
|
||||
}
|
||||
}
|
||||
|
||||
var r1 error
|
||||
if rf, ok := ret.Get(1).(func(int, int, model.SharedChannelFilterOpts) error); ok {
|
||||
r1 = rf(offset, limit, opts)
|
||||
} else {
|
||||
@@ -107,13 +119,16 @@ func (_m *SharedChannelStore) GetAllCount(opts model.SharedChannelFilterOpts) (i
|
||||
ret := _m.Called(opts)
|
||||
|
||||
var r0 int64
|
||||
var r1 error
|
||||
if rf, ok := ret.Get(0).(func(model.SharedChannelFilterOpts) (int64, error)); ok {
|
||||
return rf(opts)
|
||||
}
|
||||
if rf, ok := ret.Get(0).(func(model.SharedChannelFilterOpts) int64); ok {
|
||||
r0 = rf(opts)
|
||||
} else {
|
||||
r0 = ret.Get(0).(int64)
|
||||
}
|
||||
|
||||
var r1 error
|
||||
if rf, ok := ret.Get(1).(func(model.SharedChannelFilterOpts) error); ok {
|
||||
r1 = rf(opts)
|
||||
} else {
|
||||
@@ -128,6 +143,10 @@ func (_m *SharedChannelStore) GetAttachment(fileId string, remoteId string) (*mo
|
||||
ret := _m.Called(fileId, remoteId)
|
||||
|
||||
var r0 *model.SharedChannelAttachment
|
||||
var r1 error
|
||||
if rf, ok := ret.Get(0).(func(string, string) (*model.SharedChannelAttachment, error)); ok {
|
||||
return rf(fileId, remoteId)
|
||||
}
|
||||
if rf, ok := ret.Get(0).(func(string, string) *model.SharedChannelAttachment); ok {
|
||||
r0 = rf(fileId, remoteId)
|
||||
} else {
|
||||
@@ -136,7 +155,6 @@ func (_m *SharedChannelStore) GetAttachment(fileId string, remoteId string) (*mo
|
||||
}
|
||||
}
|
||||
|
||||
var r1 error
|
||||
if rf, ok := ret.Get(1).(func(string, string) error); ok {
|
||||
r1 = rf(fileId, remoteId)
|
||||
} else {
|
||||
@@ -151,6 +169,10 @@ func (_m *SharedChannelStore) GetRemote(id string) (*model.SharedChannelRemote,
|
||||
ret := _m.Called(id)
|
||||
|
||||
var r0 *model.SharedChannelRemote
|
||||
var r1 error
|
||||
if rf, ok := ret.Get(0).(func(string) (*model.SharedChannelRemote, error)); ok {
|
||||
return rf(id)
|
||||
}
|
||||
if rf, ok := ret.Get(0).(func(string) *model.SharedChannelRemote); ok {
|
||||
r0 = rf(id)
|
||||
} else {
|
||||
@@ -159,7 +181,6 @@ func (_m *SharedChannelStore) GetRemote(id string) (*model.SharedChannelRemote,
|
||||
}
|
||||
}
|
||||
|
||||
var r1 error
|
||||
if rf, ok := ret.Get(1).(func(string) error); ok {
|
||||
r1 = rf(id)
|
||||
} else {
|
||||
@@ -174,6 +195,10 @@ func (_m *SharedChannelStore) GetRemoteByIds(channelId string, remoteId string)
|
||||
ret := _m.Called(channelId, remoteId)
|
||||
|
||||
var r0 *model.SharedChannelRemote
|
||||
var r1 error
|
||||
if rf, ok := ret.Get(0).(func(string, string) (*model.SharedChannelRemote, error)); ok {
|
||||
return rf(channelId, remoteId)
|
||||
}
|
||||
if rf, ok := ret.Get(0).(func(string, string) *model.SharedChannelRemote); ok {
|
||||
r0 = rf(channelId, remoteId)
|
||||
} else {
|
||||
@@ -182,7 +207,6 @@ func (_m *SharedChannelStore) GetRemoteByIds(channelId string, remoteId string)
|
||||
}
|
||||
}
|
||||
|
||||
var r1 error
|
||||
if rf, ok := ret.Get(1).(func(string, string) error); ok {
|
||||
r1 = rf(channelId, remoteId)
|
||||
} else {
|
||||
@@ -197,6 +221,10 @@ func (_m *SharedChannelStore) GetRemoteForUser(remoteId string, userId string) (
|
||||
ret := _m.Called(remoteId, userId)
|
||||
|
||||
var r0 *model.RemoteCluster
|
||||
var r1 error
|
||||
if rf, ok := ret.Get(0).(func(string, string) (*model.RemoteCluster, error)); ok {
|
||||
return rf(remoteId, userId)
|
||||
}
|
||||
if rf, ok := ret.Get(0).(func(string, string) *model.RemoteCluster); ok {
|
||||
r0 = rf(remoteId, userId)
|
||||
} else {
|
||||
@@ -205,7 +233,6 @@ func (_m *SharedChannelStore) GetRemoteForUser(remoteId string, userId string) (
|
||||
}
|
||||
}
|
||||
|
||||
var r1 error
|
||||
if rf, ok := ret.Get(1).(func(string, string) error); ok {
|
||||
r1 = rf(remoteId, userId)
|
||||
} else {
|
||||
@@ -220,6 +247,10 @@ func (_m *SharedChannelStore) GetRemotes(opts model.SharedChannelRemoteFilterOpt
|
||||
ret := _m.Called(opts)
|
||||
|
||||
var r0 []*model.SharedChannelRemote
|
||||
var r1 error
|
||||
if rf, ok := ret.Get(0).(func(model.SharedChannelRemoteFilterOpts) ([]*model.SharedChannelRemote, error)); ok {
|
||||
return rf(opts)
|
||||
}
|
||||
if rf, ok := ret.Get(0).(func(model.SharedChannelRemoteFilterOpts) []*model.SharedChannelRemote); ok {
|
||||
r0 = rf(opts)
|
||||
} else {
|
||||
@@ -228,7 +259,6 @@ func (_m *SharedChannelStore) GetRemotes(opts model.SharedChannelRemoteFilterOpt
|
||||
}
|
||||
}
|
||||
|
||||
var r1 error
|
||||
if rf, ok := ret.Get(1).(func(model.SharedChannelRemoteFilterOpts) error); ok {
|
||||
r1 = rf(opts)
|
||||
} else {
|
||||
@@ -243,6 +273,10 @@ func (_m *SharedChannelStore) GetRemotesStatus(channelId string) ([]*model.Share
|
||||
ret := _m.Called(channelId)
|
||||
|
||||
var r0 []*model.SharedChannelRemoteStatus
|
||||
var r1 error
|
||||
if rf, ok := ret.Get(0).(func(string) ([]*model.SharedChannelRemoteStatus, error)); ok {
|
||||
return rf(channelId)
|
||||
}
|
||||
if rf, ok := ret.Get(0).(func(string) []*model.SharedChannelRemoteStatus); ok {
|
||||
r0 = rf(channelId)
|
||||
} else {
|
||||
@@ -251,7 +285,6 @@ func (_m *SharedChannelStore) GetRemotesStatus(channelId string) ([]*model.Share
|
||||
}
|
||||
}
|
||||
|
||||
var r1 error
|
||||
if rf, ok := ret.Get(1).(func(string) error); ok {
|
||||
r1 = rf(channelId)
|
||||
} else {
|
||||
@@ -266,6 +299,10 @@ func (_m *SharedChannelStore) GetSingleUser(userID string, channelID string, rem
|
||||
ret := _m.Called(userID, channelID, remoteID)
|
||||
|
||||
var r0 *model.SharedChannelUser
|
||||
var r1 error
|
||||
if rf, ok := ret.Get(0).(func(string, string, string) (*model.SharedChannelUser, error)); ok {
|
||||
return rf(userID, channelID, remoteID)
|
||||
}
|
||||
if rf, ok := ret.Get(0).(func(string, string, string) *model.SharedChannelUser); ok {
|
||||
r0 = rf(userID, channelID, remoteID)
|
||||
} else {
|
||||
@@ -274,7 +311,6 @@ func (_m *SharedChannelStore) GetSingleUser(userID string, channelID string, rem
|
||||
}
|
||||
}
|
||||
|
||||
var r1 error
|
||||
if rf, ok := ret.Get(1).(func(string, string, string) error); ok {
|
||||
r1 = rf(userID, channelID, remoteID)
|
||||
} else {
|
||||
@@ -289,6 +325,10 @@ func (_m *SharedChannelStore) GetUsersForSync(filter model.GetUsersForSyncFilter
|
||||
ret := _m.Called(filter)
|
||||
|
||||
var r0 []*model.User
|
||||
var r1 error
|
||||
if rf, ok := ret.Get(0).(func(model.GetUsersForSyncFilter) ([]*model.User, error)); ok {
|
||||
return rf(filter)
|
||||
}
|
||||
if rf, ok := ret.Get(0).(func(model.GetUsersForSyncFilter) []*model.User); ok {
|
||||
r0 = rf(filter)
|
||||
} else {
|
||||
@@ -297,7 +337,6 @@ func (_m *SharedChannelStore) GetUsersForSync(filter model.GetUsersForSyncFilter
|
||||
}
|
||||
}
|
||||
|
||||
var r1 error
|
||||
if rf, ok := ret.Get(1).(func(model.GetUsersForSyncFilter) error); ok {
|
||||
r1 = rf(filter)
|
||||
} else {
|
||||
@@ -312,6 +351,10 @@ func (_m *SharedChannelStore) GetUsersForUser(userID string) ([]*model.SharedCha
|
||||
ret := _m.Called(userID)
|
||||
|
||||
var r0 []*model.SharedChannelUser
|
||||
var r1 error
|
||||
if rf, ok := ret.Get(0).(func(string) ([]*model.SharedChannelUser, error)); ok {
|
||||
return rf(userID)
|
||||
}
|
||||
if rf, ok := ret.Get(0).(func(string) []*model.SharedChannelUser); ok {
|
||||
r0 = rf(userID)
|
||||
} else {
|
||||
@@ -320,7 +363,6 @@ func (_m *SharedChannelStore) GetUsersForUser(userID string) ([]*model.SharedCha
|
||||
}
|
||||
}
|
||||
|
||||
var r1 error
|
||||
if rf, ok := ret.Get(1).(func(string) error); ok {
|
||||
r1 = rf(userID)
|
||||
} else {
|
||||
@@ -335,13 +377,16 @@ func (_m *SharedChannelStore) HasChannel(channelID string) (bool, error) {
|
||||
ret := _m.Called(channelID)
|
||||
|
||||
var r0 bool
|
||||
var r1 error
|
||||
if rf, ok := ret.Get(0).(func(string) (bool, error)); ok {
|
||||
return rf(channelID)
|
||||
}
|
||||
if rf, ok := ret.Get(0).(func(string) bool); ok {
|
||||
r0 = rf(channelID)
|
||||
} else {
|
||||
r0 = ret.Get(0).(bool)
|
||||
}
|
||||
|
||||
var r1 error
|
||||
if rf, ok := ret.Get(1).(func(string) error); ok {
|
||||
r1 = rf(channelID)
|
||||
} else {
|
||||
@@ -356,13 +401,16 @@ func (_m *SharedChannelStore) HasRemote(channelID string, remoteId string) (bool
|
||||
ret := _m.Called(channelID, remoteId)
|
||||
|
||||
var r0 bool
|
||||
var r1 error
|
||||
if rf, ok := ret.Get(0).(func(string, string) (bool, error)); ok {
|
||||
return rf(channelID, remoteId)
|
||||
}
|
||||
if rf, ok := ret.Get(0).(func(string, string) bool); ok {
|
||||
r0 = rf(channelID, remoteId)
|
||||
} else {
|
||||
r0 = ret.Get(0).(bool)
|
||||
}
|
||||
|
||||
var r1 error
|
||||
if rf, ok := ret.Get(1).(func(string, string) error); ok {
|
||||
r1 = rf(channelID, remoteId)
|
||||
} else {
|
||||
@@ -377,6 +425,10 @@ func (_m *SharedChannelStore) Save(sc *model.SharedChannel) (*model.SharedChanne
|
||||
ret := _m.Called(sc)
|
||||
|
||||
var r0 *model.SharedChannel
|
||||
var r1 error
|
||||
if rf, ok := ret.Get(0).(func(*model.SharedChannel) (*model.SharedChannel, error)); ok {
|
||||
return rf(sc)
|
||||
}
|
||||
if rf, ok := ret.Get(0).(func(*model.SharedChannel) *model.SharedChannel); ok {
|
||||
r0 = rf(sc)
|
||||
} else {
|
||||
@@ -385,7 +437,6 @@ func (_m *SharedChannelStore) Save(sc *model.SharedChannel) (*model.SharedChanne
|
||||
}
|
||||
}
|
||||
|
||||
var r1 error
|
||||
if rf, ok := ret.Get(1).(func(*model.SharedChannel) error); ok {
|
||||
r1 = rf(sc)
|
||||
} else {
|
||||
@@ -400,6 +451,10 @@ func (_m *SharedChannelStore) SaveAttachment(remote *model.SharedChannelAttachme
|
||||
ret := _m.Called(remote)
|
||||
|
||||
var r0 *model.SharedChannelAttachment
|
||||
var r1 error
|
||||
if rf, ok := ret.Get(0).(func(*model.SharedChannelAttachment) (*model.SharedChannelAttachment, error)); ok {
|
||||
return rf(remote)
|
||||
}
|
||||
if rf, ok := ret.Get(0).(func(*model.SharedChannelAttachment) *model.SharedChannelAttachment); ok {
|
||||
r0 = rf(remote)
|
||||
} else {
|
||||
@@ -408,7 +463,6 @@ func (_m *SharedChannelStore) SaveAttachment(remote *model.SharedChannelAttachme
|
||||
}
|
||||
}
|
||||
|
||||
var r1 error
|
||||
if rf, ok := ret.Get(1).(func(*model.SharedChannelAttachment) error); ok {
|
||||
r1 = rf(remote)
|
||||
} else {
|
||||
@@ -423,6 +477,10 @@ func (_m *SharedChannelStore) SaveRemote(remote *model.SharedChannelRemote) (*mo
|
||||
ret := _m.Called(remote)
|
||||
|
||||
var r0 *model.SharedChannelRemote
|
||||
var r1 error
|
||||
if rf, ok := ret.Get(0).(func(*model.SharedChannelRemote) (*model.SharedChannelRemote, error)); ok {
|
||||
return rf(remote)
|
||||
}
|
||||
if rf, ok := ret.Get(0).(func(*model.SharedChannelRemote) *model.SharedChannelRemote); ok {
|
||||
r0 = rf(remote)
|
||||
} else {
|
||||
@@ -431,7 +489,6 @@ func (_m *SharedChannelStore) SaveRemote(remote *model.SharedChannelRemote) (*mo
|
||||
}
|
||||
}
|
||||
|
||||
var r1 error
|
||||
if rf, ok := ret.Get(1).(func(*model.SharedChannelRemote) error); ok {
|
||||
r1 = rf(remote)
|
||||
} else {
|
||||
@@ -446,6 +503,10 @@ func (_m *SharedChannelStore) SaveUser(remote *model.SharedChannelUser) (*model.
|
||||
ret := _m.Called(remote)
|
||||
|
||||
var r0 *model.SharedChannelUser
|
||||
var r1 error
|
||||
if rf, ok := ret.Get(0).(func(*model.SharedChannelUser) (*model.SharedChannelUser, error)); ok {
|
||||
return rf(remote)
|
||||
}
|
||||
if rf, ok := ret.Get(0).(func(*model.SharedChannelUser) *model.SharedChannelUser); ok {
|
||||
r0 = rf(remote)
|
||||
} else {
|
||||
@@ -454,7 +515,6 @@ func (_m *SharedChannelStore) SaveUser(remote *model.SharedChannelUser) (*model.
|
||||
}
|
||||
}
|
||||
|
||||
var r1 error
|
||||
if rf, ok := ret.Get(1).(func(*model.SharedChannelUser) error); ok {
|
||||
r1 = rf(remote)
|
||||
} else {
|
||||
@@ -469,6 +529,10 @@ func (_m *SharedChannelStore) Update(sc *model.SharedChannel) (*model.SharedChan
|
||||
ret := _m.Called(sc)
|
||||
|
||||
var r0 *model.SharedChannel
|
||||
var r1 error
|
||||
if rf, ok := ret.Get(0).(func(*model.SharedChannel) (*model.SharedChannel, error)); ok {
|
||||
return rf(sc)
|
||||
}
|
||||
if rf, ok := ret.Get(0).(func(*model.SharedChannel) *model.SharedChannel); ok {
|
||||
r0 = rf(sc)
|
||||
} else {
|
||||
@@ -477,7 +541,6 @@ func (_m *SharedChannelStore) Update(sc *model.SharedChannel) (*model.SharedChan
|
||||
}
|
||||
}
|
||||
|
||||
var r1 error
|
||||
if rf, ok := ret.Get(1).(func(*model.SharedChannel) error); ok {
|
||||
r1 = rf(sc)
|
||||
} else {
|
||||
@@ -506,6 +569,10 @@ func (_m *SharedChannelStore) UpdateRemote(remote *model.SharedChannelRemote) (*
|
||||
ret := _m.Called(remote)
|
||||
|
||||
var r0 *model.SharedChannelRemote
|
||||
var r1 error
|
||||
if rf, ok := ret.Get(0).(func(*model.SharedChannelRemote) (*model.SharedChannelRemote, error)); ok {
|
||||
return rf(remote)
|
||||
}
|
||||
if rf, ok := ret.Get(0).(func(*model.SharedChannelRemote) *model.SharedChannelRemote); ok {
|
||||
r0 = rf(remote)
|
||||
} else {
|
||||
@@ -514,7 +581,6 @@ func (_m *SharedChannelStore) UpdateRemote(remote *model.SharedChannelRemote) (*
|
||||
}
|
||||
}
|
||||
|
||||
var r1 error
|
||||
if rf, ok := ret.Get(1).(func(*model.SharedChannelRemote) error); ok {
|
||||
r1 = rf(remote)
|
||||
} else {
|
||||
@@ -557,13 +623,16 @@ func (_m *SharedChannelStore) UpsertAttachment(remote *model.SharedChannelAttach
|
||||
ret := _m.Called(remote)
|
||||
|
||||
var r0 string
|
||||
var r1 error
|
||||
if rf, ok := ret.Get(0).(func(*model.SharedChannelAttachment) (string, error)); ok {
|
||||
return rf(remote)
|
||||
}
|
||||
if rf, ok := ret.Get(0).(func(*model.SharedChannelAttachment) string); ok {
|
||||
r0 = rf(remote)
|
||||
} else {
|
||||
r0 = ret.Get(0).(string)
|
||||
}
|
||||
|
||||
var r1 error
|
||||
if rf, ok := ret.Get(1).(func(*model.SharedChannelAttachment) error); ok {
|
||||
r1 = rf(remote)
|
||||
} else {
|
||||
@@ -572,3 +641,18 @@ func (_m *SharedChannelStore) UpsertAttachment(remote *model.SharedChannelAttach
|
||||
|
||||
return r0, r1
|
||||
}
|
||||
|
||||
type mockConstructorTestingTNewSharedChannelStore interface {
|
||||
mock.TestingT
|
||||
Cleanup(func())
|
||||
}
|
||||
|
||||
// NewSharedChannelStore creates a new instance of SharedChannelStore. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations.
|
||||
func NewSharedChannelStore(t mockConstructorTestingTNewSharedChannelStore) *SharedChannelStore {
|
||||
mock := &SharedChannelStore{}
|
||||
mock.Mock.Test(t)
|
||||
|
||||
t.Cleanup(func() { mock.AssertExpectations(t) })
|
||||
|
||||
return mock
|
||||
}
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
// Code generated by mockery v2.10.4. DO NOT EDIT.
|
||||
// Code generated by mockery v2.23.2. DO NOT EDIT.
|
||||
|
||||
// Regenerate this file using `make store-mocks`.
|
||||
|
||||
@@ -19,6 +19,10 @@ func (_m *StatusStore) Get(userID string) (*model.Status, error) {
|
||||
ret := _m.Called(userID)
|
||||
|
||||
var r0 *model.Status
|
||||
var r1 error
|
||||
if rf, ok := ret.Get(0).(func(string) (*model.Status, error)); ok {
|
||||
return rf(userID)
|
||||
}
|
||||
if rf, ok := ret.Get(0).(func(string) *model.Status); ok {
|
||||
r0 = rf(userID)
|
||||
} else {
|
||||
@@ -27,7 +31,6 @@ func (_m *StatusStore) Get(userID string) (*model.Status, error) {
|
||||
}
|
||||
}
|
||||
|
||||
var r1 error
|
||||
if rf, ok := ret.Get(1).(func(string) error); ok {
|
||||
r1 = rf(userID)
|
||||
} else {
|
||||
@@ -42,6 +45,10 @@ func (_m *StatusStore) GetByIds(userIds []string) ([]*model.Status, error) {
|
||||
ret := _m.Called(userIds)
|
||||
|
||||
var r0 []*model.Status
|
||||
var r1 error
|
||||
if rf, ok := ret.Get(0).(func([]string) ([]*model.Status, error)); ok {
|
||||
return rf(userIds)
|
||||
}
|
||||
if rf, ok := ret.Get(0).(func([]string) []*model.Status); ok {
|
||||
r0 = rf(userIds)
|
||||
} else {
|
||||
@@ -50,7 +57,6 @@ func (_m *StatusStore) GetByIds(userIds []string) ([]*model.Status, error) {
|
||||
}
|
||||
}
|
||||
|
||||
var r1 error
|
||||
if rf, ok := ret.Get(1).(func([]string) error); ok {
|
||||
r1 = rf(userIds)
|
||||
} else {
|
||||
@@ -65,13 +71,16 @@ func (_m *StatusStore) GetTotalActiveUsersCount() (int64, error) {
|
||||
ret := _m.Called()
|
||||
|
||||
var r0 int64
|
||||
var r1 error
|
||||
if rf, ok := ret.Get(0).(func() (int64, error)); ok {
|
||||
return rf()
|
||||
}
|
||||
if rf, ok := ret.Get(0).(func() int64); ok {
|
||||
r0 = rf()
|
||||
} else {
|
||||
r0 = ret.Get(0).(int64)
|
||||
}
|
||||
|
||||
var r1 error
|
||||
if rf, ok := ret.Get(1).(func() error); ok {
|
||||
r1 = rf()
|
||||
} else {
|
||||
@@ -114,6 +123,10 @@ func (_m *StatusStore) UpdateExpiredDNDStatuses() ([]*model.Status, error) {
|
||||
ret := _m.Called()
|
||||
|
||||
var r0 []*model.Status
|
||||
var r1 error
|
||||
if rf, ok := ret.Get(0).(func() ([]*model.Status, error)); ok {
|
||||
return rf()
|
||||
}
|
||||
if rf, ok := ret.Get(0).(func() []*model.Status); ok {
|
||||
r0 = rf()
|
||||
} else {
|
||||
@@ -122,7 +135,6 @@ func (_m *StatusStore) UpdateExpiredDNDStatuses() ([]*model.Status, error) {
|
||||
}
|
||||
}
|
||||
|
||||
var r1 error
|
||||
if rf, ok := ret.Get(1).(func() error); ok {
|
||||
r1 = rf()
|
||||
} else {
|
||||
@@ -145,3 +157,18 @@ func (_m *StatusStore) UpdateLastActivityAt(userID string, lastActivityAt int64)
|
||||
|
||||
return r0
|
||||
}
|
||||
|
||||
type mockConstructorTestingTNewStatusStore interface {
|
||||
mock.TestingT
|
||||
Cleanup(func())
|
||||
}
|
||||
|
||||
// NewStatusStore creates a new instance of StatusStore. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations.
|
||||
func NewStatusStore(t mockConstructorTestingTNewStatusStore) *StatusStore {
|
||||
mock := &StatusStore{}
|
||||
mock.Mock.Test(t)
|
||||
|
||||
t.Cleanup(func() { mock.AssertExpectations(t) })
|
||||
|
||||
return mock
|
||||
}
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
// Code generated by mockery v2.10.4. DO NOT EDIT.
|
||||
// Code generated by mockery v2.23.2. DO NOT EDIT.
|
||||
|
||||
// Regenerate this file using `make store-mocks`.
|
||||
|
||||
@@ -245,6 +245,10 @@ func (_m *Store) GetAppliedMigrations() ([]model.AppliedMigration, error) {
|
||||
ret := _m.Called()
|
||||
|
||||
var r0 []model.AppliedMigration
|
||||
var r1 error
|
||||
if rf, ok := ret.Get(0).(func() ([]model.AppliedMigration, error)); ok {
|
||||
return rf()
|
||||
}
|
||||
if rf, ok := ret.Get(0).(func() []model.AppliedMigration); ok {
|
||||
r0 = rf()
|
||||
} else {
|
||||
@@ -253,7 +257,6 @@ func (_m *Store) GetAppliedMigrations() ([]model.AppliedMigration, error) {
|
||||
}
|
||||
}
|
||||
|
||||
var r1 error
|
||||
if rf, ok := ret.Get(1).(func() error); ok {
|
||||
r1 = rf()
|
||||
} else {
|
||||
@@ -268,13 +271,16 @@ func (_m *Store) GetDBSchemaVersion() (int, error) {
|
||||
ret := _m.Called()
|
||||
|
||||
var r0 int
|
||||
var r1 error
|
||||
if rf, ok := ret.Get(0).(func() (int, error)); ok {
|
||||
return rf()
|
||||
}
|
||||
if rf, ok := ret.Get(0).(func() int); ok {
|
||||
r0 = rf()
|
||||
} else {
|
||||
r0 = ret.Get(0).(int)
|
||||
}
|
||||
|
||||
var r1 error
|
||||
if rf, ok := ret.Get(1).(func() error); ok {
|
||||
r1 = rf()
|
||||
} else {
|
||||
@@ -289,13 +295,16 @@ func (_m *Store) GetDbVersion(numerical bool) (string, error) {
|
||||
ret := _m.Called(numerical)
|
||||
|
||||
var r0 string
|
||||
var r1 error
|
||||
if rf, ok := ret.Get(0).(func(bool) (string, error)); ok {
|
||||
return rf(numerical)
|
||||
}
|
||||
if rf, ok := ret.Get(0).(func(bool) string); ok {
|
||||
r0 = rf(numerical)
|
||||
} else {
|
||||
r0 = ret.Get(0).(string)
|
||||
}
|
||||
|
||||
var r1 error
|
||||
if rf, ok := ret.Get(1).(func(bool) error); ok {
|
||||
r1 = rf(numerical)
|
||||
} else {
|
||||
@@ -943,3 +952,18 @@ func (_m *Store) Webhook() store.WebhookStore {
|
||||
|
||||
return r0
|
||||
}
|
||||
|
||||
type mockConstructorTestingTNewStore interface {
|
||||
mock.TestingT
|
||||
Cleanup(func())
|
||||
}
|
||||
|
||||
// NewStore creates a new instance of Store. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations.
|
||||
func NewStore(t mockConstructorTestingTNewStore) *Store {
|
||||
mock := &Store{}
|
||||
mock.Mock.Test(t)
|
||||
|
||||
t.Cleanup(func() { mock.AssertExpectations(t) })
|
||||
|
||||
return mock
|
||||
}
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
// Code generated by mockery v2.10.4. DO NOT EDIT.
|
||||
// Code generated by mockery v2.23.2. DO NOT EDIT.
|
||||
|
||||
// Regenerate this file using `make store-mocks`.
|
||||
|
||||
@@ -19,6 +19,10 @@ func (_m *SystemStore) Get() (model.StringMap, error) {
|
||||
ret := _m.Called()
|
||||
|
||||
var r0 model.StringMap
|
||||
var r1 error
|
||||
if rf, ok := ret.Get(0).(func() (model.StringMap, error)); ok {
|
||||
return rf()
|
||||
}
|
||||
if rf, ok := ret.Get(0).(func() model.StringMap); ok {
|
||||
r0 = rf()
|
||||
} else {
|
||||
@@ -27,7 +31,6 @@ func (_m *SystemStore) Get() (model.StringMap, error) {
|
||||
}
|
||||
}
|
||||
|
||||
var r1 error
|
||||
if rf, ok := ret.Get(1).(func() error); ok {
|
||||
r1 = rf()
|
||||
} else {
|
||||
@@ -42,6 +45,10 @@ func (_m *SystemStore) GetByName(name string) (*model.System, error) {
|
||||
ret := _m.Called(name)
|
||||
|
||||
var r0 *model.System
|
||||
var r1 error
|
||||
if rf, ok := ret.Get(0).(func(string) (*model.System, error)); ok {
|
||||
return rf(name)
|
||||
}
|
||||
if rf, ok := ret.Get(0).(func(string) *model.System); ok {
|
||||
r0 = rf(name)
|
||||
} else {
|
||||
@@ -50,7 +57,6 @@ func (_m *SystemStore) GetByName(name string) (*model.System, error) {
|
||||
}
|
||||
}
|
||||
|
||||
var r1 error
|
||||
if rf, ok := ret.Get(1).(func(string) error); ok {
|
||||
r1 = rf(name)
|
||||
} else {
|
||||
@@ -65,6 +71,10 @@ func (_m *SystemStore) InsertIfExists(system *model.System) (*model.System, erro
|
||||
ret := _m.Called(system)
|
||||
|
||||
var r0 *model.System
|
||||
var r1 error
|
||||
if rf, ok := ret.Get(0).(func(*model.System) (*model.System, error)); ok {
|
||||
return rf(system)
|
||||
}
|
||||
if rf, ok := ret.Get(0).(func(*model.System) *model.System); ok {
|
||||
r0 = rf(system)
|
||||
} else {
|
||||
@@ -73,7 +83,6 @@ func (_m *SystemStore) InsertIfExists(system *model.System) (*model.System, erro
|
||||
}
|
||||
}
|
||||
|
||||
var r1 error
|
||||
if rf, ok := ret.Get(1).(func(*model.System) error); ok {
|
||||
r1 = rf(system)
|
||||
} else {
|
||||
@@ -88,6 +97,10 @@ func (_m *SystemStore) PermanentDeleteByName(name string) (*model.System, error)
|
||||
ret := _m.Called(name)
|
||||
|
||||
var r0 *model.System
|
||||
var r1 error
|
||||
if rf, ok := ret.Get(0).(func(string) (*model.System, error)); ok {
|
||||
return rf(name)
|
||||
}
|
||||
if rf, ok := ret.Get(0).(func(string) *model.System); ok {
|
||||
r0 = rf(name)
|
||||
} else {
|
||||
@@ -96,7 +109,6 @@ func (_m *SystemStore) PermanentDeleteByName(name string) (*model.System, error)
|
||||
}
|
||||
}
|
||||
|
||||
var r1 error
|
||||
if rf, ok := ret.Get(1).(func(string) error); ok {
|
||||
r1 = rf(name)
|
||||
} else {
|
||||
@@ -161,3 +173,18 @@ func (_m *SystemStore) Update(system *model.System) error {
|
||||
|
||||
return r0
|
||||
}
|
||||
|
||||
type mockConstructorTestingTNewSystemStore interface {
|
||||
mock.TestingT
|
||||
Cleanup(func())
|
||||
}
|
||||
|
||||
// NewSystemStore creates a new instance of SystemStore. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations.
|
||||
func NewSystemStore(t mockConstructorTestingTNewSystemStore) *SystemStore {
|
||||
mock := &SystemStore{}
|
||||
mock.Mock.Test(t)
|
||||
|
||||
t.Cleanup(func() { mock.AssertExpectations(t) })
|
||||
|
||||
return mock
|
||||
}
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
// Code generated by mockery v2.10.4. DO NOT EDIT.
|
||||
// Code generated by mockery v2.23.2. DO NOT EDIT.
|
||||
|
||||
// Regenerate this file using `make store-mocks`.
|
||||
|
||||
@@ -21,13 +21,16 @@ func (_m *TeamStore) AnalyticsGetTeamCountForScheme(schemeID string) (int64, err
|
||||
ret := _m.Called(schemeID)
|
||||
|
||||
var r0 int64
|
||||
var r1 error
|
||||
if rf, ok := ret.Get(0).(func(string) (int64, error)); ok {
|
||||
return rf(schemeID)
|
||||
}
|
||||
if rf, ok := ret.Get(0).(func(string) int64); ok {
|
||||
r0 = rf(schemeID)
|
||||
} else {
|
||||
r0 = ret.Get(0).(int64)
|
||||
}
|
||||
|
||||
var r1 error
|
||||
if rf, ok := ret.Get(1).(func(string) error); ok {
|
||||
r1 = rf(schemeID)
|
||||
} else {
|
||||
@@ -42,13 +45,16 @@ func (_m *TeamStore) AnalyticsTeamCount(opts *model.TeamSearch) (int64, error) {
|
||||
ret := _m.Called(opts)
|
||||
|
||||
var r0 int64
|
||||
var r1 error
|
||||
if rf, ok := ret.Get(0).(func(*model.TeamSearch) (int64, error)); ok {
|
||||
return rf(opts)
|
||||
}
|
||||
if rf, ok := ret.Get(0).(func(*model.TeamSearch) int64); ok {
|
||||
r0 = rf(opts)
|
||||
} else {
|
||||
r0 = ret.Get(0).(int64)
|
||||
}
|
||||
|
||||
var r1 error
|
||||
if rf, ok := ret.Get(1).(func(*model.TeamSearch) error); ok {
|
||||
r1 = rf(opts)
|
||||
} else {
|
||||
@@ -82,6 +88,10 @@ func (_m *TeamStore) Get(id string) (*model.Team, error) {
|
||||
ret := _m.Called(id)
|
||||
|
||||
var r0 *model.Team
|
||||
var r1 error
|
||||
if rf, ok := ret.Get(0).(func(string) (*model.Team, error)); ok {
|
||||
return rf(id)
|
||||
}
|
||||
if rf, ok := ret.Get(0).(func(string) *model.Team); ok {
|
||||
r0 = rf(id)
|
||||
} else {
|
||||
@@ -90,7 +100,6 @@ func (_m *TeamStore) Get(id string) (*model.Team, error) {
|
||||
}
|
||||
}
|
||||
|
||||
var r1 error
|
||||
if rf, ok := ret.Get(1).(func(string) error); ok {
|
||||
r1 = rf(id)
|
||||
} else {
|
||||
@@ -105,13 +114,16 @@ func (_m *TeamStore) GetActiveMemberCount(teamID string, restrictions *model.Vie
|
||||
ret := _m.Called(teamID, restrictions)
|
||||
|
||||
var r0 int64
|
||||
var r1 error
|
||||
if rf, ok := ret.Get(0).(func(string, *model.ViewUsersRestrictions) (int64, error)); ok {
|
||||
return rf(teamID, restrictions)
|
||||
}
|
||||
if rf, ok := ret.Get(0).(func(string, *model.ViewUsersRestrictions) int64); ok {
|
||||
r0 = rf(teamID, restrictions)
|
||||
} else {
|
||||
r0 = ret.Get(0).(int64)
|
||||
}
|
||||
|
||||
var r1 error
|
||||
if rf, ok := ret.Get(1).(func(string, *model.ViewUsersRestrictions) error); ok {
|
||||
r1 = rf(teamID, restrictions)
|
||||
} else {
|
||||
@@ -126,6 +138,10 @@ func (_m *TeamStore) GetAll() ([]*model.Team, error) {
|
||||
ret := _m.Called()
|
||||
|
||||
var r0 []*model.Team
|
||||
var r1 error
|
||||
if rf, ok := ret.Get(0).(func() ([]*model.Team, error)); ok {
|
||||
return rf()
|
||||
}
|
||||
if rf, ok := ret.Get(0).(func() []*model.Team); ok {
|
||||
r0 = rf()
|
||||
} else {
|
||||
@@ -134,7 +150,6 @@ func (_m *TeamStore) GetAll() ([]*model.Team, error) {
|
||||
}
|
||||
}
|
||||
|
||||
var r1 error
|
||||
if rf, ok := ret.Get(1).(func() error); ok {
|
||||
r1 = rf()
|
||||
} else {
|
||||
@@ -149,6 +164,10 @@ func (_m *TeamStore) GetAllForExportAfter(limit int, afterID string) ([]*model.T
|
||||
ret := _m.Called(limit, afterID)
|
||||
|
||||
var r0 []*model.TeamForExport
|
||||
var r1 error
|
||||
if rf, ok := ret.Get(0).(func(int, string) ([]*model.TeamForExport, error)); ok {
|
||||
return rf(limit, afterID)
|
||||
}
|
||||
if rf, ok := ret.Get(0).(func(int, string) []*model.TeamForExport); ok {
|
||||
r0 = rf(limit, afterID)
|
||||
} else {
|
||||
@@ -157,7 +176,6 @@ func (_m *TeamStore) GetAllForExportAfter(limit int, afterID string) ([]*model.T
|
||||
}
|
||||
}
|
||||
|
||||
var r1 error
|
||||
if rf, ok := ret.Get(1).(func(int, string) error); ok {
|
||||
r1 = rf(limit, afterID)
|
||||
} else {
|
||||
@@ -172,6 +190,10 @@ func (_m *TeamStore) GetAllPage(offset int, limit int, opts *model.TeamSearch) (
|
||||
ret := _m.Called(offset, limit, opts)
|
||||
|
||||
var r0 []*model.Team
|
||||
var r1 error
|
||||
if rf, ok := ret.Get(0).(func(int, int, *model.TeamSearch) ([]*model.Team, error)); ok {
|
||||
return rf(offset, limit, opts)
|
||||
}
|
||||
if rf, ok := ret.Get(0).(func(int, int, *model.TeamSearch) []*model.Team); ok {
|
||||
r0 = rf(offset, limit, opts)
|
||||
} else {
|
||||
@@ -180,7 +202,6 @@ func (_m *TeamStore) GetAllPage(offset int, limit int, opts *model.TeamSearch) (
|
||||
}
|
||||
}
|
||||
|
||||
var r1 error
|
||||
if rf, ok := ret.Get(1).(func(int, int, *model.TeamSearch) error); ok {
|
||||
r1 = rf(offset, limit, opts)
|
||||
} else {
|
||||
@@ -195,6 +216,10 @@ func (_m *TeamStore) GetAllPrivateTeamListing() ([]*model.Team, error) {
|
||||
ret := _m.Called()
|
||||
|
||||
var r0 []*model.Team
|
||||
var r1 error
|
||||
if rf, ok := ret.Get(0).(func() ([]*model.Team, error)); ok {
|
||||
return rf()
|
||||
}
|
||||
if rf, ok := ret.Get(0).(func() []*model.Team); ok {
|
||||
r0 = rf()
|
||||
} else {
|
||||
@@ -203,7 +228,6 @@ func (_m *TeamStore) GetAllPrivateTeamListing() ([]*model.Team, error) {
|
||||
}
|
||||
}
|
||||
|
||||
var r1 error
|
||||
if rf, ok := ret.Get(1).(func() error); ok {
|
||||
r1 = rf()
|
||||
} else {
|
||||
@@ -218,6 +242,10 @@ func (_m *TeamStore) GetAllTeamListing() ([]*model.Team, error) {
|
||||
ret := _m.Called()
|
||||
|
||||
var r0 []*model.Team
|
||||
var r1 error
|
||||
if rf, ok := ret.Get(0).(func() ([]*model.Team, error)); ok {
|
||||
return rf()
|
||||
}
|
||||
if rf, ok := ret.Get(0).(func() []*model.Team); ok {
|
||||
r0 = rf()
|
||||
} else {
|
||||
@@ -226,7 +254,6 @@ func (_m *TeamStore) GetAllTeamListing() ([]*model.Team, error) {
|
||||
}
|
||||
}
|
||||
|
||||
var r1 error
|
||||
if rf, ok := ret.Get(1).(func() error); ok {
|
||||
r1 = rf()
|
||||
} else {
|
||||
@@ -241,6 +268,10 @@ func (_m *TeamStore) GetByEmptyInviteID() ([]*model.Team, error) {
|
||||
ret := _m.Called()
|
||||
|
||||
var r0 []*model.Team
|
||||
var r1 error
|
||||
if rf, ok := ret.Get(0).(func() ([]*model.Team, error)); ok {
|
||||
return rf()
|
||||
}
|
||||
if rf, ok := ret.Get(0).(func() []*model.Team); ok {
|
||||
r0 = rf()
|
||||
} else {
|
||||
@@ -249,7 +280,6 @@ func (_m *TeamStore) GetByEmptyInviteID() ([]*model.Team, error) {
|
||||
}
|
||||
}
|
||||
|
||||
var r1 error
|
||||
if rf, ok := ret.Get(1).(func() error); ok {
|
||||
r1 = rf()
|
||||
} else {
|
||||
@@ -264,6 +294,10 @@ func (_m *TeamStore) GetByInviteId(inviteID string) (*model.Team, error) {
|
||||
ret := _m.Called(inviteID)
|
||||
|
||||
var r0 *model.Team
|
||||
var r1 error
|
||||
if rf, ok := ret.Get(0).(func(string) (*model.Team, error)); ok {
|
||||
return rf(inviteID)
|
||||
}
|
||||
if rf, ok := ret.Get(0).(func(string) *model.Team); ok {
|
||||
r0 = rf(inviteID)
|
||||
} else {
|
||||
@@ -272,7 +306,6 @@ func (_m *TeamStore) GetByInviteId(inviteID string) (*model.Team, error) {
|
||||
}
|
||||
}
|
||||
|
||||
var r1 error
|
||||
if rf, ok := ret.Get(1).(func(string) error); ok {
|
||||
r1 = rf(inviteID)
|
||||
} else {
|
||||
@@ -287,6 +320,10 @@ func (_m *TeamStore) GetByName(name string) (*model.Team, error) {
|
||||
ret := _m.Called(name)
|
||||
|
||||
var r0 *model.Team
|
||||
var r1 error
|
||||
if rf, ok := ret.Get(0).(func(string) (*model.Team, error)); ok {
|
||||
return rf(name)
|
||||
}
|
||||
if rf, ok := ret.Get(0).(func(string) *model.Team); ok {
|
||||
r0 = rf(name)
|
||||
} else {
|
||||
@@ -295,7 +332,6 @@ func (_m *TeamStore) GetByName(name string) (*model.Team, error) {
|
||||
}
|
||||
}
|
||||
|
||||
var r1 error
|
||||
if rf, ok := ret.Get(1).(func(string) error); ok {
|
||||
r1 = rf(name)
|
||||
} else {
|
||||
@@ -310,6 +346,10 @@ func (_m *TeamStore) GetByNames(name []string) ([]*model.Team, error) {
|
||||
ret := _m.Called(name)
|
||||
|
||||
var r0 []*model.Team
|
||||
var r1 error
|
||||
if rf, ok := ret.Get(0).(func([]string) ([]*model.Team, error)); ok {
|
||||
return rf(name)
|
||||
}
|
||||
if rf, ok := ret.Get(0).(func([]string) []*model.Team); ok {
|
||||
r0 = rf(name)
|
||||
} else {
|
||||
@@ -318,7 +358,6 @@ func (_m *TeamStore) GetByNames(name []string) ([]*model.Team, error) {
|
||||
}
|
||||
}
|
||||
|
||||
var r1 error
|
||||
if rf, ok := ret.Get(1).(func([]string) error); ok {
|
||||
r1 = rf(name)
|
||||
} else {
|
||||
@@ -333,6 +372,10 @@ func (_m *TeamStore) GetChannelUnreadsForAllTeams(excludeTeamID string, userID s
|
||||
ret := _m.Called(excludeTeamID, userID)
|
||||
|
||||
var r0 []*model.ChannelUnread
|
||||
var r1 error
|
||||
if rf, ok := ret.Get(0).(func(string, string) ([]*model.ChannelUnread, error)); ok {
|
||||
return rf(excludeTeamID, userID)
|
||||
}
|
||||
if rf, ok := ret.Get(0).(func(string, string) []*model.ChannelUnread); ok {
|
||||
r0 = rf(excludeTeamID, userID)
|
||||
} else {
|
||||
@@ -341,7 +384,6 @@ func (_m *TeamStore) GetChannelUnreadsForAllTeams(excludeTeamID string, userID s
|
||||
}
|
||||
}
|
||||
|
||||
var r1 error
|
||||
if rf, ok := ret.Get(1).(func(string, string) error); ok {
|
||||
r1 = rf(excludeTeamID, userID)
|
||||
} else {
|
||||
@@ -356,6 +398,10 @@ func (_m *TeamStore) GetChannelUnreadsForTeam(teamID string, userID string) ([]*
|
||||
ret := _m.Called(teamID, userID)
|
||||
|
||||
var r0 []*model.ChannelUnread
|
||||
var r1 error
|
||||
if rf, ok := ret.Get(0).(func(string, string) ([]*model.ChannelUnread, error)); ok {
|
||||
return rf(teamID, userID)
|
||||
}
|
||||
if rf, ok := ret.Get(0).(func(string, string) []*model.ChannelUnread); ok {
|
||||
r0 = rf(teamID, userID)
|
||||
} else {
|
||||
@@ -364,7 +410,6 @@ func (_m *TeamStore) GetChannelUnreadsForTeam(teamID string, userID string) ([]*
|
||||
}
|
||||
}
|
||||
|
||||
var r1 error
|
||||
if rf, ok := ret.Get(1).(func(string, string) error); ok {
|
||||
r1 = rf(teamID, userID)
|
||||
} else {
|
||||
@@ -379,6 +424,10 @@ func (_m *TeamStore) GetCommonTeamIDsForTwoUsers(userID string, otherUserID stri
|
||||
ret := _m.Called(userID, otherUserID)
|
||||
|
||||
var r0 []string
|
||||
var r1 error
|
||||
if rf, ok := ret.Get(0).(func(string, string) ([]string, error)); ok {
|
||||
return rf(userID, otherUserID)
|
||||
}
|
||||
if rf, ok := ret.Get(0).(func(string, string) []string); ok {
|
||||
r0 = rf(userID, otherUserID)
|
||||
} else {
|
||||
@@ -387,7 +436,6 @@ func (_m *TeamStore) GetCommonTeamIDsForTwoUsers(userID string, otherUserID stri
|
||||
}
|
||||
}
|
||||
|
||||
var r1 error
|
||||
if rf, ok := ret.Get(1).(func(string, string) error); ok {
|
||||
r1 = rf(userID, otherUserID)
|
||||
} else {
|
||||
@@ -402,6 +450,10 @@ func (_m *TeamStore) GetMany(ids []string) ([]*model.Team, error) {
|
||||
ret := _m.Called(ids)
|
||||
|
||||
var r0 []*model.Team
|
||||
var r1 error
|
||||
if rf, ok := ret.Get(0).(func([]string) ([]*model.Team, error)); ok {
|
||||
return rf(ids)
|
||||
}
|
||||
if rf, ok := ret.Get(0).(func([]string) []*model.Team); ok {
|
||||
r0 = rf(ids)
|
||||
} else {
|
||||
@@ -410,7 +462,6 @@ func (_m *TeamStore) GetMany(ids []string) ([]*model.Team, error) {
|
||||
}
|
||||
}
|
||||
|
||||
var r1 error
|
||||
if rf, ok := ret.Get(1).(func([]string) error); ok {
|
||||
r1 = rf(ids)
|
||||
} else {
|
||||
@@ -425,6 +476,10 @@ func (_m *TeamStore) GetMember(ctx context.Context, teamID string, userID string
|
||||
ret := _m.Called(ctx, teamID, userID)
|
||||
|
||||
var r0 *model.TeamMember
|
||||
var r1 error
|
||||
if rf, ok := ret.Get(0).(func(context.Context, string, string) (*model.TeamMember, error)); ok {
|
||||
return rf(ctx, teamID, userID)
|
||||
}
|
||||
if rf, ok := ret.Get(0).(func(context.Context, string, string) *model.TeamMember); ok {
|
||||
r0 = rf(ctx, teamID, userID)
|
||||
} else {
|
||||
@@ -433,7 +488,6 @@ func (_m *TeamStore) GetMember(ctx context.Context, teamID string, userID string
|
||||
}
|
||||
}
|
||||
|
||||
var r1 error
|
||||
if rf, ok := ret.Get(1).(func(context.Context, string, string) error); ok {
|
||||
r1 = rf(ctx, teamID, userID)
|
||||
} else {
|
||||
@@ -448,6 +502,10 @@ func (_m *TeamStore) GetMembers(teamID string, offset int, limit int, teamMember
|
||||
ret := _m.Called(teamID, offset, limit, teamMembersGetOptions)
|
||||
|
||||
var r0 []*model.TeamMember
|
||||
var r1 error
|
||||
if rf, ok := ret.Get(0).(func(string, int, int, *model.TeamMembersGetOptions) ([]*model.TeamMember, error)); ok {
|
||||
return rf(teamID, offset, limit, teamMembersGetOptions)
|
||||
}
|
||||
if rf, ok := ret.Get(0).(func(string, int, int, *model.TeamMembersGetOptions) []*model.TeamMember); ok {
|
||||
r0 = rf(teamID, offset, limit, teamMembersGetOptions)
|
||||
} else {
|
||||
@@ -456,7 +514,6 @@ func (_m *TeamStore) GetMembers(teamID string, offset int, limit int, teamMember
|
||||
}
|
||||
}
|
||||
|
||||
var r1 error
|
||||
if rf, ok := ret.Get(1).(func(string, int, int, *model.TeamMembersGetOptions) error); ok {
|
||||
r1 = rf(teamID, offset, limit, teamMembersGetOptions)
|
||||
} else {
|
||||
@@ -471,6 +528,10 @@ func (_m *TeamStore) GetMembersByIds(teamID string, userIds []string, restrictio
|
||||
ret := _m.Called(teamID, userIds, restrictions)
|
||||
|
||||
var r0 []*model.TeamMember
|
||||
var r1 error
|
||||
if rf, ok := ret.Get(0).(func(string, []string, *model.ViewUsersRestrictions) ([]*model.TeamMember, error)); ok {
|
||||
return rf(teamID, userIds, restrictions)
|
||||
}
|
||||
if rf, ok := ret.Get(0).(func(string, []string, *model.ViewUsersRestrictions) []*model.TeamMember); ok {
|
||||
r0 = rf(teamID, userIds, restrictions)
|
||||
} else {
|
||||
@@ -479,7 +540,6 @@ func (_m *TeamStore) GetMembersByIds(teamID string, userIds []string, restrictio
|
||||
}
|
||||
}
|
||||
|
||||
var r1 error
|
||||
if rf, ok := ret.Get(1).(func(string, []string, *model.ViewUsersRestrictions) error); ok {
|
||||
r1 = rf(teamID, userIds, restrictions)
|
||||
} else {
|
||||
@@ -494,6 +554,11 @@ func (_m *TeamStore) GetNewTeamMembersSince(teamID string, since int64, offset i
|
||||
ret := _m.Called(teamID, since, offset, limit)
|
||||
|
||||
var r0 *model.NewTeamMembersList
|
||||
var r1 int64
|
||||
var r2 error
|
||||
if rf, ok := ret.Get(0).(func(string, int64, int, int) (*model.NewTeamMembersList, int64, error)); ok {
|
||||
return rf(teamID, since, offset, limit)
|
||||
}
|
||||
if rf, ok := ret.Get(0).(func(string, int64, int, int) *model.NewTeamMembersList); ok {
|
||||
r0 = rf(teamID, since, offset, limit)
|
||||
} else {
|
||||
@@ -502,14 +567,12 @@ func (_m *TeamStore) GetNewTeamMembersSince(teamID string, since int64, offset i
|
||||
}
|
||||
}
|
||||
|
||||
var r1 int64
|
||||
if rf, ok := ret.Get(1).(func(string, int64, int, int) int64); ok {
|
||||
r1 = rf(teamID, since, offset, limit)
|
||||
} else {
|
||||
r1 = ret.Get(1).(int64)
|
||||
}
|
||||
|
||||
var r2 error
|
||||
if rf, ok := ret.Get(2).(func(string, int64, int, int) error); ok {
|
||||
r2 = rf(teamID, since, offset, limit)
|
||||
} else {
|
||||
@@ -524,6 +587,10 @@ func (_m *TeamStore) GetTeamMembersForExport(userID string) ([]*model.TeamMember
|
||||
ret := _m.Called(userID)
|
||||
|
||||
var r0 []*model.TeamMemberForExport
|
||||
var r1 error
|
||||
if rf, ok := ret.Get(0).(func(string) ([]*model.TeamMemberForExport, error)); ok {
|
||||
return rf(userID)
|
||||
}
|
||||
if rf, ok := ret.Get(0).(func(string) []*model.TeamMemberForExport); ok {
|
||||
r0 = rf(userID)
|
||||
} else {
|
||||
@@ -532,7 +599,6 @@ func (_m *TeamStore) GetTeamMembersForExport(userID string) ([]*model.TeamMember
|
||||
}
|
||||
}
|
||||
|
||||
var r1 error
|
||||
if rf, ok := ret.Get(1).(func(string) error); ok {
|
||||
r1 = rf(userID)
|
||||
} else {
|
||||
@@ -547,6 +613,10 @@ func (_m *TeamStore) GetTeamsByScheme(schemeID string, offset int, limit int) ([
|
||||
ret := _m.Called(schemeID, offset, limit)
|
||||
|
||||
var r0 []*model.Team
|
||||
var r1 error
|
||||
if rf, ok := ret.Get(0).(func(string, int, int) ([]*model.Team, error)); ok {
|
||||
return rf(schemeID, offset, limit)
|
||||
}
|
||||
if rf, ok := ret.Get(0).(func(string, int, int) []*model.Team); ok {
|
||||
r0 = rf(schemeID, offset, limit)
|
||||
} else {
|
||||
@@ -555,7 +625,6 @@ func (_m *TeamStore) GetTeamsByScheme(schemeID string, offset int, limit int) ([
|
||||
}
|
||||
}
|
||||
|
||||
var r1 error
|
||||
if rf, ok := ret.Get(1).(func(string, int, int) error); ok {
|
||||
r1 = rf(schemeID, offset, limit)
|
||||
} else {
|
||||
@@ -570,6 +639,10 @@ func (_m *TeamStore) GetTeamsByUserId(userID string) ([]*model.Team, error) {
|
||||
ret := _m.Called(userID)
|
||||
|
||||
var r0 []*model.Team
|
||||
var r1 error
|
||||
if rf, ok := ret.Get(0).(func(string) ([]*model.Team, error)); ok {
|
||||
return rf(userID)
|
||||
}
|
||||
if rf, ok := ret.Get(0).(func(string) []*model.Team); ok {
|
||||
r0 = rf(userID)
|
||||
} else {
|
||||
@@ -578,7 +651,6 @@ func (_m *TeamStore) GetTeamsByUserId(userID string) ([]*model.Team, error) {
|
||||
}
|
||||
}
|
||||
|
||||
var r1 error
|
||||
if rf, ok := ret.Get(1).(func(string) error); ok {
|
||||
r1 = rf(userID)
|
||||
} else {
|
||||
@@ -593,6 +665,10 @@ func (_m *TeamStore) GetTeamsForUser(ctx context.Context, userID string, exclude
|
||||
ret := _m.Called(ctx, userID, excludeTeamID, includeDeleted)
|
||||
|
||||
var r0 []*model.TeamMember
|
||||
var r1 error
|
||||
if rf, ok := ret.Get(0).(func(context.Context, string, string, bool) ([]*model.TeamMember, error)); ok {
|
||||
return rf(ctx, userID, excludeTeamID, includeDeleted)
|
||||
}
|
||||
if rf, ok := ret.Get(0).(func(context.Context, string, string, bool) []*model.TeamMember); ok {
|
||||
r0 = rf(ctx, userID, excludeTeamID, includeDeleted)
|
||||
} else {
|
||||
@@ -601,7 +677,6 @@ func (_m *TeamStore) GetTeamsForUser(ctx context.Context, userID string, exclude
|
||||
}
|
||||
}
|
||||
|
||||
var r1 error
|
||||
if rf, ok := ret.Get(1).(func(context.Context, string, string, bool) error); ok {
|
||||
r1 = rf(ctx, userID, excludeTeamID, includeDeleted)
|
||||
} else {
|
||||
@@ -616,6 +691,10 @@ func (_m *TeamStore) GetTeamsForUserWithPagination(userID string, page int, perP
|
||||
ret := _m.Called(userID, page, perPage)
|
||||
|
||||
var r0 []*model.TeamMember
|
||||
var r1 error
|
||||
if rf, ok := ret.Get(0).(func(string, int, int) ([]*model.TeamMember, error)); ok {
|
||||
return rf(userID, page, perPage)
|
||||
}
|
||||
if rf, ok := ret.Get(0).(func(string, int, int) []*model.TeamMember); ok {
|
||||
r0 = rf(userID, page, perPage)
|
||||
} else {
|
||||
@@ -624,7 +703,6 @@ func (_m *TeamStore) GetTeamsForUserWithPagination(userID string, page int, perP
|
||||
}
|
||||
}
|
||||
|
||||
var r1 error
|
||||
if rf, ok := ret.Get(1).(func(string, int, int) error); ok {
|
||||
r1 = rf(userID, page, perPage)
|
||||
} else {
|
||||
@@ -639,13 +717,16 @@ func (_m *TeamStore) GetTotalMemberCount(teamID string, restrictions *model.View
|
||||
ret := _m.Called(teamID, restrictions)
|
||||
|
||||
var r0 int64
|
||||
var r1 error
|
||||
if rf, ok := ret.Get(0).(func(string, *model.ViewUsersRestrictions) (int64, error)); ok {
|
||||
return rf(teamID, restrictions)
|
||||
}
|
||||
if rf, ok := ret.Get(0).(func(string, *model.ViewUsersRestrictions) int64); ok {
|
||||
r0 = rf(teamID, restrictions)
|
||||
} else {
|
||||
r0 = ret.Get(0).(int64)
|
||||
}
|
||||
|
||||
var r1 error
|
||||
if rf, ok := ret.Get(1).(func(string, *model.ViewUsersRestrictions) error); ok {
|
||||
r1 = rf(teamID, restrictions)
|
||||
} else {
|
||||
@@ -660,6 +741,10 @@ func (_m *TeamStore) GetUserTeamIds(userID string, allowFromCache bool) ([]strin
|
||||
ret := _m.Called(userID, allowFromCache)
|
||||
|
||||
var r0 []string
|
||||
var r1 error
|
||||
if rf, ok := ret.Get(0).(func(string, bool) ([]string, error)); ok {
|
||||
return rf(userID, allowFromCache)
|
||||
}
|
||||
if rf, ok := ret.Get(0).(func(string, bool) []string); ok {
|
||||
r0 = rf(userID, allowFromCache)
|
||||
} else {
|
||||
@@ -668,7 +753,6 @@ func (_m *TeamStore) GetUserTeamIds(userID string, allowFromCache bool) ([]strin
|
||||
}
|
||||
}
|
||||
|
||||
var r1 error
|
||||
if rf, ok := ret.Get(1).(func(string, bool) error); ok {
|
||||
r1 = rf(userID, allowFromCache)
|
||||
} else {
|
||||
@@ -683,13 +767,16 @@ func (_m *TeamStore) GroupSyncedTeamCount() (int64, error) {
|
||||
ret := _m.Called()
|
||||
|
||||
var r0 int64
|
||||
var r1 error
|
||||
if rf, ok := ret.Get(0).(func() (int64, error)); ok {
|
||||
return rf()
|
||||
}
|
||||
if rf, ok := ret.Get(0).(func() int64); ok {
|
||||
r0 = rf()
|
||||
} else {
|
||||
r0 = ret.Get(0).(int64)
|
||||
}
|
||||
|
||||
var r1 error
|
||||
if rf, ok := ret.Get(1).(func() error); ok {
|
||||
r1 = rf()
|
||||
} else {
|
||||
@@ -709,6 +796,10 @@ func (_m *TeamStore) MigrateTeamMembers(fromTeamID string, fromUserID string) (m
|
||||
ret := _m.Called(fromTeamID, fromUserID)
|
||||
|
||||
var r0 map[string]string
|
||||
var r1 error
|
||||
if rf, ok := ret.Get(0).(func(string, string) (map[string]string, error)); ok {
|
||||
return rf(fromTeamID, fromUserID)
|
||||
}
|
||||
if rf, ok := ret.Get(0).(func(string, string) map[string]string); ok {
|
||||
r0 = rf(fromTeamID, fromUserID)
|
||||
} else {
|
||||
@@ -717,7 +808,6 @@ func (_m *TeamStore) MigrateTeamMembers(fromTeamID string, fromUserID string) (m
|
||||
}
|
||||
}
|
||||
|
||||
var r1 error
|
||||
if rf, ok := ret.Get(1).(func(string, string) error); ok {
|
||||
r1 = rf(fromTeamID, fromUserID)
|
||||
} else {
|
||||
@@ -816,6 +906,10 @@ func (_m *TeamStore) Save(team *model.Team) (*model.Team, error) {
|
||||
ret := _m.Called(team)
|
||||
|
||||
var r0 *model.Team
|
||||
var r1 error
|
||||
if rf, ok := ret.Get(0).(func(*model.Team) (*model.Team, error)); ok {
|
||||
return rf(team)
|
||||
}
|
||||
if rf, ok := ret.Get(0).(func(*model.Team) *model.Team); ok {
|
||||
r0 = rf(team)
|
||||
} else {
|
||||
@@ -824,7 +918,6 @@ func (_m *TeamStore) Save(team *model.Team) (*model.Team, error) {
|
||||
}
|
||||
}
|
||||
|
||||
var r1 error
|
||||
if rf, ok := ret.Get(1).(func(*model.Team) error); ok {
|
||||
r1 = rf(team)
|
||||
} else {
|
||||
@@ -839,6 +932,10 @@ func (_m *TeamStore) SaveMember(member *model.TeamMember, maxUsersPerTeam int) (
|
||||
ret := _m.Called(member, maxUsersPerTeam)
|
||||
|
||||
var r0 *model.TeamMember
|
||||
var r1 error
|
||||
if rf, ok := ret.Get(0).(func(*model.TeamMember, int) (*model.TeamMember, error)); ok {
|
||||
return rf(member, maxUsersPerTeam)
|
||||
}
|
||||
if rf, ok := ret.Get(0).(func(*model.TeamMember, int) *model.TeamMember); ok {
|
||||
r0 = rf(member, maxUsersPerTeam)
|
||||
} else {
|
||||
@@ -847,7 +944,6 @@ func (_m *TeamStore) SaveMember(member *model.TeamMember, maxUsersPerTeam int) (
|
||||
}
|
||||
}
|
||||
|
||||
var r1 error
|
||||
if rf, ok := ret.Get(1).(func(*model.TeamMember, int) error); ok {
|
||||
r1 = rf(member, maxUsersPerTeam)
|
||||
} else {
|
||||
@@ -862,6 +958,10 @@ func (_m *TeamStore) SaveMultipleMembers(members []*model.TeamMember, maxUsersPe
|
||||
ret := _m.Called(members, maxUsersPerTeam)
|
||||
|
||||
var r0 []*model.TeamMember
|
||||
var r1 error
|
||||
if rf, ok := ret.Get(0).(func([]*model.TeamMember, int) ([]*model.TeamMember, error)); ok {
|
||||
return rf(members, maxUsersPerTeam)
|
||||
}
|
||||
if rf, ok := ret.Get(0).(func([]*model.TeamMember, int) []*model.TeamMember); ok {
|
||||
r0 = rf(members, maxUsersPerTeam)
|
||||
} else {
|
||||
@@ -870,7 +970,6 @@ func (_m *TeamStore) SaveMultipleMembers(members []*model.TeamMember, maxUsersPe
|
||||
}
|
||||
}
|
||||
|
||||
var r1 error
|
||||
if rf, ok := ret.Get(1).(func([]*model.TeamMember, int) error); ok {
|
||||
r1 = rf(members, maxUsersPerTeam)
|
||||
} else {
|
||||
@@ -885,6 +984,10 @@ func (_m *TeamStore) SearchAll(opts *model.TeamSearch) ([]*model.Team, error) {
|
||||
ret := _m.Called(opts)
|
||||
|
||||
var r0 []*model.Team
|
||||
var r1 error
|
||||
if rf, ok := ret.Get(0).(func(*model.TeamSearch) ([]*model.Team, error)); ok {
|
||||
return rf(opts)
|
||||
}
|
||||
if rf, ok := ret.Get(0).(func(*model.TeamSearch) []*model.Team); ok {
|
||||
r0 = rf(opts)
|
||||
} else {
|
||||
@@ -893,7 +996,6 @@ func (_m *TeamStore) SearchAll(opts *model.TeamSearch) ([]*model.Team, error) {
|
||||
}
|
||||
}
|
||||
|
||||
var r1 error
|
||||
if rf, ok := ret.Get(1).(func(*model.TeamSearch) error); ok {
|
||||
r1 = rf(opts)
|
||||
} else {
|
||||
@@ -908,6 +1010,11 @@ func (_m *TeamStore) SearchAllPaged(opts *model.TeamSearch) ([]*model.Team, int6
|
||||
ret := _m.Called(opts)
|
||||
|
||||
var r0 []*model.Team
|
||||
var r1 int64
|
||||
var r2 error
|
||||
if rf, ok := ret.Get(0).(func(*model.TeamSearch) ([]*model.Team, int64, error)); ok {
|
||||
return rf(opts)
|
||||
}
|
||||
if rf, ok := ret.Get(0).(func(*model.TeamSearch) []*model.Team); ok {
|
||||
r0 = rf(opts)
|
||||
} else {
|
||||
@@ -916,14 +1023,12 @@ func (_m *TeamStore) SearchAllPaged(opts *model.TeamSearch) ([]*model.Team, int6
|
||||
}
|
||||
}
|
||||
|
||||
var r1 int64
|
||||
if rf, ok := ret.Get(1).(func(*model.TeamSearch) int64); ok {
|
||||
r1 = rf(opts)
|
||||
} else {
|
||||
r1 = ret.Get(1).(int64)
|
||||
}
|
||||
|
||||
var r2 error
|
||||
if rf, ok := ret.Get(2).(func(*model.TeamSearch) error); ok {
|
||||
r2 = rf(opts)
|
||||
} else {
|
||||
@@ -938,6 +1043,10 @@ func (_m *TeamStore) SearchOpen(opts *model.TeamSearch) ([]*model.Team, error) {
|
||||
ret := _m.Called(opts)
|
||||
|
||||
var r0 []*model.Team
|
||||
var r1 error
|
||||
if rf, ok := ret.Get(0).(func(*model.TeamSearch) ([]*model.Team, error)); ok {
|
||||
return rf(opts)
|
||||
}
|
||||
if rf, ok := ret.Get(0).(func(*model.TeamSearch) []*model.Team); ok {
|
||||
r0 = rf(opts)
|
||||
} else {
|
||||
@@ -946,7 +1055,6 @@ func (_m *TeamStore) SearchOpen(opts *model.TeamSearch) ([]*model.Team, error) {
|
||||
}
|
||||
}
|
||||
|
||||
var r1 error
|
||||
if rf, ok := ret.Get(1).(func(*model.TeamSearch) error); ok {
|
||||
r1 = rf(opts)
|
||||
} else {
|
||||
@@ -961,6 +1069,10 @@ func (_m *TeamStore) SearchPrivate(opts *model.TeamSearch) ([]*model.Team, error
|
||||
ret := _m.Called(opts)
|
||||
|
||||
var r0 []*model.Team
|
||||
var r1 error
|
||||
if rf, ok := ret.Get(0).(func(*model.TeamSearch) ([]*model.Team, error)); ok {
|
||||
return rf(opts)
|
||||
}
|
||||
if rf, ok := ret.Get(0).(func(*model.TeamSearch) []*model.Team); ok {
|
||||
r0 = rf(opts)
|
||||
} else {
|
||||
@@ -969,7 +1081,6 @@ func (_m *TeamStore) SearchPrivate(opts *model.TeamSearch) ([]*model.Team, error
|
||||
}
|
||||
}
|
||||
|
||||
var r1 error
|
||||
if rf, ok := ret.Get(1).(func(*model.TeamSearch) error); ok {
|
||||
r1 = rf(opts)
|
||||
} else {
|
||||
@@ -984,6 +1095,10 @@ func (_m *TeamStore) Update(team *model.Team) (*model.Team, error) {
|
||||
ret := _m.Called(team)
|
||||
|
||||
var r0 *model.Team
|
||||
var r1 error
|
||||
if rf, ok := ret.Get(0).(func(*model.Team) (*model.Team, error)); ok {
|
||||
return rf(team)
|
||||
}
|
||||
if rf, ok := ret.Get(0).(func(*model.Team) *model.Team); ok {
|
||||
r0 = rf(team)
|
||||
} else {
|
||||
@@ -992,7 +1107,6 @@ func (_m *TeamStore) Update(team *model.Team) (*model.Team, error) {
|
||||
}
|
||||
}
|
||||
|
||||
var r1 error
|
||||
if rf, ok := ret.Get(1).(func(*model.Team) error); ok {
|
||||
r1 = rf(team)
|
||||
} else {
|
||||
@@ -1021,6 +1135,10 @@ func (_m *TeamStore) UpdateMember(member *model.TeamMember) (*model.TeamMember,
|
||||
ret := _m.Called(member)
|
||||
|
||||
var r0 *model.TeamMember
|
||||
var r1 error
|
||||
if rf, ok := ret.Get(0).(func(*model.TeamMember) (*model.TeamMember, error)); ok {
|
||||
return rf(member)
|
||||
}
|
||||
if rf, ok := ret.Get(0).(func(*model.TeamMember) *model.TeamMember); ok {
|
||||
r0 = rf(member)
|
||||
} else {
|
||||
@@ -1029,7 +1147,6 @@ func (_m *TeamStore) UpdateMember(member *model.TeamMember) (*model.TeamMember,
|
||||
}
|
||||
}
|
||||
|
||||
var r1 error
|
||||
if rf, ok := ret.Get(1).(func(*model.TeamMember) error); ok {
|
||||
r1 = rf(member)
|
||||
} else {
|
||||
@@ -1058,6 +1175,10 @@ func (_m *TeamStore) UpdateMultipleMembers(members []*model.TeamMember) ([]*mode
|
||||
ret := _m.Called(members)
|
||||
|
||||
var r0 []*model.TeamMember
|
||||
var r1 error
|
||||
if rf, ok := ret.Get(0).(func([]*model.TeamMember) ([]*model.TeamMember, error)); ok {
|
||||
return rf(members)
|
||||
}
|
||||
if rf, ok := ret.Get(0).(func([]*model.TeamMember) []*model.TeamMember); ok {
|
||||
r0 = rf(members)
|
||||
} else {
|
||||
@@ -1066,7 +1187,6 @@ func (_m *TeamStore) UpdateMultipleMembers(members []*model.TeamMember) ([]*mode
|
||||
}
|
||||
}
|
||||
|
||||
var r1 error
|
||||
if rf, ok := ret.Get(1).(func([]*model.TeamMember) error); ok {
|
||||
r1 = rf(members)
|
||||
} else {
|
||||
@@ -1081,13 +1201,16 @@ func (_m *TeamStore) UserBelongsToTeams(userID string, teamIds []string) (bool,
|
||||
ret := _m.Called(userID, teamIds)
|
||||
|
||||
var r0 bool
|
||||
var r1 error
|
||||
if rf, ok := ret.Get(0).(func(string, []string) (bool, error)); ok {
|
||||
return rf(userID, teamIds)
|
||||
}
|
||||
if rf, ok := ret.Get(0).(func(string, []string) bool); ok {
|
||||
r0 = rf(userID, teamIds)
|
||||
} else {
|
||||
r0 = ret.Get(0).(bool)
|
||||
}
|
||||
|
||||
var r1 error
|
||||
if rf, ok := ret.Get(1).(func(string, []string) error); ok {
|
||||
r1 = rf(userID, teamIds)
|
||||
} else {
|
||||
@@ -1096,3 +1219,18 @@ func (_m *TeamStore) UserBelongsToTeams(userID string, teamIds []string) (bool,
|
||||
|
||||
return r0, r1
|
||||
}
|
||||
|
||||
type mockConstructorTestingTNewTeamStore interface {
|
||||
mock.TestingT
|
||||
Cleanup(func())
|
||||
}
|
||||
|
||||
// NewTeamStore creates a new instance of TeamStore. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations.
|
||||
func NewTeamStore(t mockConstructorTestingTNewTeamStore) *TeamStore {
|
||||
mock := &TeamStore{}
|
||||
mock.Mock.Test(t)
|
||||
|
||||
t.Cleanup(func() { mock.AssertExpectations(t) })
|
||||
|
||||
return mock
|
||||
}
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
// Code generated by mockery v2.10.4. DO NOT EDIT.
|
||||
// Code generated by mockery v2.23.2. DO NOT EDIT.
|
||||
|
||||
// Regenerate this file using `make store-mocks`.
|
||||
|
||||
@@ -19,6 +19,10 @@ func (_m *TermsOfServiceStore) Get(id string, allowFromCache bool) (*model.Terms
|
||||
ret := _m.Called(id, allowFromCache)
|
||||
|
||||
var r0 *model.TermsOfService
|
||||
var r1 error
|
||||
if rf, ok := ret.Get(0).(func(string, bool) (*model.TermsOfService, error)); ok {
|
||||
return rf(id, allowFromCache)
|
||||
}
|
||||
if rf, ok := ret.Get(0).(func(string, bool) *model.TermsOfService); ok {
|
||||
r0 = rf(id, allowFromCache)
|
||||
} else {
|
||||
@@ -27,7 +31,6 @@ func (_m *TermsOfServiceStore) Get(id string, allowFromCache bool) (*model.Terms
|
||||
}
|
||||
}
|
||||
|
||||
var r1 error
|
||||
if rf, ok := ret.Get(1).(func(string, bool) error); ok {
|
||||
r1 = rf(id, allowFromCache)
|
||||
} else {
|
||||
@@ -42,6 +45,10 @@ func (_m *TermsOfServiceStore) GetLatest(allowFromCache bool) (*model.TermsOfSer
|
||||
ret := _m.Called(allowFromCache)
|
||||
|
||||
var r0 *model.TermsOfService
|
||||
var r1 error
|
||||
if rf, ok := ret.Get(0).(func(bool) (*model.TermsOfService, error)); ok {
|
||||
return rf(allowFromCache)
|
||||
}
|
||||
if rf, ok := ret.Get(0).(func(bool) *model.TermsOfService); ok {
|
||||
r0 = rf(allowFromCache)
|
||||
} else {
|
||||
@@ -50,7 +57,6 @@ func (_m *TermsOfServiceStore) GetLatest(allowFromCache bool) (*model.TermsOfSer
|
||||
}
|
||||
}
|
||||
|
||||
var r1 error
|
||||
if rf, ok := ret.Get(1).(func(bool) error); ok {
|
||||
r1 = rf(allowFromCache)
|
||||
} else {
|
||||
@@ -65,6 +71,10 @@ func (_m *TermsOfServiceStore) Save(termsOfService *model.TermsOfService) (*mode
|
||||
ret := _m.Called(termsOfService)
|
||||
|
||||
var r0 *model.TermsOfService
|
||||
var r1 error
|
||||
if rf, ok := ret.Get(0).(func(*model.TermsOfService) (*model.TermsOfService, error)); ok {
|
||||
return rf(termsOfService)
|
||||
}
|
||||
if rf, ok := ret.Get(0).(func(*model.TermsOfService) *model.TermsOfService); ok {
|
||||
r0 = rf(termsOfService)
|
||||
} else {
|
||||
@@ -73,7 +83,6 @@ func (_m *TermsOfServiceStore) Save(termsOfService *model.TermsOfService) (*mode
|
||||
}
|
||||
}
|
||||
|
||||
var r1 error
|
||||
if rf, ok := ret.Get(1).(func(*model.TermsOfService) error); ok {
|
||||
r1 = rf(termsOfService)
|
||||
} else {
|
||||
@@ -82,3 +91,18 @@ func (_m *TermsOfServiceStore) Save(termsOfService *model.TermsOfService) (*mode
|
||||
|
||||
return r0, r1
|
||||
}
|
||||
|
||||
type mockConstructorTestingTNewTermsOfServiceStore interface {
|
||||
mock.TestingT
|
||||
Cleanup(func())
|
||||
}
|
||||
|
||||
// NewTermsOfServiceStore creates a new instance of TermsOfServiceStore. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations.
|
||||
func NewTermsOfServiceStore(t mockConstructorTestingTNewTermsOfServiceStore) *TermsOfServiceStore {
|
||||
mock := &TermsOfServiceStore{}
|
||||
mock.Mock.Test(t)
|
||||
|
||||
t.Cleanup(func() { mock.AssertExpectations(t) })
|
||||
|
||||
return mock
|
||||
}
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
// Code generated by mockery v2.10.4. DO NOT EDIT.
|
||||
// Code generated by mockery v2.23.2. DO NOT EDIT.
|
||||
|
||||
// Regenerate this file using `make store-mocks`.
|
||||
|
||||
@@ -34,13 +34,16 @@ func (_m *ThreadStore) DeleteOrphanedRows(limit int) (int64, error) {
|
||||
ret := _m.Called(limit)
|
||||
|
||||
var r0 int64
|
||||
var r1 error
|
||||
if rf, ok := ret.Get(0).(func(int) (int64, error)); ok {
|
||||
return rf(limit)
|
||||
}
|
||||
if rf, ok := ret.Get(0).(func(int) int64); ok {
|
||||
r0 = rf(limit)
|
||||
} else {
|
||||
r0 = ret.Get(0).(int64)
|
||||
}
|
||||
|
||||
var r1 error
|
||||
if rf, ok := ret.Get(1).(func(int) error); ok {
|
||||
r1 = rf(limit)
|
||||
} else {
|
||||
@@ -55,6 +58,10 @@ func (_m *ThreadStore) Get(id string) (*model.Thread, error) {
|
||||
ret := _m.Called(id)
|
||||
|
||||
var r0 *model.Thread
|
||||
var r1 error
|
||||
if rf, ok := ret.Get(0).(func(string) (*model.Thread, error)); ok {
|
||||
return rf(id)
|
||||
}
|
||||
if rf, ok := ret.Get(0).(func(string) *model.Thread); ok {
|
||||
r0 = rf(id)
|
||||
} else {
|
||||
@@ -63,7 +70,6 @@ func (_m *ThreadStore) Get(id string) (*model.Thread, error) {
|
||||
}
|
||||
}
|
||||
|
||||
var r1 error
|
||||
if rf, ok := ret.Get(1).(func(string) error); ok {
|
||||
r1 = rf(id)
|
||||
} else {
|
||||
@@ -78,6 +84,10 @@ func (_m *ThreadStore) GetMembershipForUser(userId string, postID string) (*mode
|
||||
ret := _m.Called(userId, postID)
|
||||
|
||||
var r0 *model.ThreadMembership
|
||||
var r1 error
|
||||
if rf, ok := ret.Get(0).(func(string, string) (*model.ThreadMembership, error)); ok {
|
||||
return rf(userId, postID)
|
||||
}
|
||||
if rf, ok := ret.Get(0).(func(string, string) *model.ThreadMembership); ok {
|
||||
r0 = rf(userId, postID)
|
||||
} else {
|
||||
@@ -86,7 +96,6 @@ func (_m *ThreadStore) GetMembershipForUser(userId string, postID string) (*mode
|
||||
}
|
||||
}
|
||||
|
||||
var r1 error
|
||||
if rf, ok := ret.Get(1).(func(string, string) error); ok {
|
||||
r1 = rf(userId, postID)
|
||||
} else {
|
||||
@@ -101,6 +110,10 @@ func (_m *ThreadStore) GetMembershipsForUser(userId string, teamID string) ([]*m
|
||||
ret := _m.Called(userId, teamID)
|
||||
|
||||
var r0 []*model.ThreadMembership
|
||||
var r1 error
|
||||
if rf, ok := ret.Get(0).(func(string, string) ([]*model.ThreadMembership, error)); ok {
|
||||
return rf(userId, teamID)
|
||||
}
|
||||
if rf, ok := ret.Get(0).(func(string, string) []*model.ThreadMembership); ok {
|
||||
r0 = rf(userId, teamID)
|
||||
} else {
|
||||
@@ -109,7 +122,6 @@ func (_m *ThreadStore) GetMembershipsForUser(userId string, teamID string) ([]*m
|
||||
}
|
||||
}
|
||||
|
||||
var r1 error
|
||||
if rf, ok := ret.Get(1).(func(string, string) error); ok {
|
||||
r1 = rf(userId, teamID)
|
||||
} else {
|
||||
@@ -124,6 +136,10 @@ func (_m *ThreadStore) GetTeamsUnreadForUser(userID string, teamIDs []string, in
|
||||
ret := _m.Called(userID, teamIDs, includeUrgentMentionCount)
|
||||
|
||||
var r0 map[string]*model.TeamUnread
|
||||
var r1 error
|
||||
if rf, ok := ret.Get(0).(func(string, []string, bool) (map[string]*model.TeamUnread, error)); ok {
|
||||
return rf(userID, teamIDs, includeUrgentMentionCount)
|
||||
}
|
||||
if rf, ok := ret.Get(0).(func(string, []string, bool) map[string]*model.TeamUnread); ok {
|
||||
r0 = rf(userID, teamIDs, includeUrgentMentionCount)
|
||||
} else {
|
||||
@@ -132,7 +148,6 @@ func (_m *ThreadStore) GetTeamsUnreadForUser(userID string, teamIDs []string, in
|
||||
}
|
||||
}
|
||||
|
||||
var r1 error
|
||||
if rf, ok := ret.Get(1).(func(string, []string, bool) error); ok {
|
||||
r1 = rf(userID, teamIDs, includeUrgentMentionCount)
|
||||
} else {
|
||||
@@ -147,6 +162,10 @@ func (_m *ThreadStore) GetThreadFollowers(threadID string, fetchOnlyActive bool)
|
||||
ret := _m.Called(threadID, fetchOnlyActive)
|
||||
|
||||
var r0 []string
|
||||
var r1 error
|
||||
if rf, ok := ret.Get(0).(func(string, bool) ([]string, error)); ok {
|
||||
return rf(threadID, fetchOnlyActive)
|
||||
}
|
||||
if rf, ok := ret.Get(0).(func(string, bool) []string); ok {
|
||||
r0 = rf(threadID, fetchOnlyActive)
|
||||
} else {
|
||||
@@ -155,7 +174,6 @@ func (_m *ThreadStore) GetThreadFollowers(threadID string, fetchOnlyActive bool)
|
||||
}
|
||||
}
|
||||
|
||||
var r1 error
|
||||
if rf, ok := ret.Get(1).(func(string, bool) error); ok {
|
||||
r1 = rf(threadID, fetchOnlyActive)
|
||||
} else {
|
||||
@@ -170,6 +188,10 @@ func (_m *ThreadStore) GetThreadForUser(threadMembership *model.ThreadMembership
|
||||
ret := _m.Called(threadMembership, extended, postPriorityIsEnabled)
|
||||
|
||||
var r0 *model.ThreadResponse
|
||||
var r1 error
|
||||
if rf, ok := ret.Get(0).(func(*model.ThreadMembership, bool, bool) (*model.ThreadResponse, error)); ok {
|
||||
return rf(threadMembership, extended, postPriorityIsEnabled)
|
||||
}
|
||||
if rf, ok := ret.Get(0).(func(*model.ThreadMembership, bool, bool) *model.ThreadResponse); ok {
|
||||
r0 = rf(threadMembership, extended, postPriorityIsEnabled)
|
||||
} else {
|
||||
@@ -178,7 +200,6 @@ func (_m *ThreadStore) GetThreadForUser(threadMembership *model.ThreadMembership
|
||||
}
|
||||
}
|
||||
|
||||
var r1 error
|
||||
if rf, ok := ret.Get(1).(func(*model.ThreadMembership, bool, bool) error); ok {
|
||||
r1 = rf(threadMembership, extended, postPriorityIsEnabled)
|
||||
} else {
|
||||
@@ -193,13 +214,16 @@ func (_m *ThreadStore) GetThreadUnreadReplyCount(threadMembership *model.ThreadM
|
||||
ret := _m.Called(threadMembership)
|
||||
|
||||
var r0 int64
|
||||
var r1 error
|
||||
if rf, ok := ret.Get(0).(func(*model.ThreadMembership) (int64, error)); ok {
|
||||
return rf(threadMembership)
|
||||
}
|
||||
if rf, ok := ret.Get(0).(func(*model.ThreadMembership) int64); ok {
|
||||
r0 = rf(threadMembership)
|
||||
} else {
|
||||
r0 = ret.Get(0).(int64)
|
||||
}
|
||||
|
||||
var r1 error
|
||||
if rf, ok := ret.Get(1).(func(*model.ThreadMembership) error); ok {
|
||||
r1 = rf(threadMembership)
|
||||
} else {
|
||||
@@ -214,6 +238,10 @@ func (_m *ThreadStore) GetThreadsForUser(userId string, teamID string, opts mode
|
||||
ret := _m.Called(userId, teamID, opts)
|
||||
|
||||
var r0 []*model.ThreadResponse
|
||||
var r1 error
|
||||
if rf, ok := ret.Get(0).(func(string, string, model.GetUserThreadsOpts) ([]*model.ThreadResponse, error)); ok {
|
||||
return rf(userId, teamID, opts)
|
||||
}
|
||||
if rf, ok := ret.Get(0).(func(string, string, model.GetUserThreadsOpts) []*model.ThreadResponse); ok {
|
||||
r0 = rf(userId, teamID, opts)
|
||||
} else {
|
||||
@@ -222,7 +250,6 @@ func (_m *ThreadStore) GetThreadsForUser(userId string, teamID string, opts mode
|
||||
}
|
||||
}
|
||||
|
||||
var r1 error
|
||||
if rf, ok := ret.Get(1).(func(string, string, model.GetUserThreadsOpts) error); ok {
|
||||
r1 = rf(userId, teamID, opts)
|
||||
} else {
|
||||
@@ -237,6 +264,10 @@ func (_m *ThreadStore) GetTopThreadsForTeamSince(teamID string, userID string, s
|
||||
ret := _m.Called(teamID, userID, since, offset, limit)
|
||||
|
||||
var r0 *model.TopThreadList
|
||||
var r1 error
|
||||
if rf, ok := ret.Get(0).(func(string, string, int64, int, int) (*model.TopThreadList, error)); ok {
|
||||
return rf(teamID, userID, since, offset, limit)
|
||||
}
|
||||
if rf, ok := ret.Get(0).(func(string, string, int64, int, int) *model.TopThreadList); ok {
|
||||
r0 = rf(teamID, userID, since, offset, limit)
|
||||
} else {
|
||||
@@ -245,7 +276,6 @@ func (_m *ThreadStore) GetTopThreadsForTeamSince(teamID string, userID string, s
|
||||
}
|
||||
}
|
||||
|
||||
var r1 error
|
||||
if rf, ok := ret.Get(1).(func(string, string, int64, int, int) error); ok {
|
||||
r1 = rf(teamID, userID, since, offset, limit)
|
||||
} else {
|
||||
@@ -260,6 +290,10 @@ func (_m *ThreadStore) GetTopThreadsForUserSince(teamID string, userID string, s
|
||||
ret := _m.Called(teamID, userID, since, offset, limit)
|
||||
|
||||
var r0 *model.TopThreadList
|
||||
var r1 error
|
||||
if rf, ok := ret.Get(0).(func(string, string, int64, int, int) (*model.TopThreadList, error)); ok {
|
||||
return rf(teamID, userID, since, offset, limit)
|
||||
}
|
||||
if rf, ok := ret.Get(0).(func(string, string, int64, int, int) *model.TopThreadList); ok {
|
||||
r0 = rf(teamID, userID, since, offset, limit)
|
||||
} else {
|
||||
@@ -268,7 +302,6 @@ func (_m *ThreadStore) GetTopThreadsForUserSince(teamID string, userID string, s
|
||||
}
|
||||
}
|
||||
|
||||
var r1 error
|
||||
if rf, ok := ret.Get(1).(func(string, string, int64, int, int) error); ok {
|
||||
r1 = rf(teamID, userID, since, offset, limit)
|
||||
} else {
|
||||
@@ -283,13 +316,16 @@ func (_m *ThreadStore) GetTotalThreads(userId string, teamID string, opts model.
|
||||
ret := _m.Called(userId, teamID, opts)
|
||||
|
||||
var r0 int64
|
||||
var r1 error
|
||||
if rf, ok := ret.Get(0).(func(string, string, model.GetUserThreadsOpts) (int64, error)); ok {
|
||||
return rf(userId, teamID, opts)
|
||||
}
|
||||
if rf, ok := ret.Get(0).(func(string, string, model.GetUserThreadsOpts) int64); ok {
|
||||
r0 = rf(userId, teamID, opts)
|
||||
} else {
|
||||
r0 = ret.Get(0).(int64)
|
||||
}
|
||||
|
||||
var r1 error
|
||||
if rf, ok := ret.Get(1).(func(string, string, model.GetUserThreadsOpts) error); ok {
|
||||
r1 = rf(userId, teamID, opts)
|
||||
} else {
|
||||
@@ -304,13 +340,16 @@ func (_m *ThreadStore) GetTotalUnreadMentions(userId string, teamID string, opts
|
||||
ret := _m.Called(userId, teamID, opts)
|
||||
|
||||
var r0 int64
|
||||
var r1 error
|
||||
if rf, ok := ret.Get(0).(func(string, string, model.GetUserThreadsOpts) (int64, error)); ok {
|
||||
return rf(userId, teamID, opts)
|
||||
}
|
||||
if rf, ok := ret.Get(0).(func(string, string, model.GetUserThreadsOpts) int64); ok {
|
||||
r0 = rf(userId, teamID, opts)
|
||||
} else {
|
||||
r0 = ret.Get(0).(int64)
|
||||
}
|
||||
|
||||
var r1 error
|
||||
if rf, ok := ret.Get(1).(func(string, string, model.GetUserThreadsOpts) error); ok {
|
||||
r1 = rf(userId, teamID, opts)
|
||||
} else {
|
||||
@@ -325,13 +364,16 @@ func (_m *ThreadStore) GetTotalUnreadThreads(userId string, teamID string, opts
|
||||
ret := _m.Called(userId, teamID, opts)
|
||||
|
||||
var r0 int64
|
||||
var r1 error
|
||||
if rf, ok := ret.Get(0).(func(string, string, model.GetUserThreadsOpts) (int64, error)); ok {
|
||||
return rf(userId, teamID, opts)
|
||||
}
|
||||
if rf, ok := ret.Get(0).(func(string, string, model.GetUserThreadsOpts) int64); ok {
|
||||
r0 = rf(userId, teamID, opts)
|
||||
} else {
|
||||
r0 = ret.Get(0).(int64)
|
||||
}
|
||||
|
||||
var r1 error
|
||||
if rf, ok := ret.Get(1).(func(string, string, model.GetUserThreadsOpts) error); ok {
|
||||
r1 = rf(userId, teamID, opts)
|
||||
} else {
|
||||
@@ -346,13 +388,16 @@ func (_m *ThreadStore) GetTotalUnreadUrgentMentions(userId string, teamID string
|
||||
ret := _m.Called(userId, teamID, opts)
|
||||
|
||||
var r0 int64
|
||||
var r1 error
|
||||
if rf, ok := ret.Get(0).(func(string, string, model.GetUserThreadsOpts) (int64, error)); ok {
|
||||
return rf(userId, teamID, opts)
|
||||
}
|
||||
if rf, ok := ret.Get(0).(func(string, string, model.GetUserThreadsOpts) int64); ok {
|
||||
r0 = rf(userId, teamID, opts)
|
||||
} else {
|
||||
r0 = ret.Get(0).(int64)
|
||||
}
|
||||
|
||||
var r1 error
|
||||
if rf, ok := ret.Get(1).(func(string, string, model.GetUserThreadsOpts) error); ok {
|
||||
r1 = rf(userId, teamID, opts)
|
||||
} else {
|
||||
@@ -367,6 +412,10 @@ func (_m *ThreadStore) MaintainMembership(userID string, postID string, opts sto
|
||||
ret := _m.Called(userID, postID, opts)
|
||||
|
||||
var r0 *model.ThreadMembership
|
||||
var r1 error
|
||||
if rf, ok := ret.Get(0).(func(string, string, store.ThreadMembershipOpts) (*model.ThreadMembership, error)); ok {
|
||||
return rf(userID, postID, opts)
|
||||
}
|
||||
if rf, ok := ret.Get(0).(func(string, string, store.ThreadMembershipOpts) *model.ThreadMembership); ok {
|
||||
r0 = rf(userID, postID, opts)
|
||||
} else {
|
||||
@@ -375,7 +424,6 @@ func (_m *ThreadStore) MaintainMembership(userID string, postID string, opts sto
|
||||
}
|
||||
}
|
||||
|
||||
var r1 error
|
||||
if rf, ok := ret.Get(1).(func(string, string, store.ThreadMembershipOpts) error); ok {
|
||||
r1 = rf(userID, postID, opts)
|
||||
} else {
|
||||
@@ -446,20 +494,23 @@ func (_m *ThreadStore) PermanentDeleteBatchForRetentionPolicies(now int64, globa
|
||||
ret := _m.Called(now, globalPolicyEndTime, limit, cursor)
|
||||
|
||||
var r0 int64
|
||||
var r1 model.RetentionPolicyCursor
|
||||
var r2 error
|
||||
if rf, ok := ret.Get(0).(func(int64, int64, int64, model.RetentionPolicyCursor) (int64, model.RetentionPolicyCursor, error)); ok {
|
||||
return rf(now, globalPolicyEndTime, limit, cursor)
|
||||
}
|
||||
if rf, ok := ret.Get(0).(func(int64, int64, int64, model.RetentionPolicyCursor) int64); ok {
|
||||
r0 = rf(now, globalPolicyEndTime, limit, cursor)
|
||||
} else {
|
||||
r0 = ret.Get(0).(int64)
|
||||
}
|
||||
|
||||
var r1 model.RetentionPolicyCursor
|
||||
if rf, ok := ret.Get(1).(func(int64, int64, int64, model.RetentionPolicyCursor) model.RetentionPolicyCursor); ok {
|
||||
r1 = rf(now, globalPolicyEndTime, limit, cursor)
|
||||
} else {
|
||||
r1 = ret.Get(1).(model.RetentionPolicyCursor)
|
||||
}
|
||||
|
||||
var r2 error
|
||||
if rf, ok := ret.Get(2).(func(int64, int64, int64, model.RetentionPolicyCursor) error); ok {
|
||||
r2 = rf(now, globalPolicyEndTime, limit, cursor)
|
||||
} else {
|
||||
@@ -474,20 +525,23 @@ func (_m *ThreadStore) PermanentDeleteBatchThreadMembershipsForRetentionPolicies
|
||||
ret := _m.Called(now, globalPolicyEndTime, limit, cursor)
|
||||
|
||||
var r0 int64
|
||||
var r1 model.RetentionPolicyCursor
|
||||
var r2 error
|
||||
if rf, ok := ret.Get(0).(func(int64, int64, int64, model.RetentionPolicyCursor) (int64, model.RetentionPolicyCursor, error)); ok {
|
||||
return rf(now, globalPolicyEndTime, limit, cursor)
|
||||
}
|
||||
if rf, ok := ret.Get(0).(func(int64, int64, int64, model.RetentionPolicyCursor) int64); ok {
|
||||
r0 = rf(now, globalPolicyEndTime, limit, cursor)
|
||||
} else {
|
||||
r0 = ret.Get(0).(int64)
|
||||
}
|
||||
|
||||
var r1 model.RetentionPolicyCursor
|
||||
if rf, ok := ret.Get(1).(func(int64, int64, int64, model.RetentionPolicyCursor) model.RetentionPolicyCursor); ok {
|
||||
r1 = rf(now, globalPolicyEndTime, limit, cursor)
|
||||
} else {
|
||||
r1 = ret.Get(1).(model.RetentionPolicyCursor)
|
||||
}
|
||||
|
||||
var r2 error
|
||||
if rf, ok := ret.Get(2).(func(int64, int64, int64, model.RetentionPolicyCursor) error); ok {
|
||||
r2 = rf(now, globalPolicyEndTime, limit, cursor)
|
||||
} else {
|
||||
@@ -502,6 +556,10 @@ func (_m *ThreadStore) UpdateMembership(membership *model.ThreadMembership) (*mo
|
||||
ret := _m.Called(membership)
|
||||
|
||||
var r0 *model.ThreadMembership
|
||||
var r1 error
|
||||
if rf, ok := ret.Get(0).(func(*model.ThreadMembership) (*model.ThreadMembership, error)); ok {
|
||||
return rf(membership)
|
||||
}
|
||||
if rf, ok := ret.Get(0).(func(*model.ThreadMembership) *model.ThreadMembership); ok {
|
||||
r0 = rf(membership)
|
||||
} else {
|
||||
@@ -510,7 +568,6 @@ func (_m *ThreadStore) UpdateMembership(membership *model.ThreadMembership) (*mo
|
||||
}
|
||||
}
|
||||
|
||||
var r1 error
|
||||
if rf, ok := ret.Get(1).(func(*model.ThreadMembership) error); ok {
|
||||
r1 = rf(membership)
|
||||
} else {
|
||||
@@ -519,3 +576,18 @@ func (_m *ThreadStore) UpdateMembership(membership *model.ThreadMembership) (*mo
|
||||
|
||||
return r0, r1
|
||||
}
|
||||
|
||||
type mockConstructorTestingTNewThreadStore interface {
|
||||
mock.TestingT
|
||||
Cleanup(func())
|
||||
}
|
||||
|
||||
// NewThreadStore creates a new instance of ThreadStore. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations.
|
||||
func NewThreadStore(t mockConstructorTestingTNewThreadStore) *ThreadStore {
|
||||
mock := &ThreadStore{}
|
||||
mock.Mock.Test(t)
|
||||
|
||||
t.Cleanup(func() { mock.AssertExpectations(t) })
|
||||
|
||||
return mock
|
||||
}
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
// Code generated by mockery v2.10.4. DO NOT EDIT.
|
||||
// Code generated by mockery v2.23.2. DO NOT EDIT.
|
||||
|
||||
// Regenerate this file using `make store-mocks`.
|
||||
|
||||
@@ -38,6 +38,10 @@ func (_m *TokenStore) GetAllTokensByType(tokenType string) ([]*model.Token, erro
|
||||
ret := _m.Called(tokenType)
|
||||
|
||||
var r0 []*model.Token
|
||||
var r1 error
|
||||
if rf, ok := ret.Get(0).(func(string) ([]*model.Token, error)); ok {
|
||||
return rf(tokenType)
|
||||
}
|
||||
if rf, ok := ret.Get(0).(func(string) []*model.Token); ok {
|
||||
r0 = rf(tokenType)
|
||||
} else {
|
||||
@@ -46,7 +50,6 @@ func (_m *TokenStore) GetAllTokensByType(tokenType string) ([]*model.Token, erro
|
||||
}
|
||||
}
|
||||
|
||||
var r1 error
|
||||
if rf, ok := ret.Get(1).(func(string) error); ok {
|
||||
r1 = rf(tokenType)
|
||||
} else {
|
||||
@@ -61,6 +64,10 @@ func (_m *TokenStore) GetByToken(token string) (*model.Token, error) {
|
||||
ret := _m.Called(token)
|
||||
|
||||
var r0 *model.Token
|
||||
var r1 error
|
||||
if rf, ok := ret.Get(0).(func(string) (*model.Token, error)); ok {
|
||||
return rf(token)
|
||||
}
|
||||
if rf, ok := ret.Get(0).(func(string) *model.Token); ok {
|
||||
r0 = rf(token)
|
||||
} else {
|
||||
@@ -69,7 +76,6 @@ func (_m *TokenStore) GetByToken(token string) (*model.Token, error) {
|
||||
}
|
||||
}
|
||||
|
||||
var r1 error
|
||||
if rf, ok := ret.Get(1).(func(string) error); ok {
|
||||
r1 = rf(token)
|
||||
} else {
|
||||
@@ -106,3 +112,18 @@ func (_m *TokenStore) Save(recovery *model.Token) error {
|
||||
|
||||
return r0
|
||||
}
|
||||
|
||||
type mockConstructorTestingTNewTokenStore interface {
|
||||
mock.TestingT
|
||||
Cleanup(func())
|
||||
}
|
||||
|
||||
// NewTokenStore creates a new instance of TokenStore. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations.
|
||||
func NewTokenStore(t mockConstructorTestingTNewTokenStore) *TokenStore {
|
||||
mock := &TokenStore{}
|
||||
mock.Mock.Test(t)
|
||||
|
||||
t.Cleanup(func() { mock.AssertExpectations(t) })
|
||||
|
||||
return mock
|
||||
}
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
// Code generated by mockery v2.10.4. DO NOT EDIT.
|
||||
// Code generated by mockery v2.23.2. DO NOT EDIT.
|
||||
|
||||
// Regenerate this file using `make store-mocks`.
|
||||
|
||||
@@ -19,6 +19,10 @@ func (_m *TrueUpReviewStore) CreateTrueUpReviewStatusRecord(reviewStatus *model.
|
||||
ret := _m.Called(reviewStatus)
|
||||
|
||||
var r0 *model.TrueUpReviewStatus
|
||||
var r1 error
|
||||
if rf, ok := ret.Get(0).(func(*model.TrueUpReviewStatus) (*model.TrueUpReviewStatus, error)); ok {
|
||||
return rf(reviewStatus)
|
||||
}
|
||||
if rf, ok := ret.Get(0).(func(*model.TrueUpReviewStatus) *model.TrueUpReviewStatus); ok {
|
||||
r0 = rf(reviewStatus)
|
||||
} else {
|
||||
@@ -27,7 +31,6 @@ func (_m *TrueUpReviewStore) CreateTrueUpReviewStatusRecord(reviewStatus *model.
|
||||
}
|
||||
}
|
||||
|
||||
var r1 error
|
||||
if rf, ok := ret.Get(1).(func(*model.TrueUpReviewStatus) error); ok {
|
||||
r1 = rf(reviewStatus)
|
||||
} else {
|
||||
@@ -42,6 +45,10 @@ func (_m *TrueUpReviewStore) GetTrueUpReviewStatus(dueDate int64) (*model.TrueUp
|
||||
ret := _m.Called(dueDate)
|
||||
|
||||
var r0 *model.TrueUpReviewStatus
|
||||
var r1 error
|
||||
if rf, ok := ret.Get(0).(func(int64) (*model.TrueUpReviewStatus, error)); ok {
|
||||
return rf(dueDate)
|
||||
}
|
||||
if rf, ok := ret.Get(0).(func(int64) *model.TrueUpReviewStatus); ok {
|
||||
r0 = rf(dueDate)
|
||||
} else {
|
||||
@@ -50,7 +57,6 @@ func (_m *TrueUpReviewStore) GetTrueUpReviewStatus(dueDate int64) (*model.TrueUp
|
||||
}
|
||||
}
|
||||
|
||||
var r1 error
|
||||
if rf, ok := ret.Get(1).(func(int64) error); ok {
|
||||
r1 = rf(dueDate)
|
||||
} else {
|
||||
@@ -65,6 +71,10 @@ func (_m *TrueUpReviewStore) Update(reviewStatus *model.TrueUpReviewStatus) (*mo
|
||||
ret := _m.Called(reviewStatus)
|
||||
|
||||
var r0 *model.TrueUpReviewStatus
|
||||
var r1 error
|
||||
if rf, ok := ret.Get(0).(func(*model.TrueUpReviewStatus) (*model.TrueUpReviewStatus, error)); ok {
|
||||
return rf(reviewStatus)
|
||||
}
|
||||
if rf, ok := ret.Get(0).(func(*model.TrueUpReviewStatus) *model.TrueUpReviewStatus); ok {
|
||||
r0 = rf(reviewStatus)
|
||||
} else {
|
||||
@@ -73,7 +83,6 @@ func (_m *TrueUpReviewStore) Update(reviewStatus *model.TrueUpReviewStatus) (*mo
|
||||
}
|
||||
}
|
||||
|
||||
var r1 error
|
||||
if rf, ok := ret.Get(1).(func(*model.TrueUpReviewStatus) error); ok {
|
||||
r1 = rf(reviewStatus)
|
||||
} else {
|
||||
@@ -82,3 +91,18 @@ func (_m *TrueUpReviewStore) Update(reviewStatus *model.TrueUpReviewStatus) (*mo
|
||||
|
||||
return r0, r1
|
||||
}
|
||||
|
||||
type mockConstructorTestingTNewTrueUpReviewStore interface {
|
||||
mock.TestingT
|
||||
Cleanup(func())
|
||||
}
|
||||
|
||||
// NewTrueUpReviewStore creates a new instance of TrueUpReviewStore. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations.
|
||||
func NewTrueUpReviewStore(t mockConstructorTestingTNewTrueUpReviewStore) *TrueUpReviewStore {
|
||||
mock := &TrueUpReviewStore{}
|
||||
mock.Mock.Test(t)
|
||||
|
||||
t.Cleanup(func() { mock.AssertExpectations(t) })
|
||||
|
||||
return mock
|
||||
}
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
// Code generated by mockery v2.10.4. DO NOT EDIT.
|
||||
// Code generated by mockery v2.23.2. DO NOT EDIT.
|
||||
|
||||
// Regenerate this file using `make store-mocks`.
|
||||
|
||||
@@ -35,6 +35,10 @@ func (_m *UploadSessionStore) Get(ctx context.Context, id string) (*model.Upload
|
||||
ret := _m.Called(ctx, id)
|
||||
|
||||
var r0 *model.UploadSession
|
||||
var r1 error
|
||||
if rf, ok := ret.Get(0).(func(context.Context, string) (*model.UploadSession, error)); ok {
|
||||
return rf(ctx, id)
|
||||
}
|
||||
if rf, ok := ret.Get(0).(func(context.Context, string) *model.UploadSession); ok {
|
||||
r0 = rf(ctx, id)
|
||||
} else {
|
||||
@@ -43,7 +47,6 @@ func (_m *UploadSessionStore) Get(ctx context.Context, id string) (*model.Upload
|
||||
}
|
||||
}
|
||||
|
||||
var r1 error
|
||||
if rf, ok := ret.Get(1).(func(context.Context, string) error); ok {
|
||||
r1 = rf(ctx, id)
|
||||
} else {
|
||||
@@ -58,6 +61,10 @@ func (_m *UploadSessionStore) GetForUser(userID string) ([]*model.UploadSession,
|
||||
ret := _m.Called(userID)
|
||||
|
||||
var r0 []*model.UploadSession
|
||||
var r1 error
|
||||
if rf, ok := ret.Get(0).(func(string) ([]*model.UploadSession, error)); ok {
|
||||
return rf(userID)
|
||||
}
|
||||
if rf, ok := ret.Get(0).(func(string) []*model.UploadSession); ok {
|
||||
r0 = rf(userID)
|
||||
} else {
|
||||
@@ -66,7 +73,6 @@ func (_m *UploadSessionStore) GetForUser(userID string) ([]*model.UploadSession,
|
||||
}
|
||||
}
|
||||
|
||||
var r1 error
|
||||
if rf, ok := ret.Get(1).(func(string) error); ok {
|
||||
r1 = rf(userID)
|
||||
} else {
|
||||
@@ -81,6 +87,10 @@ func (_m *UploadSessionStore) Save(session *model.UploadSession) (*model.UploadS
|
||||
ret := _m.Called(session)
|
||||
|
||||
var r0 *model.UploadSession
|
||||
var r1 error
|
||||
if rf, ok := ret.Get(0).(func(*model.UploadSession) (*model.UploadSession, error)); ok {
|
||||
return rf(session)
|
||||
}
|
||||
if rf, ok := ret.Get(0).(func(*model.UploadSession) *model.UploadSession); ok {
|
||||
r0 = rf(session)
|
||||
} else {
|
||||
@@ -89,7 +99,6 @@ func (_m *UploadSessionStore) Save(session *model.UploadSession) (*model.UploadS
|
||||
}
|
||||
}
|
||||
|
||||
var r1 error
|
||||
if rf, ok := ret.Get(1).(func(*model.UploadSession) error); ok {
|
||||
r1 = rf(session)
|
||||
} else {
|
||||
@@ -112,3 +121,18 @@ func (_m *UploadSessionStore) Update(session *model.UploadSession) error {
|
||||
|
||||
return r0
|
||||
}
|
||||
|
||||
type mockConstructorTestingTNewUploadSessionStore interface {
|
||||
mock.TestingT
|
||||
Cleanup(func())
|
||||
}
|
||||
|
||||
// NewUploadSessionStore creates a new instance of UploadSessionStore. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations.
|
||||
func NewUploadSessionStore(t mockConstructorTestingTNewUploadSessionStore) *UploadSessionStore {
|
||||
mock := &UploadSessionStore{}
|
||||
mock.Mock.Test(t)
|
||||
|
||||
t.Cleanup(func() { mock.AssertExpectations(t) })
|
||||
|
||||
return mock
|
||||
}
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
// Code generated by mockery v2.10.4. DO NOT EDIT.
|
||||
// Code generated by mockery v2.23.2. DO NOT EDIT.
|
||||
|
||||
// Regenerate this file using `make store-mocks`.
|
||||
|
||||
@@ -47,6 +47,10 @@ func (_m *UserAccessTokenStore) Get(tokenID string) (*model.UserAccessToken, err
|
||||
ret := _m.Called(tokenID)
|
||||
|
||||
var r0 *model.UserAccessToken
|
||||
var r1 error
|
||||
if rf, ok := ret.Get(0).(func(string) (*model.UserAccessToken, error)); ok {
|
||||
return rf(tokenID)
|
||||
}
|
||||
if rf, ok := ret.Get(0).(func(string) *model.UserAccessToken); ok {
|
||||
r0 = rf(tokenID)
|
||||
} else {
|
||||
@@ -55,7 +59,6 @@ func (_m *UserAccessTokenStore) Get(tokenID string) (*model.UserAccessToken, err
|
||||
}
|
||||
}
|
||||
|
||||
var r1 error
|
||||
if rf, ok := ret.Get(1).(func(string) error); ok {
|
||||
r1 = rf(tokenID)
|
||||
} else {
|
||||
@@ -70,6 +73,10 @@ func (_m *UserAccessTokenStore) GetAll(offset int, limit int) ([]*model.UserAcce
|
||||
ret := _m.Called(offset, limit)
|
||||
|
||||
var r0 []*model.UserAccessToken
|
||||
var r1 error
|
||||
if rf, ok := ret.Get(0).(func(int, int) ([]*model.UserAccessToken, error)); ok {
|
||||
return rf(offset, limit)
|
||||
}
|
||||
if rf, ok := ret.Get(0).(func(int, int) []*model.UserAccessToken); ok {
|
||||
r0 = rf(offset, limit)
|
||||
} else {
|
||||
@@ -78,7 +85,6 @@ func (_m *UserAccessTokenStore) GetAll(offset int, limit int) ([]*model.UserAcce
|
||||
}
|
||||
}
|
||||
|
||||
var r1 error
|
||||
if rf, ok := ret.Get(1).(func(int, int) error); ok {
|
||||
r1 = rf(offset, limit)
|
||||
} else {
|
||||
@@ -93,6 +99,10 @@ func (_m *UserAccessTokenStore) GetByToken(tokenString string) (*model.UserAcces
|
||||
ret := _m.Called(tokenString)
|
||||
|
||||
var r0 *model.UserAccessToken
|
||||
var r1 error
|
||||
if rf, ok := ret.Get(0).(func(string) (*model.UserAccessToken, error)); ok {
|
||||
return rf(tokenString)
|
||||
}
|
||||
if rf, ok := ret.Get(0).(func(string) *model.UserAccessToken); ok {
|
||||
r0 = rf(tokenString)
|
||||
} else {
|
||||
@@ -101,7 +111,6 @@ func (_m *UserAccessTokenStore) GetByToken(tokenString string) (*model.UserAcces
|
||||
}
|
||||
}
|
||||
|
||||
var r1 error
|
||||
if rf, ok := ret.Get(1).(func(string) error); ok {
|
||||
r1 = rf(tokenString)
|
||||
} else {
|
||||
@@ -116,6 +125,10 @@ func (_m *UserAccessTokenStore) GetByUser(userID string, page int, perPage int)
|
||||
ret := _m.Called(userID, page, perPage)
|
||||
|
||||
var r0 []*model.UserAccessToken
|
||||
var r1 error
|
||||
if rf, ok := ret.Get(0).(func(string, int, int) ([]*model.UserAccessToken, error)); ok {
|
||||
return rf(userID, page, perPage)
|
||||
}
|
||||
if rf, ok := ret.Get(0).(func(string, int, int) []*model.UserAccessToken); ok {
|
||||
r0 = rf(userID, page, perPage)
|
||||
} else {
|
||||
@@ -124,7 +137,6 @@ func (_m *UserAccessTokenStore) GetByUser(userID string, page int, perPage int)
|
||||
}
|
||||
}
|
||||
|
||||
var r1 error
|
||||
if rf, ok := ret.Get(1).(func(string, int, int) error); ok {
|
||||
r1 = rf(userID, page, perPage)
|
||||
} else {
|
||||
@@ -139,6 +151,10 @@ func (_m *UserAccessTokenStore) Save(token *model.UserAccessToken) (*model.UserA
|
||||
ret := _m.Called(token)
|
||||
|
||||
var r0 *model.UserAccessToken
|
||||
var r1 error
|
||||
if rf, ok := ret.Get(0).(func(*model.UserAccessToken) (*model.UserAccessToken, error)); ok {
|
||||
return rf(token)
|
||||
}
|
||||
if rf, ok := ret.Get(0).(func(*model.UserAccessToken) *model.UserAccessToken); ok {
|
||||
r0 = rf(token)
|
||||
} else {
|
||||
@@ -147,7 +163,6 @@ func (_m *UserAccessTokenStore) Save(token *model.UserAccessToken) (*model.UserA
|
||||
}
|
||||
}
|
||||
|
||||
var r1 error
|
||||
if rf, ok := ret.Get(1).(func(*model.UserAccessToken) error); ok {
|
||||
r1 = rf(token)
|
||||
} else {
|
||||
@@ -162,6 +177,10 @@ func (_m *UserAccessTokenStore) Search(term string) ([]*model.UserAccessToken, e
|
||||
ret := _m.Called(term)
|
||||
|
||||
var r0 []*model.UserAccessToken
|
||||
var r1 error
|
||||
if rf, ok := ret.Get(0).(func(string) ([]*model.UserAccessToken, error)); ok {
|
||||
return rf(term)
|
||||
}
|
||||
if rf, ok := ret.Get(0).(func(string) []*model.UserAccessToken); ok {
|
||||
r0 = rf(term)
|
||||
} else {
|
||||
@@ -170,7 +189,6 @@ func (_m *UserAccessTokenStore) Search(term string) ([]*model.UserAccessToken, e
|
||||
}
|
||||
}
|
||||
|
||||
var r1 error
|
||||
if rf, ok := ret.Get(1).(func(string) error); ok {
|
||||
r1 = rf(term)
|
||||
} else {
|
||||
@@ -207,3 +225,18 @@ func (_m *UserAccessTokenStore) UpdateTokenEnable(tokenID string) error {
|
||||
|
||||
return r0
|
||||
}
|
||||
|
||||
type mockConstructorTestingTNewUserAccessTokenStore interface {
|
||||
mock.TestingT
|
||||
Cleanup(func())
|
||||
}
|
||||
|
||||
// NewUserAccessTokenStore creates a new instance of UserAccessTokenStore. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations.
|
||||
func NewUserAccessTokenStore(t mockConstructorTestingTNewUserAccessTokenStore) *UserAccessTokenStore {
|
||||
mock := &UserAccessTokenStore{}
|
||||
mock.Mock.Test(t)
|
||||
|
||||
t.Cleanup(func() { mock.AssertExpectations(t) })
|
||||
|
||||
return mock
|
||||
}
|
||||
|
||||
Разница между файлами не показана из-за своего большого размера
Загрузить разницу
@@ -1,4 +1,4 @@
|
||||
// Code generated by mockery v2.10.4. DO NOT EDIT.
|
||||
// Code generated by mockery v2.23.2. DO NOT EDIT.
|
||||
|
||||
// Regenerate this file using `make store-mocks`.
|
||||
|
||||
@@ -33,6 +33,10 @@ func (_m *UserTermsOfServiceStore) GetByUser(userID string) (*model.UserTermsOfS
|
||||
ret := _m.Called(userID)
|
||||
|
||||
var r0 *model.UserTermsOfService
|
||||
var r1 error
|
||||
if rf, ok := ret.Get(0).(func(string) (*model.UserTermsOfService, error)); ok {
|
||||
return rf(userID)
|
||||
}
|
||||
if rf, ok := ret.Get(0).(func(string) *model.UserTermsOfService); ok {
|
||||
r0 = rf(userID)
|
||||
} else {
|
||||
@@ -41,7 +45,6 @@ func (_m *UserTermsOfServiceStore) GetByUser(userID string) (*model.UserTermsOfS
|
||||
}
|
||||
}
|
||||
|
||||
var r1 error
|
||||
if rf, ok := ret.Get(1).(func(string) error); ok {
|
||||
r1 = rf(userID)
|
||||
} else {
|
||||
@@ -56,6 +59,10 @@ func (_m *UserTermsOfServiceStore) Save(userTermsOfService *model.UserTermsOfSer
|
||||
ret := _m.Called(userTermsOfService)
|
||||
|
||||
var r0 *model.UserTermsOfService
|
||||
var r1 error
|
||||
if rf, ok := ret.Get(0).(func(*model.UserTermsOfService) (*model.UserTermsOfService, error)); ok {
|
||||
return rf(userTermsOfService)
|
||||
}
|
||||
if rf, ok := ret.Get(0).(func(*model.UserTermsOfService) *model.UserTermsOfService); ok {
|
||||
r0 = rf(userTermsOfService)
|
||||
} else {
|
||||
@@ -64,7 +71,6 @@ func (_m *UserTermsOfServiceStore) Save(userTermsOfService *model.UserTermsOfSer
|
||||
}
|
||||
}
|
||||
|
||||
var r1 error
|
||||
if rf, ok := ret.Get(1).(func(*model.UserTermsOfService) error); ok {
|
||||
r1 = rf(userTermsOfService)
|
||||
} else {
|
||||
@@ -73,3 +79,18 @@ func (_m *UserTermsOfServiceStore) Save(userTermsOfService *model.UserTermsOfSer
|
||||
|
||||
return r0, r1
|
||||
}
|
||||
|
||||
type mockConstructorTestingTNewUserTermsOfServiceStore interface {
|
||||
mock.TestingT
|
||||
Cleanup(func())
|
||||
}
|
||||
|
||||
// NewUserTermsOfServiceStore creates a new instance of UserTermsOfServiceStore. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations.
|
||||
func NewUserTermsOfServiceStore(t mockConstructorTestingTNewUserTermsOfServiceStore) *UserTermsOfServiceStore {
|
||||
mock := &UserTermsOfServiceStore{}
|
||||
mock.Mock.Test(t)
|
||||
|
||||
t.Cleanup(func() { mock.AssertExpectations(t) })
|
||||
|
||||
return mock
|
||||
}
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
// Code generated by mockery v2.10.4. DO NOT EDIT.
|
||||
// Code generated by mockery v2.23.2. DO NOT EDIT.
|
||||
|
||||
// Regenerate this file using `make store-mocks`.
|
||||
|
||||
@@ -19,13 +19,16 @@ func (_m *WebhookStore) AnalyticsIncomingCount(teamID string) (int64, error) {
|
||||
ret := _m.Called(teamID)
|
||||
|
||||
var r0 int64
|
||||
var r1 error
|
||||
if rf, ok := ret.Get(0).(func(string) (int64, error)); ok {
|
||||
return rf(teamID)
|
||||
}
|
||||
if rf, ok := ret.Get(0).(func(string) int64); ok {
|
||||
r0 = rf(teamID)
|
||||
} else {
|
||||
r0 = ret.Get(0).(int64)
|
||||
}
|
||||
|
||||
var r1 error
|
||||
if rf, ok := ret.Get(1).(func(string) error); ok {
|
||||
r1 = rf(teamID)
|
||||
} else {
|
||||
@@ -40,13 +43,16 @@ func (_m *WebhookStore) AnalyticsOutgoingCount(teamID string) (int64, error) {
|
||||
ret := _m.Called(teamID)
|
||||
|
||||
var r0 int64
|
||||
var r1 error
|
||||
if rf, ok := ret.Get(0).(func(string) (int64, error)); ok {
|
||||
return rf(teamID)
|
||||
}
|
||||
if rf, ok := ret.Get(0).(func(string) int64); ok {
|
||||
r0 = rf(teamID)
|
||||
} else {
|
||||
r0 = ret.Get(0).(int64)
|
||||
}
|
||||
|
||||
var r1 error
|
||||
if rf, ok := ret.Get(1).(func(string) error); ok {
|
||||
r1 = rf(teamID)
|
||||
} else {
|
||||
@@ -94,6 +100,10 @@ func (_m *WebhookStore) GetIncoming(id string, allowFromCache bool) (*model.Inco
|
||||
ret := _m.Called(id, allowFromCache)
|
||||
|
||||
var r0 *model.IncomingWebhook
|
||||
var r1 error
|
||||
if rf, ok := ret.Get(0).(func(string, bool) (*model.IncomingWebhook, error)); ok {
|
||||
return rf(id, allowFromCache)
|
||||
}
|
||||
if rf, ok := ret.Get(0).(func(string, bool) *model.IncomingWebhook); ok {
|
||||
r0 = rf(id, allowFromCache)
|
||||
} else {
|
||||
@@ -102,7 +112,6 @@ func (_m *WebhookStore) GetIncoming(id string, allowFromCache bool) (*model.Inco
|
||||
}
|
||||
}
|
||||
|
||||
var r1 error
|
||||
if rf, ok := ret.Get(1).(func(string, bool) error); ok {
|
||||
r1 = rf(id, allowFromCache)
|
||||
} else {
|
||||
@@ -117,6 +126,10 @@ func (_m *WebhookStore) GetIncomingByChannel(channelID string) ([]*model.Incomin
|
||||
ret := _m.Called(channelID)
|
||||
|
||||
var r0 []*model.IncomingWebhook
|
||||
var r1 error
|
||||
if rf, ok := ret.Get(0).(func(string) ([]*model.IncomingWebhook, error)); ok {
|
||||
return rf(channelID)
|
||||
}
|
||||
if rf, ok := ret.Get(0).(func(string) []*model.IncomingWebhook); ok {
|
||||
r0 = rf(channelID)
|
||||
} else {
|
||||
@@ -125,7 +138,6 @@ func (_m *WebhookStore) GetIncomingByChannel(channelID string) ([]*model.Incomin
|
||||
}
|
||||
}
|
||||
|
||||
var r1 error
|
||||
if rf, ok := ret.Get(1).(func(string) error); ok {
|
||||
r1 = rf(channelID)
|
||||
} else {
|
||||
@@ -140,6 +152,10 @@ func (_m *WebhookStore) GetIncomingByTeam(teamID string, offset int, limit int)
|
||||
ret := _m.Called(teamID, offset, limit)
|
||||
|
||||
var r0 []*model.IncomingWebhook
|
||||
var r1 error
|
||||
if rf, ok := ret.Get(0).(func(string, int, int) ([]*model.IncomingWebhook, error)); ok {
|
||||
return rf(teamID, offset, limit)
|
||||
}
|
||||
if rf, ok := ret.Get(0).(func(string, int, int) []*model.IncomingWebhook); ok {
|
||||
r0 = rf(teamID, offset, limit)
|
||||
} else {
|
||||
@@ -148,7 +164,6 @@ func (_m *WebhookStore) GetIncomingByTeam(teamID string, offset int, limit int)
|
||||
}
|
||||
}
|
||||
|
||||
var r1 error
|
||||
if rf, ok := ret.Get(1).(func(string, int, int) error); ok {
|
||||
r1 = rf(teamID, offset, limit)
|
||||
} else {
|
||||
@@ -163,6 +178,10 @@ func (_m *WebhookStore) GetIncomingByTeamByUser(teamID string, userID string, of
|
||||
ret := _m.Called(teamID, userID, offset, limit)
|
||||
|
||||
var r0 []*model.IncomingWebhook
|
||||
var r1 error
|
||||
if rf, ok := ret.Get(0).(func(string, string, int, int) ([]*model.IncomingWebhook, error)); ok {
|
||||
return rf(teamID, userID, offset, limit)
|
||||
}
|
||||
if rf, ok := ret.Get(0).(func(string, string, int, int) []*model.IncomingWebhook); ok {
|
||||
r0 = rf(teamID, userID, offset, limit)
|
||||
} else {
|
||||
@@ -171,7 +190,6 @@ func (_m *WebhookStore) GetIncomingByTeamByUser(teamID string, userID string, of
|
||||
}
|
||||
}
|
||||
|
||||
var r1 error
|
||||
if rf, ok := ret.Get(1).(func(string, string, int, int) error); ok {
|
||||
r1 = rf(teamID, userID, offset, limit)
|
||||
} else {
|
||||
@@ -186,6 +204,10 @@ func (_m *WebhookStore) GetIncomingList(offset int, limit int) ([]*model.Incomin
|
||||
ret := _m.Called(offset, limit)
|
||||
|
||||
var r0 []*model.IncomingWebhook
|
||||
var r1 error
|
||||
if rf, ok := ret.Get(0).(func(int, int) ([]*model.IncomingWebhook, error)); ok {
|
||||
return rf(offset, limit)
|
||||
}
|
||||
if rf, ok := ret.Get(0).(func(int, int) []*model.IncomingWebhook); ok {
|
||||
r0 = rf(offset, limit)
|
||||
} else {
|
||||
@@ -194,7 +216,6 @@ func (_m *WebhookStore) GetIncomingList(offset int, limit int) ([]*model.Incomin
|
||||
}
|
||||
}
|
||||
|
||||
var r1 error
|
||||
if rf, ok := ret.Get(1).(func(int, int) error); ok {
|
||||
r1 = rf(offset, limit)
|
||||
} else {
|
||||
@@ -209,6 +230,10 @@ func (_m *WebhookStore) GetIncomingListByUser(userID string, offset int, limit i
|
||||
ret := _m.Called(userID, offset, limit)
|
||||
|
||||
var r0 []*model.IncomingWebhook
|
||||
var r1 error
|
||||
if rf, ok := ret.Get(0).(func(string, int, int) ([]*model.IncomingWebhook, error)); ok {
|
||||
return rf(userID, offset, limit)
|
||||
}
|
||||
if rf, ok := ret.Get(0).(func(string, int, int) []*model.IncomingWebhook); ok {
|
||||
r0 = rf(userID, offset, limit)
|
||||
} else {
|
||||
@@ -217,7 +242,6 @@ func (_m *WebhookStore) GetIncomingListByUser(userID string, offset int, limit i
|
||||
}
|
||||
}
|
||||
|
||||
var r1 error
|
||||
if rf, ok := ret.Get(1).(func(string, int, int) error); ok {
|
||||
r1 = rf(userID, offset, limit)
|
||||
} else {
|
||||
@@ -232,6 +256,10 @@ func (_m *WebhookStore) GetOutgoing(id string) (*model.OutgoingWebhook, error) {
|
||||
ret := _m.Called(id)
|
||||
|
||||
var r0 *model.OutgoingWebhook
|
||||
var r1 error
|
||||
if rf, ok := ret.Get(0).(func(string) (*model.OutgoingWebhook, error)); ok {
|
||||
return rf(id)
|
||||
}
|
||||
if rf, ok := ret.Get(0).(func(string) *model.OutgoingWebhook); ok {
|
||||
r0 = rf(id)
|
||||
} else {
|
||||
@@ -240,7 +268,6 @@ func (_m *WebhookStore) GetOutgoing(id string) (*model.OutgoingWebhook, error) {
|
||||
}
|
||||
}
|
||||
|
||||
var r1 error
|
||||
if rf, ok := ret.Get(1).(func(string) error); ok {
|
||||
r1 = rf(id)
|
||||
} else {
|
||||
@@ -255,6 +282,10 @@ func (_m *WebhookStore) GetOutgoingByChannel(channelID string, offset int, limit
|
||||
ret := _m.Called(channelID, offset, limit)
|
||||
|
||||
var r0 []*model.OutgoingWebhook
|
||||
var r1 error
|
||||
if rf, ok := ret.Get(0).(func(string, int, int) ([]*model.OutgoingWebhook, error)); ok {
|
||||
return rf(channelID, offset, limit)
|
||||
}
|
||||
if rf, ok := ret.Get(0).(func(string, int, int) []*model.OutgoingWebhook); ok {
|
||||
r0 = rf(channelID, offset, limit)
|
||||
} else {
|
||||
@@ -263,7 +294,6 @@ func (_m *WebhookStore) GetOutgoingByChannel(channelID string, offset int, limit
|
||||
}
|
||||
}
|
||||
|
||||
var r1 error
|
||||
if rf, ok := ret.Get(1).(func(string, int, int) error); ok {
|
||||
r1 = rf(channelID, offset, limit)
|
||||
} else {
|
||||
@@ -278,6 +308,10 @@ func (_m *WebhookStore) GetOutgoingByChannelByUser(channelID string, userID stri
|
||||
ret := _m.Called(channelID, userID, offset, limit)
|
||||
|
||||
var r0 []*model.OutgoingWebhook
|
||||
var r1 error
|
||||
if rf, ok := ret.Get(0).(func(string, string, int, int) ([]*model.OutgoingWebhook, error)); ok {
|
||||
return rf(channelID, userID, offset, limit)
|
||||
}
|
||||
if rf, ok := ret.Get(0).(func(string, string, int, int) []*model.OutgoingWebhook); ok {
|
||||
r0 = rf(channelID, userID, offset, limit)
|
||||
} else {
|
||||
@@ -286,7 +320,6 @@ func (_m *WebhookStore) GetOutgoingByChannelByUser(channelID string, userID stri
|
||||
}
|
||||
}
|
||||
|
||||
var r1 error
|
||||
if rf, ok := ret.Get(1).(func(string, string, int, int) error); ok {
|
||||
r1 = rf(channelID, userID, offset, limit)
|
||||
} else {
|
||||
@@ -301,6 +334,10 @@ func (_m *WebhookStore) GetOutgoingByTeam(teamID string, offset int, limit int)
|
||||
ret := _m.Called(teamID, offset, limit)
|
||||
|
||||
var r0 []*model.OutgoingWebhook
|
||||
var r1 error
|
||||
if rf, ok := ret.Get(0).(func(string, int, int) ([]*model.OutgoingWebhook, error)); ok {
|
||||
return rf(teamID, offset, limit)
|
||||
}
|
||||
if rf, ok := ret.Get(0).(func(string, int, int) []*model.OutgoingWebhook); ok {
|
||||
r0 = rf(teamID, offset, limit)
|
||||
} else {
|
||||
@@ -309,7 +346,6 @@ func (_m *WebhookStore) GetOutgoingByTeam(teamID string, offset int, limit int)
|
||||
}
|
||||
}
|
||||
|
||||
var r1 error
|
||||
if rf, ok := ret.Get(1).(func(string, int, int) error); ok {
|
||||
r1 = rf(teamID, offset, limit)
|
||||
} else {
|
||||
@@ -324,6 +360,10 @@ func (_m *WebhookStore) GetOutgoingByTeamByUser(teamID string, userID string, of
|
||||
ret := _m.Called(teamID, userID, offset, limit)
|
||||
|
||||
var r0 []*model.OutgoingWebhook
|
||||
var r1 error
|
||||
if rf, ok := ret.Get(0).(func(string, string, int, int) ([]*model.OutgoingWebhook, error)); ok {
|
||||
return rf(teamID, userID, offset, limit)
|
||||
}
|
||||
if rf, ok := ret.Get(0).(func(string, string, int, int) []*model.OutgoingWebhook); ok {
|
||||
r0 = rf(teamID, userID, offset, limit)
|
||||
} else {
|
||||
@@ -332,7 +372,6 @@ func (_m *WebhookStore) GetOutgoingByTeamByUser(teamID string, userID string, of
|
||||
}
|
||||
}
|
||||
|
||||
var r1 error
|
||||
if rf, ok := ret.Get(1).(func(string, string, int, int) error); ok {
|
||||
r1 = rf(teamID, userID, offset, limit)
|
||||
} else {
|
||||
@@ -347,6 +386,10 @@ func (_m *WebhookStore) GetOutgoingList(offset int, limit int) ([]*model.Outgoin
|
||||
ret := _m.Called(offset, limit)
|
||||
|
||||
var r0 []*model.OutgoingWebhook
|
||||
var r1 error
|
||||
if rf, ok := ret.Get(0).(func(int, int) ([]*model.OutgoingWebhook, error)); ok {
|
||||
return rf(offset, limit)
|
||||
}
|
||||
if rf, ok := ret.Get(0).(func(int, int) []*model.OutgoingWebhook); ok {
|
||||
r0 = rf(offset, limit)
|
||||
} else {
|
||||
@@ -355,7 +398,6 @@ func (_m *WebhookStore) GetOutgoingList(offset int, limit int) ([]*model.Outgoin
|
||||
}
|
||||
}
|
||||
|
||||
var r1 error
|
||||
if rf, ok := ret.Get(1).(func(int, int) error); ok {
|
||||
r1 = rf(offset, limit)
|
||||
} else {
|
||||
@@ -370,6 +412,10 @@ func (_m *WebhookStore) GetOutgoingListByUser(userID string, offset int, limit i
|
||||
ret := _m.Called(userID, offset, limit)
|
||||
|
||||
var r0 []*model.OutgoingWebhook
|
||||
var r1 error
|
||||
if rf, ok := ret.Get(0).(func(string, int, int) ([]*model.OutgoingWebhook, error)); ok {
|
||||
return rf(userID, offset, limit)
|
||||
}
|
||||
if rf, ok := ret.Get(0).(func(string, int, int) []*model.OutgoingWebhook); ok {
|
||||
r0 = rf(userID, offset, limit)
|
||||
} else {
|
||||
@@ -378,7 +424,6 @@ func (_m *WebhookStore) GetOutgoingListByUser(userID string, offset int, limit i
|
||||
}
|
||||
}
|
||||
|
||||
var r1 error
|
||||
if rf, ok := ret.Get(1).(func(string, int, int) error); ok {
|
||||
r1 = rf(userID, offset, limit)
|
||||
} else {
|
||||
@@ -454,6 +499,10 @@ func (_m *WebhookStore) SaveIncoming(webhook *model.IncomingWebhook) (*model.Inc
|
||||
ret := _m.Called(webhook)
|
||||
|
||||
var r0 *model.IncomingWebhook
|
||||
var r1 error
|
||||
if rf, ok := ret.Get(0).(func(*model.IncomingWebhook) (*model.IncomingWebhook, error)); ok {
|
||||
return rf(webhook)
|
||||
}
|
||||
if rf, ok := ret.Get(0).(func(*model.IncomingWebhook) *model.IncomingWebhook); ok {
|
||||
r0 = rf(webhook)
|
||||
} else {
|
||||
@@ -462,7 +511,6 @@ func (_m *WebhookStore) SaveIncoming(webhook *model.IncomingWebhook) (*model.Inc
|
||||
}
|
||||
}
|
||||
|
||||
var r1 error
|
||||
if rf, ok := ret.Get(1).(func(*model.IncomingWebhook) error); ok {
|
||||
r1 = rf(webhook)
|
||||
} else {
|
||||
@@ -477,6 +525,10 @@ func (_m *WebhookStore) SaveOutgoing(webhook *model.OutgoingWebhook) (*model.Out
|
||||
ret := _m.Called(webhook)
|
||||
|
||||
var r0 *model.OutgoingWebhook
|
||||
var r1 error
|
||||
if rf, ok := ret.Get(0).(func(*model.OutgoingWebhook) (*model.OutgoingWebhook, error)); ok {
|
||||
return rf(webhook)
|
||||
}
|
||||
if rf, ok := ret.Get(0).(func(*model.OutgoingWebhook) *model.OutgoingWebhook); ok {
|
||||
r0 = rf(webhook)
|
||||
} else {
|
||||
@@ -485,7 +537,6 @@ func (_m *WebhookStore) SaveOutgoing(webhook *model.OutgoingWebhook) (*model.Out
|
||||
}
|
||||
}
|
||||
|
||||
var r1 error
|
||||
if rf, ok := ret.Get(1).(func(*model.OutgoingWebhook) error); ok {
|
||||
r1 = rf(webhook)
|
||||
} else {
|
||||
@@ -500,6 +551,10 @@ func (_m *WebhookStore) UpdateIncoming(webhook *model.IncomingWebhook) (*model.I
|
||||
ret := _m.Called(webhook)
|
||||
|
||||
var r0 *model.IncomingWebhook
|
||||
var r1 error
|
||||
if rf, ok := ret.Get(0).(func(*model.IncomingWebhook) (*model.IncomingWebhook, error)); ok {
|
||||
return rf(webhook)
|
||||
}
|
||||
if rf, ok := ret.Get(0).(func(*model.IncomingWebhook) *model.IncomingWebhook); ok {
|
||||
r0 = rf(webhook)
|
||||
} else {
|
||||
@@ -508,7 +563,6 @@ func (_m *WebhookStore) UpdateIncoming(webhook *model.IncomingWebhook) (*model.I
|
||||
}
|
||||
}
|
||||
|
||||
var r1 error
|
||||
if rf, ok := ret.Get(1).(func(*model.IncomingWebhook) error); ok {
|
||||
r1 = rf(webhook)
|
||||
} else {
|
||||
@@ -523,6 +577,10 @@ func (_m *WebhookStore) UpdateOutgoing(hook *model.OutgoingWebhook) (*model.Outg
|
||||
ret := _m.Called(hook)
|
||||
|
||||
var r0 *model.OutgoingWebhook
|
||||
var r1 error
|
||||
if rf, ok := ret.Get(0).(func(*model.OutgoingWebhook) (*model.OutgoingWebhook, error)); ok {
|
||||
return rf(hook)
|
||||
}
|
||||
if rf, ok := ret.Get(0).(func(*model.OutgoingWebhook) *model.OutgoingWebhook); ok {
|
||||
r0 = rf(hook)
|
||||
} else {
|
||||
@@ -531,7 +589,6 @@ func (_m *WebhookStore) UpdateOutgoing(hook *model.OutgoingWebhook) (*model.Outg
|
||||
}
|
||||
}
|
||||
|
||||
var r1 error
|
||||
if rf, ok := ret.Get(1).(func(*model.OutgoingWebhook) error); ok {
|
||||
r1 = rf(hook)
|
||||
} else {
|
||||
@@ -540,3 +597,18 @@ func (_m *WebhookStore) UpdateOutgoing(hook *model.OutgoingWebhook) (*model.Outg
|
||||
|
||||
return r0, r1
|
||||
}
|
||||
|
||||
type mockConstructorTestingTNewWebhookStore interface {
|
||||
mock.TestingT
|
||||
Cleanup(func())
|
||||
}
|
||||
|
||||
// NewWebhookStore creates a new instance of WebhookStore. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations.
|
||||
func NewWebhookStore(t mockConstructorTestingTNewWebhookStore) *WebhookStore {
|
||||
mock := &WebhookStore{}
|
||||
mock.Mock.Test(t)
|
||||
|
||||
t.Cleanup(func() { mock.AssertExpectations(t) })
|
||||
|
||||
return mock
|
||||
}
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
// Code generated by mockery v2.10.4. DO NOT EDIT.
|
||||
// Code generated by mockery v2.23.2. DO NOT EDIT.
|
||||
|
||||
// Regenerate this file using `make misc-mocks`.
|
||||
|
||||
@@ -19,6 +19,10 @@ func (_m *LicenseValidatorIface) LicenseFromBytes(licenseBytes []byte) (*model.L
|
||||
ret := _m.Called(licenseBytes)
|
||||
|
||||
var r0 *model.License
|
||||
var r1 *model.AppError
|
||||
if rf, ok := ret.Get(0).(func([]byte) (*model.License, *model.AppError)); ok {
|
||||
return rf(licenseBytes)
|
||||
}
|
||||
if rf, ok := ret.Get(0).(func([]byte) *model.License); ok {
|
||||
r0 = rf(licenseBytes)
|
||||
} else {
|
||||
@@ -27,7 +31,6 @@ func (_m *LicenseValidatorIface) LicenseFromBytes(licenseBytes []byte) (*model.L
|
||||
}
|
||||
}
|
||||
|
||||
var r1 *model.AppError
|
||||
if rf, ok := ret.Get(1).(func([]byte) *model.AppError); ok {
|
||||
r1 = rf(licenseBytes)
|
||||
} else {
|
||||
@@ -44,13 +47,16 @@ func (_m *LicenseValidatorIface) ValidateLicense(signed []byte) (bool, string) {
|
||||
ret := _m.Called(signed)
|
||||
|
||||
var r0 bool
|
||||
var r1 string
|
||||
if rf, ok := ret.Get(0).(func([]byte) (bool, string)); ok {
|
||||
return rf(signed)
|
||||
}
|
||||
if rf, ok := ret.Get(0).(func([]byte) bool); ok {
|
||||
r0 = rf(signed)
|
||||
} else {
|
||||
r0 = ret.Get(0).(bool)
|
||||
}
|
||||
|
||||
var r1 string
|
||||
if rf, ok := ret.Get(1).(func([]byte) string); ok {
|
||||
r1 = rf(signed)
|
||||
} else {
|
||||
@@ -59,3 +65,18 @@ func (_m *LicenseValidatorIface) ValidateLicense(signed []byte) (bool, string) {
|
||||
|
||||
return r0, r1
|
||||
}
|
||||
|
||||
type mockConstructorTestingTNewLicenseValidatorIface interface {
|
||||
mock.TestingT
|
||||
Cleanup(func())
|
||||
}
|
||||
|
||||
// NewLicenseValidatorIface creates a new instance of LicenseValidatorIface. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations.
|
||||
func NewLicenseValidatorIface(t mockConstructorTestingTNewLicenseValidatorIface) *LicenseValidatorIface {
|
||||
mock := &LicenseValidatorIface{}
|
||||
mock.Mock.Test(t)
|
||||
|
||||
t.Cleanup(func() { mock.AssertExpectations(t) })
|
||||
|
||||
return mock
|
||||
}
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
// Code generated by mockery v2.10.4. DO NOT EDIT.
|
||||
// Code generated by mockery v2.23.2. DO NOT EDIT.
|
||||
|
||||
// Regenerate this file using `make searchengine-mocks`.
|
||||
|
||||
@@ -405,6 +405,10 @@ func (_m *SearchEngineInterface) SearchChannels(teamId string, userID string, te
|
||||
ret := _m.Called(teamId, userID, term, isGuest)
|
||||
|
||||
var r0 []string
|
||||
var r1 *model.AppError
|
||||
if rf, ok := ret.Get(0).(func(string, string, string, bool) ([]string, *model.AppError)); ok {
|
||||
return rf(teamId, userID, term, isGuest)
|
||||
}
|
||||
if rf, ok := ret.Get(0).(func(string, string, string, bool) []string); ok {
|
||||
r0 = rf(teamId, userID, term, isGuest)
|
||||
} else {
|
||||
@@ -413,7 +417,6 @@ func (_m *SearchEngineInterface) SearchChannels(teamId string, userID string, te
|
||||
}
|
||||
}
|
||||
|
||||
var r1 *model.AppError
|
||||
if rf, ok := ret.Get(1).(func(string, string, string, bool) *model.AppError); ok {
|
||||
r1 = rf(teamId, userID, term, isGuest)
|
||||
} else {
|
||||
@@ -430,6 +433,10 @@ func (_m *SearchEngineInterface) SearchFiles(channels model.ChannelList, searchP
|
||||
ret := _m.Called(channels, searchParams, page, perPage)
|
||||
|
||||
var r0 []string
|
||||
var r1 *model.AppError
|
||||
if rf, ok := ret.Get(0).(func(model.ChannelList, []*model.SearchParams, int, int) ([]string, *model.AppError)); ok {
|
||||
return rf(channels, searchParams, page, perPage)
|
||||
}
|
||||
if rf, ok := ret.Get(0).(func(model.ChannelList, []*model.SearchParams, int, int) []string); ok {
|
||||
r0 = rf(channels, searchParams, page, perPage)
|
||||
} else {
|
||||
@@ -438,7 +445,6 @@ func (_m *SearchEngineInterface) SearchFiles(channels model.ChannelList, searchP
|
||||
}
|
||||
}
|
||||
|
||||
var r1 *model.AppError
|
||||
if rf, ok := ret.Get(1).(func(model.ChannelList, []*model.SearchParams, int, int) *model.AppError); ok {
|
||||
r1 = rf(channels, searchParams, page, perPage)
|
||||
} else {
|
||||
@@ -455,6 +461,11 @@ func (_m *SearchEngineInterface) SearchPosts(channels model.ChannelList, searchP
|
||||
ret := _m.Called(channels, searchParams, page, perPage)
|
||||
|
||||
var r0 []string
|
||||
var r1 model.PostSearchMatches
|
||||
var r2 *model.AppError
|
||||
if rf, ok := ret.Get(0).(func(model.ChannelList, []*model.SearchParams, int, int) ([]string, model.PostSearchMatches, *model.AppError)); ok {
|
||||
return rf(channels, searchParams, page, perPage)
|
||||
}
|
||||
if rf, ok := ret.Get(0).(func(model.ChannelList, []*model.SearchParams, int, int) []string); ok {
|
||||
r0 = rf(channels, searchParams, page, perPage)
|
||||
} else {
|
||||
@@ -463,7 +474,6 @@ func (_m *SearchEngineInterface) SearchPosts(channels model.ChannelList, searchP
|
||||
}
|
||||
}
|
||||
|
||||
var r1 model.PostSearchMatches
|
||||
if rf, ok := ret.Get(1).(func(model.ChannelList, []*model.SearchParams, int, int) model.PostSearchMatches); ok {
|
||||
r1 = rf(channels, searchParams, page, perPage)
|
||||
} else {
|
||||
@@ -472,7 +482,6 @@ func (_m *SearchEngineInterface) SearchPosts(channels model.ChannelList, searchP
|
||||
}
|
||||
}
|
||||
|
||||
var r2 *model.AppError
|
||||
if rf, ok := ret.Get(2).(func(model.ChannelList, []*model.SearchParams, int, int) *model.AppError); ok {
|
||||
r2 = rf(channels, searchParams, page, perPage)
|
||||
} else {
|
||||
@@ -489,6 +498,11 @@ func (_m *SearchEngineInterface) SearchUsersInChannel(teamId string, channelId s
|
||||
ret := _m.Called(teamId, channelId, restrictedToChannels, term, options)
|
||||
|
||||
var r0 []string
|
||||
var r1 []string
|
||||
var r2 *model.AppError
|
||||
if rf, ok := ret.Get(0).(func(string, string, []string, string, *model.UserSearchOptions) ([]string, []string, *model.AppError)); ok {
|
||||
return rf(teamId, channelId, restrictedToChannels, term, options)
|
||||
}
|
||||
if rf, ok := ret.Get(0).(func(string, string, []string, string, *model.UserSearchOptions) []string); ok {
|
||||
r0 = rf(teamId, channelId, restrictedToChannels, term, options)
|
||||
} else {
|
||||
@@ -497,7 +511,6 @@ func (_m *SearchEngineInterface) SearchUsersInChannel(teamId string, channelId s
|
||||
}
|
||||
}
|
||||
|
||||
var r1 []string
|
||||
if rf, ok := ret.Get(1).(func(string, string, []string, string, *model.UserSearchOptions) []string); ok {
|
||||
r1 = rf(teamId, channelId, restrictedToChannels, term, options)
|
||||
} else {
|
||||
@@ -506,7 +519,6 @@ func (_m *SearchEngineInterface) SearchUsersInChannel(teamId string, channelId s
|
||||
}
|
||||
}
|
||||
|
||||
var r2 *model.AppError
|
||||
if rf, ok := ret.Get(2).(func(string, string, []string, string, *model.UserSearchOptions) *model.AppError); ok {
|
||||
r2 = rf(teamId, channelId, restrictedToChannels, term, options)
|
||||
} else {
|
||||
@@ -523,6 +535,10 @@ func (_m *SearchEngineInterface) SearchUsersInTeam(teamId string, restrictedToCh
|
||||
ret := _m.Called(teamId, restrictedToChannels, term, options)
|
||||
|
||||
var r0 []string
|
||||
var r1 *model.AppError
|
||||
if rf, ok := ret.Get(0).(func(string, []string, string, *model.UserSearchOptions) ([]string, *model.AppError)); ok {
|
||||
return rf(teamId, restrictedToChannels, term, options)
|
||||
}
|
||||
if rf, ok := ret.Get(0).(func(string, []string, string, *model.UserSearchOptions) []string); ok {
|
||||
r0 = rf(teamId, restrictedToChannels, term, options)
|
||||
} else {
|
||||
@@ -531,7 +547,6 @@ func (_m *SearchEngineInterface) SearchUsersInTeam(teamId string, restrictedToCh
|
||||
}
|
||||
}
|
||||
|
||||
var r1 *model.AppError
|
||||
if rf, ok := ret.Get(1).(func(string, []string, string, *model.UserSearchOptions) *model.AppError); ok {
|
||||
r1 = rf(teamId, restrictedToChannels, term, options)
|
||||
} else {
|
||||
@@ -595,3 +610,18 @@ func (_m *SearchEngineInterface) TestConfig(cfg *model.Config) *model.AppError {
|
||||
func (_m *SearchEngineInterface) UpdateConfig(cfg *model.Config) {
|
||||
_m.Called(cfg)
|
||||
}
|
||||
|
||||
type mockConstructorTestingTNewSearchEngineInterface interface {
|
||||
mock.TestingT
|
||||
Cleanup(func())
|
||||
}
|
||||
|
||||
// NewSearchEngineInterface creates a new instance of SearchEngineInterface. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations.
|
||||
func NewSearchEngineInterface(t mockConstructorTestingTNewSearchEngineInterface) *SearchEngineInterface {
|
||||
mock := &SearchEngineInterface{}
|
||||
mock.Mock.Test(t)
|
||||
|
||||
t.Cleanup(func() { mock.AssertExpectations(t) })
|
||||
|
||||
return mock
|
||||
}
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
// Code generated by mockery v2.10.4. DO NOT EDIT.
|
||||
// Code generated by mockery v2.23.2. DO NOT EDIT.
|
||||
|
||||
// Regenerate this file using `make sharedchannel-mocks`.
|
||||
|
||||
@@ -23,6 +23,10 @@ func (_m *MockAppIface) AddUserToChannel(c request.CTX, user *model.User, channe
|
||||
ret := _m.Called(c, user, channel, skipTeamMemberIntegrityCheck)
|
||||
|
||||
var r0 *model.ChannelMember
|
||||
var r1 *model.AppError
|
||||
if rf, ok := ret.Get(0).(func(request.CTX, *model.User, *model.Channel, bool) (*model.ChannelMember, *model.AppError)); ok {
|
||||
return rf(c, user, channel, skipTeamMemberIntegrityCheck)
|
||||
}
|
||||
if rf, ok := ret.Get(0).(func(request.CTX, *model.User, *model.Channel, bool) *model.ChannelMember); ok {
|
||||
r0 = rf(c, user, channel, skipTeamMemberIntegrityCheck)
|
||||
} else {
|
||||
@@ -31,7 +35,6 @@ func (_m *MockAppIface) AddUserToChannel(c request.CTX, user *model.User, channe
|
||||
}
|
||||
}
|
||||
|
||||
var r1 *model.AppError
|
||||
if rf, ok := ret.Get(1).(func(request.CTX, *model.User, *model.Channel, bool) *model.AppError); ok {
|
||||
r1 = rf(c, user, channel, skipTeamMemberIntegrityCheck)
|
||||
} else {
|
||||
@@ -64,6 +67,10 @@ func (_m *MockAppIface) CreateChannelWithUser(c request.CTX, channel *model.Chan
|
||||
ret := _m.Called(c, channel, userId)
|
||||
|
||||
var r0 *model.Channel
|
||||
var r1 *model.AppError
|
||||
if rf, ok := ret.Get(0).(func(request.CTX, *model.Channel, string) (*model.Channel, *model.AppError)); ok {
|
||||
return rf(c, channel, userId)
|
||||
}
|
||||
if rf, ok := ret.Get(0).(func(request.CTX, *model.Channel, string) *model.Channel); ok {
|
||||
r0 = rf(c, channel, userId)
|
||||
} else {
|
||||
@@ -72,7 +79,6 @@ func (_m *MockAppIface) CreateChannelWithUser(c request.CTX, channel *model.Chan
|
||||
}
|
||||
}
|
||||
|
||||
var r1 *model.AppError
|
||||
if rf, ok := ret.Get(1).(func(request.CTX, *model.Channel, string) *model.AppError); ok {
|
||||
r1 = rf(c, channel, userId)
|
||||
} else {
|
||||
@@ -89,6 +95,10 @@ func (_m *MockAppIface) CreatePost(c request.CTX, post *model.Post, channel *mod
|
||||
ret := _m.Called(c, post, channel, triggerWebhooks, setOnline)
|
||||
|
||||
var r0 *model.Post
|
||||
var r1 *model.AppError
|
||||
if rf, ok := ret.Get(0).(func(request.CTX, *model.Post, *model.Channel, bool, bool) (*model.Post, *model.AppError)); ok {
|
||||
return rf(c, post, channel, triggerWebhooks, setOnline)
|
||||
}
|
||||
if rf, ok := ret.Get(0).(func(request.CTX, *model.Post, *model.Channel, bool, bool) *model.Post); ok {
|
||||
r0 = rf(c, post, channel, triggerWebhooks, setOnline)
|
||||
} else {
|
||||
@@ -97,7 +107,6 @@ func (_m *MockAppIface) CreatePost(c request.CTX, post *model.Post, channel *mod
|
||||
}
|
||||
}
|
||||
|
||||
var r1 *model.AppError
|
||||
if rf, ok := ret.Get(1).(func(request.CTX, *model.Post, *model.Channel, bool, bool) *model.AppError); ok {
|
||||
r1 = rf(c, post, channel, triggerWebhooks, setOnline)
|
||||
} else {
|
||||
@@ -114,6 +123,10 @@ func (_m *MockAppIface) CreateUploadSession(c request.CTX, us *model.UploadSessi
|
||||
ret := _m.Called(c, us)
|
||||
|
||||
var r0 *model.UploadSession
|
||||
var r1 *model.AppError
|
||||
if rf, ok := ret.Get(0).(func(request.CTX, *model.UploadSession) (*model.UploadSession, *model.AppError)); ok {
|
||||
return rf(c, us)
|
||||
}
|
||||
if rf, ok := ret.Get(0).(func(request.CTX, *model.UploadSession) *model.UploadSession); ok {
|
||||
r0 = rf(c, us)
|
||||
} else {
|
||||
@@ -122,7 +135,6 @@ func (_m *MockAppIface) CreateUploadSession(c request.CTX, us *model.UploadSessi
|
||||
}
|
||||
}
|
||||
|
||||
var r1 *model.AppError
|
||||
if rf, ok := ret.Get(1).(func(request.CTX, *model.UploadSession) *model.AppError); ok {
|
||||
r1 = rf(c, us)
|
||||
} else {
|
||||
@@ -139,6 +151,10 @@ func (_m *MockAppIface) DeletePost(c request.CTX, postID string, deleteByID stri
|
||||
ret := _m.Called(c, postID, deleteByID)
|
||||
|
||||
var r0 *model.Post
|
||||
var r1 *model.AppError
|
||||
if rf, ok := ret.Get(0).(func(request.CTX, string, string) (*model.Post, *model.AppError)); ok {
|
||||
return rf(c, postID, deleteByID)
|
||||
}
|
||||
if rf, ok := ret.Get(0).(func(request.CTX, string, string) *model.Post); ok {
|
||||
r0 = rf(c, postID, deleteByID)
|
||||
} else {
|
||||
@@ -147,7 +163,6 @@ func (_m *MockAppIface) DeletePost(c request.CTX, postID string, deleteByID stri
|
||||
}
|
||||
}
|
||||
|
||||
var r1 *model.AppError
|
||||
if rf, ok := ret.Get(1).(func(request.CTX, string, string) *model.AppError); ok {
|
||||
r1 = rf(c, postID, deleteByID)
|
||||
} else {
|
||||
@@ -180,6 +195,10 @@ func (_m *MockAppIface) FileReader(path string) (filestore.ReadCloseSeeker, *mod
|
||||
ret := _m.Called(path)
|
||||
|
||||
var r0 filestore.ReadCloseSeeker
|
||||
var r1 *model.AppError
|
||||
if rf, ok := ret.Get(0).(func(string) (filestore.ReadCloseSeeker, *model.AppError)); ok {
|
||||
return rf(path)
|
||||
}
|
||||
if rf, ok := ret.Get(0).(func(string) filestore.ReadCloseSeeker); ok {
|
||||
r0 = rf(path)
|
||||
} else {
|
||||
@@ -188,7 +207,6 @@ func (_m *MockAppIface) FileReader(path string) (filestore.ReadCloseSeeker, *mod
|
||||
}
|
||||
}
|
||||
|
||||
var r1 *model.AppError
|
||||
if rf, ok := ret.Get(1).(func(string) *model.AppError); ok {
|
||||
r1 = rf(path)
|
||||
} else {
|
||||
@@ -212,6 +230,10 @@ func (_m *MockAppIface) GetOrCreateDirectChannel(c request.CTX, userId string, o
|
||||
ret := _m.Called(_ca...)
|
||||
|
||||
var r0 *model.Channel
|
||||
var r1 *model.AppError
|
||||
if rf, ok := ret.Get(0).(func(request.CTX, string, string, ...model.ChannelOption) (*model.Channel, *model.AppError)); ok {
|
||||
return rf(c, userId, otherUserId, channelOptions...)
|
||||
}
|
||||
if rf, ok := ret.Get(0).(func(request.CTX, string, string, ...model.ChannelOption) *model.Channel); ok {
|
||||
r0 = rf(c, userId, otherUserId, channelOptions...)
|
||||
} else {
|
||||
@@ -220,7 +242,6 @@ func (_m *MockAppIface) GetOrCreateDirectChannel(c request.CTX, userId string, o
|
||||
}
|
||||
}
|
||||
|
||||
var r1 *model.AppError
|
||||
if rf, ok := ret.Get(1).(func(request.CTX, string, string, ...model.ChannelOption) *model.AppError); ok {
|
||||
r1 = rf(c, userId, otherUserId, channelOptions...)
|
||||
} else {
|
||||
@@ -237,6 +258,11 @@ func (_m *MockAppIface) GetProfileImage(user *model.User) ([]byte, bool, *model.
|
||||
ret := _m.Called(user)
|
||||
|
||||
var r0 []byte
|
||||
var r1 bool
|
||||
var r2 *model.AppError
|
||||
if rf, ok := ret.Get(0).(func(*model.User) ([]byte, bool, *model.AppError)); ok {
|
||||
return rf(user)
|
||||
}
|
||||
if rf, ok := ret.Get(0).(func(*model.User) []byte); ok {
|
||||
r0 = rf(user)
|
||||
} else {
|
||||
@@ -245,14 +271,12 @@ func (_m *MockAppIface) GetProfileImage(user *model.User) ([]byte, bool, *model.
|
||||
}
|
||||
}
|
||||
|
||||
var r1 bool
|
||||
if rf, ok := ret.Get(1).(func(*model.User) bool); ok {
|
||||
r1 = rf(user)
|
||||
} else {
|
||||
r1 = ret.Get(1).(bool)
|
||||
}
|
||||
|
||||
var r2 *model.AppError
|
||||
if rf, ok := ret.Get(2).(func(*model.User) *model.AppError); ok {
|
||||
r2 = rf(user)
|
||||
} else {
|
||||
@@ -295,6 +319,10 @@ func (_m *MockAppIface) PatchChannelModerationsForChannel(c request.CTX, channel
|
||||
ret := _m.Called(c, channel, channelModerationsPatch)
|
||||
|
||||
var r0 []*model.ChannelModeration
|
||||
var r1 *model.AppError
|
||||
if rf, ok := ret.Get(0).(func(request.CTX, *model.Channel, []*model.ChannelModerationPatch) ([]*model.ChannelModeration, *model.AppError)); ok {
|
||||
return rf(c, channel, channelModerationsPatch)
|
||||
}
|
||||
if rf, ok := ret.Get(0).(func(request.CTX, *model.Channel, []*model.ChannelModerationPatch) []*model.ChannelModeration); ok {
|
||||
r0 = rf(c, channel, channelModerationsPatch)
|
||||
} else {
|
||||
@@ -303,7 +331,6 @@ func (_m *MockAppIface) PatchChannelModerationsForChannel(c request.CTX, channel
|
||||
}
|
||||
}
|
||||
|
||||
var r1 *model.AppError
|
||||
if rf, ok := ret.Get(1).(func(request.CTX, *model.Channel, []*model.ChannelModerationPatch) *model.AppError); ok {
|
||||
r1 = rf(c, channel, channelModerationsPatch)
|
||||
} else {
|
||||
@@ -336,6 +363,10 @@ func (_m *MockAppIface) SaveReactionForPost(c *request.Context, reaction *model.
|
||||
ret := _m.Called(c, reaction)
|
||||
|
||||
var r0 *model.Reaction
|
||||
var r1 *model.AppError
|
||||
if rf, ok := ret.Get(0).(func(*request.Context, *model.Reaction) (*model.Reaction, *model.AppError)); ok {
|
||||
return rf(c, reaction)
|
||||
}
|
||||
if rf, ok := ret.Get(0).(func(*request.Context, *model.Reaction) *model.Reaction); ok {
|
||||
r0 = rf(c, reaction)
|
||||
} else {
|
||||
@@ -344,7 +375,6 @@ func (_m *MockAppIface) SaveReactionForPost(c *request.Context, reaction *model.
|
||||
}
|
||||
}
|
||||
|
||||
var r1 *model.AppError
|
||||
if rf, ok := ret.Get(1).(func(*request.Context, *model.Reaction) *model.AppError); ok {
|
||||
r1 = rf(c, reaction)
|
||||
} else {
|
||||
@@ -377,6 +407,10 @@ func (_m *MockAppIface) UpdatePost(c *request.Context, post *model.Post, safeUpd
|
||||
ret := _m.Called(c, post, safeUpdate)
|
||||
|
||||
var r0 *model.Post
|
||||
var r1 *model.AppError
|
||||
if rf, ok := ret.Get(0).(func(*request.Context, *model.Post, bool) (*model.Post, *model.AppError)); ok {
|
||||
return rf(c, post, safeUpdate)
|
||||
}
|
||||
if rf, ok := ret.Get(0).(func(*request.Context, *model.Post, bool) *model.Post); ok {
|
||||
r0 = rf(c, post, safeUpdate)
|
||||
} else {
|
||||
@@ -385,7 +419,6 @@ func (_m *MockAppIface) UpdatePost(c *request.Context, post *model.Post, safeUpd
|
||||
}
|
||||
}
|
||||
|
||||
var r1 *model.AppError
|
||||
if rf, ok := ret.Get(1).(func(*request.Context, *model.Post, bool) *model.AppError); ok {
|
||||
r1 = rf(c, post, safeUpdate)
|
||||
} else {
|
||||
@@ -396,3 +429,18 @@ func (_m *MockAppIface) UpdatePost(c *request.Context, post *model.Post, safeUpd
|
||||
|
||||
return r0, r1
|
||||
}
|
||||
|
||||
type mockConstructorTestingTNewMockAppIface interface {
|
||||
mock.TestingT
|
||||
Cleanup(func())
|
||||
}
|
||||
|
||||
// NewMockAppIface creates a new instance of MockAppIface. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations.
|
||||
func NewMockAppIface(t mockConstructorTestingTNewMockAppIface) *MockAppIface {
|
||||
mock := &MockAppIface{}
|
||||
mock.Mock.Test(t)
|
||||
|
||||
t.Cleanup(func() { mock.AssertExpectations(t) })
|
||||
|
||||
return mock
|
||||
}
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
// Code generated by mockery v2.10.4. DO NOT EDIT.
|
||||
// Code generated by mockery v2.23.2. DO NOT EDIT.
|
||||
|
||||
// Regenerate this file using `make sharedchannel-mocks`.
|
||||
|
||||
@@ -116,3 +116,18 @@ func (_m *MockServerIface) Log() *mlog.Logger {
|
||||
func (_m *MockServerIface) RemoveClusterLeaderChangedListener(id string) {
|
||||
_m.Called(id)
|
||||
}
|
||||
|
||||
type mockConstructorTestingTNewMockServerIface interface {
|
||||
mock.TestingT
|
||||
Cleanup(func())
|
||||
}
|
||||
|
||||
// NewMockServerIface creates a new instance of MockServerIface. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations.
|
||||
func NewMockServerIface(t mockConstructorTestingTNewMockServerIface) *MockServerIface {
|
||||
mock := &MockServerIface{}
|
||||
mock.Mock.Test(t)
|
||||
|
||||
t.Cleanup(func() { mock.AssertExpectations(t) })
|
||||
|
||||
return mock
|
||||
}
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
// Code generated by mockery v2.10.4. DO NOT EDIT.
|
||||
// Code generated by mockery v2.23.2. DO NOT EDIT.
|
||||
|
||||
// Regenerate this file using `make telemetry-mocks`.
|
||||
|
||||
@@ -59,6 +59,10 @@ func (_m *ServerIface) GetRoleByName(_a0 context.Context, _a1 string) (*model.Ro
|
||||
ret := _m.Called(_a0, _a1)
|
||||
|
||||
var r0 *model.Role
|
||||
var r1 *model.AppError
|
||||
if rf, ok := ret.Get(0).(func(context.Context, string) (*model.Role, *model.AppError)); ok {
|
||||
return rf(_a0, _a1)
|
||||
}
|
||||
if rf, ok := ret.Get(0).(func(context.Context, string) *model.Role); ok {
|
||||
r0 = rf(_a0, _a1)
|
||||
} else {
|
||||
@@ -67,7 +71,6 @@ func (_m *ServerIface) GetRoleByName(_a0 context.Context, _a1 string) (*model.Ro
|
||||
}
|
||||
}
|
||||
|
||||
var r1 *model.AppError
|
||||
if rf, ok := ret.Get(1).(func(context.Context, string) *model.AppError); ok {
|
||||
r1 = rf(_a0, _a1)
|
||||
} else {
|
||||
@@ -84,6 +87,10 @@ func (_m *ServerIface) GetSchemes(_a0 string, _a1 int, _a2 int) ([]*model.Scheme
|
||||
ret := _m.Called(_a0, _a1, _a2)
|
||||
|
||||
var r0 []*model.Scheme
|
||||
var r1 *model.AppError
|
||||
if rf, ok := ret.Get(0).(func(string, int, int) ([]*model.Scheme, *model.AppError)); ok {
|
||||
return rf(_a0, _a1, _a2)
|
||||
}
|
||||
if rf, ok := ret.Get(0).(func(string, int, int) []*model.Scheme); ok {
|
||||
r0 = rf(_a0, _a1, _a2)
|
||||
} else {
|
||||
@@ -92,7 +99,6 @@ func (_m *ServerIface) GetSchemes(_a0 string, _a1 int, _a2 int) ([]*model.Scheme
|
||||
}
|
||||
}
|
||||
|
||||
var r1 *model.AppError
|
||||
if rf, ok := ret.Get(1).(func(string, int, int) *model.AppError); ok {
|
||||
r1 = rf(_a0, _a1, _a2)
|
||||
} else {
|
||||
@@ -165,3 +171,18 @@ func (_m *ServerIface) License() *model.License {
|
||||
|
||||
return r0
|
||||
}
|
||||
|
||||
type mockConstructorTestingTNewServerIface interface {
|
||||
mock.TestingT
|
||||
Cleanup(func())
|
||||
}
|
||||
|
||||
// NewServerIface creates a new instance of ServerIface. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations.
|
||||
func NewServerIface(t mockConstructorTestingTNewServerIface) *ServerIface {
|
||||
mock := &ServerIface{}
|
||||
mock.Mock.Test(t)
|
||||
|
||||
t.Cleanup(func() { mock.AssertExpectations(t) })
|
||||
|
||||
return mock
|
||||
}
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
// Code generated by mockery v2.10.4. DO NOT EDIT.
|
||||
// Code generated by mockery v2.23.2. DO NOT EDIT.
|
||||
|
||||
// Regenerate this file using `make filestore-mocks`.
|
||||
|
||||
@@ -24,13 +24,16 @@ func (_m *FileBackend) AppendFile(fr io.Reader, path string) (int64, error) {
|
||||
ret := _m.Called(fr, path)
|
||||
|
||||
var r0 int64
|
||||
var r1 error
|
||||
if rf, ok := ret.Get(0).(func(io.Reader, string) (int64, error)); ok {
|
||||
return rf(fr, path)
|
||||
}
|
||||
if rf, ok := ret.Get(0).(func(io.Reader, string) int64); ok {
|
||||
r0 = rf(fr, path)
|
||||
} else {
|
||||
r0 = ret.Get(0).(int64)
|
||||
}
|
||||
|
||||
var r1 error
|
||||
if rf, ok := ret.Get(1).(func(io.Reader, string) error); ok {
|
||||
r1 = rf(fr, path)
|
||||
} else {
|
||||
@@ -59,13 +62,16 @@ func (_m *FileBackend) FileExists(path string) (bool, error) {
|
||||
ret := _m.Called(path)
|
||||
|
||||
var r0 bool
|
||||
var r1 error
|
||||
if rf, ok := ret.Get(0).(func(string) (bool, error)); ok {
|
||||
return rf(path)
|
||||
}
|
||||
if rf, ok := ret.Get(0).(func(string) bool); ok {
|
||||
r0 = rf(path)
|
||||
} else {
|
||||
r0 = ret.Get(0).(bool)
|
||||
}
|
||||
|
||||
var r1 error
|
||||
if rf, ok := ret.Get(1).(func(string) error); ok {
|
||||
r1 = rf(path)
|
||||
} else {
|
||||
@@ -80,13 +86,16 @@ func (_m *FileBackend) FileModTime(path string) (time.Time, error) {
|
||||
ret := _m.Called(path)
|
||||
|
||||
var r0 time.Time
|
||||
var r1 error
|
||||
if rf, ok := ret.Get(0).(func(string) (time.Time, error)); ok {
|
||||
return rf(path)
|
||||
}
|
||||
if rf, ok := ret.Get(0).(func(string) time.Time); ok {
|
||||
r0 = rf(path)
|
||||
} else {
|
||||
r0 = ret.Get(0).(time.Time)
|
||||
}
|
||||
|
||||
var r1 error
|
||||
if rf, ok := ret.Get(1).(func(string) error); ok {
|
||||
r1 = rf(path)
|
||||
} else {
|
||||
@@ -101,13 +110,16 @@ func (_m *FileBackend) FileSize(path string) (int64, error) {
|
||||
ret := _m.Called(path)
|
||||
|
||||
var r0 int64
|
||||
var r1 error
|
||||
if rf, ok := ret.Get(0).(func(string) (int64, error)); ok {
|
||||
return rf(path)
|
||||
}
|
||||
if rf, ok := ret.Get(0).(func(string) int64); ok {
|
||||
r0 = rf(path)
|
||||
} else {
|
||||
r0 = ret.Get(0).(int64)
|
||||
}
|
||||
|
||||
var r1 error
|
||||
if rf, ok := ret.Get(1).(func(string) error); ok {
|
||||
r1 = rf(path)
|
||||
} else {
|
||||
@@ -122,6 +134,10 @@ func (_m *FileBackend) ListDirectory(path string) ([]string, error) {
|
||||
ret := _m.Called(path)
|
||||
|
||||
var r0 []string
|
||||
var r1 error
|
||||
if rf, ok := ret.Get(0).(func(string) ([]string, error)); ok {
|
||||
return rf(path)
|
||||
}
|
||||
if rf, ok := ret.Get(0).(func(string) []string); ok {
|
||||
r0 = rf(path)
|
||||
} else {
|
||||
@@ -130,7 +146,6 @@ func (_m *FileBackend) ListDirectory(path string) ([]string, error) {
|
||||
}
|
||||
}
|
||||
|
||||
var r1 error
|
||||
if rf, ok := ret.Get(1).(func(string) error); ok {
|
||||
r1 = rf(path)
|
||||
} else {
|
||||
@@ -145,6 +160,10 @@ func (_m *FileBackend) ListDirectoryRecursively(path string) ([]string, error) {
|
||||
ret := _m.Called(path)
|
||||
|
||||
var r0 []string
|
||||
var r1 error
|
||||
if rf, ok := ret.Get(0).(func(string) ([]string, error)); ok {
|
||||
return rf(path)
|
||||
}
|
||||
if rf, ok := ret.Get(0).(func(string) []string); ok {
|
||||
r0 = rf(path)
|
||||
} else {
|
||||
@@ -153,7 +172,6 @@ func (_m *FileBackend) ListDirectoryRecursively(path string) ([]string, error) {
|
||||
}
|
||||
}
|
||||
|
||||
var r1 error
|
||||
if rf, ok := ret.Get(1).(func(string) error); ok {
|
||||
r1 = rf(path)
|
||||
} else {
|
||||
@@ -182,6 +200,10 @@ func (_m *FileBackend) ReadFile(path string) ([]byte, error) {
|
||||
ret := _m.Called(path)
|
||||
|
||||
var r0 []byte
|
||||
var r1 error
|
||||
if rf, ok := ret.Get(0).(func(string) ([]byte, error)); ok {
|
||||
return rf(path)
|
||||
}
|
||||
if rf, ok := ret.Get(0).(func(string) []byte); ok {
|
||||
r0 = rf(path)
|
||||
} else {
|
||||
@@ -190,7 +212,6 @@ func (_m *FileBackend) ReadFile(path string) ([]byte, error) {
|
||||
}
|
||||
}
|
||||
|
||||
var r1 error
|
||||
if rf, ok := ret.Get(1).(func(string) error); ok {
|
||||
r1 = rf(path)
|
||||
} else {
|
||||
@@ -205,6 +226,10 @@ func (_m *FileBackend) Reader(path string) (filestore.ReadCloseSeeker, error) {
|
||||
ret := _m.Called(path)
|
||||
|
||||
var r0 filestore.ReadCloseSeeker
|
||||
var r1 error
|
||||
if rf, ok := ret.Get(0).(func(string) (filestore.ReadCloseSeeker, error)); ok {
|
||||
return rf(path)
|
||||
}
|
||||
if rf, ok := ret.Get(0).(func(string) filestore.ReadCloseSeeker); ok {
|
||||
r0 = rf(path)
|
||||
} else {
|
||||
@@ -213,7 +238,6 @@ func (_m *FileBackend) Reader(path string) (filestore.ReadCloseSeeker, error) {
|
||||
}
|
||||
}
|
||||
|
||||
var r1 error
|
||||
if rf, ok := ret.Get(1).(func(string) error); ok {
|
||||
r1 = rf(path)
|
||||
} else {
|
||||
@@ -270,13 +294,16 @@ func (_m *FileBackend) WriteFile(fr io.Reader, path string) (int64, error) {
|
||||
ret := _m.Called(fr, path)
|
||||
|
||||
var r0 int64
|
||||
var r1 error
|
||||
if rf, ok := ret.Get(0).(func(io.Reader, string) (int64, error)); ok {
|
||||
return rf(fr, path)
|
||||
}
|
||||
if rf, ok := ret.Get(0).(func(io.Reader, string) int64); ok {
|
||||
r0 = rf(fr, path)
|
||||
} else {
|
||||
r0 = ret.Get(0).(int64)
|
||||
}
|
||||
|
||||
var r1 error
|
||||
if rf, ok := ret.Get(1).(func(io.Reader, string) error); ok {
|
||||
r1 = rf(fr, path)
|
||||
} else {
|
||||
@@ -285,3 +312,18 @@ func (_m *FileBackend) WriteFile(fr io.Reader, path string) (int64, error) {
|
||||
|
||||
return r0, r1
|
||||
}
|
||||
|
||||
type mockConstructorTestingTNewFileBackend interface {
|
||||
mock.TestingT
|
||||
Cleanup(func())
|
||||
}
|
||||
|
||||
// NewFileBackend creates a new instance of FileBackend. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations.
|
||||
func NewFileBackend(t mockConstructorTestingTNewFileBackend) *FileBackend {
|
||||
mock := &FileBackend{}
|
||||
mock.Mock.Test(t)
|
||||
|
||||
t.Cleanup(func() { mock.AssertExpectations(t) })
|
||||
|
||||
return mock
|
||||
}
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
// Code generated by mockery v2.10.4. DO NOT EDIT.
|
||||
// Code generated by mockery v2.23.2. DO NOT EDIT.
|
||||
|
||||
// Regenerate this file using `make filestore-mocks`.
|
||||
|
||||
@@ -30,13 +30,16 @@ func (_m *ReadCloseSeeker) Read(p []byte) (int, error) {
|
||||
ret := _m.Called(p)
|
||||
|
||||
var r0 int
|
||||
var r1 error
|
||||
if rf, ok := ret.Get(0).(func([]byte) (int, error)); ok {
|
||||
return rf(p)
|
||||
}
|
||||
if rf, ok := ret.Get(0).(func([]byte) int); ok {
|
||||
r0 = rf(p)
|
||||
} else {
|
||||
r0 = ret.Get(0).(int)
|
||||
}
|
||||
|
||||
var r1 error
|
||||
if rf, ok := ret.Get(1).(func([]byte) error); ok {
|
||||
r1 = rf(p)
|
||||
} else {
|
||||
@@ -51,13 +54,16 @@ func (_m *ReadCloseSeeker) Seek(offset int64, whence int) (int64, error) {
|
||||
ret := _m.Called(offset, whence)
|
||||
|
||||
var r0 int64
|
||||
var r1 error
|
||||
if rf, ok := ret.Get(0).(func(int64, int) (int64, error)); ok {
|
||||
return rf(offset, whence)
|
||||
}
|
||||
if rf, ok := ret.Get(0).(func(int64, int) int64); ok {
|
||||
r0 = rf(offset, whence)
|
||||
} else {
|
||||
r0 = ret.Get(0).(int64)
|
||||
}
|
||||
|
||||
var r1 error
|
||||
if rf, ok := ret.Get(1).(func(int64, int) error); ok {
|
||||
r1 = rf(offset, whence)
|
||||
} else {
|
||||
@@ -66,3 +72,18 @@ func (_m *ReadCloseSeeker) Seek(offset int64, whence int) (int64, error) {
|
||||
|
||||
return r0, r1
|
||||
}
|
||||
|
||||
type mockConstructorTestingTNewReadCloseSeeker interface {
|
||||
mock.TestingT
|
||||
Cleanup(func())
|
||||
}
|
||||
|
||||
// NewReadCloseSeeker creates a new instance of ReadCloseSeeker. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations.
|
||||
func NewReadCloseSeeker(t mockConstructorTestingTNewReadCloseSeeker) *ReadCloseSeeker {
|
||||
mock := &ReadCloseSeeker{}
|
||||
mock.Mock.Test(t)
|
||||
|
||||
t.Cleanup(func() { mock.AssertExpectations(t) })
|
||||
|
||||
return mock
|
||||
}
|
||||
|
||||
Ссылка в новой задаче
Block a user