1// Code generated by mockery v1.0.0. DO NOT EDIT.
2
3// Regenerate this file using `make store-mocks`.
4
5package mocks
6
7import (
8	model "github.com/mattermost/mattermost-server/v6/model"
9	mock "github.com/stretchr/testify/mock"
10)
11
12// PreferenceStore is an autogenerated mock type for the PreferenceStore type
13type PreferenceStore struct {
14	mock.Mock
15}
16
17// CleanupFlagsBatch provides a mock function with given fields: limit
18func (_m *PreferenceStore) CleanupFlagsBatch(limit int64) (int64, error) {
19	ret := _m.Called(limit)
20
21	var r0 int64
22	if rf, ok := ret.Get(0).(func(int64) int64); ok {
23		r0 = rf(limit)
24	} else {
25		r0 = ret.Get(0).(int64)
26	}
27
28	var r1 error
29	if rf, ok := ret.Get(1).(func(int64) error); ok {
30		r1 = rf(limit)
31	} else {
32		r1 = ret.Error(1)
33	}
34
35	return r0, r1
36}
37
38// Delete provides a mock function with given fields: userID, category, name
39func (_m *PreferenceStore) Delete(userID string, category string, name string) error {
40	ret := _m.Called(userID, category, name)
41
42	var r0 error
43	if rf, ok := ret.Get(0).(func(string, string, string) error); ok {
44		r0 = rf(userID, category, name)
45	} else {
46		r0 = ret.Error(0)
47	}
48
49	return r0
50}
51
52// DeleteCategory provides a mock function with given fields: userID, category
53func (_m *PreferenceStore) DeleteCategory(userID string, category string) error {
54	ret := _m.Called(userID, category)
55
56	var r0 error
57	if rf, ok := ret.Get(0).(func(string, string) error); ok {
58		r0 = rf(userID, category)
59	} else {
60		r0 = ret.Error(0)
61	}
62
63	return r0
64}
65
66// DeleteCategoryAndName provides a mock function with given fields: category, name
67func (_m *PreferenceStore) DeleteCategoryAndName(category string, name string) error {
68	ret := _m.Called(category, name)
69
70	var r0 error
71	if rf, ok := ret.Get(0).(func(string, string) error); ok {
72		r0 = rf(category, name)
73	} else {
74		r0 = ret.Error(0)
75	}
76
77	return r0
78}
79
80// DeleteOrphanedRows provides a mock function with given fields: limit
81func (_m *PreferenceStore) DeleteOrphanedRows(limit int) (int64, error) {
82	ret := _m.Called(limit)
83
84	var r0 int64
85	if rf, ok := ret.Get(0).(func(int) int64); ok {
86		r0 = rf(limit)
87	} else {
88		r0 = ret.Get(0).(int64)
89	}
90
91	var r1 error
92	if rf, ok := ret.Get(1).(func(int) error); ok {
93		r1 = rf(limit)
94	} else {
95		r1 = ret.Error(1)
96	}
97
98	return r0, r1
99}
100
101// Get provides a mock function with given fields: userID, category, name
102func (_m *PreferenceStore) Get(userID string, category string, name string) (*model.Preference, error) {
103	ret := _m.Called(userID, category, name)
104
105	var r0 *model.Preference
106	if rf, ok := ret.Get(0).(func(string, string, string) *model.Preference); ok {
107		r0 = rf(userID, category, name)
108	} else {
109		if ret.Get(0) != nil {
110			r0 = ret.Get(0).(*model.Preference)
111		}
112	}
113
114	var r1 error
115	if rf, ok := ret.Get(1).(func(string, string, string) error); ok {
116		r1 = rf(userID, category, name)
117	} else {
118		r1 = ret.Error(1)
119	}
120
121	return r0, r1
122}
123
124// GetAll provides a mock function with given fields: userID
125func (_m *PreferenceStore) GetAll(userID string) (model.Preferences, error) {
126	ret := _m.Called(userID)
127
128	var r0 model.Preferences
129	if rf, ok := ret.Get(0).(func(string) model.Preferences); ok {
130		r0 = rf(userID)
131	} else {
132		if ret.Get(0) != nil {
133			r0 = ret.Get(0).(model.Preferences)
134		}
135	}
136
137	var r1 error
138	if rf, ok := ret.Get(1).(func(string) error); ok {
139		r1 = rf(userID)
140	} else {
141		r1 = ret.Error(1)
142	}
143
144	return r0, r1
145}
146
147// GetCategory provides a mock function with given fields: userID, category
148func (_m *PreferenceStore) GetCategory(userID string, category string) (model.Preferences, error) {
149	ret := _m.Called(userID, category)
150
151	var r0 model.Preferences
152	if rf, ok := ret.Get(0).(func(string, string) model.Preferences); ok {
153		r0 = rf(userID, category)
154	} else {
155		if ret.Get(0) != nil {
156			r0 = ret.Get(0).(model.Preferences)
157		}
158	}
159
160	var r1 error
161	if rf, ok := ret.Get(1).(func(string, string) error); ok {
162		r1 = rf(userID, category)
163	} else {
164		r1 = ret.Error(1)
165	}
166
167	return r0, r1
168}
169
170// PermanentDeleteByUser provides a mock function with given fields: userID
171func (_m *PreferenceStore) PermanentDeleteByUser(userID string) error {
172	ret := _m.Called(userID)
173
174	var r0 error
175	if rf, ok := ret.Get(0).(func(string) error); ok {
176		r0 = rf(userID)
177	} else {
178		r0 = ret.Error(0)
179	}
180
181	return r0
182}
183
184// Save provides a mock function with given fields: preferences
185func (_m *PreferenceStore) Save(preferences model.Preferences) error {
186	ret := _m.Called(preferences)
187
188	var r0 error
189	if rf, ok := ret.Get(0).(func(model.Preferences) error); ok {
190		r0 = rf(preferences)
191	} else {
192		r0 = ret.Error(0)
193	}
194
195	return r0
196}
197