github.com/nimakaviani/cli@v6.37.1-0.20180619223813-e734901a73fa+incompatible/command/v3/v3fakes/fake_v3sshactor.go (about) 1 // Code generated by counterfeiter. DO NOT EDIT. 2 package v3fakes 3 4 import ( 5 "sync" 6 7 "code.cloudfoundry.org/cli/actor/v3action" 8 "code.cloudfoundry.org/cli/command/v3" 9 ) 10 11 type FakeV3SSHActor struct { 12 CloudControllerAPIVersionStub func() string 13 cloudControllerAPIVersionMutex sync.RWMutex 14 cloudControllerAPIVersionArgsForCall []struct{} 15 cloudControllerAPIVersionReturns struct { 16 result1 string 17 } 18 cloudControllerAPIVersionReturnsOnCall map[int]struct { 19 result1 string 20 } 21 GetSecureShellConfigurationByApplicationNameSpaceProcessTypeAndIndexStub func(appName string, spaceGUID string, processType string, processIndex uint) (v3action.SSHAuthentication, v3action.Warnings, error) 22 getSecureShellConfigurationByApplicationNameSpaceProcessTypeAndIndexMutex sync.RWMutex 23 getSecureShellConfigurationByApplicationNameSpaceProcessTypeAndIndexArgsForCall []struct { 24 appName string 25 spaceGUID string 26 processType string 27 processIndex uint 28 } 29 getSecureShellConfigurationByApplicationNameSpaceProcessTypeAndIndexReturns struct { 30 result1 v3action.SSHAuthentication 31 result2 v3action.Warnings 32 result3 error 33 } 34 getSecureShellConfigurationByApplicationNameSpaceProcessTypeAndIndexReturnsOnCall map[int]struct { 35 result1 v3action.SSHAuthentication 36 result2 v3action.Warnings 37 result3 error 38 } 39 invocations map[string][][]interface{} 40 invocationsMutex sync.RWMutex 41 } 42 43 func (fake *FakeV3SSHActor) CloudControllerAPIVersion() string { 44 fake.cloudControllerAPIVersionMutex.Lock() 45 ret, specificReturn := fake.cloudControllerAPIVersionReturnsOnCall[len(fake.cloudControllerAPIVersionArgsForCall)] 46 fake.cloudControllerAPIVersionArgsForCall = append(fake.cloudControllerAPIVersionArgsForCall, struct{}{}) 47 fake.recordInvocation("CloudControllerAPIVersion", []interface{}{}) 48 fake.cloudControllerAPIVersionMutex.Unlock() 49 if fake.CloudControllerAPIVersionStub != nil { 50 return fake.CloudControllerAPIVersionStub() 51 } 52 if specificReturn { 53 return ret.result1 54 } 55 return fake.cloudControllerAPIVersionReturns.result1 56 } 57 58 func (fake *FakeV3SSHActor) CloudControllerAPIVersionCallCount() int { 59 fake.cloudControllerAPIVersionMutex.RLock() 60 defer fake.cloudControllerAPIVersionMutex.RUnlock() 61 return len(fake.cloudControllerAPIVersionArgsForCall) 62 } 63 64 func (fake *FakeV3SSHActor) CloudControllerAPIVersionReturns(result1 string) { 65 fake.CloudControllerAPIVersionStub = nil 66 fake.cloudControllerAPIVersionReturns = struct { 67 result1 string 68 }{result1} 69 } 70 71 func (fake *FakeV3SSHActor) CloudControllerAPIVersionReturnsOnCall(i int, result1 string) { 72 fake.CloudControllerAPIVersionStub = nil 73 if fake.cloudControllerAPIVersionReturnsOnCall == nil { 74 fake.cloudControllerAPIVersionReturnsOnCall = make(map[int]struct { 75 result1 string 76 }) 77 } 78 fake.cloudControllerAPIVersionReturnsOnCall[i] = struct { 79 result1 string 80 }{result1} 81 } 82 83 func (fake *FakeV3SSHActor) GetSecureShellConfigurationByApplicationNameSpaceProcessTypeAndIndex(appName string, spaceGUID string, processType string, processIndex uint) (v3action.SSHAuthentication, v3action.Warnings, error) { 84 fake.getSecureShellConfigurationByApplicationNameSpaceProcessTypeAndIndexMutex.Lock() 85 ret, specificReturn := fake.getSecureShellConfigurationByApplicationNameSpaceProcessTypeAndIndexReturnsOnCall[len(fake.getSecureShellConfigurationByApplicationNameSpaceProcessTypeAndIndexArgsForCall)] 86 fake.getSecureShellConfigurationByApplicationNameSpaceProcessTypeAndIndexArgsForCall = append(fake.getSecureShellConfigurationByApplicationNameSpaceProcessTypeAndIndexArgsForCall, struct { 87 appName string 88 spaceGUID string 89 processType string 90 processIndex uint 91 }{appName, spaceGUID, processType, processIndex}) 92 fake.recordInvocation("GetSecureShellConfigurationByApplicationNameSpaceProcessTypeAndIndex", []interface{}{appName, spaceGUID, processType, processIndex}) 93 fake.getSecureShellConfigurationByApplicationNameSpaceProcessTypeAndIndexMutex.Unlock() 94 if fake.GetSecureShellConfigurationByApplicationNameSpaceProcessTypeAndIndexStub != nil { 95 return fake.GetSecureShellConfigurationByApplicationNameSpaceProcessTypeAndIndexStub(appName, spaceGUID, processType, processIndex) 96 } 97 if specificReturn { 98 return ret.result1, ret.result2, ret.result3 99 } 100 return fake.getSecureShellConfigurationByApplicationNameSpaceProcessTypeAndIndexReturns.result1, fake.getSecureShellConfigurationByApplicationNameSpaceProcessTypeAndIndexReturns.result2, fake.getSecureShellConfigurationByApplicationNameSpaceProcessTypeAndIndexReturns.result3 101 } 102 103 func (fake *FakeV3SSHActor) GetSecureShellConfigurationByApplicationNameSpaceProcessTypeAndIndexCallCount() int { 104 fake.getSecureShellConfigurationByApplicationNameSpaceProcessTypeAndIndexMutex.RLock() 105 defer fake.getSecureShellConfigurationByApplicationNameSpaceProcessTypeAndIndexMutex.RUnlock() 106 return len(fake.getSecureShellConfigurationByApplicationNameSpaceProcessTypeAndIndexArgsForCall) 107 } 108 109 func (fake *FakeV3SSHActor) GetSecureShellConfigurationByApplicationNameSpaceProcessTypeAndIndexArgsForCall(i int) (string, string, string, uint) { 110 fake.getSecureShellConfigurationByApplicationNameSpaceProcessTypeAndIndexMutex.RLock() 111 defer fake.getSecureShellConfigurationByApplicationNameSpaceProcessTypeAndIndexMutex.RUnlock() 112 return fake.getSecureShellConfigurationByApplicationNameSpaceProcessTypeAndIndexArgsForCall[i].appName, fake.getSecureShellConfigurationByApplicationNameSpaceProcessTypeAndIndexArgsForCall[i].spaceGUID, fake.getSecureShellConfigurationByApplicationNameSpaceProcessTypeAndIndexArgsForCall[i].processType, fake.getSecureShellConfigurationByApplicationNameSpaceProcessTypeAndIndexArgsForCall[i].processIndex 113 } 114 115 func (fake *FakeV3SSHActor) GetSecureShellConfigurationByApplicationNameSpaceProcessTypeAndIndexReturns(result1 v3action.SSHAuthentication, result2 v3action.Warnings, result3 error) { 116 fake.GetSecureShellConfigurationByApplicationNameSpaceProcessTypeAndIndexStub = nil 117 fake.getSecureShellConfigurationByApplicationNameSpaceProcessTypeAndIndexReturns = struct { 118 result1 v3action.SSHAuthentication 119 result2 v3action.Warnings 120 result3 error 121 }{result1, result2, result3} 122 } 123 124 func (fake *FakeV3SSHActor) GetSecureShellConfigurationByApplicationNameSpaceProcessTypeAndIndexReturnsOnCall(i int, result1 v3action.SSHAuthentication, result2 v3action.Warnings, result3 error) { 125 fake.GetSecureShellConfigurationByApplicationNameSpaceProcessTypeAndIndexStub = nil 126 if fake.getSecureShellConfigurationByApplicationNameSpaceProcessTypeAndIndexReturnsOnCall == nil { 127 fake.getSecureShellConfigurationByApplicationNameSpaceProcessTypeAndIndexReturnsOnCall = make(map[int]struct { 128 result1 v3action.SSHAuthentication 129 result2 v3action.Warnings 130 result3 error 131 }) 132 } 133 fake.getSecureShellConfigurationByApplicationNameSpaceProcessTypeAndIndexReturnsOnCall[i] = struct { 134 result1 v3action.SSHAuthentication 135 result2 v3action.Warnings 136 result3 error 137 }{result1, result2, result3} 138 } 139 140 func (fake *FakeV3SSHActor) Invocations() map[string][][]interface{} { 141 fake.invocationsMutex.RLock() 142 defer fake.invocationsMutex.RUnlock() 143 fake.cloudControllerAPIVersionMutex.RLock() 144 defer fake.cloudControllerAPIVersionMutex.RUnlock() 145 fake.getSecureShellConfigurationByApplicationNameSpaceProcessTypeAndIndexMutex.RLock() 146 defer fake.getSecureShellConfigurationByApplicationNameSpaceProcessTypeAndIndexMutex.RUnlock() 147 copiedInvocations := map[string][][]interface{}{} 148 for key, value := range fake.invocations { 149 copiedInvocations[key] = value 150 } 151 return copiedInvocations 152 } 153 154 func (fake *FakeV3SSHActor) recordInvocation(key string, args []interface{}) { 155 fake.invocationsMutex.Lock() 156 defer fake.invocationsMutex.Unlock() 157 if fake.invocations == nil { 158 fake.invocations = map[string][][]interface{}{} 159 } 160 if fake.invocations[key] == nil { 161 fake.invocations[key] = [][]interface{}{} 162 } 163 fake.invocations[key] = append(fake.invocations[key], args) 164 } 165 166 var _ v3.V3SSHActor = new(FakeV3SSHActor)