1// Code generated by counterfeiter. DO NOT EDIT. 2package dbfakes 3 4import ( 5 "sync" 6 7 "github.com/concourse/concourse/atc/db" 8) 9 10type FakeCreatingVolume struct { 11 CreatedStub func() (db.CreatedVolume, error) 12 createdMutex sync.RWMutex 13 createdArgsForCall []struct { 14 } 15 createdReturns struct { 16 result1 db.CreatedVolume 17 result2 error 18 } 19 createdReturnsOnCall map[int]struct { 20 result1 db.CreatedVolume 21 result2 error 22 } 23 FailedStub func() (db.FailedVolume, error) 24 failedMutex sync.RWMutex 25 failedArgsForCall []struct { 26 } 27 failedReturns struct { 28 result1 db.FailedVolume 29 result2 error 30 } 31 failedReturnsOnCall map[int]struct { 32 result1 db.FailedVolume 33 result2 error 34 } 35 HandleStub func() string 36 handleMutex sync.RWMutex 37 handleArgsForCall []struct { 38 } 39 handleReturns struct { 40 result1 string 41 } 42 handleReturnsOnCall map[int]struct { 43 result1 string 44 } 45 IDStub func() int 46 iDMutex sync.RWMutex 47 iDArgsForCall []struct { 48 } 49 iDReturns struct { 50 result1 int 51 } 52 iDReturnsOnCall map[int]struct { 53 result1 int 54 } 55 invocations map[string][][]interface{} 56 invocationsMutex sync.RWMutex 57} 58 59func (fake *FakeCreatingVolume) Created() (db.CreatedVolume, error) { 60 fake.createdMutex.Lock() 61 ret, specificReturn := fake.createdReturnsOnCall[len(fake.createdArgsForCall)] 62 fake.createdArgsForCall = append(fake.createdArgsForCall, struct { 63 }{}) 64 fake.recordInvocation("Created", []interface{}{}) 65 fake.createdMutex.Unlock() 66 if fake.CreatedStub != nil { 67 return fake.CreatedStub() 68 } 69 if specificReturn { 70 return ret.result1, ret.result2 71 } 72 fakeReturns := fake.createdReturns 73 return fakeReturns.result1, fakeReturns.result2 74} 75 76func (fake *FakeCreatingVolume) CreatedCallCount() int { 77 fake.createdMutex.RLock() 78 defer fake.createdMutex.RUnlock() 79 return len(fake.createdArgsForCall) 80} 81 82func (fake *FakeCreatingVolume) CreatedCalls(stub func() (db.CreatedVolume, error)) { 83 fake.createdMutex.Lock() 84 defer fake.createdMutex.Unlock() 85 fake.CreatedStub = stub 86} 87 88func (fake *FakeCreatingVolume) CreatedReturns(result1 db.CreatedVolume, result2 error) { 89 fake.createdMutex.Lock() 90 defer fake.createdMutex.Unlock() 91 fake.CreatedStub = nil 92 fake.createdReturns = struct { 93 result1 db.CreatedVolume 94 result2 error 95 }{result1, result2} 96} 97 98func (fake *FakeCreatingVolume) CreatedReturnsOnCall(i int, result1 db.CreatedVolume, result2 error) { 99 fake.createdMutex.Lock() 100 defer fake.createdMutex.Unlock() 101 fake.CreatedStub = nil 102 if fake.createdReturnsOnCall == nil { 103 fake.createdReturnsOnCall = make(map[int]struct { 104 result1 db.CreatedVolume 105 result2 error 106 }) 107 } 108 fake.createdReturnsOnCall[i] = struct { 109 result1 db.CreatedVolume 110 result2 error 111 }{result1, result2} 112} 113 114func (fake *FakeCreatingVolume) Failed() (db.FailedVolume, error) { 115 fake.failedMutex.Lock() 116 ret, specificReturn := fake.failedReturnsOnCall[len(fake.failedArgsForCall)] 117 fake.failedArgsForCall = append(fake.failedArgsForCall, struct { 118 }{}) 119 fake.recordInvocation("Failed", []interface{}{}) 120 fake.failedMutex.Unlock() 121 if fake.FailedStub != nil { 122 return fake.FailedStub() 123 } 124 if specificReturn { 125 return ret.result1, ret.result2 126 } 127 fakeReturns := fake.failedReturns 128 return fakeReturns.result1, fakeReturns.result2 129} 130 131func (fake *FakeCreatingVolume) FailedCallCount() int { 132 fake.failedMutex.RLock() 133 defer fake.failedMutex.RUnlock() 134 return len(fake.failedArgsForCall) 135} 136 137func (fake *FakeCreatingVolume) FailedCalls(stub func() (db.FailedVolume, error)) { 138 fake.failedMutex.Lock() 139 defer fake.failedMutex.Unlock() 140 fake.FailedStub = stub 141} 142 143func (fake *FakeCreatingVolume) FailedReturns(result1 db.FailedVolume, result2 error) { 144 fake.failedMutex.Lock() 145 defer fake.failedMutex.Unlock() 146 fake.FailedStub = nil 147 fake.failedReturns = struct { 148 result1 db.FailedVolume 149 result2 error 150 }{result1, result2} 151} 152 153func (fake *FakeCreatingVolume) FailedReturnsOnCall(i int, result1 db.FailedVolume, result2 error) { 154 fake.failedMutex.Lock() 155 defer fake.failedMutex.Unlock() 156 fake.FailedStub = nil 157 if fake.failedReturnsOnCall == nil { 158 fake.failedReturnsOnCall = make(map[int]struct { 159 result1 db.FailedVolume 160 result2 error 161 }) 162 } 163 fake.failedReturnsOnCall[i] = struct { 164 result1 db.FailedVolume 165 result2 error 166 }{result1, result2} 167} 168 169func (fake *FakeCreatingVolume) Handle() string { 170 fake.handleMutex.Lock() 171 ret, specificReturn := fake.handleReturnsOnCall[len(fake.handleArgsForCall)] 172 fake.handleArgsForCall = append(fake.handleArgsForCall, struct { 173 }{}) 174 fake.recordInvocation("Handle", []interface{}{}) 175 fake.handleMutex.Unlock() 176 if fake.HandleStub != nil { 177 return fake.HandleStub() 178 } 179 if specificReturn { 180 return ret.result1 181 } 182 fakeReturns := fake.handleReturns 183 return fakeReturns.result1 184} 185 186func (fake *FakeCreatingVolume) HandleCallCount() int { 187 fake.handleMutex.RLock() 188 defer fake.handleMutex.RUnlock() 189 return len(fake.handleArgsForCall) 190} 191 192func (fake *FakeCreatingVolume) HandleCalls(stub func() string) { 193 fake.handleMutex.Lock() 194 defer fake.handleMutex.Unlock() 195 fake.HandleStub = stub 196} 197 198func (fake *FakeCreatingVolume) HandleReturns(result1 string) { 199 fake.handleMutex.Lock() 200 defer fake.handleMutex.Unlock() 201 fake.HandleStub = nil 202 fake.handleReturns = struct { 203 result1 string 204 }{result1} 205} 206 207func (fake *FakeCreatingVolume) HandleReturnsOnCall(i int, result1 string) { 208 fake.handleMutex.Lock() 209 defer fake.handleMutex.Unlock() 210 fake.HandleStub = nil 211 if fake.handleReturnsOnCall == nil { 212 fake.handleReturnsOnCall = make(map[int]struct { 213 result1 string 214 }) 215 } 216 fake.handleReturnsOnCall[i] = struct { 217 result1 string 218 }{result1} 219} 220 221func (fake *FakeCreatingVolume) ID() int { 222 fake.iDMutex.Lock() 223 ret, specificReturn := fake.iDReturnsOnCall[len(fake.iDArgsForCall)] 224 fake.iDArgsForCall = append(fake.iDArgsForCall, struct { 225 }{}) 226 fake.recordInvocation("ID", []interface{}{}) 227 fake.iDMutex.Unlock() 228 if fake.IDStub != nil { 229 return fake.IDStub() 230 } 231 if specificReturn { 232 return ret.result1 233 } 234 fakeReturns := fake.iDReturns 235 return fakeReturns.result1 236} 237 238func (fake *FakeCreatingVolume) IDCallCount() int { 239 fake.iDMutex.RLock() 240 defer fake.iDMutex.RUnlock() 241 return len(fake.iDArgsForCall) 242} 243 244func (fake *FakeCreatingVolume) IDCalls(stub func() int) { 245 fake.iDMutex.Lock() 246 defer fake.iDMutex.Unlock() 247 fake.IDStub = stub 248} 249 250func (fake *FakeCreatingVolume) IDReturns(result1 int) { 251 fake.iDMutex.Lock() 252 defer fake.iDMutex.Unlock() 253 fake.IDStub = nil 254 fake.iDReturns = struct { 255 result1 int 256 }{result1} 257} 258 259func (fake *FakeCreatingVolume) IDReturnsOnCall(i int, result1 int) { 260 fake.iDMutex.Lock() 261 defer fake.iDMutex.Unlock() 262 fake.IDStub = nil 263 if fake.iDReturnsOnCall == nil { 264 fake.iDReturnsOnCall = make(map[int]struct { 265 result1 int 266 }) 267 } 268 fake.iDReturnsOnCall[i] = struct { 269 result1 int 270 }{result1} 271} 272 273func (fake *FakeCreatingVolume) Invocations() map[string][][]interface{} { 274 fake.invocationsMutex.RLock() 275 defer fake.invocationsMutex.RUnlock() 276 fake.createdMutex.RLock() 277 defer fake.createdMutex.RUnlock() 278 fake.failedMutex.RLock() 279 defer fake.failedMutex.RUnlock() 280 fake.handleMutex.RLock() 281 defer fake.handleMutex.RUnlock() 282 fake.iDMutex.RLock() 283 defer fake.iDMutex.RUnlock() 284 copiedInvocations := map[string][][]interface{}{} 285 for key, value := range fake.invocations { 286 copiedInvocations[key] = value 287 } 288 return copiedInvocations 289} 290 291func (fake *FakeCreatingVolume) recordInvocation(key string, args []interface{}) { 292 fake.invocationsMutex.Lock() 293 defer fake.invocationsMutex.Unlock() 294 if fake.invocations == nil { 295 fake.invocations = map[string][][]interface{}{} 296 } 297 if fake.invocations[key] == nil { 298 fake.invocations[key] = [][]interface{}{} 299 } 300 fake.invocations[key] = append(fake.invocations[key], args) 301} 302 303var _ db.CreatingVolume = new(FakeCreatingVolume) 304