github.com/haalcala/mattermost-server-change-repo/v5@v5.33.2/store/storetest/mocks/TokenStore.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  // TokenStore is an autogenerated mock type for the TokenStore type
    13  type TokenStore struct {
    14  	mock.Mock
    15  }
    16  
    17  // Cleanup provides a mock function with given fields:
    18  func (_m *TokenStore) Cleanup() {
    19  	_m.Called()
    20  }
    21  
    22  // Delete provides a mock function with given fields: token
    23  func (_m *TokenStore) Delete(token string) error {
    24  	ret := _m.Called(token)
    25  
    26  	var r0 error
    27  	if rf, ok := ret.Get(0).(func(string) error); ok {
    28  		r0 = rf(token)
    29  	} else {
    30  		r0 = ret.Error(0)
    31  	}
    32  
    33  	return r0
    34  }
    35  
    36  // GetByToken provides a mock function with given fields: token
    37  func (_m *TokenStore) GetByToken(token string) (*model.Token, error) {
    38  	ret := _m.Called(token)
    39  
    40  	var r0 *model.Token
    41  	if rf, ok := ret.Get(0).(func(string) *model.Token); ok {
    42  		r0 = rf(token)
    43  	} else {
    44  		if ret.Get(0) != nil {
    45  			r0 = ret.Get(0).(*model.Token)
    46  		}
    47  	}
    48  
    49  	var r1 error
    50  	if rf, ok := ret.Get(1).(func(string) error); ok {
    51  		r1 = rf(token)
    52  	} else {
    53  		r1 = ret.Error(1)
    54  	}
    55  
    56  	return r0, r1
    57  }
    58  
    59  // RemoveAllTokensByType provides a mock function with given fields: tokenType
    60  func (_m *TokenStore) RemoveAllTokensByType(tokenType string) error {
    61  	ret := _m.Called(tokenType)
    62  
    63  	var r0 error
    64  	if rf, ok := ret.Get(0).(func(string) error); ok {
    65  		r0 = rf(tokenType)
    66  	} else {
    67  		r0 = ret.Error(0)
    68  	}
    69  
    70  	return r0
    71  }
    72  
    73  // Save provides a mock function with given fields: recovery
    74  func (_m *TokenStore) Save(recovery *model.Token) error {
    75  	ret := _m.Called(recovery)
    76  
    77  	var r0 error
    78  	if rf, ok := ret.Get(0).(func(*model.Token) error); ok {
    79  		r0 = rf(recovery)
    80  	} else {
    81  		r0 = ret.Error(0)
    82  	}
    83  
    84  	return r0
    85  }