1// Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT. 2 3// Package healthiface provides an interface to enable mocking the AWS Health APIs and Notifications 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 healthiface 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/health" 15) 16 17// HealthAPI provides an interface to enable mocking the 18// health.Health 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 Health APIs and Notifications. 28// func myFunc(svc healthiface.HealthAPI) bool { 29// // Make svc.DescribeAffectedEntities request 30// } 31// 32// func main() { 33// sess := session.New() 34// svc := health.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 mockHealthClient struct { 43// healthiface.HealthAPI 44// } 45// func (m *mockHealthClient) DescribeAffectedEntities(input *health.DescribeAffectedEntitiesInput) (*health.DescribeAffectedEntitiesOutput, error) { 46// // mock response/functionality 47// } 48// 49// func TestMyFunc(t *testing.T) { 50// // Setup Test 51// mockSvc := &mockHealthClient{} 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 HealthAPI interface { 63 DescribeAffectedEntities(*health.DescribeAffectedEntitiesInput) (*health.DescribeAffectedEntitiesOutput, error) 64 DescribeAffectedEntitiesWithContext(aws.Context, *health.DescribeAffectedEntitiesInput, ...request.Option) (*health.DescribeAffectedEntitiesOutput, error) 65 DescribeAffectedEntitiesRequest(*health.DescribeAffectedEntitiesInput) (*request.Request, *health.DescribeAffectedEntitiesOutput) 66 67 DescribeAffectedEntitiesPages(*health.DescribeAffectedEntitiesInput, func(*health.DescribeAffectedEntitiesOutput, bool) bool) error 68 DescribeAffectedEntitiesPagesWithContext(aws.Context, *health.DescribeAffectedEntitiesInput, func(*health.DescribeAffectedEntitiesOutput, bool) bool, ...request.Option) error 69 70 DescribeEntityAggregates(*health.DescribeEntityAggregatesInput) (*health.DescribeEntityAggregatesOutput, error) 71 DescribeEntityAggregatesWithContext(aws.Context, *health.DescribeEntityAggregatesInput, ...request.Option) (*health.DescribeEntityAggregatesOutput, error) 72 DescribeEntityAggregatesRequest(*health.DescribeEntityAggregatesInput) (*request.Request, *health.DescribeEntityAggregatesOutput) 73 74 DescribeEventAggregates(*health.DescribeEventAggregatesInput) (*health.DescribeEventAggregatesOutput, error) 75 DescribeEventAggregatesWithContext(aws.Context, *health.DescribeEventAggregatesInput, ...request.Option) (*health.DescribeEventAggregatesOutput, error) 76 DescribeEventAggregatesRequest(*health.DescribeEventAggregatesInput) (*request.Request, *health.DescribeEventAggregatesOutput) 77 78 DescribeEventAggregatesPages(*health.DescribeEventAggregatesInput, func(*health.DescribeEventAggregatesOutput, bool) bool) error 79 DescribeEventAggregatesPagesWithContext(aws.Context, *health.DescribeEventAggregatesInput, func(*health.DescribeEventAggregatesOutput, bool) bool, ...request.Option) error 80 81 DescribeEventDetails(*health.DescribeEventDetailsInput) (*health.DescribeEventDetailsOutput, error) 82 DescribeEventDetailsWithContext(aws.Context, *health.DescribeEventDetailsInput, ...request.Option) (*health.DescribeEventDetailsOutput, error) 83 DescribeEventDetailsRequest(*health.DescribeEventDetailsInput) (*request.Request, *health.DescribeEventDetailsOutput) 84 85 DescribeEventTypes(*health.DescribeEventTypesInput) (*health.DescribeEventTypesOutput, error) 86 DescribeEventTypesWithContext(aws.Context, *health.DescribeEventTypesInput, ...request.Option) (*health.DescribeEventTypesOutput, error) 87 DescribeEventTypesRequest(*health.DescribeEventTypesInput) (*request.Request, *health.DescribeEventTypesOutput) 88 89 DescribeEventTypesPages(*health.DescribeEventTypesInput, func(*health.DescribeEventTypesOutput, bool) bool) error 90 DescribeEventTypesPagesWithContext(aws.Context, *health.DescribeEventTypesInput, func(*health.DescribeEventTypesOutput, bool) bool, ...request.Option) error 91 92 DescribeEvents(*health.DescribeEventsInput) (*health.DescribeEventsOutput, error) 93 DescribeEventsWithContext(aws.Context, *health.DescribeEventsInput, ...request.Option) (*health.DescribeEventsOutput, error) 94 DescribeEventsRequest(*health.DescribeEventsInput) (*request.Request, *health.DescribeEventsOutput) 95 96 DescribeEventsPages(*health.DescribeEventsInput, func(*health.DescribeEventsOutput, bool) bool) error 97 DescribeEventsPagesWithContext(aws.Context, *health.DescribeEventsInput, func(*health.DescribeEventsOutput, bool) bool, ...request.Option) error 98} 99 100var _ HealthAPI = (*health.Health)(nil) 101