-
Notifications
You must be signed in to change notification settings - Fork 2.1k
/
interface.go
175 lines (143 loc) · 14.4 KB
/
interface.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
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
// Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT.
// Package migrationhubrefactorspacesiface provides an interface to enable mocking the AWS Migration Hub Refactor Spaces service client
// for testing your code.
//
// It is important to note that this interface will have breaking changes
// when the service model is updated and adds new API operations, paginators,
// and waiters.
package migrationhubrefactorspacesiface
import (
"github.com/aws/aws-sdk-go/aws"
"github.com/aws/aws-sdk-go/aws/request"
"github.com/aws/aws-sdk-go/service/migrationhubrefactorspaces"
)
// MigrationHubRefactorSpacesAPI provides an interface to enable mocking the
// migrationhubrefactorspaces.MigrationHubRefactorSpaces service client's API operation,
// paginators, and waiters. This make unit testing your code that calls out
// to the SDK's service client's calls easier.
//
// The best way to use this interface is so the SDK's service client's calls
// can be stubbed out for unit testing your code with the SDK without needing
// to inject custom request handlers into the SDK's request pipeline.
//
// // myFunc uses an SDK service client to make a request to
// // AWS Migration Hub Refactor Spaces.
// func myFunc(svc migrationhubrefactorspacesiface.MigrationHubRefactorSpacesAPI) bool {
// // Make svc.CreateApplication request
// }
//
// func main() {
// sess := session.New()
// svc := migrationhubrefactorspaces.New(sess)
//
// myFunc(svc)
// }
//
// In your _test.go file:
//
// // Define a mock struct to be used in your unit tests of myFunc.
// type mockMigrationHubRefactorSpacesClient struct {
// migrationhubrefactorspacesiface.MigrationHubRefactorSpacesAPI
// }
// func (m *mockMigrationHubRefactorSpacesClient) CreateApplication(input *migrationhubrefactorspaces.CreateApplicationInput) (*migrationhubrefactorspaces.CreateApplicationOutput, error) {
// // mock response/functionality
// }
//
// func TestMyFunc(t *testing.T) {
// // Setup Test
// mockSvc := &mockMigrationHubRefactorSpacesClient{}
//
// myfunc(mockSvc)
//
// // Verify myFunc's functionality
// }
//
// It is important to note that this interface will have breaking changes
// when the service model is updated and adds new API operations, paginators,
// and waiters. Its suggested to use the pattern above for testing, or using
// tooling to generate mocks to satisfy the interfaces.
type MigrationHubRefactorSpacesAPI interface {
CreateApplication(*migrationhubrefactorspaces.CreateApplicationInput) (*migrationhubrefactorspaces.CreateApplicationOutput, error)
CreateApplicationWithContext(aws.Context, *migrationhubrefactorspaces.CreateApplicationInput, ...request.Option) (*migrationhubrefactorspaces.CreateApplicationOutput, error)
CreateApplicationRequest(*migrationhubrefactorspaces.CreateApplicationInput) (*request.Request, *migrationhubrefactorspaces.CreateApplicationOutput)
CreateEnvironment(*migrationhubrefactorspaces.CreateEnvironmentInput) (*migrationhubrefactorspaces.CreateEnvironmentOutput, error)
CreateEnvironmentWithContext(aws.Context, *migrationhubrefactorspaces.CreateEnvironmentInput, ...request.Option) (*migrationhubrefactorspaces.CreateEnvironmentOutput, error)
CreateEnvironmentRequest(*migrationhubrefactorspaces.CreateEnvironmentInput) (*request.Request, *migrationhubrefactorspaces.CreateEnvironmentOutput)
CreateRoute(*migrationhubrefactorspaces.CreateRouteInput) (*migrationhubrefactorspaces.CreateRouteOutput, error)
CreateRouteWithContext(aws.Context, *migrationhubrefactorspaces.CreateRouteInput, ...request.Option) (*migrationhubrefactorspaces.CreateRouteOutput, error)
CreateRouteRequest(*migrationhubrefactorspaces.CreateRouteInput) (*request.Request, *migrationhubrefactorspaces.CreateRouteOutput)
CreateService(*migrationhubrefactorspaces.CreateServiceInput) (*migrationhubrefactorspaces.CreateServiceOutput, error)
CreateServiceWithContext(aws.Context, *migrationhubrefactorspaces.CreateServiceInput, ...request.Option) (*migrationhubrefactorspaces.CreateServiceOutput, error)
CreateServiceRequest(*migrationhubrefactorspaces.CreateServiceInput) (*request.Request, *migrationhubrefactorspaces.CreateServiceOutput)
DeleteApplication(*migrationhubrefactorspaces.DeleteApplicationInput) (*migrationhubrefactorspaces.DeleteApplicationOutput, error)
DeleteApplicationWithContext(aws.Context, *migrationhubrefactorspaces.DeleteApplicationInput, ...request.Option) (*migrationhubrefactorspaces.DeleteApplicationOutput, error)
DeleteApplicationRequest(*migrationhubrefactorspaces.DeleteApplicationInput) (*request.Request, *migrationhubrefactorspaces.DeleteApplicationOutput)
DeleteEnvironment(*migrationhubrefactorspaces.DeleteEnvironmentInput) (*migrationhubrefactorspaces.DeleteEnvironmentOutput, error)
DeleteEnvironmentWithContext(aws.Context, *migrationhubrefactorspaces.DeleteEnvironmentInput, ...request.Option) (*migrationhubrefactorspaces.DeleteEnvironmentOutput, error)
DeleteEnvironmentRequest(*migrationhubrefactorspaces.DeleteEnvironmentInput) (*request.Request, *migrationhubrefactorspaces.DeleteEnvironmentOutput)
DeleteResourcePolicy(*migrationhubrefactorspaces.DeleteResourcePolicyInput) (*migrationhubrefactorspaces.DeleteResourcePolicyOutput, error)
DeleteResourcePolicyWithContext(aws.Context, *migrationhubrefactorspaces.DeleteResourcePolicyInput, ...request.Option) (*migrationhubrefactorspaces.DeleteResourcePolicyOutput, error)
DeleteResourcePolicyRequest(*migrationhubrefactorspaces.DeleteResourcePolicyInput) (*request.Request, *migrationhubrefactorspaces.DeleteResourcePolicyOutput)
DeleteRoute(*migrationhubrefactorspaces.DeleteRouteInput) (*migrationhubrefactorspaces.DeleteRouteOutput, error)
DeleteRouteWithContext(aws.Context, *migrationhubrefactorspaces.DeleteRouteInput, ...request.Option) (*migrationhubrefactorspaces.DeleteRouteOutput, error)
DeleteRouteRequest(*migrationhubrefactorspaces.DeleteRouteInput) (*request.Request, *migrationhubrefactorspaces.DeleteRouteOutput)
DeleteService(*migrationhubrefactorspaces.DeleteServiceInput) (*migrationhubrefactorspaces.DeleteServiceOutput, error)
DeleteServiceWithContext(aws.Context, *migrationhubrefactorspaces.DeleteServiceInput, ...request.Option) (*migrationhubrefactorspaces.DeleteServiceOutput, error)
DeleteServiceRequest(*migrationhubrefactorspaces.DeleteServiceInput) (*request.Request, *migrationhubrefactorspaces.DeleteServiceOutput)
GetApplication(*migrationhubrefactorspaces.GetApplicationInput) (*migrationhubrefactorspaces.GetApplicationOutput, error)
GetApplicationWithContext(aws.Context, *migrationhubrefactorspaces.GetApplicationInput, ...request.Option) (*migrationhubrefactorspaces.GetApplicationOutput, error)
GetApplicationRequest(*migrationhubrefactorspaces.GetApplicationInput) (*request.Request, *migrationhubrefactorspaces.GetApplicationOutput)
GetEnvironment(*migrationhubrefactorspaces.GetEnvironmentInput) (*migrationhubrefactorspaces.GetEnvironmentOutput, error)
GetEnvironmentWithContext(aws.Context, *migrationhubrefactorspaces.GetEnvironmentInput, ...request.Option) (*migrationhubrefactorspaces.GetEnvironmentOutput, error)
GetEnvironmentRequest(*migrationhubrefactorspaces.GetEnvironmentInput) (*request.Request, *migrationhubrefactorspaces.GetEnvironmentOutput)
GetResourcePolicy(*migrationhubrefactorspaces.GetResourcePolicyInput) (*migrationhubrefactorspaces.GetResourcePolicyOutput, error)
GetResourcePolicyWithContext(aws.Context, *migrationhubrefactorspaces.GetResourcePolicyInput, ...request.Option) (*migrationhubrefactorspaces.GetResourcePolicyOutput, error)
GetResourcePolicyRequest(*migrationhubrefactorspaces.GetResourcePolicyInput) (*request.Request, *migrationhubrefactorspaces.GetResourcePolicyOutput)
GetRoute(*migrationhubrefactorspaces.GetRouteInput) (*migrationhubrefactorspaces.GetRouteOutput, error)
GetRouteWithContext(aws.Context, *migrationhubrefactorspaces.GetRouteInput, ...request.Option) (*migrationhubrefactorspaces.GetRouteOutput, error)
GetRouteRequest(*migrationhubrefactorspaces.GetRouteInput) (*request.Request, *migrationhubrefactorspaces.GetRouteOutput)
GetService(*migrationhubrefactorspaces.GetServiceInput) (*migrationhubrefactorspaces.GetServiceOutput, error)
GetServiceWithContext(aws.Context, *migrationhubrefactorspaces.GetServiceInput, ...request.Option) (*migrationhubrefactorspaces.GetServiceOutput, error)
GetServiceRequest(*migrationhubrefactorspaces.GetServiceInput) (*request.Request, *migrationhubrefactorspaces.GetServiceOutput)
ListApplications(*migrationhubrefactorspaces.ListApplicationsInput) (*migrationhubrefactorspaces.ListApplicationsOutput, error)
ListApplicationsWithContext(aws.Context, *migrationhubrefactorspaces.ListApplicationsInput, ...request.Option) (*migrationhubrefactorspaces.ListApplicationsOutput, error)
ListApplicationsRequest(*migrationhubrefactorspaces.ListApplicationsInput) (*request.Request, *migrationhubrefactorspaces.ListApplicationsOutput)
ListApplicationsPages(*migrationhubrefactorspaces.ListApplicationsInput, func(*migrationhubrefactorspaces.ListApplicationsOutput, bool) bool) error
ListApplicationsPagesWithContext(aws.Context, *migrationhubrefactorspaces.ListApplicationsInput, func(*migrationhubrefactorspaces.ListApplicationsOutput, bool) bool, ...request.Option) error
ListEnvironmentVpcs(*migrationhubrefactorspaces.ListEnvironmentVpcsInput) (*migrationhubrefactorspaces.ListEnvironmentVpcsOutput, error)
ListEnvironmentVpcsWithContext(aws.Context, *migrationhubrefactorspaces.ListEnvironmentVpcsInput, ...request.Option) (*migrationhubrefactorspaces.ListEnvironmentVpcsOutput, error)
ListEnvironmentVpcsRequest(*migrationhubrefactorspaces.ListEnvironmentVpcsInput) (*request.Request, *migrationhubrefactorspaces.ListEnvironmentVpcsOutput)
ListEnvironmentVpcsPages(*migrationhubrefactorspaces.ListEnvironmentVpcsInput, func(*migrationhubrefactorspaces.ListEnvironmentVpcsOutput, bool) bool) error
ListEnvironmentVpcsPagesWithContext(aws.Context, *migrationhubrefactorspaces.ListEnvironmentVpcsInput, func(*migrationhubrefactorspaces.ListEnvironmentVpcsOutput, bool) bool, ...request.Option) error
ListEnvironments(*migrationhubrefactorspaces.ListEnvironmentsInput) (*migrationhubrefactorspaces.ListEnvironmentsOutput, error)
ListEnvironmentsWithContext(aws.Context, *migrationhubrefactorspaces.ListEnvironmentsInput, ...request.Option) (*migrationhubrefactorspaces.ListEnvironmentsOutput, error)
ListEnvironmentsRequest(*migrationhubrefactorspaces.ListEnvironmentsInput) (*request.Request, *migrationhubrefactorspaces.ListEnvironmentsOutput)
ListEnvironmentsPages(*migrationhubrefactorspaces.ListEnvironmentsInput, func(*migrationhubrefactorspaces.ListEnvironmentsOutput, bool) bool) error
ListEnvironmentsPagesWithContext(aws.Context, *migrationhubrefactorspaces.ListEnvironmentsInput, func(*migrationhubrefactorspaces.ListEnvironmentsOutput, bool) bool, ...request.Option) error
ListRoutes(*migrationhubrefactorspaces.ListRoutesInput) (*migrationhubrefactorspaces.ListRoutesOutput, error)
ListRoutesWithContext(aws.Context, *migrationhubrefactorspaces.ListRoutesInput, ...request.Option) (*migrationhubrefactorspaces.ListRoutesOutput, error)
ListRoutesRequest(*migrationhubrefactorspaces.ListRoutesInput) (*request.Request, *migrationhubrefactorspaces.ListRoutesOutput)
ListRoutesPages(*migrationhubrefactorspaces.ListRoutesInput, func(*migrationhubrefactorspaces.ListRoutesOutput, bool) bool) error
ListRoutesPagesWithContext(aws.Context, *migrationhubrefactorspaces.ListRoutesInput, func(*migrationhubrefactorspaces.ListRoutesOutput, bool) bool, ...request.Option) error
ListServices(*migrationhubrefactorspaces.ListServicesInput) (*migrationhubrefactorspaces.ListServicesOutput, error)
ListServicesWithContext(aws.Context, *migrationhubrefactorspaces.ListServicesInput, ...request.Option) (*migrationhubrefactorspaces.ListServicesOutput, error)
ListServicesRequest(*migrationhubrefactorspaces.ListServicesInput) (*request.Request, *migrationhubrefactorspaces.ListServicesOutput)
ListServicesPages(*migrationhubrefactorspaces.ListServicesInput, func(*migrationhubrefactorspaces.ListServicesOutput, bool) bool) error
ListServicesPagesWithContext(aws.Context, *migrationhubrefactorspaces.ListServicesInput, func(*migrationhubrefactorspaces.ListServicesOutput, bool) bool, ...request.Option) error
ListTagsForResource(*migrationhubrefactorspaces.ListTagsForResourceInput) (*migrationhubrefactorspaces.ListTagsForResourceOutput, error)
ListTagsForResourceWithContext(aws.Context, *migrationhubrefactorspaces.ListTagsForResourceInput, ...request.Option) (*migrationhubrefactorspaces.ListTagsForResourceOutput, error)
ListTagsForResourceRequest(*migrationhubrefactorspaces.ListTagsForResourceInput) (*request.Request, *migrationhubrefactorspaces.ListTagsForResourceOutput)
PutResourcePolicy(*migrationhubrefactorspaces.PutResourcePolicyInput) (*migrationhubrefactorspaces.PutResourcePolicyOutput, error)
PutResourcePolicyWithContext(aws.Context, *migrationhubrefactorspaces.PutResourcePolicyInput, ...request.Option) (*migrationhubrefactorspaces.PutResourcePolicyOutput, error)
PutResourcePolicyRequest(*migrationhubrefactorspaces.PutResourcePolicyInput) (*request.Request, *migrationhubrefactorspaces.PutResourcePolicyOutput)
TagResource(*migrationhubrefactorspaces.TagResourceInput) (*migrationhubrefactorspaces.TagResourceOutput, error)
TagResourceWithContext(aws.Context, *migrationhubrefactorspaces.TagResourceInput, ...request.Option) (*migrationhubrefactorspaces.TagResourceOutput, error)
TagResourceRequest(*migrationhubrefactorspaces.TagResourceInput) (*request.Request, *migrationhubrefactorspaces.TagResourceOutput)
UntagResource(*migrationhubrefactorspaces.UntagResourceInput) (*migrationhubrefactorspaces.UntagResourceOutput, error)
UntagResourceWithContext(aws.Context, *migrationhubrefactorspaces.UntagResourceInput, ...request.Option) (*migrationhubrefactorspaces.UntagResourceOutput, error)
UntagResourceRequest(*migrationhubrefactorspaces.UntagResourceInput) (*request.Request, *migrationhubrefactorspaces.UntagResourceOutput)
UpdateRoute(*migrationhubrefactorspaces.UpdateRouteInput) (*migrationhubrefactorspaces.UpdateRouteOutput, error)
UpdateRouteWithContext(aws.Context, *migrationhubrefactorspaces.UpdateRouteInput, ...request.Option) (*migrationhubrefactorspaces.UpdateRouteOutput, error)
UpdateRouteRequest(*migrationhubrefactorspaces.UpdateRouteInput) (*request.Request, *migrationhubrefactorspaces.UpdateRouteOutput)
}
var _ MigrationHubRefactorSpacesAPI = (*migrationhubrefactorspaces.MigrationHubRefactorSpaces)(nil)