-
Notifications
You must be signed in to change notification settings - Fork 2.1k
/
interface.go
148 lines (123 loc) · 9.89 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
// Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT.
// Package accessanalyzeriface provides an interface to enable mocking the Access Analyzer 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 accessanalyzeriface
import (
"github.com/aws/aws-sdk-go/aws"
"github.com/aws/aws-sdk-go/aws/request"
"github.com/aws/aws-sdk-go/service/accessanalyzer"
)
// AccessAnalyzerAPI provides an interface to enable mocking the
// accessanalyzer.AccessAnalyzer 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
// // Access Analyzer.
// func myFunc(svc accessanalyzeriface.AccessAnalyzerAPI) bool {
// // Make svc.CreateAnalyzer request
// }
//
// func main() {
// sess := session.New()
// svc := accessanalyzer.New(sess)
//
// myFunc(svc)
// }
//
// In your _test.go file:
//
// // Define a mock struct to be used in your unit tests of myFunc.
// type mockAccessAnalyzerClient struct {
// accessanalyzeriface.AccessAnalyzerAPI
// }
// func (m *mockAccessAnalyzerClient) CreateAnalyzer(input *accessanalyzer.CreateAnalyzerInput) (*accessanalyzer.CreateAnalyzerOutput, error) {
// // mock response/functionality
// }
//
// func TestMyFunc(t *testing.T) {
// // Setup Test
// mockSvc := &mockAccessAnalyzerClient{}
//
// 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 AccessAnalyzerAPI interface {
CreateAnalyzer(*accessanalyzer.CreateAnalyzerInput) (*accessanalyzer.CreateAnalyzerOutput, error)
CreateAnalyzerWithContext(aws.Context, *accessanalyzer.CreateAnalyzerInput, ...request.Option) (*accessanalyzer.CreateAnalyzerOutput, error)
CreateAnalyzerRequest(*accessanalyzer.CreateAnalyzerInput) (*request.Request, *accessanalyzer.CreateAnalyzerOutput)
CreateArchiveRule(*accessanalyzer.CreateArchiveRuleInput) (*accessanalyzer.CreateArchiveRuleOutput, error)
CreateArchiveRuleWithContext(aws.Context, *accessanalyzer.CreateArchiveRuleInput, ...request.Option) (*accessanalyzer.CreateArchiveRuleOutput, error)
CreateArchiveRuleRequest(*accessanalyzer.CreateArchiveRuleInput) (*request.Request, *accessanalyzer.CreateArchiveRuleOutput)
DeleteAnalyzer(*accessanalyzer.DeleteAnalyzerInput) (*accessanalyzer.DeleteAnalyzerOutput, error)
DeleteAnalyzerWithContext(aws.Context, *accessanalyzer.DeleteAnalyzerInput, ...request.Option) (*accessanalyzer.DeleteAnalyzerOutput, error)
DeleteAnalyzerRequest(*accessanalyzer.DeleteAnalyzerInput) (*request.Request, *accessanalyzer.DeleteAnalyzerOutput)
DeleteArchiveRule(*accessanalyzer.DeleteArchiveRuleInput) (*accessanalyzer.DeleteArchiveRuleOutput, error)
DeleteArchiveRuleWithContext(aws.Context, *accessanalyzer.DeleteArchiveRuleInput, ...request.Option) (*accessanalyzer.DeleteArchiveRuleOutput, error)
DeleteArchiveRuleRequest(*accessanalyzer.DeleteArchiveRuleInput) (*request.Request, *accessanalyzer.DeleteArchiveRuleOutput)
GetAnalyzedResource(*accessanalyzer.GetAnalyzedResourceInput) (*accessanalyzer.GetAnalyzedResourceOutput, error)
GetAnalyzedResourceWithContext(aws.Context, *accessanalyzer.GetAnalyzedResourceInput, ...request.Option) (*accessanalyzer.GetAnalyzedResourceOutput, error)
GetAnalyzedResourceRequest(*accessanalyzer.GetAnalyzedResourceInput) (*request.Request, *accessanalyzer.GetAnalyzedResourceOutput)
GetAnalyzer(*accessanalyzer.GetAnalyzerInput) (*accessanalyzer.GetAnalyzerOutput, error)
GetAnalyzerWithContext(aws.Context, *accessanalyzer.GetAnalyzerInput, ...request.Option) (*accessanalyzer.GetAnalyzerOutput, error)
GetAnalyzerRequest(*accessanalyzer.GetAnalyzerInput) (*request.Request, *accessanalyzer.GetAnalyzerOutput)
GetArchiveRule(*accessanalyzer.GetArchiveRuleInput) (*accessanalyzer.GetArchiveRuleOutput, error)
GetArchiveRuleWithContext(aws.Context, *accessanalyzer.GetArchiveRuleInput, ...request.Option) (*accessanalyzer.GetArchiveRuleOutput, error)
GetArchiveRuleRequest(*accessanalyzer.GetArchiveRuleInput) (*request.Request, *accessanalyzer.GetArchiveRuleOutput)
GetFinding(*accessanalyzer.GetFindingInput) (*accessanalyzer.GetFindingOutput, error)
GetFindingWithContext(aws.Context, *accessanalyzer.GetFindingInput, ...request.Option) (*accessanalyzer.GetFindingOutput, error)
GetFindingRequest(*accessanalyzer.GetFindingInput) (*request.Request, *accessanalyzer.GetFindingOutput)
ListAnalyzedResources(*accessanalyzer.ListAnalyzedResourcesInput) (*accessanalyzer.ListAnalyzedResourcesOutput, error)
ListAnalyzedResourcesWithContext(aws.Context, *accessanalyzer.ListAnalyzedResourcesInput, ...request.Option) (*accessanalyzer.ListAnalyzedResourcesOutput, error)
ListAnalyzedResourcesRequest(*accessanalyzer.ListAnalyzedResourcesInput) (*request.Request, *accessanalyzer.ListAnalyzedResourcesOutput)
ListAnalyzedResourcesPages(*accessanalyzer.ListAnalyzedResourcesInput, func(*accessanalyzer.ListAnalyzedResourcesOutput, bool) bool) error
ListAnalyzedResourcesPagesWithContext(aws.Context, *accessanalyzer.ListAnalyzedResourcesInput, func(*accessanalyzer.ListAnalyzedResourcesOutput, bool) bool, ...request.Option) error
ListAnalyzers(*accessanalyzer.ListAnalyzersInput) (*accessanalyzer.ListAnalyzersOutput, error)
ListAnalyzersWithContext(aws.Context, *accessanalyzer.ListAnalyzersInput, ...request.Option) (*accessanalyzer.ListAnalyzersOutput, error)
ListAnalyzersRequest(*accessanalyzer.ListAnalyzersInput) (*request.Request, *accessanalyzer.ListAnalyzersOutput)
ListAnalyzersPages(*accessanalyzer.ListAnalyzersInput, func(*accessanalyzer.ListAnalyzersOutput, bool) bool) error
ListAnalyzersPagesWithContext(aws.Context, *accessanalyzer.ListAnalyzersInput, func(*accessanalyzer.ListAnalyzersOutput, bool) bool, ...request.Option) error
ListArchiveRules(*accessanalyzer.ListArchiveRulesInput) (*accessanalyzer.ListArchiveRulesOutput, error)
ListArchiveRulesWithContext(aws.Context, *accessanalyzer.ListArchiveRulesInput, ...request.Option) (*accessanalyzer.ListArchiveRulesOutput, error)
ListArchiveRulesRequest(*accessanalyzer.ListArchiveRulesInput) (*request.Request, *accessanalyzer.ListArchiveRulesOutput)
ListArchiveRulesPages(*accessanalyzer.ListArchiveRulesInput, func(*accessanalyzer.ListArchiveRulesOutput, bool) bool) error
ListArchiveRulesPagesWithContext(aws.Context, *accessanalyzer.ListArchiveRulesInput, func(*accessanalyzer.ListArchiveRulesOutput, bool) bool, ...request.Option) error
ListFindings(*accessanalyzer.ListFindingsInput) (*accessanalyzer.ListFindingsOutput, error)
ListFindingsWithContext(aws.Context, *accessanalyzer.ListFindingsInput, ...request.Option) (*accessanalyzer.ListFindingsOutput, error)
ListFindingsRequest(*accessanalyzer.ListFindingsInput) (*request.Request, *accessanalyzer.ListFindingsOutput)
ListFindingsPages(*accessanalyzer.ListFindingsInput, func(*accessanalyzer.ListFindingsOutput, bool) bool) error
ListFindingsPagesWithContext(aws.Context, *accessanalyzer.ListFindingsInput, func(*accessanalyzer.ListFindingsOutput, bool) bool, ...request.Option) error
ListTagsForResource(*accessanalyzer.ListTagsForResourceInput) (*accessanalyzer.ListTagsForResourceOutput, error)
ListTagsForResourceWithContext(aws.Context, *accessanalyzer.ListTagsForResourceInput, ...request.Option) (*accessanalyzer.ListTagsForResourceOutput, error)
ListTagsForResourceRequest(*accessanalyzer.ListTagsForResourceInput) (*request.Request, *accessanalyzer.ListTagsForResourceOutput)
StartResourceScan(*accessanalyzer.StartResourceScanInput) (*accessanalyzer.StartResourceScanOutput, error)
StartResourceScanWithContext(aws.Context, *accessanalyzer.StartResourceScanInput, ...request.Option) (*accessanalyzer.StartResourceScanOutput, error)
StartResourceScanRequest(*accessanalyzer.StartResourceScanInput) (*request.Request, *accessanalyzer.StartResourceScanOutput)
TagResource(*accessanalyzer.TagResourceInput) (*accessanalyzer.TagResourceOutput, error)
TagResourceWithContext(aws.Context, *accessanalyzer.TagResourceInput, ...request.Option) (*accessanalyzer.TagResourceOutput, error)
TagResourceRequest(*accessanalyzer.TagResourceInput) (*request.Request, *accessanalyzer.TagResourceOutput)
UntagResource(*accessanalyzer.UntagResourceInput) (*accessanalyzer.UntagResourceOutput, error)
UntagResourceWithContext(aws.Context, *accessanalyzer.UntagResourceInput, ...request.Option) (*accessanalyzer.UntagResourceOutput, error)
UntagResourceRequest(*accessanalyzer.UntagResourceInput) (*request.Request, *accessanalyzer.UntagResourceOutput)
UpdateArchiveRule(*accessanalyzer.UpdateArchiveRuleInput) (*accessanalyzer.UpdateArchiveRuleOutput, error)
UpdateArchiveRuleWithContext(aws.Context, *accessanalyzer.UpdateArchiveRuleInput, ...request.Option) (*accessanalyzer.UpdateArchiveRuleOutput, error)
UpdateArchiveRuleRequest(*accessanalyzer.UpdateArchiveRuleInput) (*request.Request, *accessanalyzer.UpdateArchiveRuleOutput)
UpdateFindings(*accessanalyzer.UpdateFindingsInput) (*accessanalyzer.UpdateFindingsOutput, error)
UpdateFindingsWithContext(aws.Context, *accessanalyzer.UpdateFindingsInput, ...request.Option) (*accessanalyzer.UpdateFindingsOutput, error)
UpdateFindingsRequest(*accessanalyzer.UpdateFindingsInput) (*request.Request, *accessanalyzer.UpdateFindingsOutput)
}
var _ AccessAnalyzerAPI = (*accessanalyzer.AccessAnalyzer)(nil)