github.com/masterhung0112/hk_server/v5@v5.0.0-20220302090640-ec71aef15e1c/services/sharedchannel/mock_AppIface_test.go (about)

     1  // Code generated by mockery v1.0.0. DO NOT EDIT.
     2  
     3  // Regenerate this file using `make sharedchannel-mocks`.
     4  
     5  package sharedchannel
     6  
     7  import (
     8  	filestore "github.com/masterhung0112/hk_server/v5/shared/filestore"
     9  	mock "github.com/stretchr/testify/mock"
    10  
    11  	model "github.com/masterhung0112/hk_server/v5/model"
    12  
    13  	request "github.com/masterhung0112/hk_server/v5/app/request"
    14  )
    15  
    16  // MockAppIface is an autogenerated mock type for the AppIface type
    17  type MockAppIface struct {
    18  	mock.Mock
    19  }
    20  
    21  // AddUserToChannel provides a mock function with given fields: user, channel, skipTeamMemberIntegrityCheck
    22  func (_m *MockAppIface) AddUserToChannel(user *model.User, channel *model.Channel, skipTeamMemberIntegrityCheck bool) (*model.ChannelMember, *model.AppError) {
    23  	ret := _m.Called(user, channel, skipTeamMemberIntegrityCheck)
    24  
    25  	var r0 *model.ChannelMember
    26  	if rf, ok := ret.Get(0).(func(*model.User, *model.Channel, bool) *model.ChannelMember); ok {
    27  		r0 = rf(user, channel, skipTeamMemberIntegrityCheck)
    28  	} else {
    29  		if ret.Get(0) != nil {
    30  			r0 = ret.Get(0).(*model.ChannelMember)
    31  		}
    32  	}
    33  
    34  	var r1 *model.AppError
    35  	if rf, ok := ret.Get(1).(func(*model.User, *model.Channel, bool) *model.AppError); ok {
    36  		r1 = rf(user, channel, skipTeamMemberIntegrityCheck)
    37  	} else {
    38  		if ret.Get(1) != nil {
    39  			r1 = ret.Get(1).(*model.AppError)
    40  		}
    41  	}
    42  
    43  	return r0, r1
    44  }
    45  
    46  // AddUserToTeamByTeamId provides a mock function with given fields: c, teamId, user
    47  func (_m *MockAppIface) AddUserToTeamByTeamId(c *request.Context, teamId string, user *model.User) *model.AppError {
    48  	ret := _m.Called(c, teamId, user)
    49  
    50  	var r0 *model.AppError
    51  	if rf, ok := ret.Get(0).(func(*request.Context, string, *model.User) *model.AppError); ok {
    52  		r0 = rf(c, teamId, user)
    53  	} else {
    54  		if ret.Get(0) != nil {
    55  			r0 = ret.Get(0).(*model.AppError)
    56  		}
    57  	}
    58  
    59  	return r0
    60  }
    61  
    62  // CreateChannelWithUser provides a mock function with given fields: c, channel, userId
    63  func (_m *MockAppIface) CreateChannelWithUser(c *request.Context, channel *model.Channel, userId string) (*model.Channel, *model.AppError) {
    64  	ret := _m.Called(c, channel, userId)
    65  
    66  	var r0 *model.Channel
    67  	if rf, ok := ret.Get(0).(func(*request.Context, *model.Channel, string) *model.Channel); ok {
    68  		r0 = rf(c, channel, userId)
    69  	} else {
    70  		if ret.Get(0) != nil {
    71  			r0 = ret.Get(0).(*model.Channel)
    72  		}
    73  	}
    74  
    75  	var r1 *model.AppError
    76  	if rf, ok := ret.Get(1).(func(*request.Context, *model.Channel, string) *model.AppError); ok {
    77  		r1 = rf(c, channel, userId)
    78  	} else {
    79  		if ret.Get(1) != nil {
    80  			r1 = ret.Get(1).(*model.AppError)
    81  		}
    82  	}
    83  
    84  	return r0, r1
    85  }
    86  
    87  // CreatePost provides a mock function with given fields: c, post, channel, triggerWebhooks, setOnline
    88  func (_m *MockAppIface) CreatePost(c *request.Context, post *model.Post, channel *model.Channel, triggerWebhooks bool, setOnline bool) (*model.Post, *model.AppError) {
    89  	ret := _m.Called(c, post, channel, triggerWebhooks, setOnline)
    90  
    91  	var r0 *model.Post
    92  	if rf, ok := ret.Get(0).(func(*request.Context, *model.Post, *model.Channel, bool, bool) *model.Post); ok {
    93  		r0 = rf(c, post, channel, triggerWebhooks, setOnline)
    94  	} else {
    95  		if ret.Get(0) != nil {
    96  			r0 = ret.Get(0).(*model.Post)
    97  		}
    98  	}
    99  
   100  	var r1 *model.AppError
   101  	if rf, ok := ret.Get(1).(func(*request.Context, *model.Post, *model.Channel, bool, bool) *model.AppError); ok {
   102  		r1 = rf(c, post, channel, triggerWebhooks, setOnline)
   103  	} else {
   104  		if ret.Get(1) != nil {
   105  			r1 = ret.Get(1).(*model.AppError)
   106  		}
   107  	}
   108  
   109  	return r0, r1
   110  }
   111  
   112  // CreateUploadSession provides a mock function with given fields: us
   113  func (_m *MockAppIface) CreateUploadSession(us *model.UploadSession) (*model.UploadSession, *model.AppError) {
   114  	ret := _m.Called(us)
   115  
   116  	var r0 *model.UploadSession
   117  	if rf, ok := ret.Get(0).(func(*model.UploadSession) *model.UploadSession); ok {
   118  		r0 = rf(us)
   119  	} else {
   120  		if ret.Get(0) != nil {
   121  			r0 = ret.Get(0).(*model.UploadSession)
   122  		}
   123  	}
   124  
   125  	var r1 *model.AppError
   126  	if rf, ok := ret.Get(1).(func(*model.UploadSession) *model.AppError); ok {
   127  		r1 = rf(us)
   128  	} else {
   129  		if ret.Get(1) != nil {
   130  			r1 = ret.Get(1).(*model.AppError)
   131  		}
   132  	}
   133  
   134  	return r0, r1
   135  }
   136  
   137  // DeletePost provides a mock function with given fields: postID, deleteByID
   138  func (_m *MockAppIface) DeletePost(postID string, deleteByID string) (*model.Post, *model.AppError) {
   139  	ret := _m.Called(postID, deleteByID)
   140  
   141  	var r0 *model.Post
   142  	if rf, ok := ret.Get(0).(func(string, string) *model.Post); ok {
   143  		r0 = rf(postID, deleteByID)
   144  	} else {
   145  		if ret.Get(0) != nil {
   146  			r0 = ret.Get(0).(*model.Post)
   147  		}
   148  	}
   149  
   150  	var r1 *model.AppError
   151  	if rf, ok := ret.Get(1).(func(string, string) *model.AppError); ok {
   152  		r1 = rf(postID, deleteByID)
   153  	} else {
   154  		if ret.Get(1) != nil {
   155  			r1 = ret.Get(1).(*model.AppError)
   156  		}
   157  	}
   158  
   159  	return r0, r1
   160  }
   161  
   162  // DeleteReactionForPost provides a mock function with given fields: c, reaction
   163  func (_m *MockAppIface) DeleteReactionForPost(c *request.Context, reaction *model.Reaction) *model.AppError {
   164  	ret := _m.Called(c, reaction)
   165  
   166  	var r0 *model.AppError
   167  	if rf, ok := ret.Get(0).(func(*request.Context, *model.Reaction) *model.AppError); ok {
   168  		r0 = rf(c, reaction)
   169  	} else {
   170  		if ret.Get(0) != nil {
   171  			r0 = ret.Get(0).(*model.AppError)
   172  		}
   173  	}
   174  
   175  	return r0
   176  }
   177  
   178  // FileReader provides a mock function with given fields: path
   179  func (_m *MockAppIface) FileReader(path string) (filestore.ReadCloseSeeker, *model.AppError) {
   180  	ret := _m.Called(path)
   181  
   182  	var r0 filestore.ReadCloseSeeker
   183  	if rf, ok := ret.Get(0).(func(string) filestore.ReadCloseSeeker); ok {
   184  		r0 = rf(path)
   185  	} else {
   186  		if ret.Get(0) != nil {
   187  			r0 = ret.Get(0).(filestore.ReadCloseSeeker)
   188  		}
   189  	}
   190  
   191  	var r1 *model.AppError
   192  	if rf, ok := ret.Get(1).(func(string) *model.AppError); ok {
   193  		r1 = rf(path)
   194  	} else {
   195  		if ret.Get(1) != nil {
   196  			r1 = ret.Get(1).(*model.AppError)
   197  		}
   198  	}
   199  
   200  	return r0, r1
   201  }
   202  
   203  // GetOrCreateDirectChannel provides a mock function with given fields: c, userId, otherUserId, channelOptions
   204  func (_m *MockAppIface) GetOrCreateDirectChannel(c *request.Context, userId string, otherUserId string, channelOptions ...model.ChannelOption) (*model.Channel, *model.AppError) {
   205  	_va := make([]interface{}, len(channelOptions))
   206  	for _i := range channelOptions {
   207  		_va[_i] = channelOptions[_i]
   208  	}
   209  	var _ca []interface{}
   210  	_ca = append(_ca, c, userId, otherUserId)
   211  	_ca = append(_ca, _va...)
   212  	ret := _m.Called(_ca...)
   213  
   214  	var r0 *model.Channel
   215  	if rf, ok := ret.Get(0).(func(*request.Context, string, string, ...model.ChannelOption) *model.Channel); ok {
   216  		r0 = rf(c, userId, otherUserId, channelOptions...)
   217  	} else {
   218  		if ret.Get(0) != nil {
   219  			r0 = ret.Get(0).(*model.Channel)
   220  		}
   221  	}
   222  
   223  	var r1 *model.AppError
   224  	if rf, ok := ret.Get(1).(func(*request.Context, string, string, ...model.ChannelOption) *model.AppError); ok {
   225  		r1 = rf(c, userId, otherUserId, channelOptions...)
   226  	} else {
   227  		if ret.Get(1) != nil {
   228  			r1 = ret.Get(1).(*model.AppError)
   229  		}
   230  	}
   231  
   232  	return r0, r1
   233  }
   234  
   235  // GetProfileImage provides a mock function with given fields: user
   236  func (_m *MockAppIface) GetProfileImage(user *model.User) ([]byte, bool, *model.AppError) {
   237  	ret := _m.Called(user)
   238  
   239  	var r0 []byte
   240  	if rf, ok := ret.Get(0).(func(*model.User) []byte); ok {
   241  		r0 = rf(user)
   242  	} else {
   243  		if ret.Get(0) != nil {
   244  			r0 = ret.Get(0).([]byte)
   245  		}
   246  	}
   247  
   248  	var r1 bool
   249  	if rf, ok := ret.Get(1).(func(*model.User) bool); ok {
   250  		r1 = rf(user)
   251  	} else {
   252  		r1 = ret.Get(1).(bool)
   253  	}
   254  
   255  	var r2 *model.AppError
   256  	if rf, ok := ret.Get(2).(func(*model.User) *model.AppError); ok {
   257  		r2 = rf(user)
   258  	} else {
   259  		if ret.Get(2) != nil {
   260  			r2 = ret.Get(2).(*model.AppError)
   261  		}
   262  	}
   263  
   264  	return r0, r1, r2
   265  }
   266  
   267  // InvalidateCacheForUser provides a mock function with given fields: userID
   268  func (_m *MockAppIface) InvalidateCacheForUser(userID string) {
   269  	_m.Called(userID)
   270  }
   271  
   272  // MentionsToTeamMembers provides a mock function with given fields: message, teamID
   273  func (_m *MockAppIface) MentionsToTeamMembers(message string, teamID string) model.UserMentionMap {
   274  	ret := _m.Called(message, teamID)
   275  
   276  	var r0 model.UserMentionMap
   277  	if rf, ok := ret.Get(0).(func(string, string) model.UserMentionMap); ok {
   278  		r0 = rf(message, teamID)
   279  	} else {
   280  		if ret.Get(0) != nil {
   281  			r0 = ret.Get(0).(model.UserMentionMap)
   282  		}
   283  	}
   284  
   285  	return r0
   286  }
   287  
   288  // NotifySharedChannelUserUpdate provides a mock function with given fields: user
   289  func (_m *MockAppIface) NotifySharedChannelUserUpdate(user *model.User) {
   290  	_m.Called(user)
   291  }
   292  
   293  // PatchChannelModerationsForChannel provides a mock function with given fields: channel, channelModerationsPatch
   294  func (_m *MockAppIface) PatchChannelModerationsForChannel(channel *model.Channel, channelModerationsPatch []*model.ChannelModerationPatch) ([]*model.ChannelModeration, *model.AppError) {
   295  	ret := _m.Called(channel, channelModerationsPatch)
   296  
   297  	var r0 []*model.ChannelModeration
   298  	if rf, ok := ret.Get(0).(func(*model.Channel, []*model.ChannelModerationPatch) []*model.ChannelModeration); ok {
   299  		r0 = rf(channel, channelModerationsPatch)
   300  	} else {
   301  		if ret.Get(0) != nil {
   302  			r0 = ret.Get(0).([]*model.ChannelModeration)
   303  		}
   304  	}
   305  
   306  	var r1 *model.AppError
   307  	if rf, ok := ret.Get(1).(func(*model.Channel, []*model.ChannelModerationPatch) *model.AppError); ok {
   308  		r1 = rf(channel, channelModerationsPatch)
   309  	} else {
   310  		if ret.Get(1) != nil {
   311  			r1 = ret.Get(1).(*model.AppError)
   312  		}
   313  	}
   314  
   315  	return r0, r1
   316  }
   317  
   318  // PermanentDeleteChannel provides a mock function with given fields: channel
   319  func (_m *MockAppIface) PermanentDeleteChannel(channel *model.Channel) *model.AppError {
   320  	ret := _m.Called(channel)
   321  
   322  	var r0 *model.AppError
   323  	if rf, ok := ret.Get(0).(func(*model.Channel) *model.AppError); ok {
   324  		r0 = rf(channel)
   325  	} else {
   326  		if ret.Get(0) != nil {
   327  			r0 = ret.Get(0).(*model.AppError)
   328  		}
   329  	}
   330  
   331  	return r0
   332  }
   333  
   334  // SaveReactionForPost provides a mock function with given fields: c, reaction
   335  func (_m *MockAppIface) SaveReactionForPost(c *request.Context, reaction *model.Reaction) (*model.Reaction, *model.AppError) {
   336  	ret := _m.Called(c, reaction)
   337  
   338  	var r0 *model.Reaction
   339  	if rf, ok := ret.Get(0).(func(*request.Context, *model.Reaction) *model.Reaction); ok {
   340  		r0 = rf(c, reaction)
   341  	} else {
   342  		if ret.Get(0) != nil {
   343  			r0 = ret.Get(0).(*model.Reaction)
   344  		}
   345  	}
   346  
   347  	var r1 *model.AppError
   348  	if rf, ok := ret.Get(1).(func(*request.Context, *model.Reaction) *model.AppError); ok {
   349  		r1 = rf(c, reaction)
   350  	} else {
   351  		if ret.Get(1) != nil {
   352  			r1 = ret.Get(1).(*model.AppError)
   353  		}
   354  	}
   355  
   356  	return r0, r1
   357  }
   358  
   359  // SendEphemeralPost provides a mock function with given fields: userId, post
   360  func (_m *MockAppIface) SendEphemeralPost(userId string, post *model.Post) *model.Post {
   361  	ret := _m.Called(userId, post)
   362  
   363  	var r0 *model.Post
   364  	if rf, ok := ret.Get(0).(func(string, *model.Post) *model.Post); ok {
   365  		r0 = rf(userId, post)
   366  	} else {
   367  		if ret.Get(0) != nil {
   368  			r0 = ret.Get(0).(*model.Post)
   369  		}
   370  	}
   371  
   372  	return r0
   373  }
   374  
   375  // UpdatePost provides a mock function with given fields: c, post, safeUpdate
   376  func (_m *MockAppIface) UpdatePost(c *request.Context, post *model.Post, safeUpdate bool) (*model.Post, *model.AppError) {
   377  	ret := _m.Called(c, post, safeUpdate)
   378  
   379  	var r0 *model.Post
   380  	if rf, ok := ret.Get(0).(func(*request.Context, *model.Post, bool) *model.Post); ok {
   381  		r0 = rf(c, post, safeUpdate)
   382  	} else {
   383  		if ret.Get(0) != nil {
   384  			r0 = ret.Get(0).(*model.Post)
   385  		}
   386  	}
   387  
   388  	var r1 *model.AppError
   389  	if rf, ok := ret.Get(1).(func(*request.Context, *model.Post, bool) *model.AppError); ok {
   390  		r1 = rf(c, post, safeUpdate)
   391  	} else {
   392  		if ret.Get(1) != nil {
   393  			r1 = ret.Get(1).(*model.AppError)
   394  		}
   395  	}
   396  
   397  	return r0, r1
   398  }