github.com/haalcala/mattermost-server-change-repo/v5@v5.33.2/store/storetest/mocks/PluginStore.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 (
     8  	model "github.com/mattermost/mattermost-server/v5/model"
     9  	mock "github.com/stretchr/testify/mock"
    10  )
    11  
    12  // PluginStore is an autogenerated mock type for the PluginStore type
    13  type PluginStore struct {
    14  	mock.Mock
    15  }
    16  
    17  // CompareAndDelete provides a mock function with given fields: keyVal, oldValue
    18  func (_m *PluginStore) CompareAndDelete(keyVal *model.PluginKeyValue, oldValue []byte) (bool, error) {
    19  	ret := _m.Called(keyVal, oldValue)
    20  
    21  	var r0 bool
    22  	if rf, ok := ret.Get(0).(func(*model.PluginKeyValue, []byte) bool); ok {
    23  		r0 = rf(keyVal, oldValue)
    24  	} else {
    25  		r0 = ret.Get(0).(bool)
    26  	}
    27  
    28  	var r1 error
    29  	if rf, ok := ret.Get(1).(func(*model.PluginKeyValue, []byte) error); ok {
    30  		r1 = rf(keyVal, oldValue)
    31  	} else {
    32  		r1 = ret.Error(1)
    33  	}
    34  
    35  	return r0, r1
    36  }
    37  
    38  // CompareAndSet provides a mock function with given fields: keyVal, oldValue
    39  func (_m *PluginStore) CompareAndSet(keyVal *model.PluginKeyValue, oldValue []byte) (bool, error) {
    40  	ret := _m.Called(keyVal, oldValue)
    41  
    42  	var r0 bool
    43  	if rf, ok := ret.Get(0).(func(*model.PluginKeyValue, []byte) bool); ok {
    44  		r0 = rf(keyVal, oldValue)
    45  	} else {
    46  		r0 = ret.Get(0).(bool)
    47  	}
    48  
    49  	var r1 error
    50  	if rf, ok := ret.Get(1).(func(*model.PluginKeyValue, []byte) error); ok {
    51  		r1 = rf(keyVal, oldValue)
    52  	} else {
    53  		r1 = ret.Error(1)
    54  	}
    55  
    56  	return r0, r1
    57  }
    58  
    59  // Delete provides a mock function with given fields: pluginId, key
    60  func (_m *PluginStore) Delete(pluginId string, key string) error {
    61  	ret := _m.Called(pluginId, key)
    62  
    63  	var r0 error
    64  	if rf, ok := ret.Get(0).(func(string, string) error); ok {
    65  		r0 = rf(pluginId, key)
    66  	} else {
    67  		r0 = ret.Error(0)
    68  	}
    69  
    70  	return r0
    71  }
    72  
    73  // DeleteAllExpired provides a mock function with given fields:
    74  func (_m *PluginStore) DeleteAllExpired() error {
    75  	ret := _m.Called()
    76  
    77  	var r0 error
    78  	if rf, ok := ret.Get(0).(func() error); ok {
    79  		r0 = rf()
    80  	} else {
    81  		r0 = ret.Error(0)
    82  	}
    83  
    84  	return r0
    85  }
    86  
    87  // DeleteAllForPlugin provides a mock function with given fields: PluginId
    88  func (_m *PluginStore) DeleteAllForPlugin(PluginId string) error {
    89  	ret := _m.Called(PluginId)
    90  
    91  	var r0 error
    92  	if rf, ok := ret.Get(0).(func(string) error); ok {
    93  		r0 = rf(PluginId)
    94  	} else {
    95  		r0 = ret.Error(0)
    96  	}
    97  
    98  	return r0
    99  }
   100  
   101  // Get provides a mock function with given fields: pluginId, key
   102  func (_m *PluginStore) Get(pluginId string, key string) (*model.PluginKeyValue, error) {
   103  	ret := _m.Called(pluginId, key)
   104  
   105  	var r0 *model.PluginKeyValue
   106  	if rf, ok := ret.Get(0).(func(string, string) *model.PluginKeyValue); ok {
   107  		r0 = rf(pluginId, key)
   108  	} else {
   109  		if ret.Get(0) != nil {
   110  			r0 = ret.Get(0).(*model.PluginKeyValue)
   111  		}
   112  	}
   113  
   114  	var r1 error
   115  	if rf, ok := ret.Get(1).(func(string, string) error); ok {
   116  		r1 = rf(pluginId, key)
   117  	} else {
   118  		r1 = ret.Error(1)
   119  	}
   120  
   121  	return r0, r1
   122  }
   123  
   124  // List provides a mock function with given fields: pluginId, page, perPage
   125  func (_m *PluginStore) List(pluginId string, page int, perPage int) ([]string, error) {
   126  	ret := _m.Called(pluginId, page, perPage)
   127  
   128  	var r0 []string
   129  	if rf, ok := ret.Get(0).(func(string, int, int) []string); ok {
   130  		r0 = rf(pluginId, page, perPage)
   131  	} else {
   132  		if ret.Get(0) != nil {
   133  			r0 = ret.Get(0).([]string)
   134  		}
   135  	}
   136  
   137  	var r1 error
   138  	if rf, ok := ret.Get(1).(func(string, int, int) error); ok {
   139  		r1 = rf(pluginId, page, perPage)
   140  	} else {
   141  		r1 = ret.Error(1)
   142  	}
   143  
   144  	return r0, r1
   145  }
   146  
   147  // SaveOrUpdate provides a mock function with given fields: keyVal
   148  func (_m *PluginStore) SaveOrUpdate(keyVal *model.PluginKeyValue) (*model.PluginKeyValue, error) {
   149  	ret := _m.Called(keyVal)
   150  
   151  	var r0 *model.PluginKeyValue
   152  	if rf, ok := ret.Get(0).(func(*model.PluginKeyValue) *model.PluginKeyValue); ok {
   153  		r0 = rf(keyVal)
   154  	} else {
   155  		if ret.Get(0) != nil {
   156  			r0 = ret.Get(0).(*model.PluginKeyValue)
   157  		}
   158  	}
   159  
   160  	var r1 error
   161  	if rf, ok := ret.Get(1).(func(*model.PluginKeyValue) error); ok {
   162  		r1 = rf(keyVal)
   163  	} else {
   164  		r1 = ret.Error(1)
   165  	}
   166  
   167  	return r0, r1
   168  }
   169  
   170  // SetWithOptions provides a mock function with given fields: pluginId, key, value, options
   171  func (_m *PluginStore) SetWithOptions(pluginId string, key string, value []byte, options model.PluginKVSetOptions) (bool, error) {
   172  	ret := _m.Called(pluginId, key, value, options)
   173  
   174  	var r0 bool
   175  	if rf, ok := ret.Get(0).(func(string, string, []byte, model.PluginKVSetOptions) bool); ok {
   176  		r0 = rf(pluginId, key, value, options)
   177  	} else {
   178  		r0 = ret.Get(0).(bool)
   179  	}
   180  
   181  	var r1 error
   182  	if rf, ok := ret.Get(1).(func(string, string, []byte, model.PluginKVSetOptions) error); ok {
   183  		r1 = rf(pluginId, key, value, options)
   184  	} else {
   185  		r1 = ret.Error(1)
   186  	}
   187  
   188  	return r0, r1
   189  }