github.com/haalcala/mattermost-server-change-repo/v5@v5.33.2/store/storetest/mocks/ClusterDiscoveryStore.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 // ClusterDiscoveryStore is an autogenerated mock type for the ClusterDiscoveryStore type 13 type ClusterDiscoveryStore struct { 14 mock.Mock 15 } 16 17 // Cleanup provides a mock function with given fields: 18 func (_m *ClusterDiscoveryStore) Cleanup() error { 19 ret := _m.Called() 20 21 var r0 error 22 if rf, ok := ret.Get(0).(func() error); ok { 23 r0 = rf() 24 } else { 25 r0 = ret.Error(0) 26 } 27 28 return r0 29 } 30 31 // Delete provides a mock function with given fields: discovery 32 func (_m *ClusterDiscoveryStore) Delete(discovery *model.ClusterDiscovery) (bool, error) { 33 ret := _m.Called(discovery) 34 35 var r0 bool 36 if rf, ok := ret.Get(0).(func(*model.ClusterDiscovery) bool); ok { 37 r0 = rf(discovery) 38 } else { 39 r0 = ret.Get(0).(bool) 40 } 41 42 var r1 error 43 if rf, ok := ret.Get(1).(func(*model.ClusterDiscovery) error); ok { 44 r1 = rf(discovery) 45 } else { 46 r1 = ret.Error(1) 47 } 48 49 return r0, r1 50 } 51 52 // Exists provides a mock function with given fields: discovery 53 func (_m *ClusterDiscoveryStore) Exists(discovery *model.ClusterDiscovery) (bool, error) { 54 ret := _m.Called(discovery) 55 56 var r0 bool 57 if rf, ok := ret.Get(0).(func(*model.ClusterDiscovery) bool); ok { 58 r0 = rf(discovery) 59 } else { 60 r0 = ret.Get(0).(bool) 61 } 62 63 var r1 error 64 if rf, ok := ret.Get(1).(func(*model.ClusterDiscovery) error); ok { 65 r1 = rf(discovery) 66 } else { 67 r1 = ret.Error(1) 68 } 69 70 return r0, r1 71 } 72 73 // GetAll provides a mock function with given fields: discoveryType, clusterName 74 func (_m *ClusterDiscoveryStore) GetAll(discoveryType string, clusterName string) ([]*model.ClusterDiscovery, error) { 75 ret := _m.Called(discoveryType, clusterName) 76 77 var r0 []*model.ClusterDiscovery 78 if rf, ok := ret.Get(0).(func(string, string) []*model.ClusterDiscovery); ok { 79 r0 = rf(discoveryType, clusterName) 80 } else { 81 if ret.Get(0) != nil { 82 r0 = ret.Get(0).([]*model.ClusterDiscovery) 83 } 84 } 85 86 var r1 error 87 if rf, ok := ret.Get(1).(func(string, string) error); ok { 88 r1 = rf(discoveryType, clusterName) 89 } else { 90 r1 = ret.Error(1) 91 } 92 93 return r0, r1 94 } 95 96 // Save provides a mock function with given fields: discovery 97 func (_m *ClusterDiscoveryStore) Save(discovery *model.ClusterDiscovery) error { 98 ret := _m.Called(discovery) 99 100 var r0 error 101 if rf, ok := ret.Get(0).(func(*model.ClusterDiscovery) error); ok { 102 r0 = rf(discovery) 103 } else { 104 r0 = ret.Error(0) 105 } 106 107 return r0 108 } 109 110 // SetLastPingAt provides a mock function with given fields: discovery 111 func (_m *ClusterDiscoveryStore) SetLastPingAt(discovery *model.ClusterDiscovery) error { 112 ret := _m.Called(discovery) 113 114 var r0 error 115 if rf, ok := ret.Get(0).(func(*model.ClusterDiscovery) error); ok { 116 r0 = rf(discovery) 117 } else { 118 r0 = ret.Error(0) 119 } 120 121 return r0 122 }