forked from cloudfoundry/bosh-bootloader
-
Notifications
You must be signed in to change notification settings - Fork 2
/
cloudformation_client.go
90 lines (75 loc) · 2.44 KB
/
cloudformation_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
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
package fakes
import "github.com/aws/aws-sdk-go/service/cloudformation"
type CloudFormationClient struct {
CreateStackCall struct {
Receives struct {
Input *cloudformation.CreateStackInput
}
Returns struct {
Error error
}
}
UpdateStackCall struct {
CallCount int
Receives struct {
Input *cloudformation.UpdateStackInput
}
Returns struct {
Error error
}
}
DescribeStacksCall struct {
CallCount int
Stub func(*cloudformation.DescribeStacksInput) (*cloudformation.DescribeStacksOutput, error)
Receives struct {
Input *cloudformation.DescribeStacksInput
}
Returns struct {
Output *cloudformation.DescribeStacksOutput
Error error
}
}
DeleteStackCall struct {
Receives struct {
Input *cloudformation.DeleteStackInput
}
Returns struct {
Output *cloudformation.DeleteStackOutput
Error error
}
}
DescribeStackResourceCall struct {
Receives struct {
Input *cloudformation.DescribeStackResourceInput
}
Returns struct {
Output *cloudformation.DescribeStackResourceOutput
Error error
}
}
}
func (c *CloudFormationClient) CreateStack(input *cloudformation.CreateStackInput) (*cloudformation.CreateStackOutput, error) {
c.CreateStackCall.Receives.Input = input
return nil, c.CreateStackCall.Returns.Error
}
func (c *CloudFormationClient) UpdateStack(input *cloudformation.UpdateStackInput) (*cloudformation.UpdateStackOutput, error) {
c.UpdateStackCall.CallCount++
c.UpdateStackCall.Receives.Input = input
return nil, c.UpdateStackCall.Returns.Error
}
func (c *CloudFormationClient) DescribeStacks(input *cloudformation.DescribeStacksInput) (*cloudformation.DescribeStacksOutput, error) {
c.DescribeStacksCall.CallCount++
c.DescribeStacksCall.Receives.Input = input
if c.DescribeStacksCall.Stub != nil {
return c.DescribeStacksCall.Stub(input)
}
return c.DescribeStacksCall.Returns.Output, c.DescribeStacksCall.Returns.Error
}
func (c *CloudFormationClient) DeleteStack(input *cloudformation.DeleteStackInput) (*cloudformation.DeleteStackOutput, error) {
c.DeleteStackCall.Receives.Input = input
return c.DeleteStackCall.Returns.Output, c.DeleteStackCall.Returns.Error
}
func (c *CloudFormationClient) DescribeStackResource(input *cloudformation.DescribeStackResourceInput) (*cloudformation.DescribeStackResourceOutput, error) {
c.DescribeStackResourceCall.Receives.Input = input
return c.DescribeStackResourceCall.Returns.Output, c.DescribeStackResourceCall.Returns.Error
}