Full Mattermost server source with integrated Community Enterprise features. Includes vendor directory for offline/air-gapped builds. Structure: - enterprise-impl/: Enterprise feature implementations - enterprise-community/: Init files that register implementations - enterprise/: Bridge imports (community_imports.go) - vendor/: All dependencies for offline builds Build (online): go build ./cmd/mattermost Build (offline/air-gapped): go build -mod=vendor ./cmd/mattermost 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
804 lines
24 KiB
Go
804 lines
24 KiB
Go
// Code generated by mockery v2.53.4. DO NOT EDIT.
|
|
|
|
// Regenerate this file using `make sharedchannel-mocks`.
|
|
|
|
package sharedchannel
|
|
|
|
import (
|
|
filestore "github.com/mattermost/mattermost/server/v8/platform/shared/filestore"
|
|
mock "github.com/stretchr/testify/mock"
|
|
|
|
model "github.com/mattermost/mattermost/server/public/model"
|
|
|
|
request "github.com/mattermost/mattermost/server/public/shared/request"
|
|
)
|
|
|
|
// MockAppIface is an autogenerated mock type for the AppIface type
|
|
type MockAppIface struct {
|
|
mock.Mock
|
|
}
|
|
|
|
// AddUserToChannel provides a mock function with given fields: rctx, user, channel, skipTeamMemberIntegrityCheck
|
|
func (_m *MockAppIface) AddUserToChannel(rctx request.CTX, user *model.User, channel *model.Channel, skipTeamMemberIntegrityCheck bool) (*model.ChannelMember, *model.AppError) {
|
|
ret := _m.Called(rctx, user, channel, skipTeamMemberIntegrityCheck)
|
|
|
|
if len(ret) == 0 {
|
|
panic("no return value specified for AddUserToChannel")
|
|
}
|
|
|
|
var r0 *model.ChannelMember
|
|
var r1 *model.AppError
|
|
if rf, ok := ret.Get(0).(func(request.CTX, *model.User, *model.Channel, bool) (*model.ChannelMember, *model.AppError)); ok {
|
|
return rf(rctx, user, channel, skipTeamMemberIntegrityCheck)
|
|
}
|
|
if rf, ok := ret.Get(0).(func(request.CTX, *model.User, *model.Channel, bool) *model.ChannelMember); ok {
|
|
r0 = rf(rctx, user, channel, skipTeamMemberIntegrityCheck)
|
|
} else {
|
|
if ret.Get(0) != nil {
|
|
r0 = ret.Get(0).(*model.ChannelMember)
|
|
}
|
|
}
|
|
|
|
if rf, ok := ret.Get(1).(func(request.CTX, *model.User, *model.Channel, bool) *model.AppError); ok {
|
|
r1 = rf(rctx, user, channel, skipTeamMemberIntegrityCheck)
|
|
} else {
|
|
if ret.Get(1) != nil {
|
|
r1 = ret.Get(1).(*model.AppError)
|
|
}
|
|
}
|
|
|
|
return r0, r1
|
|
}
|
|
|
|
// AddUserToTeamByTeamId provides a mock function with given fields: rctx, teamId, user
|
|
func (_m *MockAppIface) AddUserToTeamByTeamId(rctx request.CTX, teamId string, user *model.User) *model.AppError {
|
|
ret := _m.Called(rctx, teamId, user)
|
|
|
|
if len(ret) == 0 {
|
|
panic("no return value specified for AddUserToTeamByTeamId")
|
|
}
|
|
|
|
var r0 *model.AppError
|
|
if rf, ok := ret.Get(0).(func(request.CTX, string, *model.User) *model.AppError); ok {
|
|
r0 = rf(rctx, teamId, user)
|
|
} else {
|
|
if ret.Get(0) != nil {
|
|
r0 = ret.Get(0).(*model.AppError)
|
|
}
|
|
}
|
|
|
|
return r0
|
|
}
|
|
|
|
// CreateChannelWithUser provides a mock function with given fields: rctx, channel, userId
|
|
func (_m *MockAppIface) CreateChannelWithUser(rctx request.CTX, channel *model.Channel, userId string) (*model.Channel, *model.AppError) {
|
|
ret := _m.Called(rctx, channel, userId)
|
|
|
|
if len(ret) == 0 {
|
|
panic("no return value specified for CreateChannelWithUser")
|
|
}
|
|
|
|
var r0 *model.Channel
|
|
var r1 *model.AppError
|
|
if rf, ok := ret.Get(0).(func(request.CTX, *model.Channel, string) (*model.Channel, *model.AppError)); ok {
|
|
return rf(rctx, channel, userId)
|
|
}
|
|
if rf, ok := ret.Get(0).(func(request.CTX, *model.Channel, string) *model.Channel); ok {
|
|
r0 = rf(rctx, channel, userId)
|
|
} else {
|
|
if ret.Get(0) != nil {
|
|
r0 = ret.Get(0).(*model.Channel)
|
|
}
|
|
}
|
|
|
|
if rf, ok := ret.Get(1).(func(request.CTX, *model.Channel, string) *model.AppError); ok {
|
|
r1 = rf(rctx, channel, userId)
|
|
} else {
|
|
if ret.Get(1) != nil {
|
|
r1 = ret.Get(1).(*model.AppError)
|
|
}
|
|
}
|
|
|
|
return r0, r1
|
|
}
|
|
|
|
// CreateGroupChannel provides a mock function with given fields: rctx, userIDs, creatorId, channelOptions
|
|
func (_m *MockAppIface) CreateGroupChannel(rctx request.CTX, userIDs []string, creatorId string, channelOptions ...model.ChannelOption) (*model.Channel, *model.AppError) {
|
|
_va := make([]interface{}, len(channelOptions))
|
|
for _i := range channelOptions {
|
|
_va[_i] = channelOptions[_i]
|
|
}
|
|
var _ca []interface{}
|
|
_ca = append(_ca, rctx, userIDs, creatorId)
|
|
_ca = append(_ca, _va...)
|
|
ret := _m.Called(_ca...)
|
|
|
|
if len(ret) == 0 {
|
|
panic("no return value specified for CreateGroupChannel")
|
|
}
|
|
|
|
var r0 *model.Channel
|
|
var r1 *model.AppError
|
|
if rf, ok := ret.Get(0).(func(request.CTX, []string, string, ...model.ChannelOption) (*model.Channel, *model.AppError)); ok {
|
|
return rf(rctx, userIDs, creatorId, channelOptions...)
|
|
}
|
|
if rf, ok := ret.Get(0).(func(request.CTX, []string, string, ...model.ChannelOption) *model.Channel); ok {
|
|
r0 = rf(rctx, userIDs, creatorId, channelOptions...)
|
|
} else {
|
|
if ret.Get(0) != nil {
|
|
r0 = ret.Get(0).(*model.Channel)
|
|
}
|
|
}
|
|
|
|
if rf, ok := ret.Get(1).(func(request.CTX, []string, string, ...model.ChannelOption) *model.AppError); ok {
|
|
r1 = rf(rctx, userIDs, creatorId, channelOptions...)
|
|
} else {
|
|
if ret.Get(1) != nil {
|
|
r1 = ret.Get(1).(*model.AppError)
|
|
}
|
|
}
|
|
|
|
return r0, r1
|
|
}
|
|
|
|
// CreatePost provides a mock function with given fields: rctx, post, channel, flags
|
|
func (_m *MockAppIface) CreatePost(rctx request.CTX, post *model.Post, channel *model.Channel, flags model.CreatePostFlags) (*model.Post, *model.AppError) {
|
|
ret := _m.Called(rctx, post, channel, flags)
|
|
|
|
if len(ret) == 0 {
|
|
panic("no return value specified for CreatePost")
|
|
}
|
|
|
|
var r0 *model.Post
|
|
var r1 *model.AppError
|
|
if rf, ok := ret.Get(0).(func(request.CTX, *model.Post, *model.Channel, model.CreatePostFlags) (*model.Post, *model.AppError)); ok {
|
|
return rf(rctx, post, channel, flags)
|
|
}
|
|
if rf, ok := ret.Get(0).(func(request.CTX, *model.Post, *model.Channel, model.CreatePostFlags) *model.Post); ok {
|
|
r0 = rf(rctx, post, channel, flags)
|
|
} else {
|
|
if ret.Get(0) != nil {
|
|
r0 = ret.Get(0).(*model.Post)
|
|
}
|
|
}
|
|
|
|
if rf, ok := ret.Get(1).(func(request.CTX, *model.Post, *model.Channel, model.CreatePostFlags) *model.AppError); ok {
|
|
r1 = rf(rctx, post, channel, flags)
|
|
} else {
|
|
if ret.Get(1) != nil {
|
|
r1 = ret.Get(1).(*model.AppError)
|
|
}
|
|
}
|
|
|
|
return r0, r1
|
|
}
|
|
|
|
// CreateUploadSession provides a mock function with given fields: rctx, us
|
|
func (_m *MockAppIface) CreateUploadSession(rctx request.CTX, us *model.UploadSession) (*model.UploadSession, *model.AppError) {
|
|
ret := _m.Called(rctx, us)
|
|
|
|
if len(ret) == 0 {
|
|
panic("no return value specified for CreateUploadSession")
|
|
}
|
|
|
|
var r0 *model.UploadSession
|
|
var r1 *model.AppError
|
|
if rf, ok := ret.Get(0).(func(request.CTX, *model.UploadSession) (*model.UploadSession, *model.AppError)); ok {
|
|
return rf(rctx, us)
|
|
}
|
|
if rf, ok := ret.Get(0).(func(request.CTX, *model.UploadSession) *model.UploadSession); ok {
|
|
r0 = rf(rctx, us)
|
|
} else {
|
|
if ret.Get(0) != nil {
|
|
r0 = ret.Get(0).(*model.UploadSession)
|
|
}
|
|
}
|
|
|
|
if rf, ok := ret.Get(1).(func(request.CTX, *model.UploadSession) *model.AppError); ok {
|
|
r1 = rf(rctx, us)
|
|
} else {
|
|
if ret.Get(1) != nil {
|
|
r1 = ret.Get(1).(*model.AppError)
|
|
}
|
|
}
|
|
|
|
return r0, r1
|
|
}
|
|
|
|
// DeleteAcknowledgementForPostWithModel provides a mock function with given fields: rctx, acknowledgement
|
|
func (_m *MockAppIface) DeleteAcknowledgementForPostWithModel(rctx request.CTX, acknowledgement *model.PostAcknowledgement) *model.AppError {
|
|
ret := _m.Called(rctx, acknowledgement)
|
|
|
|
if len(ret) == 0 {
|
|
panic("no return value specified for DeleteAcknowledgementForPostWithModel")
|
|
}
|
|
|
|
var r0 *model.AppError
|
|
if rf, ok := ret.Get(0).(func(request.CTX, *model.PostAcknowledgement) *model.AppError); ok {
|
|
r0 = rf(rctx, acknowledgement)
|
|
} else {
|
|
if ret.Get(0) != nil {
|
|
r0 = ret.Get(0).(*model.AppError)
|
|
}
|
|
}
|
|
|
|
return r0
|
|
}
|
|
|
|
// DeletePost provides a mock function with given fields: rctx, postID, deleteByID
|
|
func (_m *MockAppIface) DeletePost(rctx request.CTX, postID string, deleteByID string) (*model.Post, *model.AppError) {
|
|
ret := _m.Called(rctx, postID, deleteByID)
|
|
|
|
if len(ret) == 0 {
|
|
panic("no return value specified for DeletePost")
|
|
}
|
|
|
|
var r0 *model.Post
|
|
var r1 *model.AppError
|
|
if rf, ok := ret.Get(0).(func(request.CTX, string, string) (*model.Post, *model.AppError)); ok {
|
|
return rf(rctx, postID, deleteByID)
|
|
}
|
|
if rf, ok := ret.Get(0).(func(request.CTX, string, string) *model.Post); ok {
|
|
r0 = rf(rctx, postID, deleteByID)
|
|
} else {
|
|
if ret.Get(0) != nil {
|
|
r0 = ret.Get(0).(*model.Post)
|
|
}
|
|
}
|
|
|
|
if rf, ok := ret.Get(1).(func(request.CTX, string, string) *model.AppError); ok {
|
|
r1 = rf(rctx, postID, deleteByID)
|
|
} else {
|
|
if ret.Get(1) != nil {
|
|
r1 = ret.Get(1).(*model.AppError)
|
|
}
|
|
}
|
|
|
|
return r0, r1
|
|
}
|
|
|
|
// DeleteReactionForPost provides a mock function with given fields: rctx, reaction
|
|
func (_m *MockAppIface) DeleteReactionForPost(rctx request.CTX, reaction *model.Reaction) *model.AppError {
|
|
ret := _m.Called(rctx, reaction)
|
|
|
|
if len(ret) == 0 {
|
|
panic("no return value specified for DeleteReactionForPost")
|
|
}
|
|
|
|
var r0 *model.AppError
|
|
if rf, ok := ret.Get(0).(func(request.CTX, *model.Reaction) *model.AppError); ok {
|
|
r0 = rf(rctx, reaction)
|
|
} else {
|
|
if ret.Get(0) != nil {
|
|
r0 = ret.Get(0).(*model.AppError)
|
|
}
|
|
}
|
|
|
|
return r0
|
|
}
|
|
|
|
// FileReader provides a mock function with given fields: path
|
|
func (_m *MockAppIface) FileReader(path string) (filestore.ReadCloseSeeker, *model.AppError) {
|
|
ret := _m.Called(path)
|
|
|
|
if len(ret) == 0 {
|
|
panic("no return value specified for FileReader")
|
|
}
|
|
|
|
var r0 filestore.ReadCloseSeeker
|
|
var r1 *model.AppError
|
|
if rf, ok := ret.Get(0).(func(string) (filestore.ReadCloseSeeker, *model.AppError)); ok {
|
|
return rf(path)
|
|
}
|
|
if rf, ok := ret.Get(0).(func(string) filestore.ReadCloseSeeker); ok {
|
|
r0 = rf(path)
|
|
} else {
|
|
if ret.Get(0) != nil {
|
|
r0 = ret.Get(0).(filestore.ReadCloseSeeker)
|
|
}
|
|
}
|
|
|
|
if rf, ok := ret.Get(1).(func(string) *model.AppError); ok {
|
|
r1 = rf(path)
|
|
} else {
|
|
if ret.Get(1) != nil {
|
|
r1 = ret.Get(1).(*model.AppError)
|
|
}
|
|
}
|
|
|
|
return r0, r1
|
|
}
|
|
|
|
// GetAcknowledgementsForPost provides a mock function with given fields: postID
|
|
func (_m *MockAppIface) GetAcknowledgementsForPost(postID string) ([]*model.PostAcknowledgement, *model.AppError) {
|
|
ret := _m.Called(postID)
|
|
|
|
if len(ret) == 0 {
|
|
panic("no return value specified for GetAcknowledgementsForPost")
|
|
}
|
|
|
|
var r0 []*model.PostAcknowledgement
|
|
var r1 *model.AppError
|
|
if rf, ok := ret.Get(0).(func(string) ([]*model.PostAcknowledgement, *model.AppError)); ok {
|
|
return rf(postID)
|
|
}
|
|
if rf, ok := ret.Get(0).(func(string) []*model.PostAcknowledgement); ok {
|
|
r0 = rf(postID)
|
|
} else {
|
|
if ret.Get(0) != nil {
|
|
r0 = ret.Get(0).([]*model.PostAcknowledgement)
|
|
}
|
|
}
|
|
|
|
if rf, ok := ret.Get(1).(func(string) *model.AppError); ok {
|
|
r1 = rf(postID)
|
|
} else {
|
|
if ret.Get(1) != nil {
|
|
r1 = ret.Get(1).(*model.AppError)
|
|
}
|
|
}
|
|
|
|
return r0, r1
|
|
}
|
|
|
|
// GetOrCreateDirectChannel provides a mock function with given fields: rctx, userId, otherUserId, channelOptions
|
|
func (_m *MockAppIface) GetOrCreateDirectChannel(rctx request.CTX, userId string, otherUserId string, channelOptions ...model.ChannelOption) (*model.Channel, *model.AppError) {
|
|
_va := make([]interface{}, len(channelOptions))
|
|
for _i := range channelOptions {
|
|
_va[_i] = channelOptions[_i]
|
|
}
|
|
var _ca []interface{}
|
|
_ca = append(_ca, rctx, userId, otherUserId)
|
|
_ca = append(_ca, _va...)
|
|
ret := _m.Called(_ca...)
|
|
|
|
if len(ret) == 0 {
|
|
panic("no return value specified for GetOrCreateDirectChannel")
|
|
}
|
|
|
|
var r0 *model.Channel
|
|
var r1 *model.AppError
|
|
if rf, ok := ret.Get(0).(func(request.CTX, string, string, ...model.ChannelOption) (*model.Channel, *model.AppError)); ok {
|
|
return rf(rctx, userId, otherUserId, channelOptions...)
|
|
}
|
|
if rf, ok := ret.Get(0).(func(request.CTX, string, string, ...model.ChannelOption) *model.Channel); ok {
|
|
r0 = rf(rctx, userId, otherUserId, channelOptions...)
|
|
} else {
|
|
if ret.Get(0) != nil {
|
|
r0 = ret.Get(0).(*model.Channel)
|
|
}
|
|
}
|
|
|
|
if rf, ok := ret.Get(1).(func(request.CTX, string, string, ...model.ChannelOption) *model.AppError); ok {
|
|
r1 = rf(rctx, userId, otherUserId, channelOptions...)
|
|
} else {
|
|
if ret.Get(1) != nil {
|
|
r1 = ret.Get(1).(*model.AppError)
|
|
}
|
|
}
|
|
|
|
return r0, r1
|
|
}
|
|
|
|
// GetProfileImage provides a mock function with given fields: user
|
|
func (_m *MockAppIface) GetProfileImage(user *model.User) ([]byte, bool, *model.AppError) {
|
|
ret := _m.Called(user)
|
|
|
|
if len(ret) == 0 {
|
|
panic("no return value specified for GetProfileImage")
|
|
}
|
|
|
|
var r0 []byte
|
|
var r1 bool
|
|
var r2 *model.AppError
|
|
if rf, ok := ret.Get(0).(func(*model.User) ([]byte, bool, *model.AppError)); ok {
|
|
return rf(user)
|
|
}
|
|
if rf, ok := ret.Get(0).(func(*model.User) []byte); ok {
|
|
r0 = rf(user)
|
|
} else {
|
|
if ret.Get(0) != nil {
|
|
r0 = ret.Get(0).([]byte)
|
|
}
|
|
}
|
|
|
|
if rf, ok := ret.Get(1).(func(*model.User) bool); ok {
|
|
r1 = rf(user)
|
|
} else {
|
|
r1 = ret.Get(1).(bool)
|
|
}
|
|
|
|
if rf, ok := ret.Get(2).(func(*model.User) *model.AppError); ok {
|
|
r2 = rf(user)
|
|
} else {
|
|
if ret.Get(2) != nil {
|
|
r2 = ret.Get(2).(*model.AppError)
|
|
}
|
|
}
|
|
|
|
return r0, r1, r2
|
|
}
|
|
|
|
// MentionsToTeamMembers provides a mock function with given fields: rctx, message, teamID
|
|
func (_m *MockAppIface) MentionsToTeamMembers(rctx request.CTX, message string, teamID string) model.UserMentionMap {
|
|
ret := _m.Called(rctx, message, teamID)
|
|
|
|
if len(ret) == 0 {
|
|
panic("no return value specified for MentionsToTeamMembers")
|
|
}
|
|
|
|
var r0 model.UserMentionMap
|
|
if rf, ok := ret.Get(0).(func(request.CTX, string, string) model.UserMentionMap); ok {
|
|
r0 = rf(rctx, message, teamID)
|
|
} else {
|
|
if ret.Get(0) != nil {
|
|
r0 = ret.Get(0).(model.UserMentionMap)
|
|
}
|
|
}
|
|
|
|
return r0
|
|
}
|
|
|
|
// NotifySharedChannelUserUpdate provides a mock function with given fields: user
|
|
func (_m *MockAppIface) NotifySharedChannelUserUpdate(user *model.User) {
|
|
_m.Called(user)
|
|
}
|
|
|
|
// OnSharedChannelsAttachmentSyncMsg provides a mock function with given fields: fi, post, rc
|
|
func (_m *MockAppIface) OnSharedChannelsAttachmentSyncMsg(fi *model.FileInfo, post *model.Post, rc *model.RemoteCluster) error {
|
|
ret := _m.Called(fi, post, rc)
|
|
|
|
if len(ret) == 0 {
|
|
panic("no return value specified for OnSharedChannelsAttachmentSyncMsg")
|
|
}
|
|
|
|
var r0 error
|
|
if rf, ok := ret.Get(0).(func(*model.FileInfo, *model.Post, *model.RemoteCluster) error); ok {
|
|
r0 = rf(fi, post, rc)
|
|
} else {
|
|
r0 = ret.Error(0)
|
|
}
|
|
|
|
return r0
|
|
}
|
|
|
|
// OnSharedChannelsProfileImageSyncMsg provides a mock function with given fields: user, rc
|
|
func (_m *MockAppIface) OnSharedChannelsProfileImageSyncMsg(user *model.User, rc *model.RemoteCluster) error {
|
|
ret := _m.Called(user, rc)
|
|
|
|
if len(ret) == 0 {
|
|
panic("no return value specified for OnSharedChannelsProfileImageSyncMsg")
|
|
}
|
|
|
|
var r0 error
|
|
if rf, ok := ret.Get(0).(func(*model.User, *model.RemoteCluster) error); ok {
|
|
r0 = rf(user, rc)
|
|
} else {
|
|
r0 = ret.Error(0)
|
|
}
|
|
|
|
return r0
|
|
}
|
|
|
|
// OnSharedChannelsSyncMsg provides a mock function with given fields: msg, rc
|
|
func (_m *MockAppIface) OnSharedChannelsSyncMsg(msg *model.SyncMsg, rc *model.RemoteCluster) (model.SyncResponse, error) {
|
|
ret := _m.Called(msg, rc)
|
|
|
|
if len(ret) == 0 {
|
|
panic("no return value specified for OnSharedChannelsSyncMsg")
|
|
}
|
|
|
|
var r0 model.SyncResponse
|
|
var r1 error
|
|
if rf, ok := ret.Get(0).(func(*model.SyncMsg, *model.RemoteCluster) (model.SyncResponse, error)); ok {
|
|
return rf(msg, rc)
|
|
}
|
|
if rf, ok := ret.Get(0).(func(*model.SyncMsg, *model.RemoteCluster) model.SyncResponse); ok {
|
|
r0 = rf(msg, rc)
|
|
} else {
|
|
r0 = ret.Get(0).(model.SyncResponse)
|
|
}
|
|
|
|
if rf, ok := ret.Get(1).(func(*model.SyncMsg, *model.RemoteCluster) error); ok {
|
|
r1 = rf(msg, rc)
|
|
} else {
|
|
r1 = ret.Error(1)
|
|
}
|
|
|
|
return r0, r1
|
|
}
|
|
|
|
// PatchChannelModerationsForChannel provides a mock function with given fields: rctx, channel, channelModerationsPatch
|
|
func (_m *MockAppIface) PatchChannelModerationsForChannel(rctx request.CTX, channel *model.Channel, channelModerationsPatch []*model.ChannelModerationPatch) ([]*model.ChannelModeration, *model.AppError) {
|
|
ret := _m.Called(rctx, channel, channelModerationsPatch)
|
|
|
|
if len(ret) == 0 {
|
|
panic("no return value specified for PatchChannelModerationsForChannel")
|
|
}
|
|
|
|
var r0 []*model.ChannelModeration
|
|
var r1 *model.AppError
|
|
if rf, ok := ret.Get(0).(func(request.CTX, *model.Channel, []*model.ChannelModerationPatch) ([]*model.ChannelModeration, *model.AppError)); ok {
|
|
return rf(rctx, channel, channelModerationsPatch)
|
|
}
|
|
if rf, ok := ret.Get(0).(func(request.CTX, *model.Channel, []*model.ChannelModerationPatch) []*model.ChannelModeration); ok {
|
|
r0 = rf(rctx, channel, channelModerationsPatch)
|
|
} else {
|
|
if ret.Get(0) != nil {
|
|
r0 = ret.Get(0).([]*model.ChannelModeration)
|
|
}
|
|
}
|
|
|
|
if rf, ok := ret.Get(1).(func(request.CTX, *model.Channel, []*model.ChannelModerationPatch) *model.AppError); ok {
|
|
r1 = rf(rctx, channel, channelModerationsPatch)
|
|
} else {
|
|
if ret.Get(1) != nil {
|
|
r1 = ret.Get(1).(*model.AppError)
|
|
}
|
|
}
|
|
|
|
return r0, r1
|
|
}
|
|
|
|
// PermanentDeleteChannel provides a mock function with given fields: rctx, channel
|
|
func (_m *MockAppIface) PermanentDeleteChannel(rctx request.CTX, channel *model.Channel) *model.AppError {
|
|
ret := _m.Called(rctx, channel)
|
|
|
|
if len(ret) == 0 {
|
|
panic("no return value specified for PermanentDeleteChannel")
|
|
}
|
|
|
|
var r0 *model.AppError
|
|
if rf, ok := ret.Get(0).(func(request.CTX, *model.Channel) *model.AppError); ok {
|
|
r0 = rf(rctx, channel)
|
|
} else {
|
|
if ret.Get(0) != nil {
|
|
r0 = ret.Get(0).(*model.AppError)
|
|
}
|
|
}
|
|
|
|
return r0
|
|
}
|
|
|
|
// PreparePostForClient provides a mock function with given fields: rctx, post, opts
|
|
func (_m *MockAppIface) PreparePostForClient(rctx request.CTX, post *model.Post, opts *model.PreparePostForClientOpts) *model.Post {
|
|
ret := _m.Called(rctx, post, opts)
|
|
|
|
if len(ret) == 0 {
|
|
panic("no return value specified for PreparePostForClient")
|
|
}
|
|
|
|
var r0 *model.Post
|
|
if rf, ok := ret.Get(0).(func(request.CTX, *model.Post, *model.PreparePostForClientOpts) *model.Post); ok {
|
|
r0 = rf(rctx, post, opts)
|
|
} else {
|
|
if ret.Get(0) != nil {
|
|
r0 = ret.Get(0).(*model.Post)
|
|
}
|
|
}
|
|
|
|
return r0
|
|
}
|
|
|
|
// Publish provides a mock function with given fields: message
|
|
func (_m *MockAppIface) Publish(message *model.WebSocketEvent) {
|
|
_m.Called(message)
|
|
}
|
|
|
|
// RemoveUserFromChannel provides a mock function with given fields: rctx, userID, removerUserId, channel
|
|
func (_m *MockAppIface) RemoveUserFromChannel(rctx request.CTX, userID string, removerUserId string, channel *model.Channel) *model.AppError {
|
|
ret := _m.Called(rctx, userID, removerUserId, channel)
|
|
|
|
if len(ret) == 0 {
|
|
panic("no return value specified for RemoveUserFromChannel")
|
|
}
|
|
|
|
var r0 *model.AppError
|
|
if rf, ok := ret.Get(0).(func(request.CTX, string, string, *model.Channel) *model.AppError); ok {
|
|
r0 = rf(rctx, userID, removerUserId, channel)
|
|
} else {
|
|
if ret.Get(0) != nil {
|
|
r0 = ret.Get(0).(*model.AppError)
|
|
}
|
|
}
|
|
|
|
return r0
|
|
}
|
|
|
|
// SaveAcknowledgementForPostWithModel provides a mock function with given fields: rctx, acknowledgement
|
|
func (_m *MockAppIface) SaveAcknowledgementForPostWithModel(rctx request.CTX, acknowledgement *model.PostAcknowledgement) (*model.PostAcknowledgement, *model.AppError) {
|
|
ret := _m.Called(rctx, acknowledgement)
|
|
|
|
if len(ret) == 0 {
|
|
panic("no return value specified for SaveAcknowledgementForPostWithModel")
|
|
}
|
|
|
|
var r0 *model.PostAcknowledgement
|
|
var r1 *model.AppError
|
|
if rf, ok := ret.Get(0).(func(request.CTX, *model.PostAcknowledgement) (*model.PostAcknowledgement, *model.AppError)); ok {
|
|
return rf(rctx, acknowledgement)
|
|
}
|
|
if rf, ok := ret.Get(0).(func(request.CTX, *model.PostAcknowledgement) *model.PostAcknowledgement); ok {
|
|
r0 = rf(rctx, acknowledgement)
|
|
} else {
|
|
if ret.Get(0) != nil {
|
|
r0 = ret.Get(0).(*model.PostAcknowledgement)
|
|
}
|
|
}
|
|
|
|
if rf, ok := ret.Get(1).(func(request.CTX, *model.PostAcknowledgement) *model.AppError); ok {
|
|
r1 = rf(rctx, acknowledgement)
|
|
} else {
|
|
if ret.Get(1) != nil {
|
|
r1 = ret.Get(1).(*model.AppError)
|
|
}
|
|
}
|
|
|
|
return r0, r1
|
|
}
|
|
|
|
// SaveAcknowledgementsForPost provides a mock function with given fields: rctx, postID, userIDs
|
|
func (_m *MockAppIface) SaveAcknowledgementsForPost(rctx request.CTX, postID string, userIDs []string) ([]*model.PostAcknowledgement, *model.AppError) {
|
|
ret := _m.Called(rctx, postID, userIDs)
|
|
|
|
if len(ret) == 0 {
|
|
panic("no return value specified for SaveAcknowledgementsForPost")
|
|
}
|
|
|
|
var r0 []*model.PostAcknowledgement
|
|
var r1 *model.AppError
|
|
if rf, ok := ret.Get(0).(func(request.CTX, string, []string) ([]*model.PostAcknowledgement, *model.AppError)); ok {
|
|
return rf(rctx, postID, userIDs)
|
|
}
|
|
if rf, ok := ret.Get(0).(func(request.CTX, string, []string) []*model.PostAcknowledgement); ok {
|
|
r0 = rf(rctx, postID, userIDs)
|
|
} else {
|
|
if ret.Get(0) != nil {
|
|
r0 = ret.Get(0).([]*model.PostAcknowledgement)
|
|
}
|
|
}
|
|
|
|
if rf, ok := ret.Get(1).(func(request.CTX, string, []string) *model.AppError); ok {
|
|
r1 = rf(rctx, postID, userIDs)
|
|
} else {
|
|
if ret.Get(1) != nil {
|
|
r1 = ret.Get(1).(*model.AppError)
|
|
}
|
|
}
|
|
|
|
return r0, r1
|
|
}
|
|
|
|
// SaveAndBroadcastStatus provides a mock function with given fields: status
|
|
func (_m *MockAppIface) SaveAndBroadcastStatus(status *model.Status) {
|
|
_m.Called(status)
|
|
}
|
|
|
|
// SaveReactionForPost provides a mock function with given fields: rctx, reaction
|
|
func (_m *MockAppIface) SaveReactionForPost(rctx request.CTX, reaction *model.Reaction) (*model.Reaction, *model.AppError) {
|
|
ret := _m.Called(rctx, reaction)
|
|
|
|
if len(ret) == 0 {
|
|
panic("no return value specified for SaveReactionForPost")
|
|
}
|
|
|
|
var r0 *model.Reaction
|
|
var r1 *model.AppError
|
|
if rf, ok := ret.Get(0).(func(request.CTX, *model.Reaction) (*model.Reaction, *model.AppError)); ok {
|
|
return rf(rctx, reaction)
|
|
}
|
|
if rf, ok := ret.Get(0).(func(request.CTX, *model.Reaction) *model.Reaction); ok {
|
|
r0 = rf(rctx, reaction)
|
|
} else {
|
|
if ret.Get(0) != nil {
|
|
r0 = ret.Get(0).(*model.Reaction)
|
|
}
|
|
}
|
|
|
|
if rf, ok := ret.Get(1).(func(request.CTX, *model.Reaction) *model.AppError); ok {
|
|
r1 = rf(rctx, reaction)
|
|
} else {
|
|
if ret.Get(1) != nil {
|
|
r1 = ret.Get(1).(*model.AppError)
|
|
}
|
|
}
|
|
|
|
return r0, r1
|
|
}
|
|
|
|
// SendEphemeralPost provides a mock function with given fields: rctx, userId, post
|
|
func (_m *MockAppIface) SendEphemeralPost(rctx request.CTX, userId string, post *model.Post) *model.Post {
|
|
ret := _m.Called(rctx, userId, post)
|
|
|
|
if len(ret) == 0 {
|
|
panic("no return value specified for SendEphemeralPost")
|
|
}
|
|
|
|
var r0 *model.Post
|
|
if rf, ok := ret.Get(0).(func(request.CTX, string, *model.Post) *model.Post); ok {
|
|
r0 = rf(rctx, userId, post)
|
|
} else {
|
|
if ret.Get(0) != nil {
|
|
r0 = ret.Get(0).(*model.Post)
|
|
}
|
|
}
|
|
|
|
return r0
|
|
}
|
|
|
|
// UpdatePost provides a mock function with given fields: rctx, post, updatePostOptions
|
|
func (_m *MockAppIface) UpdatePost(rctx request.CTX, post *model.Post, updatePostOptions *model.UpdatePostOptions) (*model.Post, *model.AppError) {
|
|
ret := _m.Called(rctx, post, updatePostOptions)
|
|
|
|
if len(ret) == 0 {
|
|
panic("no return value specified for UpdatePost")
|
|
}
|
|
|
|
var r0 *model.Post
|
|
var r1 *model.AppError
|
|
if rf, ok := ret.Get(0).(func(request.CTX, *model.Post, *model.UpdatePostOptions) (*model.Post, *model.AppError)); ok {
|
|
return rf(rctx, post, updatePostOptions)
|
|
}
|
|
if rf, ok := ret.Get(0).(func(request.CTX, *model.Post, *model.UpdatePostOptions) *model.Post); ok {
|
|
r0 = rf(rctx, post, updatePostOptions)
|
|
} else {
|
|
if ret.Get(0) != nil {
|
|
r0 = ret.Get(0).(*model.Post)
|
|
}
|
|
}
|
|
|
|
if rf, ok := ret.Get(1).(func(request.CTX, *model.Post, *model.UpdatePostOptions) *model.AppError); ok {
|
|
r1 = rf(rctx, post, updatePostOptions)
|
|
} else {
|
|
if ret.Get(1) != nil {
|
|
r1 = ret.Get(1).(*model.AppError)
|
|
}
|
|
}
|
|
|
|
return r0, r1
|
|
}
|
|
|
|
// UserCanSeeOtherUser provides a mock function with given fields: rctx, userID, otherUserId
|
|
func (_m *MockAppIface) UserCanSeeOtherUser(rctx request.CTX, userID string, otherUserId string) (bool, *model.AppError) {
|
|
ret := _m.Called(rctx, userID, otherUserId)
|
|
|
|
if len(ret) == 0 {
|
|
panic("no return value specified for UserCanSeeOtherUser")
|
|
}
|
|
|
|
var r0 bool
|
|
var r1 *model.AppError
|
|
if rf, ok := ret.Get(0).(func(request.CTX, string, string) (bool, *model.AppError)); ok {
|
|
return rf(rctx, userID, otherUserId)
|
|
}
|
|
if rf, ok := ret.Get(0).(func(request.CTX, string, string) bool); ok {
|
|
r0 = rf(rctx, userID, otherUserId)
|
|
} else {
|
|
r0 = ret.Get(0).(bool)
|
|
}
|
|
|
|
if rf, ok := ret.Get(1).(func(request.CTX, string, string) *model.AppError); ok {
|
|
r1 = rf(rctx, userID, otherUserId)
|
|
} else {
|
|
if ret.Get(1) != nil {
|
|
r1 = ret.Get(1).(*model.AppError)
|
|
}
|
|
}
|
|
|
|
return r0, r1
|
|
}
|
|
|
|
// NewMockAppIface creates a new instance of MockAppIface. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations.
|
|
// The first argument is typically a *testing.T value.
|
|
func NewMockAppIface(t interface {
|
|
mock.TestingT
|
|
Cleanup(func())
|
|
}) *MockAppIface {
|
|
mock := &MockAppIface{}
|
|
mock.Mock.Test(t)
|
|
|
|
t.Cleanup(func() { mock.AssertExpectations(t) })
|
|
|
|
return mock
|
|
}
|