github.com/nhannv/mattermost-server@v5.11.1+incompatible/store/storetest/mocks/SessionStore.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/mattermost/mattermost-server/model"
     9  import store "github.com/mattermost/mattermost-server/store"
    10  
    11  // SessionStore is an autogenerated mock type for the SessionStore type
    12  type SessionStore struct {
    13  	mock.Mock
    14  }
    15  
    16  // AnalyticsSessionCount provides a mock function with given fields:
    17  func (_m *SessionStore) AnalyticsSessionCount() store.StoreChannel {
    18  	ret := _m.Called()
    19  
    20  	var r0 store.StoreChannel
    21  	if rf, ok := ret.Get(0).(func() store.StoreChannel); ok {
    22  		r0 = rf()
    23  	} else {
    24  		if ret.Get(0) != nil {
    25  			r0 = ret.Get(0).(store.StoreChannel)
    26  		}
    27  	}
    28  
    29  	return r0
    30  }
    31  
    32  // Cleanup provides a mock function with given fields: expiryTime, batchSize
    33  func (_m *SessionStore) Cleanup(expiryTime int64, batchSize int64) {
    34  	_m.Called(expiryTime, batchSize)
    35  }
    36  
    37  // Get provides a mock function with given fields: sessionIdOrToken
    38  func (_m *SessionStore) Get(sessionIdOrToken string) store.StoreChannel {
    39  	ret := _m.Called(sessionIdOrToken)
    40  
    41  	var r0 store.StoreChannel
    42  	if rf, ok := ret.Get(0).(func(string) store.StoreChannel); ok {
    43  		r0 = rf(sessionIdOrToken)
    44  	} else {
    45  		if ret.Get(0) != nil {
    46  			r0 = ret.Get(0).(store.StoreChannel)
    47  		}
    48  	}
    49  
    50  	return r0
    51  }
    52  
    53  // GetSessions provides a mock function with given fields: userId
    54  func (_m *SessionStore) GetSessions(userId string) store.StoreChannel {
    55  	ret := _m.Called(userId)
    56  
    57  	var r0 store.StoreChannel
    58  	if rf, ok := ret.Get(0).(func(string) store.StoreChannel); ok {
    59  		r0 = rf(userId)
    60  	} else {
    61  		if ret.Get(0) != nil {
    62  			r0 = ret.Get(0).(store.StoreChannel)
    63  		}
    64  	}
    65  
    66  	return r0
    67  }
    68  
    69  // GetSessionsWithActiveDeviceIds provides a mock function with given fields: userId
    70  func (_m *SessionStore) GetSessionsWithActiveDeviceIds(userId string) store.StoreChannel {
    71  	ret := _m.Called(userId)
    72  
    73  	var r0 store.StoreChannel
    74  	if rf, ok := ret.Get(0).(func(string) store.StoreChannel); ok {
    75  		r0 = rf(userId)
    76  	} else {
    77  		if ret.Get(0) != nil {
    78  			r0 = ret.Get(0).(store.StoreChannel)
    79  		}
    80  	}
    81  
    82  	return r0
    83  }
    84  
    85  // PermanentDeleteSessionsByUser provides a mock function with given fields: teamId
    86  func (_m *SessionStore) PermanentDeleteSessionsByUser(teamId string) store.StoreChannel {
    87  	ret := _m.Called(teamId)
    88  
    89  	var r0 store.StoreChannel
    90  	if rf, ok := ret.Get(0).(func(string) store.StoreChannel); ok {
    91  		r0 = rf(teamId)
    92  	} else {
    93  		if ret.Get(0) != nil {
    94  			r0 = ret.Get(0).(store.StoreChannel)
    95  		}
    96  	}
    97  
    98  	return r0
    99  }
   100  
   101  // Remove provides a mock function with given fields: sessionIdOrToken
   102  func (_m *SessionStore) Remove(sessionIdOrToken string) store.StoreChannel {
   103  	ret := _m.Called(sessionIdOrToken)
   104  
   105  	var r0 store.StoreChannel
   106  	if rf, ok := ret.Get(0).(func(string) store.StoreChannel); ok {
   107  		r0 = rf(sessionIdOrToken)
   108  	} else {
   109  		if ret.Get(0) != nil {
   110  			r0 = ret.Get(0).(store.StoreChannel)
   111  		}
   112  	}
   113  
   114  	return r0
   115  }
   116  
   117  // RemoveAllSessions provides a mock function with given fields:
   118  func (_m *SessionStore) RemoveAllSessions() store.StoreChannel {
   119  	ret := _m.Called()
   120  
   121  	var r0 store.StoreChannel
   122  	if rf, ok := ret.Get(0).(func() store.StoreChannel); ok {
   123  		r0 = rf()
   124  	} else {
   125  		if ret.Get(0) != nil {
   126  			r0 = ret.Get(0).(store.StoreChannel)
   127  		}
   128  	}
   129  
   130  	return r0
   131  }
   132  
   133  // Save provides a mock function with given fields: session
   134  func (_m *SessionStore) Save(session *model.Session) store.StoreChannel {
   135  	ret := _m.Called(session)
   136  
   137  	var r0 store.StoreChannel
   138  	if rf, ok := ret.Get(0).(func(*model.Session) store.StoreChannel); ok {
   139  		r0 = rf(session)
   140  	} else {
   141  		if ret.Get(0) != nil {
   142  			r0 = ret.Get(0).(store.StoreChannel)
   143  		}
   144  	}
   145  
   146  	return r0
   147  }
   148  
   149  // UpdateDeviceId provides a mock function with given fields: id, deviceId, expiresAt
   150  func (_m *SessionStore) UpdateDeviceId(id string, deviceId string, expiresAt int64) store.StoreChannel {
   151  	ret := _m.Called(id, deviceId, expiresAt)
   152  
   153  	var r0 store.StoreChannel
   154  	if rf, ok := ret.Get(0).(func(string, string, int64) store.StoreChannel); ok {
   155  		r0 = rf(id, deviceId, expiresAt)
   156  	} else {
   157  		if ret.Get(0) != nil {
   158  			r0 = ret.Get(0).(store.StoreChannel)
   159  		}
   160  	}
   161  
   162  	return r0
   163  }
   164  
   165  // UpdateLastActivityAt provides a mock function with given fields: sessionId, time
   166  func (_m *SessionStore) UpdateLastActivityAt(sessionId string, time int64) store.StoreChannel {
   167  	ret := _m.Called(sessionId, time)
   168  
   169  	var r0 store.StoreChannel
   170  	if rf, ok := ret.Get(0).(func(string, int64) store.StoreChannel); ok {
   171  		r0 = rf(sessionId, time)
   172  	} else {
   173  		if ret.Get(0) != nil {
   174  			r0 = ret.Get(0).(store.StoreChannel)
   175  		}
   176  	}
   177  
   178  	return r0
   179  }
   180  
   181  // UpdateRoles provides a mock function with given fields: userId, roles
   182  func (_m *SessionStore) UpdateRoles(userId string, roles string) store.StoreChannel {
   183  	ret := _m.Called(userId, roles)
   184  
   185  	var r0 store.StoreChannel
   186  	if rf, ok := ret.Get(0).(func(string, string) store.StoreChannel); ok {
   187  		r0 = rf(userId, roles)
   188  	} else {
   189  		if ret.Get(0) != nil {
   190  			r0 = ret.Get(0).(store.StoreChannel)
   191  		}
   192  	}
   193  
   194  	return r0
   195  }