| 1 |
// Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT. |
| 2 |
|
| 3 |
// Package pipesiface provides an interface to enable mocking the Amazon EventBridge Pipes 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 pipesiface |
| 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/pipes" |
| 15 |
) |
| 16 |
|
| 17 |
// PipesAPI provides an interface to enable mocking the |
| 18 |
// pipes.Pipes 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 EventBridge Pipes. |
| 28 |
// func myFunc(svc pipesiface.PipesAPI) bool { |
| 29 |
// // Make svc.CreatePipe request |
| 30 |
// } |
| 31 |
// |
| 32 |
// func main() { |
| 33 |
// sess := session.New() |
| 34 |
// svc := pipes.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 mockPipesClient struct { |
| 43 |
// pipesiface.PipesAPI |
| 44 |
// } |
| 45 |
// func (m *mockPipesClient) CreatePipe(input *pipes.CreatePipeInput) (*pipes.CreatePipeOutput, error) { |
| 46 |
// // mock response/functionality |
| 47 |
// } |
| 48 |
// |
| 49 |
// func TestMyFunc(t *testing.T) { |
| 50 |
// // Setup Test |
| 51 |
// mockSvc := &mockPipesClient{} |
| 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 PipesAPI interface { |
| 63 |
CreatePipe(*pipes.CreatePipeInput) (*pipes.CreatePipeOutput, error) |
| 64 |
CreatePipeWithContext(aws.Context, *pipes.CreatePipeInput, ...request.Option) (*pipes.CreatePipeOutput, error) |
| 65 |
CreatePipeRequest(*pipes.CreatePipeInput) (*request.Request, *pipes.CreatePipeOutput) |
| 66 |
|
| 67 |
DeletePipe(*pipes.DeletePipeInput) (*pipes.DeletePipeOutput, error) |
| 68 |
DeletePipeWithContext(aws.Context, *pipes.DeletePipeInput, ...request.Option) (*pipes.DeletePipeOutput, error) |
| 69 |
DeletePipeRequest(*pipes.DeletePipeInput) (*request.Request, *pipes.DeletePipeOutput) |
| 70 |
|
| 71 |
DescribePipe(*pipes.DescribePipeInput) (*pipes.DescribePipeOutput, error) |
| 72 |
DescribePipeWithContext(aws.Context, *pipes.DescribePipeInput, ...request.Option) (*pipes.DescribePipeOutput, error) |
| 73 |
DescribePipeRequest(*pipes.DescribePipeInput) (*request.Request, *pipes.DescribePipeOutput) |
| 74 |
|
| 75 |
ListPipes(*pipes.ListPipesInput) (*pipes.ListPipesOutput, error) |
| 76 |
ListPipesWithContext(aws.Context, *pipes.ListPipesInput, ...request.Option) (*pipes.ListPipesOutput, error) |
| 77 |
ListPipesRequest(*pipes.ListPipesInput) (*request.Request, *pipes.ListPipesOutput) |
| 78 |
|
| 79 |
ListPipesPages(*pipes.ListPipesInput, func(*pipes.ListPipesOutput, bool) bool) error |
| 80 |
ListPipesPagesWithContext(aws.Context, *pipes.ListPipesInput, func(*pipes.ListPipesOutput, bool) bool, ...request.Option) error |
| 81 |
|
| 82 |
ListTagsForResource(*pipes.ListTagsForResourceInput) (*pipes.ListTagsForResourceOutput, error) |
| 83 |
ListTagsForResourceWithContext(aws.Context, *pipes.ListTagsForResourceInput, ...request.Option) (*pipes.ListTagsForResourceOutput, error) |
| 84 |
ListTagsForResourceRequest(*pipes.ListTagsForResourceInput) (*request.Request, *pipes.ListTagsForResourceOutput) |
| 85 |
|
| 86 |
StartPipe(*pipes.StartPipeInput) (*pipes.StartPipeOutput, error) |
| 87 |
StartPipeWithContext(aws.Context, *pipes.StartPipeInput, ...request.Option) (*pipes.StartPipeOutput, error) |
| 88 |
StartPipeRequest(*pipes.StartPipeInput) (*request.Request, *pipes.StartPipeOutput) |
| 89 |
|
| 90 |
StopPipe(*pipes.StopPipeInput) (*pipes.StopPipeOutput, error) |
| 91 |
StopPipeWithContext(aws.Context, *pipes.StopPipeInput, ...request.Option) (*pipes.StopPipeOutput, error) |
| 92 |
StopPipeRequest(*pipes.StopPipeInput) (*request.Request, *pipes.StopPipeOutput) |
| 93 |
|
| 94 |
TagResource(*pipes.TagResourceInput) (*pipes.TagResourceOutput, error) |
| 95 |
TagResourceWithContext(aws.Context, *pipes.TagResourceInput, ...request.Option) (*pipes.TagResourceOutput, error) |
| 96 |
TagResourceRequest(*pipes.TagResourceInput) (*request.Request, *pipes.TagResourceOutput) |
| 97 |
|
| 98 |
UntagResource(*pipes.UntagResourceInput) (*pipes.UntagResourceOutput, error) |
| 99 |
UntagResourceWithContext(aws.Context, *pipes.UntagResourceInput, ...request.Option) (*pipes.UntagResourceOutput, error) |
| 100 |
UntagResourceRequest(*pipes.UntagResourceInput) (*request.Request, *pipes.UntagResourceOutput) |
| 101 |
|
| 102 |
UpdatePipe(*pipes.UpdatePipeInput) (*pipes.UpdatePipeOutput, error) |
| 103 |
UpdatePipeWithContext(aws.Context, *pipes.UpdatePipeInput, ...request.Option) (*pipes.UpdatePipeOutput, error) |
| 104 |
UpdatePipeRequest(*pipes.UpdatePipeInput) (*request.Request, *pipes.UpdatePipeOutput) |
| 105 |
} |
| 106 |
|
| 107 |
var _ PipesAPI = (*pipes.Pipes)(nil) |