[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 удалений

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

@@ -75,18 +75,18 @@ func (e *ErrConflict) Unwrap() error {
// ErrNotFound indicates that a resource was not found
type ErrNotFound struct {
resource string
Id string
ID string
}
func NewErrNotFound(resource, id string) *ErrNotFound {
return &ErrNotFound{
resource: resource,
Id: id,
ID: id,
}
}
func (e *ErrNotFound) Error() string {
return "resource: " + e.resource + " id: " + e.Id
return "resource: " + e.resource + " id: " + e.ID
}
// ErrOutOfBounds indicates that the requested total numbers of rows

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

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

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

@@ -88,8 +88,8 @@ type TeamStore interface {
GetAllTeamListing() ([]*model.Team, error)
GetAllTeamPageListing(offset int, limit int) ([]*model.Team, error)
GetTeamsByUserId(userId string) ([]*model.Team, error)
GetByInviteId(inviteId string) (*model.Team, error)
PermanentDelete(teamId string) error
GetByInviteId(inviteID string) (*model.Team, error)
PermanentDelete(teamID string) error
AnalyticsTeamCount(includeDeleted bool) (int64, error)
AnalyticsPublicTeamCount() (int64, error)
AnalyticsPrivateTeamCount() (int64, error)
@@ -97,26 +97,26 @@ type TeamStore interface {
SaveMember(member *model.TeamMember, maxUsersPerTeam int) (*model.TeamMember, error)
UpdateMember(member *model.TeamMember) (*model.TeamMember, error)
UpdateMultipleMembers(members []*model.TeamMember) ([]*model.TeamMember, error)
GetMember(teamId string, userId string) (*model.TeamMember, error)
GetMembers(teamId string, offset int, limit int, teamMembersGetOptions *model.TeamMembersGetOptions) ([]*model.TeamMember, error)
GetMembersByIds(teamId string, userIds []string, restrictions *model.ViewUsersRestrictions) ([]*model.TeamMember, error)
GetTotalMemberCount(teamId string, restrictions *model.ViewUsersRestrictions) (int64, error)
GetActiveMemberCount(teamId string, restrictions *model.ViewUsersRestrictions) (int64, error)
GetMember(teamID string, userId string) (*model.TeamMember, error)
GetMembers(teamID string, offset int, limit int, teamMembersGetOptions *model.TeamMembersGetOptions) ([]*model.TeamMember, error)
GetMembersByIds(teamID string, userIds []string, restrictions *model.ViewUsersRestrictions) ([]*model.TeamMember, error)
GetTotalMemberCount(teamID string, restrictions *model.ViewUsersRestrictions) (int64, error)
GetActiveMemberCount(teamID string, restrictions *model.ViewUsersRestrictions) (int64, error)
GetTeamsForUser(ctx context.Context, userId string) ([]*model.TeamMember, error)
GetTeamsForUserWithPagination(userId string, page, perPage int) ([]*model.TeamMember, error)
GetChannelUnreadsForAllTeams(excludeTeamId, userId string) ([]*model.ChannelUnread, error)
GetChannelUnreadsForTeam(teamId, userId string) ([]*model.ChannelUnread, error)
RemoveMember(teamId string, userId string) error
RemoveMembers(teamId string, userIds []string) error
RemoveAllMembersByTeam(teamId string) error
GetChannelUnreadsForAllTeams(excludeTeamID, userId string) ([]*model.ChannelUnread, error)
GetChannelUnreadsForTeam(teamID, userId string) ([]*model.ChannelUnread, error)
RemoveMember(teamID string, userId string) error
RemoveMembers(teamID string, userIds []string) error
RemoveAllMembersByTeam(teamID string) error
RemoveAllMembersByUser(userId string) error
UpdateLastTeamIconUpdate(teamId string, curTime int64) error
GetTeamsByScheme(schemeId string, offset int, limit int) ([]*model.Team, error)
MigrateTeamMembers(fromTeamId string, fromUserId string) (map[string]string, error)
UpdateLastTeamIconUpdate(teamID string, curTime int64) error
GetTeamsByScheme(schemeID string, offset int, limit int) ([]*model.Team, error)
MigrateTeamMembers(fromTeamID string, fromUserId string) (map[string]string, error)
ResetAllTeamSchemes() error
ClearAllCustomRoleAssignments() error
AnalyticsGetTeamCountForScheme(schemeId string) (int64, error)
GetAllForExportAfter(limit int, afterId string) ([]*model.TeamForExport, error)
AnalyticsGetTeamCountForScheme(schemeID string) (int64, error)
GetAllForExportAfter(limit int, afterID string) ([]*model.TeamForExport, error)
GetTeamMembersForExport(userId string) ([]*model.TeamMemberForExport, error)
UserBelongsToTeams(userId string, teamIds []string) (bool, error)
GetUserTeamIds(userId string, allowFromCache bool) ([]string, error)
@@ -136,99 +136,99 @@ type ChannelStore interface {
CreateDirectChannel(userId *model.User, otherUserId *model.User) (*model.Channel, error)
SaveDirectChannel(channel *model.Channel, member1 *model.ChannelMember, member2 *model.ChannelMember) (*model.Channel, error)
Update(channel *model.Channel) (*model.Channel, error)
UpdateSidebarChannelCategoryOnMove(channel *model.Channel, newTeamId string) error
ClearSidebarOnTeamLeave(userId, teamId string) error
UpdateSidebarChannelCategoryOnMove(channel *model.Channel, newTeamID string) error
ClearSidebarOnTeamLeave(userId, teamID string) error
Get(id string, allowFromCache bool) (*model.Channel, error)
InvalidateChannel(id string)
InvalidateChannelByName(teamId, name string)
InvalidateChannelByName(teamID, name string)
GetFromMaster(id string) (*model.Channel, error)
Delete(channelId string, time int64) error
Restore(channelId string, time int64) error
SetDeleteAt(channelId string, deleteAt int64, updateAt int64) error
PermanentDelete(channelId string) error
PermanentDeleteByTeam(teamId string) error
Delete(channelID string, time int64) error
Restore(channelID string, time int64) error
SetDeleteAt(channelID string, deleteAt int64, updateAt int64) error
PermanentDelete(channelID string) error
PermanentDeleteByTeam(teamID string) error
GetByName(team_id string, name string, allowFromCache bool) (*model.Channel, error)
GetByNames(team_id string, names []string, allowFromCache bool) ([]*model.Channel, error)
GetByNameIncludeDeleted(team_id string, name string, allowFromCache bool) (*model.Channel, error)
GetDeletedByName(team_id string, name string) (*model.Channel, error)
GetDeleted(team_id string, offset int, limit int, userId string) (*model.ChannelList, error)
GetChannels(teamId string, userId string, includeDeleted bool, lastDeleteAt int) (*model.ChannelList, error)
GetChannels(teamID string, userId string, includeDeleted bool, lastDeleteAt int) (*model.ChannelList, error)
GetAllChannels(page, perPage int, opts ChannelSearchOpts) (*model.ChannelListWithTeamData, error)
GetAllChannelsCount(opts ChannelSearchOpts) (int64, error)
GetMoreChannels(teamId string, userId string, offset int, limit int) (*model.ChannelList, error)
GetPrivateChannelsForTeam(teamId string, offset int, limit int) (*model.ChannelList, error)
GetPublicChannelsForTeam(teamId string, offset int, limit int) (*model.ChannelList, error)
GetPublicChannelsByIdsForTeam(teamId string, channelIds []string) (*model.ChannelList, error)
GetChannelCounts(teamId string, userId string) (*model.ChannelCounts, error)
GetTeamChannels(teamId string) (*model.ChannelList, error)
GetAll(teamId string) ([]*model.Channel, error)
GetMoreChannels(teamID string, userId string, offset int, limit int) (*model.ChannelList, error)
GetPrivateChannelsForTeam(teamID string, offset int, limit int) (*model.ChannelList, error)
GetPublicChannelsForTeam(teamID string, offset int, limit int) (*model.ChannelList, error)
GetPublicChannelsByIdsForTeam(teamID string, channelIds []string) (*model.ChannelList, error)
GetChannelCounts(teamID string, userId string) (*model.ChannelCounts, error)
GetTeamChannels(teamID string) (*model.ChannelList, error)
GetAll(teamID string) ([]*model.Channel, error)
GetChannelsByIds(channelIds []string, includeDeleted bool) ([]*model.Channel, error)
GetForPost(postId string) (*model.Channel, error)
GetForPost(postID string) (*model.Channel, error)
SaveMultipleMembers(members []*model.ChannelMember) ([]*model.ChannelMember, error)
SaveMember(member *model.ChannelMember) (*model.ChannelMember, error)
UpdateMember(member *model.ChannelMember) (*model.ChannelMember, error)
UpdateMultipleMembers(members []*model.ChannelMember) ([]*model.ChannelMember, error)
GetMembers(channelId string, offset, limit int) (*model.ChannelMembers, error)
GetMember(channelId string, userId string) (*model.ChannelMember, error)
GetChannelMembersTimezones(channelId string) ([]model.StringMap, error)
GetMembers(channelID string, offset, limit int) (*model.ChannelMembers, error)
GetMember(channelID string, userId string) (*model.ChannelMember, error)
GetChannelMembersTimezones(channelID string) ([]model.StringMap, error)
GetAllChannelMembersForUser(userId string, allowFromCache bool, includeDeleted bool) (map[string]string, error)
InvalidateAllChannelMembersForUser(userId string)
IsUserInChannelUseCache(userId string, channelId string) bool
GetAllChannelMembersNotifyPropsForChannel(channelId string, allowFromCache bool) (map[string]model.StringMap, error)
InvalidateCacheForChannelMembersNotifyProps(channelId string)
GetMemberForPost(postId string, userId string) (*model.ChannelMember, error)
InvalidateMemberCount(channelId string)
GetMemberCountFromCache(channelId string) int64
GetMemberCount(channelId string, allowFromCache bool) (int64, error)
IsUserInChannelUseCache(userId string, channelID string) bool
GetAllChannelMembersNotifyPropsForChannel(channelID string, allowFromCache bool) (map[string]model.StringMap, error)
InvalidateCacheForChannelMembersNotifyProps(channelID string)
GetMemberForPost(postID string, userId string) (*model.ChannelMember, error)
InvalidateMemberCount(channelID string)
GetMemberCountFromCache(channelID string) int64
GetMemberCount(channelID string, allowFromCache bool) (int64, error)
GetMemberCountsByGroup(channelID string, includeTimezones bool) ([]*model.ChannelMemberCountByGroup, error)
InvalidatePinnedPostCount(channelId string)
GetPinnedPostCount(channelId string, allowFromCache bool) (int64, error)
InvalidateGuestCount(channelId string)
GetGuestCount(channelId string, allowFromCache bool) (int64, error)
GetPinnedPosts(channelId string) (*model.PostList, error)
RemoveMember(channelId string, userId string) error
RemoveMembers(channelId string, userIds []string) error
InvalidatePinnedPostCount(channelID string)
GetPinnedPostCount(channelID string, allowFromCache bool) (int64, error)
InvalidateGuestCount(channelID string)
GetGuestCount(channelID string, allowFromCache bool) (int64, error)
GetPinnedPosts(channelID string) (*model.PostList, error)
RemoveMember(channelID string, userId string) error
RemoveMembers(channelID string, userIds []string) error
PermanentDeleteMembersByUser(userId string) error
PermanentDeleteMembersByChannel(channelId string) error
PermanentDeleteMembersByChannel(channelID string) error
UpdateLastViewedAt(channelIds []string, userId string, updateThreads bool) (map[string]int64, error)
UpdateLastViewedAtPost(unreadPost *model.Post, userID string, mentionCount int, updateThreads bool) (*model.ChannelUnreadAt, error)
CountPostsAfter(channelId string, timestamp int64, userId string) (int, error)
IncrementMentionCount(channelId string, userId string, updateThreads bool) error
AnalyticsTypeCount(teamId string, channelType string) (int64, error)
GetMembersForUser(teamId string, userId string) (*model.ChannelMembers, error)
GetMembersForUserWithPagination(teamId, userId string, page, perPage int) (*model.ChannelMembers, error)
AutocompleteInTeam(teamId string, term string, includeDeleted bool) (*model.ChannelList, error)
AutocompleteInTeamForSearch(teamId string, userId string, term string, includeDeleted bool) (*model.ChannelList, error)
CountPostsAfter(channelID string, timestamp int64, userId string) (int, error)
IncrementMentionCount(channelID string, userId string, updateThreads bool) error
AnalyticsTypeCount(teamID string, channelType string) (int64, error)
GetMembersForUser(teamID string, userId string) (*model.ChannelMembers, error)
GetMembersForUserWithPagination(teamID, userId string, page, perPage int) (*model.ChannelMembers, error)
AutocompleteInTeam(teamID string, term string, includeDeleted bool) (*model.ChannelList, error)
AutocompleteInTeamForSearch(teamID string, userId string, term string, includeDeleted bool) (*model.ChannelList, error)
SearchAllChannels(term string, opts ChannelSearchOpts) (*model.ChannelListWithTeamData, int64, error)
SearchInTeam(teamId string, term string, includeDeleted bool) (*model.ChannelList, error)
SearchArchivedInTeam(teamId string, term string, userId string) (*model.ChannelList, error)
SearchForUserInTeam(userId string, teamId string, term string, includeDeleted bool) (*model.ChannelList, error)
SearchMore(userId string, teamId string, term string) (*model.ChannelList, error)
SearchInTeam(teamID string, term string, includeDeleted bool) (*model.ChannelList, error)
SearchArchivedInTeam(teamID string, term string, userId string) (*model.ChannelList, error)
SearchForUserInTeam(userId string, teamID string, term string, includeDeleted bool) (*model.ChannelList, error)
SearchMore(userId string, teamID string, term string) (*model.ChannelList, error)
SearchGroupChannels(userId, term string) (*model.ChannelList, error)
GetMembersByIds(channelId string, userIds []string) (*model.ChannelMembers, error)
GetMembersByIds(channelID string, userIds []string) (*model.ChannelMembers, error)
GetMembersByChannelIds(channelIds []string, userId string) (*model.ChannelMembers, error)
AnalyticsDeletedTypeCount(teamId string, channelType string) (int64, error)
GetChannelUnread(channelId, userId string) (*model.ChannelUnread, error)
AnalyticsDeletedTypeCount(teamID string, channelType string) (int64, error)
GetChannelUnread(channelID, userId string) (*model.ChannelUnread, error)
ClearCaches()
GetChannelsByScheme(schemeId string, offset int, limit int) (model.ChannelList, error)
GetChannelsByScheme(schemeID string, offset int, limit int) (model.ChannelList, error)
MigrateChannelMembers(fromChannelId string, fromUserId string) (map[string]string, error)
ResetAllChannelSchemes() error
ClearAllCustomRoleAssignments() error
MigratePublicChannels() error
CreateInitialSidebarCategories(userId, teamId string) error
GetSidebarCategories(userId, teamId string) (*model.OrderedSidebarCategories, error)
GetSidebarCategory(categoryId string) (*model.SidebarCategoryWithChannels, error)
GetSidebarCategoryOrder(userId, teamId string) ([]string, error)
CreateSidebarCategory(userId, teamId string, newCategory *model.SidebarCategoryWithChannels) (*model.SidebarCategoryWithChannels, error)
UpdateSidebarCategoryOrder(userId, teamId string, categoryOrder []string) error
UpdateSidebarCategories(userId, teamId string, categories []*model.SidebarCategoryWithChannels) ([]*model.SidebarCategoryWithChannels, []*model.SidebarCategoryWithChannels, error)
CreateInitialSidebarCategories(userId, teamID string) error
GetSidebarCategories(userId, teamID string) (*model.OrderedSidebarCategories, error)
GetSidebarCategory(categoryID string) (*model.SidebarCategoryWithChannels, error)
GetSidebarCategoryOrder(userId, teamID string) ([]string, error)
CreateSidebarCategory(userId, teamID string, newCategory *model.SidebarCategoryWithChannels) (*model.SidebarCategoryWithChannels, error)
UpdateSidebarCategoryOrder(userId, teamID string, categoryOrder []string) error
UpdateSidebarCategories(userId, teamID string, categories []*model.SidebarCategoryWithChannels) ([]*model.SidebarCategoryWithChannels, []*model.SidebarCategoryWithChannels, error)
UpdateSidebarChannelsByPreferences(preferences *model.Preferences) error
DeleteSidebarChannelsByPreferences(preferences *model.Preferences) error
DeleteSidebarCategory(categoryId string) error
GetAllChannelsForExportAfter(limit int, afterId string) ([]*model.ChannelForExport, error)
GetAllDirectChannelsForExportAfter(limit int, afterId string) ([]*model.DirectChannelForExport, error)
GetChannelMembersForExport(userId string, teamId string) ([]*model.ChannelMemberForExport, error)
RemoveAllDeactivatedMembers(channelId string) error
DeleteSidebarCategory(categoryID string) error
GetAllChannelsForExportAfter(limit int, afterID string) ([]*model.ChannelForExport, error)
GetAllDirectChannelsForExportAfter(limit int, afterID string) ([]*model.DirectChannelForExport, error)
GetChannelMembersForExport(userId string, teamID string) ([]*model.ChannelMemberForExport, error)
RemoveAllDeactivatedMembers(channelID string) error
GetChannelsBatchForIndexing(startTime, endTime int64, limit int) ([]*model.Channel, error)
UserBelongsToChannels(userId string, channelIds []string) (bool, error)
@@ -241,9 +241,9 @@ type ChannelStore interface {
}
type ChannelMemberHistoryStore interface {
LogJoinEvent(userId string, channelId string, joinTime int64) error
LogLeaveEvent(userId string, channelId string, leaveTime int64) error
GetUsersInChannelDuring(startTime int64, endTime int64, channelId string) ([]*model.ChannelMemberHistoryResult, error)
LogJoinEvent(userId string, channelID string, joinTime int64) error
LogLeaveEvent(userId string, channelID string, leaveTime int64) error
GetUsersInChannelDuring(startTime int64, endTime int64, channelID string) ([]*model.ChannelMemberHistoryResult, error)
PermanentDeleteBatch(endTime int64, limit int64) (int64, error)
}
type ThreadStore interface {
@@ -257,15 +257,15 @@ type ThreadStore interface {
GetPosts(threadId string, since int64) ([]*model.Post, error)
GetThreadMentionsForUserPerChannel(userId, teamId string) (map[string]int64, error)
MarkAllAsRead(userId, teamId string) error
MarkAsRead(userId, threadId string, timestamp int64) error
MarkAllAsRead(userId, teamID string) error
MarkAsRead(userId, threadID string, timestamp int64) error
SaveMembership(membership *model.ThreadMembership) (*model.ThreadMembership, error)
UpdateMembership(membership *model.ThreadMembership) (*model.ThreadMembership, error)
GetMembershipsForUser(userId, teamId string) ([]*model.ThreadMembership, error)
GetMembershipForUser(userId, postId string) (*model.ThreadMembership, error)
DeleteMembershipForUser(userId, postId string) error
CreateMembershipIfNeeded(userId, postId string, following, incrementMentions, updateFollowing bool) error
GetMembershipsForUser(userId, teamID string) ([]*model.ThreadMembership, error)
GetMembershipForUser(userId, postID string) (*model.ThreadMembership, error)
DeleteMembershipForUser(userId, postID string) error
CreateMembershipIfNeeded(userId, postID string, following, incrementMentions, updateFollowing bool) error
CollectThreadsWithNewerReplies(userId string, channelIds []string, timestamp int64) ([]string, error)
UpdateUnreadsByChannel(userId string, changedThreads []string, timestamp int64, updateViewedTimestamp bool) error
}
@@ -276,28 +276,28 @@ type PostStore interface {
Update(newPost *model.Post, oldPost *model.Post) (*model.Post, error)
Get(id string, skipFetchThreads, collapsedThreads, collapsedThreadsExtended bool) (*model.PostList, error)
GetSingle(id string) (*model.Post, error)
Delete(postId string, time int64, deleteByID string) error
Delete(postID string, time int64, deleteByID string) error
PermanentDeleteByUser(userId string) error
PermanentDeleteByChannel(channelId string) error
PermanentDeleteByChannel(channelID string) error
GetPosts(options model.GetPostsOptions, allowFromCache bool) (*model.PostList, error)
GetFlaggedPosts(userId string, offset int, limit int) (*model.PostList, error)
// @openTracingParams userId, teamId, offset, limit
GetFlaggedPostsForTeam(userId, teamId string, offset int, limit int) (*model.PostList, error)
GetFlaggedPostsForChannel(userId, channelId string, offset int, limit int) (*model.PostList, error)
// @openTracingParams userId, teamID, offset, limit
GetFlaggedPostsForTeam(userId, teamID string, offset int, limit int) (*model.PostList, error)
GetFlaggedPostsForChannel(userId, channelID string, offset int, limit int) (*model.PostList, error)
GetPostsBefore(options model.GetPostsOptions) (*model.PostList, error)
GetPostsAfter(options model.GetPostsOptions) (*model.PostList, error)
GetPostsSince(options model.GetPostsSinceOptions, allowFromCache bool) (*model.PostList, error)
GetPostAfterTime(channelId string, time int64) (*model.Post, error)
GetPostIdAfterTime(channelId string, time int64) (string, error)
GetPostIdBeforeTime(channelId string, time int64) (string, error)
GetEtag(channelId string, allowFromCache bool, collapsedThreads bool) string
Search(teamId string, userId string, params *model.SearchParams) (*model.PostList, error)
AnalyticsUserCountsWithPostsByDay(teamId string) (model.AnalyticsRows, error)
GetPostAfterTime(channelID string, time int64) (*model.Post, error)
GetPostIdAfterTime(channelID string, time int64) (string, error)
GetPostIdBeforeTime(channelID string, time int64) (string, error)
GetEtag(channelID string, allowFromCache bool, collapsedThreads bool) string
Search(teamID string, userId string, params *model.SearchParams) (*model.PostList, error)
AnalyticsUserCountsWithPostsByDay(teamID string) (model.AnalyticsRows, error)
AnalyticsPostCountsByDay(options *model.AnalyticsPostCountsOptions) (model.AnalyticsRows, error)
AnalyticsPostCount(teamId string, mustHaveFile bool, mustHaveHashtag bool) (int64, error)
AnalyticsPostCount(teamID string, mustHaveFile bool, mustHaveHashtag bool) (int64, error)
ClearCaches()
InvalidateLastPostTimeCache(channelId string)
GetPostsCreatedAt(channelId string, time int64) ([]*model.Post, error)
InvalidateLastPostTimeCache(channelID string)
GetPostsCreatedAt(channelID string, time int64) ([]*model.Post, error)
Overwrite(post *model.Post) (*model.Post, error)
OverwriteMultiple(posts []*model.Post) ([]*model.Post, int, error)
GetPostsByIds(postIds []string) ([]*model.Post, error)
@@ -305,10 +305,10 @@ type PostStore interface {
PermanentDeleteBatch(endTime int64, limit int64) (int64, error)
GetOldest() (*model.Post, error)
GetMaxPostSize() int
GetParentsForExportAfter(limit int, afterId string) ([]*model.PostForExport, error)
GetRepliesForExport(parentId string) ([]*model.ReplyForExport, error)
GetDirectPostParentsForExportAfter(limit int, afterId string) ([]*model.DirectPostForExport, error)
SearchPostsInTeamForUser(paramsList []*model.SearchParams, userId, teamId string, page, perPage int) (*model.PostSearchResults, error)
GetParentsForExportAfter(limit int, afterID string) ([]*model.PostForExport, error)
GetRepliesForExport(parentID string) ([]*model.ReplyForExport, error)
GetDirectPostParentsForExportAfter(limit int, afterID string) ([]*model.DirectPostForExport, error)
SearchPostsInTeamForUser(paramsList []*model.SearchParams, userId, teamID string, page, perPage int) (*model.PostSearchResults, error)
GetOldestEntityCreationTime() (int64, error)
}
@@ -327,7 +327,7 @@ type UserStore interface {
GetAll() ([]*model.User, error)
ClearCaches()
InvalidateProfilesInChannelCacheByUser(userId string)
InvalidateProfilesInChannelCache(channelId string)
InvalidateProfilesInChannelCache(channelID string)
GetProfilesInChannel(options *model.UserGetOptions) ([]*model.User, error)
GetProfilesInChannelByStatus(options *model.UserGetOptions) ([]*model.User, error)
GetAllProfilesInChannel(ctx context.Context, channelId string, allowFromCache bool) (map[string]*model.User, error)
@@ -344,35 +344,35 @@ type UserStore interface {
GetAllUsingAuthService(authService string) ([]*model.User, error)
GetAllNotInAuthService(authServices []string) ([]*model.User, error)
GetByUsername(username string) (*model.User, error)
GetForLogin(loginId string, allowSignInWithUsername, allowSignInWithEmail bool) (*model.User, error)
GetForLogin(loginID string, allowSignInWithUsername, allowSignInWithEmail bool) (*model.User, error)
VerifyEmail(userId, email string) (string, error)
GetEtagForAllProfiles() string
GetEtagForProfiles(teamId string) string
GetEtagForProfiles(teamID string) string
UpdateFailedPasswordAttempts(userId string, attempts int) error
GetSystemAdminProfiles() (map[string]*model.User, error)
PermanentDelete(userId string) error
AnalyticsActiveCount(time int64, options model.UserCountOptions) (int64, error)
AnalyticsActiveCountForPeriod(startTime int64, endTime int64, options model.UserCountOptions) (int64, error)
GetUnreadCount(userId string) (int64, error)
GetUnreadCountForChannel(userId string, channelId string) (int64, error)
GetAnyUnreadPostCountForChannel(userId string, channelId string) (int64, error)
GetRecentlyActiveUsersForTeam(teamId string, offset, limit int, viewRestrictions *model.ViewUsersRestrictions) ([]*model.User, error)
GetNewUsersForTeam(teamId string, offset, limit int, viewRestrictions *model.ViewUsersRestrictions) ([]*model.User, error)
Search(teamId string, term string, options *model.UserSearchOptions) ([]*model.User, error)
GetUnreadCountForChannel(userId string, channelID string) (int64, error)
GetAnyUnreadPostCountForChannel(userId string, channelID string) (int64, error)
GetRecentlyActiveUsersForTeam(teamID string, offset, limit int, viewRestrictions *model.ViewUsersRestrictions) ([]*model.User, error)
GetNewUsersForTeam(teamID string, offset, limit int, viewRestrictions *model.ViewUsersRestrictions) ([]*model.User, error)
Search(teamID string, term string, options *model.UserSearchOptions) ([]*model.User, error)
SearchNotInTeam(notInTeamId string, term string, options *model.UserSearchOptions) ([]*model.User, error)
SearchInChannel(channelId string, term string, options *model.UserSearchOptions) ([]*model.User, error)
SearchNotInChannel(teamId string, channelId string, term string, options *model.UserSearchOptions) ([]*model.User, error)
SearchInChannel(channelID string, term string, options *model.UserSearchOptions) ([]*model.User, error)
SearchNotInChannel(teamID string, channelID string, term string, options *model.UserSearchOptions) ([]*model.User, error)
SearchWithoutTeam(term string, options *model.UserSearchOptions) ([]*model.User, error)
SearchInGroup(groupID string, term string, options *model.UserSearchOptions) ([]*model.User, error)
AnalyticsGetInactiveUsersCount() (int64, error)
AnalyticsGetExternalUsers(hostDomain string) (bool, error)
AnalyticsGetSystemAdminCount() (int64, error)
AnalyticsGetGuestCount() (int64, error)
GetProfilesNotInTeam(teamId string, groupConstrained bool, offset int, limit int, viewRestrictions *model.ViewUsersRestrictions) ([]*model.User, error)
GetEtagForProfilesNotInTeam(teamId string) string
GetProfilesNotInTeam(teamID string, groupConstrained bool, offset int, limit int, viewRestrictions *model.ViewUsersRestrictions) ([]*model.User, error)
GetEtagForProfilesNotInTeam(teamID string) string
ClearAllCustomRoleAssignments() error
InferSystemInstallDate() (int64, error)
GetAllAfter(limit int, afterId string) ([]*model.User, error)
GetAllAfter(limit int, afterID string) ([]*model.User, error)
GetUsersBatchForIndexing(startTime, endTime int64, limit int) ([]*model.UserForIndexing, error)
Count(options model.UserCountOptions) (int64, error)
GetTeamGroupUsers(teamID string) ([]*model.User, error)
@@ -380,7 +380,7 @@ type UserStore interface {
PromoteGuestToUser(userID string) error
DemoteUserToGuest(userID string) (*model.User, error)
DeactivateGuests() ([]string, error)
AutocompleteUsersInChannel(teamId, channelId, term string, options *model.UserSearchOptions) (*model.UserAutocompleteInChannel, error)
AutocompleteUsersInChannel(teamID, channelID, term string, options *model.UserSearchOptions) (*model.UserAutocompleteInChannel, error)
GetKnownUsers(userID string) ([]string, error)
}
@@ -393,19 +393,19 @@ type BotStore interface {
}
type SessionStore interface {
Get(sessionIdOrToken string) (*model.Session, error)
Get(sessionIDOrToken string) (*model.Session, error)
Save(session *model.Session) (*model.Session, error)
GetSessions(userId string) ([]*model.Session, error)
GetSessionsWithActiveDeviceIds(userId string) ([]*model.Session, error)
GetSessionsExpired(thresholdMillis int64, mobileOnly bool, unnotifiedOnly bool) ([]*model.Session, error)
UpdateExpiredNotify(sessionid string, notified bool) error
Remove(sessionIdOrToken string) error
Remove(sessionIDOrToken string) error
RemoveAllSessions() error
PermanentDeleteSessionsByUser(teamId string) error
UpdateExpiresAt(sessionId string, time int64) error
UpdateLastActivityAt(sessionId string, time int64) error
PermanentDeleteSessionsByUser(teamID string) error
UpdateExpiresAt(sessionID string, time int64) error
UpdateLastActivityAt(sessionID string, time int64) error
UpdateRoles(userId string, roles string) (string, error)
UpdateDeviceId(id string, deviceId string, expiresAt int64) (string, error)
UpdateDeviceId(id string, deviceID string, expiresAt int64) (string, error)
UpdateProps(session *model.Session) error
AnalyticsSessionCount() (int64, error)
Cleanup(expiryTime int64, batchSize int64)
@@ -473,43 +473,43 @@ type WebhookStore interface {
GetIncoming(id string, allowFromCache bool) (*model.IncomingWebhook, error)
GetIncomingList(offset, limit int) ([]*model.IncomingWebhook, error)
GetIncomingListByUser(userId string, offset, limit int) ([]*model.IncomingWebhook, error)
GetIncomingByTeam(teamId string, offset, limit int) ([]*model.IncomingWebhook, error)
GetIncomingByTeamByUser(teamId string, userId string, offset, limit int) ([]*model.IncomingWebhook, error)
GetIncomingByTeam(teamID string, offset, limit int) ([]*model.IncomingWebhook, error)
GetIncomingByTeamByUser(teamID string, userId string, offset, limit int) ([]*model.IncomingWebhook, error)
UpdateIncoming(webhook *model.IncomingWebhook) (*model.IncomingWebhook, error)
GetIncomingByChannel(channelId string) ([]*model.IncomingWebhook, error)
DeleteIncoming(webhookId string, time int64) error
PermanentDeleteIncomingByChannel(channelId string) error
GetIncomingByChannel(channelID string) ([]*model.IncomingWebhook, error)
DeleteIncoming(webhookID string, time int64) error
PermanentDeleteIncomingByChannel(channelID string) error
PermanentDeleteIncomingByUser(userId string) error
SaveOutgoing(webhook *model.OutgoingWebhook) (*model.OutgoingWebhook, error)
GetOutgoing(id string) (*model.OutgoingWebhook, error)
GetOutgoingByChannel(channelId string, offset, limit int) ([]*model.OutgoingWebhook, error)
GetOutgoingByChannelByUser(channelId string, userId string, offset, limit int) ([]*model.OutgoingWebhook, error)
GetOutgoingByChannel(channelID string, offset, limit int) ([]*model.OutgoingWebhook, error)
GetOutgoingByChannelByUser(channelID string, userId string, offset, limit int) ([]*model.OutgoingWebhook, error)
GetOutgoingList(offset, limit int) ([]*model.OutgoingWebhook, error)
GetOutgoingListByUser(userId string, offset, limit int) ([]*model.OutgoingWebhook, error)
GetOutgoingByTeam(teamId string, offset, limit int) ([]*model.OutgoingWebhook, error)
GetOutgoingByTeamByUser(teamId string, userId string, offset, limit int) ([]*model.OutgoingWebhook, error)
DeleteOutgoing(webhookId string, time int64) error
PermanentDeleteOutgoingByChannel(channelId string) error
GetOutgoingByTeam(teamID string, offset, limit int) ([]*model.OutgoingWebhook, error)
GetOutgoingByTeamByUser(teamID string, userId string, offset, limit int) ([]*model.OutgoingWebhook, error)
DeleteOutgoing(webhookID string, time int64) error
PermanentDeleteOutgoingByChannel(channelID string) error
PermanentDeleteOutgoingByUser(userId string) error
UpdateOutgoing(hook *model.OutgoingWebhook) (*model.OutgoingWebhook, error)
AnalyticsIncomingCount(teamId string) (int64, error)
AnalyticsOutgoingCount(teamId string) (int64, error)
AnalyticsIncomingCount(teamID string) (int64, error)
AnalyticsOutgoingCount(teamID string) (int64, error)
InvalidateWebhookCache(webhook string)
ClearCaches()
}
type CommandStore interface {
Save(webhook *model.Command) (*model.Command, error)
GetByTrigger(teamId string, trigger string) (*model.Command, error)
GetByTrigger(teamID string, trigger string) (*model.Command, error)
Get(id string) (*model.Command, error)
GetByTeam(teamId string) ([]*model.Command, error)
Delete(commandId string, time int64) error
PermanentDeleteByTeam(teamId string) error
GetByTeam(teamID string) ([]*model.Command, error)
Delete(commandID string, time int64) error
PermanentDeleteByTeam(teamID string) error
PermanentDeleteByUser(userId string) error
Update(hook *model.Command) (*model.Command, error)
AnalyticsCommandCount(teamId string) (int64, error)
AnalyticsCommandCount(teamID string) (int64, error)
}
type CommandWebhookStore interface {
@@ -569,17 +569,17 @@ type FileInfoStore interface {
Get(id string) (*model.FileInfo, error)
GetByIds(ids []string) ([]*model.FileInfo, error)
GetByPath(path string) (*model.FileInfo, error)
GetForPost(postId string, readFromMaster, includeDeleted, allowFromCache bool) ([]*model.FileInfo, error)
GetForPost(postID string, readFromMaster, includeDeleted, allowFromCache bool) ([]*model.FileInfo, error)
GetForUser(userId string) ([]*model.FileInfo, error)
GetWithOptions(page, perPage int, opt *model.GetFileInfosOptions) ([]*model.FileInfo, error)
InvalidateFileInfosForPostCache(postId string, deleted bool)
AttachToPost(fileId string, postId string, creatorId string) error
DeleteForPost(postId string) (string, error)
PermanentDelete(fileId string) error
InvalidateFileInfosForPostCache(postID string, deleted bool)
AttachToPost(fileID string, postID string, creatorId string) error
DeleteForPost(postID string) (string, error)
PermanentDelete(fileID string) error
PermanentDeleteBatch(endTime int64, limit int64) (int64, error)
PermanentDeleteByUser(userId string) (int64, error)
SetContent(fileId, content string) error
Search(paramsList []*model.SearchParams, userId, teamId string, page, perPage int) (*model.FileInfoList, error)
SetContent(fileID, content string) error
Search(paramsList []*model.SearchParams, userId, teamID string, page, perPage int) (*model.FileInfoList, error)
ClearCaches()
}
@@ -594,7 +594,7 @@ type UploadSessionStore interface {
type ReactionStore interface {
Save(reaction *model.Reaction) (*model.Reaction, error)
Delete(reaction *model.Reaction) (*model.Reaction, error)
GetForPost(postId string, allowFromCache bool) ([]*model.Reaction, error)
GetForPost(postID string, allowFromCache bool) ([]*model.Reaction, error)
DeleteAllWithEmojiName(emojiName string) error
PermanentDeleteBatch(endTime int64, limit int64) (int64, error)
BulkGetForPosts(postIds []string) ([]*model.Reaction, error)
@@ -619,35 +619,35 @@ type JobStore interface {
type UserAccessTokenStore interface {
Save(token *model.UserAccessToken) (*model.UserAccessToken, error)
DeleteAllForUser(userId string) error
Delete(tokenId string) error
Get(tokenId string) (*model.UserAccessToken, error)
Delete(tokenID string) error
Get(tokenID string) (*model.UserAccessToken, error)
GetAll(offset int, limit int) ([]*model.UserAccessToken, error)
GetByToken(tokenString string) (*model.UserAccessToken, error)
GetByUser(userId string, page, perPage int) ([]*model.UserAccessToken, error)
Search(term string) ([]*model.UserAccessToken, error)
UpdateTokenEnable(tokenId string) error
UpdateTokenDisable(tokenId string) error
UpdateTokenEnable(tokenID string) error
UpdateTokenDisable(tokenID string) error
}
type PluginStore interface {
SaveOrUpdate(keyVal *model.PluginKeyValue) (*model.PluginKeyValue, error)
CompareAndSet(keyVal *model.PluginKeyValue, oldValue []byte) (bool, error)
CompareAndDelete(keyVal *model.PluginKeyValue, oldValue []byte) (bool, error)
SetWithOptions(pluginId string, key string, value []byte, options model.PluginKVSetOptions) (bool, error)
Get(pluginId, key string) (*model.PluginKeyValue, error)
Delete(pluginId, key string) error
DeleteAllForPlugin(PluginId string) error
SetWithOptions(pluginID string, key string, value []byte, options model.PluginKVSetOptions) (bool, error)
Get(pluginID, key string) (*model.PluginKeyValue, error)
Delete(pluginID, key string) error
DeleteAllForPlugin(PluginID string) error
DeleteAllExpired() error
List(pluginId string, page, perPage int) ([]string, error)
List(pluginID string, page, perPage int) ([]string, error)
}
type RoleStore interface {
Save(role *model.Role) (*model.Role, error)
Get(roleId string) (*model.Role, error)
Get(roleID string) (*model.Role, error)
GetAll() ([]*model.Role, error)
GetByName(name string) (*model.Role, error)
GetByNames(names []string) ([]*model.Role, error)
Delete(roleId string) (*model.Role, error)
Delete(roleID string) (*model.Role, error)
PermanentDeleteAll() error
// HigherScopedPermissions retrieves the higher-scoped permissions of a list of role names. The higher-scope
@@ -664,10 +664,10 @@ type RoleStore interface {
type SchemeStore interface {
Save(scheme *model.Scheme) (*model.Scheme, error)
Get(schemeId string) (*model.Scheme, error)
Get(schemeID string) (*model.Scheme, error)
GetByName(schemeName string) (*model.Scheme, error)
GetAllPage(scope string, offset int, limit int) ([]*model.Scheme, error)
Delete(schemeId string) (*model.Scheme, error)
Delete(schemeID string) (*model.Scheme, error)
PermanentDeleteAll() error
CountByScope(scope string) (int64, error)
CountWithoutPermission(scope, permissionID string, roleScope model.RoleScope, roleType model.RoleType) (int64, error)
@@ -738,12 +738,12 @@ type GroupStore interface {
// ChannelMembersToRemove returns all channel members that should be removed based on group constraints.
ChannelMembersToRemove(channelID *string) ([]*model.ChannelMember, error)
GetGroupsByChannel(channelId string, opts model.GroupSearchOpts) ([]*model.GroupWithSchemeAdmin, error)
CountGroupsByChannel(channelId string, opts model.GroupSearchOpts) (int64, error)
GetGroupsByChannel(channelID string, opts model.GroupSearchOpts) ([]*model.GroupWithSchemeAdmin, error)
CountGroupsByChannel(channelID string, opts model.GroupSearchOpts) (int64, error)
GetGroupsByTeam(teamId string, opts model.GroupSearchOpts) ([]*model.GroupWithSchemeAdmin, error)
GetGroupsAssociatedToChannelsByTeam(teamId string, opts model.GroupSearchOpts) (map[string][]*model.GroupWithSchemeAdmin, error)
CountGroupsByTeam(teamId string, opts model.GroupSearchOpts) (int64, error)
GetGroupsByTeam(teamID string, opts model.GroupSearchOpts) ([]*model.GroupWithSchemeAdmin, error)
GetGroupsAssociatedToChannelsByTeam(teamID string, opts model.GroupSearchOpts) (map[string][]*model.GroupWithSchemeAdmin, error)
CountGroupsByTeam(teamID string, opts model.GroupSearchOpts) (int64, error)
GetGroups(page, perPage int, opts model.GroupSearchOpts) ([]*model.Group, error)

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

@@ -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)
}

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