2019-04-08 18:47:15 +00:00
|
|
|
package mock
|
|
|
|
|
|
|
|
|
|
import (
|
2025-06-30 20:45:39 +00:00
|
|
|
"context"
|
2019-04-08 18:47:15 +00:00
|
|
|
|
2025-06-30 20:45:39 +00:00
|
|
|
"github.com/aws/aws-sdk-go-v2/service/firehose"
|
|
|
|
|
)
|
2019-04-08 18:47:15 +00:00
|
|
|
|
2025-06-30 20:45:39 +00:00
|
|
|
type (
|
|
|
|
|
PutRecordBatchFunc func(context.Context, *firehose.PutRecordBatchInput, ...func(*firehose.Options)) (*firehose.PutRecordBatchOutput, error)
|
|
|
|
|
DescribeDeliveryStreamFunc func(context.Context, *firehose.DescribeDeliveryStreamInput, ...func(*firehose.Options)) (*firehose.DescribeDeliveryStreamOutput, error)
|
2019-04-08 18:47:15 +00:00
|
|
|
|
2025-06-30 20:45:39 +00:00
|
|
|
FirehoseMock struct {
|
|
|
|
|
PutRecordBatchFunc PutRecordBatchFunc
|
|
|
|
|
PutRecordBatchFuncInvoked bool
|
|
|
|
|
DescribeDeliveryStreamFunc DescribeDeliveryStreamFunc
|
|
|
|
|
DescribeDeliveryStreamFuncInvoked bool
|
|
|
|
|
}
|
|
|
|
|
)
|
2019-04-08 18:47:15 +00:00
|
|
|
|
2025-06-30 20:45:39 +00:00
|
|
|
func (f *FirehoseMock) PutRecordBatch(ctx context.Context, input *firehose.PutRecordBatchInput, optFns ...func(*firehose.Options)) (*firehose.PutRecordBatchOutput, error) {
|
2019-04-08 18:47:15 +00:00
|
|
|
f.PutRecordBatchFuncInvoked = true
|
2025-06-30 20:45:39 +00:00
|
|
|
return f.PutRecordBatchFunc(ctx, input, optFns...)
|
2019-04-08 18:47:15 +00:00
|
|
|
}
|
|
|
|
|
|
2025-06-30 20:45:39 +00:00
|
|
|
func (f *FirehoseMock) DescribeDeliveryStream(ctx context.Context, input *firehose.DescribeDeliveryStreamInput, optFns ...func(*firehose.Options)) (*firehose.DescribeDeliveryStreamOutput, error) {
|
2019-04-08 18:47:15 +00:00
|
|
|
f.DescribeDeliveryStreamFuncInvoked = true
|
2025-06-30 20:45:39 +00:00
|
|
|
return f.DescribeDeliveryStreamFunc(ctx, input, optFns...)
|
2019-04-08 18:47:15 +00:00
|
|
|
}
|