github.com/aavshr/aws-sdk-go@v1.41.3/service/synthetics/syntheticsiface/interface.go (about)

     1  // Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT.
     2  
     3  // Package syntheticsiface provides an interface to enable mocking the Synthetics 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 syntheticsiface
    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/service/synthetics"
    15  )
    16  
    17  // SyntheticsAPI provides an interface to enable mocking the
    18  // synthetics.Synthetics 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  //    // Synthetics.
    28  //    func myFunc(svc syntheticsiface.SyntheticsAPI) bool {
    29  //        // Make svc.CreateCanary request
    30  //    }
    31  //
    32  //    func main() {
    33  //        sess := session.New()
    34  //        svc := synthetics.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 mockSyntheticsClient struct {
    43  //        syntheticsiface.SyntheticsAPI
    44  //    }
    45  //    func (m *mockSyntheticsClient) CreateCanary(input *synthetics.CreateCanaryInput) (*synthetics.CreateCanaryOutput, error) {
    46  //        // mock response/functionality
    47  //    }
    48  //
    49  //    func TestMyFunc(t *testing.T) {
    50  //        // Setup Test
    51  //        mockSvc := &mockSyntheticsClient{}
    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 SyntheticsAPI interface {
    63  	CreateCanary(*synthetics.CreateCanaryInput) (*synthetics.CreateCanaryOutput, error)
    64  	CreateCanaryWithContext(aws.Context, *synthetics.CreateCanaryInput, ...request.Option) (*synthetics.CreateCanaryOutput, error)
    65  	CreateCanaryRequest(*synthetics.CreateCanaryInput) (*request.Request, *synthetics.CreateCanaryOutput)
    66  
    67  	DeleteCanary(*synthetics.DeleteCanaryInput) (*synthetics.DeleteCanaryOutput, error)
    68  	DeleteCanaryWithContext(aws.Context, *synthetics.DeleteCanaryInput, ...request.Option) (*synthetics.DeleteCanaryOutput, error)
    69  	DeleteCanaryRequest(*synthetics.DeleteCanaryInput) (*request.Request, *synthetics.DeleteCanaryOutput)
    70  
    71  	DescribeCanaries(*synthetics.DescribeCanariesInput) (*synthetics.DescribeCanariesOutput, error)
    72  	DescribeCanariesWithContext(aws.Context, *synthetics.DescribeCanariesInput, ...request.Option) (*synthetics.DescribeCanariesOutput, error)
    73  	DescribeCanariesRequest(*synthetics.DescribeCanariesInput) (*request.Request, *synthetics.DescribeCanariesOutput)
    74  
    75  	DescribeCanariesPages(*synthetics.DescribeCanariesInput, func(*synthetics.DescribeCanariesOutput, bool) bool) error
    76  	DescribeCanariesPagesWithContext(aws.Context, *synthetics.DescribeCanariesInput, func(*synthetics.DescribeCanariesOutput, bool) bool, ...request.Option) error
    77  
    78  	DescribeCanariesLastRun(*synthetics.DescribeCanariesLastRunInput) (*synthetics.DescribeCanariesLastRunOutput, error)
    79  	DescribeCanariesLastRunWithContext(aws.Context, *synthetics.DescribeCanariesLastRunInput, ...request.Option) (*synthetics.DescribeCanariesLastRunOutput, error)
    80  	DescribeCanariesLastRunRequest(*synthetics.DescribeCanariesLastRunInput) (*request.Request, *synthetics.DescribeCanariesLastRunOutput)
    81  
    82  	DescribeCanariesLastRunPages(*synthetics.DescribeCanariesLastRunInput, func(*synthetics.DescribeCanariesLastRunOutput, bool) bool) error
    83  	DescribeCanariesLastRunPagesWithContext(aws.Context, *synthetics.DescribeCanariesLastRunInput, func(*synthetics.DescribeCanariesLastRunOutput, bool) bool, ...request.Option) error
    84  
    85  	DescribeRuntimeVersions(*synthetics.DescribeRuntimeVersionsInput) (*synthetics.DescribeRuntimeVersionsOutput, error)
    86  	DescribeRuntimeVersionsWithContext(aws.Context, *synthetics.DescribeRuntimeVersionsInput, ...request.Option) (*synthetics.DescribeRuntimeVersionsOutput, error)
    87  	DescribeRuntimeVersionsRequest(*synthetics.DescribeRuntimeVersionsInput) (*request.Request, *synthetics.DescribeRuntimeVersionsOutput)
    88  
    89  	DescribeRuntimeVersionsPages(*synthetics.DescribeRuntimeVersionsInput, func(*synthetics.DescribeRuntimeVersionsOutput, bool) bool) error
    90  	DescribeRuntimeVersionsPagesWithContext(aws.Context, *synthetics.DescribeRuntimeVersionsInput, func(*synthetics.DescribeRuntimeVersionsOutput, bool) bool, ...request.Option) error
    91  
    92  	GetCanary(*synthetics.GetCanaryInput) (*synthetics.GetCanaryOutput, error)
    93  	GetCanaryWithContext(aws.Context, *synthetics.GetCanaryInput, ...request.Option) (*synthetics.GetCanaryOutput, error)
    94  	GetCanaryRequest(*synthetics.GetCanaryInput) (*request.Request, *synthetics.GetCanaryOutput)
    95  
    96  	GetCanaryRuns(*synthetics.GetCanaryRunsInput) (*synthetics.GetCanaryRunsOutput, error)
    97  	GetCanaryRunsWithContext(aws.Context, *synthetics.GetCanaryRunsInput, ...request.Option) (*synthetics.GetCanaryRunsOutput, error)
    98  	GetCanaryRunsRequest(*synthetics.GetCanaryRunsInput) (*request.Request, *synthetics.GetCanaryRunsOutput)
    99  
   100  	GetCanaryRunsPages(*synthetics.GetCanaryRunsInput, func(*synthetics.GetCanaryRunsOutput, bool) bool) error
   101  	GetCanaryRunsPagesWithContext(aws.Context, *synthetics.GetCanaryRunsInput, func(*synthetics.GetCanaryRunsOutput, bool) bool, ...request.Option) error
   102  
   103  	ListTagsForResource(*synthetics.ListTagsForResourceInput) (*synthetics.ListTagsForResourceOutput, error)
   104  	ListTagsForResourceWithContext(aws.Context, *synthetics.ListTagsForResourceInput, ...request.Option) (*synthetics.ListTagsForResourceOutput, error)
   105  	ListTagsForResourceRequest(*synthetics.ListTagsForResourceInput) (*request.Request, *synthetics.ListTagsForResourceOutput)
   106  
   107  	StartCanary(*synthetics.StartCanaryInput) (*synthetics.StartCanaryOutput, error)
   108  	StartCanaryWithContext(aws.Context, *synthetics.StartCanaryInput, ...request.Option) (*synthetics.StartCanaryOutput, error)
   109  	StartCanaryRequest(*synthetics.StartCanaryInput) (*request.Request, *synthetics.StartCanaryOutput)
   110  
   111  	StopCanary(*synthetics.StopCanaryInput) (*synthetics.StopCanaryOutput, error)
   112  	StopCanaryWithContext(aws.Context, *synthetics.StopCanaryInput, ...request.Option) (*synthetics.StopCanaryOutput, error)
   113  	StopCanaryRequest(*synthetics.StopCanaryInput) (*request.Request, *synthetics.StopCanaryOutput)
   114  
   115  	TagResource(*synthetics.TagResourceInput) (*synthetics.TagResourceOutput, error)
   116  	TagResourceWithContext(aws.Context, *synthetics.TagResourceInput, ...request.Option) (*synthetics.TagResourceOutput, error)
   117  	TagResourceRequest(*synthetics.TagResourceInput) (*request.Request, *synthetics.TagResourceOutput)
   118  
   119  	UntagResource(*synthetics.UntagResourceInput) (*synthetics.UntagResourceOutput, error)
   120  	UntagResourceWithContext(aws.Context, *synthetics.UntagResourceInput, ...request.Option) (*synthetics.UntagResourceOutput, error)
   121  	UntagResourceRequest(*synthetics.UntagResourceInput) (*request.Request, *synthetics.UntagResourceOutput)
   122  
   123  	UpdateCanary(*synthetics.UpdateCanaryInput) (*synthetics.UpdateCanaryOutput, error)
   124  	UpdateCanaryWithContext(aws.Context, *synthetics.UpdateCanaryInput, ...request.Option) (*synthetics.UpdateCanaryOutput, error)
   125  	UpdateCanaryRequest(*synthetics.UpdateCanaryInput) (*request.Request, *synthetics.UpdateCanaryOutput)
   126  }
   127  
   128  var _ SyntheticsAPI = (*synthetics.Synthetics)(nil)