This repository has been archived by the owner on Mar 5, 2018. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 2
/
cloudformation_client.go
124 lines (103 loc) · 3.78 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
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
package mocks
import "github.com/aws/aws-sdk-go/service/cloudformation"
type DescribeStacksCall struct {
Input *cloudformation.DescribeStacksInput
Output *cloudformation.DescribeStacksOutput
Error error
}
type CloudFormationClientMultiCall struct {
DescribeStacksCallCount int
DescribeStacksCalls []DescribeStacksCall
}
func NewCloudFormationClientMultiCall(callCount int) *CloudFormationClientMultiCall {
return &CloudFormationClientMultiCall{
DescribeStacksCalls: make([]DescribeStacksCall, callCount),
}
}
func (c *CloudFormationClientMultiCall) DescribeStacks(input *cloudformation.DescribeStacksInput) (*cloudformation.DescribeStacksOutput, error) {
i := c.DescribeStacksCallCount
c.DescribeStacksCalls[i].Input = input
out := c.DescribeStacksCalls[i].Output
err := c.DescribeStacksCalls[i].Error
c.DescribeStacksCallCount++
return out, err
}
func (c *CloudFormationClientMultiCall) DescribeStackResources(input *cloudformation.DescribeStackResourcesInput) (*cloudformation.DescribeStackResourcesOutput, error) {
panic("not implemented")
}
func (c *CloudFormationClientMultiCall) CreateStack(input *cloudformation.CreateStackInput) (*cloudformation.CreateStackOutput, error) {
panic("not implemented")
}
func (c *CloudFormationClientMultiCall) UpdateStack(input *cloudformation.UpdateStackInput) (*cloudformation.UpdateStackOutput, error) {
panic("not implemented")
}
func (c *CloudFormationClientMultiCall) DeleteStack(input *cloudformation.DeleteStackInput) (*cloudformation.DeleteStackOutput, error) {
panic("not implemented")
}
type CloudFormationClient struct {
DescribeStackResourcesCall struct {
Receives struct {
Input *cloudformation.DescribeStackResourcesInput
}
Returns struct {
Output *cloudformation.DescribeStackResourcesOutput
Error error
}
}
DescribeStacksCall struct {
Receives struct {
Input *cloudformation.DescribeStacksInput
}
Returns struct {
Output *cloudformation.DescribeStacksOutput
Error error
}
}
CreateStackCall struct {
Receives struct {
Input *cloudformation.CreateStackInput
}
Returns struct {
Output *cloudformation.CreateStackOutput
Error error
}
}
UpdateStackCall struct {
Receives struct {
Input *cloudformation.UpdateStackInput
}
Returns struct {
Output *cloudformation.UpdateStackOutput
Error error
}
}
DeleteStackCall struct {
Receives struct {
Input *cloudformation.DeleteStackInput
}
Returns struct {
Output *cloudformation.DeleteStackOutput
Error error
}
}
}
func (c *CloudFormationClient) DescribeStackResources(input *cloudformation.DescribeStackResourcesInput) (*cloudformation.DescribeStackResourcesOutput, error) {
c.DescribeStackResourcesCall.Receives.Input = input
return c.DescribeStackResourcesCall.Returns.Output, c.DescribeStackResourcesCall.Returns.Error
}
func (c *CloudFormationClient) DescribeStacks(input *cloudformation.DescribeStacksInput) (*cloudformation.DescribeStacksOutput, error) {
c.DescribeStacksCall.Receives.Input = input
return c.DescribeStacksCall.Returns.Output, c.DescribeStacksCall.Returns.Error
}
func (c *CloudFormationClient) CreateStack(input *cloudformation.CreateStackInput) (*cloudformation.CreateStackOutput, error) {
c.CreateStackCall.Receives.Input = input
return c.CreateStackCall.Returns.Output, c.CreateStackCall.Returns.Error
}
func (c *CloudFormationClient) UpdateStack(input *cloudformation.UpdateStackInput) (*cloudformation.UpdateStackOutput, error) {
c.UpdateStackCall.Receives.Input = input
return c.UpdateStackCall.Returns.Output, c.UpdateStackCall.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
}