github.com/mad-app/mattermost-server@v5.11.1+incompatible/store/storetest/mocks/JobStore.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  // JobStore is an autogenerated mock type for the JobStore type
    12  type JobStore struct {
    13  	mock.Mock
    14  }
    15  
    16  // Delete provides a mock function with given fields: id
    17  func (_m *JobStore) Delete(id string) store.StoreChannel {
    18  	ret := _m.Called(id)
    19  
    20  	var r0 store.StoreChannel
    21  	if rf, ok := ret.Get(0).(func(string) store.StoreChannel); ok {
    22  		r0 = rf(id)
    23  	} else {
    24  		if ret.Get(0) != nil {
    25  			r0 = ret.Get(0).(store.StoreChannel)
    26  		}
    27  	}
    28  
    29  	return r0
    30  }
    31  
    32  // Get provides a mock function with given fields: id
    33  func (_m *JobStore) Get(id string) store.StoreChannel {
    34  	ret := _m.Called(id)
    35  
    36  	var r0 store.StoreChannel
    37  	if rf, ok := ret.Get(0).(func(string) store.StoreChannel); ok {
    38  		r0 = rf(id)
    39  	} else {
    40  		if ret.Get(0) != nil {
    41  			r0 = ret.Get(0).(store.StoreChannel)
    42  		}
    43  	}
    44  
    45  	return r0
    46  }
    47  
    48  // GetAllByStatus provides a mock function with given fields: status
    49  func (_m *JobStore) GetAllByStatus(status string) store.StoreChannel {
    50  	ret := _m.Called(status)
    51  
    52  	var r0 store.StoreChannel
    53  	if rf, ok := ret.Get(0).(func(string) store.StoreChannel); ok {
    54  		r0 = rf(status)
    55  	} else {
    56  		if ret.Get(0) != nil {
    57  			r0 = ret.Get(0).(store.StoreChannel)
    58  		}
    59  	}
    60  
    61  	return r0
    62  }
    63  
    64  // GetAllByType provides a mock function with given fields: jobType
    65  func (_m *JobStore) GetAllByType(jobType string) store.StoreChannel {
    66  	ret := _m.Called(jobType)
    67  
    68  	var r0 store.StoreChannel
    69  	if rf, ok := ret.Get(0).(func(string) store.StoreChannel); ok {
    70  		r0 = rf(jobType)
    71  	} else {
    72  		if ret.Get(0) != nil {
    73  			r0 = ret.Get(0).(store.StoreChannel)
    74  		}
    75  	}
    76  
    77  	return r0
    78  }
    79  
    80  // GetAllByTypePage provides a mock function with given fields: jobType, offset, limit
    81  func (_m *JobStore) GetAllByTypePage(jobType string, offset int, limit int) store.StoreChannel {
    82  	ret := _m.Called(jobType, offset, limit)
    83  
    84  	var r0 store.StoreChannel
    85  	if rf, ok := ret.Get(0).(func(string, int, int) store.StoreChannel); ok {
    86  		r0 = rf(jobType, offset, limit)
    87  	} else {
    88  		if ret.Get(0) != nil {
    89  			r0 = ret.Get(0).(store.StoreChannel)
    90  		}
    91  	}
    92  
    93  	return r0
    94  }
    95  
    96  // GetAllPage provides a mock function with given fields: offset, limit
    97  func (_m *JobStore) GetAllPage(offset int, limit int) store.StoreChannel {
    98  	ret := _m.Called(offset, limit)
    99  
   100  	var r0 store.StoreChannel
   101  	if rf, ok := ret.Get(0).(func(int, int) store.StoreChannel); ok {
   102  		r0 = rf(offset, limit)
   103  	} else {
   104  		if ret.Get(0) != nil {
   105  			r0 = ret.Get(0).(store.StoreChannel)
   106  		}
   107  	}
   108  
   109  	return r0
   110  }
   111  
   112  // GetCountByStatusAndType provides a mock function with given fields: status, jobType
   113  func (_m *JobStore) GetCountByStatusAndType(status string, jobType string) store.StoreChannel {
   114  	ret := _m.Called(status, jobType)
   115  
   116  	var r0 store.StoreChannel
   117  	if rf, ok := ret.Get(0).(func(string, string) store.StoreChannel); ok {
   118  		r0 = rf(status, jobType)
   119  	} else {
   120  		if ret.Get(0) != nil {
   121  			r0 = ret.Get(0).(store.StoreChannel)
   122  		}
   123  	}
   124  
   125  	return r0
   126  }
   127  
   128  // GetNewestJobByStatusAndType provides a mock function with given fields: status, jobType
   129  func (_m *JobStore) GetNewestJobByStatusAndType(status string, jobType string) store.StoreChannel {
   130  	ret := _m.Called(status, jobType)
   131  
   132  	var r0 store.StoreChannel
   133  	if rf, ok := ret.Get(0).(func(string, string) store.StoreChannel); ok {
   134  		r0 = rf(status, jobType)
   135  	} else {
   136  		if ret.Get(0) != nil {
   137  			r0 = ret.Get(0).(store.StoreChannel)
   138  		}
   139  	}
   140  
   141  	return r0
   142  }
   143  
   144  // Save provides a mock function with given fields: job
   145  func (_m *JobStore) Save(job *model.Job) store.StoreChannel {
   146  	ret := _m.Called(job)
   147  
   148  	var r0 store.StoreChannel
   149  	if rf, ok := ret.Get(0).(func(*model.Job) store.StoreChannel); ok {
   150  		r0 = rf(job)
   151  	} else {
   152  		if ret.Get(0) != nil {
   153  			r0 = ret.Get(0).(store.StoreChannel)
   154  		}
   155  	}
   156  
   157  	return r0
   158  }
   159  
   160  // UpdateOptimistically provides a mock function with given fields: job, currentStatus
   161  func (_m *JobStore) UpdateOptimistically(job *model.Job, currentStatus string) store.StoreChannel {
   162  	ret := _m.Called(job, currentStatus)
   163  
   164  	var r0 store.StoreChannel
   165  	if rf, ok := ret.Get(0).(func(*model.Job, string) store.StoreChannel); ok {
   166  		r0 = rf(job, currentStatus)
   167  	} else {
   168  		if ret.Get(0) != nil {
   169  			r0 = ret.Get(0).(store.StoreChannel)
   170  		}
   171  	}
   172  
   173  	return r0
   174  }
   175  
   176  // UpdateStatus provides a mock function with given fields: id, status
   177  func (_m *JobStore) UpdateStatus(id string, status string) store.StoreChannel {
   178  	ret := _m.Called(id, status)
   179  
   180  	var r0 store.StoreChannel
   181  	if rf, ok := ret.Get(0).(func(string, string) store.StoreChannel); ok {
   182  		r0 = rf(id, status)
   183  	} else {
   184  		if ret.Get(0) != nil {
   185  			r0 = ret.Get(0).(store.StoreChannel)
   186  		}
   187  	}
   188  
   189  	return r0
   190  }
   191  
   192  // UpdateStatusOptimistically provides a mock function with given fields: id, currentStatus, newStatus
   193  func (_m *JobStore) UpdateStatusOptimistically(id string, currentStatus string, newStatus string) store.StoreChannel {
   194  	ret := _m.Called(id, currentStatus, newStatus)
   195  
   196  	var r0 store.StoreChannel
   197  	if rf, ok := ret.Get(0).(func(string, string, string) store.StoreChannel); ok {
   198  		r0 = rf(id, currentStatus, newStatus)
   199  	} else {
   200  		if ret.Get(0) != nil {
   201  			r0 = ret.Get(0).(store.StoreChannel)
   202  		}
   203  	}
   204  
   205  	return r0
   206  }