github.com/aavshr/aws-sdk-go@v1.41.3/service/iotevents/ioteventsiface/interface.go (about) 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. 9 package ioteventsiface 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/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.CreateAlarmModel 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) CreateAlarmModel(input *iotevents.CreateAlarmModelInput) (*iotevents.CreateAlarmModelOutput, 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. 62 type IoTEventsAPI interface { 63 CreateAlarmModel(*iotevents.CreateAlarmModelInput) (*iotevents.CreateAlarmModelOutput, error) 64 CreateAlarmModelWithContext(aws.Context, *iotevents.CreateAlarmModelInput, ...request.Option) (*iotevents.CreateAlarmModelOutput, error) 65 CreateAlarmModelRequest(*iotevents.CreateAlarmModelInput) (*request.Request, *iotevents.CreateAlarmModelOutput) 66 67 CreateDetectorModel(*iotevents.CreateDetectorModelInput) (*iotevents.CreateDetectorModelOutput, error) 68 CreateDetectorModelWithContext(aws.Context, *iotevents.CreateDetectorModelInput, ...request.Option) (*iotevents.CreateDetectorModelOutput, error) 69 CreateDetectorModelRequest(*iotevents.CreateDetectorModelInput) (*request.Request, *iotevents.CreateDetectorModelOutput) 70 71 CreateInput(*iotevents.CreateInputInput) (*iotevents.CreateInputOutput, error) 72 CreateInputWithContext(aws.Context, *iotevents.CreateInputInput, ...request.Option) (*iotevents.CreateInputOutput, error) 73 CreateInputRequest(*iotevents.CreateInputInput) (*request.Request, *iotevents.CreateInputOutput) 74 75 DeleteAlarmModel(*iotevents.DeleteAlarmModelInput) (*iotevents.DeleteAlarmModelOutput, error) 76 DeleteAlarmModelWithContext(aws.Context, *iotevents.DeleteAlarmModelInput, ...request.Option) (*iotevents.DeleteAlarmModelOutput, error) 77 DeleteAlarmModelRequest(*iotevents.DeleteAlarmModelInput) (*request.Request, *iotevents.DeleteAlarmModelOutput) 78 79 DeleteDetectorModel(*iotevents.DeleteDetectorModelInput) (*iotevents.DeleteDetectorModelOutput, error) 80 DeleteDetectorModelWithContext(aws.Context, *iotevents.DeleteDetectorModelInput, ...request.Option) (*iotevents.DeleteDetectorModelOutput, error) 81 DeleteDetectorModelRequest(*iotevents.DeleteDetectorModelInput) (*request.Request, *iotevents.DeleteDetectorModelOutput) 82 83 DeleteInput(*iotevents.DeleteInputInput) (*iotevents.DeleteInputOutput, error) 84 DeleteInputWithContext(aws.Context, *iotevents.DeleteInputInput, ...request.Option) (*iotevents.DeleteInputOutput, error) 85 DeleteInputRequest(*iotevents.DeleteInputInput) (*request.Request, *iotevents.DeleteInputOutput) 86 87 DescribeAlarmModel(*iotevents.DescribeAlarmModelInput) (*iotevents.DescribeAlarmModelOutput, error) 88 DescribeAlarmModelWithContext(aws.Context, *iotevents.DescribeAlarmModelInput, ...request.Option) (*iotevents.DescribeAlarmModelOutput, error) 89 DescribeAlarmModelRequest(*iotevents.DescribeAlarmModelInput) (*request.Request, *iotevents.DescribeAlarmModelOutput) 90 91 DescribeDetectorModel(*iotevents.DescribeDetectorModelInput) (*iotevents.DescribeDetectorModelOutput, error) 92 DescribeDetectorModelWithContext(aws.Context, *iotevents.DescribeDetectorModelInput, ...request.Option) (*iotevents.DescribeDetectorModelOutput, error) 93 DescribeDetectorModelRequest(*iotevents.DescribeDetectorModelInput) (*request.Request, *iotevents.DescribeDetectorModelOutput) 94 95 DescribeDetectorModelAnalysis(*iotevents.DescribeDetectorModelAnalysisInput) (*iotevents.DescribeDetectorModelAnalysisOutput, error) 96 DescribeDetectorModelAnalysisWithContext(aws.Context, *iotevents.DescribeDetectorModelAnalysisInput, ...request.Option) (*iotevents.DescribeDetectorModelAnalysisOutput, error) 97 DescribeDetectorModelAnalysisRequest(*iotevents.DescribeDetectorModelAnalysisInput) (*request.Request, *iotevents.DescribeDetectorModelAnalysisOutput) 98 99 DescribeInput(*iotevents.DescribeInputInput) (*iotevents.DescribeInputOutput, error) 100 DescribeInputWithContext(aws.Context, *iotevents.DescribeInputInput, ...request.Option) (*iotevents.DescribeInputOutput, error) 101 DescribeInputRequest(*iotevents.DescribeInputInput) (*request.Request, *iotevents.DescribeInputOutput) 102 103 DescribeLoggingOptions(*iotevents.DescribeLoggingOptionsInput) (*iotevents.DescribeLoggingOptionsOutput, error) 104 DescribeLoggingOptionsWithContext(aws.Context, *iotevents.DescribeLoggingOptionsInput, ...request.Option) (*iotevents.DescribeLoggingOptionsOutput, error) 105 DescribeLoggingOptionsRequest(*iotevents.DescribeLoggingOptionsInput) (*request.Request, *iotevents.DescribeLoggingOptionsOutput) 106 107 GetDetectorModelAnalysisResults(*iotevents.GetDetectorModelAnalysisResultsInput) (*iotevents.GetDetectorModelAnalysisResultsOutput, error) 108 GetDetectorModelAnalysisResultsWithContext(aws.Context, *iotevents.GetDetectorModelAnalysisResultsInput, ...request.Option) (*iotevents.GetDetectorModelAnalysisResultsOutput, error) 109 GetDetectorModelAnalysisResultsRequest(*iotevents.GetDetectorModelAnalysisResultsInput) (*request.Request, *iotevents.GetDetectorModelAnalysisResultsOutput) 110 111 ListAlarmModelVersions(*iotevents.ListAlarmModelVersionsInput) (*iotevents.ListAlarmModelVersionsOutput, error) 112 ListAlarmModelVersionsWithContext(aws.Context, *iotevents.ListAlarmModelVersionsInput, ...request.Option) (*iotevents.ListAlarmModelVersionsOutput, error) 113 ListAlarmModelVersionsRequest(*iotevents.ListAlarmModelVersionsInput) (*request.Request, *iotevents.ListAlarmModelVersionsOutput) 114 115 ListAlarmModels(*iotevents.ListAlarmModelsInput) (*iotevents.ListAlarmModelsOutput, error) 116 ListAlarmModelsWithContext(aws.Context, *iotevents.ListAlarmModelsInput, ...request.Option) (*iotevents.ListAlarmModelsOutput, error) 117 ListAlarmModelsRequest(*iotevents.ListAlarmModelsInput) (*request.Request, *iotevents.ListAlarmModelsOutput) 118 119 ListDetectorModelVersions(*iotevents.ListDetectorModelVersionsInput) (*iotevents.ListDetectorModelVersionsOutput, error) 120 ListDetectorModelVersionsWithContext(aws.Context, *iotevents.ListDetectorModelVersionsInput, ...request.Option) (*iotevents.ListDetectorModelVersionsOutput, error) 121 ListDetectorModelVersionsRequest(*iotevents.ListDetectorModelVersionsInput) (*request.Request, *iotevents.ListDetectorModelVersionsOutput) 122 123 ListDetectorModels(*iotevents.ListDetectorModelsInput) (*iotevents.ListDetectorModelsOutput, error) 124 ListDetectorModelsWithContext(aws.Context, *iotevents.ListDetectorModelsInput, ...request.Option) (*iotevents.ListDetectorModelsOutput, error) 125 ListDetectorModelsRequest(*iotevents.ListDetectorModelsInput) (*request.Request, *iotevents.ListDetectorModelsOutput) 126 127 ListInputRoutings(*iotevents.ListInputRoutingsInput) (*iotevents.ListInputRoutingsOutput, error) 128 ListInputRoutingsWithContext(aws.Context, *iotevents.ListInputRoutingsInput, ...request.Option) (*iotevents.ListInputRoutingsOutput, error) 129 ListInputRoutingsRequest(*iotevents.ListInputRoutingsInput) (*request.Request, *iotevents.ListInputRoutingsOutput) 130 131 ListInputs(*iotevents.ListInputsInput) (*iotevents.ListInputsOutput, error) 132 ListInputsWithContext(aws.Context, *iotevents.ListInputsInput, ...request.Option) (*iotevents.ListInputsOutput, error) 133 ListInputsRequest(*iotevents.ListInputsInput) (*request.Request, *iotevents.ListInputsOutput) 134 135 ListTagsForResource(*iotevents.ListTagsForResourceInput) (*iotevents.ListTagsForResourceOutput, error) 136 ListTagsForResourceWithContext(aws.Context, *iotevents.ListTagsForResourceInput, ...request.Option) (*iotevents.ListTagsForResourceOutput, error) 137 ListTagsForResourceRequest(*iotevents.ListTagsForResourceInput) (*request.Request, *iotevents.ListTagsForResourceOutput) 138 139 PutLoggingOptions(*iotevents.PutLoggingOptionsInput) (*iotevents.PutLoggingOptionsOutput, error) 140 PutLoggingOptionsWithContext(aws.Context, *iotevents.PutLoggingOptionsInput, ...request.Option) (*iotevents.PutLoggingOptionsOutput, error) 141 PutLoggingOptionsRequest(*iotevents.PutLoggingOptionsInput) (*request.Request, *iotevents.PutLoggingOptionsOutput) 142 143 StartDetectorModelAnalysis(*iotevents.StartDetectorModelAnalysisInput) (*iotevents.StartDetectorModelAnalysisOutput, error) 144 StartDetectorModelAnalysisWithContext(aws.Context, *iotevents.StartDetectorModelAnalysisInput, ...request.Option) (*iotevents.StartDetectorModelAnalysisOutput, error) 145 StartDetectorModelAnalysisRequest(*iotevents.StartDetectorModelAnalysisInput) (*request.Request, *iotevents.StartDetectorModelAnalysisOutput) 146 147 TagResource(*iotevents.TagResourceInput) (*iotevents.TagResourceOutput, error) 148 TagResourceWithContext(aws.Context, *iotevents.TagResourceInput, ...request.Option) (*iotevents.TagResourceOutput, error) 149 TagResourceRequest(*iotevents.TagResourceInput) (*request.Request, *iotevents.TagResourceOutput) 150 151 UntagResource(*iotevents.UntagResourceInput) (*iotevents.UntagResourceOutput, error) 152 UntagResourceWithContext(aws.Context, *iotevents.UntagResourceInput, ...request.Option) (*iotevents.UntagResourceOutput, error) 153 UntagResourceRequest(*iotevents.UntagResourceInput) (*request.Request, *iotevents.UntagResourceOutput) 154 155 UpdateAlarmModel(*iotevents.UpdateAlarmModelInput) (*iotevents.UpdateAlarmModelOutput, error) 156 UpdateAlarmModelWithContext(aws.Context, *iotevents.UpdateAlarmModelInput, ...request.Option) (*iotevents.UpdateAlarmModelOutput, error) 157 UpdateAlarmModelRequest(*iotevents.UpdateAlarmModelInput) (*request.Request, *iotevents.UpdateAlarmModelOutput) 158 159 UpdateDetectorModel(*iotevents.UpdateDetectorModelInput) (*iotevents.UpdateDetectorModelOutput, error) 160 UpdateDetectorModelWithContext(aws.Context, *iotevents.UpdateDetectorModelInput, ...request.Option) (*iotevents.UpdateDetectorModelOutput, error) 161 UpdateDetectorModelRequest(*iotevents.UpdateDetectorModelInput) (*request.Request, *iotevents.UpdateDetectorModelOutput) 162 163 UpdateInput(*iotevents.UpdateInputInput) (*iotevents.UpdateInputOutput, error) 164 UpdateInputWithContext(aws.Context, *iotevents.UpdateInputInput, ...request.Option) (*iotevents.UpdateInputOutput, error) 165 UpdateInputRequest(*iotevents.UpdateInputInput) (*request.Request, *iotevents.UpdateInputOutput) 166 } 167 168 var _ IoTEventsAPI = (*iotevents.IoTEvents)(nil)