github.com/nhannv/mattermost-server@v5.11.1+incompatible/store/storetest/mocks/WebhookStore.go (about)

     1  // Code generated by mockery v1.0.0. DO NOT EDIT.
     2  
     3  // Regenerate this file using `make store-mocks`.
     4  
     5  package mocks
     6  
     7  import mock "github.com/stretchr/testify/mock"
     8  import model "github.com/mattermost/mattermost-server/model"
     9  import store "github.com/mattermost/mattermost-server/store"
    10  
    11  // WebhookStore is an autogenerated mock type for the WebhookStore type
    12  type WebhookStore struct {
    13  	mock.Mock
    14  }
    15  
    16  // AnalyticsIncomingCount provides a mock function with given fields: teamId
    17  func (_m *WebhookStore) AnalyticsIncomingCount(teamId string) store.StoreChannel {
    18  	ret := _m.Called(teamId)
    19  
    20  	var r0 store.StoreChannel
    21  	if rf, ok := ret.Get(0).(func(string) store.StoreChannel); ok {
    22  		r0 = rf(teamId)
    23  	} else {
    24  		if ret.Get(0) != nil {
    25  			r0 = ret.Get(0).(store.StoreChannel)
    26  		}
    27  	}
    28  
    29  	return r0
    30  }
    31  
    32  // AnalyticsOutgoingCount provides a mock function with given fields: teamId
    33  func (_m *WebhookStore) AnalyticsOutgoingCount(teamId string) store.StoreChannel {
    34  	ret := _m.Called(teamId)
    35  
    36  	var r0 store.StoreChannel
    37  	if rf, ok := ret.Get(0).(func(string) store.StoreChannel); ok {
    38  		r0 = rf(teamId)
    39  	} else {
    40  		if ret.Get(0) != nil {
    41  			r0 = ret.Get(0).(store.StoreChannel)
    42  		}
    43  	}
    44  
    45  	return r0
    46  }
    47  
    48  // ClearCaches provides a mock function with given fields:
    49  func (_m *WebhookStore) ClearCaches() {
    50  	_m.Called()
    51  }
    52  
    53  // DeleteIncoming provides a mock function with given fields: webhookId, time
    54  func (_m *WebhookStore) DeleteIncoming(webhookId string, time int64) store.StoreChannel {
    55  	ret := _m.Called(webhookId, time)
    56  
    57  	var r0 store.StoreChannel
    58  	if rf, ok := ret.Get(0).(func(string, int64) store.StoreChannel); ok {
    59  		r0 = rf(webhookId, time)
    60  	} else {
    61  		if ret.Get(0) != nil {
    62  			r0 = ret.Get(0).(store.StoreChannel)
    63  		}
    64  	}
    65  
    66  	return r0
    67  }
    68  
    69  // DeleteOutgoing provides a mock function with given fields: webhookId, time
    70  func (_m *WebhookStore) DeleteOutgoing(webhookId string, time int64) store.StoreChannel {
    71  	ret := _m.Called(webhookId, time)
    72  
    73  	var r0 store.StoreChannel
    74  	if rf, ok := ret.Get(0).(func(string, int64) store.StoreChannel); ok {
    75  		r0 = rf(webhookId, time)
    76  	} else {
    77  		if ret.Get(0) != nil {
    78  			r0 = ret.Get(0).(store.StoreChannel)
    79  		}
    80  	}
    81  
    82  	return r0
    83  }
    84  
    85  // GetIncoming provides a mock function with given fields: id, allowFromCache
    86  func (_m *WebhookStore) GetIncoming(id string, allowFromCache bool) store.StoreChannel {
    87  	ret := _m.Called(id, allowFromCache)
    88  
    89  	var r0 store.StoreChannel
    90  	if rf, ok := ret.Get(0).(func(string, bool) store.StoreChannel); ok {
    91  		r0 = rf(id, allowFromCache)
    92  	} else {
    93  		if ret.Get(0) != nil {
    94  			r0 = ret.Get(0).(store.StoreChannel)
    95  		}
    96  	}
    97  
    98  	return r0
    99  }
   100  
   101  // GetIncomingByChannel provides a mock function with given fields: channelId
   102  func (_m *WebhookStore) GetIncomingByChannel(channelId string) store.StoreChannel {
   103  	ret := _m.Called(channelId)
   104  
   105  	var r0 store.StoreChannel
   106  	if rf, ok := ret.Get(0).(func(string) store.StoreChannel); ok {
   107  		r0 = rf(channelId)
   108  	} else {
   109  		if ret.Get(0) != nil {
   110  			r0 = ret.Get(0).(store.StoreChannel)
   111  		}
   112  	}
   113  
   114  	return r0
   115  }
   116  
   117  // GetIncomingByTeam provides a mock function with given fields: teamId, offset, limit
   118  func (_m *WebhookStore) GetIncomingByTeam(teamId string, offset int, limit int) store.StoreChannel {
   119  	ret := _m.Called(teamId, offset, limit)
   120  
   121  	var r0 store.StoreChannel
   122  	if rf, ok := ret.Get(0).(func(string, int, int) store.StoreChannel); ok {
   123  		r0 = rf(teamId, offset, limit)
   124  	} else {
   125  		if ret.Get(0) != nil {
   126  			r0 = ret.Get(0).(store.StoreChannel)
   127  		}
   128  	}
   129  
   130  	return r0
   131  }
   132  
   133  // GetIncomingList provides a mock function with given fields: offset, limit
   134  func (_m *WebhookStore) GetIncomingList(offset int, limit int) store.StoreChannel {
   135  	ret := _m.Called(offset, limit)
   136  
   137  	var r0 store.StoreChannel
   138  	if rf, ok := ret.Get(0).(func(int, int) store.StoreChannel); ok {
   139  		r0 = rf(offset, limit)
   140  	} else {
   141  		if ret.Get(0) != nil {
   142  			r0 = ret.Get(0).(store.StoreChannel)
   143  		}
   144  	}
   145  
   146  	return r0
   147  }
   148  
   149  // GetOutgoing provides a mock function with given fields: id
   150  func (_m *WebhookStore) GetOutgoing(id string) store.StoreChannel {
   151  	ret := _m.Called(id)
   152  
   153  	var r0 store.StoreChannel
   154  	if rf, ok := ret.Get(0).(func(string) store.StoreChannel); ok {
   155  		r0 = rf(id)
   156  	} else {
   157  		if ret.Get(0) != nil {
   158  			r0 = ret.Get(0).(store.StoreChannel)
   159  		}
   160  	}
   161  
   162  	return r0
   163  }
   164  
   165  // GetOutgoingByChannel provides a mock function with given fields: channelId, offset, limit
   166  func (_m *WebhookStore) GetOutgoingByChannel(channelId string, offset int, limit int) store.StoreChannel {
   167  	ret := _m.Called(channelId, offset, limit)
   168  
   169  	var r0 store.StoreChannel
   170  	if rf, ok := ret.Get(0).(func(string, int, int) store.StoreChannel); ok {
   171  		r0 = rf(channelId, offset, limit)
   172  	} else {
   173  		if ret.Get(0) != nil {
   174  			r0 = ret.Get(0).(store.StoreChannel)
   175  		}
   176  	}
   177  
   178  	return r0
   179  }
   180  
   181  // GetOutgoingByTeam provides a mock function with given fields: teamId, offset, limit
   182  func (_m *WebhookStore) GetOutgoingByTeam(teamId string, offset int, limit int) store.StoreChannel {
   183  	ret := _m.Called(teamId, offset, limit)
   184  
   185  	var r0 store.StoreChannel
   186  	if rf, ok := ret.Get(0).(func(string, int, int) store.StoreChannel); ok {
   187  		r0 = rf(teamId, offset, limit)
   188  	} else {
   189  		if ret.Get(0) != nil {
   190  			r0 = ret.Get(0).(store.StoreChannel)
   191  		}
   192  	}
   193  
   194  	return r0
   195  }
   196  
   197  // GetOutgoingList provides a mock function with given fields: offset, limit
   198  func (_m *WebhookStore) GetOutgoingList(offset int, limit int) store.StoreChannel {
   199  	ret := _m.Called(offset, limit)
   200  
   201  	var r0 store.StoreChannel
   202  	if rf, ok := ret.Get(0).(func(int, int) store.StoreChannel); ok {
   203  		r0 = rf(offset, limit)
   204  	} else {
   205  		if ret.Get(0) != nil {
   206  			r0 = ret.Get(0).(store.StoreChannel)
   207  		}
   208  	}
   209  
   210  	return r0
   211  }
   212  
   213  // InvalidateWebhookCache provides a mock function with given fields: webhook
   214  func (_m *WebhookStore) InvalidateWebhookCache(webhook string) {
   215  	_m.Called(webhook)
   216  }
   217  
   218  // PermanentDeleteIncomingByChannel provides a mock function with given fields: channelId
   219  func (_m *WebhookStore) PermanentDeleteIncomingByChannel(channelId string) store.StoreChannel {
   220  	ret := _m.Called(channelId)
   221  
   222  	var r0 store.StoreChannel
   223  	if rf, ok := ret.Get(0).(func(string) store.StoreChannel); ok {
   224  		r0 = rf(channelId)
   225  	} else {
   226  		if ret.Get(0) != nil {
   227  			r0 = ret.Get(0).(store.StoreChannel)
   228  		}
   229  	}
   230  
   231  	return r0
   232  }
   233  
   234  // PermanentDeleteIncomingByUser provides a mock function with given fields: userId
   235  func (_m *WebhookStore) PermanentDeleteIncomingByUser(userId string) store.StoreChannel {
   236  	ret := _m.Called(userId)
   237  
   238  	var r0 store.StoreChannel
   239  	if rf, ok := ret.Get(0).(func(string) store.StoreChannel); ok {
   240  		r0 = rf(userId)
   241  	} else {
   242  		if ret.Get(0) != nil {
   243  			r0 = ret.Get(0).(store.StoreChannel)
   244  		}
   245  	}
   246  
   247  	return r0
   248  }
   249  
   250  // PermanentDeleteOutgoingByChannel provides a mock function with given fields: channelId
   251  func (_m *WebhookStore) PermanentDeleteOutgoingByChannel(channelId string) store.StoreChannel {
   252  	ret := _m.Called(channelId)
   253  
   254  	var r0 store.StoreChannel
   255  	if rf, ok := ret.Get(0).(func(string) store.StoreChannel); ok {
   256  		r0 = rf(channelId)
   257  	} else {
   258  		if ret.Get(0) != nil {
   259  			r0 = ret.Get(0).(store.StoreChannel)
   260  		}
   261  	}
   262  
   263  	return r0
   264  }
   265  
   266  // PermanentDeleteOutgoingByUser provides a mock function with given fields: userId
   267  func (_m *WebhookStore) PermanentDeleteOutgoingByUser(userId string) store.StoreChannel {
   268  	ret := _m.Called(userId)
   269  
   270  	var r0 store.StoreChannel
   271  	if rf, ok := ret.Get(0).(func(string) store.StoreChannel); ok {
   272  		r0 = rf(userId)
   273  	} else {
   274  		if ret.Get(0) != nil {
   275  			r0 = ret.Get(0).(store.StoreChannel)
   276  		}
   277  	}
   278  
   279  	return r0
   280  }
   281  
   282  // SaveIncoming provides a mock function with given fields: webhook
   283  func (_m *WebhookStore) SaveIncoming(webhook *model.IncomingWebhook) store.StoreChannel {
   284  	ret := _m.Called(webhook)
   285  
   286  	var r0 store.StoreChannel
   287  	if rf, ok := ret.Get(0).(func(*model.IncomingWebhook) store.StoreChannel); ok {
   288  		r0 = rf(webhook)
   289  	} else {
   290  		if ret.Get(0) != nil {
   291  			r0 = ret.Get(0).(store.StoreChannel)
   292  		}
   293  	}
   294  
   295  	return r0
   296  }
   297  
   298  // SaveOutgoing provides a mock function with given fields: webhook
   299  func (_m *WebhookStore) SaveOutgoing(webhook *model.OutgoingWebhook) store.StoreChannel {
   300  	ret := _m.Called(webhook)
   301  
   302  	var r0 store.StoreChannel
   303  	if rf, ok := ret.Get(0).(func(*model.OutgoingWebhook) store.StoreChannel); ok {
   304  		r0 = rf(webhook)
   305  	} else {
   306  		if ret.Get(0) != nil {
   307  			r0 = ret.Get(0).(store.StoreChannel)
   308  		}
   309  	}
   310  
   311  	return r0
   312  }
   313  
   314  // UpdateIncoming provides a mock function with given fields: webhook
   315  func (_m *WebhookStore) UpdateIncoming(webhook *model.IncomingWebhook) store.StoreChannel {
   316  	ret := _m.Called(webhook)
   317  
   318  	var r0 store.StoreChannel
   319  	if rf, ok := ret.Get(0).(func(*model.IncomingWebhook) store.StoreChannel); ok {
   320  		r0 = rf(webhook)
   321  	} else {
   322  		if ret.Get(0) != nil {
   323  			r0 = ret.Get(0).(store.StoreChannel)
   324  		}
   325  	}
   326  
   327  	return r0
   328  }
   329  
   330  // UpdateOutgoing provides a mock function with given fields: hook
   331  func (_m *WebhookStore) UpdateOutgoing(hook *model.OutgoingWebhook) store.StoreChannel {
   332  	ret := _m.Called(hook)
   333  
   334  	var r0 store.StoreChannel
   335  	if rf, ok := ret.Get(0).(func(*model.OutgoingWebhook) store.StoreChannel); ok {
   336  		r0 = rf(hook)
   337  	} else {
   338  		if ret.Get(0) != nil {
   339  			r0 = ret.Get(0).(store.StoreChannel)
   340  		}
   341  	}
   342  
   343  	return r0
   344  }