1// Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT. 2 3// Package ioteventsiface provides an interface to enable mocking the AWS IoT Events 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. 9package ioteventsiface 10 11import ( 12 "github.com/aws/aws-sdk-go/aws" 13 "github.com/aws/aws-sdk-go/aws/request" 14 "github.com/aws/aws-sdk-go/service/iotevents" 15) 16 17// IoTEventsAPI provides an interface to enable mocking the 18// iotevents.IoTEvents 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 IoT Events. 28// func myFunc(svc ioteventsiface.IoTEventsAPI) bool { 29// // Make svc.CreateDetectorModel request 30// } 31// 32// func main() { 33// sess := session.New() 34// svc := iotevents.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 mockIoTEventsClient struct { 43// ioteventsiface.IoTEventsAPI 44// } 45// func (m *mockIoTEventsClient) CreateDetectorModel(input *iotevents.CreateDetectorModelInput) (*iotevents.CreateDetectorModelOutput, error) { 46// // mock response/functionality 47// } 48// 49// func TestMyFunc(t *testing.T) { 50// // Setup Test 51// mockSvc := &mockIoTEventsClient{} 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. 62type IoTEventsAPI interface { 63 CreateDetectorModel(*iotevents.CreateDetectorModelInput) (*iotevents.CreateDetectorModelOutput, error) 64 CreateDetectorModelWithContext(aws.Context, *iotevents.CreateDetectorModelInput, ...request.Option) (*iotevents.CreateDetectorModelOutput, error) 65 CreateDetectorModelRequest(*iotevents.CreateDetectorModelInput) (*request.Request, *iotevents.CreateDetectorModelOutput) 66 67 CreateInput(*iotevents.CreateInputInput) (*iotevents.CreateInputOutput, error) 68 CreateInputWithContext(aws.Context, *iotevents.CreateInputInput, ...request.Option) (*iotevents.CreateInputOutput, error) 69 CreateInputRequest(*iotevents.CreateInputInput) (*request.Request, *iotevents.CreateInputOutput) 70 71 DeleteDetectorModel(*iotevents.DeleteDetectorModelInput) (*iotevents.DeleteDetectorModelOutput, error) 72 DeleteDetectorModelWithContext(aws.Context, *iotevents.DeleteDetectorModelInput, ...request.Option) (*iotevents.DeleteDetectorModelOutput, error) 73 DeleteDetectorModelRequest(*iotevents.DeleteDetectorModelInput) (*request.Request, *iotevents.DeleteDetectorModelOutput) 74 75 DeleteInput(*iotevents.DeleteInputInput) (*iotevents.DeleteInputOutput, error) 76 DeleteInputWithContext(aws.Context, *iotevents.DeleteInputInput, ...request.Option) (*iotevents.DeleteInputOutput, error) 77 DeleteInputRequest(*iotevents.DeleteInputInput) (*request.Request, *iotevents.DeleteInputOutput) 78 79 DescribeDetectorModel(*iotevents.DescribeDetectorModelInput) (*iotevents.DescribeDetectorModelOutput, error) 80 DescribeDetectorModelWithContext(aws.Context, *iotevents.DescribeDetectorModelInput, ...request.Option) (*iotevents.DescribeDetectorModelOutput, error) 81 DescribeDetectorModelRequest(*iotevents.DescribeDetectorModelInput) (*request.Request, *iotevents.DescribeDetectorModelOutput) 82 83 DescribeInput(*iotevents.DescribeInputInput) (*iotevents.DescribeInputOutput, error) 84 DescribeInputWithContext(aws.Context, *iotevents.DescribeInputInput, ...request.Option) (*iotevents.DescribeInputOutput, error) 85 DescribeInputRequest(*iotevents.DescribeInputInput) (*request.Request, *iotevents.DescribeInputOutput) 86 87 DescribeLoggingOptions(*iotevents.DescribeLoggingOptionsInput) (*iotevents.DescribeLoggingOptionsOutput, error) 88 DescribeLoggingOptionsWithContext(aws.Context, *iotevents.DescribeLoggingOptionsInput, ...request.Option) (*iotevents.DescribeLoggingOptionsOutput, error) 89 DescribeLoggingOptionsRequest(*iotevents.DescribeLoggingOptionsInput) (*request.Request, *iotevents.DescribeLoggingOptionsOutput) 90 91 ListDetectorModelVersions(*iotevents.ListDetectorModelVersionsInput) (*iotevents.ListDetectorModelVersionsOutput, error) 92 ListDetectorModelVersionsWithContext(aws.Context, *iotevents.ListDetectorModelVersionsInput, ...request.Option) (*iotevents.ListDetectorModelVersionsOutput, error) 93 ListDetectorModelVersionsRequest(*iotevents.ListDetectorModelVersionsInput) (*request.Request, *iotevents.ListDetectorModelVersionsOutput) 94 95 ListDetectorModels(*iotevents.ListDetectorModelsInput) (*iotevents.ListDetectorModelsOutput, error) 96 ListDetectorModelsWithContext(aws.Context, *iotevents.ListDetectorModelsInput, ...request.Option) (*iotevents.ListDetectorModelsOutput, error) 97 ListDetectorModelsRequest(*iotevents.ListDetectorModelsInput) (*request.Request, *iotevents.ListDetectorModelsOutput) 98 99 ListInputs(*iotevents.ListInputsInput) (*iotevents.ListInputsOutput, error) 100 ListInputsWithContext(aws.Context, *iotevents.ListInputsInput, ...request.Option) (*iotevents.ListInputsOutput, error) 101 ListInputsRequest(*iotevents.ListInputsInput) (*request.Request, *iotevents.ListInputsOutput) 102 103 ListTagsForResource(*iotevents.ListTagsForResourceInput) (*iotevents.ListTagsForResourceOutput, error) 104 ListTagsForResourceWithContext(aws.Context, *iotevents.ListTagsForResourceInput, ...request.Option) (*iotevents.ListTagsForResourceOutput, error) 105 ListTagsForResourceRequest(*iotevents.ListTagsForResourceInput) (*request.Request, *iotevents.ListTagsForResourceOutput) 106 107 PutLoggingOptions(*iotevents.PutLoggingOptionsInput) (*iotevents.PutLoggingOptionsOutput, error) 108 PutLoggingOptionsWithContext(aws.Context, *iotevents.PutLoggingOptionsInput, ...request.Option) (*iotevents.PutLoggingOptionsOutput, error) 109 PutLoggingOptionsRequest(*iotevents.PutLoggingOptionsInput) (*request.Request, *iotevents.PutLoggingOptionsOutput) 110 111 TagResource(*iotevents.TagResourceInput) (*iotevents.TagResourceOutput, error) 112 TagResourceWithContext(aws.Context, *iotevents.TagResourceInput, ...request.Option) (*iotevents.TagResourceOutput, error) 113 TagResourceRequest(*iotevents.TagResourceInput) (*request.Request, *iotevents.TagResourceOutput) 114 115 UntagResource(*iotevents.UntagResourceInput) (*iotevents.UntagResourceOutput, error) 116 UntagResourceWithContext(aws.Context, *iotevents.UntagResourceInput, ...request.Option) (*iotevents.UntagResourceOutput, error) 117 UntagResourceRequest(*iotevents.UntagResourceInput) (*request.Request, *iotevents.UntagResourceOutput) 118 119 UpdateDetectorModel(*iotevents.UpdateDetectorModelInput) (*iotevents.UpdateDetectorModelOutput, error) 120 UpdateDetectorModelWithContext(aws.Context, *iotevents.UpdateDetectorModelInput, ...request.Option) (*iotevents.UpdateDetectorModelOutput, error) 121 UpdateDetectorModelRequest(*iotevents.UpdateDetectorModelInput) (*request.Request, *iotevents.UpdateDetectorModelOutput) 122 123 UpdateInput(*iotevents.UpdateInputInput) (*iotevents.UpdateInputOutput, error) 124 UpdateInputWithContext(aws.Context, *iotevents.UpdateInputInput, ...request.Option) (*iotevents.UpdateInputOutput, error) 125 UpdateInputRequest(*iotevents.UpdateInputInput) (*request.Request, *iotevents.UpdateInputOutput) 126} 127 128var _ IoTEventsAPI = (*iotevents.IoTEvents)(nil) 129