1// Code generated by counterfeiter. DO NOT EDIT. 2package credsfakes 3 4import ( 5 "sync" 6 7 "github.com/concourse/concourse/atc/creds" 8) 9 10type FakeSecretsFactory struct { 11 NewSecretsStub func() creds.Secrets 12 newSecretsMutex sync.RWMutex 13 newSecretsArgsForCall []struct { 14 } 15 newSecretsReturns struct { 16 result1 creds.Secrets 17 } 18 newSecretsReturnsOnCall map[int]struct { 19 result1 creds.Secrets 20 } 21 invocations map[string][][]interface{} 22 invocationsMutex sync.RWMutex 23} 24 25func (fake *FakeSecretsFactory) NewSecrets() creds.Secrets { 26 fake.newSecretsMutex.Lock() 27 ret, specificReturn := fake.newSecretsReturnsOnCall[len(fake.newSecretsArgsForCall)] 28 fake.newSecretsArgsForCall = append(fake.newSecretsArgsForCall, struct { 29 }{}) 30 fake.recordInvocation("NewSecrets", []interface{}{}) 31 fake.newSecretsMutex.Unlock() 32 if fake.NewSecretsStub != nil { 33 return fake.NewSecretsStub() 34 } 35 if specificReturn { 36 return ret.result1 37 } 38 fakeReturns := fake.newSecretsReturns 39 return fakeReturns.result1 40} 41 42func (fake *FakeSecretsFactory) NewSecretsCallCount() int { 43 fake.newSecretsMutex.RLock() 44 defer fake.newSecretsMutex.RUnlock() 45 return len(fake.newSecretsArgsForCall) 46} 47 48func (fake *FakeSecretsFactory) NewSecretsCalls(stub func() creds.Secrets) { 49 fake.newSecretsMutex.Lock() 50 defer fake.newSecretsMutex.Unlock() 51 fake.NewSecretsStub = stub 52} 53 54func (fake *FakeSecretsFactory) NewSecretsReturns(result1 creds.Secrets) { 55 fake.newSecretsMutex.Lock() 56 defer fake.newSecretsMutex.Unlock() 57 fake.NewSecretsStub = nil 58 fake.newSecretsReturns = struct { 59 result1 creds.Secrets 60 }{result1} 61} 62 63func (fake *FakeSecretsFactory) NewSecretsReturnsOnCall(i int, result1 creds.Secrets) { 64 fake.newSecretsMutex.Lock() 65 defer fake.newSecretsMutex.Unlock() 66 fake.NewSecretsStub = nil 67 if fake.newSecretsReturnsOnCall == nil { 68 fake.newSecretsReturnsOnCall = make(map[int]struct { 69 result1 creds.Secrets 70 }) 71 } 72 fake.newSecretsReturnsOnCall[i] = struct { 73 result1 creds.Secrets 74 }{result1} 75} 76 77func (fake *FakeSecretsFactory) Invocations() map[string][][]interface{} { 78 fake.invocationsMutex.RLock() 79 defer fake.invocationsMutex.RUnlock() 80 fake.newSecretsMutex.RLock() 81 defer fake.newSecretsMutex.RUnlock() 82 copiedInvocations := map[string][][]interface{}{} 83 for key, value := range fake.invocations { 84 copiedInvocations[key] = value 85 } 86 return copiedInvocations 87} 88 89func (fake *FakeSecretsFactory) recordInvocation(key string, args []interface{}) { 90 fake.invocationsMutex.Lock() 91 defer fake.invocationsMutex.Unlock() 92 if fake.invocations == nil { 93 fake.invocations = map[string][][]interface{}{} 94 } 95 if fake.invocations[key] == nil { 96 fake.invocations[key] = [][]interface{}{} 97 } 98 fake.invocations[key] = append(fake.invocations[key], args) 99} 100 101var _ creds.SecretsFactory = new(FakeSecretsFactory) 102