-
Notifications
You must be signed in to change notification settings - Fork 23
/
target_http_proxies_client.go
50 lines (46 loc) · 1.34 KB
/
target_http_proxies_client.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
package fakes
import (
"sync"
gcpcompute "google.golang.org/api/compute/v1"
)
type TargetHttpProxiesClient struct {
DeleteTargetHttpProxyCall struct {
sync.Mutex
CallCount int
Receives struct {
TargetHttpProxy string
}
Returns struct {
Error error
}
Stub func(string) error
}
ListTargetHttpProxiesCall struct {
sync.Mutex
CallCount int
Returns struct {
TargetHttpProxyList *gcpcompute.TargetHttpProxyList
Error error
}
Stub func() (*gcpcompute.TargetHttpProxyList, error)
}
}
func (f *TargetHttpProxiesClient) DeleteTargetHttpProxy(param1 string) error {
f.DeleteTargetHttpProxyCall.Lock()
defer f.DeleteTargetHttpProxyCall.Unlock()
f.DeleteTargetHttpProxyCall.CallCount++
f.DeleteTargetHttpProxyCall.Receives.TargetHttpProxy = param1
if f.DeleteTargetHttpProxyCall.Stub != nil {
return f.DeleteTargetHttpProxyCall.Stub(param1)
}
return f.DeleteTargetHttpProxyCall.Returns.Error
}
func (f *TargetHttpProxiesClient) ListTargetHttpProxies() (*gcpcompute.TargetHttpProxyList, error) {
f.ListTargetHttpProxiesCall.Lock()
defer f.ListTargetHttpProxiesCall.Unlock()
f.ListTargetHttpProxiesCall.CallCount++
if f.ListTargetHttpProxiesCall.Stub != nil {
return f.ListTargetHttpProxiesCall.Stub()
}
return f.ListTargetHttpProxiesCall.Returns.TargetHttpProxyList, f.ListTargetHttpProxiesCall.Returns.Error
}