[Partial Fix - #16623]: Fix initialism errors in codebase. (#16877)

* Update files in /app

* Update files in /plugin

* Update files in /store

* Update files in /utils

* Update files in /web

* Update store.go

* Update command_response.go

* check-mocks and check-store-layer checks

* Fix build errors

* Revert "Fix build errors"

This reverts commit 4ee38c3d0bf7bd7d8386f46f0985a0d03245a1d4.

* Update .golangci.yml

* make i18n-extract and make i18n-check

* Commit suggestions

* check-mocks and check-store-layers

* Update en.json

* Update product_notices.go

* Update main.go

* Fix translations

* Regenerate mocks

Co-authored-by: Mattermod <mattermod@users.noreply.github.com>
Co-authored-by: Claudio Costa <cstcld91@gmail.com>
Этот коммит содержится в:
Haardik Dharma
2021-02-18 20:06:56 +05:30
коммит произвёл GitHub
родитель 5f190b5624
Коммит 6356e906e0
60 изменённых файлов: 2335 добавлений и 2163 удалений

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

@@ -14,13 +14,13 @@ type ChannelMemberHistoryStore struct {
mock.Mock
}
// GetUsersInChannelDuring provides a mock function with given fields: startTime, endTime, channelId
func (_m *ChannelMemberHistoryStore) GetUsersInChannelDuring(startTime int64, endTime int64, channelId string) ([]*model.ChannelMemberHistoryResult, error) {
ret := _m.Called(startTime, endTime, channelId)
// GetUsersInChannelDuring provides a mock function with given fields: startTime, endTime, channelID
func (_m *ChannelMemberHistoryStore) GetUsersInChannelDuring(startTime int64, endTime int64, channelID string) ([]*model.ChannelMemberHistoryResult, error) {
ret := _m.Called(startTime, endTime, channelID)
var r0 []*model.ChannelMemberHistoryResult
if rf, ok := ret.Get(0).(func(int64, int64, string) []*model.ChannelMemberHistoryResult); ok {
r0 = rf(startTime, endTime, channelId)
r0 = rf(startTime, endTime, channelID)
} else {
if ret.Get(0) != nil {
r0 = ret.Get(0).([]*model.ChannelMemberHistoryResult)
@@ -29,7 +29,7 @@ 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)
r1 = rf(startTime, endTime, channelID)
} else {
r1 = ret.Error(1)
}
@@ -37,13 +37,13 @@ func (_m *ChannelMemberHistoryStore) GetUsersInChannelDuring(startTime int64, en
return r0, r1
}
// LogJoinEvent provides a mock function with given fields: userId, channelId, joinTime
func (_m *ChannelMemberHistoryStore) LogJoinEvent(userId string, channelId string, joinTime int64) error {
ret := _m.Called(userId, channelId, joinTime)
// LogJoinEvent provides a mock function with given fields: userId, channelID, joinTime
func (_m *ChannelMemberHistoryStore) LogJoinEvent(userId string, channelID string, joinTime int64) error {
ret := _m.Called(userId, channelID, joinTime)
var r0 error
if rf, ok := ret.Get(0).(func(string, string, int64) error); ok {
r0 = rf(userId, channelId, joinTime)
r0 = rf(userId, channelID, joinTime)
} else {
r0 = ret.Error(0)
}
@@ -51,13 +51,13 @@ func (_m *ChannelMemberHistoryStore) LogJoinEvent(userId string, channelId strin
return r0
}
// LogLeaveEvent provides a mock function with given fields: userId, channelId, leaveTime
func (_m *ChannelMemberHistoryStore) LogLeaveEvent(userId string, channelId string, leaveTime int64) error {
ret := _m.Called(userId, channelId, leaveTime)
// LogLeaveEvent provides a mock function with given fields: userId, channelID, leaveTime
func (_m *ChannelMemberHistoryStore) LogLeaveEvent(userId string, channelID string, leaveTime int64) error {
ret := _m.Called(userId, channelID, leaveTime)
var r0 error
if rf, ok := ret.Get(0).(func(string, string, int64) error); ok {
r0 = rf(userId, channelId, leaveTime)
r0 = rf(userId, channelID, leaveTime)
} else {
r0 = ret.Error(0)
}

Разница между файлами не показана из-за своего большого размера Загрузить разницу

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

@@ -14,20 +14,20 @@ type CommandStore struct {
mock.Mock
}
// AnalyticsCommandCount provides a mock function with given fields: teamId
func (_m *CommandStore) AnalyticsCommandCount(teamId string) (int64, error) {
ret := _m.Called(teamId)
// AnalyticsCommandCount provides a mock function with given fields: teamID
func (_m *CommandStore) AnalyticsCommandCount(teamID string) (int64, error) {
ret := _m.Called(teamID)
var r0 int64
if rf, ok := ret.Get(0).(func(string) int64); ok {
r0 = rf(teamId)
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)
r1 = rf(teamID)
} else {
r1 = ret.Error(1)
}
@@ -35,13 +35,13 @@ func (_m *CommandStore) AnalyticsCommandCount(teamId string) (int64, error) {
return r0, r1
}
// Delete provides a mock function with given fields: commandId, time
func (_m *CommandStore) Delete(commandId string, time int64) error {
ret := _m.Called(commandId, time)
// Delete provides a mock function with given fields: commandID, time
func (_m *CommandStore) Delete(commandID string, time int64) error {
ret := _m.Called(commandID, time)
var r0 error
if rf, ok := ret.Get(0).(func(string, int64) error); ok {
r0 = rf(commandId, time)
r0 = rf(commandID, time)
} else {
r0 = ret.Error(0)
}
@@ -72,13 +72,13 @@ func (_m *CommandStore) Get(id string) (*model.Command, error) {
return r0, r1
}
// GetByTeam provides a mock function with given fields: teamId
func (_m *CommandStore) GetByTeam(teamId string) ([]*model.Command, error) {
ret := _m.Called(teamId)
// GetByTeam provides a mock function with given fields: teamID
func (_m *CommandStore) GetByTeam(teamID string) ([]*model.Command, error) {
ret := _m.Called(teamID)
var r0 []*model.Command
if rf, ok := ret.Get(0).(func(string) []*model.Command); ok {
r0 = rf(teamId)
r0 = rf(teamID)
} else {
if ret.Get(0) != nil {
r0 = ret.Get(0).([]*model.Command)
@@ -87,7 +87,7 @@ 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)
r1 = rf(teamID)
} else {
r1 = ret.Error(1)
}
@@ -95,13 +95,13 @@ func (_m *CommandStore) GetByTeam(teamId string) ([]*model.Command, error) {
return r0, r1
}
// GetByTrigger provides a mock function with given fields: teamId, trigger
func (_m *CommandStore) GetByTrigger(teamId string, trigger string) (*model.Command, error) {
ret := _m.Called(teamId, trigger)
// GetByTrigger provides a mock function with given fields: teamID, trigger
func (_m *CommandStore) GetByTrigger(teamID string, trigger string) (*model.Command, error) {
ret := _m.Called(teamID, trigger)
var r0 *model.Command
if rf, ok := ret.Get(0).(func(string, string) *model.Command); ok {
r0 = rf(teamId, trigger)
r0 = rf(teamID, trigger)
} else {
if ret.Get(0) != nil {
r0 = ret.Get(0).(*model.Command)
@@ -110,7 +110,7 @@ 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)
r1 = rf(teamID, trigger)
} else {
r1 = ret.Error(1)
}
@@ -118,13 +118,13 @@ func (_m *CommandStore) GetByTrigger(teamId string, trigger string) (*model.Comm
return r0, r1
}
// PermanentDeleteByTeam provides a mock function with given fields: teamId
func (_m *CommandStore) PermanentDeleteByTeam(teamId string) error {
ret := _m.Called(teamId)
// PermanentDeleteByTeam provides a mock function with given fields: teamID
func (_m *CommandStore) PermanentDeleteByTeam(teamID string) error {
ret := _m.Called(teamID)
var r0 error
if rf, ok := ret.Get(0).(func(string) error); ok {
r0 = rf(teamId)
r0 = rf(teamID)
} else {
r0 = ret.Error(0)
}

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

@@ -14,13 +14,13 @@ type FileInfoStore struct {
mock.Mock
}
// AttachToPost provides a mock function with given fields: fileId, postId, creatorId
func (_m *FileInfoStore) AttachToPost(fileId string, postId string, creatorId string) error {
ret := _m.Called(fileId, postId, creatorId)
// AttachToPost provides a mock function with given fields: fileID, postID, creatorId
func (_m *FileInfoStore) AttachToPost(fileID string, postID string, creatorId string) error {
ret := _m.Called(fileID, postID, creatorId)
var r0 error
if rf, ok := ret.Get(0).(func(string, string, string) error); ok {
r0 = rf(fileId, postId, creatorId)
r0 = rf(fileID, postID, creatorId)
} else {
r0 = ret.Error(0)
}
@@ -33,20 +33,20 @@ func (_m *FileInfoStore) ClearCaches() {
_m.Called()
}
// DeleteForPost provides a mock function with given fields: postId
func (_m *FileInfoStore) DeleteForPost(postId string) (string, error) {
ret := _m.Called(postId)
// DeleteForPost provides a mock function with given fields: postID
func (_m *FileInfoStore) DeleteForPost(postID string) (string, error) {
ret := _m.Called(postID)
var r0 string
if rf, ok := ret.Get(0).(func(string) string); ok {
r0 = rf(postId)
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)
r1 = rf(postID)
} else {
r1 = ret.Error(1)
}
@@ -123,13 +123,13 @@ func (_m *FileInfoStore) GetByPath(path string) (*model.FileInfo, error) {
return r0, r1
}
// GetForPost provides a mock function with given fields: postId, readFromMaster, includeDeleted, allowFromCache
func (_m *FileInfoStore) GetForPost(postId string, readFromMaster bool, includeDeleted bool, allowFromCache bool) ([]*model.FileInfo, error) {
ret := _m.Called(postId, readFromMaster, includeDeleted, allowFromCache)
// GetForPost provides a mock function with given fields: postID, readFromMaster, includeDeleted, allowFromCache
func (_m *FileInfoStore) GetForPost(postID string, readFromMaster bool, includeDeleted bool, allowFromCache bool) ([]*model.FileInfo, error) {
ret := _m.Called(postID, readFromMaster, includeDeleted, allowFromCache)
var r0 []*model.FileInfo
if rf, ok := ret.Get(0).(func(string, bool, bool, bool) []*model.FileInfo); ok {
r0 = rf(postId, readFromMaster, includeDeleted, allowFromCache)
r0 = rf(postID, readFromMaster, includeDeleted, allowFromCache)
} else {
if ret.Get(0) != nil {
r0 = ret.Get(0).([]*model.FileInfo)
@@ -138,7 +138,7 @@ 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)
r1 = rf(postID, readFromMaster, includeDeleted, allowFromCache)
} else {
r1 = ret.Error(1)
}
@@ -192,18 +192,18 @@ func (_m *FileInfoStore) GetWithOptions(page int, perPage int, opt *model.GetFil
return r0, r1
}
// InvalidateFileInfosForPostCache provides a mock function with given fields: postId, deleted
func (_m *FileInfoStore) InvalidateFileInfosForPostCache(postId string, deleted bool) {
_m.Called(postId, deleted)
// InvalidateFileInfosForPostCache provides a mock function with given fields: postID, deleted
func (_m *FileInfoStore) InvalidateFileInfosForPostCache(postID string, deleted bool) {
_m.Called(postID, deleted)
}
// PermanentDelete provides a mock function with given fields: fileId
func (_m *FileInfoStore) PermanentDelete(fileId string) error {
ret := _m.Called(fileId)
// PermanentDelete provides a mock function with given fields: fileID
func (_m *FileInfoStore) PermanentDelete(fileID string) error {
ret := _m.Called(fileID)
var r0 error
if rf, ok := ret.Get(0).(func(string) error); ok {
r0 = rf(fileId)
r0 = rf(fileID)
} else {
r0 = ret.Error(0)
}
@@ -276,13 +276,13 @@ func (_m *FileInfoStore) Save(info *model.FileInfo) (*model.FileInfo, error) {
return r0, r1
}
// Search provides a mock function with given fields: paramsList, userId, teamId, page, perPage
func (_m *FileInfoStore) Search(paramsList []*model.SearchParams, userId string, teamId string, page int, perPage int) (*model.FileInfoList, error) {
ret := _m.Called(paramsList, userId, teamId, page, perPage)
// Search provides a mock function with given fields: paramsList, userId, teamID, page, perPage
func (_m *FileInfoStore) Search(paramsList []*model.SearchParams, userId string, teamID string, page int, perPage int) (*model.FileInfoList, error) {
ret := _m.Called(paramsList, userId, teamID, page, perPage)
var r0 *model.FileInfoList
if rf, ok := ret.Get(0).(func([]*model.SearchParams, string, string, int, int) *model.FileInfoList); ok {
r0 = rf(paramsList, userId, teamId, page, perPage)
r0 = rf(paramsList, userId, teamID, page, perPage)
} else {
if ret.Get(0) != nil {
r0 = ret.Get(0).(*model.FileInfoList)
@@ -291,7 +291,7 @@ 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)
r1 = rf(paramsList, userId, teamID, page, perPage)
} else {
r1 = ret.Error(1)
}
@@ -299,13 +299,13 @@ func (_m *FileInfoStore) Search(paramsList []*model.SearchParams, userId string,
return r0, r1
}
// SetContent provides a mock function with given fields: fileId, content
func (_m *FileInfoStore) SetContent(fileId string, content string) error {
ret := _m.Called(fileId, content)
// SetContent provides a mock function with given fields: fileID, content
func (_m *FileInfoStore) SetContent(fileID string, content string) error {
ret := _m.Called(fileID, content)
var r0 error
if rf, ok := ret.Get(0).(func(string, string) error); ok {
r0 = rf(fileId, content)
r0 = rf(fileID, content)
} else {
r0 = ret.Error(0)
}

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

@@ -127,20 +127,20 @@ func (_m *GroupStore) CountChannelMembersMinusGroupMembers(channelID string, gro
return r0, r1
}
// CountGroupsByChannel provides a mock function with given fields: channelId, opts
func (_m *GroupStore) CountGroupsByChannel(channelId string, opts model.GroupSearchOpts) (int64, error) {
ret := _m.Called(channelId, opts)
// CountGroupsByChannel provides a mock function with given fields: channelID, opts
func (_m *GroupStore) CountGroupsByChannel(channelID string, opts model.GroupSearchOpts) (int64, error) {
ret := _m.Called(channelID, opts)
var r0 int64
if rf, ok := ret.Get(0).(func(string, model.GroupSearchOpts) int64); ok {
r0 = rf(channelId, opts)
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)
r1 = rf(channelID, opts)
} else {
r1 = ret.Error(1)
}
@@ -148,20 +148,20 @@ func (_m *GroupStore) CountGroupsByChannel(channelId string, opts model.GroupSea
return r0, r1
}
// CountGroupsByTeam provides a mock function with given fields: teamId, opts
func (_m *GroupStore) CountGroupsByTeam(teamId string, opts model.GroupSearchOpts) (int64, error) {
ret := _m.Called(teamId, opts)
// CountGroupsByTeam provides a mock function with given fields: teamID, opts
func (_m *GroupStore) CountGroupsByTeam(teamID string, opts model.GroupSearchOpts) (int64, error) {
ret := _m.Called(teamID, opts)
var r0 int64
if rf, ok := ret.Get(0).(func(string, model.GroupSearchOpts) int64); ok {
r0 = rf(teamId, opts)
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)
r1 = rf(teamID, opts)
} else {
r1 = ret.Error(1)
}
@@ -533,13 +533,13 @@ func (_m *GroupStore) GetGroups(page int, perPage int, opts model.GroupSearchOpt
return r0, r1
}
// GetGroupsAssociatedToChannelsByTeam provides a mock function with given fields: teamId, opts
func (_m *GroupStore) GetGroupsAssociatedToChannelsByTeam(teamId string, opts model.GroupSearchOpts) (map[string][]*model.GroupWithSchemeAdmin, error) {
ret := _m.Called(teamId, opts)
// GetGroupsAssociatedToChannelsByTeam provides a mock function with given fields: teamID, opts
func (_m *GroupStore) GetGroupsAssociatedToChannelsByTeam(teamID string, opts model.GroupSearchOpts) (map[string][]*model.GroupWithSchemeAdmin, error) {
ret := _m.Called(teamID, opts)
var r0 map[string][]*model.GroupWithSchemeAdmin
if rf, ok := ret.Get(0).(func(string, model.GroupSearchOpts) map[string][]*model.GroupWithSchemeAdmin); ok {
r0 = rf(teamId, opts)
r0 = rf(teamID, opts)
} else {
if ret.Get(0) != nil {
r0 = ret.Get(0).(map[string][]*model.GroupWithSchemeAdmin)
@@ -548,7 +548,7 @@ 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)
r1 = rf(teamID, opts)
} else {
r1 = ret.Error(1)
}
@@ -556,13 +556,13 @@ func (_m *GroupStore) GetGroupsAssociatedToChannelsByTeam(teamId string, opts mo
return r0, r1
}
// GetGroupsByChannel provides a mock function with given fields: channelId, opts
func (_m *GroupStore) GetGroupsByChannel(channelId string, opts model.GroupSearchOpts) ([]*model.GroupWithSchemeAdmin, error) {
ret := _m.Called(channelId, opts)
// GetGroupsByChannel provides a mock function with given fields: channelID, opts
func (_m *GroupStore) GetGroupsByChannel(channelID string, opts model.GroupSearchOpts) ([]*model.GroupWithSchemeAdmin, error) {
ret := _m.Called(channelID, opts)
var r0 []*model.GroupWithSchemeAdmin
if rf, ok := ret.Get(0).(func(string, model.GroupSearchOpts) []*model.GroupWithSchemeAdmin); ok {
r0 = rf(channelId, opts)
r0 = rf(channelID, opts)
} else {
if ret.Get(0) != nil {
r0 = ret.Get(0).([]*model.GroupWithSchemeAdmin)
@@ -571,7 +571,7 @@ 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)
r1 = rf(channelID, opts)
} else {
r1 = ret.Error(1)
}
@@ -579,13 +579,13 @@ func (_m *GroupStore) GetGroupsByChannel(channelId string, opts model.GroupSearc
return r0, r1
}
// GetGroupsByTeam provides a mock function with given fields: teamId, opts
func (_m *GroupStore) GetGroupsByTeam(teamId string, opts model.GroupSearchOpts) ([]*model.GroupWithSchemeAdmin, error) {
ret := _m.Called(teamId, opts)
// GetGroupsByTeam provides a mock function with given fields: teamID, opts
func (_m *GroupStore) GetGroupsByTeam(teamID string, opts model.GroupSearchOpts) ([]*model.GroupWithSchemeAdmin, error) {
ret := _m.Called(teamID, opts)
var r0 []*model.GroupWithSchemeAdmin
if rf, ok := ret.Get(0).(func(string, model.GroupSearchOpts) []*model.GroupWithSchemeAdmin); ok {
r0 = rf(teamId, opts)
r0 = rf(teamID, opts)
} else {
if ret.Get(0) != nil {
r0 = ret.Get(0).([]*model.GroupWithSchemeAdmin)
@@ -594,7 +594,7 @@ 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)
r1 = rf(teamID, opts)
} else {
r1 = ret.Error(1)
}

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

@@ -56,13 +56,13 @@ func (_m *PluginStore) CompareAndSet(keyVal *model.PluginKeyValue, oldValue []by
return r0, r1
}
// Delete provides a mock function with given fields: pluginId, key
func (_m *PluginStore) Delete(pluginId string, key string) error {
ret := _m.Called(pluginId, key)
// Delete provides a mock function with given fields: pluginID, key
func (_m *PluginStore) Delete(pluginID string, key string) error {
ret := _m.Called(pluginID, key)
var r0 error
if rf, ok := ret.Get(0).(func(string, string) error); ok {
r0 = rf(pluginId, key)
r0 = rf(pluginID, key)
} else {
r0 = ret.Error(0)
}
@@ -84,13 +84,13 @@ func (_m *PluginStore) DeleteAllExpired() error {
return r0
}
// DeleteAllForPlugin provides a mock function with given fields: PluginId
func (_m *PluginStore) DeleteAllForPlugin(PluginId string) error {
ret := _m.Called(PluginId)
// DeleteAllForPlugin provides a mock function with given fields: PluginID
func (_m *PluginStore) DeleteAllForPlugin(PluginID string) error {
ret := _m.Called(PluginID)
var r0 error
if rf, ok := ret.Get(0).(func(string) error); ok {
r0 = rf(PluginId)
r0 = rf(PluginID)
} else {
r0 = ret.Error(0)
}
@@ -98,13 +98,13 @@ func (_m *PluginStore) DeleteAllForPlugin(PluginId string) error {
return r0
}
// Get provides a mock function with given fields: pluginId, key
func (_m *PluginStore) Get(pluginId string, key string) (*model.PluginKeyValue, error) {
ret := _m.Called(pluginId, key)
// Get provides a mock function with given fields: pluginID, key
func (_m *PluginStore) Get(pluginID string, key string) (*model.PluginKeyValue, error) {
ret := _m.Called(pluginID, key)
var r0 *model.PluginKeyValue
if rf, ok := ret.Get(0).(func(string, string) *model.PluginKeyValue); ok {
r0 = rf(pluginId, key)
r0 = rf(pluginID, key)
} else {
if ret.Get(0) != nil {
r0 = ret.Get(0).(*model.PluginKeyValue)
@@ -113,7 +113,7 @@ 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)
r1 = rf(pluginID, key)
} else {
r1 = ret.Error(1)
}
@@ -121,13 +121,13 @@ func (_m *PluginStore) Get(pluginId string, key string) (*model.PluginKeyValue,
return r0, r1
}
// List provides a mock function with given fields: pluginId, page, perPage
func (_m *PluginStore) List(pluginId string, page int, perPage int) ([]string, error) {
ret := _m.Called(pluginId, page, perPage)
// List provides a mock function with given fields: pluginID, page, perPage
func (_m *PluginStore) List(pluginID string, page int, perPage int) ([]string, error) {
ret := _m.Called(pluginID, page, perPage)
var r0 []string
if rf, ok := ret.Get(0).(func(string, int, int) []string); ok {
r0 = rf(pluginId, page, perPage)
r0 = rf(pluginID, page, perPage)
} else {
if ret.Get(0) != nil {
r0 = ret.Get(0).([]string)
@@ -136,7 +136,7 @@ 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)
r1 = rf(pluginID, page, perPage)
} else {
r1 = ret.Error(1)
}
@@ -167,20 +167,20 @@ func (_m *PluginStore) SaveOrUpdate(keyVal *model.PluginKeyValue) (*model.Plugin
return r0, r1
}
// SetWithOptions provides a mock function with given fields: pluginId, key, value, options
func (_m *PluginStore) SetWithOptions(pluginId string, key string, value []byte, options model.PluginKVSetOptions) (bool, error) {
ret := _m.Called(pluginId, key, value, options)
// SetWithOptions provides a mock function with given fields: pluginID, key, value, options
func (_m *PluginStore) SetWithOptions(pluginID string, key string, value []byte, options model.PluginKVSetOptions) (bool, error) {
ret := _m.Called(pluginID, key, value, options)
var r0 bool
if rf, ok := ret.Get(0).(func(string, string, []byte, model.PluginKVSetOptions) bool); ok {
r0 = rf(pluginId, key, value, options)
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)
r1 = rf(pluginID, key, value, options)
} else {
r1 = ret.Error(1)
}

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

@@ -14,20 +14,20 @@ type PostStore struct {
mock.Mock
}
// AnalyticsPostCount provides a mock function with given fields: teamId, mustHaveFile, mustHaveHashtag
func (_m *PostStore) AnalyticsPostCount(teamId string, mustHaveFile bool, mustHaveHashtag bool) (int64, error) {
ret := _m.Called(teamId, mustHaveFile, mustHaveHashtag)
// AnalyticsPostCount provides a mock function with given fields: teamID, mustHaveFile, mustHaveHashtag
func (_m *PostStore) AnalyticsPostCount(teamID string, mustHaveFile bool, mustHaveHashtag bool) (int64, error) {
ret := _m.Called(teamID, mustHaveFile, mustHaveHashtag)
var r0 int64
if rf, ok := ret.Get(0).(func(string, bool, bool) int64); ok {
r0 = rf(teamId, mustHaveFile, mustHaveHashtag)
r0 = rf(teamID, mustHaveFile, mustHaveHashtag)
} else {
r0 = ret.Get(0).(int64)
}
var r1 error
if rf, ok := ret.Get(1).(func(string, bool, bool) error); ok {
r1 = rf(teamId, mustHaveFile, mustHaveHashtag)
r1 = rf(teamID, mustHaveFile, mustHaveHashtag)
} else {
r1 = ret.Error(1)
}
@@ -58,13 +58,13 @@ func (_m *PostStore) AnalyticsPostCountsByDay(options *model.AnalyticsPostCounts
return r0, r1
}
// AnalyticsUserCountsWithPostsByDay provides a mock function with given fields: teamId
func (_m *PostStore) AnalyticsUserCountsWithPostsByDay(teamId string) (model.AnalyticsRows, error) {
ret := _m.Called(teamId)
// AnalyticsUserCountsWithPostsByDay provides a mock function with given fields: teamID
func (_m *PostStore) AnalyticsUserCountsWithPostsByDay(teamID string) (model.AnalyticsRows, error) {
ret := _m.Called(teamID)
var r0 model.AnalyticsRows
if rf, ok := ret.Get(0).(func(string) model.AnalyticsRows); ok {
r0 = rf(teamId)
r0 = rf(teamID)
} else {
if ret.Get(0) != nil {
r0 = ret.Get(0).(model.AnalyticsRows)
@@ -73,7 +73,7 @@ func (_m *PostStore) AnalyticsUserCountsWithPostsByDay(teamId string) (model.Ana
var r1 error
if rf, ok := ret.Get(1).(func(string) error); ok {
r1 = rf(teamId)
r1 = rf(teamID)
} else {
r1 = ret.Error(1)
}
@@ -86,13 +86,13 @@ func (_m *PostStore) ClearCaches() {
_m.Called()
}
// Delete provides a mock function with given fields: postId, time, deleteByID
func (_m *PostStore) Delete(postId string, time int64, deleteByID string) error {
ret := _m.Called(postId, time, deleteByID)
// Delete provides a mock function with given fields: postID, time, deleteByID
func (_m *PostStore) Delete(postID string, time int64, deleteByID string) error {
ret := _m.Called(postID, time, deleteByID)
var r0 error
if rf, ok := ret.Get(0).(func(string, int64, string) error); ok {
r0 = rf(postId, time, deleteByID)
r0 = rf(postID, time, deleteByID)
} else {
r0 = ret.Error(0)
}
@@ -123,13 +123,13 @@ func (_m *PostStore) Get(id string, skipFetchThreads bool, collapsedThreads bool
return r0, r1
}
// GetDirectPostParentsForExportAfter provides a mock function with given fields: limit, afterId
func (_m *PostStore) GetDirectPostParentsForExportAfter(limit int, afterId string) ([]*model.DirectPostForExport, error) {
ret := _m.Called(limit, afterId)
// GetDirectPostParentsForExportAfter provides a mock function with given fields: limit, afterID
func (_m *PostStore) GetDirectPostParentsForExportAfter(limit int, afterID string) ([]*model.DirectPostForExport, error) {
ret := _m.Called(limit, afterID)
var r0 []*model.DirectPostForExport
if rf, ok := ret.Get(0).(func(int, string) []*model.DirectPostForExport); ok {
r0 = rf(limit, afterId)
r0 = rf(limit, afterID)
} else {
if ret.Get(0) != nil {
r0 = ret.Get(0).([]*model.DirectPostForExport)
@@ -138,7 +138,7 @@ 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)
r1 = rf(limit, afterID)
} else {
r1 = ret.Error(1)
}
@@ -146,13 +146,13 @@ func (_m *PostStore) GetDirectPostParentsForExportAfter(limit int, afterId strin
return r0, r1
}
// GetEtag provides a mock function with given fields: channelId, allowFromCache, collapsedThreads
func (_m *PostStore) GetEtag(channelId string, allowFromCache bool, collapsedThreads bool) string {
ret := _m.Called(channelId, allowFromCache, collapsedThreads)
// GetEtag provides a mock function with given fields: channelID, allowFromCache, collapsedThreads
func (_m *PostStore) GetEtag(channelID string, allowFromCache bool, collapsedThreads bool) string {
ret := _m.Called(channelID, allowFromCache, collapsedThreads)
var r0 string
if rf, ok := ret.Get(0).(func(string, bool, bool) string); ok {
r0 = rf(channelId, allowFromCache, collapsedThreads)
r0 = rf(channelID, allowFromCache, collapsedThreads)
} else {
r0 = ret.Get(0).(string)
}
@@ -183,13 +183,13 @@ func (_m *PostStore) GetFlaggedPosts(userId string, offset int, limit int) (*mod
return r0, r1
}
// GetFlaggedPostsForChannel provides a mock function with given fields: userId, channelId, offset, limit
func (_m *PostStore) GetFlaggedPostsForChannel(userId string, channelId string, offset int, limit int) (*model.PostList, error) {
ret := _m.Called(userId, channelId, offset, limit)
// GetFlaggedPostsForChannel provides a mock function with given fields: userId, channelID, offset, limit
func (_m *PostStore) GetFlaggedPostsForChannel(userId string, channelID string, offset int, limit int) (*model.PostList, error) {
ret := _m.Called(userId, channelID, offset, limit)
var r0 *model.PostList
if rf, ok := ret.Get(0).(func(string, string, int, int) *model.PostList); ok {
r0 = rf(userId, channelId, offset, limit)
r0 = rf(userId, channelID, offset, limit)
} else {
if ret.Get(0) != nil {
r0 = ret.Get(0).(*model.PostList)
@@ -198,7 +198,7 @@ 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)
r1 = rf(userId, channelID, offset, limit)
} else {
r1 = ret.Error(1)
}
@@ -206,13 +206,13 @@ func (_m *PostStore) GetFlaggedPostsForChannel(userId string, channelId string,
return r0, r1
}
// GetFlaggedPostsForTeam provides a mock function with given fields: userId, teamId, offset, limit
func (_m *PostStore) GetFlaggedPostsForTeam(userId string, teamId string, offset int, limit int) (*model.PostList, error) {
ret := _m.Called(userId, teamId, offset, limit)
// GetFlaggedPostsForTeam provides a mock function with given fields: userId, teamID, offset, limit
func (_m *PostStore) GetFlaggedPostsForTeam(userId string, teamID string, offset int, limit int) (*model.PostList, error) {
ret := _m.Called(userId, teamID, offset, limit)
var r0 *model.PostList
if rf, ok := ret.Get(0).(func(string, string, int, int) *model.PostList); ok {
r0 = rf(userId, teamId, offset, limit)
r0 = rf(userId, teamID, offset, limit)
} else {
if ret.Get(0) != nil {
r0 = ret.Get(0).(*model.PostList)
@@ -221,7 +221,7 @@ 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)
r1 = rf(userId, teamID, offset, limit)
} else {
r1 = ret.Error(1)
}
@@ -287,13 +287,13 @@ func (_m *PostStore) GetOldestEntityCreationTime() (int64, error) {
return r0, r1
}
// GetParentsForExportAfter provides a mock function with given fields: limit, afterId
func (_m *PostStore) GetParentsForExportAfter(limit int, afterId string) ([]*model.PostForExport, error) {
ret := _m.Called(limit, afterId)
// GetParentsForExportAfter provides a mock function with given fields: limit, afterID
func (_m *PostStore) GetParentsForExportAfter(limit int, afterID string) ([]*model.PostForExport, error) {
ret := _m.Called(limit, afterID)
var r0 []*model.PostForExport
if rf, ok := ret.Get(0).(func(int, string) []*model.PostForExport); ok {
r0 = rf(limit, afterId)
r0 = rf(limit, afterID)
} else {
if ret.Get(0) != nil {
r0 = ret.Get(0).([]*model.PostForExport)
@@ -302,7 +302,7 @@ 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)
r1 = rf(limit, afterID)
} else {
r1 = ret.Error(1)
}
@@ -310,13 +310,13 @@ func (_m *PostStore) GetParentsForExportAfter(limit int, afterId string) ([]*mod
return r0, r1
}
// GetPostAfterTime provides a mock function with given fields: channelId, time
func (_m *PostStore) GetPostAfterTime(channelId string, time int64) (*model.Post, error) {
ret := _m.Called(channelId, time)
// GetPostAfterTime provides a mock function with given fields: channelID, time
func (_m *PostStore) GetPostAfterTime(channelID string, time int64) (*model.Post, error) {
ret := _m.Called(channelID, time)
var r0 *model.Post
if rf, ok := ret.Get(0).(func(string, int64) *model.Post); ok {
r0 = rf(channelId, time)
r0 = rf(channelID, time)
} else {
if ret.Get(0) != nil {
r0 = ret.Get(0).(*model.Post)
@@ -325,7 +325,7 @@ func (_m *PostStore) GetPostAfterTime(channelId string, time int64) (*model.Post
var r1 error
if rf, ok := ret.Get(1).(func(string, int64) error); ok {
r1 = rf(channelId, time)
r1 = rf(channelID, time)
} else {
r1 = ret.Error(1)
}
@@ -333,20 +333,20 @@ func (_m *PostStore) GetPostAfterTime(channelId string, time int64) (*model.Post
return r0, r1
}
// GetPostIdAfterTime provides a mock function with given fields: channelId, time
func (_m *PostStore) GetPostIdAfterTime(channelId string, time int64) (string, error) {
ret := _m.Called(channelId, time)
// GetPostIdAfterTime provides a mock function with given fields: channelID, time
func (_m *PostStore) GetPostIdAfterTime(channelID string, time int64) (string, error) {
ret := _m.Called(channelID, time)
var r0 string
if rf, ok := ret.Get(0).(func(string, int64) string); ok {
r0 = rf(channelId, time)
r0 = rf(channelID, time)
} else {
r0 = ret.Get(0).(string)
}
var r1 error
if rf, ok := ret.Get(1).(func(string, int64) error); ok {
r1 = rf(channelId, time)
r1 = rf(channelID, time)
} else {
r1 = ret.Error(1)
}
@@ -354,20 +354,20 @@ func (_m *PostStore) GetPostIdAfterTime(channelId string, time int64) (string, e
return r0, r1
}
// GetPostIdBeforeTime provides a mock function with given fields: channelId, time
func (_m *PostStore) GetPostIdBeforeTime(channelId string, time int64) (string, error) {
ret := _m.Called(channelId, time)
// GetPostIdBeforeTime provides a mock function with given fields: channelID, time
func (_m *PostStore) GetPostIdBeforeTime(channelID string, time int64) (string, error) {
ret := _m.Called(channelID, time)
var r0 string
if rf, ok := ret.Get(0).(func(string, int64) string); ok {
r0 = rf(channelId, time)
r0 = rf(channelID, time)
} else {
r0 = ret.Get(0).(string)
}
var r1 error
if rf, ok := ret.Get(1).(func(string, int64) error); ok {
r1 = rf(channelId, time)
r1 = rf(channelID, time)
} else {
r1 = ret.Error(1)
}
@@ -490,13 +490,13 @@ func (_m *PostStore) GetPostsByIds(postIds []string) ([]*model.Post, error) {
return r0, r1
}
// GetPostsCreatedAt provides a mock function with given fields: channelId, time
func (_m *PostStore) GetPostsCreatedAt(channelId string, time int64) ([]*model.Post, error) {
ret := _m.Called(channelId, time)
// GetPostsCreatedAt provides a mock function with given fields: channelID, time
func (_m *PostStore) GetPostsCreatedAt(channelID string, time int64) ([]*model.Post, error) {
ret := _m.Called(channelID, time)
var r0 []*model.Post
if rf, ok := ret.Get(0).(func(string, int64) []*model.Post); ok {
r0 = rf(channelId, time)
r0 = rf(channelID, time)
} else {
if ret.Get(0) != nil {
r0 = ret.Get(0).([]*model.Post)
@@ -505,7 +505,7 @@ func (_m *PostStore) GetPostsCreatedAt(channelId string, time int64) ([]*model.P
var r1 error
if rf, ok := ret.Get(1).(func(string, int64) error); ok {
r1 = rf(channelId, time)
r1 = rf(channelID, time)
} else {
r1 = ret.Error(1)
}
@@ -536,13 +536,13 @@ func (_m *PostStore) GetPostsSince(options model.GetPostsSinceOptions, allowFrom
return r0, r1
}
// GetRepliesForExport provides a mock function with given fields: parentId
func (_m *PostStore) GetRepliesForExport(parentId string) ([]*model.ReplyForExport, error) {
ret := _m.Called(parentId)
// GetRepliesForExport provides a mock function with given fields: parentID
func (_m *PostStore) GetRepliesForExport(parentID string) ([]*model.ReplyForExport, error) {
ret := _m.Called(parentID)
var r0 []*model.ReplyForExport
if rf, ok := ret.Get(0).(func(string) []*model.ReplyForExport); ok {
r0 = rf(parentId)
r0 = rf(parentID)
} else {
if ret.Get(0) != nil {
r0 = ret.Get(0).([]*model.ReplyForExport)
@@ -551,7 +551,7 @@ func (_m *PostStore) GetRepliesForExport(parentId string) ([]*model.ReplyForExpo
var r1 error
if rf, ok := ret.Get(1).(func(string) error); ok {
r1 = rf(parentId)
r1 = rf(parentID)
} else {
r1 = ret.Error(1)
}
@@ -582,9 +582,9 @@ func (_m *PostStore) GetSingle(id string) (*model.Post, error) {
return r0, r1
}
// InvalidateLastPostTimeCache provides a mock function with given fields: channelId
func (_m *PostStore) InvalidateLastPostTimeCache(channelId string) {
_m.Called(channelId)
// InvalidateLastPostTimeCache provides a mock function with given fields: channelID
func (_m *PostStore) InvalidateLastPostTimeCache(channelID string) {
_m.Called(channelID)
}
// Overwrite provides a mock function with given fields: post
@@ -661,13 +661,13 @@ func (_m *PostStore) PermanentDeleteBatch(endTime int64, limit int64) (int64, er
return r0, r1
}
// PermanentDeleteByChannel provides a mock function with given fields: channelId
func (_m *PostStore) PermanentDeleteByChannel(channelId string) error {
ret := _m.Called(channelId)
// PermanentDeleteByChannel provides a mock function with given fields: channelID
func (_m *PostStore) PermanentDeleteByChannel(channelID string) error {
ret := _m.Called(channelID)
var r0 error
if rf, ok := ret.Get(0).(func(string) error); ok {
r0 = rf(channelId)
r0 = rf(channelID)
} else {
r0 = ret.Error(0)
}
@@ -742,13 +742,13 @@ func (_m *PostStore) SaveMultiple(posts []*model.Post) ([]*model.Post, int, erro
return r0, r1, r2
}
// Search provides a mock function with given fields: teamId, userId, params
func (_m *PostStore) Search(teamId string, userId string, params *model.SearchParams) (*model.PostList, error) {
ret := _m.Called(teamId, userId, params)
// Search provides a mock function with given fields: teamID, userId, params
func (_m *PostStore) Search(teamID string, userId string, params *model.SearchParams) (*model.PostList, error) {
ret := _m.Called(teamID, userId, params)
var r0 *model.PostList
if rf, ok := ret.Get(0).(func(string, string, *model.SearchParams) *model.PostList); ok {
r0 = rf(teamId, userId, params)
r0 = rf(teamID, userId, params)
} else {
if ret.Get(0) != nil {
r0 = ret.Get(0).(*model.PostList)
@@ -757,7 +757,7 @@ 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)
r1 = rf(teamID, userId, params)
} else {
r1 = ret.Error(1)
}
@@ -765,13 +765,13 @@ func (_m *PostStore) Search(teamId string, userId string, params *model.SearchPa
return r0, r1
}
// SearchPostsInTeamForUser provides a mock function with given fields: paramsList, userId, teamId, page, perPage
func (_m *PostStore) SearchPostsInTeamForUser(paramsList []*model.SearchParams, userId string, teamId string, page int, perPage int) (*model.PostSearchResults, error) {
ret := _m.Called(paramsList, userId, teamId, page, perPage)
// SearchPostsInTeamForUser provides a mock function with given fields: paramsList, userId, teamID, page, perPage
func (_m *PostStore) SearchPostsInTeamForUser(paramsList []*model.SearchParams, userId string, teamID string, page int, perPage int) (*model.PostSearchResults, error) {
ret := _m.Called(paramsList, userId, teamID, page, perPage)
var r0 *model.PostSearchResults
if rf, ok := ret.Get(0).(func([]*model.SearchParams, string, string, int, int) *model.PostSearchResults); ok {
r0 = rf(paramsList, userId, teamId, page, perPage)
r0 = rf(paramsList, userId, teamID, page, perPage)
} else {
if ret.Get(0) != nil {
r0 = ret.Get(0).(*model.PostSearchResults)
@@ -780,7 +780,7 @@ func (_m *PostStore) SearchPostsInTeamForUser(paramsList []*model.SearchParams,
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)
r1 = rf(paramsList, userId, teamID, page, perPage)
} else {
r1 = ret.Error(1)
}

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

@@ -74,13 +74,13 @@ func (_m *ReactionStore) DeleteAllWithEmojiName(emojiName string) error {
return r0
}
// GetForPost provides a mock function with given fields: postId, allowFromCache
func (_m *ReactionStore) GetForPost(postId string, allowFromCache bool) ([]*model.Reaction, error) {
ret := _m.Called(postId, allowFromCache)
// GetForPost provides a mock function with given fields: postID, allowFromCache
func (_m *ReactionStore) GetForPost(postID string, allowFromCache bool) ([]*model.Reaction, error) {
ret := _m.Called(postID, allowFromCache)
var r0 []*model.Reaction
if rf, ok := ret.Get(0).(func(string, bool) []*model.Reaction); ok {
r0 = rf(postId, allowFromCache)
r0 = rf(postID, allowFromCache)
} else {
if ret.Get(0) != nil {
r0 = ret.Get(0).([]*model.Reaction)
@@ -89,7 +89,7 @@ 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)
r1 = rf(postID, allowFromCache)
} else {
r1 = ret.Error(1)
}

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

@@ -83,13 +83,13 @@ func (_m *RoleStore) ChannelRolesUnderTeamRole(roleName string) ([]*model.Role,
return r0, r1
}
// Delete provides a mock function with given fields: roleId
func (_m *RoleStore) Delete(roleId string) (*model.Role, error) {
ret := _m.Called(roleId)
// Delete provides a mock function with given fields: roleID
func (_m *RoleStore) Delete(roleID string) (*model.Role, error) {
ret := _m.Called(roleID)
var r0 *model.Role
if rf, ok := ret.Get(0).(func(string) *model.Role); ok {
r0 = rf(roleId)
r0 = rf(roleID)
} else {
if ret.Get(0) != nil {
r0 = ret.Get(0).(*model.Role)
@@ -98,7 +98,7 @@ 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)
r1 = rf(roleID)
} else {
r1 = ret.Error(1)
}
@@ -106,13 +106,13 @@ func (_m *RoleStore) Delete(roleId string) (*model.Role, error) {
return r0, r1
}
// Get provides a mock function with given fields: roleId
func (_m *RoleStore) Get(roleId string) (*model.Role, error) {
ret := _m.Called(roleId)
// Get provides a mock function with given fields: roleID
func (_m *RoleStore) Get(roleID string) (*model.Role, error) {
ret := _m.Called(roleID)
var r0 *model.Role
if rf, ok := ret.Get(0).(func(string) *model.Role); ok {
r0 = rf(roleId)
r0 = rf(roleID)
} else {
if ret.Get(0) != nil {
r0 = ret.Get(0).(*model.Role)
@@ -121,7 +121,7 @@ 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)
r1 = rf(roleID)
} else {
r1 = ret.Error(1)
}

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

@@ -56,13 +56,13 @@ func (_m *SchemeStore) CountWithoutPermission(scope string, permissionID string,
return r0, r1
}
// Delete provides a mock function with given fields: schemeId
func (_m *SchemeStore) Delete(schemeId string) (*model.Scheme, error) {
ret := _m.Called(schemeId)
// Delete provides a mock function with given fields: schemeID
func (_m *SchemeStore) Delete(schemeID string) (*model.Scheme, error) {
ret := _m.Called(schemeID)
var r0 *model.Scheme
if rf, ok := ret.Get(0).(func(string) *model.Scheme); ok {
r0 = rf(schemeId)
r0 = rf(schemeID)
} else {
if ret.Get(0) != nil {
r0 = ret.Get(0).(*model.Scheme)
@@ -71,7 +71,7 @@ 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)
r1 = rf(schemeID)
} else {
r1 = ret.Error(1)
}
@@ -79,13 +79,13 @@ func (_m *SchemeStore) Delete(schemeId string) (*model.Scheme, error) {
return r0, r1
}
// Get provides a mock function with given fields: schemeId
func (_m *SchemeStore) Get(schemeId string) (*model.Scheme, error) {
ret := _m.Called(schemeId)
// Get provides a mock function with given fields: schemeID
func (_m *SchemeStore) Get(schemeID string) (*model.Scheme, error) {
ret := _m.Called(schemeID)
var r0 *model.Scheme
if rf, ok := ret.Get(0).(func(string) *model.Scheme); ok {
r0 = rf(schemeId)
r0 = rf(schemeID)
} else {
if ret.Get(0) != nil {
r0 = ret.Get(0).(*model.Scheme)
@@ -94,7 +94,7 @@ 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)
r1 = rf(schemeID)
} else {
r1 = ret.Error(1)
}

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

@@ -40,13 +40,13 @@ func (_m *SessionStore) Cleanup(expiryTime int64, batchSize int64) {
_m.Called(expiryTime, batchSize)
}
// Get provides a mock function with given fields: sessionIdOrToken
func (_m *SessionStore) Get(sessionIdOrToken string) (*model.Session, error) {
ret := _m.Called(sessionIdOrToken)
// Get provides a mock function with given fields: sessionIDOrToken
func (_m *SessionStore) Get(sessionIDOrToken string) (*model.Session, error) {
ret := _m.Called(sessionIDOrToken)
var r0 *model.Session
if rf, ok := ret.Get(0).(func(string) *model.Session); ok {
r0 = rf(sessionIdOrToken)
r0 = rf(sessionIDOrToken)
} else {
if ret.Get(0) != nil {
r0 = ret.Get(0).(*model.Session)
@@ -55,7 +55,7 @@ func (_m *SessionStore) Get(sessionIdOrToken string) (*model.Session, error) {
var r1 error
if rf, ok := ret.Get(1).(func(string) error); ok {
r1 = rf(sessionIdOrToken)
r1 = rf(sessionIDOrToken)
} else {
r1 = ret.Error(1)
}
@@ -132,13 +132,13 @@ func (_m *SessionStore) GetSessionsWithActiveDeviceIds(userId string) ([]*model.
return r0, r1
}
// PermanentDeleteSessionsByUser provides a mock function with given fields: teamId
func (_m *SessionStore) PermanentDeleteSessionsByUser(teamId string) error {
ret := _m.Called(teamId)
// PermanentDeleteSessionsByUser provides a mock function with given fields: teamID
func (_m *SessionStore) PermanentDeleteSessionsByUser(teamID string) error {
ret := _m.Called(teamID)
var r0 error
if rf, ok := ret.Get(0).(func(string) error); ok {
r0 = rf(teamId)
r0 = rf(teamID)
} else {
r0 = ret.Error(0)
}
@@ -146,13 +146,13 @@ func (_m *SessionStore) PermanentDeleteSessionsByUser(teamId string) error {
return r0
}
// Remove provides a mock function with given fields: sessionIdOrToken
func (_m *SessionStore) Remove(sessionIdOrToken string) error {
ret := _m.Called(sessionIdOrToken)
// Remove provides a mock function with given fields: sessionIDOrToken
func (_m *SessionStore) Remove(sessionIDOrToken string) error {
ret := _m.Called(sessionIDOrToken)
var r0 error
if rf, ok := ret.Get(0).(func(string) error); ok {
r0 = rf(sessionIdOrToken)
r0 = rf(sessionIDOrToken)
} else {
r0 = ret.Error(0)
}
@@ -197,20 +197,20 @@ func (_m *SessionStore) Save(session *model.Session) (*model.Session, error) {
return r0, r1
}
// UpdateDeviceId provides a mock function with given fields: id, deviceId, expiresAt
func (_m *SessionStore) UpdateDeviceId(id string, deviceId string, expiresAt int64) (string, error) {
ret := _m.Called(id, deviceId, expiresAt)
// UpdateDeviceId provides a mock function with given fields: id, deviceID, expiresAt
func (_m *SessionStore) UpdateDeviceId(id string, deviceID string, expiresAt int64) (string, error) {
ret := _m.Called(id, deviceID, expiresAt)
var r0 string
if rf, ok := ret.Get(0).(func(string, string, int64) string); ok {
r0 = rf(id, deviceId, expiresAt)
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)
r1 = rf(id, deviceID, expiresAt)
} else {
r1 = ret.Error(1)
}
@@ -232,13 +232,13 @@ func (_m *SessionStore) UpdateExpiredNotify(sessionid string, notified bool) err
return r0
}
// UpdateExpiresAt provides a mock function with given fields: sessionId, time
func (_m *SessionStore) UpdateExpiresAt(sessionId string, time int64) error {
ret := _m.Called(sessionId, time)
// UpdateExpiresAt provides a mock function with given fields: sessionID, time
func (_m *SessionStore) UpdateExpiresAt(sessionID string, time int64) error {
ret := _m.Called(sessionID, time)
var r0 error
if rf, ok := ret.Get(0).(func(string, int64) error); ok {
r0 = rf(sessionId, time)
r0 = rf(sessionID, time)
} else {
r0 = ret.Error(0)
}
@@ -246,13 +246,13 @@ func (_m *SessionStore) UpdateExpiresAt(sessionId string, time int64) error {
return r0
}
// UpdateLastActivityAt provides a mock function with given fields: sessionId, time
func (_m *SessionStore) UpdateLastActivityAt(sessionId string, time int64) error {
ret := _m.Called(sessionId, time)
// UpdateLastActivityAt provides a mock function with given fields: sessionID, time
func (_m *SessionStore) UpdateLastActivityAt(sessionID string, time int64) error {
ret := _m.Called(sessionID, time)
var r0 error
if rf, ok := ret.Get(0).(func(string, int64) error); ok {
r0 = rf(sessionId, time)
r0 = rf(sessionID, time)
} else {
r0 = ret.Error(0)
}

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

@@ -16,20 +16,20 @@ type TeamStore struct {
mock.Mock
}
// AnalyticsGetTeamCountForScheme provides a mock function with given fields: schemeId
func (_m *TeamStore) AnalyticsGetTeamCountForScheme(schemeId string) (int64, error) {
ret := _m.Called(schemeId)
// AnalyticsGetTeamCountForScheme provides a mock function with given fields: schemeID
func (_m *TeamStore) AnalyticsGetTeamCountForScheme(schemeID string) (int64, error) {
ret := _m.Called(schemeID)
var r0 int64
if rf, ok := ret.Get(0).(func(string) int64); ok {
r0 = rf(schemeId)
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)
r1 = rf(schemeID)
} else {
r1 = ret.Error(1)
}
@@ -142,20 +142,20 @@ func (_m *TeamStore) Get(id string) (*model.Team, error) {
return r0, r1
}
// GetActiveMemberCount provides a mock function with given fields: teamId, restrictions
func (_m *TeamStore) GetActiveMemberCount(teamId string, restrictions *model.ViewUsersRestrictions) (int64, error) {
ret := _m.Called(teamId, restrictions)
// GetActiveMemberCount provides a mock function with given fields: teamID, restrictions
func (_m *TeamStore) GetActiveMemberCount(teamID string, restrictions *model.ViewUsersRestrictions) (int64, error) {
ret := _m.Called(teamID, restrictions)
var r0 int64
if rf, ok := ret.Get(0).(func(string, *model.ViewUsersRestrictions) int64); ok {
r0 = rf(teamId, restrictions)
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)
r1 = rf(teamID, restrictions)
} else {
r1 = ret.Error(1)
}
@@ -186,13 +186,13 @@ func (_m *TeamStore) GetAll() ([]*model.Team, error) {
return r0, r1
}
// GetAllForExportAfter provides a mock function with given fields: limit, afterId
func (_m *TeamStore) GetAllForExportAfter(limit int, afterId string) ([]*model.TeamForExport, error) {
ret := _m.Called(limit, afterId)
// GetAllForExportAfter provides a mock function with given fields: limit, afterID
func (_m *TeamStore) GetAllForExportAfter(limit int, afterID string) ([]*model.TeamForExport, error) {
ret := _m.Called(limit, afterID)
var r0 []*model.TeamForExport
if rf, ok := ret.Get(0).(func(int, string) []*model.TeamForExport); ok {
r0 = rf(limit, afterId)
r0 = rf(limit, afterID)
} else {
if ret.Get(0) != nil {
r0 = ret.Get(0).([]*model.TeamForExport)
@@ -201,7 +201,7 @@ 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)
r1 = rf(limit, afterID)
} else {
r1 = ret.Error(1)
}
@@ -347,13 +347,13 @@ func (_m *TeamStore) GetAllTeamPageListing(offset int, limit int) ([]*model.Team
return r0, r1
}
// GetByInviteId provides a mock function with given fields: inviteId
func (_m *TeamStore) GetByInviteId(inviteId string) (*model.Team, error) {
ret := _m.Called(inviteId)
// GetByInviteId provides a mock function with given fields: inviteID
func (_m *TeamStore) GetByInviteId(inviteID string) (*model.Team, error) {
ret := _m.Called(inviteID)
var r0 *model.Team
if rf, ok := ret.Get(0).(func(string) *model.Team); ok {
r0 = rf(inviteId)
r0 = rf(inviteID)
} else {
if ret.Get(0) != nil {
r0 = ret.Get(0).(*model.Team)
@@ -362,7 +362,7 @@ 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)
r1 = rf(inviteID)
} else {
r1 = ret.Error(1)
}
@@ -416,13 +416,13 @@ func (_m *TeamStore) GetByNames(name []string) ([]*model.Team, error) {
return r0, r1
}
// GetChannelUnreadsForAllTeams provides a mock function with given fields: excludeTeamId, userId
func (_m *TeamStore) GetChannelUnreadsForAllTeams(excludeTeamId string, userId string) ([]*model.ChannelUnread, error) {
ret := _m.Called(excludeTeamId, userId)
// GetChannelUnreadsForAllTeams provides a mock function with given fields: excludeTeamID, userId
func (_m *TeamStore) GetChannelUnreadsForAllTeams(excludeTeamID string, userId string) ([]*model.ChannelUnread, error) {
ret := _m.Called(excludeTeamID, userId)
var r0 []*model.ChannelUnread
if rf, ok := ret.Get(0).(func(string, string) []*model.ChannelUnread); ok {
r0 = rf(excludeTeamId, userId)
r0 = rf(excludeTeamID, userId)
} else {
if ret.Get(0) != nil {
r0 = ret.Get(0).([]*model.ChannelUnread)
@@ -431,7 +431,7 @@ 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)
r1 = rf(excludeTeamID, userId)
} else {
r1 = ret.Error(1)
}
@@ -439,13 +439,13 @@ func (_m *TeamStore) GetChannelUnreadsForAllTeams(excludeTeamId string, userId s
return r0, r1
}
// GetChannelUnreadsForTeam provides a mock function with given fields: teamId, userId
func (_m *TeamStore) GetChannelUnreadsForTeam(teamId string, userId string) ([]*model.ChannelUnread, error) {
ret := _m.Called(teamId, userId)
// GetChannelUnreadsForTeam provides a mock function with given fields: teamID, userId
func (_m *TeamStore) GetChannelUnreadsForTeam(teamID string, userId string) ([]*model.ChannelUnread, error) {
ret := _m.Called(teamID, userId)
var r0 []*model.ChannelUnread
if rf, ok := ret.Get(0).(func(string, string) []*model.ChannelUnread); ok {
r0 = rf(teamId, userId)
r0 = rf(teamID, userId)
} else {
if ret.Get(0) != nil {
r0 = ret.Get(0).([]*model.ChannelUnread)
@@ -454,7 +454,7 @@ 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)
r1 = rf(teamID, userId)
} else {
r1 = ret.Error(1)
}
@@ -462,13 +462,13 @@ func (_m *TeamStore) GetChannelUnreadsForTeam(teamId string, userId string) ([]*
return r0, r1
}
// GetMember provides a mock function with given fields: teamId, userId
func (_m *TeamStore) GetMember(teamId string, userId string) (*model.TeamMember, error) {
ret := _m.Called(teamId, userId)
// GetMember provides a mock function with given fields: teamID, userId
func (_m *TeamStore) GetMember(teamID string, userId string) (*model.TeamMember, error) {
ret := _m.Called(teamID, userId)
var r0 *model.TeamMember
if rf, ok := ret.Get(0).(func(string, string) *model.TeamMember); ok {
r0 = rf(teamId, userId)
r0 = rf(teamID, userId)
} else {
if ret.Get(0) != nil {
r0 = ret.Get(0).(*model.TeamMember)
@@ -477,7 +477,7 @@ func (_m *TeamStore) GetMember(teamId string, userId string) (*model.TeamMember,
var r1 error
if rf, ok := ret.Get(1).(func(string, string) error); ok {
r1 = rf(teamId, userId)
r1 = rf(teamID, userId)
} else {
r1 = ret.Error(1)
}
@@ -485,13 +485,13 @@ func (_m *TeamStore) GetMember(teamId string, userId string) (*model.TeamMember,
return r0, r1
}
// GetMembers provides a mock function with given fields: teamId, offset, limit, teamMembersGetOptions
func (_m *TeamStore) GetMembers(teamId string, offset int, limit int, teamMembersGetOptions *model.TeamMembersGetOptions) ([]*model.TeamMember, error) {
ret := _m.Called(teamId, offset, limit, teamMembersGetOptions)
// GetMembers provides a mock function with given fields: teamID, offset, limit, teamMembersGetOptions
func (_m *TeamStore) GetMembers(teamID string, offset int, limit int, teamMembersGetOptions *model.TeamMembersGetOptions) ([]*model.TeamMember, error) {
ret := _m.Called(teamID, offset, limit, teamMembersGetOptions)
var r0 []*model.TeamMember
if rf, ok := ret.Get(0).(func(string, int, int, *model.TeamMembersGetOptions) []*model.TeamMember); ok {
r0 = rf(teamId, offset, limit, teamMembersGetOptions)
r0 = rf(teamID, offset, limit, teamMembersGetOptions)
} else {
if ret.Get(0) != nil {
r0 = ret.Get(0).([]*model.TeamMember)
@@ -500,7 +500,7 @@ 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)
r1 = rf(teamID, offset, limit, teamMembersGetOptions)
} else {
r1 = ret.Error(1)
}
@@ -508,13 +508,13 @@ func (_m *TeamStore) GetMembers(teamId string, offset int, limit int, teamMember
return r0, r1
}
// GetMembersByIds provides a mock function with given fields: teamId, userIds, restrictions
func (_m *TeamStore) GetMembersByIds(teamId string, userIds []string, restrictions *model.ViewUsersRestrictions) ([]*model.TeamMember, error) {
ret := _m.Called(teamId, userIds, restrictions)
// GetMembersByIds provides a mock function with given fields: teamID, userIds, restrictions
func (_m *TeamStore) GetMembersByIds(teamID string, userIds []string, restrictions *model.ViewUsersRestrictions) ([]*model.TeamMember, error) {
ret := _m.Called(teamID, userIds, restrictions)
var r0 []*model.TeamMember
if rf, ok := ret.Get(0).(func(string, []string, *model.ViewUsersRestrictions) []*model.TeamMember); ok {
r0 = rf(teamId, userIds, restrictions)
r0 = rf(teamID, userIds, restrictions)
} else {
if ret.Get(0) != nil {
r0 = ret.Get(0).([]*model.TeamMember)
@@ -523,7 +523,7 @@ 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)
r1 = rf(teamID, userIds, restrictions)
} else {
r1 = ret.Error(1)
}
@@ -554,13 +554,13 @@ func (_m *TeamStore) GetTeamMembersForExport(userId string) ([]*model.TeamMember
return r0, r1
}
// GetTeamsByScheme provides a mock function with given fields: schemeId, offset, limit
func (_m *TeamStore) GetTeamsByScheme(schemeId string, offset int, limit int) ([]*model.Team, error) {
ret := _m.Called(schemeId, offset, limit)
// GetTeamsByScheme provides a mock function with given fields: schemeID, offset, limit
func (_m *TeamStore) GetTeamsByScheme(schemeID string, offset int, limit int) ([]*model.Team, error) {
ret := _m.Called(schemeID, offset, limit)
var r0 []*model.Team
if rf, ok := ret.Get(0).(func(string, int, int) []*model.Team); ok {
r0 = rf(schemeId, offset, limit)
r0 = rf(schemeID, offset, limit)
} else {
if ret.Get(0) != nil {
r0 = ret.Get(0).([]*model.Team)
@@ -569,7 +569,7 @@ 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)
r1 = rf(schemeID, offset, limit)
} else {
r1 = ret.Error(1)
}
@@ -646,20 +646,20 @@ func (_m *TeamStore) GetTeamsForUserWithPagination(userId string, page int, perP
return r0, r1
}
// GetTotalMemberCount provides a mock function with given fields: teamId, restrictions
func (_m *TeamStore) GetTotalMemberCount(teamId string, restrictions *model.ViewUsersRestrictions) (int64, error) {
ret := _m.Called(teamId, restrictions)
// GetTotalMemberCount provides a mock function with given fields: teamID, restrictions
func (_m *TeamStore) GetTotalMemberCount(teamID string, restrictions *model.ViewUsersRestrictions) (int64, error) {
ret := _m.Called(teamID, restrictions)
var r0 int64
if rf, ok := ret.Get(0).(func(string, *model.ViewUsersRestrictions) int64); ok {
r0 = rf(teamId, restrictions)
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)
r1 = rf(teamID, restrictions)
} else {
r1 = ret.Error(1)
}
@@ -716,13 +716,13 @@ func (_m *TeamStore) InvalidateAllTeamIdsForUser(userId string) {
_m.Called(userId)
}
// MigrateTeamMembers provides a mock function with given fields: fromTeamId, fromUserId
func (_m *TeamStore) MigrateTeamMembers(fromTeamId string, fromUserId string) (map[string]string, error) {
ret := _m.Called(fromTeamId, fromUserId)
// MigrateTeamMembers provides a mock function with given fields: fromTeamID, fromUserId
func (_m *TeamStore) MigrateTeamMembers(fromTeamID string, fromUserId string) (map[string]string, error) {
ret := _m.Called(fromTeamID, fromUserId)
var r0 map[string]string
if rf, ok := ret.Get(0).(func(string, string) map[string]string); ok {
r0 = rf(fromTeamId, fromUserId)
r0 = rf(fromTeamID, fromUserId)
} else {
if ret.Get(0) != nil {
r0 = ret.Get(0).(map[string]string)
@@ -731,7 +731,7 @@ 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)
r1 = rf(fromTeamID, fromUserId)
} else {
r1 = ret.Error(1)
}
@@ -739,13 +739,13 @@ func (_m *TeamStore) MigrateTeamMembers(fromTeamId string, fromUserId string) (m
return r0, r1
}
// PermanentDelete provides a mock function with given fields: teamId
func (_m *TeamStore) PermanentDelete(teamId string) error {
ret := _m.Called(teamId)
// PermanentDelete provides a mock function with given fields: teamID
func (_m *TeamStore) PermanentDelete(teamID string) error {
ret := _m.Called(teamID)
var r0 error
if rf, ok := ret.Get(0).(func(string) error); ok {
r0 = rf(teamId)
r0 = rf(teamID)
} else {
r0 = ret.Error(0)
}
@@ -753,13 +753,13 @@ func (_m *TeamStore) PermanentDelete(teamId string) error {
return r0
}
// RemoveAllMembersByTeam provides a mock function with given fields: teamId
func (_m *TeamStore) RemoveAllMembersByTeam(teamId string) error {
ret := _m.Called(teamId)
// RemoveAllMembersByTeam provides a mock function with given fields: teamID
func (_m *TeamStore) RemoveAllMembersByTeam(teamID string) error {
ret := _m.Called(teamID)
var r0 error
if rf, ok := ret.Get(0).(func(string) error); ok {
r0 = rf(teamId)
r0 = rf(teamID)
} else {
r0 = ret.Error(0)
}
@@ -781,13 +781,13 @@ func (_m *TeamStore) RemoveAllMembersByUser(userId string) error {
return r0
}
// RemoveMember provides a mock function with given fields: teamId, userId
func (_m *TeamStore) RemoveMember(teamId string, userId string) error {
ret := _m.Called(teamId, userId)
// RemoveMember provides a mock function with given fields: teamID, userId
func (_m *TeamStore) RemoveMember(teamID string, userId string) error {
ret := _m.Called(teamID, userId)
var r0 error
if rf, ok := ret.Get(0).(func(string, string) error); ok {
r0 = rf(teamId, userId)
r0 = rf(teamID, userId)
} else {
r0 = ret.Error(0)
}
@@ -795,13 +795,13 @@ func (_m *TeamStore) RemoveMember(teamId string, userId string) error {
return r0
}
// RemoveMembers provides a mock function with given fields: teamId, userIds
func (_m *TeamStore) RemoveMembers(teamId string, userIds []string) error {
ret := _m.Called(teamId, userIds)
// RemoveMembers provides a mock function with given fields: teamID, userIds
func (_m *TeamStore) RemoveMembers(teamID string, userIds []string) error {
ret := _m.Called(teamID, userIds)
var r0 error
if rf, ok := ret.Get(0).(func(string, []string) error); ok {
r0 = rf(teamId, userIds)
r0 = rf(teamID, userIds)
} else {
r0 = ret.Error(0)
}
@@ -1014,13 +1014,13 @@ func (_m *TeamStore) Update(team *model.Team) (*model.Team, error) {
return r0, r1
}
// UpdateLastTeamIconUpdate provides a mock function with given fields: teamId, curTime
func (_m *TeamStore) UpdateLastTeamIconUpdate(teamId string, curTime int64) error {
ret := _m.Called(teamId, curTime)
// UpdateLastTeamIconUpdate provides a mock function with given fields: teamID, curTime
func (_m *TeamStore) UpdateLastTeamIconUpdate(teamID string, curTime int64) error {
ret := _m.Called(teamID, curTime)
var r0 error
if rf, ok := ret.Get(0).(func(string, int64) error); ok {
r0 = rf(teamId, curTime)
r0 = rf(teamID, curTime)
} else {
r0 = ret.Error(0)
}

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

@@ -37,13 +37,13 @@ func (_m *ThreadStore) CollectThreadsWithNewerReplies(userId string, channelIds
return r0, r1
}
// CreateMembershipIfNeeded provides a mock function with given fields: userId, postId, following, incrementMentions, updateFollowing
func (_m *ThreadStore) CreateMembershipIfNeeded(userId string, postId string, following bool, incrementMentions bool, updateFollowing bool) error {
ret := _m.Called(userId, postId, following, incrementMentions, updateFollowing)
// CreateMembershipIfNeeded provides a mock function with given fields: userId, postID, following, incrementMentions, updateFollowing
func (_m *ThreadStore) CreateMembershipIfNeeded(userId string, postID string, following bool, incrementMentions bool, updateFollowing bool) error {
ret := _m.Called(userId, postID, following, incrementMentions, updateFollowing)
var r0 error
if rf, ok := ret.Get(0).(func(string, string, bool, bool, bool) error); ok {
r0 = rf(userId, postId, following, incrementMentions, updateFollowing)
r0 = rf(userId, postID, following, incrementMentions, updateFollowing)
} else {
r0 = ret.Error(0)
}
@@ -65,13 +65,13 @@ func (_m *ThreadStore) Delete(postId string) error {
return r0
}
// DeleteMembershipForUser provides a mock function with given fields: userId, postId
func (_m *ThreadStore) DeleteMembershipForUser(userId string, postId string) error {
ret := _m.Called(userId, postId)
// DeleteMembershipForUser provides a mock function with given fields: userId, postID
func (_m *ThreadStore) DeleteMembershipForUser(userId string, postID string) error {
ret := _m.Called(userId, postID)
var r0 error
if rf, ok := ret.Get(0).(func(string, string) error); ok {
r0 = rf(userId, postId)
r0 = rf(userId, postID)
} else {
r0 = ret.Error(0)
}
@@ -102,13 +102,13 @@ func (_m *ThreadStore) Get(id string) (*model.Thread, error) {
return r0, r1
}
// GetMembershipForUser provides a mock function with given fields: userId, postId
func (_m *ThreadStore) GetMembershipForUser(userId string, postId string) (*model.ThreadMembership, error) {
ret := _m.Called(userId, postId)
// GetMembershipForUser provides a mock function with given fields: userId, postID
func (_m *ThreadStore) GetMembershipForUser(userId string, postID string) (*model.ThreadMembership, error) {
ret := _m.Called(userId, postID)
var r0 *model.ThreadMembership
if rf, ok := ret.Get(0).(func(string, string) *model.ThreadMembership); ok {
r0 = rf(userId, postId)
r0 = rf(userId, postID)
} else {
if ret.Get(0) != nil {
r0 = ret.Get(0).(*model.ThreadMembership)
@@ -117,7 +117,7 @@ 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)
r1 = rf(userId, postID)
} else {
r1 = ret.Error(1)
}
@@ -125,13 +125,13 @@ func (_m *ThreadStore) GetMembershipForUser(userId string, postId string) (*mode
return r0, r1
}
// GetMembershipsForUser provides a mock function with given fields: userId, teamId
func (_m *ThreadStore) GetMembershipsForUser(userId string, teamId string) ([]*model.ThreadMembership, error) {
ret := _m.Called(userId, teamId)
// GetMembershipsForUser provides a mock function with given fields: userId, teamID
func (_m *ThreadStore) GetMembershipsForUser(userId string, teamID string) ([]*model.ThreadMembership, error) {
ret := _m.Called(userId, teamID)
var r0 []*model.ThreadMembership
if rf, ok := ret.Get(0).(func(string, string) []*model.ThreadMembership); ok {
r0 = rf(userId, teamId)
r0 = rf(userId, teamID)
} else {
if ret.Get(0) != nil {
r0 = ret.Get(0).([]*model.ThreadMembership)
@@ -140,7 +140,7 @@ 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)
r1 = rf(userId, teamID)
} else {
r1 = ret.Error(1)
}
@@ -240,13 +240,13 @@ func (_m *ThreadStore) GetThreadsForUser(userId string, teamId string, opts mode
return r0, r1
}
// MarkAllAsRead provides a mock function with given fields: userId, teamId
func (_m *ThreadStore) MarkAllAsRead(userId string, teamId string) error {
ret := _m.Called(userId, teamId)
// MarkAllAsRead provides a mock function with given fields: userId, teamID
func (_m *ThreadStore) MarkAllAsRead(userId string, teamID string) error {
ret := _m.Called(userId, teamID)
var r0 error
if rf, ok := ret.Get(0).(func(string, string) error); ok {
r0 = rf(userId, teamId)
r0 = rf(userId, teamID)
} else {
r0 = ret.Error(0)
}
@@ -254,13 +254,13 @@ func (_m *ThreadStore) MarkAllAsRead(userId string, teamId string) error {
return r0
}
// MarkAsRead provides a mock function with given fields: userId, threadId, timestamp
func (_m *ThreadStore) MarkAsRead(userId string, threadId string, timestamp int64) error {
ret := _m.Called(userId, threadId, timestamp)
// MarkAsRead provides a mock function with given fields: userId, threadID, timestamp
func (_m *ThreadStore) MarkAsRead(userId string, threadID string, timestamp int64) error {
ret := _m.Called(userId, threadID, timestamp)
var r0 error
if rf, ok := ret.Get(0).(func(string, string, int64) error); ok {
r0 = rf(userId, threadId, timestamp)
r0 = rf(userId, threadID, timestamp)
} else {
r0 = ret.Error(0)
}

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

@@ -14,13 +14,13 @@ type UserAccessTokenStore struct {
mock.Mock
}
// Delete provides a mock function with given fields: tokenId
func (_m *UserAccessTokenStore) Delete(tokenId string) error {
ret := _m.Called(tokenId)
// Delete provides a mock function with given fields: tokenID
func (_m *UserAccessTokenStore) Delete(tokenID string) error {
ret := _m.Called(tokenID)
var r0 error
if rf, ok := ret.Get(0).(func(string) error); ok {
r0 = rf(tokenId)
r0 = rf(tokenID)
} else {
r0 = ret.Error(0)
}
@@ -42,13 +42,13 @@ func (_m *UserAccessTokenStore) DeleteAllForUser(userId string) error {
return r0
}
// Get provides a mock function with given fields: tokenId
func (_m *UserAccessTokenStore) Get(tokenId string) (*model.UserAccessToken, error) {
ret := _m.Called(tokenId)
// Get provides a mock function with given fields: tokenID
func (_m *UserAccessTokenStore) Get(tokenID string) (*model.UserAccessToken, error) {
ret := _m.Called(tokenID)
var r0 *model.UserAccessToken
if rf, ok := ret.Get(0).(func(string) *model.UserAccessToken); ok {
r0 = rf(tokenId)
r0 = rf(tokenID)
} else {
if ret.Get(0) != nil {
r0 = ret.Get(0).(*model.UserAccessToken)
@@ -57,7 +57,7 @@ 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)
r1 = rf(tokenID)
} else {
r1 = ret.Error(1)
}
@@ -180,13 +180,13 @@ func (_m *UserAccessTokenStore) Search(term string) ([]*model.UserAccessToken, e
return r0, r1
}
// UpdateTokenDisable provides a mock function with given fields: tokenId
func (_m *UserAccessTokenStore) UpdateTokenDisable(tokenId string) error {
ret := _m.Called(tokenId)
// UpdateTokenDisable provides a mock function with given fields: tokenID
func (_m *UserAccessTokenStore) UpdateTokenDisable(tokenID string) error {
ret := _m.Called(tokenID)
var r0 error
if rf, ok := ret.Get(0).(func(string) error); ok {
r0 = rf(tokenId)
r0 = rf(tokenID)
} else {
r0 = ret.Error(0)
}
@@ -194,13 +194,13 @@ func (_m *UserAccessTokenStore) UpdateTokenDisable(tokenId string) error {
return r0
}
// UpdateTokenEnable provides a mock function with given fields: tokenId
func (_m *UserAccessTokenStore) UpdateTokenEnable(tokenId string) error {
ret := _m.Called(tokenId)
// UpdateTokenEnable provides a mock function with given fields: tokenID
func (_m *UserAccessTokenStore) UpdateTokenEnable(tokenID string) error {
ret := _m.Called(tokenID)
var r0 error
if rf, ok := ret.Get(0).(func(string) error); ok {
r0 = rf(tokenId)
r0 = rf(tokenID)
} else {
r0 = ret.Error(0)
}

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

@@ -144,13 +144,13 @@ func (_m *UserStore) AnalyticsGetSystemAdminCount() (int64, error) {
return r0, r1
}
// AutocompleteUsersInChannel provides a mock function with given fields: teamId, channelId, term, options
func (_m *UserStore) AutocompleteUsersInChannel(teamId string, channelId string, term string, options *model.UserSearchOptions) (*model.UserAutocompleteInChannel, error) {
ret := _m.Called(teamId, channelId, term, options)
// AutocompleteUsersInChannel provides a mock function with given fields: teamID, channelID, term, options
func (_m *UserStore) AutocompleteUsersInChannel(teamID string, channelID string, term string, options *model.UserSearchOptions) (*model.UserAutocompleteInChannel, error) {
ret := _m.Called(teamID, channelID, term, options)
var r0 *model.UserAutocompleteInChannel
if rf, ok := ret.Get(0).(func(string, string, string, *model.UserSearchOptions) *model.UserAutocompleteInChannel); ok {
r0 = rf(teamId, channelId, term, options)
r0 = rf(teamID, channelID, term, options)
} else {
if ret.Get(0) != nil {
r0 = ret.Get(0).(*model.UserAutocompleteInChannel)
@@ -159,7 +159,7 @@ func (_m *UserStore) AutocompleteUsersInChannel(teamId string, channelId string,
var r1 error
if rf, ok := ret.Get(1).(func(string, string, string, *model.UserSearchOptions) error); ok {
r1 = rf(teamId, channelId, term, options)
r1 = rf(teamID, channelID, term, options)
} else {
r1 = ret.Error(1)
}
@@ -299,13 +299,13 @@ func (_m *UserStore) GetAll() ([]*model.User, error) {
return r0, r1
}
// GetAllAfter provides a mock function with given fields: limit, afterId
func (_m *UserStore) GetAllAfter(limit int, afterId string) ([]*model.User, error) {
ret := _m.Called(limit, afterId)
// GetAllAfter provides a mock function with given fields: limit, afterID
func (_m *UserStore) GetAllAfter(limit int, afterID string) ([]*model.User, error) {
ret := _m.Called(limit, afterID)
var r0 []*model.User
if rf, ok := ret.Get(0).(func(int, string) []*model.User); ok {
r0 = rf(limit, afterId)
r0 = rf(limit, afterID)
} else {
if ret.Get(0) != nil {
r0 = ret.Get(0).([]*model.User)
@@ -314,7 +314,7 @@ func (_m *UserStore) GetAllAfter(limit int, afterId string) ([]*model.User, erro
var r1 error
if rf, ok := ret.Get(1).(func(int, string) error); ok {
r1 = rf(limit, afterId)
r1 = rf(limit, afterID)
} else {
r1 = ret.Error(1)
}
@@ -414,20 +414,20 @@ func (_m *UserStore) GetAllUsingAuthService(authService string) ([]*model.User,
return r0, r1
}
// GetAnyUnreadPostCountForChannel provides a mock function with given fields: userId, channelId
func (_m *UserStore) GetAnyUnreadPostCountForChannel(userId string, channelId string) (int64, error) {
ret := _m.Called(userId, channelId)
// GetAnyUnreadPostCountForChannel provides a mock function with given fields: userId, channelID
func (_m *UserStore) GetAnyUnreadPostCountForChannel(userId string, channelID string) (int64, error) {
ret := _m.Called(userId, channelID)
var r0 int64
if rf, ok := ret.Get(0).(func(string, string) int64); ok {
r0 = rf(userId, channelId)
r0 = rf(userId, channelID)
} else {
r0 = ret.Get(0).(int64)
}
var r1 error
if rf, ok := ret.Get(1).(func(string, string) error); ok {
r1 = rf(userId, channelId)
r1 = rf(userId, channelID)
} else {
r1 = ret.Error(1)
}
@@ -541,13 +541,13 @@ func (_m *UserStore) GetEtagForAllProfiles() string {
return r0
}
// GetEtagForProfiles provides a mock function with given fields: teamId
func (_m *UserStore) GetEtagForProfiles(teamId string) string {
ret := _m.Called(teamId)
// GetEtagForProfiles provides a mock function with given fields: teamID
func (_m *UserStore) GetEtagForProfiles(teamID string) string {
ret := _m.Called(teamID)
var r0 string
if rf, ok := ret.Get(0).(func(string) string); ok {
r0 = rf(teamId)
r0 = rf(teamID)
} else {
r0 = ret.Get(0).(string)
}
@@ -555,13 +555,13 @@ func (_m *UserStore) GetEtagForProfiles(teamId string) string {
return r0
}
// GetEtagForProfilesNotInTeam provides a mock function with given fields: teamId
func (_m *UserStore) GetEtagForProfilesNotInTeam(teamId string) string {
ret := _m.Called(teamId)
// GetEtagForProfilesNotInTeam provides a mock function with given fields: teamID
func (_m *UserStore) GetEtagForProfilesNotInTeam(teamID string) string {
ret := _m.Called(teamID)
var r0 string
if rf, ok := ret.Get(0).(func(string) string); ok {
r0 = rf(teamId)
r0 = rf(teamID)
} else {
r0 = ret.Get(0).(string)
}
@@ -569,13 +569,13 @@ func (_m *UserStore) GetEtagForProfilesNotInTeam(teamId string) string {
return r0
}
// GetForLogin provides a mock function with given fields: loginId, allowSignInWithUsername, allowSignInWithEmail
func (_m *UserStore) GetForLogin(loginId string, allowSignInWithUsername bool, allowSignInWithEmail bool) (*model.User, error) {
ret := _m.Called(loginId, allowSignInWithUsername, allowSignInWithEmail)
// GetForLogin provides a mock function with given fields: loginID, allowSignInWithUsername, allowSignInWithEmail
func (_m *UserStore) GetForLogin(loginID string, allowSignInWithUsername bool, allowSignInWithEmail bool) (*model.User, error) {
ret := _m.Called(loginID, allowSignInWithUsername, allowSignInWithEmail)
var r0 *model.User
if rf, ok := ret.Get(0).(func(string, bool, bool) *model.User); ok {
r0 = rf(loginId, allowSignInWithUsername, allowSignInWithEmail)
r0 = rf(loginID, allowSignInWithUsername, allowSignInWithEmail)
} else {
if ret.Get(0) != nil {
r0 = ret.Get(0).(*model.User)
@@ -584,7 +584,7 @@ func (_m *UserStore) GetForLogin(loginId string, allowSignInWithUsername bool, a
var r1 error
if rf, ok := ret.Get(1).(func(string, bool, bool) error); ok {
r1 = rf(loginId, allowSignInWithUsername, allowSignInWithEmail)
r1 = rf(loginID, allowSignInWithUsername, allowSignInWithEmail)
} else {
r1 = ret.Error(1)
}
@@ -638,13 +638,13 @@ func (_m *UserStore) GetMany(ctx context.Context, ids []string) ([]*model.User,
return r0, r1
}
// GetNewUsersForTeam provides a mock function with given fields: teamId, offset, limit, viewRestrictions
func (_m *UserStore) GetNewUsersForTeam(teamId string, offset int, limit int, viewRestrictions *model.ViewUsersRestrictions) ([]*model.User, error) {
ret := _m.Called(teamId, offset, limit, viewRestrictions)
// GetNewUsersForTeam provides a mock function with given fields: teamID, offset, limit, viewRestrictions
func (_m *UserStore) GetNewUsersForTeam(teamID string, offset int, limit int, viewRestrictions *model.ViewUsersRestrictions) ([]*model.User, error) {
ret := _m.Called(teamID, offset, limit, viewRestrictions)
var r0 []*model.User
if rf, ok := ret.Get(0).(func(string, int, int, *model.ViewUsersRestrictions) []*model.User); ok {
r0 = rf(teamId, offset, limit, viewRestrictions)
r0 = rf(teamID, offset, limit, viewRestrictions)
} else {
if ret.Get(0) != nil {
r0 = ret.Get(0).([]*model.User)
@@ -653,7 +653,7 @@ func (_m *UserStore) GetNewUsersForTeam(teamId string, offset int, limit int, vi
var r1 error
if rf, ok := ret.Get(1).(func(string, int, int, *model.ViewUsersRestrictions) error); ok {
r1 = rf(teamId, offset, limit, viewRestrictions)
r1 = rf(teamID, offset, limit, viewRestrictions)
} else {
r1 = ret.Error(1)
}
@@ -822,13 +822,13 @@ func (_m *UserStore) GetProfilesNotInChannel(teamId string, channelId string, gr
return r0, r1
}
// GetProfilesNotInTeam provides a mock function with given fields: teamId, groupConstrained, offset, limit, viewRestrictions
func (_m *UserStore) GetProfilesNotInTeam(teamId string, groupConstrained bool, offset int, limit int, viewRestrictions *model.ViewUsersRestrictions) ([]*model.User, error) {
ret := _m.Called(teamId, groupConstrained, offset, limit, viewRestrictions)
// GetProfilesNotInTeam provides a mock function with given fields: teamID, groupConstrained, offset, limit, viewRestrictions
func (_m *UserStore) GetProfilesNotInTeam(teamID string, groupConstrained bool, offset int, limit int, viewRestrictions *model.ViewUsersRestrictions) ([]*model.User, error) {
ret := _m.Called(teamID, groupConstrained, offset, limit, viewRestrictions)
var r0 []*model.User
if rf, ok := ret.Get(0).(func(string, bool, int, int, *model.ViewUsersRestrictions) []*model.User); ok {
r0 = rf(teamId, groupConstrained, offset, limit, viewRestrictions)
r0 = rf(teamID, groupConstrained, offset, limit, viewRestrictions)
} else {
if ret.Get(0) != nil {
r0 = ret.Get(0).([]*model.User)
@@ -837,7 +837,7 @@ func (_m *UserStore) GetProfilesNotInTeam(teamId string, groupConstrained bool,
var r1 error
if rf, ok := ret.Get(1).(func(string, bool, int, int, *model.ViewUsersRestrictions) error); ok {
r1 = rf(teamId, groupConstrained, offset, limit, viewRestrictions)
r1 = rf(teamID, groupConstrained, offset, limit, viewRestrictions)
} else {
r1 = ret.Error(1)
}
@@ -868,13 +868,13 @@ func (_m *UserStore) GetProfilesWithoutTeam(options *model.UserGetOptions) ([]*m
return r0, r1
}
// GetRecentlyActiveUsersForTeam provides a mock function with given fields: teamId, offset, limit, viewRestrictions
func (_m *UserStore) GetRecentlyActiveUsersForTeam(teamId string, offset int, limit int, viewRestrictions *model.ViewUsersRestrictions) ([]*model.User, error) {
ret := _m.Called(teamId, offset, limit, viewRestrictions)
// GetRecentlyActiveUsersForTeam provides a mock function with given fields: teamID, offset, limit, viewRestrictions
func (_m *UserStore) GetRecentlyActiveUsersForTeam(teamID string, offset int, limit int, viewRestrictions *model.ViewUsersRestrictions) ([]*model.User, error) {
ret := _m.Called(teamID, offset, limit, viewRestrictions)
var r0 []*model.User
if rf, ok := ret.Get(0).(func(string, int, int, *model.ViewUsersRestrictions) []*model.User); ok {
r0 = rf(teamId, offset, limit, viewRestrictions)
r0 = rf(teamID, offset, limit, viewRestrictions)
} else {
if ret.Get(0) != nil {
r0 = ret.Get(0).([]*model.User)
@@ -883,7 +883,7 @@ func (_m *UserStore) GetRecentlyActiveUsersForTeam(teamId string, offset int, li
var r1 error
if rf, ok := ret.Get(1).(func(string, int, int, *model.ViewUsersRestrictions) error); ok {
r1 = rf(teamId, offset, limit, viewRestrictions)
r1 = rf(teamID, offset, limit, viewRestrictions)
} else {
r1 = ret.Error(1)
}
@@ -958,20 +958,20 @@ func (_m *UserStore) GetUnreadCount(userId string) (int64, error) {
return r0, r1
}
// GetUnreadCountForChannel provides a mock function with given fields: userId, channelId
func (_m *UserStore) GetUnreadCountForChannel(userId string, channelId string) (int64, error) {
ret := _m.Called(userId, channelId)
// GetUnreadCountForChannel provides a mock function with given fields: userId, channelID
func (_m *UserStore) GetUnreadCountForChannel(userId string, channelID string) (int64, error) {
ret := _m.Called(userId, channelID)
var r0 int64
if rf, ok := ret.Get(0).(func(string, string) int64); ok {
r0 = rf(userId, channelId)
r0 = rf(userId, channelID)
} else {
r0 = ret.Get(0).(int64)
}
var r1 error
if rf, ok := ret.Get(1).(func(string, string) error); ok {
r1 = rf(userId, channelId)
r1 = rf(userId, channelID)
} else {
r1 = ret.Error(1)
}
@@ -1028,9 +1028,9 @@ func (_m *UserStore) InvalidateProfileCacheForUser(userId string) {
_m.Called(userId)
}
// InvalidateProfilesInChannelCache provides a mock function with given fields: channelId
func (_m *UserStore) InvalidateProfilesInChannelCache(channelId string) {
_m.Called(channelId)
// InvalidateProfilesInChannelCache provides a mock function with given fields: channelID
func (_m *UserStore) InvalidateProfilesInChannelCache(channelID string) {
_m.Called(channelID)
}
// InvalidateProfilesInChannelCacheByUser provides a mock function with given fields: userId
@@ -1103,13 +1103,13 @@ func (_m *UserStore) Save(user *model.User) (*model.User, error) {
return r0, r1
}
// Search provides a mock function with given fields: teamId, term, options
func (_m *UserStore) Search(teamId string, term string, options *model.UserSearchOptions) ([]*model.User, error) {
ret := _m.Called(teamId, term, options)
// Search provides a mock function with given fields: teamID, term, options
func (_m *UserStore) Search(teamID string, term string, options *model.UserSearchOptions) ([]*model.User, error) {
ret := _m.Called(teamID, term, options)
var r0 []*model.User
if rf, ok := ret.Get(0).(func(string, string, *model.UserSearchOptions) []*model.User); ok {
r0 = rf(teamId, term, options)
r0 = rf(teamID, term, options)
} else {
if ret.Get(0) != nil {
r0 = ret.Get(0).([]*model.User)
@@ -1118,7 +1118,7 @@ func (_m *UserStore) Search(teamId string, term string, options *model.UserSearc
var r1 error
if rf, ok := ret.Get(1).(func(string, string, *model.UserSearchOptions) error); ok {
r1 = rf(teamId, term, options)
r1 = rf(teamID, term, options)
} else {
r1 = ret.Error(1)
}
@@ -1126,13 +1126,13 @@ func (_m *UserStore) Search(teamId string, term string, options *model.UserSearc
return r0, r1
}
// SearchInChannel provides a mock function with given fields: channelId, term, options
func (_m *UserStore) SearchInChannel(channelId string, term string, options *model.UserSearchOptions) ([]*model.User, error) {
ret := _m.Called(channelId, term, options)
// SearchInChannel provides a mock function with given fields: channelID, term, options
func (_m *UserStore) SearchInChannel(channelID string, term string, options *model.UserSearchOptions) ([]*model.User, error) {
ret := _m.Called(channelID, term, options)
var r0 []*model.User
if rf, ok := ret.Get(0).(func(string, string, *model.UserSearchOptions) []*model.User); ok {
r0 = rf(channelId, term, options)
r0 = rf(channelID, term, options)
} else {
if ret.Get(0) != nil {
r0 = ret.Get(0).([]*model.User)
@@ -1141,7 +1141,7 @@ func (_m *UserStore) SearchInChannel(channelId string, term string, options *mod
var r1 error
if rf, ok := ret.Get(1).(func(string, string, *model.UserSearchOptions) error); ok {
r1 = rf(channelId, term, options)
r1 = rf(channelID, term, options)
} else {
r1 = ret.Error(1)
}
@@ -1172,13 +1172,13 @@ func (_m *UserStore) SearchInGroup(groupID string, term string, options *model.U
return r0, r1
}
// SearchNotInChannel provides a mock function with given fields: teamId, channelId, term, options
func (_m *UserStore) SearchNotInChannel(teamId string, channelId string, term string, options *model.UserSearchOptions) ([]*model.User, error) {
ret := _m.Called(teamId, channelId, term, options)
// SearchNotInChannel provides a mock function with given fields: teamID, channelID, term, options
func (_m *UserStore) SearchNotInChannel(teamID string, channelID string, term string, options *model.UserSearchOptions) ([]*model.User, error) {
ret := _m.Called(teamID, channelID, term, options)
var r0 []*model.User
if rf, ok := ret.Get(0).(func(string, string, string, *model.UserSearchOptions) []*model.User); ok {
r0 = rf(teamId, channelId, term, options)
r0 = rf(teamID, channelID, term, options)
} else {
if ret.Get(0) != nil {
r0 = ret.Get(0).([]*model.User)
@@ -1187,7 +1187,7 @@ func (_m *UserStore) SearchNotInChannel(teamId string, channelId string, term st
var r1 error
if rf, ok := ret.Get(1).(func(string, string, string, *model.UserSearchOptions) error); ok {
r1 = rf(teamId, channelId, term, options)
r1 = rf(teamID, channelID, term, options)
} else {
r1 = ret.Error(1)
}

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

@@ -14,20 +14,20 @@ type WebhookStore struct {
mock.Mock
}
// AnalyticsIncomingCount provides a mock function with given fields: teamId
func (_m *WebhookStore) AnalyticsIncomingCount(teamId string) (int64, error) {
ret := _m.Called(teamId)
// AnalyticsIncomingCount provides a mock function with given fields: teamID
func (_m *WebhookStore) AnalyticsIncomingCount(teamID string) (int64, error) {
ret := _m.Called(teamID)
var r0 int64
if rf, ok := ret.Get(0).(func(string) int64); ok {
r0 = rf(teamId)
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)
r1 = rf(teamID)
} else {
r1 = ret.Error(1)
}
@@ -35,20 +35,20 @@ func (_m *WebhookStore) AnalyticsIncomingCount(teamId string) (int64, error) {
return r0, r1
}
// AnalyticsOutgoingCount provides a mock function with given fields: teamId
func (_m *WebhookStore) AnalyticsOutgoingCount(teamId string) (int64, error) {
ret := _m.Called(teamId)
// AnalyticsOutgoingCount provides a mock function with given fields: teamID
func (_m *WebhookStore) AnalyticsOutgoingCount(teamID string) (int64, error) {
ret := _m.Called(teamID)
var r0 int64
if rf, ok := ret.Get(0).(func(string) int64); ok {
r0 = rf(teamId)
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)
r1 = rf(teamID)
} else {
r1 = ret.Error(1)
}
@@ -61,13 +61,13 @@ func (_m *WebhookStore) ClearCaches() {
_m.Called()
}
// DeleteIncoming provides a mock function with given fields: webhookId, time
func (_m *WebhookStore) DeleteIncoming(webhookId string, time int64) error {
ret := _m.Called(webhookId, time)
// DeleteIncoming provides a mock function with given fields: webhookID, time
func (_m *WebhookStore) DeleteIncoming(webhookID string, time int64) error {
ret := _m.Called(webhookID, time)
var r0 error
if rf, ok := ret.Get(0).(func(string, int64) error); ok {
r0 = rf(webhookId, time)
r0 = rf(webhookID, time)
} else {
r0 = ret.Error(0)
}
@@ -75,13 +75,13 @@ func (_m *WebhookStore) DeleteIncoming(webhookId string, time int64) error {
return r0
}
// DeleteOutgoing provides a mock function with given fields: webhookId, time
func (_m *WebhookStore) DeleteOutgoing(webhookId string, time int64) error {
ret := _m.Called(webhookId, time)
// DeleteOutgoing provides a mock function with given fields: webhookID, time
func (_m *WebhookStore) DeleteOutgoing(webhookID string, time int64) error {
ret := _m.Called(webhookID, time)
var r0 error
if rf, ok := ret.Get(0).(func(string, int64) error); ok {
r0 = rf(webhookId, time)
r0 = rf(webhookID, time)
} else {
r0 = ret.Error(0)
}
@@ -112,13 +112,13 @@ func (_m *WebhookStore) GetIncoming(id string, allowFromCache bool) (*model.Inco
return r0, r1
}
// GetIncomingByChannel provides a mock function with given fields: channelId
func (_m *WebhookStore) GetIncomingByChannel(channelId string) ([]*model.IncomingWebhook, error) {
ret := _m.Called(channelId)
// GetIncomingByChannel provides a mock function with given fields: channelID
func (_m *WebhookStore) GetIncomingByChannel(channelID string) ([]*model.IncomingWebhook, error) {
ret := _m.Called(channelID)
var r0 []*model.IncomingWebhook
if rf, ok := ret.Get(0).(func(string) []*model.IncomingWebhook); ok {
r0 = rf(channelId)
r0 = rf(channelID)
} else {
if ret.Get(0) != nil {
r0 = ret.Get(0).([]*model.IncomingWebhook)
@@ -127,7 +127,7 @@ func (_m *WebhookStore) GetIncomingByChannel(channelId string) ([]*model.Incomin
var r1 error
if rf, ok := ret.Get(1).(func(string) error); ok {
r1 = rf(channelId)
r1 = rf(channelID)
} else {
r1 = ret.Error(1)
}
@@ -135,13 +135,13 @@ func (_m *WebhookStore) GetIncomingByChannel(channelId string) ([]*model.Incomin
return r0, r1
}
// GetIncomingByTeam provides a mock function with given fields: teamId, offset, limit
func (_m *WebhookStore) GetIncomingByTeam(teamId string, offset int, limit int) ([]*model.IncomingWebhook, error) {
ret := _m.Called(teamId, offset, limit)
// GetIncomingByTeam provides a mock function with given fields: teamID, offset, limit
func (_m *WebhookStore) GetIncomingByTeam(teamID string, offset int, limit int) ([]*model.IncomingWebhook, error) {
ret := _m.Called(teamID, offset, limit)
var r0 []*model.IncomingWebhook
if rf, ok := ret.Get(0).(func(string, int, int) []*model.IncomingWebhook); ok {
r0 = rf(teamId, offset, limit)
r0 = rf(teamID, offset, limit)
} else {
if ret.Get(0) != nil {
r0 = ret.Get(0).([]*model.IncomingWebhook)
@@ -150,7 +150,7 @@ 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)
r1 = rf(teamID, offset, limit)
} else {
r1 = ret.Error(1)
}
@@ -158,13 +158,13 @@ func (_m *WebhookStore) GetIncomingByTeam(teamId string, offset int, limit int)
return r0, r1
}
// GetIncomingByTeamByUser provides a mock function with given fields: teamId, userId, offset, limit
func (_m *WebhookStore) GetIncomingByTeamByUser(teamId string, userId string, offset int, limit int) ([]*model.IncomingWebhook, error) {
ret := _m.Called(teamId, userId, offset, limit)
// GetIncomingByTeamByUser provides a mock function with given fields: teamID, userId, offset, limit
func (_m *WebhookStore) GetIncomingByTeamByUser(teamID string, userId string, offset int, limit int) ([]*model.IncomingWebhook, error) {
ret := _m.Called(teamID, userId, offset, limit)
var r0 []*model.IncomingWebhook
if rf, ok := ret.Get(0).(func(string, string, int, int) []*model.IncomingWebhook); ok {
r0 = rf(teamId, userId, offset, limit)
r0 = rf(teamID, userId, offset, limit)
} else {
if ret.Get(0) != nil {
r0 = ret.Get(0).([]*model.IncomingWebhook)
@@ -173,7 +173,7 @@ 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)
r1 = rf(teamID, userId, offset, limit)
} else {
r1 = ret.Error(1)
}
@@ -250,13 +250,13 @@ func (_m *WebhookStore) GetOutgoing(id string) (*model.OutgoingWebhook, error) {
return r0, r1
}
// GetOutgoingByChannel provides a mock function with given fields: channelId, offset, limit
func (_m *WebhookStore) GetOutgoingByChannel(channelId string, offset int, limit int) ([]*model.OutgoingWebhook, error) {
ret := _m.Called(channelId, offset, limit)
// GetOutgoingByChannel provides a mock function with given fields: channelID, offset, limit
func (_m *WebhookStore) GetOutgoingByChannel(channelID string, offset int, limit int) ([]*model.OutgoingWebhook, error) {
ret := _m.Called(channelID, offset, limit)
var r0 []*model.OutgoingWebhook
if rf, ok := ret.Get(0).(func(string, int, int) []*model.OutgoingWebhook); ok {
r0 = rf(channelId, offset, limit)
r0 = rf(channelID, offset, limit)
} else {
if ret.Get(0) != nil {
r0 = ret.Get(0).([]*model.OutgoingWebhook)
@@ -265,7 +265,7 @@ 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)
r1 = rf(channelID, offset, limit)
} else {
r1 = ret.Error(1)
}
@@ -273,13 +273,13 @@ func (_m *WebhookStore) GetOutgoingByChannel(channelId string, offset int, limit
return r0, r1
}
// GetOutgoingByChannelByUser provides a mock function with given fields: channelId, userId, offset, limit
func (_m *WebhookStore) GetOutgoingByChannelByUser(channelId string, userId string, offset int, limit int) ([]*model.OutgoingWebhook, error) {
ret := _m.Called(channelId, userId, offset, limit)
// GetOutgoingByChannelByUser provides a mock function with given fields: channelID, userId, offset, limit
func (_m *WebhookStore) GetOutgoingByChannelByUser(channelID string, userId string, offset int, limit int) ([]*model.OutgoingWebhook, error) {
ret := _m.Called(channelID, userId, offset, limit)
var r0 []*model.OutgoingWebhook
if rf, ok := ret.Get(0).(func(string, string, int, int) []*model.OutgoingWebhook); ok {
r0 = rf(channelId, userId, offset, limit)
r0 = rf(channelID, userId, offset, limit)
} else {
if ret.Get(0) != nil {
r0 = ret.Get(0).([]*model.OutgoingWebhook)
@@ -288,7 +288,7 @@ 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)
r1 = rf(channelID, userId, offset, limit)
} else {
r1 = ret.Error(1)
}
@@ -296,13 +296,13 @@ func (_m *WebhookStore) GetOutgoingByChannelByUser(channelId string, userId stri
return r0, r1
}
// GetOutgoingByTeam provides a mock function with given fields: teamId, offset, limit
func (_m *WebhookStore) GetOutgoingByTeam(teamId string, offset int, limit int) ([]*model.OutgoingWebhook, error) {
ret := _m.Called(teamId, offset, limit)
// GetOutgoingByTeam provides a mock function with given fields: teamID, offset, limit
func (_m *WebhookStore) GetOutgoingByTeam(teamID string, offset int, limit int) ([]*model.OutgoingWebhook, error) {
ret := _m.Called(teamID, offset, limit)
var r0 []*model.OutgoingWebhook
if rf, ok := ret.Get(0).(func(string, int, int) []*model.OutgoingWebhook); ok {
r0 = rf(teamId, offset, limit)
r0 = rf(teamID, offset, limit)
} else {
if ret.Get(0) != nil {
r0 = ret.Get(0).([]*model.OutgoingWebhook)
@@ -311,7 +311,7 @@ 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)
r1 = rf(teamID, offset, limit)
} else {
r1 = ret.Error(1)
}
@@ -319,13 +319,13 @@ func (_m *WebhookStore) GetOutgoingByTeam(teamId string, offset int, limit int)
return r0, r1
}
// GetOutgoingByTeamByUser provides a mock function with given fields: teamId, userId, offset, limit
func (_m *WebhookStore) GetOutgoingByTeamByUser(teamId string, userId string, offset int, limit int) ([]*model.OutgoingWebhook, error) {
ret := _m.Called(teamId, userId, offset, limit)
// GetOutgoingByTeamByUser provides a mock function with given fields: teamID, userId, offset, limit
func (_m *WebhookStore) GetOutgoingByTeamByUser(teamID string, userId string, offset int, limit int) ([]*model.OutgoingWebhook, error) {
ret := _m.Called(teamID, userId, offset, limit)
var r0 []*model.OutgoingWebhook
if rf, ok := ret.Get(0).(func(string, string, int, int) []*model.OutgoingWebhook); ok {
r0 = rf(teamId, userId, offset, limit)
r0 = rf(teamID, userId, offset, limit)
} else {
if ret.Get(0) != nil {
r0 = ret.Get(0).([]*model.OutgoingWebhook)
@@ -334,7 +334,7 @@ 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)
r1 = rf(teamID, userId, offset, limit)
} else {
r1 = ret.Error(1)
}
@@ -393,13 +393,13 @@ func (_m *WebhookStore) InvalidateWebhookCache(webhook string) {
_m.Called(webhook)
}
// PermanentDeleteIncomingByChannel provides a mock function with given fields: channelId
func (_m *WebhookStore) PermanentDeleteIncomingByChannel(channelId string) error {
ret := _m.Called(channelId)
// PermanentDeleteIncomingByChannel provides a mock function with given fields: channelID
func (_m *WebhookStore) PermanentDeleteIncomingByChannel(channelID string) error {
ret := _m.Called(channelID)
var r0 error
if rf, ok := ret.Get(0).(func(string) error); ok {
r0 = rf(channelId)
r0 = rf(channelID)
} else {
r0 = ret.Error(0)
}
@@ -421,13 +421,13 @@ func (_m *WebhookStore) PermanentDeleteIncomingByUser(userId string) error {
return r0
}
// PermanentDeleteOutgoingByChannel provides a mock function with given fields: channelId
func (_m *WebhookStore) PermanentDeleteOutgoingByChannel(channelId string) error {
ret := _m.Called(channelId)
// PermanentDeleteOutgoingByChannel provides a mock function with given fields: channelID
func (_m *WebhookStore) PermanentDeleteOutgoingByChannel(channelID string) error {
ret := _m.Called(channelID)
var r0 error
if rf, ok := ret.Get(0).(func(string) error); ok {
r0 = rf(channelId)
r0 = rf(channelID)
} else {
r0 = ret.Error(0)
}