| 1 |
// Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT. |
| 2 |
|
| 3 |
// Package firehoseiface provides an interface to enable mocking the Amazon Kinesis Firehose 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 firehoseiface |
| 10 |
|
| 11 |
import ( |
| 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/firehose" |
| 15 |
) |
| 16 |
|
| 17 |
// FirehoseAPI provides an interface to enable mocking the |
| 18 |
// firehose.Firehose 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 |
// // Amazon Kinesis Firehose. |
| 28 |
// func myFunc(svc firehoseiface.FirehoseAPI) bool { |
| 29 |
// // Make svc.CreateDeliveryStream request |
| 30 |
// } |
| 31 |
// |
| 32 |
// func main() { |
| 33 |
// sess := session.New() |
| 34 |
// svc := firehose.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 mockFirehoseClient struct { |
| 43 |
// firehoseiface.FirehoseAPI |
| 44 |
// } |
| 45 |
// func (m *mockFirehoseClient) CreateDeliveryStream(input *firehose.CreateDeliveryStreamInput) (*firehose.CreateDeliveryStreamOutput, error) { |
| 46 |
// // mock response/functionality |
| 47 |
// } |
| 48 |
// |
| 49 |
// func TestMyFunc(t *testing.T) { |
| 50 |
// // Setup Test |
| 51 |
// mockSvc := &mockFirehoseClient{} |
| 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 FirehoseAPI interface { |
| 63 |
CreateDeliveryStream(*firehose.CreateDeliveryStreamInput) (*firehose.CreateDeliveryStreamOutput, error) |
| 64 |
CreateDeliveryStreamWithContext(aws.Context, *firehose.CreateDeliveryStreamInput, ...request.Option) (*firehose.CreateDeliveryStreamOutput, error) |
| 65 |
CreateDeliveryStreamRequest(*firehose.CreateDeliveryStreamInput) (*request.Request, *firehose.CreateDeliveryStreamOutput) |
| 66 |
|
| 67 |
DeleteDeliveryStream(*firehose.DeleteDeliveryStreamInput) (*firehose.DeleteDeliveryStreamOutput, error) |
| 68 |
DeleteDeliveryStreamWithContext(aws.Context, *firehose.DeleteDeliveryStreamInput, ...request.Option) (*firehose.DeleteDeliveryStreamOutput, error) |
| 69 |
DeleteDeliveryStreamRequest(*firehose.DeleteDeliveryStreamInput) (*request.Request, *firehose.DeleteDeliveryStreamOutput) |
| 70 |
|
| 71 |
DescribeDeliveryStream(*firehose.DescribeDeliveryStreamInput) (*firehose.DescribeDeliveryStreamOutput, error) |
| 72 |
DescribeDeliveryStreamWithContext(aws.Context, *firehose.DescribeDeliveryStreamInput, ...request.Option) (*firehose.DescribeDeliveryStreamOutput, error) |
| 73 |
DescribeDeliveryStreamRequest(*firehose.DescribeDeliveryStreamInput) (*request.Request, *firehose.DescribeDeliveryStreamOutput) |
| 74 |
|
| 75 |
ListDeliveryStreams(*firehose.ListDeliveryStreamsInput) (*firehose.ListDeliveryStreamsOutput, error) |
| 76 |
ListDeliveryStreamsWithContext(aws.Context, *firehose.ListDeliveryStreamsInput, ...request.Option) (*firehose.ListDeliveryStreamsOutput, error) |
| 77 |
ListDeliveryStreamsRequest(*firehose.ListDeliveryStreamsInput) (*request.Request, *firehose.ListDeliveryStreamsOutput) |
| 78 |
|
| 79 |
ListTagsForDeliveryStream(*firehose.ListTagsForDeliveryStreamInput) (*firehose.ListTagsForDeliveryStreamOutput, error) |
| 80 |
ListTagsForDeliveryStreamWithContext(aws.Context, *firehose.ListTagsForDeliveryStreamInput, ...request.Option) (*firehose.ListTagsForDeliveryStreamOutput, error) |
| 81 |
ListTagsForDeliveryStreamRequest(*firehose.ListTagsForDeliveryStreamInput) (*request.Request, *firehose.ListTagsForDeliveryStreamOutput) |
| 82 |
|
| 83 |
PutRecord(*firehose.PutRecordInput) (*firehose.PutRecordOutput, error) |
| 84 |
PutRecordWithContext(aws.Context, *firehose.PutRecordInput, ...request.Option) (*firehose.PutRecordOutput, error) |
| 85 |
PutRecordRequest(*firehose.PutRecordInput) (*request.Request, *firehose.PutRecordOutput) |
| 86 |
|
| 87 |
PutRecordBatch(*firehose.PutRecordBatchInput) (*firehose.PutRecordBatchOutput, error) |
| 88 |
PutRecordBatchWithContext(aws.Context, *firehose.PutRecordBatchInput, ...request.Option) (*firehose.PutRecordBatchOutput, error) |
| 89 |
PutRecordBatchRequest(*firehose.PutRecordBatchInput) (*request.Request, *firehose.PutRecordBatchOutput) |
| 90 |
|
| 91 |
StartDeliveryStreamEncryption(*firehose.StartDeliveryStreamEncryptionInput) (*firehose.StartDeliveryStreamEncryptionOutput, error) |
| 92 |
StartDeliveryStreamEncryptionWithContext(aws.Context, *firehose.StartDeliveryStreamEncryptionInput, ...request.Option) (*firehose.StartDeliveryStreamEncryptionOutput, error) |
| 93 |
StartDeliveryStreamEncryptionRequest(*firehose.StartDeliveryStreamEncryptionInput) (*request.Request, *firehose.StartDeliveryStreamEncryptionOutput) |
| 94 |
|
| 95 |
StopDeliveryStreamEncryption(*firehose.StopDeliveryStreamEncryptionInput) (*firehose.StopDeliveryStreamEncryptionOutput, error) |
| 96 |
StopDeliveryStreamEncryptionWithContext(aws.Context, *firehose.StopDeliveryStreamEncryptionInput, ...request.Option) (*firehose.StopDeliveryStreamEncryptionOutput, error) |
| 97 |
StopDeliveryStreamEncryptionRequest(*firehose.StopDeliveryStreamEncryptionInput) (*request.Request, *firehose.StopDeliveryStreamEncryptionOutput) |
| 98 |
|
| 99 |
TagDeliveryStream(*firehose.TagDeliveryStreamInput) (*firehose.TagDeliveryStreamOutput, error) |
| 100 |
TagDeliveryStreamWithContext(aws.Context, *firehose.TagDeliveryStreamInput, ...request.Option) (*firehose.TagDeliveryStreamOutput, error) |
| 101 |
TagDeliveryStreamRequest(*firehose.TagDeliveryStreamInput) (*request.Request, *firehose.TagDeliveryStreamOutput) |
| 102 |
|
| 103 |
UntagDeliveryStream(*firehose.UntagDeliveryStreamInput) (*firehose.UntagDeliveryStreamOutput, error) |
| 104 |
UntagDeliveryStreamWithContext(aws.Context, *firehose.UntagDeliveryStreamInput, ...request.Option) (*firehose.UntagDeliveryStreamOutput, error) |
| 105 |
UntagDeliveryStreamRequest(*firehose.UntagDeliveryStreamInput) (*request.Request, *firehose.UntagDeliveryStreamOutput) |
| 106 |
|
| 107 |
UpdateDestination(*firehose.UpdateDestinationInput) (*firehose.UpdateDestinationOutput, error) |
| 108 |
UpdateDestinationWithContext(aws.Context, *firehose.UpdateDestinationInput, ...request.Option) (*firehose.UpdateDestinationOutput, error) |
| 109 |
UpdateDestinationRequest(*firehose.UpdateDestinationInput) (*request.Request, *firehose.UpdateDestinationOutput) |
| 110 |
} |
| 111 |
|
| 112 |
var _ FirehoseAPI = (*firehose.Firehose)(nil) |