github.com/aavshr/aws-sdk-go@v1.41.3/service/detective/detectiveiface/interface.go (about) 1 // Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT. 2 3 // Package detectiveiface provides an interface to enable mocking the Amazon Detective 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 detectiveiface 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/detective" 15 ) 16 17 // DetectiveAPI provides an interface to enable mocking the 18 // detective.Detective 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 Detective. 28 // func myFunc(svc detectiveiface.DetectiveAPI) bool { 29 // // Make svc.AcceptInvitation request 30 // } 31 // 32 // func main() { 33 // sess := session.New() 34 // svc := detective.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 mockDetectiveClient struct { 43 // detectiveiface.DetectiveAPI 44 // } 45 // func (m *mockDetectiveClient) AcceptInvitation(input *detective.AcceptInvitationInput) (*detective.AcceptInvitationOutput, error) { 46 // // mock response/functionality 47 // } 48 // 49 // func TestMyFunc(t *testing.T) { 50 // // Setup Test 51 // mockSvc := &mockDetectiveClient{} 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 DetectiveAPI interface { 63 AcceptInvitation(*detective.AcceptInvitationInput) (*detective.AcceptInvitationOutput, error) 64 AcceptInvitationWithContext(aws.Context, *detective.AcceptInvitationInput, ...request.Option) (*detective.AcceptInvitationOutput, error) 65 AcceptInvitationRequest(*detective.AcceptInvitationInput) (*request.Request, *detective.AcceptInvitationOutput) 66 67 CreateGraph(*detective.CreateGraphInput) (*detective.CreateGraphOutput, error) 68 CreateGraphWithContext(aws.Context, *detective.CreateGraphInput, ...request.Option) (*detective.CreateGraphOutput, error) 69 CreateGraphRequest(*detective.CreateGraphInput) (*request.Request, *detective.CreateGraphOutput) 70 71 CreateMembers(*detective.CreateMembersInput) (*detective.CreateMembersOutput, error) 72 CreateMembersWithContext(aws.Context, *detective.CreateMembersInput, ...request.Option) (*detective.CreateMembersOutput, error) 73 CreateMembersRequest(*detective.CreateMembersInput) (*request.Request, *detective.CreateMembersOutput) 74 75 DeleteGraph(*detective.DeleteGraphInput) (*detective.DeleteGraphOutput, error) 76 DeleteGraphWithContext(aws.Context, *detective.DeleteGraphInput, ...request.Option) (*detective.DeleteGraphOutput, error) 77 DeleteGraphRequest(*detective.DeleteGraphInput) (*request.Request, *detective.DeleteGraphOutput) 78 79 DeleteMembers(*detective.DeleteMembersInput) (*detective.DeleteMembersOutput, error) 80 DeleteMembersWithContext(aws.Context, *detective.DeleteMembersInput, ...request.Option) (*detective.DeleteMembersOutput, error) 81 DeleteMembersRequest(*detective.DeleteMembersInput) (*request.Request, *detective.DeleteMembersOutput) 82 83 DisassociateMembership(*detective.DisassociateMembershipInput) (*detective.DisassociateMembershipOutput, error) 84 DisassociateMembershipWithContext(aws.Context, *detective.DisassociateMembershipInput, ...request.Option) (*detective.DisassociateMembershipOutput, error) 85 DisassociateMembershipRequest(*detective.DisassociateMembershipInput) (*request.Request, *detective.DisassociateMembershipOutput) 86 87 GetMembers(*detective.GetMembersInput) (*detective.GetMembersOutput, error) 88 GetMembersWithContext(aws.Context, *detective.GetMembersInput, ...request.Option) (*detective.GetMembersOutput, error) 89 GetMembersRequest(*detective.GetMembersInput) (*request.Request, *detective.GetMembersOutput) 90 91 ListGraphs(*detective.ListGraphsInput) (*detective.ListGraphsOutput, error) 92 ListGraphsWithContext(aws.Context, *detective.ListGraphsInput, ...request.Option) (*detective.ListGraphsOutput, error) 93 ListGraphsRequest(*detective.ListGraphsInput) (*request.Request, *detective.ListGraphsOutput) 94 95 ListGraphsPages(*detective.ListGraphsInput, func(*detective.ListGraphsOutput, bool) bool) error 96 ListGraphsPagesWithContext(aws.Context, *detective.ListGraphsInput, func(*detective.ListGraphsOutput, bool) bool, ...request.Option) error 97 98 ListInvitations(*detective.ListInvitationsInput) (*detective.ListInvitationsOutput, error) 99 ListInvitationsWithContext(aws.Context, *detective.ListInvitationsInput, ...request.Option) (*detective.ListInvitationsOutput, error) 100 ListInvitationsRequest(*detective.ListInvitationsInput) (*request.Request, *detective.ListInvitationsOutput) 101 102 ListInvitationsPages(*detective.ListInvitationsInput, func(*detective.ListInvitationsOutput, bool) bool) error 103 ListInvitationsPagesWithContext(aws.Context, *detective.ListInvitationsInput, func(*detective.ListInvitationsOutput, bool) bool, ...request.Option) error 104 105 ListMembers(*detective.ListMembersInput) (*detective.ListMembersOutput, error) 106 ListMembersWithContext(aws.Context, *detective.ListMembersInput, ...request.Option) (*detective.ListMembersOutput, error) 107 ListMembersRequest(*detective.ListMembersInput) (*request.Request, *detective.ListMembersOutput) 108 109 ListMembersPages(*detective.ListMembersInput, func(*detective.ListMembersOutput, bool) bool) error 110 ListMembersPagesWithContext(aws.Context, *detective.ListMembersInput, func(*detective.ListMembersOutput, bool) bool, ...request.Option) error 111 112 ListTagsForResource(*detective.ListTagsForResourceInput) (*detective.ListTagsForResourceOutput, error) 113 ListTagsForResourceWithContext(aws.Context, *detective.ListTagsForResourceInput, ...request.Option) (*detective.ListTagsForResourceOutput, error) 114 ListTagsForResourceRequest(*detective.ListTagsForResourceInput) (*request.Request, *detective.ListTagsForResourceOutput) 115 116 RejectInvitation(*detective.RejectInvitationInput) (*detective.RejectInvitationOutput, error) 117 RejectInvitationWithContext(aws.Context, *detective.RejectInvitationInput, ...request.Option) (*detective.RejectInvitationOutput, error) 118 RejectInvitationRequest(*detective.RejectInvitationInput) (*request.Request, *detective.RejectInvitationOutput) 119 120 StartMonitoringMember(*detective.StartMonitoringMemberInput) (*detective.StartMonitoringMemberOutput, error) 121 StartMonitoringMemberWithContext(aws.Context, *detective.StartMonitoringMemberInput, ...request.Option) (*detective.StartMonitoringMemberOutput, error) 122 StartMonitoringMemberRequest(*detective.StartMonitoringMemberInput) (*request.Request, *detective.StartMonitoringMemberOutput) 123 124 TagResource(*detective.TagResourceInput) (*detective.TagResourceOutput, error) 125 TagResourceWithContext(aws.Context, *detective.TagResourceInput, ...request.Option) (*detective.TagResourceOutput, error) 126 TagResourceRequest(*detective.TagResourceInput) (*request.Request, *detective.TagResourceOutput) 127 128 UntagResource(*detective.UntagResourceInput) (*detective.UntagResourceOutput, error) 129 UntagResourceWithContext(aws.Context, *detective.UntagResourceInput, ...request.Option) (*detective.UntagResourceOutput, error) 130 UntagResourceRequest(*detective.UntagResourceInput) (*request.Request, *detective.UntagResourceOutput) 131 } 132 133 var _ DetectiveAPI = (*detective.Detective)(nil)