-
Notifications
You must be signed in to change notification settings - Fork 2.1k
/
interface.go
234 lines (187 loc) · 18.6 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
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
// Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT.
// Package cloudwatchevidentlyiface provides an interface to enable mocking the Amazon CloudWatch Evidently 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 cloudwatchevidentlyiface
import (
"github.com/aws/aws-sdk-go/aws"
"github.com/aws/aws-sdk-go/aws/request"
"github.com/aws/aws-sdk-go/service/cloudwatchevidently"
)
// CloudWatchEvidentlyAPI provides an interface to enable mocking the
// cloudwatchevidently.CloudWatchEvidently 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
// // Amazon CloudWatch Evidently.
// func myFunc(svc cloudwatchevidentlyiface.CloudWatchEvidentlyAPI) bool {
// // Make svc.BatchEvaluateFeature request
// }
//
// func main() {
// sess := session.New()
// svc := cloudwatchevidently.New(sess)
//
// myFunc(svc)
// }
//
// In your _test.go file:
//
// // Define a mock struct to be used in your unit tests of myFunc.
// type mockCloudWatchEvidentlyClient struct {
// cloudwatchevidentlyiface.CloudWatchEvidentlyAPI
// }
// func (m *mockCloudWatchEvidentlyClient) BatchEvaluateFeature(input *cloudwatchevidently.BatchEvaluateFeatureInput) (*cloudwatchevidently.BatchEvaluateFeatureOutput, error) {
// // mock response/functionality
// }
//
// func TestMyFunc(t *testing.T) {
// // Setup Test
// mockSvc := &mockCloudWatchEvidentlyClient{}
//
// 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 CloudWatchEvidentlyAPI interface {
BatchEvaluateFeature(*cloudwatchevidently.BatchEvaluateFeatureInput) (*cloudwatchevidently.BatchEvaluateFeatureOutput, error)
BatchEvaluateFeatureWithContext(aws.Context, *cloudwatchevidently.BatchEvaluateFeatureInput, ...request.Option) (*cloudwatchevidently.BatchEvaluateFeatureOutput, error)
BatchEvaluateFeatureRequest(*cloudwatchevidently.BatchEvaluateFeatureInput) (*request.Request, *cloudwatchevidently.BatchEvaluateFeatureOutput)
CreateExperiment(*cloudwatchevidently.CreateExperimentInput) (*cloudwatchevidently.CreateExperimentOutput, error)
CreateExperimentWithContext(aws.Context, *cloudwatchevidently.CreateExperimentInput, ...request.Option) (*cloudwatchevidently.CreateExperimentOutput, error)
CreateExperimentRequest(*cloudwatchevidently.CreateExperimentInput) (*request.Request, *cloudwatchevidently.CreateExperimentOutput)
CreateFeature(*cloudwatchevidently.CreateFeatureInput) (*cloudwatchevidently.CreateFeatureOutput, error)
CreateFeatureWithContext(aws.Context, *cloudwatchevidently.CreateFeatureInput, ...request.Option) (*cloudwatchevidently.CreateFeatureOutput, error)
CreateFeatureRequest(*cloudwatchevidently.CreateFeatureInput) (*request.Request, *cloudwatchevidently.CreateFeatureOutput)
CreateLaunch(*cloudwatchevidently.CreateLaunchInput) (*cloudwatchevidently.CreateLaunchOutput, error)
CreateLaunchWithContext(aws.Context, *cloudwatchevidently.CreateLaunchInput, ...request.Option) (*cloudwatchevidently.CreateLaunchOutput, error)
CreateLaunchRequest(*cloudwatchevidently.CreateLaunchInput) (*request.Request, *cloudwatchevidently.CreateLaunchOutput)
CreateProject(*cloudwatchevidently.CreateProjectInput) (*cloudwatchevidently.CreateProjectOutput, error)
CreateProjectWithContext(aws.Context, *cloudwatchevidently.CreateProjectInput, ...request.Option) (*cloudwatchevidently.CreateProjectOutput, error)
CreateProjectRequest(*cloudwatchevidently.CreateProjectInput) (*request.Request, *cloudwatchevidently.CreateProjectOutput)
CreateSegment(*cloudwatchevidently.CreateSegmentInput) (*cloudwatchevidently.CreateSegmentOutput, error)
CreateSegmentWithContext(aws.Context, *cloudwatchevidently.CreateSegmentInput, ...request.Option) (*cloudwatchevidently.CreateSegmentOutput, error)
CreateSegmentRequest(*cloudwatchevidently.CreateSegmentInput) (*request.Request, *cloudwatchevidently.CreateSegmentOutput)
DeleteExperiment(*cloudwatchevidently.DeleteExperimentInput) (*cloudwatchevidently.DeleteExperimentOutput, error)
DeleteExperimentWithContext(aws.Context, *cloudwatchevidently.DeleteExperimentInput, ...request.Option) (*cloudwatchevidently.DeleteExperimentOutput, error)
DeleteExperimentRequest(*cloudwatchevidently.DeleteExperimentInput) (*request.Request, *cloudwatchevidently.DeleteExperimentOutput)
DeleteFeature(*cloudwatchevidently.DeleteFeatureInput) (*cloudwatchevidently.DeleteFeatureOutput, error)
DeleteFeatureWithContext(aws.Context, *cloudwatchevidently.DeleteFeatureInput, ...request.Option) (*cloudwatchevidently.DeleteFeatureOutput, error)
DeleteFeatureRequest(*cloudwatchevidently.DeleteFeatureInput) (*request.Request, *cloudwatchevidently.DeleteFeatureOutput)
DeleteLaunch(*cloudwatchevidently.DeleteLaunchInput) (*cloudwatchevidently.DeleteLaunchOutput, error)
DeleteLaunchWithContext(aws.Context, *cloudwatchevidently.DeleteLaunchInput, ...request.Option) (*cloudwatchevidently.DeleteLaunchOutput, error)
DeleteLaunchRequest(*cloudwatchevidently.DeleteLaunchInput) (*request.Request, *cloudwatchevidently.DeleteLaunchOutput)
DeleteProject(*cloudwatchevidently.DeleteProjectInput) (*cloudwatchevidently.DeleteProjectOutput, error)
DeleteProjectWithContext(aws.Context, *cloudwatchevidently.DeleteProjectInput, ...request.Option) (*cloudwatchevidently.DeleteProjectOutput, error)
DeleteProjectRequest(*cloudwatchevidently.DeleteProjectInput) (*request.Request, *cloudwatchevidently.DeleteProjectOutput)
DeleteSegment(*cloudwatchevidently.DeleteSegmentInput) (*cloudwatchevidently.DeleteSegmentOutput, error)
DeleteSegmentWithContext(aws.Context, *cloudwatchevidently.DeleteSegmentInput, ...request.Option) (*cloudwatchevidently.DeleteSegmentOutput, error)
DeleteSegmentRequest(*cloudwatchevidently.DeleteSegmentInput) (*request.Request, *cloudwatchevidently.DeleteSegmentOutput)
EvaluateFeature(*cloudwatchevidently.EvaluateFeatureInput) (*cloudwatchevidently.EvaluateFeatureOutput, error)
EvaluateFeatureWithContext(aws.Context, *cloudwatchevidently.EvaluateFeatureInput, ...request.Option) (*cloudwatchevidently.EvaluateFeatureOutput, error)
EvaluateFeatureRequest(*cloudwatchevidently.EvaluateFeatureInput) (*request.Request, *cloudwatchevidently.EvaluateFeatureOutput)
GetExperiment(*cloudwatchevidently.GetExperimentInput) (*cloudwatchevidently.GetExperimentOutput, error)
GetExperimentWithContext(aws.Context, *cloudwatchevidently.GetExperimentInput, ...request.Option) (*cloudwatchevidently.GetExperimentOutput, error)
GetExperimentRequest(*cloudwatchevidently.GetExperimentInput) (*request.Request, *cloudwatchevidently.GetExperimentOutput)
GetExperimentResults(*cloudwatchevidently.GetExperimentResultsInput) (*cloudwatchevidently.GetExperimentResultsOutput, error)
GetExperimentResultsWithContext(aws.Context, *cloudwatchevidently.GetExperimentResultsInput, ...request.Option) (*cloudwatchevidently.GetExperimentResultsOutput, error)
GetExperimentResultsRequest(*cloudwatchevidently.GetExperimentResultsInput) (*request.Request, *cloudwatchevidently.GetExperimentResultsOutput)
GetFeature(*cloudwatchevidently.GetFeatureInput) (*cloudwatchevidently.GetFeatureOutput, error)
GetFeatureWithContext(aws.Context, *cloudwatchevidently.GetFeatureInput, ...request.Option) (*cloudwatchevidently.GetFeatureOutput, error)
GetFeatureRequest(*cloudwatchevidently.GetFeatureInput) (*request.Request, *cloudwatchevidently.GetFeatureOutput)
GetLaunch(*cloudwatchevidently.GetLaunchInput) (*cloudwatchevidently.GetLaunchOutput, error)
GetLaunchWithContext(aws.Context, *cloudwatchevidently.GetLaunchInput, ...request.Option) (*cloudwatchevidently.GetLaunchOutput, error)
GetLaunchRequest(*cloudwatchevidently.GetLaunchInput) (*request.Request, *cloudwatchevidently.GetLaunchOutput)
GetProject(*cloudwatchevidently.GetProjectInput) (*cloudwatchevidently.GetProjectOutput, error)
GetProjectWithContext(aws.Context, *cloudwatchevidently.GetProjectInput, ...request.Option) (*cloudwatchevidently.GetProjectOutput, error)
GetProjectRequest(*cloudwatchevidently.GetProjectInput) (*request.Request, *cloudwatchevidently.GetProjectOutput)
GetSegment(*cloudwatchevidently.GetSegmentInput) (*cloudwatchevidently.GetSegmentOutput, error)
GetSegmentWithContext(aws.Context, *cloudwatchevidently.GetSegmentInput, ...request.Option) (*cloudwatchevidently.GetSegmentOutput, error)
GetSegmentRequest(*cloudwatchevidently.GetSegmentInput) (*request.Request, *cloudwatchevidently.GetSegmentOutput)
ListExperiments(*cloudwatchevidently.ListExperimentsInput) (*cloudwatchevidently.ListExperimentsOutput, error)
ListExperimentsWithContext(aws.Context, *cloudwatchevidently.ListExperimentsInput, ...request.Option) (*cloudwatchevidently.ListExperimentsOutput, error)
ListExperimentsRequest(*cloudwatchevidently.ListExperimentsInput) (*request.Request, *cloudwatchevidently.ListExperimentsOutput)
ListExperimentsPages(*cloudwatchevidently.ListExperimentsInput, func(*cloudwatchevidently.ListExperimentsOutput, bool) bool) error
ListExperimentsPagesWithContext(aws.Context, *cloudwatchevidently.ListExperimentsInput, func(*cloudwatchevidently.ListExperimentsOutput, bool) bool, ...request.Option) error
ListFeatures(*cloudwatchevidently.ListFeaturesInput) (*cloudwatchevidently.ListFeaturesOutput, error)
ListFeaturesWithContext(aws.Context, *cloudwatchevidently.ListFeaturesInput, ...request.Option) (*cloudwatchevidently.ListFeaturesOutput, error)
ListFeaturesRequest(*cloudwatchevidently.ListFeaturesInput) (*request.Request, *cloudwatchevidently.ListFeaturesOutput)
ListFeaturesPages(*cloudwatchevidently.ListFeaturesInput, func(*cloudwatchevidently.ListFeaturesOutput, bool) bool) error
ListFeaturesPagesWithContext(aws.Context, *cloudwatchevidently.ListFeaturesInput, func(*cloudwatchevidently.ListFeaturesOutput, bool) bool, ...request.Option) error
ListLaunches(*cloudwatchevidently.ListLaunchesInput) (*cloudwatchevidently.ListLaunchesOutput, error)
ListLaunchesWithContext(aws.Context, *cloudwatchevidently.ListLaunchesInput, ...request.Option) (*cloudwatchevidently.ListLaunchesOutput, error)
ListLaunchesRequest(*cloudwatchevidently.ListLaunchesInput) (*request.Request, *cloudwatchevidently.ListLaunchesOutput)
ListLaunchesPages(*cloudwatchevidently.ListLaunchesInput, func(*cloudwatchevidently.ListLaunchesOutput, bool) bool) error
ListLaunchesPagesWithContext(aws.Context, *cloudwatchevidently.ListLaunchesInput, func(*cloudwatchevidently.ListLaunchesOutput, bool) bool, ...request.Option) error
ListProjects(*cloudwatchevidently.ListProjectsInput) (*cloudwatchevidently.ListProjectsOutput, error)
ListProjectsWithContext(aws.Context, *cloudwatchevidently.ListProjectsInput, ...request.Option) (*cloudwatchevidently.ListProjectsOutput, error)
ListProjectsRequest(*cloudwatchevidently.ListProjectsInput) (*request.Request, *cloudwatchevidently.ListProjectsOutput)
ListProjectsPages(*cloudwatchevidently.ListProjectsInput, func(*cloudwatchevidently.ListProjectsOutput, bool) bool) error
ListProjectsPagesWithContext(aws.Context, *cloudwatchevidently.ListProjectsInput, func(*cloudwatchevidently.ListProjectsOutput, bool) bool, ...request.Option) error
ListSegmentReferences(*cloudwatchevidently.ListSegmentReferencesInput) (*cloudwatchevidently.ListSegmentReferencesOutput, error)
ListSegmentReferencesWithContext(aws.Context, *cloudwatchevidently.ListSegmentReferencesInput, ...request.Option) (*cloudwatchevidently.ListSegmentReferencesOutput, error)
ListSegmentReferencesRequest(*cloudwatchevidently.ListSegmentReferencesInput) (*request.Request, *cloudwatchevidently.ListSegmentReferencesOutput)
ListSegmentReferencesPages(*cloudwatchevidently.ListSegmentReferencesInput, func(*cloudwatchevidently.ListSegmentReferencesOutput, bool) bool) error
ListSegmentReferencesPagesWithContext(aws.Context, *cloudwatchevidently.ListSegmentReferencesInput, func(*cloudwatchevidently.ListSegmentReferencesOutput, bool) bool, ...request.Option) error
ListSegments(*cloudwatchevidently.ListSegmentsInput) (*cloudwatchevidently.ListSegmentsOutput, error)
ListSegmentsWithContext(aws.Context, *cloudwatchevidently.ListSegmentsInput, ...request.Option) (*cloudwatchevidently.ListSegmentsOutput, error)
ListSegmentsRequest(*cloudwatchevidently.ListSegmentsInput) (*request.Request, *cloudwatchevidently.ListSegmentsOutput)
ListSegmentsPages(*cloudwatchevidently.ListSegmentsInput, func(*cloudwatchevidently.ListSegmentsOutput, bool) bool) error
ListSegmentsPagesWithContext(aws.Context, *cloudwatchevidently.ListSegmentsInput, func(*cloudwatchevidently.ListSegmentsOutput, bool) bool, ...request.Option) error
ListTagsForResource(*cloudwatchevidently.ListTagsForResourceInput) (*cloudwatchevidently.ListTagsForResourceOutput, error)
ListTagsForResourceWithContext(aws.Context, *cloudwatchevidently.ListTagsForResourceInput, ...request.Option) (*cloudwatchevidently.ListTagsForResourceOutput, error)
ListTagsForResourceRequest(*cloudwatchevidently.ListTagsForResourceInput) (*request.Request, *cloudwatchevidently.ListTagsForResourceOutput)
PutProjectEvents(*cloudwatchevidently.PutProjectEventsInput) (*cloudwatchevidently.PutProjectEventsOutput, error)
PutProjectEventsWithContext(aws.Context, *cloudwatchevidently.PutProjectEventsInput, ...request.Option) (*cloudwatchevidently.PutProjectEventsOutput, error)
PutProjectEventsRequest(*cloudwatchevidently.PutProjectEventsInput) (*request.Request, *cloudwatchevidently.PutProjectEventsOutput)
StartExperiment(*cloudwatchevidently.StartExperimentInput) (*cloudwatchevidently.StartExperimentOutput, error)
StartExperimentWithContext(aws.Context, *cloudwatchevidently.StartExperimentInput, ...request.Option) (*cloudwatchevidently.StartExperimentOutput, error)
StartExperimentRequest(*cloudwatchevidently.StartExperimentInput) (*request.Request, *cloudwatchevidently.StartExperimentOutput)
StartLaunch(*cloudwatchevidently.StartLaunchInput) (*cloudwatchevidently.StartLaunchOutput, error)
StartLaunchWithContext(aws.Context, *cloudwatchevidently.StartLaunchInput, ...request.Option) (*cloudwatchevidently.StartLaunchOutput, error)
StartLaunchRequest(*cloudwatchevidently.StartLaunchInput) (*request.Request, *cloudwatchevidently.StartLaunchOutput)
StopExperiment(*cloudwatchevidently.StopExperimentInput) (*cloudwatchevidently.StopExperimentOutput, error)
StopExperimentWithContext(aws.Context, *cloudwatchevidently.StopExperimentInput, ...request.Option) (*cloudwatchevidently.StopExperimentOutput, error)
StopExperimentRequest(*cloudwatchevidently.StopExperimentInput) (*request.Request, *cloudwatchevidently.StopExperimentOutput)
StopLaunch(*cloudwatchevidently.StopLaunchInput) (*cloudwatchevidently.StopLaunchOutput, error)
StopLaunchWithContext(aws.Context, *cloudwatchevidently.StopLaunchInput, ...request.Option) (*cloudwatchevidently.StopLaunchOutput, error)
StopLaunchRequest(*cloudwatchevidently.StopLaunchInput) (*request.Request, *cloudwatchevidently.StopLaunchOutput)
TagResource(*cloudwatchevidently.TagResourceInput) (*cloudwatchevidently.TagResourceOutput, error)
TagResourceWithContext(aws.Context, *cloudwatchevidently.TagResourceInput, ...request.Option) (*cloudwatchevidently.TagResourceOutput, error)
TagResourceRequest(*cloudwatchevidently.TagResourceInput) (*request.Request, *cloudwatchevidently.TagResourceOutput)
TestSegmentPattern(*cloudwatchevidently.TestSegmentPatternInput) (*cloudwatchevidently.TestSegmentPatternOutput, error)
TestSegmentPatternWithContext(aws.Context, *cloudwatchevidently.TestSegmentPatternInput, ...request.Option) (*cloudwatchevidently.TestSegmentPatternOutput, error)
TestSegmentPatternRequest(*cloudwatchevidently.TestSegmentPatternInput) (*request.Request, *cloudwatchevidently.TestSegmentPatternOutput)
UntagResource(*cloudwatchevidently.UntagResourceInput) (*cloudwatchevidently.UntagResourceOutput, error)
UntagResourceWithContext(aws.Context, *cloudwatchevidently.UntagResourceInput, ...request.Option) (*cloudwatchevidently.UntagResourceOutput, error)
UntagResourceRequest(*cloudwatchevidently.UntagResourceInput) (*request.Request, *cloudwatchevidently.UntagResourceOutput)
UpdateExperiment(*cloudwatchevidently.UpdateExperimentInput) (*cloudwatchevidently.UpdateExperimentOutput, error)
UpdateExperimentWithContext(aws.Context, *cloudwatchevidently.UpdateExperimentInput, ...request.Option) (*cloudwatchevidently.UpdateExperimentOutput, error)
UpdateExperimentRequest(*cloudwatchevidently.UpdateExperimentInput) (*request.Request, *cloudwatchevidently.UpdateExperimentOutput)
UpdateFeature(*cloudwatchevidently.UpdateFeatureInput) (*cloudwatchevidently.UpdateFeatureOutput, error)
UpdateFeatureWithContext(aws.Context, *cloudwatchevidently.UpdateFeatureInput, ...request.Option) (*cloudwatchevidently.UpdateFeatureOutput, error)
UpdateFeatureRequest(*cloudwatchevidently.UpdateFeatureInput) (*request.Request, *cloudwatchevidently.UpdateFeatureOutput)
UpdateLaunch(*cloudwatchevidently.UpdateLaunchInput) (*cloudwatchevidently.UpdateLaunchOutput, error)
UpdateLaunchWithContext(aws.Context, *cloudwatchevidently.UpdateLaunchInput, ...request.Option) (*cloudwatchevidently.UpdateLaunchOutput, error)
UpdateLaunchRequest(*cloudwatchevidently.UpdateLaunchInput) (*request.Request, *cloudwatchevidently.UpdateLaunchOutput)
UpdateProject(*cloudwatchevidently.UpdateProjectInput) (*cloudwatchevidently.UpdateProjectOutput, error)
UpdateProjectWithContext(aws.Context, *cloudwatchevidently.UpdateProjectInput, ...request.Option) (*cloudwatchevidently.UpdateProjectOutput, error)
UpdateProjectRequest(*cloudwatchevidently.UpdateProjectInput) (*request.Request, *cloudwatchevidently.UpdateProjectOutput)
UpdateProjectDataDelivery(*cloudwatchevidently.UpdateProjectDataDeliveryInput) (*cloudwatchevidently.UpdateProjectDataDeliveryOutput, error)
UpdateProjectDataDeliveryWithContext(aws.Context, *cloudwatchevidently.UpdateProjectDataDeliveryInput, ...request.Option) (*cloudwatchevidently.UpdateProjectDataDeliveryOutput, error)
UpdateProjectDataDeliveryRequest(*cloudwatchevidently.UpdateProjectDataDeliveryInput) (*request.Request, *cloudwatchevidently.UpdateProjectDataDeliveryOutput)
}
var _ CloudWatchEvidentlyAPI = (*cloudwatchevidently.CloudWatchEvidently)(nil)