github.com/aavshr/aws-sdk-go@v1.41.3/private/model/api/codegentest/service/awsendpointdiscoverytest/awsendpointdiscoverytestiface/interface.go (about)

     1  // Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT.
     2  
     3  // Package awsendpointdiscoverytestiface provides an interface to enable mocking the AwsEndpointDiscoveryTest 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 awsendpointdiscoverytestiface
    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/private/model/api/codegentest/service/awsendpointdiscoverytest"
    15  )
    16  
    17  // AwsEndpointDiscoveryTestAPI provides an interface to enable mocking the
    18  // awsendpointdiscoverytest.AwsEndpointDiscoveryTest 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  //    // AwsEndpointDiscoveryTest.
    28  //    func myFunc(svc awsendpointdiscoverytestiface.AwsEndpointDiscoveryTestAPI) bool {
    29  //        // Make svc.DescribeEndpoints request
    30  //    }
    31  //
    32  //    func main() {
    33  //        sess := session.New()
    34  //        svc := awsendpointdiscoverytest.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 mockAwsEndpointDiscoveryTestClient struct {
    43  //        awsendpointdiscoverytestiface.AwsEndpointDiscoveryTestAPI
    44  //    }
    45  //    func (m *mockAwsEndpointDiscoveryTestClient) DescribeEndpoints(input *awsendpointdiscoverytest.DescribeEndpointsInput) (*awsendpointdiscoverytest.DescribeEndpointsOutput, error) {
    46  //        // mock response/functionality
    47  //    }
    48  //
    49  //    func TestMyFunc(t *testing.T) {
    50  //        // Setup Test
    51  //        mockSvc := &mockAwsEndpointDiscoveryTestClient{}
    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 AwsEndpointDiscoveryTestAPI interface {
    63  	DescribeEndpoints(*awsendpointdiscoverytest.DescribeEndpointsInput) (*awsendpointdiscoverytest.DescribeEndpointsOutput, error)
    64  	DescribeEndpointsWithContext(aws.Context, *awsendpointdiscoverytest.DescribeEndpointsInput, ...request.Option) (*awsendpointdiscoverytest.DescribeEndpointsOutput, error)
    65  	DescribeEndpointsRequest(*awsendpointdiscoverytest.DescribeEndpointsInput) (*request.Request, *awsendpointdiscoverytest.DescribeEndpointsOutput)
    66  
    67  	TestDiscoveryIdentifiersRequired(*awsendpointdiscoverytest.TestDiscoveryIdentifiersRequiredInput) (*awsendpointdiscoverytest.TestDiscoveryIdentifiersRequiredOutput, error)
    68  	TestDiscoveryIdentifiersRequiredWithContext(aws.Context, *awsendpointdiscoverytest.TestDiscoveryIdentifiersRequiredInput, ...request.Option) (*awsendpointdiscoverytest.TestDiscoveryIdentifiersRequiredOutput, error)
    69  	TestDiscoveryIdentifiersRequiredRequest(*awsendpointdiscoverytest.TestDiscoveryIdentifiersRequiredInput) (*request.Request, *awsendpointdiscoverytest.TestDiscoveryIdentifiersRequiredOutput)
    70  
    71  	TestDiscoveryOptional(*awsendpointdiscoverytest.TestDiscoveryOptionalInput) (*awsendpointdiscoverytest.TestDiscoveryOptionalOutput, error)
    72  	TestDiscoveryOptionalWithContext(aws.Context, *awsendpointdiscoverytest.TestDiscoveryOptionalInput, ...request.Option) (*awsendpointdiscoverytest.TestDiscoveryOptionalOutput, error)
    73  	TestDiscoveryOptionalRequest(*awsendpointdiscoverytest.TestDiscoveryOptionalInput) (*request.Request, *awsendpointdiscoverytest.TestDiscoveryOptionalOutput)
    74  
    75  	TestDiscoveryRequired(*awsendpointdiscoverytest.TestDiscoveryRequiredInput) (*awsendpointdiscoverytest.TestDiscoveryRequiredOutput, error)
    76  	TestDiscoveryRequiredWithContext(aws.Context, *awsendpointdiscoverytest.TestDiscoveryRequiredInput, ...request.Option) (*awsendpointdiscoverytest.TestDiscoveryRequiredOutput, error)
    77  	TestDiscoveryRequiredRequest(*awsendpointdiscoverytest.TestDiscoveryRequiredInput) (*request.Request, *awsendpointdiscoverytest.TestDiscoveryRequiredOutput)
    78  }
    79  
    80  var _ AwsEndpointDiscoveryTestAPI = (*awsendpointdiscoverytest.AwsEndpointDiscoveryTest)(nil)