MM-25478: Migrate compliancestore to plain error (#15074)

* ComplianceStore migration

* Fix imports

* Added one string

* fix go.tools.mod

Co-authored-by: Rodrigo Villablanca <villa061004@gmail.com>
Co-authored-by: Mattermod <mattermod@users.noreply.github.com>
Этот коммит содержится в:
Agniva De Sarker
2020-07-27 15:23:02 +05:30
коммит произвёл GitHub
родитель e5edf2683d
Коммит 29c8b58fc7
10 изменённых файлов: 113 добавлений и 110 удалений

Просмотреть файл

@@ -15,7 +15,7 @@ type ComplianceStore struct {
}
// ComplianceExport provides a mock function with given fields: compliance
func (_m *ComplianceStore) ComplianceExport(compliance *model.Compliance) ([]*model.CompliancePost, *model.AppError) {
func (_m *ComplianceStore) ComplianceExport(compliance *model.Compliance) ([]*model.CompliancePost, error) {
ret := _m.Called(compliance)
var r0 []*model.CompliancePost
@@ -27,20 +27,18 @@ func (_m *ComplianceStore) ComplianceExport(compliance *model.Compliance) ([]*mo
}
}
var r1 *model.AppError
if rf, ok := ret.Get(1).(func(*model.Compliance) *model.AppError); ok {
var r1 error
if rf, ok := ret.Get(1).(func(*model.Compliance) error); ok {
r1 = rf(compliance)
} else {
if ret.Get(1) != nil {
r1 = ret.Get(1).(*model.AppError)
}
r1 = ret.Error(1)
}
return r0, r1
}
// Get provides a mock function with given fields: id
func (_m *ComplianceStore) Get(id string) (*model.Compliance, *model.AppError) {
func (_m *ComplianceStore) Get(id string) (*model.Compliance, error) {
ret := _m.Called(id)
var r0 *model.Compliance
@@ -52,20 +50,18 @@ func (_m *ComplianceStore) Get(id string) (*model.Compliance, *model.AppError) {
}
}
var r1 *model.AppError
if rf, ok := ret.Get(1).(func(string) *model.AppError); ok {
var r1 error
if rf, ok := ret.Get(1).(func(string) error); ok {
r1 = rf(id)
} else {
if ret.Get(1) != nil {
r1 = ret.Get(1).(*model.AppError)
}
r1 = ret.Error(1)
}
return r0, r1
}
// GetAll provides a mock function with given fields: offset, limit
func (_m *ComplianceStore) GetAll(offset int, limit int) (model.Compliances, *model.AppError) {
func (_m *ComplianceStore) GetAll(offset int, limit int) (model.Compliances, error) {
ret := _m.Called(offset, limit)
var r0 model.Compliances
@@ -77,20 +73,18 @@ func (_m *ComplianceStore) GetAll(offset int, limit int) (model.Compliances, *mo
}
}
var r1 *model.AppError
if rf, ok := ret.Get(1).(func(int, int) *model.AppError); ok {
var r1 error
if rf, ok := ret.Get(1).(func(int, int) error); ok {
r1 = rf(offset, limit)
} else {
if ret.Get(1) != nil {
r1 = ret.Get(1).(*model.AppError)
}
r1 = ret.Error(1)
}
return r0, r1
}
// MessageExport provides a mock function with given fields: after, limit
func (_m *ComplianceStore) MessageExport(after int64, limit int) ([]*model.MessageExport, *model.AppError) {
func (_m *ComplianceStore) MessageExport(after int64, limit int) ([]*model.MessageExport, error) {
ret := _m.Called(after, limit)
var r0 []*model.MessageExport
@@ -102,20 +96,18 @@ func (_m *ComplianceStore) MessageExport(after int64, limit int) ([]*model.Messa
}
}
var r1 *model.AppError
if rf, ok := ret.Get(1).(func(int64, int) *model.AppError); ok {
var r1 error
if rf, ok := ret.Get(1).(func(int64, int) error); ok {
r1 = rf(after, limit)
} else {
if ret.Get(1) != nil {
r1 = ret.Get(1).(*model.AppError)
}
r1 = ret.Error(1)
}
return r0, r1
}
// Save provides a mock function with given fields: compliance
func (_m *ComplianceStore) Save(compliance *model.Compliance) (*model.Compliance, *model.AppError) {
func (_m *ComplianceStore) Save(compliance *model.Compliance) (*model.Compliance, error) {
ret := _m.Called(compliance)
var r0 *model.Compliance
@@ -127,20 +119,18 @@ func (_m *ComplianceStore) Save(compliance *model.Compliance) (*model.Compliance
}
}
var r1 *model.AppError
if rf, ok := ret.Get(1).(func(*model.Compliance) *model.AppError); ok {
var r1 error
if rf, ok := ret.Get(1).(func(*model.Compliance) error); ok {
r1 = rf(compliance)
} else {
if ret.Get(1) != nil {
r1 = ret.Get(1).(*model.AppError)
}
r1 = ret.Error(1)
}
return r0, r1
}
// Update provides a mock function with given fields: compliance
func (_m *ComplianceStore) Update(compliance *model.Compliance) (*model.Compliance, *model.AppError) {
func (_m *ComplianceStore) Update(compliance *model.Compliance) (*model.Compliance, error) {
ret := _m.Called(compliance)
var r0 *model.Compliance
@@ -152,13 +142,11 @@ func (_m *ComplianceStore) Update(compliance *model.Compliance) (*model.Complian
}
}
var r1 *model.AppError
if rf, ok := ret.Get(1).(func(*model.Compliance) *model.AppError); ok {
var r1 error
if rf, ok := ret.Get(1).(func(*model.Compliance) error); ok {
r1 = rf(compliance)
} else {
if ret.Get(1) != nil {
r1 = ret.Get(1).(*model.AppError)
}
r1 = ret.Error(1)
}
return r0, r1