github.com/xzl8028/xenia-server@v0.0.0-20190809101854-18450a97da63/store/storetest/mocks/PreferenceStore.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/xzl8028/xenia-server/model"
     9  
    10  // PreferenceStore is an autogenerated mock type for the PreferenceStore type
    11  type PreferenceStore struct {
    12  	mock.Mock
    13  }
    14  
    15  // CleanupFlagsBatch provides a mock function with given fields: limit
    16  func (_m *PreferenceStore) CleanupFlagsBatch(limit int64) (int64, *model.AppError) {
    17  	ret := _m.Called(limit)
    18  
    19  	var r0 int64
    20  	if rf, ok := ret.Get(0).(func(int64) int64); ok {
    21  		r0 = rf(limit)
    22  	} else {
    23  		r0 = ret.Get(0).(int64)
    24  	}
    25  
    26  	var r1 *model.AppError
    27  	if rf, ok := ret.Get(1).(func(int64) *model.AppError); ok {
    28  		r1 = rf(limit)
    29  	} else {
    30  		if ret.Get(1) != nil {
    31  			r1 = ret.Get(1).(*model.AppError)
    32  		}
    33  	}
    34  
    35  	return r0, r1
    36  }
    37  
    38  // Delete provides a mock function with given fields: userId, category, name
    39  func (_m *PreferenceStore) Delete(userId string, category string, name string) *model.AppError {
    40  	ret := _m.Called(userId, category, name)
    41  
    42  	var r0 *model.AppError
    43  	if rf, ok := ret.Get(0).(func(string, string, string) *model.AppError); ok {
    44  		r0 = rf(userId, category, name)
    45  	} else {
    46  		if ret.Get(0) != nil {
    47  			r0 = ret.Get(0).(*model.AppError)
    48  		}
    49  	}
    50  
    51  	return r0
    52  }
    53  
    54  // DeleteCategory provides a mock function with given fields: userId, category
    55  func (_m *PreferenceStore) DeleteCategory(userId string, category string) *model.AppError {
    56  	ret := _m.Called(userId, category)
    57  
    58  	var r0 *model.AppError
    59  	if rf, ok := ret.Get(0).(func(string, string) *model.AppError); ok {
    60  		r0 = rf(userId, category)
    61  	} else {
    62  		if ret.Get(0) != nil {
    63  			r0 = ret.Get(0).(*model.AppError)
    64  		}
    65  	}
    66  
    67  	return r0
    68  }
    69  
    70  // DeleteCategoryAndName provides a mock function with given fields: category, name
    71  func (_m *PreferenceStore) DeleteCategoryAndName(category string, name string) *model.AppError {
    72  	ret := _m.Called(category, name)
    73  
    74  	var r0 *model.AppError
    75  	if rf, ok := ret.Get(0).(func(string, string) *model.AppError); ok {
    76  		r0 = rf(category, name)
    77  	} else {
    78  		if ret.Get(0) != nil {
    79  			r0 = ret.Get(0).(*model.AppError)
    80  		}
    81  	}
    82  
    83  	return r0
    84  }
    85  
    86  // Get provides a mock function with given fields: userId, category, name
    87  func (_m *PreferenceStore) Get(userId string, category string, name string) (*model.Preference, *model.AppError) {
    88  	ret := _m.Called(userId, category, name)
    89  
    90  	var r0 *model.Preference
    91  	if rf, ok := ret.Get(0).(func(string, string, string) *model.Preference); ok {
    92  		r0 = rf(userId, category, name)
    93  	} else {
    94  		if ret.Get(0) != nil {
    95  			r0 = ret.Get(0).(*model.Preference)
    96  		}
    97  	}
    98  
    99  	var r1 *model.AppError
   100  	if rf, ok := ret.Get(1).(func(string, string, string) *model.AppError); ok {
   101  		r1 = rf(userId, category, name)
   102  	} else {
   103  		if ret.Get(1) != nil {
   104  			r1 = ret.Get(1).(*model.AppError)
   105  		}
   106  	}
   107  
   108  	return r0, r1
   109  }
   110  
   111  // GetAll provides a mock function with given fields: userId
   112  func (_m *PreferenceStore) GetAll(userId string) (model.Preferences, *model.AppError) {
   113  	ret := _m.Called(userId)
   114  
   115  	var r0 model.Preferences
   116  	if rf, ok := ret.Get(0).(func(string) model.Preferences); ok {
   117  		r0 = rf(userId)
   118  	} else {
   119  		if ret.Get(0) != nil {
   120  			r0 = ret.Get(0).(model.Preferences)
   121  		}
   122  	}
   123  
   124  	var r1 *model.AppError
   125  	if rf, ok := ret.Get(1).(func(string) *model.AppError); ok {
   126  		r1 = rf(userId)
   127  	} else {
   128  		if ret.Get(1) != nil {
   129  			r1 = ret.Get(1).(*model.AppError)
   130  		}
   131  	}
   132  
   133  	return r0, r1
   134  }
   135  
   136  // GetCategory provides a mock function with given fields: userId, category
   137  func (_m *PreferenceStore) GetCategory(userId string, category string) (model.Preferences, *model.AppError) {
   138  	ret := _m.Called(userId, category)
   139  
   140  	var r0 model.Preferences
   141  	if rf, ok := ret.Get(0).(func(string, string) model.Preferences); ok {
   142  		r0 = rf(userId, category)
   143  	} else {
   144  		if ret.Get(0) != nil {
   145  			r0 = ret.Get(0).(model.Preferences)
   146  		}
   147  	}
   148  
   149  	var r1 *model.AppError
   150  	if rf, ok := ret.Get(1).(func(string, string) *model.AppError); ok {
   151  		r1 = rf(userId, category)
   152  	} else {
   153  		if ret.Get(1) != nil {
   154  			r1 = ret.Get(1).(*model.AppError)
   155  		}
   156  	}
   157  
   158  	return r0, r1
   159  }
   160  
   161  // IsFeatureEnabled provides a mock function with given fields: feature, userId
   162  func (_m *PreferenceStore) IsFeatureEnabled(feature string, userId string) (bool, *model.AppError) {
   163  	ret := _m.Called(feature, userId)
   164  
   165  	var r0 bool
   166  	if rf, ok := ret.Get(0).(func(string, string) bool); ok {
   167  		r0 = rf(feature, userId)
   168  	} else {
   169  		r0 = ret.Get(0).(bool)
   170  	}
   171  
   172  	var r1 *model.AppError
   173  	if rf, ok := ret.Get(1).(func(string, string) *model.AppError); ok {
   174  		r1 = rf(feature, userId)
   175  	} else {
   176  		if ret.Get(1) != nil {
   177  			r1 = ret.Get(1).(*model.AppError)
   178  		}
   179  	}
   180  
   181  	return r0, r1
   182  }
   183  
   184  // PermanentDeleteByUser provides a mock function with given fields: userId
   185  func (_m *PreferenceStore) PermanentDeleteByUser(userId string) *model.AppError {
   186  	ret := _m.Called(userId)
   187  
   188  	var r0 *model.AppError
   189  	if rf, ok := ret.Get(0).(func(string) *model.AppError); ok {
   190  		r0 = rf(userId)
   191  	} else {
   192  		if ret.Get(0) != nil {
   193  			r0 = ret.Get(0).(*model.AppError)
   194  		}
   195  	}
   196  
   197  	return r0
   198  }
   199  
   200  // Save provides a mock function with given fields: preferences
   201  func (_m *PreferenceStore) Save(preferences *model.Preferences) *model.AppError {
   202  	ret := _m.Called(preferences)
   203  
   204  	var r0 *model.AppError
   205  	if rf, ok := ret.Get(0).(func(*model.Preferences) *model.AppError); ok {
   206  		r0 = rf(preferences)
   207  	} else {
   208  		if ret.Get(0) != nil {
   209  			r0 = ret.Get(0).(*model.AppError)
   210  		}
   211  	}
   212  
   213  	return r0
   214  }