340 строки
8.7 KiB
Go
340 строки
8.7 KiB
Go
// Code generated by mockery v1.0.0
|
|
|
|
// Regenerate this file using `make store-mocks`.
|
|
|
|
package mocks
|
|
|
|
import mock "github.com/stretchr/testify/mock"
|
|
import model "github.com/mattermost/mattermost-server/model"
|
|
import store "github.com/mattermost/mattermost-server/store"
|
|
|
|
// WebhookStore is an autogenerated mock type for the WebhookStore type
|
|
type WebhookStore struct {
|
|
mock.Mock
|
|
}
|
|
|
|
// AnalyticsIncomingCount provides a mock function with given fields: teamId
|
|
func (_m *WebhookStore) AnalyticsIncomingCount(teamId string) store.StoreChannel {
|
|
ret := _m.Called(teamId)
|
|
|
|
var r0 store.StoreChannel
|
|
if rf, ok := ret.Get(0).(func(string) store.StoreChannel); ok {
|
|
r0 = rf(teamId)
|
|
} else {
|
|
if ret.Get(0) != nil {
|
|
r0 = ret.Get(0).(store.StoreChannel)
|
|
}
|
|
}
|
|
|
|
return r0
|
|
}
|
|
|
|
// AnalyticsOutgoingCount provides a mock function with given fields: teamId
|
|
func (_m *WebhookStore) AnalyticsOutgoingCount(teamId string) store.StoreChannel {
|
|
ret := _m.Called(teamId)
|
|
|
|
var r0 store.StoreChannel
|
|
if rf, ok := ret.Get(0).(func(string) store.StoreChannel); ok {
|
|
r0 = rf(teamId)
|
|
} else {
|
|
if ret.Get(0) != nil {
|
|
r0 = ret.Get(0).(store.StoreChannel)
|
|
}
|
|
}
|
|
|
|
return r0
|
|
}
|
|
|
|
// DeleteIncoming provides a mock function with given fields: webhookId, time
|
|
func (_m *WebhookStore) DeleteIncoming(webhookId string, time int64) store.StoreChannel {
|
|
ret := _m.Called(webhookId, time)
|
|
|
|
var r0 store.StoreChannel
|
|
if rf, ok := ret.Get(0).(func(string, int64) store.StoreChannel); ok {
|
|
r0 = rf(webhookId, time)
|
|
} else {
|
|
if ret.Get(0) != nil {
|
|
r0 = ret.Get(0).(store.StoreChannel)
|
|
}
|
|
}
|
|
|
|
return r0
|
|
}
|
|
|
|
// DeleteOutgoing provides a mock function with given fields: webhookId, time
|
|
func (_m *WebhookStore) DeleteOutgoing(webhookId string, time int64) store.StoreChannel {
|
|
ret := _m.Called(webhookId, time)
|
|
|
|
var r0 store.StoreChannel
|
|
if rf, ok := ret.Get(0).(func(string, int64) store.StoreChannel); ok {
|
|
r0 = rf(webhookId, time)
|
|
} else {
|
|
if ret.Get(0) != nil {
|
|
r0 = ret.Get(0).(store.StoreChannel)
|
|
}
|
|
}
|
|
|
|
return r0
|
|
}
|
|
|
|
// GetIncoming provides a mock function with given fields: id, allowFromCache
|
|
func (_m *WebhookStore) GetIncoming(id string, allowFromCache bool) store.StoreChannel {
|
|
ret := _m.Called(id, allowFromCache)
|
|
|
|
var r0 store.StoreChannel
|
|
if rf, ok := ret.Get(0).(func(string, bool) store.StoreChannel); ok {
|
|
r0 = rf(id, allowFromCache)
|
|
} else {
|
|
if ret.Get(0) != nil {
|
|
r0 = ret.Get(0).(store.StoreChannel)
|
|
}
|
|
}
|
|
|
|
return r0
|
|
}
|
|
|
|
// GetIncomingByChannel provides a mock function with given fields: channelId
|
|
func (_m *WebhookStore) GetIncomingByChannel(channelId string) store.StoreChannel {
|
|
ret := _m.Called(channelId)
|
|
|
|
var r0 store.StoreChannel
|
|
if rf, ok := ret.Get(0).(func(string) store.StoreChannel); ok {
|
|
r0 = rf(channelId)
|
|
} else {
|
|
if ret.Get(0) != nil {
|
|
r0 = ret.Get(0).(store.StoreChannel)
|
|
}
|
|
}
|
|
|
|
return r0
|
|
}
|
|
|
|
// GetIncomingByTeam provides a mock function with given fields: teamId, offset, limit
|
|
func (_m *WebhookStore) GetIncomingByTeam(teamId string, offset int, limit int) store.StoreChannel {
|
|
ret := _m.Called(teamId, offset, limit)
|
|
|
|
var r0 store.StoreChannel
|
|
if rf, ok := ret.Get(0).(func(string, int, int) store.StoreChannel); ok {
|
|
r0 = rf(teamId, offset, limit)
|
|
} else {
|
|
if ret.Get(0) != nil {
|
|
r0 = ret.Get(0).(store.StoreChannel)
|
|
}
|
|
}
|
|
|
|
return r0
|
|
}
|
|
|
|
// GetIncomingList provides a mock function with given fields: offset, limit
|
|
func (_m *WebhookStore) GetIncomingList(offset int, limit int) store.StoreChannel {
|
|
ret := _m.Called(offset, limit)
|
|
|
|
var r0 store.StoreChannel
|
|
if rf, ok := ret.Get(0).(func(int, int) store.StoreChannel); ok {
|
|
r0 = rf(offset, limit)
|
|
} else {
|
|
if ret.Get(0) != nil {
|
|
r0 = ret.Get(0).(store.StoreChannel)
|
|
}
|
|
}
|
|
|
|
return r0
|
|
}
|
|
|
|
// GetOutgoing provides a mock function with given fields: id
|
|
func (_m *WebhookStore) GetOutgoing(id string) store.StoreChannel {
|
|
ret := _m.Called(id)
|
|
|
|
var r0 store.StoreChannel
|
|
if rf, ok := ret.Get(0).(func(string) store.StoreChannel); ok {
|
|
r0 = rf(id)
|
|
} else {
|
|
if ret.Get(0) != nil {
|
|
r0 = ret.Get(0).(store.StoreChannel)
|
|
}
|
|
}
|
|
|
|
return r0
|
|
}
|
|
|
|
// GetOutgoingByChannel provides a mock function with given fields: channelId, offset, limit
|
|
func (_m *WebhookStore) GetOutgoingByChannel(channelId string, offset int, limit int) store.StoreChannel {
|
|
ret := _m.Called(channelId, offset, limit)
|
|
|
|
var r0 store.StoreChannel
|
|
if rf, ok := ret.Get(0).(func(string, int, int) store.StoreChannel); ok {
|
|
r0 = rf(channelId, offset, limit)
|
|
} else {
|
|
if ret.Get(0) != nil {
|
|
r0 = ret.Get(0).(store.StoreChannel)
|
|
}
|
|
}
|
|
|
|
return r0
|
|
}
|
|
|
|
// GetOutgoingByTeam provides a mock function with given fields: teamId, offset, limit
|
|
func (_m *WebhookStore) GetOutgoingByTeam(teamId string, offset int, limit int) store.StoreChannel {
|
|
ret := _m.Called(teamId, offset, limit)
|
|
|
|
var r0 store.StoreChannel
|
|
if rf, ok := ret.Get(0).(func(string, int, int) store.StoreChannel); ok {
|
|
r0 = rf(teamId, offset, limit)
|
|
} else {
|
|
if ret.Get(0) != nil {
|
|
r0 = ret.Get(0).(store.StoreChannel)
|
|
}
|
|
}
|
|
|
|
return r0
|
|
}
|
|
|
|
// GetOutgoingList provides a mock function with given fields: offset, limit
|
|
func (_m *WebhookStore) GetOutgoingList(offset int, limit int) store.StoreChannel {
|
|
ret := _m.Called(offset, limit)
|
|
|
|
var r0 store.StoreChannel
|
|
if rf, ok := ret.Get(0).(func(int, int) store.StoreChannel); ok {
|
|
r0 = rf(offset, limit)
|
|
} else {
|
|
if ret.Get(0) != nil {
|
|
r0 = ret.Get(0).(store.StoreChannel)
|
|
}
|
|
}
|
|
|
|
return r0
|
|
}
|
|
|
|
// InvalidateWebhookCache provides a mock function with given fields: webhook
|
|
func (_m *WebhookStore) InvalidateWebhookCache(webhook string) {
|
|
_m.Called(webhook)
|
|
}
|
|
|
|
// PermanentDeleteIncomingByChannel provides a mock function with given fields: channelId
|
|
func (_m *WebhookStore) PermanentDeleteIncomingByChannel(channelId string) store.StoreChannel {
|
|
ret := _m.Called(channelId)
|
|
|
|
var r0 store.StoreChannel
|
|
if rf, ok := ret.Get(0).(func(string) store.StoreChannel); ok {
|
|
r0 = rf(channelId)
|
|
} else {
|
|
if ret.Get(0) != nil {
|
|
r0 = ret.Get(0).(store.StoreChannel)
|
|
}
|
|
}
|
|
|
|
return r0
|
|
}
|
|
|
|
// PermanentDeleteIncomingByUser provides a mock function with given fields: userId
|
|
func (_m *WebhookStore) PermanentDeleteIncomingByUser(userId string) store.StoreChannel {
|
|
ret := _m.Called(userId)
|
|
|
|
var r0 store.StoreChannel
|
|
if rf, ok := ret.Get(0).(func(string) store.StoreChannel); ok {
|
|
r0 = rf(userId)
|
|
} else {
|
|
if ret.Get(0) != nil {
|
|
r0 = ret.Get(0).(store.StoreChannel)
|
|
}
|
|
}
|
|
|
|
return r0
|
|
}
|
|
|
|
// PermanentDeleteOutgoingByChannel provides a mock function with given fields: channelId
|
|
func (_m *WebhookStore) PermanentDeleteOutgoingByChannel(channelId string) store.StoreChannel {
|
|
ret := _m.Called(channelId)
|
|
|
|
var r0 store.StoreChannel
|
|
if rf, ok := ret.Get(0).(func(string) store.StoreChannel); ok {
|
|
r0 = rf(channelId)
|
|
} else {
|
|
if ret.Get(0) != nil {
|
|
r0 = ret.Get(0).(store.StoreChannel)
|
|
}
|
|
}
|
|
|
|
return r0
|
|
}
|
|
|
|
// PermanentDeleteOutgoingByUser provides a mock function with given fields: userId
|
|
func (_m *WebhookStore) PermanentDeleteOutgoingByUser(userId string) store.StoreChannel {
|
|
ret := _m.Called(userId)
|
|
|
|
var r0 store.StoreChannel
|
|
if rf, ok := ret.Get(0).(func(string) store.StoreChannel); ok {
|
|
r0 = rf(userId)
|
|
} else {
|
|
if ret.Get(0) != nil {
|
|
r0 = ret.Get(0).(store.StoreChannel)
|
|
}
|
|
}
|
|
|
|
return r0
|
|
}
|
|
|
|
// SaveIncoming provides a mock function with given fields: webhook
|
|
func (_m *WebhookStore) SaveIncoming(webhook *model.IncomingWebhook) store.StoreChannel {
|
|
ret := _m.Called(webhook)
|
|
|
|
var r0 store.StoreChannel
|
|
if rf, ok := ret.Get(0).(func(*model.IncomingWebhook) store.StoreChannel); ok {
|
|
r0 = rf(webhook)
|
|
} else {
|
|
if ret.Get(0) != nil {
|
|
r0 = ret.Get(0).(store.StoreChannel)
|
|
}
|
|
}
|
|
|
|
return r0
|
|
}
|
|
|
|
// SaveOutgoing provides a mock function with given fields: webhook
|
|
func (_m *WebhookStore) SaveOutgoing(webhook *model.OutgoingWebhook) store.StoreChannel {
|
|
ret := _m.Called(webhook)
|
|
|
|
var r0 store.StoreChannel
|
|
if rf, ok := ret.Get(0).(func(*model.OutgoingWebhook) store.StoreChannel); ok {
|
|
r0 = rf(webhook)
|
|
} else {
|
|
if ret.Get(0) != nil {
|
|
r0 = ret.Get(0).(store.StoreChannel)
|
|
}
|
|
}
|
|
|
|
return r0
|
|
}
|
|
|
|
// UpdateIncoming provides a mock function with given fields: webhook
|
|
func (_m *WebhookStore) UpdateIncoming(webhook *model.IncomingWebhook) store.StoreChannel {
|
|
ret := _m.Called(webhook)
|
|
|
|
var r0 store.StoreChannel
|
|
if rf, ok := ret.Get(0).(func(*model.IncomingWebhook) store.StoreChannel); ok {
|
|
r0 = rf(webhook)
|
|
} else {
|
|
if ret.Get(0) != nil {
|
|
r0 = ret.Get(0).(store.StoreChannel)
|
|
}
|
|
}
|
|
|
|
return r0
|
|
}
|
|
|
|
// UpdateOutgoing provides a mock function with given fields: hook
|
|
func (_m *WebhookStore) UpdateOutgoing(hook *model.OutgoingWebhook) store.StoreChannel {
|
|
ret := _m.Called(hook)
|
|
|
|
var r0 store.StoreChannel
|
|
if rf, ok := ret.Get(0).(func(*model.OutgoingWebhook) store.StoreChannel); ok {
|
|
r0 = rf(hook)
|
|
} else {
|
|
if ret.Get(0) != nil {
|
|
r0 = ret.Get(0).(store.StoreChannel)
|
|
}
|
|
}
|
|
|
|
return r0
|
|
}
|