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

     1  // Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT.
     2  
     3  // Package codestarnotificationsiface provides an interface to enable mocking the AWS CodeStar 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.
     9  package codestarnotificationsiface
    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/codestarnotifications"
    15  )
    16  
    17  // CodeStarNotificationsAPI provides an interface to enable mocking the
    18  // codestarnotifications.CodeStarNotifications 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 CodeStar Notifications.
    28  //    func myFunc(svc codestarnotificationsiface.CodeStarNotificationsAPI) bool {
    29  //        // Make svc.CreateNotificationRule request
    30  //    }
    31  //
    32  //    func main() {
    33  //        sess := session.New()
    34  //        svc := codestarnotifications.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 mockCodeStarNotificationsClient struct {
    43  //        codestarnotificationsiface.CodeStarNotificationsAPI
    44  //    }
    45  //    func (m *mockCodeStarNotificationsClient) CreateNotificationRule(input *codestarnotifications.CreateNotificationRuleInput) (*codestarnotifications.CreateNotificationRuleOutput, error) {
    46  //        // mock response/functionality
    47  //    }
    48  //
    49  //    func TestMyFunc(t *testing.T) {
    50  //        // Setup Test
    51  //        mockSvc := &mockCodeStarNotificationsClient{}
    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 CodeStarNotificationsAPI interface {
    63  	CreateNotificationRule(*codestarnotifications.CreateNotificationRuleInput) (*codestarnotifications.CreateNotificationRuleOutput, error)
    64  	CreateNotificationRuleWithContext(aws.Context, *codestarnotifications.CreateNotificationRuleInput, ...request.Option) (*codestarnotifications.CreateNotificationRuleOutput, error)
    65  	CreateNotificationRuleRequest(*codestarnotifications.CreateNotificationRuleInput) (*request.Request, *codestarnotifications.CreateNotificationRuleOutput)
    66  
    67  	DeleteNotificationRule(*codestarnotifications.DeleteNotificationRuleInput) (*codestarnotifications.DeleteNotificationRuleOutput, error)
    68  	DeleteNotificationRuleWithContext(aws.Context, *codestarnotifications.DeleteNotificationRuleInput, ...request.Option) (*codestarnotifications.DeleteNotificationRuleOutput, error)
    69  	DeleteNotificationRuleRequest(*codestarnotifications.DeleteNotificationRuleInput) (*request.Request, *codestarnotifications.DeleteNotificationRuleOutput)
    70  
    71  	DeleteTarget(*codestarnotifications.DeleteTargetInput) (*codestarnotifications.DeleteTargetOutput, error)
    72  	DeleteTargetWithContext(aws.Context, *codestarnotifications.DeleteTargetInput, ...request.Option) (*codestarnotifications.DeleteTargetOutput, error)
    73  	DeleteTargetRequest(*codestarnotifications.DeleteTargetInput) (*request.Request, *codestarnotifications.DeleteTargetOutput)
    74  
    75  	DescribeNotificationRule(*codestarnotifications.DescribeNotificationRuleInput) (*codestarnotifications.DescribeNotificationRuleOutput, error)
    76  	DescribeNotificationRuleWithContext(aws.Context, *codestarnotifications.DescribeNotificationRuleInput, ...request.Option) (*codestarnotifications.DescribeNotificationRuleOutput, error)
    77  	DescribeNotificationRuleRequest(*codestarnotifications.DescribeNotificationRuleInput) (*request.Request, *codestarnotifications.DescribeNotificationRuleOutput)
    78  
    79  	ListEventTypes(*codestarnotifications.ListEventTypesInput) (*codestarnotifications.ListEventTypesOutput, error)
    80  	ListEventTypesWithContext(aws.Context, *codestarnotifications.ListEventTypesInput, ...request.Option) (*codestarnotifications.ListEventTypesOutput, error)
    81  	ListEventTypesRequest(*codestarnotifications.ListEventTypesInput) (*request.Request, *codestarnotifications.ListEventTypesOutput)
    82  
    83  	ListEventTypesPages(*codestarnotifications.ListEventTypesInput, func(*codestarnotifications.ListEventTypesOutput, bool) bool) error
    84  	ListEventTypesPagesWithContext(aws.Context, *codestarnotifications.ListEventTypesInput, func(*codestarnotifications.ListEventTypesOutput, bool) bool, ...request.Option) error
    85  
    86  	ListNotificationRules(*codestarnotifications.ListNotificationRulesInput) (*codestarnotifications.ListNotificationRulesOutput, error)
    87  	ListNotificationRulesWithContext(aws.Context, *codestarnotifications.ListNotificationRulesInput, ...request.Option) (*codestarnotifications.ListNotificationRulesOutput, error)
    88  	ListNotificationRulesRequest(*codestarnotifications.ListNotificationRulesInput) (*request.Request, *codestarnotifications.ListNotificationRulesOutput)
    89  
    90  	ListNotificationRulesPages(*codestarnotifications.ListNotificationRulesInput, func(*codestarnotifications.ListNotificationRulesOutput, bool) bool) error
    91  	ListNotificationRulesPagesWithContext(aws.Context, *codestarnotifications.ListNotificationRulesInput, func(*codestarnotifications.ListNotificationRulesOutput, bool) bool, ...request.Option) error
    92  
    93  	ListTagsForResource(*codestarnotifications.ListTagsForResourceInput) (*codestarnotifications.ListTagsForResourceOutput, error)
    94  	ListTagsForResourceWithContext(aws.Context, *codestarnotifications.ListTagsForResourceInput, ...request.Option) (*codestarnotifications.ListTagsForResourceOutput, error)
    95  	ListTagsForResourceRequest(*codestarnotifications.ListTagsForResourceInput) (*request.Request, *codestarnotifications.ListTagsForResourceOutput)
    96  
    97  	ListTargets(*codestarnotifications.ListTargetsInput) (*codestarnotifications.ListTargetsOutput, error)
    98  	ListTargetsWithContext(aws.Context, *codestarnotifications.ListTargetsInput, ...request.Option) (*codestarnotifications.ListTargetsOutput, error)
    99  	ListTargetsRequest(*codestarnotifications.ListTargetsInput) (*request.Request, *codestarnotifications.ListTargetsOutput)
   100  
   101  	ListTargetsPages(*codestarnotifications.ListTargetsInput, func(*codestarnotifications.ListTargetsOutput, bool) bool) error
   102  	ListTargetsPagesWithContext(aws.Context, *codestarnotifications.ListTargetsInput, func(*codestarnotifications.ListTargetsOutput, bool) bool, ...request.Option) error
   103  
   104  	Subscribe(*codestarnotifications.SubscribeInput) (*codestarnotifications.SubscribeOutput, error)
   105  	SubscribeWithContext(aws.Context, *codestarnotifications.SubscribeInput, ...request.Option) (*codestarnotifications.SubscribeOutput, error)
   106  	SubscribeRequest(*codestarnotifications.SubscribeInput) (*request.Request, *codestarnotifications.SubscribeOutput)
   107  
   108  	TagResource(*codestarnotifications.TagResourceInput) (*codestarnotifications.TagResourceOutput, error)
   109  	TagResourceWithContext(aws.Context, *codestarnotifications.TagResourceInput, ...request.Option) (*codestarnotifications.TagResourceOutput, error)
   110  	TagResourceRequest(*codestarnotifications.TagResourceInput) (*request.Request, *codestarnotifications.TagResourceOutput)
   111  
   112  	Unsubscribe(*codestarnotifications.UnsubscribeInput) (*codestarnotifications.UnsubscribeOutput, error)
   113  	UnsubscribeWithContext(aws.Context, *codestarnotifications.UnsubscribeInput, ...request.Option) (*codestarnotifications.UnsubscribeOutput, error)
   114  	UnsubscribeRequest(*codestarnotifications.UnsubscribeInput) (*request.Request, *codestarnotifications.UnsubscribeOutput)
   115  
   116  	UntagResource(*codestarnotifications.UntagResourceInput) (*codestarnotifications.UntagResourceOutput, error)
   117  	UntagResourceWithContext(aws.Context, *codestarnotifications.UntagResourceInput, ...request.Option) (*codestarnotifications.UntagResourceOutput, error)
   118  	UntagResourceRequest(*codestarnotifications.UntagResourceInput) (*request.Request, *codestarnotifications.UntagResourceOutput)
   119  
   120  	UpdateNotificationRule(*codestarnotifications.UpdateNotificationRuleInput) (*codestarnotifications.UpdateNotificationRuleOutput, error)
   121  	UpdateNotificationRuleWithContext(aws.Context, *codestarnotifications.UpdateNotificationRuleInput, ...request.Option) (*codestarnotifications.UpdateNotificationRuleOutput, error)
   122  	UpdateNotificationRuleRequest(*codestarnotifications.UpdateNotificationRuleInput) (*request.Request, *codestarnotifications.UpdateNotificationRuleOutput)
   123  }
   124  
   125  var _ CodeStarNotificationsAPI = (*codestarnotifications.CodeStarNotifications)(nil)