Fix initialism errors (PR-2) (#17032)
* Fix initialism errors * Fix check-mocks test * Revert mlog and filestore packages * Update plugin_hooks_test.go * Update opentracinglayer.go * Regenerate mocks and check store layers * Revert plugin's context changes * Update context.go * Update plugin_requests.go * Update plugin_hooks_test.go * Regenerate mocks * Regenerate mocks and store layers Co-authored-by: Mattermod <mattermod@users.noreply.github.com>
Этот коммит содержится в:
коммит произвёл
GitHub
родитель
db01f2a91b
Коммит
343c51830f
@@ -6,17 +6,17 @@ package plugin_api_tests
|
||||
import "reflect"
|
||||
|
||||
type BasicConfig struct {
|
||||
BasicChannelId string
|
||||
BasicChannelID string
|
||||
BasicChannelName string
|
||||
BasicPostId string
|
||||
BasicPostID string
|
||||
BasicPostMessage string
|
||||
BasicTeamDisplayName string
|
||||
BasicTeamId string
|
||||
BasicTeamID string
|
||||
BasicTeamName string
|
||||
BasicUser2Email string
|
||||
BasicUser2Id string
|
||||
BasicUserEmail string
|
||||
BasicUserId string
|
||||
BasicUserID string
|
||||
}
|
||||
|
||||
func IsEmpty(object interface{}) bool {
|
||||
|
||||
@@ -23,14 +23,14 @@ func (p *MyPlugin) OnConfigurationChange() error {
|
||||
|
||||
func (p *MyPlugin) MessageWillBePosted(_ *plugin.Context, _ *model.Post) (*model.Post, string) {
|
||||
|
||||
channels, err := p.API.GetChannelsForTeamForUser(p.configuration.BasicTeamId, p.configuration.BasicUserId, false)
|
||||
channels, err := p.API.GetChannelsForTeamForUser(p.configuration.BasicTeamID, p.configuration.BasicUserID, false)
|
||||
if err != nil {
|
||||
return nil, err.Error()
|
||||
}
|
||||
if len(channels) != 3 {
|
||||
return nil, "Returned invalid number of channels"
|
||||
}
|
||||
channels, err = p.API.GetChannelsForTeamForUser("invalidid", p.configuration.BasicUserId, false)
|
||||
channels, err = p.API.GetChannelsForTeamForUser("invalidid", p.configuration.BasicUserID, false)
|
||||
if err == nil {
|
||||
return nil, "Expected to get an error while retrieving channels for invalid id"
|
||||
}
|
||||
|
||||
@@ -22,7 +22,7 @@ func (p *MyPlugin) OnConfigurationChange() error {
|
||||
}
|
||||
|
||||
func (p *MyPlugin) MessageWillBePosted(_ *plugin.Context, _ *model.Post) (*model.Post, string) {
|
||||
dm1, err := p.API.GetDirectChannel(p.configuration.BasicUserId, p.configuration.BasicUser2Id)
|
||||
dm1, err := p.API.GetDirectChannel(p.configuration.BasicUserID, p.configuration.BasicUser2Id)
|
||||
if err != nil {
|
||||
return nil, err.Error()
|
||||
}
|
||||
@@ -30,7 +30,7 @@ func (p *MyPlugin) MessageWillBePosted(_ *plugin.Context, _ *model.Post) (*model
|
||||
return nil, "dm1 is empty"
|
||||
}
|
||||
|
||||
dm2, err := p.API.GetDirectChannel(p.configuration.BasicUserId, p.configuration.BasicUserId)
|
||||
dm2, err := p.API.GetDirectChannel(p.configuration.BasicUserID, p.configuration.BasicUserID)
|
||||
if err != nil {
|
||||
return nil, err.Error()
|
||||
}
|
||||
@@ -38,7 +38,7 @@ func (p *MyPlugin) MessageWillBePosted(_ *plugin.Context, _ *model.Post) (*model
|
||||
return nil, "dm2 is empty"
|
||||
}
|
||||
|
||||
dm3, err := p.API.GetDirectChannel(p.configuration.BasicUserId, model.NewId())
|
||||
dm3, err := p.API.GetDirectChannel(p.configuration.BasicUserID, model.NewId())
|
||||
if err == nil {
|
||||
return nil, "Expected to get error while fetching incorrect channel"
|
||||
}
|
||||
|
||||
@@ -24,7 +24,7 @@ func (p *MyPlugin) OnConfigurationChange() error {
|
||||
func (p *MyPlugin) MessageWillBePosted(_ *plugin.Context, _ *model.Post) (*model.Post, string) {
|
||||
|
||||
// check existing user first
|
||||
data, err := p.API.GetProfileImage(p.configuration.BasicUserId)
|
||||
data, err := p.API.GetProfileImage(p.configuration.BasicUserID)
|
||||
if err != nil {
|
||||
return nil, err.Error()
|
||||
}
|
||||
|
||||
@@ -22,13 +22,13 @@ func (p *MyPlugin) OnConfigurationChange() error {
|
||||
}
|
||||
|
||||
func (p *MyPlugin) MessageWillBePosted(_ *plugin.Context, _ *model.Post) (*model.Post, string) {
|
||||
channelMembers, err := p.API.GetChannelMembersForUser(p.configuration.BasicTeamId, p.configuration.BasicUserId, 0, 10)
|
||||
channelMembers, err := p.API.GetChannelMembersForUser(p.configuration.BasicTeamID, p.configuration.BasicUserID, 0, 10)
|
||||
|
||||
if err != nil {
|
||||
return nil, err.Error() + "failed to get channel members"
|
||||
} else if len(channelMembers) != 3 {
|
||||
return nil, "Invalid number of channel members"
|
||||
} else if channelMembers[0].UserId != p.configuration.BasicUserId {
|
||||
} else if channelMembers[0].UserId != p.configuration.BasicUserID {
|
||||
return nil, "Invalid user id returned"
|
||||
}
|
||||
|
||||
|
||||
@@ -22,12 +22,12 @@ func (p *MyPlugin) OnConfigurationChange() error {
|
||||
}
|
||||
|
||||
func (p *MyPlugin) MessageWillBePosted(_ *plugin.Context, _ *model.Post) (*model.Post, string) {
|
||||
teamMembers, err := p.API.GetTeamMembersForUser(p.configuration.BasicUserId, 0, 10)
|
||||
teamMembers, err := p.API.GetTeamMembersForUser(p.configuration.BasicUserID, 0, 10)
|
||||
if err != nil {
|
||||
return nil, err.Error() + "failed to get team members"
|
||||
} else if len(teamMembers) != 1 {
|
||||
return nil, "Invalid number of team members"
|
||||
} else if teamMembers[0].UserId != p.configuration.BasicUserId || teamMembers[0].TeamId != p.configuration.BasicTeamId {
|
||||
} else if teamMembers[0].UserId != p.configuration.BasicUserID || teamMembers[0].TeamId != p.configuration.BasicTeamID {
|
||||
return nil, "Invalid user or team id returned"
|
||||
}
|
||||
return nil, "OK"
|
||||
|
||||
@@ -23,7 +23,7 @@ func (p *MyPlugin) OnConfigurationChange() error {
|
||||
|
||||
func (p *MyPlugin) MessageWillBePosted(_ *plugin.Context, _ *model.Post) (*model.Post, string) {
|
||||
|
||||
channels, err := p.API.SearchChannels(p.configuration.BasicTeamId, p.configuration.BasicChannelName)
|
||||
channels, err := p.API.SearchChannels(p.configuration.BasicTeamID, p.configuration.BasicChannelName)
|
||||
if err != nil {
|
||||
return nil, err.Error()
|
||||
}
|
||||
|
||||
@@ -32,25 +32,25 @@ func (p *MyPlugin) MessageWillBePosted(_ *plugin.Context, _ *model.Post) (*model
|
||||
}{
|
||||
{
|
||||
"nil params",
|
||||
p.configuration.BasicTeamId,
|
||||
p.configuration.BasicTeamID,
|
||||
nil,
|
||||
0,
|
||||
},
|
||||
{
|
||||
"empty params",
|
||||
p.configuration.BasicTeamId,
|
||||
p.configuration.BasicTeamID,
|
||||
[]*model.SearchParams{},
|
||||
0,
|
||||
},
|
||||
{
|
||||
"doesn't match any posts",
|
||||
p.configuration.BasicTeamId,
|
||||
p.configuration.BasicTeamID,
|
||||
model.ParseSearchParams("bad message", 0),
|
||||
0,
|
||||
},
|
||||
{
|
||||
"matched posts",
|
||||
p.configuration.BasicTeamId,
|
||||
p.configuration.BasicTeamID,
|
||||
model.ParseSearchParams(p.configuration.BasicPostMessage, 0),
|
||||
1,
|
||||
},
|
||||
|
||||
@@ -41,12 +41,12 @@ func (p *MyPlugin) MessageWillBePosted(_ *plugin.Context, _ *model.Post) (*model
|
||||
dataBytes := buf.Bytes()
|
||||
|
||||
// Set the user profile image
|
||||
if err := p.API.SetProfileImage(p.configuration.BasicUserId, dataBytes); err != nil {
|
||||
if err := p.API.SetProfileImage(p.configuration.BasicUserID, dataBytes); err != nil {
|
||||
return nil, err.Error()
|
||||
}
|
||||
|
||||
// Get the user profile image to check
|
||||
imageProfile, err := p.API.GetProfileImage(p.configuration.BasicUserId)
|
||||
imageProfile, err := p.API.GetProfileImage(p.configuration.BasicUserID)
|
||||
if err != nil {
|
||||
return nil, err.Error()
|
||||
}
|
||||
|
||||
@@ -22,7 +22,7 @@ func (p *MyPlugin) OnConfigurationChange() error {
|
||||
}
|
||||
|
||||
func (p *MyPlugin) MessageWillBePosted(_ *plugin.Context, _ *model.Post) (*model.Post, string) {
|
||||
uid := p.configuration.BasicUserId
|
||||
uid := p.configuration.BasicUserID
|
||||
if err := p.API.UpdateUserActive(uid, true); err != nil {
|
||||
return nil, err.Error()
|
||||
}
|
||||
|
||||
@@ -24,7 +24,7 @@ func (p *MyPlugin) OnConfigurationChange() error {
|
||||
}
|
||||
|
||||
func (p *MyPlugin) MessageWillBePosted(_ *plugin.Context, _ *model.Post) (*model.Post, string) {
|
||||
uid := p.configuration.BasicUserId
|
||||
uid := p.configuration.BasicUserID
|
||||
|
||||
statuses := []string{model.STATUS_ONLINE, model.STATUS_AWAY, model.STATUS_DND, model.STATUS_OFFLINE}
|
||||
|
||||
|
||||
@@ -14,7 +14,7 @@ type LdapInterface interface {
|
||||
CheckPassword(id string, password string) *model.AppError
|
||||
CheckPasswordAuthData(authData string, password string) *model.AppError
|
||||
CheckProviderAttributes(LS *model.LdapSettings, ouser *model.User, patch *model.UserPatch) string
|
||||
SwitchToLdap(userId, ldapId, ldapPassword string) *model.AppError
|
||||
SwitchToLdap(userID, ldapID, ldapPassword string) *model.AppError
|
||||
StartSynchronizeJob(waitForJobToFinish bool) (*model.Job, *model.AppError)
|
||||
RunTest() *model.AppError
|
||||
GetAllLdapUsers() ([]*model.User, *model.AppError)
|
||||
|
||||
@@ -10,6 +10,6 @@ import (
|
||||
type MfaInterface interface {
|
||||
GenerateSecret(user *model.User) (string, []byte, *model.AppError)
|
||||
Activate(user *model.User, token string) *model.AppError
|
||||
Deactivate(userId string) *model.AppError
|
||||
Deactivate(userID string) *model.AppError
|
||||
ValidateToken(secret, token string) (bool, *model.AppError)
|
||||
}
|
||||
|
||||
@@ -323,13 +323,13 @@ func (_m *LdapInterface) StartSynchronizeJob(waitForJobToFinish bool) (*model.Jo
|
||||
return r0, r1
|
||||
}
|
||||
|
||||
// SwitchToLdap provides a mock function with given fields: userId, ldapId, ldapPassword
|
||||
func (_m *LdapInterface) SwitchToLdap(userId string, ldapId string, ldapPassword string) *model.AppError {
|
||||
ret := _m.Called(userId, ldapId, ldapPassword)
|
||||
// SwitchToLdap provides a mock function with given fields: userID, ldapID, ldapPassword
|
||||
func (_m *LdapInterface) SwitchToLdap(userID string, ldapID string, ldapPassword string) *model.AppError {
|
||||
ret := _m.Called(userID, ldapID, ldapPassword)
|
||||
|
||||
var r0 *model.AppError
|
||||
if rf, ok := ret.Get(0).(func(string, string, string) *model.AppError); ok {
|
||||
r0 = rf(userId, ldapId, ldapPassword)
|
||||
r0 = rf(userID, ldapID, ldapPassword)
|
||||
} else {
|
||||
if ret.Get(0) != nil {
|
||||
r0 = ret.Get(0).(*model.AppError)
|
||||
|
||||
@@ -30,13 +30,13 @@ func (_m *MfaInterface) Activate(user *model.User, token string) *model.AppError
|
||||
return r0
|
||||
}
|
||||
|
||||
// Deactivate provides a mock function with given fields: userId
|
||||
func (_m *MfaInterface) Deactivate(userId string) *model.AppError {
|
||||
ret := _m.Called(userId)
|
||||
// Deactivate provides a mock function with given fields: userID
|
||||
func (_m *MfaInterface) Deactivate(userID string) *model.AppError {
|
||||
ret := _m.Called(userID)
|
||||
|
||||
var r0 *model.AppError
|
||||
if rf, ok := ret.Get(0).(func(string) *model.AppError); ok {
|
||||
r0 = rf(userId)
|
||||
r0 = rf(userID)
|
||||
} else {
|
||||
if ret.Get(0) != nil {
|
||||
r0 = ret.Get(0).(*model.AppError)
|
||||
|
||||
@@ -30,13 +30,13 @@ func (_m *NotificationInterface) CheckLicense() *model.AppError {
|
||||
return r0
|
||||
}
|
||||
|
||||
// GetNotificationMessage provides a mock function with given fields: ack, userId
|
||||
func (_m *NotificationInterface) GetNotificationMessage(ack *model.PushNotificationAck, userId string) (*model.PushNotification, *model.AppError) {
|
||||
ret := _m.Called(ack, userId)
|
||||
// GetNotificationMessage provides a mock function with given fields: ack, userID
|
||||
func (_m *NotificationInterface) GetNotificationMessage(ack *model.PushNotificationAck, userID string) (*model.PushNotification, *model.AppError) {
|
||||
ret := _m.Called(ack, userID)
|
||||
|
||||
var r0 *model.PushNotification
|
||||
if rf, ok := ret.Get(0).(func(*model.PushNotificationAck, string) *model.PushNotification); ok {
|
||||
r0 = rf(ack, userId)
|
||||
r0 = rf(ack, userID)
|
||||
} else {
|
||||
if ret.Get(0) != nil {
|
||||
r0 = ret.Get(0).(*model.PushNotification)
|
||||
@@ -45,7 +45,7 @@ func (_m *NotificationInterface) GetNotificationMessage(ack *model.PushNotificat
|
||||
|
||||
var r1 *model.AppError
|
||||
if rf, ok := ret.Get(1).(func(*model.PushNotificationAck, string) *model.AppError); ok {
|
||||
r1 = rf(ack, userId)
|
||||
r1 = rf(ack, userID)
|
||||
} else {
|
||||
if ret.Get(1) != nil {
|
||||
r1 = ret.Get(1).(*model.AppError)
|
||||
|
||||
@@ -8,6 +8,6 @@ import (
|
||||
)
|
||||
|
||||
type NotificationInterface interface {
|
||||
GetNotificationMessage(ack *model.PushNotificationAck, userId string) (*model.PushNotification, *model.AppError)
|
||||
GetNotificationMessage(ack *model.PushNotificationAck, userID string) (*model.PushNotification, *model.AppError)
|
||||
CheckLicense() *model.AppError
|
||||
}
|
||||
|
||||
106
plugin/api.go
106
plugin/api.go
@@ -36,7 +36,7 @@ type API interface {
|
||||
//
|
||||
// @tag Command
|
||||
// Minimum server version: 5.2
|
||||
UnregisterCommand(teamId, trigger string) error
|
||||
UnregisterCommand(teamID, trigger string) error
|
||||
|
||||
// ExecuteSlashCommand executes a slash command with the given parameters.
|
||||
//
|
||||
@@ -47,7 +47,7 @@ type API interface {
|
||||
// GetSession returns the session object for the Session ID
|
||||
//
|
||||
// Minimum server version: 5.2
|
||||
GetSession(sessionId string) (*model.Session, *model.AppError)
|
||||
GetSession(sessionID string) (*model.Session, *model.AppError)
|
||||
|
||||
// GetConfig fetches the currently persisted config
|
||||
//
|
||||
@@ -126,7 +126,7 @@ type API interface {
|
||||
//
|
||||
// @tag User
|
||||
// Minimum server version: 5.2
|
||||
DeleteUser(userId string) *model.AppError
|
||||
DeleteUser(userID string) *model.AppError
|
||||
|
||||
// GetUsers a list of users based on search options.
|
||||
//
|
||||
@@ -138,7 +138,7 @@ type API interface {
|
||||
//
|
||||
// @tag User
|
||||
// Minimum server version: 5.2
|
||||
GetUser(userId string) (*model.User, *model.AppError)
|
||||
GetUser(userID string) (*model.User, *model.AppError)
|
||||
|
||||
// GetUserByEmail gets a user by their email address.
|
||||
//
|
||||
@@ -163,46 +163,46 @@ type API interface {
|
||||
// @tag User
|
||||
// @tag Team
|
||||
// Minimum server version: 5.6
|
||||
GetUsersInTeam(teamId string, page int, perPage int) ([]*model.User, *model.AppError)
|
||||
GetUsersInTeam(teamID string, page int, perPage int) ([]*model.User, *model.AppError)
|
||||
|
||||
// GetPreferencesForUser gets a user's preferences.
|
||||
//
|
||||
// @tag User
|
||||
// @tag Preference
|
||||
// Minimum server version: 5.26
|
||||
GetPreferencesForUser(userId string) ([]model.Preference, *model.AppError)
|
||||
GetPreferencesForUser(userID string) ([]model.Preference, *model.AppError)
|
||||
|
||||
// UpdatePreferencesForUser updates a user's preferences.
|
||||
//
|
||||
// @tag User
|
||||
// @tag Preference
|
||||
// Minimum server version: 5.26
|
||||
UpdatePreferencesForUser(userId string, preferences []model.Preference) *model.AppError
|
||||
UpdatePreferencesForUser(userID string, preferences []model.Preference) *model.AppError
|
||||
|
||||
// DeletePreferencesForUser deletes a user's preferences.
|
||||
//
|
||||
// @tag User
|
||||
// @tag Preference
|
||||
// Minimum server version: 5.26
|
||||
DeletePreferencesForUser(userId string, preferences []model.Preference) *model.AppError
|
||||
DeletePreferencesForUser(userID string, preferences []model.Preference) *model.AppError
|
||||
|
||||
// GetTeamIcon gets the team icon.
|
||||
//
|
||||
// @tag Team
|
||||
// Minimum server version: 5.6
|
||||
GetTeamIcon(teamId string) ([]byte, *model.AppError)
|
||||
GetTeamIcon(teamID string) ([]byte, *model.AppError)
|
||||
|
||||
// SetTeamIcon sets the team icon.
|
||||
//
|
||||
// @tag Team
|
||||
// Minimum server version: 5.6
|
||||
SetTeamIcon(teamId string, data []byte) *model.AppError
|
||||
SetTeamIcon(teamID string, data []byte) *model.AppError
|
||||
|
||||
// RemoveTeamIcon removes the team icon.
|
||||
//
|
||||
// @tag Team
|
||||
// Minimum server version: 5.6
|
||||
RemoveTeamIcon(teamId string) *model.AppError
|
||||
RemoveTeamIcon(teamID string) *model.AppError
|
||||
|
||||
// UpdateUser updates a user.
|
||||
//
|
||||
@@ -214,7 +214,7 @@ type API interface {
|
||||
//
|
||||
// @tag User
|
||||
// Minimum server version: 5.2
|
||||
GetUserStatus(userId string) (*model.Status, *model.AppError)
|
||||
GetUserStatus(userID string) (*model.Status, *model.AppError)
|
||||
|
||||
// GetUserStatusesByIds will return a list of user statuses based on the provided slice of user IDs.
|
||||
//
|
||||
@@ -227,13 +227,13 @@ type API interface {
|
||||
//
|
||||
// @tag User
|
||||
// Minimum server version: 5.2
|
||||
UpdateUserStatus(userId, status string) (*model.Status, *model.AppError)
|
||||
UpdateUserStatus(userID, status string) (*model.Status, *model.AppError)
|
||||
|
||||
// UpdateUserActive deactivates or reactivates an user.
|
||||
//
|
||||
// @tag User
|
||||
// Minimum server version: 5.8
|
||||
UpdateUserActive(userId string, active bool) *model.AppError
|
||||
UpdateUserActive(userID string, active bool) *model.AppError
|
||||
|
||||
// GetUsersInChannel returns a page of users in a channel. Page counting starts at 0.
|
||||
// The sortBy parameter can be: "username" or "status".
|
||||
@@ -241,7 +241,7 @@ type API interface {
|
||||
// @tag User
|
||||
// @tag Channel
|
||||
// Minimum server version: 5.6
|
||||
GetUsersInChannel(channelId, sortBy string, page, perPage int) ([]*model.User, *model.AppError)
|
||||
GetUsersInChannel(channelID, sortBy string, page, perPage int) ([]*model.User, *model.AppError)
|
||||
|
||||
// GetLDAPUserAttributes will return LDAP attributes for a user.
|
||||
// The attributes parameter should be a list of attributes to pull.
|
||||
@@ -250,7 +250,7 @@ type API interface {
|
||||
//
|
||||
// @tag User
|
||||
// Minimum server version: 5.3
|
||||
GetLDAPUserAttributes(userId string, attributes []string) (map[string]string, *model.AppError)
|
||||
GetLDAPUserAttributes(userID string, attributes []string) (map[string]string, *model.AppError)
|
||||
|
||||
// CreateTeam creates a team.
|
||||
//
|
||||
@@ -262,7 +262,7 @@ type API interface {
|
||||
//
|
||||
// @tag Team
|
||||
// Minimum server version: 5.2
|
||||
DeleteTeam(teamId string) *model.AppError
|
||||
DeleteTeam(teamID string) *model.AppError
|
||||
|
||||
// GetTeam gets all teams.
|
||||
//
|
||||
@@ -274,7 +274,7 @@ type API interface {
|
||||
//
|
||||
// @tag Team
|
||||
// Minimum server version: 5.2
|
||||
GetTeam(teamId string) (*model.Team, *model.AppError)
|
||||
GetTeam(teamID string) (*model.Team, *model.AppError)
|
||||
|
||||
// GetTeamByName gets a team by its name.
|
||||
//
|
||||
@@ -287,7 +287,7 @@ type API interface {
|
||||
// @tag Team
|
||||
// @tag User
|
||||
// Minimum server version: 5.6
|
||||
GetTeamsUnreadForUser(userId string) ([]*model.TeamUnread, *model.AppError)
|
||||
GetTeamsUnreadForUser(userID string) ([]*model.TeamUnread, *model.AppError)
|
||||
|
||||
// UpdateTeam updates a team.
|
||||
//
|
||||
@@ -306,63 +306,63 @@ type API interface {
|
||||
// @tag Team
|
||||
// @tag User
|
||||
// Minimum server version: 5.6
|
||||
GetTeamsForUser(userId string) ([]*model.Team, *model.AppError)
|
||||
GetTeamsForUser(userID string) ([]*model.Team, *model.AppError)
|
||||
|
||||
// CreateTeamMember creates a team membership.
|
||||
//
|
||||
// @tag Team
|
||||
// @tag User
|
||||
// Minimum server version: 5.2
|
||||
CreateTeamMember(teamId, userId string) (*model.TeamMember, *model.AppError)
|
||||
CreateTeamMember(teamID, userID string) (*model.TeamMember, *model.AppError)
|
||||
|
||||
// CreateTeamMembers creates a team membership for all provided user ids.
|
||||
//
|
||||
// @tag Team
|
||||
// @tag User
|
||||
// Minimum server version: 5.2
|
||||
CreateTeamMembers(teamId string, userIds []string, requestorId string) ([]*model.TeamMember, *model.AppError)
|
||||
CreateTeamMembers(teamID string, userIds []string, requestorId string) ([]*model.TeamMember, *model.AppError)
|
||||
|
||||
// CreateTeamMembersGracefully creates a team membership for all provided user ids and reports the users that were not added.
|
||||
//
|
||||
// @tag Team
|
||||
// @tag User
|
||||
// Minimum server version: 5.20
|
||||
CreateTeamMembersGracefully(teamId string, userIds []string, requestorId string) ([]*model.TeamMemberWithError, *model.AppError)
|
||||
CreateTeamMembersGracefully(teamID string, userIds []string, requestorId string) ([]*model.TeamMemberWithError, *model.AppError)
|
||||
|
||||
// DeleteTeamMember deletes a team membership.
|
||||
//
|
||||
// @tag Team
|
||||
// @tag User
|
||||
// Minimum server version: 5.2
|
||||
DeleteTeamMember(teamId, userId, requestorId string) *model.AppError
|
||||
DeleteTeamMember(teamID, userID, requestorId string) *model.AppError
|
||||
|
||||
// GetTeamMembers returns the memberships of a specific team.
|
||||
//
|
||||
// @tag Team
|
||||
// @tag User
|
||||
// Minimum server version: 5.2
|
||||
GetTeamMembers(teamId string, page, perPage int) ([]*model.TeamMember, *model.AppError)
|
||||
GetTeamMembers(teamID string, page, perPage int) ([]*model.TeamMember, *model.AppError)
|
||||
|
||||
// GetTeamMember returns a specific membership.
|
||||
//
|
||||
// @tag Team
|
||||
// @tag User
|
||||
// Minimum server version: 5.2
|
||||
GetTeamMember(teamId, userId string) (*model.TeamMember, *model.AppError)
|
||||
GetTeamMember(teamID, userID string) (*model.TeamMember, *model.AppError)
|
||||
|
||||
// GetTeamMembersForUser returns all team memberships for a user.
|
||||
//
|
||||
// @tag Team
|
||||
// @tag User
|
||||
// Minimum server version: 5.10
|
||||
GetTeamMembersForUser(userId string, page int, perPage int) ([]*model.TeamMember, *model.AppError)
|
||||
GetTeamMembersForUser(userID string, page int, perPage int) ([]*model.TeamMember, *model.AppError)
|
||||
|
||||
// UpdateTeamMemberRoles updates the role for a team membership.
|
||||
//
|
||||
// @tag Team
|
||||
// @tag User
|
||||
// Minimum server version: 5.2
|
||||
UpdateTeamMemberRoles(teamId, userId, newRoles string) (*model.TeamMember, *model.AppError)
|
||||
UpdateTeamMemberRoles(teamID, userID, newRoles string) (*model.TeamMember, *model.AppError)
|
||||
|
||||
// CreateChannel creates a channel.
|
||||
//
|
||||
@@ -381,7 +381,7 @@ type API interface {
|
||||
// @tag Channel
|
||||
// @tag Team
|
||||
// Minimum server version: 5.2
|
||||
GetPublicChannelsForTeam(teamId string, page, perPage int) ([]*model.Channel, *model.AppError)
|
||||
GetPublicChannelsForTeam(teamID string, page, perPage int) ([]*model.Channel, *model.AppError)
|
||||
|
||||
// GetChannel gets a channel.
|
||||
//
|
||||
@@ -393,7 +393,7 @@ type API interface {
|
||||
//
|
||||
// @tag Channel
|
||||
// Minimum server version: 5.2
|
||||
GetChannelByName(teamId, name string, includeDeleted bool) (*model.Channel, *model.AppError)
|
||||
GetChannelByName(teamID, name string, includeDeleted bool) (*model.Channel, *model.AppError)
|
||||
|
||||
// GetChannelByNameForTeamName gets a channel by its name, given a team name.
|
||||
//
|
||||
@@ -408,7 +408,7 @@ type API interface {
|
||||
// @tag Team
|
||||
// @tag User
|
||||
// Minimum server version: 5.6
|
||||
GetChannelsForTeamForUser(teamId, userId string, includeDeleted bool) ([]*model.Channel, *model.AppError)
|
||||
GetChannelsForTeamForUser(teamID, userID string, includeDeleted bool) ([]*model.Channel, *model.AppError)
|
||||
|
||||
// GetChannelStats gets statistics for a channel.
|
||||
//
|
||||
@@ -442,7 +442,7 @@ type API interface {
|
||||
//
|
||||
// @tag Channel
|
||||
// Minimum server version: 5.6
|
||||
SearchChannels(teamId string, term string) ([]*model.Channel, *model.AppError)
|
||||
SearchChannels(teamID string, term string) ([]*model.Channel, *model.AppError)
|
||||
|
||||
// SearchUsers returns a list of users based on some search criteria.
|
||||
//
|
||||
@@ -455,13 +455,13 @@ type API interface {
|
||||
// @tag Post
|
||||
// @tag Team
|
||||
// Minimum server version: 5.10
|
||||
SearchPostsInTeam(teamId string, paramsList []*model.SearchParams) ([]*model.Post, *model.AppError)
|
||||
SearchPostsInTeam(teamID string, paramsList []*model.SearchParams) ([]*model.Post, *model.AppError)
|
||||
|
||||
// SearchPostsInTeamForUser returns a list of posts by team and user that match the given
|
||||
// search parameters.
|
||||
// @tag Post
|
||||
// Minimum server version: 5.26
|
||||
SearchPostsInTeamForUser(teamId string, userId string, searchParams model.SearchParameter) (*model.PostSearchResults, *model.AppError)
|
||||
SearchPostsInTeamForUser(teamID string, userID string, searchParams model.SearchParameter) (*model.PostSearchResults, *model.AppError)
|
||||
|
||||
// AddChannelMember joins a user to a channel (as if they joined themselves)
|
||||
// This means the user will not receive notifications for joining the channel.
|
||||
@@ -469,7 +469,7 @@ type API interface {
|
||||
// @tag Channel
|
||||
// @tag User
|
||||
// Minimum server version: 5.2
|
||||
AddChannelMember(channelId, userId string) (*model.ChannelMember, *model.AppError)
|
||||
AddChannelMember(channelId, userID string) (*model.ChannelMember, *model.AppError)
|
||||
|
||||
// AddUserToChannel adds a user to a channel as if the specified user had invited them.
|
||||
// This means the user will receive the regular notifications for being added to the channel.
|
||||
@@ -477,14 +477,14 @@ type API interface {
|
||||
// @tag User
|
||||
// @tag Channel
|
||||
// Minimum server version: 5.18
|
||||
AddUserToChannel(channelId, userId, asUserId string) (*model.ChannelMember, *model.AppError)
|
||||
AddUserToChannel(channelId, userID, asUserId string) (*model.ChannelMember, *model.AppError)
|
||||
|
||||
// GetChannelMember gets a channel membership for a user.
|
||||
//
|
||||
// @tag Channel
|
||||
// @tag User
|
||||
// Minimum server version: 5.2
|
||||
GetChannelMember(channelId, userId string) (*model.ChannelMember, *model.AppError)
|
||||
GetChannelMember(channelId, userID string) (*model.ChannelMember, *model.AppError)
|
||||
|
||||
// GetChannelMembers gets a channel membership for all users.
|
||||
//
|
||||
@@ -505,21 +505,21 @@ type API interface {
|
||||
// @tag Channel
|
||||
// @tag User
|
||||
// Minimum server version: 5.10
|
||||
GetChannelMembersForUser(teamId, userId string, page, perPage int) ([]*model.ChannelMember, *model.AppError)
|
||||
GetChannelMembersForUser(teamID, userID string, page, perPage int) ([]*model.ChannelMember, *model.AppError)
|
||||
|
||||
// UpdateChannelMemberRoles updates a user's roles for a channel.
|
||||
//
|
||||
// @tag Channel
|
||||
// @tag User
|
||||
// Minimum server version: 5.2
|
||||
UpdateChannelMemberRoles(channelId, userId, newRoles string) (*model.ChannelMember, *model.AppError)
|
||||
UpdateChannelMemberRoles(channelId, userID, newRoles string) (*model.ChannelMember, *model.AppError)
|
||||
|
||||
// UpdateChannelMemberNotifications updates a user's notification properties for a channel.
|
||||
//
|
||||
// @tag Channel
|
||||
// @tag User
|
||||
// Minimum server version: 5.2
|
||||
UpdateChannelMemberNotifications(channelId, userId string, notifications map[string]string) (*model.ChannelMember, *model.AppError)
|
||||
UpdateChannelMemberNotifications(channelId, userID string, notifications map[string]string) (*model.ChannelMember, *model.AppError)
|
||||
|
||||
// GetGroup gets a group by ID.
|
||||
//
|
||||
@@ -538,14 +538,14 @@ type API interface {
|
||||
// @tag Group
|
||||
// @tag User
|
||||
// Minimum server version: 5.18
|
||||
GetGroupsForUser(userId string) ([]*model.Group, *model.AppError)
|
||||
GetGroupsForUser(userID string) ([]*model.Group, *model.AppError)
|
||||
|
||||
// DeleteChannelMember deletes a channel membership for a user.
|
||||
//
|
||||
// @tag Channel
|
||||
// @tag User
|
||||
// Minimum server version: 5.2
|
||||
DeleteChannelMember(channelId, userId string) *model.AppError
|
||||
DeleteChannelMember(channelId, userID string) *model.AppError
|
||||
|
||||
// CreatePost creates a post.
|
||||
//
|
||||
@@ -575,21 +575,21 @@ type API interface {
|
||||
//
|
||||
// @tag Post
|
||||
// Minimum server version: 5.2
|
||||
SendEphemeralPost(userId string, post *model.Post) *model.Post
|
||||
SendEphemeralPost(userID string, post *model.Post) *model.Post
|
||||
|
||||
// UpdateEphemeralPost updates an ephemeral message previously sent to the user.
|
||||
// EXPERIMENTAL: This API is experimental and can be changed without advance notice.
|
||||
//
|
||||
// @tag Post
|
||||
// Minimum server version: 5.2
|
||||
UpdateEphemeralPost(userId string, post *model.Post) *model.Post
|
||||
UpdateEphemeralPost(userID string, post *model.Post) *model.Post
|
||||
|
||||
// DeleteEphemeralPost deletes an ephemeral message previously sent to the user.
|
||||
// EXPERIMENTAL: This API is experimental and can be changed without advance notice.
|
||||
//
|
||||
// @tag Post
|
||||
// Minimum server version: 5.2
|
||||
DeleteEphemeralPost(userId, postId string)
|
||||
DeleteEphemeralPost(userID, postId string)
|
||||
|
||||
// DeletePost deletes a post.
|
||||
//
|
||||
@@ -641,7 +641,7 @@ type API interface {
|
||||
//
|
||||
// @tag Team
|
||||
// Minimum server version: 5.8
|
||||
GetTeamStats(teamId string) (*model.TeamStats, *model.AppError)
|
||||
GetTeamStats(teamID string) (*model.TeamStats, *model.AppError)
|
||||
|
||||
// UpdatePost updates a post.
|
||||
//
|
||||
@@ -653,13 +653,13 @@ type API interface {
|
||||
//
|
||||
// @tag User
|
||||
// Minimum server version: 5.6
|
||||
GetProfileImage(userId string) ([]byte, *model.AppError)
|
||||
GetProfileImage(userID string) ([]byte, *model.AppError)
|
||||
|
||||
// SetProfileImage sets a user's profile image.
|
||||
//
|
||||
// @tag User
|
||||
// Minimum server version: 5.6
|
||||
SetProfileImage(userId string, data []byte) *model.AppError
|
||||
SetProfileImage(userID string, data []byte) *model.AppError
|
||||
|
||||
// GetEmojiList returns a page of custom emoji on the system.
|
||||
//
|
||||
@@ -691,7 +691,7 @@ type API interface {
|
||||
// @tag File
|
||||
// @tag User
|
||||
// Minimum server version: 5.2
|
||||
CopyFileInfos(userId string, fileIds []string) ([]string, *model.AppError)
|
||||
CopyFileInfos(userID string, fileIds []string) ([]string, *model.AppError)
|
||||
|
||||
// GetFileInfo gets a File Info for a specific fileId
|
||||
//
|
||||
@@ -860,21 +860,21 @@ type API interface {
|
||||
//
|
||||
// @tag User
|
||||
// Minimum server version: 5.3
|
||||
HasPermissionTo(userId string, permission *model.Permission) bool
|
||||
HasPermissionTo(userID string, permission *model.Permission) bool
|
||||
|
||||
// HasPermissionToTeam check if the user has the permission at team scope.
|
||||
//
|
||||
// @tag User
|
||||
// @tag Team
|
||||
// Minimum server version: 5.3
|
||||
HasPermissionToTeam(userId, teamId string, permission *model.Permission) bool
|
||||
HasPermissionToTeam(userID, teamID string, permission *model.Permission) bool
|
||||
|
||||
// HasPermissionToChannel check if the user has the permission at channel scope.
|
||||
//
|
||||
// @tag User
|
||||
// @tag Channel
|
||||
// Minimum server version: 5.3
|
||||
HasPermissionToChannel(userId, channelId string, permission *model.Permission) bool
|
||||
HasPermissionToChannel(userID, channelId string, permission *model.Permission) bool
|
||||
|
||||
// LogDebug writes a log message to the Mattermost server log file.
|
||||
// Appropriate context such as the plugin name will already be added as fields so plugins
|
||||
@@ -978,7 +978,7 @@ type API interface {
|
||||
//
|
||||
// @tag User
|
||||
// Minimum server version: 5.26
|
||||
PublishUserTyping(userId, channelId, parentId string) *model.AppError
|
||||
PublishUserTyping(userID, channelId, parentId string) *model.AppError
|
||||
|
||||
// CreateCommand creates a server-owned slash command that is not handled by the plugin
|
||||
// itself, and which will persist past the life of the plugin. The command will have its
|
||||
|
||||
@@ -67,7 +67,7 @@ func TestHTTPClient(t *testing.T) {
|
||||
testCases := []struct {
|
||||
description string
|
||||
allowHost func(string) bool
|
||||
allowIp func(net.IP) bool
|
||||
allowIP func(net.IP) bool
|
||||
expectedAllowed bool
|
||||
}{
|
||||
{"allow with no checks", nil, nil, true},
|
||||
@@ -84,7 +84,7 @@ func TestHTTPClient(t *testing.T) {
|
||||
}
|
||||
for _, testCase := range testCases {
|
||||
t.Run(testCase.description, func(t *testing.T) {
|
||||
c := NewHTTPClient(NewTransport(false, testCase.allowHost, testCase.allowIp))
|
||||
c := NewHTTPClient(NewTransport(false, testCase.allowHost, testCase.allowIP))
|
||||
if _, err := c.Get(mockHTTP.URL); testCase.expectedAllowed {
|
||||
require.NoError(t, err)
|
||||
} else {
|
||||
|
||||
@@ -23,7 +23,7 @@ var ErrNotEnabled = Error{errors.New("imageproxy.ImageProxy: image proxy not ena
|
||||
// using MakeImageProxy which requires a configService and an HTTPService provided by the server.
|
||||
type ImageProxy struct {
|
||||
ConfigService configservice.ConfigService
|
||||
configListenerId string
|
||||
configListenerID string
|
||||
|
||||
HTTPService httpservice.HTTPService
|
||||
|
||||
@@ -56,7 +56,7 @@ func MakeImageProxy(configService configservice.ConfigService, httpService https
|
||||
siteURL, _ := url.Parse(*configService.Config().ServiceSettings.SiteURL)
|
||||
proxy.siteURL = siteURL
|
||||
|
||||
proxy.configListenerId = proxy.ConfigService.AddConfigListener(proxy.OnConfigChange)
|
||||
proxy.configListenerID = proxy.ConfigService.AddConfigListener(proxy.OnConfigChange)
|
||||
|
||||
config := proxy.ConfigService.Config()
|
||||
proxy.backend = proxy.makeBackend(*config.ImageProxySettings.Enable, *config.ImageProxySettings.ImageProxyType)
|
||||
@@ -83,7 +83,7 @@ func (proxy *ImageProxy) Close() {
|
||||
proxy.lock.Lock()
|
||||
defer proxy.lock.Unlock()
|
||||
|
||||
proxy.ConfigService.RemoveConfigListener(proxy.configListenerId)
|
||||
proxy.ConfigService.RemoveConfigListener(proxy.configListenerID)
|
||||
}
|
||||
|
||||
func (proxy *ImageProxy) OnConfigChange(oldConfig, newConfig *model.Config) {
|
||||
|
||||
@@ -26,11 +26,11 @@ type Client struct {
|
||||
// NewClient creates a client to the marketplace server at the given address.
|
||||
func NewClient(address string, httpService httpservice.HTTPService) (*Client, error) {
|
||||
var httpClient *http.Client
|
||||
addressUrl, err := url.Parse(address)
|
||||
addressURL, err := url.Parse(address)
|
||||
if err != nil {
|
||||
return nil, errors.Wrap(err, "failed to parse marketplace address")
|
||||
}
|
||||
if addressUrl.Hostname() == "localhost" || addressUrl.Hostname() == "127.0.0.1" {
|
||||
if addressURL.Hostname() == "localhost" || addressURL.Hostname() == "127.0.0.1" {
|
||||
httpClient = httpService.MakeClient(true)
|
||||
} else {
|
||||
httpClient = httpService.MakeClient(false)
|
||||
|
||||
Разница между файлами не показана из-за своего большого размера
Загрузить разницу
Разница между файлами не показана из-за своего большого размера
Загрузить разницу
246
store/store.go
246
store/store.go
@@ -91,7 +91,7 @@ type TeamStore interface {
|
||||
GetAllPublicTeamPageListing(offset int, limit int) ([]*model.Team, error)
|
||||
GetAllTeamListing() ([]*model.Team, error)
|
||||
GetAllTeamPageListing(offset int, limit int) ([]*model.Team, error)
|
||||
GetTeamsByUserId(userId string) ([]*model.Team, error)
|
||||
GetTeamsByUserId(userID string) ([]*model.Team, error)
|
||||
GetByInviteId(inviteID string) (*model.Team, error)
|
||||
PermanentDelete(teamID string) error
|
||||
AnalyticsTeamCount(includeDeleted bool) (int64, error)
|
||||
@@ -101,30 +101,30 @@ 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(ctx context.Context, teamID string, userId string) (*model.TeamMember, error)
|
||||
GetMember(ctx context.Context, 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
|
||||
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
|
||||
RemoveAllMembersByUser(userId 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)
|
||||
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)
|
||||
GetTeamMembersForExport(userId string) ([]*model.TeamMemberForExport, error)
|
||||
UserBelongsToTeams(userId string, teamIds []string) (bool, error)
|
||||
GetUserTeamIds(userId string, allowFromCache bool) ([]string, error)
|
||||
InvalidateAllTeamIdsForUser(userId string)
|
||||
GetTeamMembersForExport(userID string) ([]*model.TeamMemberForExport, error)
|
||||
UserBelongsToTeams(userID string, teamIds []string) (bool, error)
|
||||
GetUserTeamIds(userID string, allowFromCache bool) ([]string, error)
|
||||
InvalidateAllTeamIdsForUser(userID string)
|
||||
ClearCaches()
|
||||
|
||||
// UpdateMembersRole sets all of the given team members to admins and all of the other members of the team to
|
||||
@@ -137,11 +137,11 @@ type TeamStore interface {
|
||||
|
||||
type ChannelStore interface {
|
||||
Save(channel *model.Channel, maxChannelsPerTeam int64) (*model.Channel, error)
|
||||
CreateDirectChannel(userId *model.User, otherUserId *model.User, channelOptions ...model.ChannelOption) (*model.Channel, error)
|
||||
CreateDirectChannel(userID *model.User, otherUserID *model.User, channelOptions ...model.ChannelOption) (*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
|
||||
ClearSidebarOnTeamLeave(userID, teamID string) error
|
||||
Get(id string, allowFromCache bool) (*model.Channel, error)
|
||||
InvalidateChannel(id string)
|
||||
InvalidateChannelByName(teamID, name string)
|
||||
@@ -155,15 +155,15 @@ type ChannelStore interface {
|
||||
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)
|
||||
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)
|
||||
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)
|
||||
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)
|
||||
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)
|
||||
@@ -173,14 +173,14 @@ type ChannelStore interface {
|
||||
UpdateMember(member *model.ChannelMember) (*model.ChannelMember, error)
|
||||
UpdateMultipleMembers(members []*model.ChannelMember) ([]*model.ChannelMember, error)
|
||||
GetMembers(channelID string, offset, limit int) (*model.ChannelMembers, error)
|
||||
GetMember(ctx context.Context, channelID string, userId string) (*model.ChannelMember, error)
|
||||
GetMember(ctx context.Context, 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
|
||||
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)
|
||||
GetMemberForPost(postID string, userID string) (*model.ChannelMember, error)
|
||||
InvalidateMemberCount(channelID string)
|
||||
GetMemberCountFromCache(channelID string) int64
|
||||
GetMemberCount(channelID string, allowFromCache bool) (int64, error)
|
||||
@@ -190,51 +190,51 @@ type ChannelStore interface {
|
||||
InvalidateGuestCount(channelID string)
|
||||
GetGuestCount(channelID string, allowFromCache bool) (int64, error)
|
||||
GetPinnedPosts(channelID string) (*model.PostList, error)
|
||||
RemoveMember(channelID string, userId string) error
|
||||
RemoveMember(channelID string, userID string) error
|
||||
RemoveMembers(channelID string, userIds []string) error
|
||||
PermanentDeleteMembersByUser(userId string) error
|
||||
PermanentDeleteMembersByUser(userID string) error
|
||||
PermanentDeleteMembersByChannel(channelID string) error
|
||||
UpdateLastViewedAt(channelIds []string, userId string, updateThreads bool) (map[string]int64, error)
|
||||
UpdateLastViewedAt(channelIds []string, userID string, updateThreads bool) (map[string]int64, error)
|
||||
UpdateLastViewedAtPost(unreadPost *model.Post, userID string, mentionCount, mentionCountRoot int, updateThreads bool) (*model.ChannelUnreadAt, error)
|
||||
CountPostsAfter(channelID string, timestamp int64, userId string) (int, int, error)
|
||||
IncrementMentionCount(channelID string, userId string, updateThreads, isRoot bool) error
|
||||
CountPostsAfter(channelID string, timestamp int64, userID string) (int, int, error)
|
||||
IncrementMentionCount(channelID string, userID string, updateThreads, isRoot 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)
|
||||
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)
|
||||
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)
|
||||
SearchGroupChannels(userId, term string) (*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)
|
||||
GetMembersByChannelIds(channelIds []string, userId 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)
|
||||
GetChannelUnread(channelID, userID string) (*model.ChannelUnread, error)
|
||||
ClearCaches()
|
||||
GetChannelsByScheme(schemeID string, offset int, limit int) (model.ChannelList, error)
|
||||
MigrateChannelMembers(fromChannelId string, fromUserId string) (map[string]string, error)
|
||||
MigrateChannelMembers(fromChannelID string, fromUserID string) (map[string]string, error)
|
||||
ResetAllChannelSchemes() error
|
||||
ClearAllCustomRoleAssignments() error
|
||||
MigratePublicChannels() error
|
||||
CreateInitialSidebarCategories(userId, teamID string) (*model.OrderedSidebarCategories, error)
|
||||
GetSidebarCategories(userId, teamID string) (*model.OrderedSidebarCategories, error)
|
||||
CreateInitialSidebarCategories(userID, teamID string) (*model.OrderedSidebarCategories, 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)
|
||||
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)
|
||||
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)
|
||||
UserBelongsToChannels(userID string, channelIds []string) (bool, error)
|
||||
|
||||
// UpdateMembersRole sets all of the given team members to admins and all of the other members of the team to
|
||||
// non-admin members.
|
||||
@@ -249,8 +249,8 @@ type ChannelStore interface {
|
||||
}
|
||||
|
||||
type ChannelMemberHistoryStore interface {
|
||||
LogJoinEvent(userId string, channelID string, joinTime int64) error
|
||||
LogLeaveEvent(userId string, channelID string, leaveTime int64) 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)
|
||||
}
|
||||
@@ -259,20 +259,20 @@ type ThreadStore interface {
|
||||
Save(thread *model.Thread) (*model.Thread, error)
|
||||
Update(thread *model.Thread) (*model.Thread, error)
|
||||
Get(id string) (*model.Thread, error)
|
||||
GetThreadsForUser(userId, teamId string, opts model.GetUserThreadsOpts) (*model.Threads, error)
|
||||
GetThreadForUser(userId, teamId, threadId string, extended bool) (*model.ThreadResponse, error)
|
||||
Delete(postId string) error
|
||||
GetPosts(threadId string, since int64) ([]*model.Post, error)
|
||||
GetThreadsForUser(userId, teamID string, opts model.GetUserThreadsOpts) (*model.Threads, error)
|
||||
GetThreadForUser(userID, teamID, threadId string, extended bool) (*model.ThreadResponse, error)
|
||||
Delete(postID string) error
|
||||
GetPosts(threadID string, since int64) ([]*model.Post, 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
|
||||
MaintainMembership(userId, postID string, following, incrementMentions, updateFollowing, updateViewedTimestamp bool) error
|
||||
MaintainMembership(userID, postID string, following, incrementMentions, updateFollowing, updateViewedTimestamp bool) error
|
||||
CollectThreadsWithNewerReplies(userId string, channelIds []string, timestamp int64) ([]string, error)
|
||||
UpdateUnreadsByChannel(userId string, changedThreads []string, timestamp int64, updateViewedTimestamp bool) error
|
||||
}
|
||||
@@ -284,13 +284,13 @@ type PostStore interface {
|
||||
Get(ctx context.Context, id string, skipFetchThreads, collapsedThreads, collapsedThreadsExtended bool, userID string) (*model.PostList, error)
|
||||
GetSingle(id string, inclDeleted bool) (*model.Post, error)
|
||||
Delete(postID string, time int64, deleteByID string) error
|
||||
PermanentDeleteByUser(userId string) error
|
||||
PermanentDeleteByUser(userID 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)
|
||||
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)
|
||||
GetPostsBefore(options model.GetPostsOptions) (*model.PostList, error)
|
||||
GetPostsAfter(options model.GetPostsOptions) (*model.PostList, error)
|
||||
GetPostsSince(options model.GetPostsSinceOptions, allowFromCache bool) (*model.PostList, error)
|
||||
@@ -298,7 +298,7 @@ type PostStore interface {
|
||||
GetPostIdAfterTime(channelID string, time int64, collapsedThreads bool) (string, error)
|
||||
GetPostIdBeforeTime(channelID string, time int64, collapsedThreads bool) (string, error)
|
||||
GetEtag(channelID string, allowFromCache bool, collapsedThreads bool) string
|
||||
Search(teamID string, userId string, params *model.SearchParams) (*model.PostList, error)
|
||||
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)
|
||||
@@ -315,7 +315,7 @@ type PostStore interface {
|
||||
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)
|
||||
SearchPostsInTeamForUser(paramsList []*model.SearchParams, userID, teamID string, page, perPage int) (*model.PostSearchResults, error)
|
||||
GetOldestEntityCreationTime() (int64, error)
|
||||
GetPostsSinceForSync(options model.GetPostsSinceForSyncOptions, allowFromCache bool) ([]*model.Post, error)
|
||||
}
|
||||
@@ -323,51 +323,51 @@ type PostStore interface {
|
||||
type UserStore interface {
|
||||
Save(user *model.User) (*model.User, error)
|
||||
Update(user *model.User, allowRoleUpdate bool) (*model.UserUpdate, error)
|
||||
UpdateLastPictureUpdate(userId string) error
|
||||
ResetLastPictureUpdate(userId string) error
|
||||
UpdatePassword(userId, newPassword string) error
|
||||
UpdateUpdateAt(userId string) (int64, error)
|
||||
UpdateAuthData(userId string, service string, authData *string, email string, resetMfa bool) (string, error)
|
||||
UpdateMfaSecret(userId, secret string) error
|
||||
UpdateMfaActive(userId string, active bool) error
|
||||
UpdateLastPictureUpdate(userID string) error
|
||||
ResetLastPictureUpdate(userID string) error
|
||||
UpdatePassword(userID, newPassword string) error
|
||||
UpdateUpdateAt(userID string) (int64, error)
|
||||
UpdateAuthData(userID string, service string, authData *string, email string, resetMfa bool) (string, error)
|
||||
UpdateMfaSecret(userID, secret string) error
|
||||
UpdateMfaActive(userID string, active bool) error
|
||||
Get(ctx context.Context, id string) (*model.User, error)
|
||||
GetMany(ctx context.Context, ids []string) ([]*model.User, error)
|
||||
GetAll() ([]*model.User, error)
|
||||
ClearCaches()
|
||||
InvalidateProfilesInChannelCacheByUser(userId string)
|
||||
InvalidateProfilesInChannelCacheByUser(userID 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)
|
||||
GetProfilesNotInChannel(teamId string, channelId string, groupConstrained bool, offset int, limit int, viewRestrictions *model.ViewUsersRestrictions) ([]*model.User, error)
|
||||
GetAllProfilesInChannel(ctx context.Context, channelID string, allowFromCache bool) (map[string]*model.User, error)
|
||||
GetProfilesNotInChannel(teamID string, channelId string, groupConstrained bool, offset int, limit int, viewRestrictions *model.ViewUsersRestrictions) ([]*model.User, error)
|
||||
GetProfilesWithoutTeam(options *model.UserGetOptions) ([]*model.User, error)
|
||||
GetProfilesByUsernames(usernames []string, viewRestrictions *model.ViewUsersRestrictions) ([]*model.User, error)
|
||||
GetAllProfiles(options *model.UserGetOptions) ([]*model.User, error)
|
||||
GetProfiles(options *model.UserGetOptions) ([]*model.User, error)
|
||||
GetProfileByIds(ctx context.Context, userIds []string, options *UserGetByIdsOpts, allowFromCache bool) ([]*model.User, error)
|
||||
GetProfileByGroupChannelIdsForUser(userId string, channelIds []string) (map[string][]*model.User, error)
|
||||
InvalidateProfileCacheForUser(userId string)
|
||||
GetProfileByGroupChannelIdsForUser(userID string, channelIds []string) (map[string][]*model.User, error)
|
||||
InvalidateProfileCacheForUser(userID string)
|
||||
GetByEmail(email string) (*model.User, error)
|
||||
GetByAuth(authData *string, authService string) (*model.User, error)
|
||||
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)
|
||||
VerifyEmail(userId, email string) (string, error)
|
||||
VerifyEmail(userID, email string) (string, error)
|
||||
GetEtagForAllProfiles() string
|
||||
GetEtagForProfiles(teamID string) string
|
||||
UpdateFailedPasswordAttempts(userId string, attempts int) error
|
||||
UpdateFailedPasswordAttempts(userID string, attempts int) error
|
||||
GetSystemAdminProfiles() (map[string]*model.User, error)
|
||||
PermanentDelete(userId string) 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)
|
||||
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)
|
||||
SearchNotInTeam(notInTeamId 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)
|
||||
SearchWithoutTeam(term string, options *model.UserSearchOptions) ([]*model.User, error)
|
||||
@@ -393,18 +393,18 @@ type UserStore interface {
|
||||
}
|
||||
|
||||
type BotStore interface {
|
||||
Get(userId string, includeDeleted bool) (*model.Bot, error)
|
||||
Get(userID string, includeDeleted bool) (*model.Bot, error)
|
||||
GetAll(options *model.BotGetOptions) ([]*model.Bot, error)
|
||||
Save(bot *model.Bot) (*model.Bot, error)
|
||||
Update(bot *model.Bot) (*model.Bot, error)
|
||||
PermanentDelete(userId string) error
|
||||
PermanentDelete(userID string) error
|
||||
}
|
||||
|
||||
type SessionStore interface {
|
||||
Get(ctx context.Context, sessionIDOrToken string) (*model.Session, error)
|
||||
Save(session *model.Session) (*model.Session, error)
|
||||
GetSessions(userId string) ([]*model.Session, error)
|
||||
GetSessionsWithActiveDeviceIds(userId string) ([]*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
|
||||
@@ -412,7 +412,7 @@ type SessionStore interface {
|
||||
PermanentDeleteSessionsByUser(teamID string) error
|
||||
UpdateExpiresAt(sessionID string, time int64) error
|
||||
UpdateLastActivityAt(sessionID string, time int64) error
|
||||
UpdateRoles(userId string, roles string) (string, error)
|
||||
UpdateRoles(userID string, roles string) (string, error)
|
||||
UpdateDeviceId(id string, deviceID string, expiresAt int64) (string, error)
|
||||
UpdateProps(session *model.Session) error
|
||||
AnalyticsSessionCount() (int64, error)
|
||||
@@ -422,7 +422,7 @@ type SessionStore interface {
|
||||
type AuditStore interface {
|
||||
Save(audit *model.Audit) error
|
||||
Get(user_id string, offset int, limit int) (model.Audits, error)
|
||||
PermanentDeleteByUser(userId string) error
|
||||
PermanentDeleteByUser(userID string) error
|
||||
}
|
||||
|
||||
type ClusterDiscoveryStore interface {
|
||||
@@ -457,20 +457,20 @@ type OAuthStore interface {
|
||||
SaveApp(app *model.OAuthApp) (*model.OAuthApp, error)
|
||||
UpdateApp(app *model.OAuthApp) (*model.OAuthApp, error)
|
||||
GetApp(id string) (*model.OAuthApp, error)
|
||||
GetAppByUser(userId string, offset, limit int) ([]*model.OAuthApp, error)
|
||||
GetAppByUser(userID string, offset, limit int) ([]*model.OAuthApp, error)
|
||||
GetApps(offset, limit int) ([]*model.OAuthApp, error)
|
||||
GetAuthorizedApps(userId string, offset, limit int) ([]*model.OAuthApp, error)
|
||||
GetAuthorizedApps(userID string, offset, limit int) ([]*model.OAuthApp, error)
|
||||
DeleteApp(id string) error
|
||||
SaveAuthData(authData *model.AuthData) (*model.AuthData, error)
|
||||
GetAuthData(code string) (*model.AuthData, error)
|
||||
RemoveAuthData(code string) error
|
||||
PermanentDeleteAuthDataByUser(userId string) error
|
||||
PermanentDeleteAuthDataByUser(userID string) error
|
||||
SaveAccessData(accessData *model.AccessData) (*model.AccessData, error)
|
||||
UpdateAccessData(accessData *model.AccessData) (*model.AccessData, error)
|
||||
GetAccessData(token string) (*model.AccessData, error)
|
||||
GetAccessDataByUserForApp(userId, clientId string) ([]*model.AccessData, error)
|
||||
GetAccessDataByUserForApp(userID, clientId string) ([]*model.AccessData, error)
|
||||
GetAccessDataByRefreshToken(token string) (*model.AccessData, error)
|
||||
GetPreviousAccessData(userId, clientId string) (*model.AccessData, error)
|
||||
GetPreviousAccessData(userID, clientId string) (*model.AccessData, error)
|
||||
RemoveAccessData(token string) error
|
||||
RemoveAllAccessData() error
|
||||
}
|
||||
@@ -490,26 +490,26 @@ type WebhookStore interface {
|
||||
SaveIncoming(webhook *model.IncomingWebhook) (*model.IncomingWebhook, error)
|
||||
GetIncoming(id string, allowFromCache bool) (*model.IncomingWebhook, error)
|
||||
GetIncomingList(offset, limit int) ([]*model.IncomingWebhook, error)
|
||||
GetIncomingListByUser(userId string, 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)
|
||||
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
|
||||
PermanentDeleteIncomingByUser(userId 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)
|
||||
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)
|
||||
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)
|
||||
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
|
||||
PermanentDeleteOutgoingByUser(userID string) error
|
||||
UpdateOutgoing(hook *model.OutgoingWebhook) (*model.OutgoingWebhook, error)
|
||||
|
||||
AnalyticsIncomingCount(teamID string) (int64, error)
|
||||
@@ -525,7 +525,7 @@ type CommandStore interface {
|
||||
GetByTeam(teamID string) ([]*model.Command, error)
|
||||
Delete(commandID string, time int64) error
|
||||
PermanentDeleteByTeam(teamID string) error
|
||||
PermanentDeleteByUser(userId string) error
|
||||
PermanentDeleteByUser(userID string) error
|
||||
Update(hook *model.Command) (*model.Command, error)
|
||||
AnalyticsCommandCount(teamID string) (int64, error)
|
||||
}
|
||||
@@ -539,13 +539,13 @@ type CommandWebhookStore interface {
|
||||
|
||||
type PreferenceStore interface {
|
||||
Save(preferences *model.Preferences) error
|
||||
GetCategory(userId string, category string) (model.Preferences, error)
|
||||
Get(userId string, category string, name string) (*model.Preference, error)
|
||||
GetAll(userId string) (model.Preferences, error)
|
||||
Delete(userId, category, name string) error
|
||||
DeleteCategory(userId string, category string) error
|
||||
GetCategory(userID string, category string) (model.Preferences, error)
|
||||
Get(userID string, category string, name string) (*model.Preference, error)
|
||||
GetAll(userID string) (model.Preferences, error)
|
||||
Delete(userID, category, name string) error
|
||||
DeleteCategory(userID string, category string) error
|
||||
DeleteCategoryAndName(category string, name string) error
|
||||
PermanentDeleteByUser(userId string) error
|
||||
PermanentDeleteByUser(userID string) error
|
||||
CleanupFlagsBatch(limit int64) (int64, error)
|
||||
}
|
||||
|
||||
@@ -574,11 +574,11 @@ type EmojiStore interface {
|
||||
|
||||
type StatusStore interface {
|
||||
SaveOrUpdate(status *model.Status) error
|
||||
Get(userId string) (*model.Status, error)
|
||||
Get(userID string) (*model.Status, error)
|
||||
GetByIds(userIds []string) ([]*model.Status, error)
|
||||
ResetAll() error
|
||||
GetTotalActiveUsersCount() (int64, error)
|
||||
UpdateLastActivityAt(userId string, lastActivityAt int64) error
|
||||
UpdateLastActivityAt(userID string, lastActivityAt int64) error
|
||||
}
|
||||
|
||||
type FileInfoStore interface {
|
||||
@@ -588,16 +588,16 @@ type FileInfoStore interface {
|
||||
GetByIds(ids []string) ([]*model.FileInfo, error)
|
||||
GetByPath(path string) (*model.FileInfo, error)
|
||||
GetForPost(postID string, readFromMaster, includeDeleted, allowFromCache bool) ([]*model.FileInfo, error)
|
||||
GetForUser(userId string) ([]*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
|
||||
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)
|
||||
PermanentDeleteByUser(userID string) (int64, error)
|
||||
SetContent(fileID, content string) error
|
||||
Search(paramsList []*model.SearchParams, userId, teamID string, page, perPage int) (*model.FileInfoList, error)
|
||||
Search(paramsList []*model.SearchParams, userID, teamID string, page, perPage int) (*model.FileInfoList, error)
|
||||
CountAll() (int64, error)
|
||||
GetFilesBatchForIndexing(startTime, endTime int64, limit int) ([]*model.FileForIndexing, error)
|
||||
ClearCaches()
|
||||
@@ -607,7 +607,7 @@ type UploadSessionStore interface {
|
||||
Save(session *model.UploadSession) (*model.UploadSession, error)
|
||||
Update(session *model.UploadSession) error
|
||||
Get(id string) (*model.UploadSession, error)
|
||||
GetForUser(userId string) ([]*model.UploadSession, error)
|
||||
GetForUser(userID string) ([]*model.UploadSession, error)
|
||||
Delete(id string) error
|
||||
}
|
||||
|
||||
@@ -639,12 +639,12 @@ type JobStore interface {
|
||||
|
||||
type UserAccessTokenStore interface {
|
||||
Save(token *model.UserAccessToken) (*model.UserAccessToken, error)
|
||||
DeleteAllForUser(userId string) error
|
||||
DeleteAllForUser(userID string) 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)
|
||||
GetByUser(userID string, page, perPage int) ([]*model.UserAccessToken, error)
|
||||
Search(term string) ([]*model.UserAccessToken, error)
|
||||
UpdateTokenEnable(tokenID string) error
|
||||
UpdateTokenDisable(tokenID string) error
|
||||
@@ -701,16 +701,16 @@ type TermsOfServiceStore interface {
|
||||
}
|
||||
|
||||
type ProductNoticesStore interface {
|
||||
View(userId string, notices []string) error
|
||||
View(userID string, notices []string) error
|
||||
Clear(notices []string) error
|
||||
ClearOldNotices(currentNotices *model.ProductNotices) error
|
||||
GetViews(userId string) ([]model.ProductNoticeViewState, error)
|
||||
GetViews(userID string) ([]model.ProductNoticeViewState, error)
|
||||
}
|
||||
|
||||
type UserTermsOfServiceStore interface {
|
||||
GetByUser(userId string) (*model.UserTermsOfService, error)
|
||||
GetByUser(userID string) (*model.UserTermsOfService, error)
|
||||
Save(userTermsOfService *model.UserTermsOfService) (*model.UserTermsOfService, error)
|
||||
Delete(userId, termsOfServiceId string) error
|
||||
Delete(userID, termsOfServiceId string) error
|
||||
}
|
||||
|
||||
type GroupStore interface {
|
||||
@@ -720,7 +720,7 @@ type GroupStore interface {
|
||||
GetByIDs(groupIDs []string) ([]*model.Group, error)
|
||||
GetByRemoteID(remoteID string, groupSource model.GroupSource) (*model.Group, error)
|
||||
GetAllBySource(groupSource model.GroupSource) ([]*model.Group, error)
|
||||
GetByUser(userId string) ([]*model.Group, error)
|
||||
GetByUser(userID string) ([]*model.Group, error)
|
||||
Update(group *model.Group) (*model.Group, error)
|
||||
Delete(groupID string) (*model.Group, error)
|
||||
|
||||
@@ -733,7 +733,7 @@ type GroupStore interface {
|
||||
|
||||
UpsertMember(groupID string, userID string) (*model.GroupMember, error)
|
||||
DeleteMember(groupID string, userID string) (*model.GroupMember, error)
|
||||
PermanentDeleteMembersByUser(userId string) error
|
||||
PermanentDeleteMembersByUser(userID string) error
|
||||
|
||||
CreateGroupSyncable(groupSyncable *model.GroupSyncable) (*model.GroupSyncable, error)
|
||||
GetGroupSyncable(groupID string, syncableID string, syncableType model.GroupSyncableType) (*model.GroupSyncable, error)
|
||||
@@ -793,7 +793,7 @@ type GroupStore interface {
|
||||
// GroupMemberCount returns the total count of records in the GroupMembers table.
|
||||
GroupMemberCount() (int64, error)
|
||||
|
||||
// DistinctGroupMemberCount returns the count of records in the GroupMembers table with distinct UserId values.
|
||||
// DistinctGroupMemberCount returns the count of records in the GroupMembers table with distinct userID values.
|
||||
DistinctGroupMemberCount() (int64, error)
|
||||
|
||||
// GroupCountWithAllowReference returns the count of records in the Groups table with AllowReference set to true.
|
||||
|
||||
@@ -37,13 +37,13 @@ func (_m *AuditStore) Get(user_id string, offset int, limit int) (model.Audits,
|
||||
return r0, r1
|
||||
}
|
||||
|
||||
// PermanentDeleteByUser provides a mock function with given fields: userId
|
||||
func (_m *AuditStore) PermanentDeleteByUser(userId string) error {
|
||||
ret := _m.Called(userId)
|
||||
// PermanentDeleteByUser provides a mock function with given fields: userID
|
||||
func (_m *AuditStore) PermanentDeleteByUser(userID string) error {
|
||||
ret := _m.Called(userID)
|
||||
|
||||
var r0 error
|
||||
if rf, ok := ret.Get(0).(func(string) error); ok {
|
||||
r0 = rf(userId)
|
||||
r0 = rf(userID)
|
||||
} else {
|
||||
r0 = ret.Error(0)
|
||||
}
|
||||
|
||||
@@ -14,13 +14,13 @@ type BotStore struct {
|
||||
mock.Mock
|
||||
}
|
||||
|
||||
// Get provides a mock function with given fields: userId, includeDeleted
|
||||
func (_m *BotStore) Get(userId string, includeDeleted bool) (*model.Bot, error) {
|
||||
ret := _m.Called(userId, includeDeleted)
|
||||
// Get provides a mock function with given fields: userID, includeDeleted
|
||||
func (_m *BotStore) Get(userID string, includeDeleted bool) (*model.Bot, error) {
|
||||
ret := _m.Called(userID, includeDeleted)
|
||||
|
||||
var r0 *model.Bot
|
||||
if rf, ok := ret.Get(0).(func(string, bool) *model.Bot); ok {
|
||||
r0 = rf(userId, includeDeleted)
|
||||
r0 = rf(userID, includeDeleted)
|
||||
} else {
|
||||
if ret.Get(0) != nil {
|
||||
r0 = ret.Get(0).(*model.Bot)
|
||||
@@ -29,7 +29,7 @@ func (_m *BotStore) Get(userId string, includeDeleted bool) (*model.Bot, error)
|
||||
|
||||
var r1 error
|
||||
if rf, ok := ret.Get(1).(func(string, bool) error); ok {
|
||||
r1 = rf(userId, includeDeleted)
|
||||
r1 = rf(userID, includeDeleted)
|
||||
} else {
|
||||
r1 = ret.Error(1)
|
||||
}
|
||||
@@ -60,13 +60,13 @@ func (_m *BotStore) GetAll(options *model.BotGetOptions) ([]*model.Bot, error) {
|
||||
return r0, r1
|
||||
}
|
||||
|
||||
// PermanentDelete provides a mock function with given fields: userId
|
||||
func (_m *BotStore) PermanentDelete(userId string) error {
|
||||
ret := _m.Called(userId)
|
||||
// PermanentDelete provides a mock function with given fields: userID
|
||||
func (_m *BotStore) PermanentDelete(userID string) error {
|
||||
ret := _m.Called(userID)
|
||||
|
||||
var r0 error
|
||||
if rf, ok := ret.Get(0).(func(string) error); ok {
|
||||
r0 = rf(userId)
|
||||
r0 = rf(userID)
|
||||
} else {
|
||||
r0 = ret.Error(0)
|
||||
}
|
||||
|
||||
@@ -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)
|
||||
}
|
||||
|
||||
@@ -83,13 +83,13 @@ func (_m *ChannelStore) AutocompleteInTeam(teamID string, term string, includeDe
|
||||
return r0, r1
|
||||
}
|
||||
|
||||
// AutocompleteInTeamForSearch provides a mock function with given fields: teamID, userId, term, includeDeleted
|
||||
func (_m *ChannelStore) AutocompleteInTeamForSearch(teamID string, userId string, term string, includeDeleted bool) (*model.ChannelList, error) {
|
||||
ret := _m.Called(teamID, userId, term, includeDeleted)
|
||||
// AutocompleteInTeamForSearch provides a mock function with given fields: teamID, userID, term, includeDeleted
|
||||
func (_m *ChannelStore) AutocompleteInTeamForSearch(teamID string, userID string, term string, includeDeleted bool) (*model.ChannelList, error) {
|
||||
ret := _m.Called(teamID, userID, term, includeDeleted)
|
||||
|
||||
var r0 *model.ChannelList
|
||||
if rf, ok := ret.Get(0).(func(string, string, string, bool) *model.ChannelList); ok {
|
||||
r0 = rf(teamID, userId, term, includeDeleted)
|
||||
r0 = rf(teamID, userID, term, includeDeleted)
|
||||
} else {
|
||||
if ret.Get(0) != nil {
|
||||
r0 = ret.Get(0).(*model.ChannelList)
|
||||
@@ -98,7 +98,7 @@ func (_m *ChannelStore) AutocompleteInTeamForSearch(teamID string, userId string
|
||||
|
||||
var r1 error
|
||||
if rf, ok := ret.Get(1).(func(string, string, string, bool) error); ok {
|
||||
r1 = rf(teamID, userId, term, includeDeleted)
|
||||
r1 = rf(teamID, userID, term, includeDeleted)
|
||||
} else {
|
||||
r1 = ret.Error(1)
|
||||
}
|
||||
@@ -125,13 +125,13 @@ func (_m *ChannelStore) ClearCaches() {
|
||||
_m.Called()
|
||||
}
|
||||
|
||||
// ClearSidebarOnTeamLeave provides a mock function with given fields: userId, teamID
|
||||
func (_m *ChannelStore) ClearSidebarOnTeamLeave(userId string, teamID string) error {
|
||||
ret := _m.Called(userId, teamID)
|
||||
// ClearSidebarOnTeamLeave provides a mock function with given fields: userID, teamID
|
||||
func (_m *ChannelStore) ClearSidebarOnTeamLeave(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)
|
||||
}
|
||||
@@ -139,27 +139,27 @@ func (_m *ChannelStore) ClearSidebarOnTeamLeave(userId string, teamID string) er
|
||||
return r0
|
||||
}
|
||||
|
||||
// CountPostsAfter provides a mock function with given fields: channelID, timestamp, userId
|
||||
func (_m *ChannelStore) CountPostsAfter(channelID string, timestamp int64, userId string) (int, int, error) {
|
||||
ret := _m.Called(channelID, timestamp, userId)
|
||||
// CountPostsAfter provides a mock function with given fields: channelID, timestamp, userID
|
||||
func (_m *ChannelStore) CountPostsAfter(channelID string, timestamp int64, userID string) (int, int, error) {
|
||||
ret := _m.Called(channelID, timestamp, userID)
|
||||
|
||||
var r0 int
|
||||
if rf, ok := ret.Get(0).(func(string, int64, string) int); ok {
|
||||
r0 = rf(channelID, timestamp, userId)
|
||||
r0 = rf(channelID, timestamp, userID)
|
||||
} else {
|
||||
r0 = ret.Get(0).(int)
|
||||
}
|
||||
|
||||
var r1 int
|
||||
if rf, ok := ret.Get(1).(func(string, int64, string) int); ok {
|
||||
r1 = rf(channelID, timestamp, userId)
|
||||
r1 = rf(channelID, timestamp, userID)
|
||||
} else {
|
||||
r1 = ret.Get(1).(int)
|
||||
}
|
||||
|
||||
var r2 error
|
||||
if rf, ok := ret.Get(2).(func(string, int64, string) error); ok {
|
||||
r2 = rf(channelID, timestamp, userId)
|
||||
r2 = rf(channelID, timestamp, userID)
|
||||
} else {
|
||||
r2 = ret.Error(2)
|
||||
}
|
||||
@@ -167,20 +167,20 @@ func (_m *ChannelStore) CountPostsAfter(channelID string, timestamp int64, userI
|
||||
return r0, r1, r2
|
||||
}
|
||||
|
||||
// CreateDirectChannel provides a mock function with given fields: userId, otherUserId, channelOptions
|
||||
func (_m *ChannelStore) CreateDirectChannel(userId *model.User, otherUserId *model.User, channelOptions ...model.ChannelOption) (*model.Channel, error) {
|
||||
// CreateDirectChannel provides a mock function with given fields: userID, otherUserID, channelOptions
|
||||
func (_m *ChannelStore) CreateDirectChannel(userID *model.User, otherUserID *model.User, channelOptions ...model.ChannelOption) (*model.Channel, error) {
|
||||
_va := make([]interface{}, len(channelOptions))
|
||||
for _i := range channelOptions {
|
||||
_va[_i] = channelOptions[_i]
|
||||
}
|
||||
var _ca []interface{}
|
||||
_ca = append(_ca, userId, otherUserId)
|
||||
_ca = append(_ca, userID, otherUserID)
|
||||
_ca = append(_ca, _va...)
|
||||
ret := _m.Called(_ca...)
|
||||
|
||||
var r0 *model.Channel
|
||||
if rf, ok := ret.Get(0).(func(*model.User, *model.User, ...model.ChannelOption) *model.Channel); ok {
|
||||
r0 = rf(userId, otherUserId, channelOptions...)
|
||||
r0 = rf(userID, otherUserID, channelOptions...)
|
||||
} else {
|
||||
if ret.Get(0) != nil {
|
||||
r0 = ret.Get(0).(*model.Channel)
|
||||
@@ -189,7 +189,7 @@ func (_m *ChannelStore) CreateDirectChannel(userId *model.User, otherUserId *mod
|
||||
|
||||
var r1 error
|
||||
if rf, ok := ret.Get(1).(func(*model.User, *model.User, ...model.ChannelOption) error); ok {
|
||||
r1 = rf(userId, otherUserId, channelOptions...)
|
||||
r1 = rf(userID, otherUserID, channelOptions...)
|
||||
} else {
|
||||
r1 = ret.Error(1)
|
||||
}
|
||||
@@ -197,13 +197,13 @@ func (_m *ChannelStore) CreateDirectChannel(userId *model.User, otherUserId *mod
|
||||
return r0, r1
|
||||
}
|
||||
|
||||
// CreateInitialSidebarCategories provides a mock function with given fields: userId, teamID
|
||||
func (_m *ChannelStore) CreateInitialSidebarCategories(userId string, teamID string) (*model.OrderedSidebarCategories, error) {
|
||||
ret := _m.Called(userId, teamID)
|
||||
// CreateInitialSidebarCategories provides a mock function with given fields: userID, teamID
|
||||
func (_m *ChannelStore) CreateInitialSidebarCategories(userID string, teamID string) (*model.OrderedSidebarCategories, error) {
|
||||
ret := _m.Called(userID, teamID)
|
||||
|
||||
var r0 *model.OrderedSidebarCategories
|
||||
if rf, ok := ret.Get(0).(func(string, string) *model.OrderedSidebarCategories); ok {
|
||||
r0 = rf(userId, teamID)
|
||||
r0 = rf(userID, teamID)
|
||||
} else {
|
||||
if ret.Get(0) != nil {
|
||||
r0 = ret.Get(0).(*model.OrderedSidebarCategories)
|
||||
@@ -212,7 +212,7 @@ func (_m *ChannelStore) CreateInitialSidebarCategories(userId string, teamID str
|
||||
|
||||
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)
|
||||
}
|
||||
@@ -220,13 +220,13 @@ func (_m *ChannelStore) CreateInitialSidebarCategories(userId string, teamID str
|
||||
return r0, r1
|
||||
}
|
||||
|
||||
// CreateSidebarCategory provides a mock function with given fields: userId, teamID, newCategory
|
||||
func (_m *ChannelStore) CreateSidebarCategory(userId string, teamID string, newCategory *model.SidebarCategoryWithChannels) (*model.SidebarCategoryWithChannels, error) {
|
||||
ret := _m.Called(userId, teamID, newCategory)
|
||||
// CreateSidebarCategory provides a mock function with given fields: userID, teamID, newCategory
|
||||
func (_m *ChannelStore) CreateSidebarCategory(userID string, teamID string, newCategory *model.SidebarCategoryWithChannels) (*model.SidebarCategoryWithChannels, error) {
|
||||
ret := _m.Called(userID, teamID, newCategory)
|
||||
|
||||
var r0 *model.SidebarCategoryWithChannels
|
||||
if rf, ok := ret.Get(0).(func(string, string, *model.SidebarCategoryWithChannels) *model.SidebarCategoryWithChannels); ok {
|
||||
r0 = rf(userId, teamID, newCategory)
|
||||
r0 = rf(userID, teamID, newCategory)
|
||||
} else {
|
||||
if ret.Get(0) != nil {
|
||||
r0 = ret.Get(0).(*model.SidebarCategoryWithChannels)
|
||||
@@ -235,7 +235,7 @@ func (_m *ChannelStore) CreateSidebarCategory(userId string, teamID string, newC
|
||||
|
||||
var r1 error
|
||||
if rf, ok := ret.Get(1).(func(string, string, *model.SidebarCategoryWithChannels) error); ok {
|
||||
r1 = rf(userId, teamID, newCategory)
|
||||
r1 = rf(userID, teamID, newCategory)
|
||||
} else {
|
||||
r1 = ret.Error(1)
|
||||
}
|
||||
@@ -331,13 +331,13 @@ func (_m *ChannelStore) GetAll(teamID string) ([]*model.Channel, error) {
|
||||
return r0, r1
|
||||
}
|
||||
|
||||
// GetAllChannelMembersForUser provides a mock function with given fields: userId, allowFromCache, includeDeleted
|
||||
func (_m *ChannelStore) GetAllChannelMembersForUser(userId string, allowFromCache bool, includeDeleted bool) (map[string]string, error) {
|
||||
ret := _m.Called(userId, allowFromCache, includeDeleted)
|
||||
// GetAllChannelMembersForUser provides a mock function with given fields: userID, allowFromCache, includeDeleted
|
||||
func (_m *ChannelStore) GetAllChannelMembersForUser(userID string, allowFromCache bool, includeDeleted bool) (map[string]string, error) {
|
||||
ret := _m.Called(userID, allowFromCache, includeDeleted)
|
||||
|
||||
var r0 map[string]string
|
||||
if rf, ok := ret.Get(0).(func(string, bool, bool) map[string]string); ok {
|
||||
r0 = rf(userId, allowFromCache, includeDeleted)
|
||||
r0 = rf(userID, allowFromCache, includeDeleted)
|
||||
} else {
|
||||
if ret.Get(0) != nil {
|
||||
r0 = ret.Get(0).(map[string]string)
|
||||
@@ -346,7 +346,7 @@ func (_m *ChannelStore) GetAllChannelMembersForUser(userId string, allowFromCach
|
||||
|
||||
var r1 error
|
||||
if rf, ok := ret.Get(1).(func(string, bool, bool) error); ok {
|
||||
r1 = rf(userId, allowFromCache, includeDeleted)
|
||||
r1 = rf(userID, allowFromCache, includeDeleted)
|
||||
} else {
|
||||
r1 = ret.Error(1)
|
||||
}
|
||||
@@ -536,13 +536,13 @@ func (_m *ChannelStore) GetByNames(team_id string, names []string, allowFromCach
|
||||
return r0, r1
|
||||
}
|
||||
|
||||
// GetChannelCounts provides a mock function with given fields: teamID, userId
|
||||
func (_m *ChannelStore) GetChannelCounts(teamID string, userId string) (*model.ChannelCounts, error) {
|
||||
ret := _m.Called(teamID, userId)
|
||||
// GetChannelCounts provides a mock function with given fields: teamID, userID
|
||||
func (_m *ChannelStore) GetChannelCounts(teamID string, userID string) (*model.ChannelCounts, error) {
|
||||
ret := _m.Called(teamID, userID)
|
||||
|
||||
var r0 *model.ChannelCounts
|
||||
if rf, ok := ret.Get(0).(func(string, string) *model.ChannelCounts); ok {
|
||||
r0 = rf(teamID, userId)
|
||||
r0 = rf(teamID, userID)
|
||||
} else {
|
||||
if ret.Get(0) != nil {
|
||||
r0 = ret.Get(0).(*model.ChannelCounts)
|
||||
@@ -551,7 +551,7 @@ func (_m *ChannelStore) GetChannelCounts(teamID string, userId string) (*model.C
|
||||
|
||||
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)
|
||||
}
|
||||
@@ -559,13 +559,13 @@ func (_m *ChannelStore) GetChannelCounts(teamID string, userId string) (*model.C
|
||||
return r0, r1
|
||||
}
|
||||
|
||||
// GetChannelMembersForExport provides a mock function with given fields: userId, teamID
|
||||
func (_m *ChannelStore) GetChannelMembersForExport(userId string, teamID string) ([]*model.ChannelMemberForExport, error) {
|
||||
ret := _m.Called(userId, teamID)
|
||||
// GetChannelMembersForExport provides a mock function with given fields: userID, teamID
|
||||
func (_m *ChannelStore) GetChannelMembersForExport(userID string, teamID string) ([]*model.ChannelMemberForExport, error) {
|
||||
ret := _m.Called(userID, teamID)
|
||||
|
||||
var r0 []*model.ChannelMemberForExport
|
||||
if rf, ok := ret.Get(0).(func(string, string) []*model.ChannelMemberForExport); ok {
|
||||
r0 = rf(userId, teamID)
|
||||
r0 = rf(userID, teamID)
|
||||
} else {
|
||||
if ret.Get(0) != nil {
|
||||
r0 = ret.Get(0).([]*model.ChannelMemberForExport)
|
||||
@@ -574,7 +574,7 @@ func (_m *ChannelStore) GetChannelMembersForExport(userId string, teamID string)
|
||||
|
||||
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)
|
||||
}
|
||||
@@ -605,13 +605,13 @@ func (_m *ChannelStore) GetChannelMembersTimezones(channelID string) ([]model.St
|
||||
return r0, r1
|
||||
}
|
||||
|
||||
// GetChannelUnread provides a mock function with given fields: channelID, userId
|
||||
func (_m *ChannelStore) GetChannelUnread(channelID string, userId string) (*model.ChannelUnread, error) {
|
||||
ret := _m.Called(channelID, userId)
|
||||
// GetChannelUnread provides a mock function with given fields: channelID, userID
|
||||
func (_m *ChannelStore) GetChannelUnread(channelID string, userID string) (*model.ChannelUnread, error) {
|
||||
ret := _m.Called(channelID, userID)
|
||||
|
||||
var r0 *model.ChannelUnread
|
||||
if rf, ok := ret.Get(0).(func(string, string) *model.ChannelUnread); ok {
|
||||
r0 = rf(channelID, userId)
|
||||
r0 = rf(channelID, userID)
|
||||
} else {
|
||||
if ret.Get(0) != nil {
|
||||
r0 = ret.Get(0).(*model.ChannelUnread)
|
||||
@@ -620,7 +620,7 @@ func (_m *ChannelStore) GetChannelUnread(channelID string, userId string) (*mode
|
||||
|
||||
var r1 error
|
||||
if rf, ok := ret.Get(1).(func(string, string) error); ok {
|
||||
r1 = rf(channelID, userId)
|
||||
r1 = rf(channelID, userID)
|
||||
} else {
|
||||
r1 = ret.Error(1)
|
||||
}
|
||||
@@ -628,13 +628,13 @@ func (_m *ChannelStore) GetChannelUnread(channelID string, userId string) (*mode
|
||||
return r0, r1
|
||||
}
|
||||
|
||||
// GetChannels provides a mock function with given fields: teamID, userId, includeDeleted, lastDeleteAt
|
||||
func (_m *ChannelStore) GetChannels(teamID string, userId string, includeDeleted bool, lastDeleteAt int) (*model.ChannelList, error) {
|
||||
ret := _m.Called(teamID, userId, includeDeleted, lastDeleteAt)
|
||||
// GetChannels provides a mock function with given fields: teamID, userID, includeDeleted, lastDeleteAt
|
||||
func (_m *ChannelStore) GetChannels(teamID string, userID string, includeDeleted bool, lastDeleteAt int) (*model.ChannelList, error) {
|
||||
ret := _m.Called(teamID, userID, includeDeleted, lastDeleteAt)
|
||||
|
||||
var r0 *model.ChannelList
|
||||
if rf, ok := ret.Get(0).(func(string, string, bool, int) *model.ChannelList); ok {
|
||||
r0 = rf(teamID, userId, includeDeleted, lastDeleteAt)
|
||||
r0 = rf(teamID, userID, includeDeleted, lastDeleteAt)
|
||||
} else {
|
||||
if ret.Get(0) != nil {
|
||||
r0 = ret.Get(0).(*model.ChannelList)
|
||||
@@ -643,7 +643,7 @@ func (_m *ChannelStore) GetChannels(teamID string, userId string, includeDeleted
|
||||
|
||||
var r1 error
|
||||
if rf, ok := ret.Get(1).(func(string, string, bool, int) error); ok {
|
||||
r1 = rf(teamID, userId, includeDeleted, lastDeleteAt)
|
||||
r1 = rf(teamID, userID, includeDeleted, lastDeleteAt)
|
||||
} else {
|
||||
r1 = ret.Error(1)
|
||||
}
|
||||
@@ -720,13 +720,13 @@ func (_m *ChannelStore) GetChannelsByScheme(schemeID string, offset int, limit i
|
||||
return r0, r1
|
||||
}
|
||||
|
||||
// GetDeleted provides a mock function with given fields: team_id, offset, limit, userId
|
||||
func (_m *ChannelStore) GetDeleted(team_id string, offset int, limit int, userId string) (*model.ChannelList, error) {
|
||||
ret := _m.Called(team_id, offset, limit, userId)
|
||||
// GetDeleted provides a mock function with given fields: team_id, offset, limit, userID
|
||||
func (_m *ChannelStore) GetDeleted(team_id string, offset int, limit int, userID string) (*model.ChannelList, error) {
|
||||
ret := _m.Called(team_id, offset, limit, userID)
|
||||
|
||||
var r0 *model.ChannelList
|
||||
if rf, ok := ret.Get(0).(func(string, int, int, string) *model.ChannelList); ok {
|
||||
r0 = rf(team_id, offset, limit, userId)
|
||||
r0 = rf(team_id, offset, limit, userID)
|
||||
} else {
|
||||
if ret.Get(0) != nil {
|
||||
r0 = ret.Get(0).(*model.ChannelList)
|
||||
@@ -735,7 +735,7 @@ func (_m *ChannelStore) GetDeleted(team_id string, offset int, limit int, userId
|
||||
|
||||
var r1 error
|
||||
if rf, ok := ret.Get(1).(func(string, int, int, string) error); ok {
|
||||
r1 = rf(team_id, offset, limit, userId)
|
||||
r1 = rf(team_id, offset, limit, userID)
|
||||
} else {
|
||||
r1 = ret.Error(1)
|
||||
}
|
||||
@@ -833,13 +833,13 @@ func (_m *ChannelStore) GetGuestCount(channelID string, allowFromCache bool) (in
|
||||
return r0, r1
|
||||
}
|
||||
|
||||
// GetMember provides a mock function with given fields: ctx, channelID, userId
|
||||
func (_m *ChannelStore) GetMember(ctx context.Context, channelID string, userId string) (*model.ChannelMember, error) {
|
||||
ret := _m.Called(ctx, channelID, userId)
|
||||
// GetMember provides a mock function with given fields: ctx, channelID, userID
|
||||
func (_m *ChannelStore) GetMember(ctx context.Context, channelID string, userID string) (*model.ChannelMember, error) {
|
||||
ret := _m.Called(ctx, channelID, userID)
|
||||
|
||||
var r0 *model.ChannelMember
|
||||
if rf, ok := ret.Get(0).(func(context.Context, string, string) *model.ChannelMember); ok {
|
||||
r0 = rf(ctx, channelID, userId)
|
||||
r0 = rf(ctx, channelID, userID)
|
||||
} else {
|
||||
if ret.Get(0) != nil {
|
||||
r0 = ret.Get(0).(*model.ChannelMember)
|
||||
@@ -848,7 +848,7 @@ func (_m *ChannelStore) GetMember(ctx context.Context, channelID string, userId
|
||||
|
||||
var r1 error
|
||||
if rf, ok := ret.Get(1).(func(context.Context, string, string) error); ok {
|
||||
r1 = rf(ctx, channelID, userId)
|
||||
r1 = rf(ctx, channelID, userID)
|
||||
} else {
|
||||
r1 = ret.Error(1)
|
||||
}
|
||||
@@ -914,13 +914,13 @@ func (_m *ChannelStore) GetMemberCountsByGroup(ctx context.Context, channelID st
|
||||
return r0, r1
|
||||
}
|
||||
|
||||
// GetMemberForPost provides a mock function with given fields: postID, userId
|
||||
func (_m *ChannelStore) GetMemberForPost(postID string, userId string) (*model.ChannelMember, error) {
|
||||
ret := _m.Called(postID, userId)
|
||||
// GetMemberForPost provides a mock function with given fields: postID, userID
|
||||
func (_m *ChannelStore) GetMemberForPost(postID string, userID string) (*model.ChannelMember, error) {
|
||||
ret := _m.Called(postID, userID)
|
||||
|
||||
var r0 *model.ChannelMember
|
||||
if rf, ok := ret.Get(0).(func(string, string) *model.ChannelMember); ok {
|
||||
r0 = rf(postID, userId)
|
||||
r0 = rf(postID, userID)
|
||||
} else {
|
||||
if ret.Get(0) != nil {
|
||||
r0 = ret.Get(0).(*model.ChannelMember)
|
||||
@@ -929,7 +929,7 @@ func (_m *ChannelStore) GetMemberForPost(postID string, userId string) (*model.C
|
||||
|
||||
var r1 error
|
||||
if rf, ok := ret.Get(1).(func(string, string) error); ok {
|
||||
r1 = rf(postID, userId)
|
||||
r1 = rf(postID, userID)
|
||||
} else {
|
||||
r1 = ret.Error(1)
|
||||
}
|
||||
@@ -960,13 +960,13 @@ func (_m *ChannelStore) GetMembers(channelID string, offset int, limit int) (*mo
|
||||
return r0, r1
|
||||
}
|
||||
|
||||
// GetMembersByChannelIds provides a mock function with given fields: channelIds, userId
|
||||
func (_m *ChannelStore) GetMembersByChannelIds(channelIds []string, userId string) (*model.ChannelMembers, error) {
|
||||
ret := _m.Called(channelIds, userId)
|
||||
// GetMembersByChannelIds provides a mock function with given fields: channelIds, userID
|
||||
func (_m *ChannelStore) GetMembersByChannelIds(channelIds []string, userID string) (*model.ChannelMembers, error) {
|
||||
ret := _m.Called(channelIds, userID)
|
||||
|
||||
var r0 *model.ChannelMembers
|
||||
if rf, ok := ret.Get(0).(func([]string, string) *model.ChannelMembers); ok {
|
||||
r0 = rf(channelIds, userId)
|
||||
r0 = rf(channelIds, userID)
|
||||
} else {
|
||||
if ret.Get(0) != nil {
|
||||
r0 = ret.Get(0).(*model.ChannelMembers)
|
||||
@@ -975,7 +975,7 @@ func (_m *ChannelStore) GetMembersByChannelIds(channelIds []string, userId strin
|
||||
|
||||
var r1 error
|
||||
if rf, ok := ret.Get(1).(func([]string, string) error); ok {
|
||||
r1 = rf(channelIds, userId)
|
||||
r1 = rf(channelIds, userID)
|
||||
} else {
|
||||
r1 = ret.Error(1)
|
||||
}
|
||||
@@ -1006,13 +1006,13 @@ func (_m *ChannelStore) GetMembersByIds(channelID string, userIds []string) (*mo
|
||||
return r0, r1
|
||||
}
|
||||
|
||||
// GetMembersForUser provides a mock function with given fields: teamID, userId
|
||||
func (_m *ChannelStore) GetMembersForUser(teamID string, userId string) (*model.ChannelMembers, error) {
|
||||
ret := _m.Called(teamID, userId)
|
||||
// GetMembersForUser provides a mock function with given fields: teamID, userID
|
||||
func (_m *ChannelStore) GetMembersForUser(teamID string, userID string) (*model.ChannelMembers, error) {
|
||||
ret := _m.Called(teamID, userID)
|
||||
|
||||
var r0 *model.ChannelMembers
|
||||
if rf, ok := ret.Get(0).(func(string, string) *model.ChannelMembers); ok {
|
||||
r0 = rf(teamID, userId)
|
||||
r0 = rf(teamID, userID)
|
||||
} else {
|
||||
if ret.Get(0) != nil {
|
||||
r0 = ret.Get(0).(*model.ChannelMembers)
|
||||
@@ -1021,7 +1021,7 @@ func (_m *ChannelStore) GetMembersForUser(teamID string, userId string) (*model.
|
||||
|
||||
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)
|
||||
}
|
||||
@@ -1029,13 +1029,13 @@ func (_m *ChannelStore) GetMembersForUser(teamID string, userId string) (*model.
|
||||
return r0, r1
|
||||
}
|
||||
|
||||
// GetMembersForUserWithPagination provides a mock function with given fields: teamID, userId, page, perPage
|
||||
func (_m *ChannelStore) GetMembersForUserWithPagination(teamID string, userId string, page int, perPage int) (*model.ChannelMembers, error) {
|
||||
ret := _m.Called(teamID, userId, page, perPage)
|
||||
// GetMembersForUserWithPagination provides a mock function with given fields: teamID, userID, page, perPage
|
||||
func (_m *ChannelStore) GetMembersForUserWithPagination(teamID string, userID string, page int, perPage int) (*model.ChannelMembers, error) {
|
||||
ret := _m.Called(teamID, userID, page, perPage)
|
||||
|
||||
var r0 *model.ChannelMembers
|
||||
if rf, ok := ret.Get(0).(func(string, string, int, int) *model.ChannelMembers); ok {
|
||||
r0 = rf(teamID, userId, page, perPage)
|
||||
r0 = rf(teamID, userID, page, perPage)
|
||||
} else {
|
||||
if ret.Get(0) != nil {
|
||||
r0 = ret.Get(0).(*model.ChannelMembers)
|
||||
@@ -1044,7 +1044,7 @@ func (_m *ChannelStore) GetMembersForUserWithPagination(teamID string, userId st
|
||||
|
||||
var r1 error
|
||||
if rf, ok := ret.Get(1).(func(string, string, int, int) error); ok {
|
||||
r1 = rf(teamID, userId, page, perPage)
|
||||
r1 = rf(teamID, userID, page, perPage)
|
||||
} else {
|
||||
r1 = ret.Error(1)
|
||||
}
|
||||
@@ -1052,13 +1052,13 @@ func (_m *ChannelStore) GetMembersForUserWithPagination(teamID string, userId st
|
||||
return r0, r1
|
||||
}
|
||||
|
||||
// GetMoreChannels provides a mock function with given fields: teamID, userId, offset, limit
|
||||
func (_m *ChannelStore) GetMoreChannels(teamID string, userId string, offset int, limit int) (*model.ChannelList, error) {
|
||||
ret := _m.Called(teamID, userId, offset, limit)
|
||||
// GetMoreChannels provides a mock function with given fields: teamID, userID, offset, limit
|
||||
func (_m *ChannelStore) GetMoreChannels(teamID string, userID string, offset int, limit int) (*model.ChannelList, error) {
|
||||
ret := _m.Called(teamID, userID, offset, limit)
|
||||
|
||||
var r0 *model.ChannelList
|
||||
if rf, ok := ret.Get(0).(func(string, string, int, int) *model.ChannelList); ok {
|
||||
r0 = rf(teamID, userId, offset, limit)
|
||||
r0 = rf(teamID, userID, offset, limit)
|
||||
} else {
|
||||
if ret.Get(0) != nil {
|
||||
r0 = ret.Get(0).(*model.ChannelList)
|
||||
@@ -1067,7 +1067,7 @@ func (_m *ChannelStore) GetMoreChannels(teamID string, userId string, offset int
|
||||
|
||||
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)
|
||||
}
|
||||
@@ -1188,13 +1188,13 @@ func (_m *ChannelStore) GetPublicChannelsForTeam(teamID string, offset int, limi
|
||||
return r0, r1
|
||||
}
|
||||
|
||||
// GetSidebarCategories provides a mock function with given fields: userId, teamID
|
||||
func (_m *ChannelStore) GetSidebarCategories(userId string, teamID string) (*model.OrderedSidebarCategories, error) {
|
||||
ret := _m.Called(userId, teamID)
|
||||
// GetSidebarCategories provides a mock function with given fields: userID, teamID
|
||||
func (_m *ChannelStore) GetSidebarCategories(userID string, teamID string) (*model.OrderedSidebarCategories, error) {
|
||||
ret := _m.Called(userID, teamID)
|
||||
|
||||
var r0 *model.OrderedSidebarCategories
|
||||
if rf, ok := ret.Get(0).(func(string, string) *model.OrderedSidebarCategories); ok {
|
||||
r0 = rf(userId, teamID)
|
||||
r0 = rf(userID, teamID)
|
||||
} else {
|
||||
if ret.Get(0) != nil {
|
||||
r0 = ret.Get(0).(*model.OrderedSidebarCategories)
|
||||
@@ -1203,7 +1203,7 @@ func (_m *ChannelStore) GetSidebarCategories(userId string, teamID string) (*mod
|
||||
|
||||
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)
|
||||
}
|
||||
@@ -1234,13 +1234,13 @@ func (_m *ChannelStore) GetSidebarCategory(categoryID string) (*model.SidebarCat
|
||||
return r0, r1
|
||||
}
|
||||
|
||||
// GetSidebarCategoryOrder provides a mock function with given fields: userId, teamID
|
||||
func (_m *ChannelStore) GetSidebarCategoryOrder(userId string, teamID string) ([]string, error) {
|
||||
ret := _m.Called(userId, teamID)
|
||||
// GetSidebarCategoryOrder provides a mock function with given fields: userID, teamID
|
||||
func (_m *ChannelStore) GetSidebarCategoryOrder(userID string, teamID string) ([]string, error) {
|
||||
ret := _m.Called(userID, teamID)
|
||||
|
||||
var r0 []string
|
||||
if rf, ok := ret.Get(0).(func(string, string) []string); ok {
|
||||
r0 = rf(userId, teamID)
|
||||
r0 = rf(userID, teamID)
|
||||
} else {
|
||||
if ret.Get(0) != nil {
|
||||
r0 = ret.Get(0).([]string)
|
||||
@@ -1249,7 +1249,7 @@ func (_m *ChannelStore) GetSidebarCategoryOrder(userId string, teamID string) ([
|
||||
|
||||
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)
|
||||
}
|
||||
@@ -1324,13 +1324,13 @@ func (_m *ChannelStore) GroupSyncedChannelCount() (int64, error) {
|
||||
return r0, r1
|
||||
}
|
||||
|
||||
// IncrementMentionCount provides a mock function with given fields: channelID, userId, updateThreads, isRoot
|
||||
func (_m *ChannelStore) IncrementMentionCount(channelID string, userId string, updateThreads bool, isRoot bool) error {
|
||||
ret := _m.Called(channelID, userId, updateThreads, isRoot)
|
||||
// IncrementMentionCount provides a mock function with given fields: channelID, userID, updateThreads, isRoot
|
||||
func (_m *ChannelStore) IncrementMentionCount(channelID string, userID string, updateThreads bool, isRoot bool) error {
|
||||
ret := _m.Called(channelID, userID, updateThreads, isRoot)
|
||||
|
||||
var r0 error
|
||||
if rf, ok := ret.Get(0).(func(string, string, bool, bool) error); ok {
|
||||
r0 = rf(channelID, userId, updateThreads, isRoot)
|
||||
r0 = rf(channelID, userID, updateThreads, isRoot)
|
||||
} else {
|
||||
r0 = ret.Error(0)
|
||||
}
|
||||
@@ -1338,9 +1338,9 @@ func (_m *ChannelStore) IncrementMentionCount(channelID string, userId string, u
|
||||
return r0
|
||||
}
|
||||
|
||||
// InvalidateAllChannelMembersForUser provides a mock function with given fields: userId
|
||||
func (_m *ChannelStore) InvalidateAllChannelMembersForUser(userId string) {
|
||||
_m.Called(userId)
|
||||
// InvalidateAllChannelMembersForUser provides a mock function with given fields: userID
|
||||
func (_m *ChannelStore) InvalidateAllChannelMembersForUser(userID string) {
|
||||
_m.Called(userID)
|
||||
}
|
||||
|
||||
// InvalidateCacheForChannelMembersNotifyProps provides a mock function with given fields: channelID
|
||||
@@ -1373,13 +1373,13 @@ func (_m *ChannelStore) InvalidatePinnedPostCount(channelID string) {
|
||||
_m.Called(channelID)
|
||||
}
|
||||
|
||||
// IsUserInChannelUseCache provides a mock function with given fields: userId, channelID
|
||||
func (_m *ChannelStore) IsUserInChannelUseCache(userId string, channelID string) bool {
|
||||
ret := _m.Called(userId, channelID)
|
||||
// IsUserInChannelUseCache provides a mock function with given fields: userID, channelID
|
||||
func (_m *ChannelStore) IsUserInChannelUseCache(userID string, channelID string) bool {
|
||||
ret := _m.Called(userID, channelID)
|
||||
|
||||
var r0 bool
|
||||
if rf, ok := ret.Get(0).(func(string, string) bool); ok {
|
||||
r0 = rf(userId, channelID)
|
||||
r0 = rf(userID, channelID)
|
||||
} else {
|
||||
r0 = ret.Get(0).(bool)
|
||||
}
|
||||
@@ -1387,13 +1387,13 @@ func (_m *ChannelStore) IsUserInChannelUseCache(userId string, channelID string)
|
||||
return r0
|
||||
}
|
||||
|
||||
// MigrateChannelMembers provides a mock function with given fields: fromChannelId, fromUserId
|
||||
func (_m *ChannelStore) MigrateChannelMembers(fromChannelId string, fromUserId string) (map[string]string, error) {
|
||||
ret := _m.Called(fromChannelId, fromUserId)
|
||||
// MigrateChannelMembers provides a mock function with given fields: fromChannelID, fromUserID
|
||||
func (_m *ChannelStore) MigrateChannelMembers(fromChannelID string, fromUserID string) (map[string]string, error) {
|
||||
ret := _m.Called(fromChannelID, fromUserID)
|
||||
|
||||
var r0 map[string]string
|
||||
if rf, ok := ret.Get(0).(func(string, string) map[string]string); ok {
|
||||
r0 = rf(fromChannelId, fromUserId)
|
||||
r0 = rf(fromChannelID, fromUserID)
|
||||
} else {
|
||||
if ret.Get(0) != nil {
|
||||
r0 = ret.Get(0).(map[string]string)
|
||||
@@ -1402,7 +1402,7 @@ func (_m *ChannelStore) MigrateChannelMembers(fromChannelId string, fromUserId s
|
||||
|
||||
var r1 error
|
||||
if rf, ok := ret.Get(1).(func(string, string) error); ok {
|
||||
r1 = rf(fromChannelId, fromUserId)
|
||||
r1 = rf(fromChannelID, fromUserID)
|
||||
} else {
|
||||
r1 = ret.Error(1)
|
||||
}
|
||||
@@ -1466,13 +1466,13 @@ func (_m *ChannelStore) PermanentDeleteMembersByChannel(channelID string) error
|
||||
return r0
|
||||
}
|
||||
|
||||
// PermanentDeleteMembersByUser provides a mock function with given fields: userId
|
||||
func (_m *ChannelStore) PermanentDeleteMembersByUser(userId string) error {
|
||||
ret := _m.Called(userId)
|
||||
// PermanentDeleteMembersByUser provides a mock function with given fields: userID
|
||||
func (_m *ChannelStore) PermanentDeleteMembersByUser(userID string) error {
|
||||
ret := _m.Called(userID)
|
||||
|
||||
var r0 error
|
||||
if rf, ok := ret.Get(0).(func(string) error); ok {
|
||||
r0 = rf(userId)
|
||||
r0 = rf(userID)
|
||||
} else {
|
||||
r0 = ret.Error(0)
|
||||
}
|
||||
@@ -1494,13 +1494,13 @@ func (_m *ChannelStore) RemoveAllDeactivatedMembers(channelID string) error {
|
||||
return r0
|
||||
}
|
||||
|
||||
// RemoveMember provides a mock function with given fields: channelID, userId
|
||||
func (_m *ChannelStore) RemoveMember(channelID string, userId string) error {
|
||||
ret := _m.Called(channelID, userId)
|
||||
// RemoveMember provides a mock function with given fields: channelID, userID
|
||||
func (_m *ChannelStore) RemoveMember(channelID string, userID string) error {
|
||||
ret := _m.Called(channelID, userID)
|
||||
|
||||
var r0 error
|
||||
if rf, ok := ret.Get(0).(func(string, string) error); ok {
|
||||
r0 = rf(channelID, userId)
|
||||
r0 = rf(channelID, userID)
|
||||
} else {
|
||||
r0 = ret.Error(0)
|
||||
}
|
||||
@@ -1672,13 +1672,13 @@ func (_m *ChannelStore) SearchAllChannels(term string, opts store.ChannelSearchO
|
||||
return r0, r1, r2
|
||||
}
|
||||
|
||||
// SearchArchivedInTeam provides a mock function with given fields: teamID, term, userId
|
||||
func (_m *ChannelStore) SearchArchivedInTeam(teamID string, term string, userId string) (*model.ChannelList, error) {
|
||||
ret := _m.Called(teamID, term, userId)
|
||||
// SearchArchivedInTeam provides a mock function with given fields: teamID, term, userID
|
||||
func (_m *ChannelStore) SearchArchivedInTeam(teamID string, term string, userID string) (*model.ChannelList, error) {
|
||||
ret := _m.Called(teamID, term, userID)
|
||||
|
||||
var r0 *model.ChannelList
|
||||
if rf, ok := ret.Get(0).(func(string, string, string) *model.ChannelList); ok {
|
||||
r0 = rf(teamID, term, userId)
|
||||
r0 = rf(teamID, term, userID)
|
||||
} else {
|
||||
if ret.Get(0) != nil {
|
||||
r0 = ret.Get(0).(*model.ChannelList)
|
||||
@@ -1687,7 +1687,7 @@ func (_m *ChannelStore) SearchArchivedInTeam(teamID string, term string, userId
|
||||
|
||||
var r1 error
|
||||
if rf, ok := ret.Get(1).(func(string, string, string) error); ok {
|
||||
r1 = rf(teamID, term, userId)
|
||||
r1 = rf(teamID, term, userID)
|
||||
} else {
|
||||
r1 = ret.Error(1)
|
||||
}
|
||||
@@ -1695,13 +1695,13 @@ func (_m *ChannelStore) SearchArchivedInTeam(teamID string, term string, userId
|
||||
return r0, r1
|
||||
}
|
||||
|
||||
// SearchForUserInTeam provides a mock function with given fields: userId, teamID, term, includeDeleted
|
||||
func (_m *ChannelStore) SearchForUserInTeam(userId string, teamID string, term string, includeDeleted bool) (*model.ChannelList, error) {
|
||||
ret := _m.Called(userId, teamID, term, includeDeleted)
|
||||
// SearchForUserInTeam provides a mock function with given fields: userID, teamID, term, includeDeleted
|
||||
func (_m *ChannelStore) SearchForUserInTeam(userID string, teamID string, term string, includeDeleted bool) (*model.ChannelList, error) {
|
||||
ret := _m.Called(userID, teamID, term, includeDeleted)
|
||||
|
||||
var r0 *model.ChannelList
|
||||
if rf, ok := ret.Get(0).(func(string, string, string, bool) *model.ChannelList); ok {
|
||||
r0 = rf(userId, teamID, term, includeDeleted)
|
||||
r0 = rf(userID, teamID, term, includeDeleted)
|
||||
} else {
|
||||
if ret.Get(0) != nil {
|
||||
r0 = ret.Get(0).(*model.ChannelList)
|
||||
@@ -1710,7 +1710,7 @@ func (_m *ChannelStore) SearchForUserInTeam(userId string, teamID string, term s
|
||||
|
||||
var r1 error
|
||||
if rf, ok := ret.Get(1).(func(string, string, string, bool) error); ok {
|
||||
r1 = rf(userId, teamID, term, includeDeleted)
|
||||
r1 = rf(userID, teamID, term, includeDeleted)
|
||||
} else {
|
||||
r1 = ret.Error(1)
|
||||
}
|
||||
@@ -1718,13 +1718,13 @@ func (_m *ChannelStore) SearchForUserInTeam(userId string, teamID string, term s
|
||||
return r0, r1
|
||||
}
|
||||
|
||||
// SearchGroupChannels provides a mock function with given fields: userId, term
|
||||
func (_m *ChannelStore) SearchGroupChannels(userId string, term string) (*model.ChannelList, error) {
|
||||
ret := _m.Called(userId, term)
|
||||
// SearchGroupChannels provides a mock function with given fields: userID, term
|
||||
func (_m *ChannelStore) SearchGroupChannels(userID string, term string) (*model.ChannelList, error) {
|
||||
ret := _m.Called(userID, term)
|
||||
|
||||
var r0 *model.ChannelList
|
||||
if rf, ok := ret.Get(0).(func(string, string) *model.ChannelList); ok {
|
||||
r0 = rf(userId, term)
|
||||
r0 = rf(userID, term)
|
||||
} else {
|
||||
if ret.Get(0) != nil {
|
||||
r0 = ret.Get(0).(*model.ChannelList)
|
||||
@@ -1733,7 +1733,7 @@ func (_m *ChannelStore) SearchGroupChannels(userId string, term string) (*model.
|
||||
|
||||
var r1 error
|
||||
if rf, ok := ret.Get(1).(func(string, string) error); ok {
|
||||
r1 = rf(userId, term)
|
||||
r1 = rf(userID, term)
|
||||
} else {
|
||||
r1 = ret.Error(1)
|
||||
}
|
||||
@@ -1764,13 +1764,13 @@ func (_m *ChannelStore) SearchInTeam(teamID string, term string, includeDeleted
|
||||
return r0, r1
|
||||
}
|
||||
|
||||
// SearchMore provides a mock function with given fields: userId, teamID, term
|
||||
func (_m *ChannelStore) SearchMore(userId string, teamID string, term string) (*model.ChannelList, error) {
|
||||
ret := _m.Called(userId, teamID, term)
|
||||
// SearchMore provides a mock function with given fields: userID, teamID, term
|
||||
func (_m *ChannelStore) SearchMore(userID string, teamID string, term string) (*model.ChannelList, error) {
|
||||
ret := _m.Called(userID, teamID, term)
|
||||
|
||||
var r0 *model.ChannelList
|
||||
if rf, ok := ret.Get(0).(func(string, string, string) *model.ChannelList); ok {
|
||||
r0 = rf(userId, teamID, term)
|
||||
r0 = rf(userID, teamID, term)
|
||||
} else {
|
||||
if ret.Get(0) != nil {
|
||||
r0 = ret.Get(0).(*model.ChannelList)
|
||||
@@ -1779,7 +1779,7 @@ func (_m *ChannelStore) SearchMore(userId string, teamID string, term string) (*
|
||||
|
||||
var r1 error
|
||||
if rf, ok := ret.Get(1).(func(string, string, string) error); ok {
|
||||
r1 = rf(userId, teamID, term)
|
||||
r1 = rf(userID, teamID, term)
|
||||
} else {
|
||||
r1 = ret.Error(1)
|
||||
}
|
||||
@@ -1838,13 +1838,13 @@ func (_m *ChannelStore) Update(channel *model.Channel) (*model.Channel, error) {
|
||||
return r0, r1
|
||||
}
|
||||
|
||||
// UpdateLastViewedAt provides a mock function with given fields: channelIds, userId, updateThreads
|
||||
func (_m *ChannelStore) UpdateLastViewedAt(channelIds []string, userId string, updateThreads bool) (map[string]int64, error) {
|
||||
ret := _m.Called(channelIds, userId, updateThreads)
|
||||
// UpdateLastViewedAt provides a mock function with given fields: channelIds, userID, updateThreads
|
||||
func (_m *ChannelStore) UpdateLastViewedAt(channelIds []string, userID string, updateThreads bool) (map[string]int64, error) {
|
||||
ret := _m.Called(channelIds, userID, updateThreads)
|
||||
|
||||
var r0 map[string]int64
|
||||
if rf, ok := ret.Get(0).(func([]string, string, bool) map[string]int64); ok {
|
||||
r0 = rf(channelIds, userId, updateThreads)
|
||||
r0 = rf(channelIds, userID, updateThreads)
|
||||
} else {
|
||||
if ret.Get(0) != nil {
|
||||
r0 = ret.Get(0).(map[string]int64)
|
||||
@@ -1853,7 +1853,7 @@ func (_m *ChannelStore) UpdateLastViewedAt(channelIds []string, userId string, u
|
||||
|
||||
var r1 error
|
||||
if rf, ok := ret.Get(1).(func([]string, string, bool) error); ok {
|
||||
r1 = rf(channelIds, userId, updateThreads)
|
||||
r1 = rf(channelIds, userID, updateThreads)
|
||||
} else {
|
||||
r1 = ret.Error(1)
|
||||
}
|
||||
@@ -1944,13 +1944,13 @@ func (_m *ChannelStore) UpdateMultipleMembers(members []*model.ChannelMember) ([
|
||||
return r0, r1
|
||||
}
|
||||
|
||||
// UpdateSidebarCategories provides a mock function with given fields: userId, teamID, categories
|
||||
func (_m *ChannelStore) UpdateSidebarCategories(userId string, teamID string, categories []*model.SidebarCategoryWithChannels) ([]*model.SidebarCategoryWithChannels, []*model.SidebarCategoryWithChannels, error) {
|
||||
ret := _m.Called(userId, teamID, categories)
|
||||
// UpdateSidebarCategories provides a mock function with given fields: userID, teamID, categories
|
||||
func (_m *ChannelStore) UpdateSidebarCategories(userID string, teamID string, categories []*model.SidebarCategoryWithChannels) ([]*model.SidebarCategoryWithChannels, []*model.SidebarCategoryWithChannels, error) {
|
||||
ret := _m.Called(userID, teamID, categories)
|
||||
|
||||
var r0 []*model.SidebarCategoryWithChannels
|
||||
if rf, ok := ret.Get(0).(func(string, string, []*model.SidebarCategoryWithChannels) []*model.SidebarCategoryWithChannels); ok {
|
||||
r0 = rf(userId, teamID, categories)
|
||||
r0 = rf(userID, teamID, categories)
|
||||
} else {
|
||||
if ret.Get(0) != nil {
|
||||
r0 = ret.Get(0).([]*model.SidebarCategoryWithChannels)
|
||||
@@ -1959,7 +1959,7 @@ func (_m *ChannelStore) UpdateSidebarCategories(userId string, teamID string, ca
|
||||
|
||||
var r1 []*model.SidebarCategoryWithChannels
|
||||
if rf, ok := ret.Get(1).(func(string, string, []*model.SidebarCategoryWithChannels) []*model.SidebarCategoryWithChannels); ok {
|
||||
r1 = rf(userId, teamID, categories)
|
||||
r1 = rf(userID, teamID, categories)
|
||||
} else {
|
||||
if ret.Get(1) != nil {
|
||||
r1 = ret.Get(1).([]*model.SidebarCategoryWithChannels)
|
||||
@@ -1968,7 +1968,7 @@ func (_m *ChannelStore) UpdateSidebarCategories(userId string, teamID string, ca
|
||||
|
||||
var r2 error
|
||||
if rf, ok := ret.Get(2).(func(string, string, []*model.SidebarCategoryWithChannels) error); ok {
|
||||
r2 = rf(userId, teamID, categories)
|
||||
r2 = rf(userID, teamID, categories)
|
||||
} else {
|
||||
r2 = ret.Error(2)
|
||||
}
|
||||
@@ -1976,13 +1976,13 @@ func (_m *ChannelStore) UpdateSidebarCategories(userId string, teamID string, ca
|
||||
return r0, r1, r2
|
||||
}
|
||||
|
||||
// UpdateSidebarCategoryOrder provides a mock function with given fields: userId, teamID, categoryOrder
|
||||
func (_m *ChannelStore) UpdateSidebarCategoryOrder(userId string, teamID string, categoryOrder []string) error {
|
||||
ret := _m.Called(userId, teamID, categoryOrder)
|
||||
// UpdateSidebarCategoryOrder provides a mock function with given fields: userID, teamID, categoryOrder
|
||||
func (_m *ChannelStore) UpdateSidebarCategoryOrder(userID string, teamID string, categoryOrder []string) error {
|
||||
ret := _m.Called(userID, teamID, categoryOrder)
|
||||
|
||||
var r0 error
|
||||
if rf, ok := ret.Get(0).(func(string, string, []string) error); ok {
|
||||
r0 = rf(userId, teamID, categoryOrder)
|
||||
r0 = rf(userID, teamID, categoryOrder)
|
||||
} else {
|
||||
r0 = ret.Error(0)
|
||||
}
|
||||
@@ -2018,20 +2018,20 @@ func (_m *ChannelStore) UpdateSidebarChannelsByPreferences(preferences *model.Pr
|
||||
return r0
|
||||
}
|
||||
|
||||
// UserBelongsToChannels provides a mock function with given fields: userId, channelIds
|
||||
func (_m *ChannelStore) UserBelongsToChannels(userId string, channelIds []string) (bool, error) {
|
||||
ret := _m.Called(userId, channelIds)
|
||||
// UserBelongsToChannels provides a mock function with given fields: userID, channelIds
|
||||
func (_m *ChannelStore) UserBelongsToChannels(userID string, channelIds []string) (bool, error) {
|
||||
ret := _m.Called(userID, channelIds)
|
||||
|
||||
var r0 bool
|
||||
if rf, ok := ret.Get(0).(func(string, []string) bool); ok {
|
||||
r0 = rf(userId, channelIds)
|
||||
r0 = rf(userID, channelIds)
|
||||
} else {
|
||||
r0 = ret.Get(0).(bool)
|
||||
}
|
||||
|
||||
var r1 error
|
||||
if rf, ok := ret.Get(1).(func(string, []string) error); ok {
|
||||
r1 = rf(userId, channelIds)
|
||||
r1 = rf(userID, channelIds)
|
||||
} else {
|
||||
r1 = ret.Error(1)
|
||||
}
|
||||
|
||||
@@ -132,13 +132,13 @@ func (_m *CommandStore) PermanentDeleteByTeam(teamID string) error {
|
||||
return r0
|
||||
}
|
||||
|
||||
// PermanentDeleteByUser provides a mock function with given fields: userId
|
||||
func (_m *CommandStore) PermanentDeleteByUser(userId string) error {
|
||||
ret := _m.Called(userId)
|
||||
// PermanentDeleteByUser provides a mock function with given fields: userID
|
||||
func (_m *CommandStore) PermanentDeleteByUser(userID string) error {
|
||||
ret := _m.Called(userID)
|
||||
|
||||
var r0 error
|
||||
if rf, ok := ret.Get(0).(func(string) error); ok {
|
||||
r0 = rf(userId)
|
||||
r0 = rf(userID)
|
||||
} 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)
|
||||
}
|
||||
@@ -190,13 +190,13 @@ func (_m *FileInfoStore) GetForPost(postID string, readFromMaster bool, includeD
|
||||
return r0, r1
|
||||
}
|
||||
|
||||
// GetForUser provides a mock function with given fields: userId
|
||||
func (_m *FileInfoStore) GetForUser(userId string) ([]*model.FileInfo, error) {
|
||||
ret := _m.Called(userId)
|
||||
// GetForUser provides a mock function with given fields: userID
|
||||
func (_m *FileInfoStore) GetForUser(userID string) ([]*model.FileInfo, error) {
|
||||
ret := _m.Called(userID)
|
||||
|
||||
var r0 []*model.FileInfo
|
||||
if rf, ok := ret.Get(0).(func(string) []*model.FileInfo); ok {
|
||||
r0 = rf(userId)
|
||||
r0 = rf(userID)
|
||||
} else {
|
||||
if ret.Get(0) != nil {
|
||||
r0 = ret.Get(0).([]*model.FileInfo)
|
||||
@@ -205,7 +205,7 @@ func (_m *FileInfoStore) GetForUser(userId string) ([]*model.FileInfo, error) {
|
||||
|
||||
var r1 error
|
||||
if rf, ok := ret.Get(1).(func(string) error); ok {
|
||||
r1 = rf(userId)
|
||||
r1 = rf(userID)
|
||||
} else {
|
||||
r1 = ret.Error(1)
|
||||
}
|
||||
@@ -276,20 +276,20 @@ func (_m *FileInfoStore) PermanentDeleteBatch(endTime int64, limit int64) (int64
|
||||
return r0, r1
|
||||
}
|
||||
|
||||
// PermanentDeleteByUser provides a mock function with given fields: userId
|
||||
func (_m *FileInfoStore) PermanentDeleteByUser(userId string) (int64, error) {
|
||||
ret := _m.Called(userId)
|
||||
// PermanentDeleteByUser provides a mock function with given fields: userID
|
||||
func (_m *FileInfoStore) PermanentDeleteByUser(userID string) (int64, error) {
|
||||
ret := _m.Called(userID)
|
||||
|
||||
var r0 int64
|
||||
if rf, ok := ret.Get(0).(func(string) int64); ok {
|
||||
r0 = rf(userId)
|
||||
r0 = rf(userID)
|
||||
} else {
|
||||
r0 = ret.Get(0).(int64)
|
||||
}
|
||||
|
||||
var r1 error
|
||||
if rf, ok := ret.Get(1).(func(string) error); ok {
|
||||
r1 = rf(userId)
|
||||
r1 = rf(userID)
|
||||
} else {
|
||||
r1 = ret.Error(1)
|
||||
}
|
||||
@@ -320,13 +320,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)
|
||||
@@ -335,7 +335,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)
|
||||
}
|
||||
|
||||
@@ -464,13 +464,13 @@ func (_m *GroupStore) GetByRemoteID(remoteID string, groupSource model.GroupSour
|
||||
return r0, r1
|
||||
}
|
||||
|
||||
// GetByUser provides a mock function with given fields: userId
|
||||
func (_m *GroupStore) GetByUser(userId string) ([]*model.Group, error) {
|
||||
ret := _m.Called(userId)
|
||||
// GetByUser provides a mock function with given fields: userID
|
||||
func (_m *GroupStore) GetByUser(userID string) ([]*model.Group, error) {
|
||||
ret := _m.Called(userID)
|
||||
|
||||
var r0 []*model.Group
|
||||
if rf, ok := ret.Get(0).(func(string) []*model.Group); ok {
|
||||
r0 = rf(userId)
|
||||
r0 = rf(userID)
|
||||
} else {
|
||||
if ret.Get(0) != nil {
|
||||
r0 = ret.Get(0).([]*model.Group)
|
||||
@@ -479,7 +479,7 @@ func (_m *GroupStore) GetByUser(userId string) ([]*model.Group, error) {
|
||||
|
||||
var r1 error
|
||||
if rf, ok := ret.Get(1).(func(string) error); ok {
|
||||
r1 = rf(userId)
|
||||
r1 = rf(userID)
|
||||
} else {
|
||||
r1 = ret.Error(1)
|
||||
}
|
||||
@@ -820,13 +820,13 @@ func (_m *GroupStore) GroupTeamCount() (int64, error) {
|
||||
return r0, r1
|
||||
}
|
||||
|
||||
// PermanentDeleteMembersByUser provides a mock function with given fields: userId
|
||||
func (_m *GroupStore) PermanentDeleteMembersByUser(userId string) error {
|
||||
ret := _m.Called(userId)
|
||||
// PermanentDeleteMembersByUser provides a mock function with given fields: userID
|
||||
func (_m *GroupStore) PermanentDeleteMembersByUser(userID string) error {
|
||||
ret := _m.Called(userID)
|
||||
|
||||
var r0 error
|
||||
if rf, ok := ret.Get(0).(func(string) error); ok {
|
||||
r0 = rf(userId)
|
||||
r0 = rf(userID)
|
||||
} else {
|
||||
r0 = ret.Error(0)
|
||||
}
|
||||
|
||||
@@ -74,13 +74,13 @@ func (_m *OAuthStore) GetAccessDataByRefreshToken(token string) (*model.AccessDa
|
||||
return r0, r1
|
||||
}
|
||||
|
||||
// GetAccessDataByUserForApp provides a mock function with given fields: userId, clientId
|
||||
func (_m *OAuthStore) GetAccessDataByUserForApp(userId string, clientId string) ([]*model.AccessData, error) {
|
||||
ret := _m.Called(userId, clientId)
|
||||
// GetAccessDataByUserForApp provides a mock function with given fields: userID, clientId
|
||||
func (_m *OAuthStore) GetAccessDataByUserForApp(userID string, clientId string) ([]*model.AccessData, error) {
|
||||
ret := _m.Called(userID, clientId)
|
||||
|
||||
var r0 []*model.AccessData
|
||||
if rf, ok := ret.Get(0).(func(string, string) []*model.AccessData); ok {
|
||||
r0 = rf(userId, clientId)
|
||||
r0 = rf(userID, clientId)
|
||||
} else {
|
||||
if ret.Get(0) != nil {
|
||||
r0 = ret.Get(0).([]*model.AccessData)
|
||||
@@ -89,7 +89,7 @@ func (_m *OAuthStore) GetAccessDataByUserForApp(userId string, clientId string)
|
||||
|
||||
var r1 error
|
||||
if rf, ok := ret.Get(1).(func(string, string) error); ok {
|
||||
r1 = rf(userId, clientId)
|
||||
r1 = rf(userID, clientId)
|
||||
} else {
|
||||
r1 = ret.Error(1)
|
||||
}
|
||||
@@ -120,13 +120,13 @@ func (_m *OAuthStore) GetApp(id string) (*model.OAuthApp, error) {
|
||||
return r0, r1
|
||||
}
|
||||
|
||||
// GetAppByUser provides a mock function with given fields: userId, offset, limit
|
||||
func (_m *OAuthStore) GetAppByUser(userId string, offset int, limit int) ([]*model.OAuthApp, error) {
|
||||
ret := _m.Called(userId, offset, limit)
|
||||
// GetAppByUser provides a mock function with given fields: userID, offset, limit
|
||||
func (_m *OAuthStore) GetAppByUser(userID string, offset int, limit int) ([]*model.OAuthApp, error) {
|
||||
ret := _m.Called(userID, offset, limit)
|
||||
|
||||
var r0 []*model.OAuthApp
|
||||
if rf, ok := ret.Get(0).(func(string, int, int) []*model.OAuthApp); ok {
|
||||
r0 = rf(userId, offset, limit)
|
||||
r0 = rf(userID, offset, limit)
|
||||
} else {
|
||||
if ret.Get(0) != nil {
|
||||
r0 = ret.Get(0).([]*model.OAuthApp)
|
||||
@@ -135,7 +135,7 @@ func (_m *OAuthStore) GetAppByUser(userId string, offset int, limit int) ([]*mod
|
||||
|
||||
var r1 error
|
||||
if rf, ok := ret.Get(1).(func(string, int, int) error); ok {
|
||||
r1 = rf(userId, offset, limit)
|
||||
r1 = rf(userID, offset, limit)
|
||||
} else {
|
||||
r1 = ret.Error(1)
|
||||
}
|
||||
@@ -189,13 +189,13 @@ func (_m *OAuthStore) GetAuthData(code string) (*model.AuthData, error) {
|
||||
return r0, r1
|
||||
}
|
||||
|
||||
// GetAuthorizedApps provides a mock function with given fields: userId, offset, limit
|
||||
func (_m *OAuthStore) GetAuthorizedApps(userId string, offset int, limit int) ([]*model.OAuthApp, error) {
|
||||
ret := _m.Called(userId, offset, limit)
|
||||
// GetAuthorizedApps provides a mock function with given fields: userID, offset, limit
|
||||
func (_m *OAuthStore) GetAuthorizedApps(userID string, offset int, limit int) ([]*model.OAuthApp, error) {
|
||||
ret := _m.Called(userID, offset, limit)
|
||||
|
||||
var r0 []*model.OAuthApp
|
||||
if rf, ok := ret.Get(0).(func(string, int, int) []*model.OAuthApp); ok {
|
||||
r0 = rf(userId, offset, limit)
|
||||
r0 = rf(userID, offset, limit)
|
||||
} else {
|
||||
if ret.Get(0) != nil {
|
||||
r0 = ret.Get(0).([]*model.OAuthApp)
|
||||
@@ -204,7 +204,7 @@ func (_m *OAuthStore) GetAuthorizedApps(userId string, offset int, limit int) ([
|
||||
|
||||
var r1 error
|
||||
if rf, ok := ret.Get(1).(func(string, int, int) error); ok {
|
||||
r1 = rf(userId, offset, limit)
|
||||
r1 = rf(userID, offset, limit)
|
||||
} else {
|
||||
r1 = ret.Error(1)
|
||||
}
|
||||
@@ -212,13 +212,13 @@ func (_m *OAuthStore) GetAuthorizedApps(userId string, offset int, limit int) ([
|
||||
return r0, r1
|
||||
}
|
||||
|
||||
// GetPreviousAccessData provides a mock function with given fields: userId, clientId
|
||||
func (_m *OAuthStore) GetPreviousAccessData(userId string, clientId string) (*model.AccessData, error) {
|
||||
ret := _m.Called(userId, clientId)
|
||||
// GetPreviousAccessData provides a mock function with given fields: userID, clientId
|
||||
func (_m *OAuthStore) GetPreviousAccessData(userID string, clientId string) (*model.AccessData, error) {
|
||||
ret := _m.Called(userID, clientId)
|
||||
|
||||
var r0 *model.AccessData
|
||||
if rf, ok := ret.Get(0).(func(string, string) *model.AccessData); ok {
|
||||
r0 = rf(userId, clientId)
|
||||
r0 = rf(userID, clientId)
|
||||
} else {
|
||||
if ret.Get(0) != nil {
|
||||
r0 = ret.Get(0).(*model.AccessData)
|
||||
@@ -227,7 +227,7 @@ func (_m *OAuthStore) GetPreviousAccessData(userId string, clientId string) (*mo
|
||||
|
||||
var r1 error
|
||||
if rf, ok := ret.Get(1).(func(string, string) error); ok {
|
||||
r1 = rf(userId, clientId)
|
||||
r1 = rf(userID, clientId)
|
||||
} else {
|
||||
r1 = ret.Error(1)
|
||||
}
|
||||
@@ -235,13 +235,13 @@ func (_m *OAuthStore) GetPreviousAccessData(userId string, clientId string) (*mo
|
||||
return r0, r1
|
||||
}
|
||||
|
||||
// PermanentDeleteAuthDataByUser provides a mock function with given fields: userId
|
||||
func (_m *OAuthStore) PermanentDeleteAuthDataByUser(userId string) error {
|
||||
ret := _m.Called(userId)
|
||||
// PermanentDeleteAuthDataByUser provides a mock function with given fields: userID
|
||||
func (_m *OAuthStore) PermanentDeleteAuthDataByUser(userID string) error {
|
||||
ret := _m.Called(userID)
|
||||
|
||||
var r0 error
|
||||
if rf, ok := ret.Get(0).(func(string) error); ok {
|
||||
r0 = rf(userId)
|
||||
r0 = rf(userID)
|
||||
} else {
|
||||
r0 = ret.Error(0)
|
||||
}
|
||||
|
||||
@@ -162,13 +162,13 @@ func (_m *PostStore) GetEtag(channelID string, allowFromCache bool, collapsedThr
|
||||
return r0
|
||||
}
|
||||
|
||||
// GetFlaggedPosts provides a mock function with given fields: userId, offset, limit
|
||||
func (_m *PostStore) GetFlaggedPosts(userId string, offset int, limit int) (*model.PostList, error) {
|
||||
ret := _m.Called(userId, offset, limit)
|
||||
// GetFlaggedPosts provides a mock function with given fields: userID, offset, limit
|
||||
func (_m *PostStore) GetFlaggedPosts(userID string, offset int, limit int) (*model.PostList, error) {
|
||||
ret := _m.Called(userID, offset, limit)
|
||||
|
||||
var r0 *model.PostList
|
||||
if rf, ok := ret.Get(0).(func(string, int, int) *model.PostList); ok {
|
||||
r0 = rf(userId, offset, limit)
|
||||
r0 = rf(userID, offset, limit)
|
||||
} else {
|
||||
if ret.Get(0) != nil {
|
||||
r0 = ret.Get(0).(*model.PostList)
|
||||
@@ -177,7 +177,7 @@ func (_m *PostStore) GetFlaggedPosts(userId string, offset int, limit int) (*mod
|
||||
|
||||
var r1 error
|
||||
if rf, ok := ret.Get(1).(func(string, int, int) error); ok {
|
||||
r1 = rf(userId, offset, limit)
|
||||
r1 = rf(userID, offset, limit)
|
||||
} else {
|
||||
r1 = ret.Error(1)
|
||||
}
|
||||
@@ -185,13 +185,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)
|
||||
@@ -200,7 +200,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)
|
||||
}
|
||||
@@ -208,13 +208,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)
|
||||
@@ -223,7 +223,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)
|
||||
}
|
||||
@@ -700,13 +700,13 @@ func (_m *PostStore) PermanentDeleteByChannel(channelID string) error {
|
||||
return r0
|
||||
}
|
||||
|
||||
// PermanentDeleteByUser provides a mock function with given fields: userId
|
||||
func (_m *PostStore) PermanentDeleteByUser(userId string) error {
|
||||
ret := _m.Called(userId)
|
||||
// PermanentDeleteByUser provides a mock function with given fields: userID
|
||||
func (_m *PostStore) PermanentDeleteByUser(userID string) error {
|
||||
ret := _m.Called(userID)
|
||||
|
||||
var r0 error
|
||||
if rf, ok := ret.Get(0).(func(string) error); ok {
|
||||
r0 = rf(userId)
|
||||
r0 = rf(userID)
|
||||
} else {
|
||||
r0 = ret.Error(0)
|
||||
}
|
||||
@@ -767,13 +767,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)
|
||||
@@ -782,7 +782,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)
|
||||
}
|
||||
@@ -790,13 +790,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)
|
||||
@@ -805,7 +805,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)
|
||||
}
|
||||
|
||||
@@ -35,13 +35,13 @@ func (_m *PreferenceStore) CleanupFlagsBatch(limit int64) (int64, error) {
|
||||
return r0, r1
|
||||
}
|
||||
|
||||
// Delete provides a mock function with given fields: userId, category, name
|
||||
func (_m *PreferenceStore) Delete(userId string, category string, name string) error {
|
||||
ret := _m.Called(userId, category, name)
|
||||
// Delete provides a mock function with given fields: userID, category, name
|
||||
func (_m *PreferenceStore) Delete(userID string, category string, name string) error {
|
||||
ret := _m.Called(userID, category, name)
|
||||
|
||||
var r0 error
|
||||
if rf, ok := ret.Get(0).(func(string, string, string) error); ok {
|
||||
r0 = rf(userId, category, name)
|
||||
r0 = rf(userID, category, name)
|
||||
} else {
|
||||
r0 = ret.Error(0)
|
||||
}
|
||||
@@ -49,13 +49,13 @@ func (_m *PreferenceStore) Delete(userId string, category string, name string) e
|
||||
return r0
|
||||
}
|
||||
|
||||
// DeleteCategory provides a mock function with given fields: userId, category
|
||||
func (_m *PreferenceStore) DeleteCategory(userId string, category string) error {
|
||||
ret := _m.Called(userId, category)
|
||||
// DeleteCategory provides a mock function with given fields: userID, category
|
||||
func (_m *PreferenceStore) DeleteCategory(userID string, category string) error {
|
||||
ret := _m.Called(userID, category)
|
||||
|
||||
var r0 error
|
||||
if rf, ok := ret.Get(0).(func(string, string) error); ok {
|
||||
r0 = rf(userId, category)
|
||||
r0 = rf(userID, category)
|
||||
} else {
|
||||
r0 = ret.Error(0)
|
||||
}
|
||||
@@ -77,13 +77,13 @@ func (_m *PreferenceStore) DeleteCategoryAndName(category string, name string) e
|
||||
return r0
|
||||
}
|
||||
|
||||
// Get provides a mock function with given fields: userId, category, name
|
||||
func (_m *PreferenceStore) Get(userId string, category string, name string) (*model.Preference, error) {
|
||||
ret := _m.Called(userId, category, name)
|
||||
// Get provides a mock function with given fields: userID, category, name
|
||||
func (_m *PreferenceStore) Get(userID string, category string, name string) (*model.Preference, error) {
|
||||
ret := _m.Called(userID, category, name)
|
||||
|
||||
var r0 *model.Preference
|
||||
if rf, ok := ret.Get(0).(func(string, string, string) *model.Preference); ok {
|
||||
r0 = rf(userId, category, name)
|
||||
r0 = rf(userID, category, name)
|
||||
} else {
|
||||
if ret.Get(0) != nil {
|
||||
r0 = ret.Get(0).(*model.Preference)
|
||||
@@ -92,7 +92,7 @@ func (_m *PreferenceStore) Get(userId string, category string, name string) (*mo
|
||||
|
||||
var r1 error
|
||||
if rf, ok := ret.Get(1).(func(string, string, string) error); ok {
|
||||
r1 = rf(userId, category, name)
|
||||
r1 = rf(userID, category, name)
|
||||
} else {
|
||||
r1 = ret.Error(1)
|
||||
}
|
||||
@@ -100,13 +100,13 @@ func (_m *PreferenceStore) Get(userId string, category string, name string) (*mo
|
||||
return r0, r1
|
||||
}
|
||||
|
||||
// GetAll provides a mock function with given fields: userId
|
||||
func (_m *PreferenceStore) GetAll(userId string) (model.Preferences, error) {
|
||||
ret := _m.Called(userId)
|
||||
// GetAll provides a mock function with given fields: userID
|
||||
func (_m *PreferenceStore) GetAll(userID string) (model.Preferences, error) {
|
||||
ret := _m.Called(userID)
|
||||
|
||||
var r0 model.Preferences
|
||||
if rf, ok := ret.Get(0).(func(string) model.Preferences); ok {
|
||||
r0 = rf(userId)
|
||||
r0 = rf(userID)
|
||||
} else {
|
||||
if ret.Get(0) != nil {
|
||||
r0 = ret.Get(0).(model.Preferences)
|
||||
@@ -115,7 +115,7 @@ func (_m *PreferenceStore) GetAll(userId string) (model.Preferences, error) {
|
||||
|
||||
var r1 error
|
||||
if rf, ok := ret.Get(1).(func(string) error); ok {
|
||||
r1 = rf(userId)
|
||||
r1 = rf(userID)
|
||||
} else {
|
||||
r1 = ret.Error(1)
|
||||
}
|
||||
@@ -123,13 +123,13 @@ func (_m *PreferenceStore) GetAll(userId string) (model.Preferences, error) {
|
||||
return r0, r1
|
||||
}
|
||||
|
||||
// GetCategory provides a mock function with given fields: userId, category
|
||||
func (_m *PreferenceStore) GetCategory(userId string, category string) (model.Preferences, error) {
|
||||
ret := _m.Called(userId, category)
|
||||
// GetCategory provides a mock function with given fields: userID, category
|
||||
func (_m *PreferenceStore) GetCategory(userID string, category string) (model.Preferences, error) {
|
||||
ret := _m.Called(userID, category)
|
||||
|
||||
var r0 model.Preferences
|
||||
if rf, ok := ret.Get(0).(func(string, string) model.Preferences); ok {
|
||||
r0 = rf(userId, category)
|
||||
r0 = rf(userID, category)
|
||||
} else {
|
||||
if ret.Get(0) != nil {
|
||||
r0 = ret.Get(0).(model.Preferences)
|
||||
@@ -138,7 +138,7 @@ func (_m *PreferenceStore) GetCategory(userId string, category string) (model.Pr
|
||||
|
||||
var r1 error
|
||||
if rf, ok := ret.Get(1).(func(string, string) error); ok {
|
||||
r1 = rf(userId, category)
|
||||
r1 = rf(userID, category)
|
||||
} else {
|
||||
r1 = ret.Error(1)
|
||||
}
|
||||
@@ -146,13 +146,13 @@ func (_m *PreferenceStore) GetCategory(userId string, category string) (model.Pr
|
||||
return r0, r1
|
||||
}
|
||||
|
||||
// PermanentDeleteByUser provides a mock function with given fields: userId
|
||||
func (_m *PreferenceStore) PermanentDeleteByUser(userId string) error {
|
||||
ret := _m.Called(userId)
|
||||
// PermanentDeleteByUser provides a mock function with given fields: userID
|
||||
func (_m *PreferenceStore) PermanentDeleteByUser(userID string) error {
|
||||
ret := _m.Called(userID)
|
||||
|
||||
var r0 error
|
||||
if rf, ok := ret.Get(0).(func(string) error); ok {
|
||||
r0 = rf(userId)
|
||||
r0 = rf(userID)
|
||||
} else {
|
||||
r0 = ret.Error(0)
|
||||
}
|
||||
|
||||
@@ -42,13 +42,13 @@ func (_m *ProductNoticesStore) ClearOldNotices(currentNotices *model.ProductNoti
|
||||
return r0
|
||||
}
|
||||
|
||||
// GetViews provides a mock function with given fields: userId
|
||||
func (_m *ProductNoticesStore) GetViews(userId string) ([]model.ProductNoticeViewState, error) {
|
||||
ret := _m.Called(userId)
|
||||
// GetViews provides a mock function with given fields: userID
|
||||
func (_m *ProductNoticesStore) GetViews(userID string) ([]model.ProductNoticeViewState, error) {
|
||||
ret := _m.Called(userID)
|
||||
|
||||
var r0 []model.ProductNoticeViewState
|
||||
if rf, ok := ret.Get(0).(func(string) []model.ProductNoticeViewState); ok {
|
||||
r0 = rf(userId)
|
||||
r0 = rf(userID)
|
||||
} else {
|
||||
if ret.Get(0) != nil {
|
||||
r0 = ret.Get(0).([]model.ProductNoticeViewState)
|
||||
@@ -57,7 +57,7 @@ func (_m *ProductNoticesStore) GetViews(userId string) ([]model.ProductNoticeVie
|
||||
|
||||
var r1 error
|
||||
if rf, ok := ret.Get(1).(func(string) error); ok {
|
||||
r1 = rf(userId)
|
||||
r1 = rf(userID)
|
||||
} else {
|
||||
r1 = ret.Error(1)
|
||||
}
|
||||
@@ -65,13 +65,13 @@ func (_m *ProductNoticesStore) GetViews(userId string) ([]model.ProductNoticeVie
|
||||
return r0, r1
|
||||
}
|
||||
|
||||
// View provides a mock function with given fields: userId, notices
|
||||
func (_m *ProductNoticesStore) View(userId string, notices []string) error {
|
||||
ret := _m.Called(userId, notices)
|
||||
// View provides a mock function with given fields: userID, notices
|
||||
func (_m *ProductNoticesStore) View(userID string, notices []string) error {
|
||||
ret := _m.Called(userID, notices)
|
||||
|
||||
var r0 error
|
||||
if rf, ok := ret.Get(0).(func(string, []string) error); ok {
|
||||
r0 = rf(userId, notices)
|
||||
r0 = rf(userID, notices)
|
||||
} else {
|
||||
r0 = ret.Error(0)
|
||||
}
|
||||
|
||||
@@ -65,13 +65,13 @@ func (_m *SessionStore) Get(ctx context.Context, sessionIDOrToken string) (*mode
|
||||
return r0, r1
|
||||
}
|
||||
|
||||
// GetSessions provides a mock function with given fields: userId
|
||||
func (_m *SessionStore) GetSessions(userId string) ([]*model.Session, error) {
|
||||
ret := _m.Called(userId)
|
||||
// GetSessions provides a mock function with given fields: userID
|
||||
func (_m *SessionStore) GetSessions(userID string) ([]*model.Session, error) {
|
||||
ret := _m.Called(userID)
|
||||
|
||||
var r0 []*model.Session
|
||||
if rf, ok := ret.Get(0).(func(string) []*model.Session); ok {
|
||||
r0 = rf(userId)
|
||||
r0 = rf(userID)
|
||||
} else {
|
||||
if ret.Get(0) != nil {
|
||||
r0 = ret.Get(0).([]*model.Session)
|
||||
@@ -80,7 +80,7 @@ func (_m *SessionStore) GetSessions(userId string) ([]*model.Session, error) {
|
||||
|
||||
var r1 error
|
||||
if rf, ok := ret.Get(1).(func(string) error); ok {
|
||||
r1 = rf(userId)
|
||||
r1 = rf(userID)
|
||||
} else {
|
||||
r1 = ret.Error(1)
|
||||
}
|
||||
@@ -111,13 +111,13 @@ func (_m *SessionStore) GetSessionsExpired(thresholdMillis int64, mobileOnly boo
|
||||
return r0, r1
|
||||
}
|
||||
|
||||
// GetSessionsWithActiveDeviceIds provides a mock function with given fields: userId
|
||||
func (_m *SessionStore) GetSessionsWithActiveDeviceIds(userId string) ([]*model.Session, error) {
|
||||
ret := _m.Called(userId)
|
||||
// GetSessionsWithActiveDeviceIds provides a mock function with given fields: userID
|
||||
func (_m *SessionStore) GetSessionsWithActiveDeviceIds(userID string) ([]*model.Session, error) {
|
||||
ret := _m.Called(userID)
|
||||
|
||||
var r0 []*model.Session
|
||||
if rf, ok := ret.Get(0).(func(string) []*model.Session); ok {
|
||||
r0 = rf(userId)
|
||||
r0 = rf(userID)
|
||||
} else {
|
||||
if ret.Get(0) != nil {
|
||||
r0 = ret.Get(0).([]*model.Session)
|
||||
@@ -126,7 +126,7 @@ func (_m *SessionStore) GetSessionsWithActiveDeviceIds(userId string) ([]*model.
|
||||
|
||||
var r1 error
|
||||
if rf, ok := ret.Get(1).(func(string) error); ok {
|
||||
r1 = rf(userId)
|
||||
r1 = rf(userID)
|
||||
} else {
|
||||
r1 = ret.Error(1)
|
||||
}
|
||||
@@ -276,20 +276,20 @@ func (_m *SessionStore) UpdateProps(session *model.Session) error {
|
||||
return r0
|
||||
}
|
||||
|
||||
// UpdateRoles provides a mock function with given fields: userId, roles
|
||||
func (_m *SessionStore) UpdateRoles(userId string, roles string) (string, error) {
|
||||
ret := _m.Called(userId, roles)
|
||||
// UpdateRoles provides a mock function with given fields: userID, roles
|
||||
func (_m *SessionStore) UpdateRoles(userID string, roles string) (string, error) {
|
||||
ret := _m.Called(userID, roles)
|
||||
|
||||
var r0 string
|
||||
if rf, ok := ret.Get(0).(func(string, string) string); ok {
|
||||
r0 = rf(userId, roles)
|
||||
r0 = rf(userID, roles)
|
||||
} else {
|
||||
r0 = ret.Get(0).(string)
|
||||
}
|
||||
|
||||
var r1 error
|
||||
if rf, ok := ret.Get(1).(func(string, string) error); ok {
|
||||
r1 = rf(userId, roles)
|
||||
r1 = rf(userID, roles)
|
||||
} else {
|
||||
r1 = ret.Error(1)
|
||||
}
|
||||
|
||||
@@ -14,13 +14,13 @@ type StatusStore struct {
|
||||
mock.Mock
|
||||
}
|
||||
|
||||
// Get provides a mock function with given fields: userId
|
||||
func (_m *StatusStore) Get(userId string) (*model.Status, error) {
|
||||
ret := _m.Called(userId)
|
||||
// Get provides a mock function with given fields: userID
|
||||
func (_m *StatusStore) Get(userID string) (*model.Status, error) {
|
||||
ret := _m.Called(userID)
|
||||
|
||||
var r0 *model.Status
|
||||
if rf, ok := ret.Get(0).(func(string) *model.Status); ok {
|
||||
r0 = rf(userId)
|
||||
r0 = rf(userID)
|
||||
} else {
|
||||
if ret.Get(0) != nil {
|
||||
r0 = ret.Get(0).(*model.Status)
|
||||
@@ -29,7 +29,7 @@ func (_m *StatusStore) Get(userId string) (*model.Status, error) {
|
||||
|
||||
var r1 error
|
||||
if rf, ok := ret.Get(1).(func(string) error); ok {
|
||||
r1 = rf(userId)
|
||||
r1 = rf(userID)
|
||||
} else {
|
||||
r1 = ret.Error(1)
|
||||
}
|
||||
@@ -109,13 +109,13 @@ func (_m *StatusStore) SaveOrUpdate(status *model.Status) error {
|
||||
return r0
|
||||
}
|
||||
|
||||
// UpdateLastActivityAt provides a mock function with given fields: userId, lastActivityAt
|
||||
func (_m *StatusStore) UpdateLastActivityAt(userId string, lastActivityAt int64) error {
|
||||
ret := _m.Called(userId, lastActivityAt)
|
||||
// UpdateLastActivityAt provides a mock function with given fields: userID, lastActivityAt
|
||||
func (_m *StatusStore) UpdateLastActivityAt(userID string, lastActivityAt int64) error {
|
||||
ret := _m.Called(userID, lastActivityAt)
|
||||
|
||||
var r0 error
|
||||
if rf, ok := ret.Get(0).(func(string, int64) error); ok {
|
||||
r0 = rf(userId, lastActivityAt)
|
||||
r0 = rf(userID, lastActivityAt)
|
||||
} else {
|
||||
r0 = ret.Error(0)
|
||||
}
|
||||
|
||||
@@ -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: ctx, teamID, userId
|
||||
func (_m *TeamStore) GetMember(ctx context.Context, teamID string, userId string) (*model.TeamMember, error) {
|
||||
ret := _m.Called(ctx, teamID, userId)
|
||||
// GetMember provides a mock function with given fields: ctx, teamID, userID
|
||||
func (_m *TeamStore) GetMember(ctx context.Context, teamID string, userID string) (*model.TeamMember, error) {
|
||||
ret := _m.Called(ctx, teamID, userID)
|
||||
|
||||
var r0 *model.TeamMember
|
||||
if rf, ok := ret.Get(0).(func(context.Context, string, string) *model.TeamMember); ok {
|
||||
r0 = rf(ctx, teamID, userId)
|
||||
r0 = rf(ctx, teamID, userID)
|
||||
} else {
|
||||
if ret.Get(0) != nil {
|
||||
r0 = ret.Get(0).(*model.TeamMember)
|
||||
@@ -477,7 +477,7 @@ func (_m *TeamStore) GetMember(ctx context.Context, teamID string, userId string
|
||||
|
||||
var r1 error
|
||||
if rf, ok := ret.Get(1).(func(context.Context, string, string) error); ok {
|
||||
r1 = rf(ctx, teamID, userId)
|
||||
r1 = rf(ctx, teamID, userID)
|
||||
} else {
|
||||
r1 = ret.Error(1)
|
||||
}
|
||||
@@ -531,13 +531,13 @@ func (_m *TeamStore) GetMembersByIds(teamID string, userIds []string, restrictio
|
||||
return r0, r1
|
||||
}
|
||||
|
||||
// GetTeamMembersForExport provides a mock function with given fields: userId
|
||||
func (_m *TeamStore) GetTeamMembersForExport(userId string) ([]*model.TeamMemberForExport, error) {
|
||||
ret := _m.Called(userId)
|
||||
// GetTeamMembersForExport provides a mock function with given fields: userID
|
||||
func (_m *TeamStore) GetTeamMembersForExport(userID string) ([]*model.TeamMemberForExport, error) {
|
||||
ret := _m.Called(userID)
|
||||
|
||||
var r0 []*model.TeamMemberForExport
|
||||
if rf, ok := ret.Get(0).(func(string) []*model.TeamMemberForExport); ok {
|
||||
r0 = rf(userId)
|
||||
r0 = rf(userID)
|
||||
} else {
|
||||
if ret.Get(0) != nil {
|
||||
r0 = ret.Get(0).([]*model.TeamMemberForExport)
|
||||
@@ -546,7 +546,7 @@ func (_m *TeamStore) GetTeamMembersForExport(userId string) ([]*model.TeamMember
|
||||
|
||||
var r1 error
|
||||
if rf, ok := ret.Get(1).(func(string) error); ok {
|
||||
r1 = rf(userId)
|
||||
r1 = rf(userID)
|
||||
} else {
|
||||
r1 = ret.Error(1)
|
||||
}
|
||||
@@ -577,13 +577,13 @@ func (_m *TeamStore) GetTeamsByScheme(schemeID string, offset int, limit int) ([
|
||||
return r0, r1
|
||||
}
|
||||
|
||||
// GetTeamsByUserId provides a mock function with given fields: userId
|
||||
func (_m *TeamStore) GetTeamsByUserId(userId string) ([]*model.Team, error) {
|
||||
ret := _m.Called(userId)
|
||||
// GetTeamsByUserId provides a mock function with given fields: userID
|
||||
func (_m *TeamStore) GetTeamsByUserId(userID string) ([]*model.Team, error) {
|
||||
ret := _m.Called(userID)
|
||||
|
||||
var r0 []*model.Team
|
||||
if rf, ok := ret.Get(0).(func(string) []*model.Team); ok {
|
||||
r0 = rf(userId)
|
||||
r0 = rf(userID)
|
||||
} else {
|
||||
if ret.Get(0) != nil {
|
||||
r0 = ret.Get(0).([]*model.Team)
|
||||
@@ -592,7 +592,7 @@ func (_m *TeamStore) GetTeamsByUserId(userId string) ([]*model.Team, error) {
|
||||
|
||||
var r1 error
|
||||
if rf, ok := ret.Get(1).(func(string) error); ok {
|
||||
r1 = rf(userId)
|
||||
r1 = rf(userID)
|
||||
} else {
|
||||
r1 = ret.Error(1)
|
||||
}
|
||||
@@ -600,13 +600,13 @@ func (_m *TeamStore) GetTeamsByUserId(userId string) ([]*model.Team, error) {
|
||||
return r0, r1
|
||||
}
|
||||
|
||||
// GetTeamsForUser provides a mock function with given fields: ctx, userId
|
||||
func (_m *TeamStore) GetTeamsForUser(ctx context.Context, userId string) ([]*model.TeamMember, error) {
|
||||
ret := _m.Called(ctx, userId)
|
||||
// GetTeamsForUser provides a mock function with given fields: ctx, userID
|
||||
func (_m *TeamStore) GetTeamsForUser(ctx context.Context, userID string) ([]*model.TeamMember, error) {
|
||||
ret := _m.Called(ctx, userID)
|
||||
|
||||
var r0 []*model.TeamMember
|
||||
if rf, ok := ret.Get(0).(func(context.Context, string) []*model.TeamMember); ok {
|
||||
r0 = rf(ctx, userId)
|
||||
r0 = rf(ctx, userID)
|
||||
} else {
|
||||
if ret.Get(0) != nil {
|
||||
r0 = ret.Get(0).([]*model.TeamMember)
|
||||
@@ -615,7 +615,7 @@ func (_m *TeamStore) GetTeamsForUser(ctx context.Context, userId string) ([]*mod
|
||||
|
||||
var r1 error
|
||||
if rf, ok := ret.Get(1).(func(context.Context, string) error); ok {
|
||||
r1 = rf(ctx, userId)
|
||||
r1 = rf(ctx, userID)
|
||||
} else {
|
||||
r1 = ret.Error(1)
|
||||
}
|
||||
@@ -623,13 +623,13 @@ func (_m *TeamStore) GetTeamsForUser(ctx context.Context, userId string) ([]*mod
|
||||
return r0, r1
|
||||
}
|
||||
|
||||
// GetTeamsForUserWithPagination provides a mock function with given fields: userId, page, perPage
|
||||
func (_m *TeamStore) GetTeamsForUserWithPagination(userId string, page int, perPage int) ([]*model.TeamMember, error) {
|
||||
ret := _m.Called(userId, page, perPage)
|
||||
// GetTeamsForUserWithPagination provides a mock function with given fields: userID, page, perPage
|
||||
func (_m *TeamStore) GetTeamsForUserWithPagination(userID string, page int, perPage int) ([]*model.TeamMember, error) {
|
||||
ret := _m.Called(userID, page, perPage)
|
||||
|
||||
var r0 []*model.TeamMember
|
||||
if rf, ok := ret.Get(0).(func(string, int, int) []*model.TeamMember); ok {
|
||||
r0 = rf(userId, page, perPage)
|
||||
r0 = rf(userID, page, perPage)
|
||||
} else {
|
||||
if ret.Get(0) != nil {
|
||||
r0 = ret.Get(0).([]*model.TeamMember)
|
||||
@@ -638,7 +638,7 @@ func (_m *TeamStore) GetTeamsForUserWithPagination(userId string, page int, perP
|
||||
|
||||
var r1 error
|
||||
if rf, ok := ret.Get(1).(func(string, int, int) error); ok {
|
||||
r1 = rf(userId, page, perPage)
|
||||
r1 = rf(userID, page, perPage)
|
||||
} else {
|
||||
r1 = ret.Error(1)
|
||||
}
|
||||
@@ -667,13 +667,13 @@ func (_m *TeamStore) GetTotalMemberCount(teamID string, restrictions *model.View
|
||||
return r0, r1
|
||||
}
|
||||
|
||||
// GetUserTeamIds provides a mock function with given fields: userId, allowFromCache
|
||||
func (_m *TeamStore) GetUserTeamIds(userId string, allowFromCache bool) ([]string, error) {
|
||||
ret := _m.Called(userId, allowFromCache)
|
||||
// GetUserTeamIds provides a mock function with given fields: userID, allowFromCache
|
||||
func (_m *TeamStore) GetUserTeamIds(userID string, allowFromCache bool) ([]string, error) {
|
||||
ret := _m.Called(userID, allowFromCache)
|
||||
|
||||
var r0 []string
|
||||
if rf, ok := ret.Get(0).(func(string, bool) []string); ok {
|
||||
r0 = rf(userId, allowFromCache)
|
||||
r0 = rf(userID, allowFromCache)
|
||||
} else {
|
||||
if ret.Get(0) != nil {
|
||||
r0 = ret.Get(0).([]string)
|
||||
@@ -682,7 +682,7 @@ func (_m *TeamStore) GetUserTeamIds(userId string, allowFromCache bool) ([]strin
|
||||
|
||||
var r1 error
|
||||
if rf, ok := ret.Get(1).(func(string, bool) error); ok {
|
||||
r1 = rf(userId, allowFromCache)
|
||||
r1 = rf(userID, allowFromCache)
|
||||
} else {
|
||||
r1 = ret.Error(1)
|
||||
}
|
||||
@@ -711,18 +711,18 @@ func (_m *TeamStore) GroupSyncedTeamCount() (int64, error) {
|
||||
return r0, r1
|
||||
}
|
||||
|
||||
// InvalidateAllTeamIdsForUser provides a mock function with given fields: userId
|
||||
func (_m *TeamStore) InvalidateAllTeamIdsForUser(userId string) {
|
||||
_m.Called(userId)
|
||||
// InvalidateAllTeamIdsForUser provides a mock function with given fields: userID
|
||||
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)
|
||||
}
|
||||
@@ -767,13 +767,13 @@ func (_m *TeamStore) RemoveAllMembersByTeam(teamID string) error {
|
||||
return r0
|
||||
}
|
||||
|
||||
// RemoveAllMembersByUser provides a mock function with given fields: userId
|
||||
func (_m *TeamStore) RemoveAllMembersByUser(userId string) error {
|
||||
ret := _m.Called(userId)
|
||||
// RemoveAllMembersByUser provides a mock function with given fields: userID
|
||||
func (_m *TeamStore) RemoveAllMembersByUser(userID string) error {
|
||||
ret := _m.Called(userID)
|
||||
|
||||
var r0 error
|
||||
if rf, ok := ret.Get(0).(func(string) error); ok {
|
||||
r0 = rf(userId)
|
||||
r0 = rf(userID)
|
||||
} 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)
|
||||
}
|
||||
@@ -1088,20 +1088,20 @@ func (_m *TeamStore) UpdateMultipleMembers(members []*model.TeamMember) ([]*mode
|
||||
return r0, r1
|
||||
}
|
||||
|
||||
// UserBelongsToTeams provides a mock function with given fields: userId, teamIds
|
||||
func (_m *TeamStore) UserBelongsToTeams(userId string, teamIds []string) (bool, error) {
|
||||
ret := _m.Called(userId, teamIds)
|
||||
// UserBelongsToTeams provides a mock function with given fields: userID, teamIds
|
||||
func (_m *TeamStore) UserBelongsToTeams(userID string, teamIds []string) (bool, error) {
|
||||
ret := _m.Called(userID, teamIds)
|
||||
|
||||
var r0 bool
|
||||
if rf, ok := ret.Get(0).(func(string, []string) bool); ok {
|
||||
r0 = rf(userId, teamIds)
|
||||
r0 = rf(userID, teamIds)
|
||||
} else {
|
||||
r0 = ret.Get(0).(bool)
|
||||
}
|
||||
|
||||
var r1 error
|
||||
if rf, ok := ret.Get(1).(func(string, []string) error); ok {
|
||||
r1 = rf(userId, teamIds)
|
||||
r1 = rf(userID, teamIds)
|
||||
} else {
|
||||
r1 = ret.Error(1)
|
||||
}
|
||||
|
||||
@@ -37,13 +37,13 @@ func (_m *ThreadStore) CollectThreadsWithNewerReplies(userId string, channelIds
|
||||
return r0, r1
|
||||
}
|
||||
|
||||
// Delete provides a mock function with given fields: postId
|
||||
func (_m *ThreadStore) Delete(postId string) error {
|
||||
ret := _m.Called(postId)
|
||||
// Delete provides a mock function with given fields: postID
|
||||
func (_m *ThreadStore) Delete(postID string) error {
|
||||
ret := _m.Called(postID)
|
||||
|
||||
var r0 error
|
||||
if rf, ok := ret.Get(0).(func(string) error); ok {
|
||||
r0 = rf(postId)
|
||||
r0 = rf(postID)
|
||||
} else {
|
||||
r0 = ret.Error(0)
|
||||
}
|
||||
@@ -134,13 +134,13 @@ func (_m *ThreadStore) GetMembershipsForUser(userId string, teamID string) ([]*m
|
||||
return r0, r1
|
||||
}
|
||||
|
||||
// GetPosts provides a mock function with given fields: threadId, since
|
||||
func (_m *ThreadStore) GetPosts(threadId string, since int64) ([]*model.Post, error) {
|
||||
ret := _m.Called(threadId, since)
|
||||
// GetPosts provides a mock function with given fields: threadID, since
|
||||
func (_m *ThreadStore) GetPosts(threadID string, since int64) ([]*model.Post, error) {
|
||||
ret := _m.Called(threadID, since)
|
||||
|
||||
var r0 []*model.Post
|
||||
if rf, ok := ret.Get(0).(func(string, int64) []*model.Post); ok {
|
||||
r0 = rf(threadId, since)
|
||||
r0 = rf(threadID, since)
|
||||
} else {
|
||||
if ret.Get(0) != nil {
|
||||
r0 = ret.Get(0).([]*model.Post)
|
||||
@@ -149,7 +149,7 @@ func (_m *ThreadStore) GetPosts(threadId string, since int64) ([]*model.Post, er
|
||||
|
||||
var r1 error
|
||||
if rf, ok := ret.Get(1).(func(string, int64) error); ok {
|
||||
r1 = rf(threadId, since)
|
||||
r1 = rf(threadID, since)
|
||||
} else {
|
||||
r1 = ret.Error(1)
|
||||
}
|
||||
@@ -157,13 +157,13 @@ func (_m *ThreadStore) GetPosts(threadId string, since int64) ([]*model.Post, er
|
||||
return r0, r1
|
||||
}
|
||||
|
||||
// GetThreadForUser provides a mock function with given fields: userId, teamId, threadId, extended
|
||||
func (_m *ThreadStore) GetThreadForUser(userId string, teamId string, threadId string, extended bool) (*model.ThreadResponse, error) {
|
||||
ret := _m.Called(userId, teamId, threadId, extended)
|
||||
// GetThreadForUser provides a mock function with given fields: userID, teamID, threadId, extended
|
||||
func (_m *ThreadStore) GetThreadForUser(userID string, teamID string, threadId string, extended bool) (*model.ThreadResponse, error) {
|
||||
ret := _m.Called(userID, teamID, threadId, extended)
|
||||
|
||||
var r0 *model.ThreadResponse
|
||||
if rf, ok := ret.Get(0).(func(string, string, string, bool) *model.ThreadResponse); ok {
|
||||
r0 = rf(userId, teamId, threadId, extended)
|
||||
r0 = rf(userID, teamID, threadId, extended)
|
||||
} else {
|
||||
if ret.Get(0) != nil {
|
||||
r0 = ret.Get(0).(*model.ThreadResponse)
|
||||
@@ -172,7 +172,7 @@ func (_m *ThreadStore) GetThreadForUser(userId string, teamId string, threadId s
|
||||
|
||||
var r1 error
|
||||
if rf, ok := ret.Get(1).(func(string, string, string, bool) error); ok {
|
||||
r1 = rf(userId, teamId, threadId, extended)
|
||||
r1 = rf(userID, teamID, threadId, extended)
|
||||
} else {
|
||||
r1 = ret.Error(1)
|
||||
}
|
||||
@@ -180,13 +180,13 @@ func (_m *ThreadStore) GetThreadForUser(userId string, teamId string, threadId s
|
||||
return r0, r1
|
||||
}
|
||||
|
||||
// GetThreadsForUser provides a mock function with given fields: userId, teamId, opts
|
||||
func (_m *ThreadStore) GetThreadsForUser(userId string, teamId string, opts model.GetUserThreadsOpts) (*model.Threads, error) {
|
||||
ret := _m.Called(userId, teamId, opts)
|
||||
// GetThreadsForUser provides a mock function with given fields: userId, teamID, opts
|
||||
func (_m *ThreadStore) GetThreadsForUser(userId string, teamID string, opts model.GetUserThreadsOpts) (*model.Threads, error) {
|
||||
ret := _m.Called(userId, teamID, opts)
|
||||
|
||||
var r0 *model.Threads
|
||||
if rf, ok := ret.Get(0).(func(string, string, model.GetUserThreadsOpts) *model.Threads); ok {
|
||||
r0 = rf(userId, teamId, opts)
|
||||
r0 = rf(userId, teamID, opts)
|
||||
} else {
|
||||
if ret.Get(0) != nil {
|
||||
r0 = ret.Get(0).(*model.Threads)
|
||||
@@ -195,7 +195,7 @@ func (_m *ThreadStore) GetThreadsForUser(userId string, teamId string, opts mode
|
||||
|
||||
var r1 error
|
||||
if rf, ok := ret.Get(1).(func(string, string, model.GetUserThreadsOpts) error); ok {
|
||||
r1 = rf(userId, teamId, opts)
|
||||
r1 = rf(userId, teamID, opts)
|
||||
} else {
|
||||
r1 = ret.Error(1)
|
||||
}
|
||||
@@ -203,13 +203,13 @@ func (_m *ThreadStore) GetThreadsForUser(userId string, teamId string, opts mode
|
||||
return r0, r1
|
||||
}
|
||||
|
||||
// MaintainMembership provides a mock function with given fields: userId, postID, following, incrementMentions, updateFollowing, updateViewedTimestamp
|
||||
func (_m *ThreadStore) MaintainMembership(userId string, postID string, following bool, incrementMentions bool, updateFollowing bool, updateViewedTimestamp bool) error {
|
||||
ret := _m.Called(userId, postID, following, incrementMentions, updateFollowing, updateViewedTimestamp)
|
||||
// MaintainMembership provides a mock function with given fields: userID, postID, following, incrementMentions, updateFollowing, updateViewedTimestamp
|
||||
func (_m *ThreadStore) MaintainMembership(userID string, postID string, following bool, incrementMentions bool, updateFollowing bool, updateViewedTimestamp bool) error {
|
||||
ret := _m.Called(userID, postID, following, incrementMentions, updateFollowing, updateViewedTimestamp)
|
||||
|
||||
var r0 error
|
||||
if rf, ok := ret.Get(0).(func(string, string, bool, bool, bool, bool) error); ok {
|
||||
r0 = rf(userId, postID, following, incrementMentions, updateFollowing, updateViewedTimestamp)
|
||||
r0 = rf(userID, postID, following, incrementMentions, updateFollowing, updateViewedTimestamp)
|
||||
} else {
|
||||
r0 = ret.Error(0)
|
||||
}
|
||||
@@ -217,13 +217,13 @@ func (_m *ThreadStore) MaintainMembership(userId string, postID string, followin
|
||||
return r0
|
||||
}
|
||||
|
||||
// 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)
|
||||
}
|
||||
@@ -231,13 +231,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)
|
||||
}
|
||||
|
||||
@@ -51,13 +51,13 @@ func (_m *UploadSessionStore) Get(id string) (*model.UploadSession, error) {
|
||||
return r0, r1
|
||||
}
|
||||
|
||||
// GetForUser provides a mock function with given fields: userId
|
||||
func (_m *UploadSessionStore) GetForUser(userId string) ([]*model.UploadSession, error) {
|
||||
ret := _m.Called(userId)
|
||||
// GetForUser provides a mock function with given fields: userID
|
||||
func (_m *UploadSessionStore) GetForUser(userID string) ([]*model.UploadSession, error) {
|
||||
ret := _m.Called(userID)
|
||||
|
||||
var r0 []*model.UploadSession
|
||||
if rf, ok := ret.Get(0).(func(string) []*model.UploadSession); ok {
|
||||
r0 = rf(userId)
|
||||
r0 = rf(userID)
|
||||
} else {
|
||||
if ret.Get(0) != nil {
|
||||
r0 = ret.Get(0).([]*model.UploadSession)
|
||||
@@ -66,7 +66,7 @@ func (_m *UploadSessionStore) GetForUser(userId string) ([]*model.UploadSession,
|
||||
|
||||
var r1 error
|
||||
if rf, ok := ret.Get(1).(func(string) error); ok {
|
||||
r1 = rf(userId)
|
||||
r1 = rf(userID)
|
||||
} else {
|
||||
r1 = ret.Error(1)
|
||||
}
|
||||
|
||||
@@ -28,13 +28,13 @@ func (_m *UserAccessTokenStore) Delete(tokenID string) error {
|
||||
return r0
|
||||
}
|
||||
|
||||
// DeleteAllForUser provides a mock function with given fields: userId
|
||||
func (_m *UserAccessTokenStore) DeleteAllForUser(userId string) error {
|
||||
ret := _m.Called(userId)
|
||||
// DeleteAllForUser provides a mock function with given fields: userID
|
||||
func (_m *UserAccessTokenStore) DeleteAllForUser(userID string) error {
|
||||
ret := _m.Called(userID)
|
||||
|
||||
var r0 error
|
||||
if rf, ok := ret.Get(0).(func(string) error); ok {
|
||||
r0 = rf(userId)
|
||||
r0 = rf(userID)
|
||||
} else {
|
||||
r0 = ret.Error(0)
|
||||
}
|
||||
@@ -111,13 +111,13 @@ func (_m *UserAccessTokenStore) GetByToken(tokenString string) (*model.UserAcces
|
||||
return r0, r1
|
||||
}
|
||||
|
||||
// GetByUser provides a mock function with given fields: userId, page, perPage
|
||||
func (_m *UserAccessTokenStore) GetByUser(userId string, page int, perPage int) ([]*model.UserAccessToken, error) {
|
||||
ret := _m.Called(userId, page, perPage)
|
||||
// GetByUser provides a mock function with given fields: userID, page, perPage
|
||||
func (_m *UserAccessTokenStore) GetByUser(userID string, page int, perPage int) ([]*model.UserAccessToken, error) {
|
||||
ret := _m.Called(userID, page, perPage)
|
||||
|
||||
var r0 []*model.UserAccessToken
|
||||
if rf, ok := ret.Get(0).(func(string, int, int) []*model.UserAccessToken); ok {
|
||||
r0 = rf(userId, page, perPage)
|
||||
r0 = rf(userID, page, perPage)
|
||||
} else {
|
||||
if ret.Get(0) != nil {
|
||||
r0 = ret.Get(0).([]*model.UserAccessToken)
|
||||
@@ -126,7 +126,7 @@ func (_m *UserAccessTokenStore) GetByUser(userId string, page int, perPage int)
|
||||
|
||||
var r1 error
|
||||
if rf, ok := ret.Get(1).(func(string, int, int) error); ok {
|
||||
r1 = rf(userId, page, perPage)
|
||||
r1 = rf(userID, page, perPage)
|
||||
} else {
|
||||
r1 = ret.Error(1)
|
||||
}
|
||||
|
||||
@@ -368,13 +368,13 @@ func (_m *UserStore) GetAllProfiles(options *model.UserGetOptions) ([]*model.Use
|
||||
return r0, r1
|
||||
}
|
||||
|
||||
// GetAllProfilesInChannel provides a mock function with given fields: ctx, channelId, allowFromCache
|
||||
func (_m *UserStore) GetAllProfilesInChannel(ctx context.Context, channelId string, allowFromCache bool) (map[string]*model.User, error) {
|
||||
ret := _m.Called(ctx, channelId, allowFromCache)
|
||||
// GetAllProfilesInChannel provides a mock function with given fields: ctx, channelID, allowFromCache
|
||||
func (_m *UserStore) GetAllProfilesInChannel(ctx context.Context, channelID string, allowFromCache bool) (map[string]*model.User, error) {
|
||||
ret := _m.Called(ctx, channelID, allowFromCache)
|
||||
|
||||
var r0 map[string]*model.User
|
||||
if rf, ok := ret.Get(0).(func(context.Context, string, bool) map[string]*model.User); ok {
|
||||
r0 = rf(ctx, channelId, allowFromCache)
|
||||
r0 = rf(ctx, channelID, allowFromCache)
|
||||
} else {
|
||||
if ret.Get(0) != nil {
|
||||
r0 = ret.Get(0).(map[string]*model.User)
|
||||
@@ -383,7 +383,7 @@ func (_m *UserStore) GetAllProfilesInChannel(ctx context.Context, channelId stri
|
||||
|
||||
var r1 error
|
||||
if rf, ok := ret.Get(1).(func(context.Context, string, bool) error); ok {
|
||||
r1 = rf(ctx, channelId, allowFromCache)
|
||||
r1 = rf(ctx, channelID, allowFromCache)
|
||||
} 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)
|
||||
}
|
||||
@@ -661,13 +661,13 @@ func (_m *UserStore) GetNewUsersForTeam(teamID string, offset int, limit int, vi
|
||||
return r0, r1
|
||||
}
|
||||
|
||||
// GetProfileByGroupChannelIdsForUser provides a mock function with given fields: userId, channelIds
|
||||
func (_m *UserStore) GetProfileByGroupChannelIdsForUser(userId string, channelIds []string) (map[string][]*model.User, error) {
|
||||
ret := _m.Called(userId, channelIds)
|
||||
// GetProfileByGroupChannelIdsForUser provides a mock function with given fields: userID, channelIds
|
||||
func (_m *UserStore) GetProfileByGroupChannelIdsForUser(userID string, channelIds []string) (map[string][]*model.User, error) {
|
||||
ret := _m.Called(userID, channelIds)
|
||||
|
||||
var r0 map[string][]*model.User
|
||||
if rf, ok := ret.Get(0).(func(string, []string) map[string][]*model.User); ok {
|
||||
r0 = rf(userId, channelIds)
|
||||
r0 = rf(userID, channelIds)
|
||||
} else {
|
||||
if ret.Get(0) != nil {
|
||||
r0 = ret.Get(0).(map[string][]*model.User)
|
||||
@@ -676,7 +676,7 @@ func (_m *UserStore) GetProfileByGroupChannelIdsForUser(userId string, channelId
|
||||
|
||||
var r1 error
|
||||
if rf, ok := ret.Get(1).(func(string, []string) error); ok {
|
||||
r1 = rf(userId, channelIds)
|
||||
r1 = rf(userID, channelIds)
|
||||
} else {
|
||||
r1 = ret.Error(1)
|
||||
}
|
||||
@@ -799,13 +799,13 @@ func (_m *UserStore) GetProfilesInChannelByStatus(options *model.UserGetOptions)
|
||||
return r0, r1
|
||||
}
|
||||
|
||||
// GetProfilesNotInChannel provides a mock function with given fields: teamId, channelId, groupConstrained, offset, limit, viewRestrictions
|
||||
func (_m *UserStore) GetProfilesNotInChannel(teamId string, channelId string, groupConstrained bool, offset int, limit int, viewRestrictions *model.ViewUsersRestrictions) ([]*model.User, error) {
|
||||
ret := _m.Called(teamId, channelId, groupConstrained, offset, limit, viewRestrictions)
|
||||
// GetProfilesNotInChannel provides a mock function with given fields: teamID, channelId, groupConstrained, offset, limit, viewRestrictions
|
||||
func (_m *UserStore) GetProfilesNotInChannel(teamID string, channelId string, groupConstrained bool, offset int, limit int, viewRestrictions *model.ViewUsersRestrictions) ([]*model.User, error) {
|
||||
ret := _m.Called(teamID, channelId, groupConstrained, offset, limit, viewRestrictions)
|
||||
|
||||
var r0 []*model.User
|
||||
if rf, ok := ret.Get(0).(func(string, string, bool, int, int, *model.ViewUsersRestrictions) []*model.User); ok {
|
||||
r0 = rf(teamId, channelId, groupConstrained, offset, limit, viewRestrictions)
|
||||
r0 = rf(teamID, channelId, groupConstrained, offset, limit, viewRestrictions)
|
||||
} else {
|
||||
if ret.Get(0) != nil {
|
||||
r0 = ret.Get(0).([]*model.User)
|
||||
@@ -814,7 +814,7 @@ func (_m *UserStore) GetProfilesNotInChannel(teamId string, channelId string, gr
|
||||
|
||||
var r1 error
|
||||
if rf, ok := ret.Get(1).(func(string, string, bool, int, int, *model.ViewUsersRestrictions) error); ok {
|
||||
r1 = rf(teamId, channelId, groupConstrained, offset, limit, viewRestrictions)
|
||||
r1 = rf(teamID, channelId, groupConstrained, offset, limit, viewRestrictions)
|
||||
} else {
|
||||
r1 = ret.Error(1)
|
||||
}
|
||||
@@ -937,20 +937,20 @@ func (_m *UserStore) GetTeamGroupUsers(teamID string) ([]*model.User, error) {
|
||||
return r0, r1
|
||||
}
|
||||
|
||||
// GetUnreadCount provides a mock function with given fields: userId
|
||||
func (_m *UserStore) GetUnreadCount(userId string) (int64, error) {
|
||||
ret := _m.Called(userId)
|
||||
// GetUnreadCount provides a mock function with given fields: userID
|
||||
func (_m *UserStore) GetUnreadCount(userID string) (int64, error) {
|
||||
ret := _m.Called(userID)
|
||||
|
||||
var r0 int64
|
||||
if rf, ok := ret.Get(0).(func(string) int64); ok {
|
||||
r0 = rf(userId)
|
||||
r0 = rf(userID)
|
||||
} else {
|
||||
r0 = ret.Get(0).(int64)
|
||||
}
|
||||
|
||||
var r1 error
|
||||
if rf, ok := ret.Get(1).(func(string) error); ok {
|
||||
r1 = rf(userId)
|
||||
r1 = rf(userID)
|
||||
} 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)
|
||||
}
|
||||
@@ -1023,9 +1023,9 @@ func (_m *UserStore) InferSystemInstallDate() (int64, error) {
|
||||
return r0, r1
|
||||
}
|
||||
|
||||
// InvalidateProfileCacheForUser provides a mock function with given fields: userId
|
||||
func (_m *UserStore) InvalidateProfileCacheForUser(userId string) {
|
||||
_m.Called(userId)
|
||||
// InvalidateProfileCacheForUser provides a mock function with given fields: userID
|
||||
func (_m *UserStore) InvalidateProfileCacheForUser(userID string) {
|
||||
_m.Called(userID)
|
||||
}
|
||||
|
||||
// InvalidateProfilesInChannelCache provides a mock function with given fields: channelID
|
||||
@@ -1033,18 +1033,18 @@ func (_m *UserStore) InvalidateProfilesInChannelCache(channelID string) {
|
||||
_m.Called(channelID)
|
||||
}
|
||||
|
||||
// InvalidateProfilesInChannelCacheByUser provides a mock function with given fields: userId
|
||||
func (_m *UserStore) InvalidateProfilesInChannelCacheByUser(userId string) {
|
||||
_m.Called(userId)
|
||||
// InvalidateProfilesInChannelCacheByUser provides a mock function with given fields: userID
|
||||
func (_m *UserStore) InvalidateProfilesInChannelCacheByUser(userID string) {
|
||||
_m.Called(userID)
|
||||
}
|
||||
|
||||
// PermanentDelete provides a mock function with given fields: userId
|
||||
func (_m *UserStore) PermanentDelete(userId string) error {
|
||||
ret := _m.Called(userId)
|
||||
// PermanentDelete provides a mock function with given fields: userID
|
||||
func (_m *UserStore) PermanentDelete(userID string) error {
|
||||
ret := _m.Called(userID)
|
||||
|
||||
var r0 error
|
||||
if rf, ok := ret.Get(0).(func(string) error); ok {
|
||||
r0 = rf(userId)
|
||||
r0 = rf(userID)
|
||||
} else {
|
||||
r0 = ret.Error(0)
|
||||
}
|
||||
@@ -1066,13 +1066,13 @@ func (_m *UserStore) PromoteGuestToUser(userID string) error {
|
||||
return r0
|
||||
}
|
||||
|
||||
// ResetLastPictureUpdate provides a mock function with given fields: userId
|
||||
func (_m *UserStore) ResetLastPictureUpdate(userId string) error {
|
||||
ret := _m.Called(userId)
|
||||
// ResetLastPictureUpdate provides a mock function with given fields: userID
|
||||
func (_m *UserStore) ResetLastPictureUpdate(userID string) error {
|
||||
ret := _m.Called(userID)
|
||||
|
||||
var r0 error
|
||||
if rf, ok := ret.Get(0).(func(string) error); ok {
|
||||
r0 = rf(userId)
|
||||
r0 = rf(userID)
|
||||
} else {
|
||||
r0 = ret.Error(0)
|
||||
}
|
||||
@@ -1195,13 +1195,13 @@ func (_m *UserStore) SearchNotInChannel(teamID string, channelID string, term st
|
||||
return r0, r1
|
||||
}
|
||||
|
||||
// SearchNotInTeam provides a mock function with given fields: notInTeamId, term, options
|
||||
func (_m *UserStore) SearchNotInTeam(notInTeamId string, term string, options *model.UserSearchOptions) ([]*model.User, error) {
|
||||
ret := _m.Called(notInTeamId, term, options)
|
||||
// SearchNotInTeam provides a mock function with given fields: notInTeamID, term, options
|
||||
func (_m *UserStore) SearchNotInTeam(notInTeamID string, term string, options *model.UserSearchOptions) ([]*model.User, error) {
|
||||
ret := _m.Called(notInTeamID, term, options)
|
||||
|
||||
var r0 []*model.User
|
||||
if rf, ok := ret.Get(0).(func(string, string, *model.UserSearchOptions) []*model.User); ok {
|
||||
r0 = rf(notInTeamId, term, options)
|
||||
r0 = rf(notInTeamID, term, options)
|
||||
} else {
|
||||
if ret.Get(0) != nil {
|
||||
r0 = ret.Get(0).([]*model.User)
|
||||
@@ -1210,7 +1210,7 @@ func (_m *UserStore) SearchNotInTeam(notInTeamId string, term string, options *m
|
||||
|
||||
var r1 error
|
||||
if rf, ok := ret.Get(1).(func(string, string, *model.UserSearchOptions) error); ok {
|
||||
r1 = rf(notInTeamId, term, options)
|
||||
r1 = rf(notInTeamID, term, options)
|
||||
} else {
|
||||
r1 = ret.Error(1)
|
||||
}
|
||||
@@ -1264,20 +1264,20 @@ func (_m *UserStore) Update(user *model.User, allowRoleUpdate bool) (*model.User
|
||||
return r0, r1
|
||||
}
|
||||
|
||||
// UpdateAuthData provides a mock function with given fields: userId, service, authData, email, resetMfa
|
||||
func (_m *UserStore) UpdateAuthData(userId string, service string, authData *string, email string, resetMfa bool) (string, error) {
|
||||
ret := _m.Called(userId, service, authData, email, resetMfa)
|
||||
// UpdateAuthData provides a mock function with given fields: userID, service, authData, email, resetMfa
|
||||
func (_m *UserStore) UpdateAuthData(userID string, service string, authData *string, email string, resetMfa bool) (string, error) {
|
||||
ret := _m.Called(userID, service, authData, email, resetMfa)
|
||||
|
||||
var r0 string
|
||||
if rf, ok := ret.Get(0).(func(string, string, *string, string, bool) string); ok {
|
||||
r0 = rf(userId, service, authData, email, resetMfa)
|
||||
r0 = rf(userID, service, authData, email, resetMfa)
|
||||
} else {
|
||||
r0 = ret.Get(0).(string)
|
||||
}
|
||||
|
||||
var r1 error
|
||||
if rf, ok := ret.Get(1).(func(string, string, *string, string, bool) error); ok {
|
||||
r1 = rf(userId, service, authData, email, resetMfa)
|
||||
r1 = rf(userID, service, authData, email, resetMfa)
|
||||
} else {
|
||||
r1 = ret.Error(1)
|
||||
}
|
||||
@@ -1285,13 +1285,13 @@ func (_m *UserStore) UpdateAuthData(userId string, service string, authData *str
|
||||
return r0, r1
|
||||
}
|
||||
|
||||
// UpdateFailedPasswordAttempts provides a mock function with given fields: userId, attempts
|
||||
func (_m *UserStore) UpdateFailedPasswordAttempts(userId string, attempts int) error {
|
||||
ret := _m.Called(userId, attempts)
|
||||
// UpdateFailedPasswordAttempts provides a mock function with given fields: userID, attempts
|
||||
func (_m *UserStore) UpdateFailedPasswordAttempts(userID string, attempts int) error {
|
||||
ret := _m.Called(userID, attempts)
|
||||
|
||||
var r0 error
|
||||
if rf, ok := ret.Get(0).(func(string, int) error); ok {
|
||||
r0 = rf(userId, attempts)
|
||||
r0 = rf(userID, attempts)
|
||||
} else {
|
||||
r0 = ret.Error(0)
|
||||
}
|
||||
@@ -1299,13 +1299,13 @@ func (_m *UserStore) UpdateFailedPasswordAttempts(userId string, attempts int) e
|
||||
return r0
|
||||
}
|
||||
|
||||
// UpdateLastPictureUpdate provides a mock function with given fields: userId
|
||||
func (_m *UserStore) UpdateLastPictureUpdate(userId string) error {
|
||||
ret := _m.Called(userId)
|
||||
// UpdateLastPictureUpdate provides a mock function with given fields: userID
|
||||
func (_m *UserStore) UpdateLastPictureUpdate(userID string) error {
|
||||
ret := _m.Called(userID)
|
||||
|
||||
var r0 error
|
||||
if rf, ok := ret.Get(0).(func(string) error); ok {
|
||||
r0 = rf(userId)
|
||||
r0 = rf(userID)
|
||||
} else {
|
||||
r0 = ret.Error(0)
|
||||
}
|
||||
@@ -1313,13 +1313,13 @@ func (_m *UserStore) UpdateLastPictureUpdate(userId string) error {
|
||||
return r0
|
||||
}
|
||||
|
||||
// UpdateMfaActive provides a mock function with given fields: userId, active
|
||||
func (_m *UserStore) UpdateMfaActive(userId string, active bool) error {
|
||||
ret := _m.Called(userId, active)
|
||||
// UpdateMfaActive provides a mock function with given fields: userID, active
|
||||
func (_m *UserStore) UpdateMfaActive(userID string, active bool) error {
|
||||
ret := _m.Called(userID, active)
|
||||
|
||||
var r0 error
|
||||
if rf, ok := ret.Get(0).(func(string, bool) error); ok {
|
||||
r0 = rf(userId, active)
|
||||
r0 = rf(userID, active)
|
||||
} else {
|
||||
r0 = ret.Error(0)
|
||||
}
|
||||
@@ -1327,13 +1327,13 @@ func (_m *UserStore) UpdateMfaActive(userId string, active bool) error {
|
||||
return r0
|
||||
}
|
||||
|
||||
// UpdateMfaSecret provides a mock function with given fields: userId, secret
|
||||
func (_m *UserStore) UpdateMfaSecret(userId string, secret string) error {
|
||||
ret := _m.Called(userId, secret)
|
||||
// UpdateMfaSecret provides a mock function with given fields: userID, secret
|
||||
func (_m *UserStore) UpdateMfaSecret(userID string, secret string) error {
|
||||
ret := _m.Called(userID, secret)
|
||||
|
||||
var r0 error
|
||||
if rf, ok := ret.Get(0).(func(string, string) error); ok {
|
||||
r0 = rf(userId, secret)
|
||||
r0 = rf(userID, secret)
|
||||
} else {
|
||||
r0 = ret.Error(0)
|
||||
}
|
||||
@@ -1341,13 +1341,13 @@ func (_m *UserStore) UpdateMfaSecret(userId string, secret string) error {
|
||||
return r0
|
||||
}
|
||||
|
||||
// UpdatePassword provides a mock function with given fields: userId, newPassword
|
||||
func (_m *UserStore) UpdatePassword(userId string, newPassword string) error {
|
||||
ret := _m.Called(userId, newPassword)
|
||||
// UpdatePassword provides a mock function with given fields: userID, newPassword
|
||||
func (_m *UserStore) UpdatePassword(userID string, newPassword string) error {
|
||||
ret := _m.Called(userID, newPassword)
|
||||
|
||||
var r0 error
|
||||
if rf, ok := ret.Get(0).(func(string, string) error); ok {
|
||||
r0 = rf(userId, newPassword)
|
||||
r0 = rf(userID, newPassword)
|
||||
} else {
|
||||
r0 = ret.Error(0)
|
||||
}
|
||||
@@ -1355,20 +1355,20 @@ func (_m *UserStore) UpdatePassword(userId string, newPassword string) error {
|
||||
return r0
|
||||
}
|
||||
|
||||
// UpdateUpdateAt provides a mock function with given fields: userId
|
||||
func (_m *UserStore) UpdateUpdateAt(userId string) (int64, error) {
|
||||
ret := _m.Called(userId)
|
||||
// UpdateUpdateAt provides a mock function with given fields: userID
|
||||
func (_m *UserStore) UpdateUpdateAt(userID string) (int64, error) {
|
||||
ret := _m.Called(userID)
|
||||
|
||||
var r0 int64
|
||||
if rf, ok := ret.Get(0).(func(string) int64); ok {
|
||||
r0 = rf(userId)
|
||||
r0 = rf(userID)
|
||||
} else {
|
||||
r0 = ret.Get(0).(int64)
|
||||
}
|
||||
|
||||
var r1 error
|
||||
if rf, ok := ret.Get(1).(func(string) error); ok {
|
||||
r1 = rf(userId)
|
||||
r1 = rf(userID)
|
||||
} else {
|
||||
r1 = ret.Error(1)
|
||||
}
|
||||
@@ -1376,20 +1376,20 @@ func (_m *UserStore) UpdateUpdateAt(userId string) (int64, error) {
|
||||
return r0, r1
|
||||
}
|
||||
|
||||
// VerifyEmail provides a mock function with given fields: userId, email
|
||||
func (_m *UserStore) VerifyEmail(userId string, email string) (string, error) {
|
||||
ret := _m.Called(userId, email)
|
||||
// VerifyEmail provides a mock function with given fields: userID, email
|
||||
func (_m *UserStore) VerifyEmail(userID string, email string) (string, error) {
|
||||
ret := _m.Called(userID, email)
|
||||
|
||||
var r0 string
|
||||
if rf, ok := ret.Get(0).(func(string, string) string); ok {
|
||||
r0 = rf(userId, email)
|
||||
r0 = rf(userID, email)
|
||||
} else {
|
||||
r0 = ret.Get(0).(string)
|
||||
}
|
||||
|
||||
var r1 error
|
||||
if rf, ok := ret.Get(1).(func(string, string) error); ok {
|
||||
r1 = rf(userId, email)
|
||||
r1 = rf(userID, email)
|
||||
} else {
|
||||
r1 = ret.Error(1)
|
||||
}
|
||||
|
||||
@@ -14,13 +14,13 @@ type UserTermsOfServiceStore struct {
|
||||
mock.Mock
|
||||
}
|
||||
|
||||
// Delete provides a mock function with given fields: userId, termsOfServiceId
|
||||
func (_m *UserTermsOfServiceStore) Delete(userId string, termsOfServiceId string) error {
|
||||
ret := _m.Called(userId, termsOfServiceId)
|
||||
// Delete provides a mock function with given fields: userID, termsOfServiceId
|
||||
func (_m *UserTermsOfServiceStore) Delete(userID string, termsOfServiceId string) error {
|
||||
ret := _m.Called(userID, termsOfServiceId)
|
||||
|
||||
var r0 error
|
||||
if rf, ok := ret.Get(0).(func(string, string) error); ok {
|
||||
r0 = rf(userId, termsOfServiceId)
|
||||
r0 = rf(userID, termsOfServiceId)
|
||||
} else {
|
||||
r0 = ret.Error(0)
|
||||
}
|
||||
@@ -28,13 +28,13 @@ func (_m *UserTermsOfServiceStore) Delete(userId string, termsOfServiceId string
|
||||
return r0
|
||||
}
|
||||
|
||||
// GetByUser provides a mock function with given fields: userId
|
||||
func (_m *UserTermsOfServiceStore) GetByUser(userId string) (*model.UserTermsOfService, error) {
|
||||
ret := _m.Called(userId)
|
||||
// GetByUser provides a mock function with given fields: userID
|
||||
func (_m *UserTermsOfServiceStore) GetByUser(userID string) (*model.UserTermsOfService, error) {
|
||||
ret := _m.Called(userID)
|
||||
|
||||
var r0 *model.UserTermsOfService
|
||||
if rf, ok := ret.Get(0).(func(string) *model.UserTermsOfService); ok {
|
||||
r0 = rf(userId)
|
||||
r0 = rf(userID)
|
||||
} else {
|
||||
if ret.Get(0) != nil {
|
||||
r0 = ret.Get(0).(*model.UserTermsOfService)
|
||||
@@ -43,7 +43,7 @@ func (_m *UserTermsOfServiceStore) GetByUser(userId string) (*model.UserTermsOfS
|
||||
|
||||
var r1 error
|
||||
if rf, ok := ret.Get(1).(func(string) error); ok {
|
||||
r1 = rf(userId)
|
||||
r1 = rf(userID)
|
||||
} 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)
|
||||
}
|
||||
@@ -204,13 +204,13 @@ func (_m *WebhookStore) GetIncomingList(offset int, limit int) ([]*model.Incomin
|
||||
return r0, r1
|
||||
}
|
||||
|
||||
// GetIncomingListByUser provides a mock function with given fields: userId, offset, limit
|
||||
func (_m *WebhookStore) GetIncomingListByUser(userId string, offset int, limit int) ([]*model.IncomingWebhook, error) {
|
||||
ret := _m.Called(userId, offset, limit)
|
||||
// GetIncomingListByUser provides a mock function with given fields: userID, offset, limit
|
||||
func (_m *WebhookStore) GetIncomingListByUser(userID string, offset int, limit int) ([]*model.IncomingWebhook, error) {
|
||||
ret := _m.Called(userID, offset, limit)
|
||||
|
||||
var r0 []*model.IncomingWebhook
|
||||
if rf, ok := ret.Get(0).(func(string, int, int) []*model.IncomingWebhook); ok {
|
||||
r0 = rf(userId, offset, limit)
|
||||
r0 = rf(userID, offset, limit)
|
||||
} else {
|
||||
if ret.Get(0) != nil {
|
||||
r0 = ret.Get(0).([]*model.IncomingWebhook)
|
||||
@@ -219,7 +219,7 @@ func (_m *WebhookStore) GetIncomingListByUser(userId string, offset int, limit i
|
||||
|
||||
var r1 error
|
||||
if rf, ok := ret.Get(1).(func(string, int, int) error); ok {
|
||||
r1 = rf(userId, offset, limit)
|
||||
r1 = rf(userID, 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)
|
||||
}
|
||||
@@ -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)
|
||||
}
|
||||
@@ -365,13 +365,13 @@ func (_m *WebhookStore) GetOutgoingList(offset int, limit int) ([]*model.Outgoin
|
||||
return r0, r1
|
||||
}
|
||||
|
||||
// GetOutgoingListByUser provides a mock function with given fields: userId, offset, limit
|
||||
func (_m *WebhookStore) GetOutgoingListByUser(userId string, offset int, limit int) ([]*model.OutgoingWebhook, error) {
|
||||
ret := _m.Called(userId, offset, limit)
|
||||
// GetOutgoingListByUser provides a mock function with given fields: userID, offset, limit
|
||||
func (_m *WebhookStore) GetOutgoingListByUser(userID string, offset int, limit int) ([]*model.OutgoingWebhook, error) {
|
||||
ret := _m.Called(userID, offset, limit)
|
||||
|
||||
var r0 []*model.OutgoingWebhook
|
||||
if rf, ok := ret.Get(0).(func(string, int, int) []*model.OutgoingWebhook); ok {
|
||||
r0 = rf(userId, offset, limit)
|
||||
r0 = rf(userID, offset, limit)
|
||||
} else {
|
||||
if ret.Get(0) != nil {
|
||||
r0 = ret.Get(0).([]*model.OutgoingWebhook)
|
||||
@@ -380,7 +380,7 @@ func (_m *WebhookStore) GetOutgoingListByUser(userId string, offset int, limit i
|
||||
|
||||
var r1 error
|
||||
if rf, ok := ret.Get(1).(func(string, int, int) error); ok {
|
||||
r1 = rf(userId, offset, limit)
|
||||
r1 = rf(userID, offset, limit)
|
||||
} else {
|
||||
r1 = ret.Error(1)
|
||||
}
|
||||
@@ -407,13 +407,13 @@ func (_m *WebhookStore) PermanentDeleteIncomingByChannel(channelID string) error
|
||||
return r0
|
||||
}
|
||||
|
||||
// PermanentDeleteIncomingByUser provides a mock function with given fields: userId
|
||||
func (_m *WebhookStore) PermanentDeleteIncomingByUser(userId string) error {
|
||||
ret := _m.Called(userId)
|
||||
// PermanentDeleteIncomingByUser provides a mock function with given fields: userID
|
||||
func (_m *WebhookStore) PermanentDeleteIncomingByUser(userID string) error {
|
||||
ret := _m.Called(userID)
|
||||
|
||||
var r0 error
|
||||
if rf, ok := ret.Get(0).(func(string) error); ok {
|
||||
r0 = rf(userId)
|
||||
r0 = rf(userID)
|
||||
} else {
|
||||
r0 = ret.Error(0)
|
||||
}
|
||||
@@ -435,13 +435,13 @@ func (_m *WebhookStore) PermanentDeleteOutgoingByChannel(channelID string) error
|
||||
return r0
|
||||
}
|
||||
|
||||
// PermanentDeleteOutgoingByUser provides a mock function with given fields: userId
|
||||
func (_m *WebhookStore) PermanentDeleteOutgoingByUser(userId string) error {
|
||||
ret := _m.Called(userId)
|
||||
// PermanentDeleteOutgoingByUser provides a mock function with given fields: userID
|
||||
func (_m *WebhookStore) PermanentDeleteOutgoingByUser(userID string) error {
|
||||
ret := _m.Called(userID)
|
||||
|
||||
var r0 error
|
||||
if rf, ok := ret.Get(0).(func(string) error); ok {
|
||||
r0 = rf(userId)
|
||||
r0 = rf(userID)
|
||||
} else {
|
||||
r0 = ret.Error(0)
|
||||
}
|
||||
|
||||
Разница между файлами не показана из-за своего большого размера
Загрузить разницу
@@ -854,7 +854,7 @@ type simple struct {
|
||||
I int
|
||||
f float64
|
||||
fp *float64
|
||||
Ip *int
|
||||
IP *int
|
||||
B *bool
|
||||
Sli []int
|
||||
Msi map[string]int
|
||||
@@ -981,8 +981,8 @@ func TestMergeWithSimpleStruct(t *testing.T) {
|
||||
assert.NotEqual(t, *t1.S2.S, *t2.S2.S)
|
||||
|
||||
// changes in merged (on pointers that were cloned from base or patch) do not affect base or patch
|
||||
*merged.Ip = 0
|
||||
assert.Equal(t, 99, *t1.Ip)
|
||||
*merged.IP = 0
|
||||
assert.Equal(t, 99, *t1.IP)
|
||||
*merged.S2.S = "testMERGED"
|
||||
assert.NotEqual(t, *t2.S2.S, *merged.S2.S)
|
||||
})
|
||||
@@ -1096,7 +1096,7 @@ func TestMergeWithVeryComplexStruct(t *testing.T) {
|
||||
|
||||
base.F = 1342.12
|
||||
base.Struct1.Pi = newInt(937)
|
||||
base.Struct1p.Ui = 734
|
||||
base.Struct1p.UI = 734
|
||||
base.Struct1.Struct2.Sli = []int{123123, 1243123}
|
||||
|
||||
merged, err := mergeTestStructs(base, patch)
|
||||
@@ -1203,11 +1203,11 @@ type testStruct struct {
|
||||
F float64
|
||||
F32 float32
|
||||
S string
|
||||
Ui uint
|
||||
Ui8 uint8
|
||||
Ui16 uint32
|
||||
Ui32 uint32
|
||||
Ui64 uint64
|
||||
UI uint
|
||||
UI8 uint8
|
||||
UI16 uint32
|
||||
UI32 uint32
|
||||
UI64 uint64
|
||||
Pi *int
|
||||
Pi8 *int8
|
||||
Pi16 *int16
|
||||
@@ -1241,11 +1241,11 @@ type testStructEmbed struct {
|
||||
F float64
|
||||
F32 float32
|
||||
S string
|
||||
Ui uint
|
||||
Ui8 uint8
|
||||
Ui16 uint32
|
||||
Ui32 uint32
|
||||
Ui64 uint64
|
||||
UI uint
|
||||
UI8 uint8
|
||||
UI16 uint32
|
||||
UI32 uint32
|
||||
UI64 uint64
|
||||
Pi *int
|
||||
Pi8 *int8
|
||||
Pi16 *int16
|
||||
@@ -1279,11 +1279,11 @@ type testStructEmbed2 struct {
|
||||
F float64
|
||||
F32 float32
|
||||
S string
|
||||
Ui uint
|
||||
Ui8 uint8
|
||||
Ui16 uint32
|
||||
Ui32 uint32
|
||||
Ui64 uint64
|
||||
UI uint
|
||||
UI8 uint8
|
||||
UI16 uint32
|
||||
UI32 uint32
|
||||
UI64 uint64
|
||||
Pi *int
|
||||
Pi8 *int8
|
||||
Pi16 *int16
|
||||
|
||||
@@ -106,12 +106,12 @@ func TestUpdateAssetsSubpath(t *testing.T) {
|
||||
},
|
||||
{
|
||||
"content security policy not found (missing quotes)",
|
||||
contentSecurityPolicyNotFoundHtml,
|
||||
contentSecurityPolicyNotFoundHTML,
|
||||
baseCss,
|
||||
baseManifestJSON,
|
||||
"/subpath",
|
||||
fmt.Errorf("failed to find 'Content-Security-Policy' meta tag to rewrite"),
|
||||
contentSecurityPolicyNotFoundHtml,
|
||||
contentSecurityPolicyNotFoundHTML,
|
||||
baseCss,
|
||||
baseManifestJSON,
|
||||
},
|
||||
@@ -135,18 +135,18 @@ func TestUpdateAssetsSubpath(t *testing.T) {
|
||||
nil,
|
||||
subpathRootHtml,
|
||||
subpathCSS,
|
||||
subpathManifestJson,
|
||||
subpathManifestJSON,
|
||||
},
|
||||
{
|
||||
"new subpath from old",
|
||||
subpathRootHtml,
|
||||
subpathCSS,
|
||||
subpathManifestJson,
|
||||
subpathManifestJSON,
|
||||
"/nested/subpath",
|
||||
nil,
|
||||
newSubpathRootHTML,
|
||||
newSubpathCSS,
|
||||
newSubpathManifestJson,
|
||||
newSubpathManifestJSON,
|
||||
},
|
||||
{
|
||||
"resetting to /",
|
||||
@@ -268,7 +268,7 @@ func sToP(s string) *string {
|
||||
return &s
|
||||
}
|
||||
|
||||
const contentSecurityPolicyNotFoundHtml = `<!DOCTYPE html> <html lang=en> <head> <meta charset=utf-8> <meta http-equiv=Content-Security-Policy content="script-src 'self' cdn.rudderlabs.com/ js.stripe.com/v3"> <meta http-equiv=X-UA-Compatible content="IE=edge"> <meta name=viewport content="width=device-width,initial-scale=1,maximum-scale=1,user-scalable=0"> <meta name=robots content="noindex, nofollow"> <meta name=referrer content=no-referrer> <title>Mattermost</title> <meta name=apple-mobile-web-app-capable content=yes> <meta name=apple-mobile-web-app-status-bar-style content=default> <meta name=mobile-web-app-capable content=yes> <meta name=apple-mobile-web-app-title content=Mattermost> <meta name=application-name content=Mattermost> <meta name=format-detection content="telephone=no"> <link rel=apple-touch-icon sizes=57x57 href=/static/files/78b7e73b41b8731ce2c41c870ecc8886.png> <link rel=apple-touch-icon sizes=60x60 href=/static/files/51d00ffd13afb6d74fd8f6dfdeef768a.png> <link rel=apple-touch-icon sizes=72x72 href=/static/files/23645596f8f78f017bd4d457abb855c4.png> <link rel=apple-touch-icon sizes=76x76 href=/static/files/26e9d72f472663a00b4b206149459fab.png> <link rel=apple-touch-icon sizes=144x144 href=/static/files/7bd91659bf3fc8c68fcd45fc1db9c630.png> <link rel=apple-touch-icon sizes=120x120 href=/static/files/fa69ffe11eb334aaef5aece8d848ca62.png> <link rel=apple-touch-icon sizes=152x152 href=/static/files/f046777feb6ab12fc43b8f9908b1db35.png> <link rel=icon type=image/png sizes=16x16 href=/static/files/02b96247d275680adaaabf01c71c571d.png> <link rel=icon type=image/png sizes=32x32 href=/static/files/1d9020f201a6762421cab8d30624fdd8.png> <link rel=icon type=image/png sizes=96x96 href=/static/files/fe23af39ae98d77dc26ae8586565970f.png> <link rel=icon type=image/png sizes=192x192 href=/static/files/d7ff68a7675f84337cc154c3d4abe713.png> <link rel=manifest href=/static/files/a985ad72552ad069537d6eea81e719c7.json> <link rel=stylesheet class=code_theme> <style>.error-screen{font-family:'Helvetica Neue',Helvetica,Arial,sans-serif;padding-top:50px;max-width:750px;font-size:14px;color:#333;margin:auto;display:none;line-height:1.5}.error-screen h2{font-size:30px;font-weight:400;line-height:1.2}.error-screen ul{padding-left:15px;line-height:1.7;margin-top:0;margin-bottom:10px}.error-screen hr{color:#ddd;margin-top:20px;margin-bottom:20px;border:0;border-top:1px solid #eee}.error-screen-visible{display:block}</style> <link href="/static/main.364fd054d7a6d741efc6.css" rel="stylesheet"><script type="text/javascript" src="/static/main.e49599ac425584ffead5.js"></script></head> <body class=font--open_sans> <div id=root> <div class=error-screen> <h2>Cannot connect to Mattermost</h2> <hr/> <p>We're having trouble connecting to Mattermost. If refreshing this page (Ctrl+R or Command+R) does not work, please verify that your computer is connected to the internet.</p> <br/> </div> <div class=loading-screen style=position:relative> <div class=loading__content> <div class="round round-1"></div> <div class="round round-2"></div> <div class="round round-3"></div> </div> </div> </div> <noscript> To use Mattermost, please enable JavaScript. </noscript> </body> </html>`
|
||||
const contentSecurityPolicyNotFoundHTML = `<!DOCTYPE html> <html lang=en> <head> <meta charset=utf-8> <meta http-equiv=Content-Security-Policy content="script-src 'self' cdn.rudderlabs.com/ js.stripe.com/v3"> <meta http-equiv=X-UA-Compatible content="IE=edge"> <meta name=viewport content="width=device-width,initial-scale=1,maximum-scale=1,user-scalable=0"> <meta name=robots content="noindex, nofollow"> <meta name=referrer content=no-referrer> <title>Mattermost</title> <meta name=apple-mobile-web-app-capable content=yes> <meta name=apple-mobile-web-app-status-bar-style content=default> <meta name=mobile-web-app-capable content=yes> <meta name=apple-mobile-web-app-title content=Mattermost> <meta name=application-name content=Mattermost> <meta name=format-detection content="telephone=no"> <link rel=apple-touch-icon sizes=57x57 href=/static/files/78b7e73b41b8731ce2c41c870ecc8886.png> <link rel=apple-touch-icon sizes=60x60 href=/static/files/51d00ffd13afb6d74fd8f6dfdeef768a.png> <link rel=apple-touch-icon sizes=72x72 href=/static/files/23645596f8f78f017bd4d457abb855c4.png> <link rel=apple-touch-icon sizes=76x76 href=/static/files/26e9d72f472663a00b4b206149459fab.png> <link rel=apple-touch-icon sizes=144x144 href=/static/files/7bd91659bf3fc8c68fcd45fc1db9c630.png> <link rel=apple-touch-icon sizes=120x120 href=/static/files/fa69ffe11eb334aaef5aece8d848ca62.png> <link rel=apple-touch-icon sizes=152x152 href=/static/files/f046777feb6ab12fc43b8f9908b1db35.png> <link rel=icon type=image/png sizes=16x16 href=/static/files/02b96247d275680adaaabf01c71c571d.png> <link rel=icon type=image/png sizes=32x32 href=/static/files/1d9020f201a6762421cab8d30624fdd8.png> <link rel=icon type=image/png sizes=96x96 href=/static/files/fe23af39ae98d77dc26ae8586565970f.png> <link rel=icon type=image/png sizes=192x192 href=/static/files/d7ff68a7675f84337cc154c3d4abe713.png> <link rel=manifest href=/static/files/a985ad72552ad069537d6eea81e719c7.json> <link rel=stylesheet class=code_theme> <style>.error-screen{font-family:'Helvetica Neue',Helvetica,Arial,sans-serif;padding-top:50px;max-width:750px;font-size:14px;color:#333;margin:auto;display:none;line-height:1.5}.error-screen h2{font-size:30px;font-weight:400;line-height:1.2}.error-screen ul{padding-left:15px;line-height:1.7;margin-top:0;margin-bottom:10px}.error-screen hr{color:#ddd;margin-top:20px;margin-bottom:20px;border:0;border-top:1px solid #eee}.error-screen-visible{display:block}</style> <link href="/static/main.364fd054d7a6d741efc6.css" rel="stylesheet"><script type="text/javascript" src="/static/main.e49599ac425584ffead5.js"></script></head> <body class=font--open_sans> <div id=root> <div class=error-screen> <h2>Cannot connect to Mattermost</h2> <hr/> <p>We're having trouble connecting to Mattermost. If refreshing this page (Ctrl+R or Command+R) does not work, please verify that your computer is connected to the internet.</p> <br/> </div> <div class=loading-screen style=position:relative> <div class=loading__content> <div class="round round-1"></div> <div class="round round-2"></div> <div class="round round-3"></div> </div> </div> </div> <noscript> To use Mattermost, please enable JavaScript. </noscript> </body> </html>`
|
||||
|
||||
const contentSecurityPolicyNotFound2Html = `<!DOCTYPE html> <html lang=en> <head> <meta charset=utf-8> <meta http-equiv=Content-Security-Policy content="script-src 'self' cdn.rudderlabs.com/ js.stripe.com/v3 'unsafe-eval'"> <meta http-equiv=X-UA-Compatible content="IE=edge"> <meta name=viewport content="width=device-width,initial-scale=1,maximum-scale=1,user-scalable=0"> <meta name=robots content="noindex, nofollow"> <meta name=referrer content=no-referrer> <title>Mattermost</title> <meta name=apple-mobile-web-app-capable content=yes> <meta name=apple-mobile-web-app-status-bar-style content=default> <meta name=mobile-web-app-capable content=yes> <meta name=apple-mobile-web-app-title content=Mattermost> <meta name=application-name content=Mattermost> <meta name=format-detection content="telephone=no"> <link rel=apple-touch-icon sizes=57x57 href=/static/files/78b7e73b41b8731ce2c41c870ecc8886.png> <link rel=apple-touch-icon sizes=60x60 href=/static/files/51d00ffd13afb6d74fd8f6dfdeef768a.png> <link rel=apple-touch-icon sizes=72x72 href=/static/files/23645596f8f78f017bd4d457abb855c4.png> <link rel=apple-touch-icon sizes=76x76 href=/static/files/26e9d72f472663a00b4b206149459fab.png> <link rel=apple-touch-icon sizes=144x144 href=/static/files/7bd91659bf3fc8c68fcd45fc1db9c630.png> <link rel=apple-touch-icon sizes=120x120 href=/static/files/fa69ffe11eb334aaef5aece8d848ca62.png> <link rel=apple-touch-icon sizes=152x152 href=/static/files/f046777feb6ab12fc43b8f9908b1db35.png> <link rel=icon type=image/png sizes=16x16 href=/static/files/02b96247d275680adaaabf01c71c571d.png> <link rel=icon type=image/png sizes=32x32 href=/static/files/1d9020f201a6762421cab8d30624fdd8.png> <link rel=icon type=image/png sizes=96x96 href=/static/files/fe23af39ae98d77dc26ae8586565970f.png> <link rel=icon type=image/png sizes=192x192 href=/static/files/d7ff68a7675f84337cc154c3d4abe713.png> <link rel=manifest href=/static/files/a985ad72552ad069537d6eea81e719c7.json> <link rel=stylesheet class=code_theme> <style>.error-screen{font-family:'Helvetica Neue',Helvetica,Arial,sans-serif;padding-top:50px;max-width:750px;font-size:14px;color:#333;margin:auto;display:none;line-height:1.5}.error-screen h2{font-size:30px;font-weight:400;line-height:1.2}.error-screen ul{padding-left:15px;line-height:1.7;margin-top:0;margin-bottom:10px}.error-screen hr{color:#ddd;margin-top:20px;margin-bottom:20px;border:0;border-top:1px solid #eee}.error-screen-visible{display:block}</style> <link href="/static/main.364fd054d7a6d741efc6.css" rel="stylesheet"><script type="text/javascript" src="/static/main.e49599ac425584ffead5.js"></script></head> <body class=font--open_sans> <div id=root> <div class=error-screen> <h2>Cannot connect to Mattermost</h2> <hr/> <p>We're having trouble connecting to Mattermost. If refreshing this page (Ctrl+R or Command+R) does not work, please verify that your computer is connected to the internet.</p> <br/> </div> <div class=loading-screen style=position:relative> <div class=loading__content> <div class="round round-1"></div> <div class="round round-2"></div> <div class="round round-3"></div> </div> </div> </div> <noscript> To use Mattermost, please enable JavaScript. </noscript> </body> </html>`
|
||||
|
||||
@@ -352,7 +352,7 @@ const baseManifestJSON = `{
|
||||
}
|
||||
`
|
||||
|
||||
const subpathManifestJson = `{
|
||||
const subpathManifestJSON = `{
|
||||
"icons": [
|
||||
{
|
||||
"src": "/subpath/static/icon_96x96.png",
|
||||
@@ -420,7 +420,7 @@ const subpathManifestJson = `{
|
||||
}
|
||||
`
|
||||
|
||||
const newSubpathManifestJson = `{
|
||||
const newSubpathManifestJSON = `{
|
||||
"icons": [
|
||||
{
|
||||
"src": "/nested/subpath/static/icon_96x96.png",
|
||||
|
||||
@@ -177,8 +177,8 @@ func GetURLWithCache(url string, cache *RequestCache, skip bool) ([]byte, error)
|
||||
}
|
||||
|
||||
// Append tokens to passed baseUrl as query params
|
||||
func AppendQueryParamsToURL(baseUrl string, params map[string]string) string {
|
||||
u, err := url.Parse(baseUrl)
|
||||
func AppendQueryParamsToURL(baseURL string, params map[string]string) string {
|
||||
u, err := url.Parse(baseURL)
|
||||
if err != nil {
|
||||
return ""
|
||||
}
|
||||
|
||||
@@ -163,10 +163,10 @@ func TestRemoveStringFromSlice(t *testing.T) {
|
||||
|
||||
func TestAppendQueryParamsToURL(t *testing.T) {
|
||||
url := "mattermost://callback"
|
||||
redirectUrl := AppendQueryParamsToURL(url, map[string]string{
|
||||
redirectURL := AppendQueryParamsToURL(url, map[string]string{
|
||||
"key1": "value1",
|
||||
"key2": "value2",
|
||||
})
|
||||
expected := url + "?key1=value1&key2=value2"
|
||||
assert.Equal(t, redirectUrl, expected)
|
||||
assert.Equal(t, redirectURL, expected)
|
||||
}
|
||||
|
||||
Ссылка в новой задаче
Block a user