github.com/haalcala/mattermost-server-change-repo/v5@v5.33.2/store/storetest/mocks/OAuthStore.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  // OAuthStore is an autogenerated mock type for the OAuthStore type
    13  type OAuthStore struct {
    14  	mock.Mock
    15  }
    16  
    17  // DeleteApp provides a mock function with given fields: id
    18  func (_m *OAuthStore) DeleteApp(id string) error {
    19  	ret := _m.Called(id)
    20  
    21  	var r0 error
    22  	if rf, ok := ret.Get(0).(func(string) error); ok {
    23  		r0 = rf(id)
    24  	} else {
    25  		r0 = ret.Error(0)
    26  	}
    27  
    28  	return r0
    29  }
    30  
    31  // GetAccessData provides a mock function with given fields: token
    32  func (_m *OAuthStore) GetAccessData(token string) (*model.AccessData, error) {
    33  	ret := _m.Called(token)
    34  
    35  	var r0 *model.AccessData
    36  	if rf, ok := ret.Get(0).(func(string) *model.AccessData); ok {
    37  		r0 = rf(token)
    38  	} else {
    39  		if ret.Get(0) != nil {
    40  			r0 = ret.Get(0).(*model.AccessData)
    41  		}
    42  	}
    43  
    44  	var r1 error
    45  	if rf, ok := ret.Get(1).(func(string) error); ok {
    46  		r1 = rf(token)
    47  	} else {
    48  		r1 = ret.Error(1)
    49  	}
    50  
    51  	return r0, r1
    52  }
    53  
    54  // GetAccessDataByRefreshToken provides a mock function with given fields: token
    55  func (_m *OAuthStore) GetAccessDataByRefreshToken(token string) (*model.AccessData, error) {
    56  	ret := _m.Called(token)
    57  
    58  	var r0 *model.AccessData
    59  	if rf, ok := ret.Get(0).(func(string) *model.AccessData); ok {
    60  		r0 = rf(token)
    61  	} else {
    62  		if ret.Get(0) != nil {
    63  			r0 = ret.Get(0).(*model.AccessData)
    64  		}
    65  	}
    66  
    67  	var r1 error
    68  	if rf, ok := ret.Get(1).(func(string) error); ok {
    69  		r1 = rf(token)
    70  	} else {
    71  		r1 = ret.Error(1)
    72  	}
    73  
    74  	return r0, r1
    75  }
    76  
    77  // GetAccessDataByUserForApp provides a mock function with given fields: userId, clientId
    78  func (_m *OAuthStore) GetAccessDataByUserForApp(userId string, clientId string) ([]*model.AccessData, error) {
    79  	ret := _m.Called(userId, clientId)
    80  
    81  	var r0 []*model.AccessData
    82  	if rf, ok := ret.Get(0).(func(string, string) []*model.AccessData); ok {
    83  		r0 = rf(userId, clientId)
    84  	} else {
    85  		if ret.Get(0) != nil {
    86  			r0 = ret.Get(0).([]*model.AccessData)
    87  		}
    88  	}
    89  
    90  	var r1 error
    91  	if rf, ok := ret.Get(1).(func(string, string) error); ok {
    92  		r1 = rf(userId, clientId)
    93  	} else {
    94  		r1 = ret.Error(1)
    95  	}
    96  
    97  	return r0, r1
    98  }
    99  
   100  // GetApp provides a mock function with given fields: id
   101  func (_m *OAuthStore) GetApp(id string) (*model.OAuthApp, error) {
   102  	ret := _m.Called(id)
   103  
   104  	var r0 *model.OAuthApp
   105  	if rf, ok := ret.Get(0).(func(string) *model.OAuthApp); ok {
   106  		r0 = rf(id)
   107  	} else {
   108  		if ret.Get(0) != nil {
   109  			r0 = ret.Get(0).(*model.OAuthApp)
   110  		}
   111  	}
   112  
   113  	var r1 error
   114  	if rf, ok := ret.Get(1).(func(string) error); ok {
   115  		r1 = rf(id)
   116  	} else {
   117  		r1 = ret.Error(1)
   118  	}
   119  
   120  	return r0, r1
   121  }
   122  
   123  // GetAppByUser provides a mock function with given fields: userId, offset, limit
   124  func (_m *OAuthStore) GetAppByUser(userId string, offset int, limit int) ([]*model.OAuthApp, error) {
   125  	ret := _m.Called(userId, offset, limit)
   126  
   127  	var r0 []*model.OAuthApp
   128  	if rf, ok := ret.Get(0).(func(string, int, int) []*model.OAuthApp); ok {
   129  		r0 = rf(userId, offset, limit)
   130  	} else {
   131  		if ret.Get(0) != nil {
   132  			r0 = ret.Get(0).([]*model.OAuthApp)
   133  		}
   134  	}
   135  
   136  	var r1 error
   137  	if rf, ok := ret.Get(1).(func(string, int, int) error); ok {
   138  		r1 = rf(userId, offset, limit)
   139  	} else {
   140  		r1 = ret.Error(1)
   141  	}
   142  
   143  	return r0, r1
   144  }
   145  
   146  // GetApps provides a mock function with given fields: offset, limit
   147  func (_m *OAuthStore) GetApps(offset int, limit int) ([]*model.OAuthApp, error) {
   148  	ret := _m.Called(offset, limit)
   149  
   150  	var r0 []*model.OAuthApp
   151  	if rf, ok := ret.Get(0).(func(int, int) []*model.OAuthApp); ok {
   152  		r0 = rf(offset, limit)
   153  	} else {
   154  		if ret.Get(0) != nil {
   155  			r0 = ret.Get(0).([]*model.OAuthApp)
   156  		}
   157  	}
   158  
   159  	var r1 error
   160  	if rf, ok := ret.Get(1).(func(int, int) error); ok {
   161  		r1 = rf(offset, limit)
   162  	} else {
   163  		r1 = ret.Error(1)
   164  	}
   165  
   166  	return r0, r1
   167  }
   168  
   169  // GetAuthData provides a mock function with given fields: code
   170  func (_m *OAuthStore) GetAuthData(code string) (*model.AuthData, error) {
   171  	ret := _m.Called(code)
   172  
   173  	var r0 *model.AuthData
   174  	if rf, ok := ret.Get(0).(func(string) *model.AuthData); ok {
   175  		r0 = rf(code)
   176  	} else {
   177  		if ret.Get(0) != nil {
   178  			r0 = ret.Get(0).(*model.AuthData)
   179  		}
   180  	}
   181  
   182  	var r1 error
   183  	if rf, ok := ret.Get(1).(func(string) error); ok {
   184  		r1 = rf(code)
   185  	} else {
   186  		r1 = ret.Error(1)
   187  	}
   188  
   189  	return r0, r1
   190  }
   191  
   192  // GetAuthorizedApps provides a mock function with given fields: userId, offset, limit
   193  func (_m *OAuthStore) GetAuthorizedApps(userId string, offset int, limit int) ([]*model.OAuthApp, error) {
   194  	ret := _m.Called(userId, offset, limit)
   195  
   196  	var r0 []*model.OAuthApp
   197  	if rf, ok := ret.Get(0).(func(string, int, int) []*model.OAuthApp); ok {
   198  		r0 = rf(userId, offset, limit)
   199  	} else {
   200  		if ret.Get(0) != nil {
   201  			r0 = ret.Get(0).([]*model.OAuthApp)
   202  		}
   203  	}
   204  
   205  	var r1 error
   206  	if rf, ok := ret.Get(1).(func(string, int, int) error); ok {
   207  		r1 = rf(userId, offset, limit)
   208  	} else {
   209  		r1 = ret.Error(1)
   210  	}
   211  
   212  	return r0, r1
   213  }
   214  
   215  // GetPreviousAccessData provides a mock function with given fields: userId, clientId
   216  func (_m *OAuthStore) GetPreviousAccessData(userId string, clientId string) (*model.AccessData, error) {
   217  	ret := _m.Called(userId, clientId)
   218  
   219  	var r0 *model.AccessData
   220  	if rf, ok := ret.Get(0).(func(string, string) *model.AccessData); ok {
   221  		r0 = rf(userId, clientId)
   222  	} else {
   223  		if ret.Get(0) != nil {
   224  			r0 = ret.Get(0).(*model.AccessData)
   225  		}
   226  	}
   227  
   228  	var r1 error
   229  	if rf, ok := ret.Get(1).(func(string, string) error); ok {
   230  		r1 = rf(userId, clientId)
   231  	} else {
   232  		r1 = ret.Error(1)
   233  	}
   234  
   235  	return r0, r1
   236  }
   237  
   238  // PermanentDeleteAuthDataByUser provides a mock function with given fields: userId
   239  func (_m *OAuthStore) PermanentDeleteAuthDataByUser(userId string) error {
   240  	ret := _m.Called(userId)
   241  
   242  	var r0 error
   243  	if rf, ok := ret.Get(0).(func(string) error); ok {
   244  		r0 = rf(userId)
   245  	} else {
   246  		r0 = ret.Error(0)
   247  	}
   248  
   249  	return r0
   250  }
   251  
   252  // RemoveAccessData provides a mock function with given fields: token
   253  func (_m *OAuthStore) RemoveAccessData(token string) error {
   254  	ret := _m.Called(token)
   255  
   256  	var r0 error
   257  	if rf, ok := ret.Get(0).(func(string) error); ok {
   258  		r0 = rf(token)
   259  	} else {
   260  		r0 = ret.Error(0)
   261  	}
   262  
   263  	return r0
   264  }
   265  
   266  // RemoveAllAccessData provides a mock function with given fields:
   267  func (_m *OAuthStore) RemoveAllAccessData() error {
   268  	ret := _m.Called()
   269  
   270  	var r0 error
   271  	if rf, ok := ret.Get(0).(func() error); ok {
   272  		r0 = rf()
   273  	} else {
   274  		r0 = ret.Error(0)
   275  	}
   276  
   277  	return r0
   278  }
   279  
   280  // RemoveAuthData provides a mock function with given fields: code
   281  func (_m *OAuthStore) RemoveAuthData(code string) error {
   282  	ret := _m.Called(code)
   283  
   284  	var r0 error
   285  	if rf, ok := ret.Get(0).(func(string) error); ok {
   286  		r0 = rf(code)
   287  	} else {
   288  		r0 = ret.Error(0)
   289  	}
   290  
   291  	return r0
   292  }
   293  
   294  // SaveAccessData provides a mock function with given fields: accessData
   295  func (_m *OAuthStore) SaveAccessData(accessData *model.AccessData) (*model.AccessData, error) {
   296  	ret := _m.Called(accessData)
   297  
   298  	var r0 *model.AccessData
   299  	if rf, ok := ret.Get(0).(func(*model.AccessData) *model.AccessData); ok {
   300  		r0 = rf(accessData)
   301  	} else {
   302  		if ret.Get(0) != nil {
   303  			r0 = ret.Get(0).(*model.AccessData)
   304  		}
   305  	}
   306  
   307  	var r1 error
   308  	if rf, ok := ret.Get(1).(func(*model.AccessData) error); ok {
   309  		r1 = rf(accessData)
   310  	} else {
   311  		r1 = ret.Error(1)
   312  	}
   313  
   314  	return r0, r1
   315  }
   316  
   317  // SaveApp provides a mock function with given fields: app
   318  func (_m *OAuthStore) SaveApp(app *model.OAuthApp) (*model.OAuthApp, error) {
   319  	ret := _m.Called(app)
   320  
   321  	var r0 *model.OAuthApp
   322  	if rf, ok := ret.Get(0).(func(*model.OAuthApp) *model.OAuthApp); ok {
   323  		r0 = rf(app)
   324  	} else {
   325  		if ret.Get(0) != nil {
   326  			r0 = ret.Get(0).(*model.OAuthApp)
   327  		}
   328  	}
   329  
   330  	var r1 error
   331  	if rf, ok := ret.Get(1).(func(*model.OAuthApp) error); ok {
   332  		r1 = rf(app)
   333  	} else {
   334  		r1 = ret.Error(1)
   335  	}
   336  
   337  	return r0, r1
   338  }
   339  
   340  // SaveAuthData provides a mock function with given fields: authData
   341  func (_m *OAuthStore) SaveAuthData(authData *model.AuthData) (*model.AuthData, error) {
   342  	ret := _m.Called(authData)
   343  
   344  	var r0 *model.AuthData
   345  	if rf, ok := ret.Get(0).(func(*model.AuthData) *model.AuthData); ok {
   346  		r0 = rf(authData)
   347  	} else {
   348  		if ret.Get(0) != nil {
   349  			r0 = ret.Get(0).(*model.AuthData)
   350  		}
   351  	}
   352  
   353  	var r1 error
   354  	if rf, ok := ret.Get(1).(func(*model.AuthData) error); ok {
   355  		r1 = rf(authData)
   356  	} else {
   357  		r1 = ret.Error(1)
   358  	}
   359  
   360  	return r0, r1
   361  }
   362  
   363  // UpdateAccessData provides a mock function with given fields: accessData
   364  func (_m *OAuthStore) UpdateAccessData(accessData *model.AccessData) (*model.AccessData, error) {
   365  	ret := _m.Called(accessData)
   366  
   367  	var r0 *model.AccessData
   368  	if rf, ok := ret.Get(0).(func(*model.AccessData) *model.AccessData); ok {
   369  		r0 = rf(accessData)
   370  	} else {
   371  		if ret.Get(0) != nil {
   372  			r0 = ret.Get(0).(*model.AccessData)
   373  		}
   374  	}
   375  
   376  	var r1 error
   377  	if rf, ok := ret.Get(1).(func(*model.AccessData) error); ok {
   378  		r1 = rf(accessData)
   379  	} else {
   380  		r1 = ret.Error(1)
   381  	}
   382  
   383  	return r0, r1
   384  }
   385  
   386  // UpdateApp provides a mock function with given fields: app
   387  func (_m *OAuthStore) UpdateApp(app *model.OAuthApp) (*model.OAuthApp, error) {
   388  	ret := _m.Called(app)
   389  
   390  	var r0 *model.OAuthApp
   391  	if rf, ok := ret.Get(0).(func(*model.OAuthApp) *model.OAuthApp); ok {
   392  		r0 = rf(app)
   393  	} else {
   394  		if ret.Get(0) != nil {
   395  			r0 = ret.Get(0).(*model.OAuthApp)
   396  		}
   397  	}
   398  
   399  	var r1 error
   400  	if rf, ok := ret.Get(1).(func(*model.OAuthApp) error); ok {
   401  		r1 = rf(app)
   402  	} else {
   403  		r1 = ret.Error(1)
   404  	}
   405  
   406  	return r0, r1
   407  }