github.com/aavshr/aws-sdk-go@v1.41.3/service/wafv2/wafv2iface/interface.go (about) 1 // Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT. 2 3 // Package wafv2iface provides an interface to enable mocking the AWS WAFV2 service client 4 // for testing your code. 5 // 6 // It is important to note that this interface will have breaking changes 7 // when the service model is updated and adds new API operations, paginators, 8 // and waiters. 9 package wafv2iface 10 11 import ( 12 "github.com/aavshr/aws-sdk-go/aws" 13 "github.com/aavshr/aws-sdk-go/aws/request" 14 "github.com/aavshr/aws-sdk-go/service/wafv2" 15 ) 16 17 // WAFV2API provides an interface to enable mocking the 18 // wafv2.WAFV2 service client's API operation, 19 // paginators, and waiters. This make unit testing your code that calls out 20 // to the SDK's service client's calls easier. 21 // 22 // The best way to use this interface is so the SDK's service client's calls 23 // can be stubbed out for unit testing your code with the SDK without needing 24 // to inject custom request handlers into the SDK's request pipeline. 25 // 26 // // myFunc uses an SDK service client to make a request to 27 // // AWS WAFV2. 28 // func myFunc(svc wafv2iface.WAFV2API) bool { 29 // // Make svc.AssociateWebACL request 30 // } 31 // 32 // func main() { 33 // sess := session.New() 34 // svc := wafv2.New(sess) 35 // 36 // myFunc(svc) 37 // } 38 // 39 // In your _test.go file: 40 // 41 // // Define a mock struct to be used in your unit tests of myFunc. 42 // type mockWAFV2Client struct { 43 // wafv2iface.WAFV2API 44 // } 45 // func (m *mockWAFV2Client) AssociateWebACL(input *wafv2.AssociateWebACLInput) (*wafv2.AssociateWebACLOutput, error) { 46 // // mock response/functionality 47 // } 48 // 49 // func TestMyFunc(t *testing.T) { 50 // // Setup Test 51 // mockSvc := &mockWAFV2Client{} 52 // 53 // myfunc(mockSvc) 54 // 55 // // Verify myFunc's functionality 56 // } 57 // 58 // It is important to note that this interface will have breaking changes 59 // when the service model is updated and adds new API operations, paginators, 60 // and waiters. Its suggested to use the pattern above for testing, or using 61 // tooling to generate mocks to satisfy the interfaces. 62 type WAFV2API interface { 63 AssociateWebACL(*wafv2.AssociateWebACLInput) (*wafv2.AssociateWebACLOutput, error) 64 AssociateWebACLWithContext(aws.Context, *wafv2.AssociateWebACLInput, ...request.Option) (*wafv2.AssociateWebACLOutput, error) 65 AssociateWebACLRequest(*wafv2.AssociateWebACLInput) (*request.Request, *wafv2.AssociateWebACLOutput) 66 67 CheckCapacity(*wafv2.CheckCapacityInput) (*wafv2.CheckCapacityOutput, error) 68 CheckCapacityWithContext(aws.Context, *wafv2.CheckCapacityInput, ...request.Option) (*wafv2.CheckCapacityOutput, error) 69 CheckCapacityRequest(*wafv2.CheckCapacityInput) (*request.Request, *wafv2.CheckCapacityOutput) 70 71 CreateIPSet(*wafv2.CreateIPSetInput) (*wafv2.CreateIPSetOutput, error) 72 CreateIPSetWithContext(aws.Context, *wafv2.CreateIPSetInput, ...request.Option) (*wafv2.CreateIPSetOutput, error) 73 CreateIPSetRequest(*wafv2.CreateIPSetInput) (*request.Request, *wafv2.CreateIPSetOutput) 74 75 CreateRegexPatternSet(*wafv2.CreateRegexPatternSetInput) (*wafv2.CreateRegexPatternSetOutput, error) 76 CreateRegexPatternSetWithContext(aws.Context, *wafv2.CreateRegexPatternSetInput, ...request.Option) (*wafv2.CreateRegexPatternSetOutput, error) 77 CreateRegexPatternSetRequest(*wafv2.CreateRegexPatternSetInput) (*request.Request, *wafv2.CreateRegexPatternSetOutput) 78 79 CreateRuleGroup(*wafv2.CreateRuleGroupInput) (*wafv2.CreateRuleGroupOutput, error) 80 CreateRuleGroupWithContext(aws.Context, *wafv2.CreateRuleGroupInput, ...request.Option) (*wafv2.CreateRuleGroupOutput, error) 81 CreateRuleGroupRequest(*wafv2.CreateRuleGroupInput) (*request.Request, *wafv2.CreateRuleGroupOutput) 82 83 CreateWebACL(*wafv2.CreateWebACLInput) (*wafv2.CreateWebACLOutput, error) 84 CreateWebACLWithContext(aws.Context, *wafv2.CreateWebACLInput, ...request.Option) (*wafv2.CreateWebACLOutput, error) 85 CreateWebACLRequest(*wafv2.CreateWebACLInput) (*request.Request, *wafv2.CreateWebACLOutput) 86 87 DeleteFirewallManagerRuleGroups(*wafv2.DeleteFirewallManagerRuleGroupsInput) (*wafv2.DeleteFirewallManagerRuleGroupsOutput, error) 88 DeleteFirewallManagerRuleGroupsWithContext(aws.Context, *wafv2.DeleteFirewallManagerRuleGroupsInput, ...request.Option) (*wafv2.DeleteFirewallManagerRuleGroupsOutput, error) 89 DeleteFirewallManagerRuleGroupsRequest(*wafv2.DeleteFirewallManagerRuleGroupsInput) (*request.Request, *wafv2.DeleteFirewallManagerRuleGroupsOutput) 90 91 DeleteIPSet(*wafv2.DeleteIPSetInput) (*wafv2.DeleteIPSetOutput, error) 92 DeleteIPSetWithContext(aws.Context, *wafv2.DeleteIPSetInput, ...request.Option) (*wafv2.DeleteIPSetOutput, error) 93 DeleteIPSetRequest(*wafv2.DeleteIPSetInput) (*request.Request, *wafv2.DeleteIPSetOutput) 94 95 DeleteLoggingConfiguration(*wafv2.DeleteLoggingConfigurationInput) (*wafv2.DeleteLoggingConfigurationOutput, error) 96 DeleteLoggingConfigurationWithContext(aws.Context, *wafv2.DeleteLoggingConfigurationInput, ...request.Option) (*wafv2.DeleteLoggingConfigurationOutput, error) 97 DeleteLoggingConfigurationRequest(*wafv2.DeleteLoggingConfigurationInput) (*request.Request, *wafv2.DeleteLoggingConfigurationOutput) 98 99 DeletePermissionPolicy(*wafv2.DeletePermissionPolicyInput) (*wafv2.DeletePermissionPolicyOutput, error) 100 DeletePermissionPolicyWithContext(aws.Context, *wafv2.DeletePermissionPolicyInput, ...request.Option) (*wafv2.DeletePermissionPolicyOutput, error) 101 DeletePermissionPolicyRequest(*wafv2.DeletePermissionPolicyInput) (*request.Request, *wafv2.DeletePermissionPolicyOutput) 102 103 DeleteRegexPatternSet(*wafv2.DeleteRegexPatternSetInput) (*wafv2.DeleteRegexPatternSetOutput, error) 104 DeleteRegexPatternSetWithContext(aws.Context, *wafv2.DeleteRegexPatternSetInput, ...request.Option) (*wafv2.DeleteRegexPatternSetOutput, error) 105 DeleteRegexPatternSetRequest(*wafv2.DeleteRegexPatternSetInput) (*request.Request, *wafv2.DeleteRegexPatternSetOutput) 106 107 DeleteRuleGroup(*wafv2.DeleteRuleGroupInput) (*wafv2.DeleteRuleGroupOutput, error) 108 DeleteRuleGroupWithContext(aws.Context, *wafv2.DeleteRuleGroupInput, ...request.Option) (*wafv2.DeleteRuleGroupOutput, error) 109 DeleteRuleGroupRequest(*wafv2.DeleteRuleGroupInput) (*request.Request, *wafv2.DeleteRuleGroupOutput) 110 111 DeleteWebACL(*wafv2.DeleteWebACLInput) (*wafv2.DeleteWebACLOutput, error) 112 DeleteWebACLWithContext(aws.Context, *wafv2.DeleteWebACLInput, ...request.Option) (*wafv2.DeleteWebACLOutput, error) 113 DeleteWebACLRequest(*wafv2.DeleteWebACLInput) (*request.Request, *wafv2.DeleteWebACLOutput) 114 115 DescribeManagedRuleGroup(*wafv2.DescribeManagedRuleGroupInput) (*wafv2.DescribeManagedRuleGroupOutput, error) 116 DescribeManagedRuleGroupWithContext(aws.Context, *wafv2.DescribeManagedRuleGroupInput, ...request.Option) (*wafv2.DescribeManagedRuleGroupOutput, error) 117 DescribeManagedRuleGroupRequest(*wafv2.DescribeManagedRuleGroupInput) (*request.Request, *wafv2.DescribeManagedRuleGroupOutput) 118 119 DisassociateWebACL(*wafv2.DisassociateWebACLInput) (*wafv2.DisassociateWebACLOutput, error) 120 DisassociateWebACLWithContext(aws.Context, *wafv2.DisassociateWebACLInput, ...request.Option) (*wafv2.DisassociateWebACLOutput, error) 121 DisassociateWebACLRequest(*wafv2.DisassociateWebACLInput) (*request.Request, *wafv2.DisassociateWebACLOutput) 122 123 GetIPSet(*wafv2.GetIPSetInput) (*wafv2.GetIPSetOutput, error) 124 GetIPSetWithContext(aws.Context, *wafv2.GetIPSetInput, ...request.Option) (*wafv2.GetIPSetOutput, error) 125 GetIPSetRequest(*wafv2.GetIPSetInput) (*request.Request, *wafv2.GetIPSetOutput) 126 127 GetLoggingConfiguration(*wafv2.GetLoggingConfigurationInput) (*wafv2.GetLoggingConfigurationOutput, error) 128 GetLoggingConfigurationWithContext(aws.Context, *wafv2.GetLoggingConfigurationInput, ...request.Option) (*wafv2.GetLoggingConfigurationOutput, error) 129 GetLoggingConfigurationRequest(*wafv2.GetLoggingConfigurationInput) (*request.Request, *wafv2.GetLoggingConfigurationOutput) 130 131 GetManagedRuleSet(*wafv2.GetManagedRuleSetInput) (*wafv2.GetManagedRuleSetOutput, error) 132 GetManagedRuleSetWithContext(aws.Context, *wafv2.GetManagedRuleSetInput, ...request.Option) (*wafv2.GetManagedRuleSetOutput, error) 133 GetManagedRuleSetRequest(*wafv2.GetManagedRuleSetInput) (*request.Request, *wafv2.GetManagedRuleSetOutput) 134 135 GetPermissionPolicy(*wafv2.GetPermissionPolicyInput) (*wafv2.GetPermissionPolicyOutput, error) 136 GetPermissionPolicyWithContext(aws.Context, *wafv2.GetPermissionPolicyInput, ...request.Option) (*wafv2.GetPermissionPolicyOutput, error) 137 GetPermissionPolicyRequest(*wafv2.GetPermissionPolicyInput) (*request.Request, *wafv2.GetPermissionPolicyOutput) 138 139 GetRateBasedStatementManagedKeys(*wafv2.GetRateBasedStatementManagedKeysInput) (*wafv2.GetRateBasedStatementManagedKeysOutput, error) 140 GetRateBasedStatementManagedKeysWithContext(aws.Context, *wafv2.GetRateBasedStatementManagedKeysInput, ...request.Option) (*wafv2.GetRateBasedStatementManagedKeysOutput, error) 141 GetRateBasedStatementManagedKeysRequest(*wafv2.GetRateBasedStatementManagedKeysInput) (*request.Request, *wafv2.GetRateBasedStatementManagedKeysOutput) 142 143 GetRegexPatternSet(*wafv2.GetRegexPatternSetInput) (*wafv2.GetRegexPatternSetOutput, error) 144 GetRegexPatternSetWithContext(aws.Context, *wafv2.GetRegexPatternSetInput, ...request.Option) (*wafv2.GetRegexPatternSetOutput, error) 145 GetRegexPatternSetRequest(*wafv2.GetRegexPatternSetInput) (*request.Request, *wafv2.GetRegexPatternSetOutput) 146 147 GetRuleGroup(*wafv2.GetRuleGroupInput) (*wafv2.GetRuleGroupOutput, error) 148 GetRuleGroupWithContext(aws.Context, *wafv2.GetRuleGroupInput, ...request.Option) (*wafv2.GetRuleGroupOutput, error) 149 GetRuleGroupRequest(*wafv2.GetRuleGroupInput) (*request.Request, *wafv2.GetRuleGroupOutput) 150 151 GetSampledRequests(*wafv2.GetSampledRequestsInput) (*wafv2.GetSampledRequestsOutput, error) 152 GetSampledRequestsWithContext(aws.Context, *wafv2.GetSampledRequestsInput, ...request.Option) (*wafv2.GetSampledRequestsOutput, error) 153 GetSampledRequestsRequest(*wafv2.GetSampledRequestsInput) (*request.Request, *wafv2.GetSampledRequestsOutput) 154 155 GetWebACL(*wafv2.GetWebACLInput) (*wafv2.GetWebACLOutput, error) 156 GetWebACLWithContext(aws.Context, *wafv2.GetWebACLInput, ...request.Option) (*wafv2.GetWebACLOutput, error) 157 GetWebACLRequest(*wafv2.GetWebACLInput) (*request.Request, *wafv2.GetWebACLOutput) 158 159 GetWebACLForResource(*wafv2.GetWebACLForResourceInput) (*wafv2.GetWebACLForResourceOutput, error) 160 GetWebACLForResourceWithContext(aws.Context, *wafv2.GetWebACLForResourceInput, ...request.Option) (*wafv2.GetWebACLForResourceOutput, error) 161 GetWebACLForResourceRequest(*wafv2.GetWebACLForResourceInput) (*request.Request, *wafv2.GetWebACLForResourceOutput) 162 163 ListAvailableManagedRuleGroupVersions(*wafv2.ListAvailableManagedRuleGroupVersionsInput) (*wafv2.ListAvailableManagedRuleGroupVersionsOutput, error) 164 ListAvailableManagedRuleGroupVersionsWithContext(aws.Context, *wafv2.ListAvailableManagedRuleGroupVersionsInput, ...request.Option) (*wafv2.ListAvailableManagedRuleGroupVersionsOutput, error) 165 ListAvailableManagedRuleGroupVersionsRequest(*wafv2.ListAvailableManagedRuleGroupVersionsInput) (*request.Request, *wafv2.ListAvailableManagedRuleGroupVersionsOutput) 166 167 ListAvailableManagedRuleGroups(*wafv2.ListAvailableManagedRuleGroupsInput) (*wafv2.ListAvailableManagedRuleGroupsOutput, error) 168 ListAvailableManagedRuleGroupsWithContext(aws.Context, *wafv2.ListAvailableManagedRuleGroupsInput, ...request.Option) (*wafv2.ListAvailableManagedRuleGroupsOutput, error) 169 ListAvailableManagedRuleGroupsRequest(*wafv2.ListAvailableManagedRuleGroupsInput) (*request.Request, *wafv2.ListAvailableManagedRuleGroupsOutput) 170 171 ListIPSets(*wafv2.ListIPSetsInput) (*wafv2.ListIPSetsOutput, error) 172 ListIPSetsWithContext(aws.Context, *wafv2.ListIPSetsInput, ...request.Option) (*wafv2.ListIPSetsOutput, error) 173 ListIPSetsRequest(*wafv2.ListIPSetsInput) (*request.Request, *wafv2.ListIPSetsOutput) 174 175 ListLoggingConfigurations(*wafv2.ListLoggingConfigurationsInput) (*wafv2.ListLoggingConfigurationsOutput, error) 176 ListLoggingConfigurationsWithContext(aws.Context, *wafv2.ListLoggingConfigurationsInput, ...request.Option) (*wafv2.ListLoggingConfigurationsOutput, error) 177 ListLoggingConfigurationsRequest(*wafv2.ListLoggingConfigurationsInput) (*request.Request, *wafv2.ListLoggingConfigurationsOutput) 178 179 ListManagedRuleSets(*wafv2.ListManagedRuleSetsInput) (*wafv2.ListManagedRuleSetsOutput, error) 180 ListManagedRuleSetsWithContext(aws.Context, *wafv2.ListManagedRuleSetsInput, ...request.Option) (*wafv2.ListManagedRuleSetsOutput, error) 181 ListManagedRuleSetsRequest(*wafv2.ListManagedRuleSetsInput) (*request.Request, *wafv2.ListManagedRuleSetsOutput) 182 183 ListRegexPatternSets(*wafv2.ListRegexPatternSetsInput) (*wafv2.ListRegexPatternSetsOutput, error) 184 ListRegexPatternSetsWithContext(aws.Context, *wafv2.ListRegexPatternSetsInput, ...request.Option) (*wafv2.ListRegexPatternSetsOutput, error) 185 ListRegexPatternSetsRequest(*wafv2.ListRegexPatternSetsInput) (*request.Request, *wafv2.ListRegexPatternSetsOutput) 186 187 ListResourcesForWebACL(*wafv2.ListResourcesForWebACLInput) (*wafv2.ListResourcesForWebACLOutput, error) 188 ListResourcesForWebACLWithContext(aws.Context, *wafv2.ListResourcesForWebACLInput, ...request.Option) (*wafv2.ListResourcesForWebACLOutput, error) 189 ListResourcesForWebACLRequest(*wafv2.ListResourcesForWebACLInput) (*request.Request, *wafv2.ListResourcesForWebACLOutput) 190 191 ListRuleGroups(*wafv2.ListRuleGroupsInput) (*wafv2.ListRuleGroupsOutput, error) 192 ListRuleGroupsWithContext(aws.Context, *wafv2.ListRuleGroupsInput, ...request.Option) (*wafv2.ListRuleGroupsOutput, error) 193 ListRuleGroupsRequest(*wafv2.ListRuleGroupsInput) (*request.Request, *wafv2.ListRuleGroupsOutput) 194 195 ListTagsForResource(*wafv2.ListTagsForResourceInput) (*wafv2.ListTagsForResourceOutput, error) 196 ListTagsForResourceWithContext(aws.Context, *wafv2.ListTagsForResourceInput, ...request.Option) (*wafv2.ListTagsForResourceOutput, error) 197 ListTagsForResourceRequest(*wafv2.ListTagsForResourceInput) (*request.Request, *wafv2.ListTagsForResourceOutput) 198 199 ListWebACLs(*wafv2.ListWebACLsInput) (*wafv2.ListWebACLsOutput, error) 200 ListWebACLsWithContext(aws.Context, *wafv2.ListWebACLsInput, ...request.Option) (*wafv2.ListWebACLsOutput, error) 201 ListWebACLsRequest(*wafv2.ListWebACLsInput) (*request.Request, *wafv2.ListWebACLsOutput) 202 203 PutLoggingConfiguration(*wafv2.PutLoggingConfigurationInput) (*wafv2.PutLoggingConfigurationOutput, error) 204 PutLoggingConfigurationWithContext(aws.Context, *wafv2.PutLoggingConfigurationInput, ...request.Option) (*wafv2.PutLoggingConfigurationOutput, error) 205 PutLoggingConfigurationRequest(*wafv2.PutLoggingConfigurationInput) (*request.Request, *wafv2.PutLoggingConfigurationOutput) 206 207 PutManagedRuleSetVersions(*wafv2.PutManagedRuleSetVersionsInput) (*wafv2.PutManagedRuleSetVersionsOutput, error) 208 PutManagedRuleSetVersionsWithContext(aws.Context, *wafv2.PutManagedRuleSetVersionsInput, ...request.Option) (*wafv2.PutManagedRuleSetVersionsOutput, error) 209 PutManagedRuleSetVersionsRequest(*wafv2.PutManagedRuleSetVersionsInput) (*request.Request, *wafv2.PutManagedRuleSetVersionsOutput) 210 211 PutPermissionPolicy(*wafv2.PutPermissionPolicyInput) (*wafv2.PutPermissionPolicyOutput, error) 212 PutPermissionPolicyWithContext(aws.Context, *wafv2.PutPermissionPolicyInput, ...request.Option) (*wafv2.PutPermissionPolicyOutput, error) 213 PutPermissionPolicyRequest(*wafv2.PutPermissionPolicyInput) (*request.Request, *wafv2.PutPermissionPolicyOutput) 214 215 TagResource(*wafv2.TagResourceInput) (*wafv2.TagResourceOutput, error) 216 TagResourceWithContext(aws.Context, *wafv2.TagResourceInput, ...request.Option) (*wafv2.TagResourceOutput, error) 217 TagResourceRequest(*wafv2.TagResourceInput) (*request.Request, *wafv2.TagResourceOutput) 218 219 UntagResource(*wafv2.UntagResourceInput) (*wafv2.UntagResourceOutput, error) 220 UntagResourceWithContext(aws.Context, *wafv2.UntagResourceInput, ...request.Option) (*wafv2.UntagResourceOutput, error) 221 UntagResourceRequest(*wafv2.UntagResourceInput) (*request.Request, *wafv2.UntagResourceOutput) 222 223 UpdateIPSet(*wafv2.UpdateIPSetInput) (*wafv2.UpdateIPSetOutput, error) 224 UpdateIPSetWithContext(aws.Context, *wafv2.UpdateIPSetInput, ...request.Option) (*wafv2.UpdateIPSetOutput, error) 225 UpdateIPSetRequest(*wafv2.UpdateIPSetInput) (*request.Request, *wafv2.UpdateIPSetOutput) 226 227 UpdateManagedRuleSetVersionExpiryDate(*wafv2.UpdateManagedRuleSetVersionExpiryDateInput) (*wafv2.UpdateManagedRuleSetVersionExpiryDateOutput, error) 228 UpdateManagedRuleSetVersionExpiryDateWithContext(aws.Context, *wafv2.UpdateManagedRuleSetVersionExpiryDateInput, ...request.Option) (*wafv2.UpdateManagedRuleSetVersionExpiryDateOutput, error) 229 UpdateManagedRuleSetVersionExpiryDateRequest(*wafv2.UpdateManagedRuleSetVersionExpiryDateInput) (*request.Request, *wafv2.UpdateManagedRuleSetVersionExpiryDateOutput) 230 231 UpdateRegexPatternSet(*wafv2.UpdateRegexPatternSetInput) (*wafv2.UpdateRegexPatternSetOutput, error) 232 UpdateRegexPatternSetWithContext(aws.Context, *wafv2.UpdateRegexPatternSetInput, ...request.Option) (*wafv2.UpdateRegexPatternSetOutput, error) 233 UpdateRegexPatternSetRequest(*wafv2.UpdateRegexPatternSetInput) (*request.Request, *wafv2.UpdateRegexPatternSetOutput) 234 235 UpdateRuleGroup(*wafv2.UpdateRuleGroupInput) (*wafv2.UpdateRuleGroupOutput, error) 236 UpdateRuleGroupWithContext(aws.Context, *wafv2.UpdateRuleGroupInput, ...request.Option) (*wafv2.UpdateRuleGroupOutput, error) 237 UpdateRuleGroupRequest(*wafv2.UpdateRuleGroupInput) (*request.Request, *wafv2.UpdateRuleGroupOutput) 238 239 UpdateWebACL(*wafv2.UpdateWebACLInput) (*wafv2.UpdateWebACLOutput, error) 240 UpdateWebACLWithContext(aws.Context, *wafv2.UpdateWebACLInput, ...request.Option) (*wafv2.UpdateWebACLOutput, error) 241 UpdateWebACLRequest(*wafv2.UpdateWebACLInput) (*request.Request, *wafv2.UpdateWebACLOutput) 242 } 243 244 var _ WAFV2API = (*wafv2.WAFV2)(nil)