1// Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT. 2 3// Package resourcegroupsiface provides an interface to enable mocking the AWS Resource Groups 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 resourcegroupsiface 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/resourcegroups" 15) 16 17// ResourceGroupsAPI provides an interface to enable mocking the 18// resourcegroups.ResourceGroups 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 Resource Groups. 28// func myFunc(svc resourcegroupsiface.ResourceGroupsAPI) bool { 29// // Make svc.CreateGroup request 30// } 31// 32// func main() { 33// sess := session.New() 34// svc := resourcegroups.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 mockResourceGroupsClient struct { 43// resourcegroupsiface.ResourceGroupsAPI 44// } 45// func (m *mockResourceGroupsClient) CreateGroup(input *resourcegroups.CreateGroupInput) (*resourcegroups.CreateGroupOutput, error) { 46// // mock response/functionality 47// } 48// 49// func TestMyFunc(t *testing.T) { 50// // Setup Test 51// mockSvc := &mockResourceGroupsClient{} 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 ResourceGroupsAPI interface { 63 CreateGroup(*resourcegroups.CreateGroupInput) (*resourcegroups.CreateGroupOutput, error) 64 CreateGroupWithContext(aws.Context, *resourcegroups.CreateGroupInput, ...request.Option) (*resourcegroups.CreateGroupOutput, error) 65 CreateGroupRequest(*resourcegroups.CreateGroupInput) (*request.Request, *resourcegroups.CreateGroupOutput) 66 67 DeleteGroup(*resourcegroups.DeleteGroupInput) (*resourcegroups.DeleteGroupOutput, error) 68 DeleteGroupWithContext(aws.Context, *resourcegroups.DeleteGroupInput, ...request.Option) (*resourcegroups.DeleteGroupOutput, error) 69 DeleteGroupRequest(*resourcegroups.DeleteGroupInput) (*request.Request, *resourcegroups.DeleteGroupOutput) 70 71 GetGroup(*resourcegroups.GetGroupInput) (*resourcegroups.GetGroupOutput, error) 72 GetGroupWithContext(aws.Context, *resourcegroups.GetGroupInput, ...request.Option) (*resourcegroups.GetGroupOutput, error) 73 GetGroupRequest(*resourcegroups.GetGroupInput) (*request.Request, *resourcegroups.GetGroupOutput) 74 75 GetGroupQuery(*resourcegroups.GetGroupQueryInput) (*resourcegroups.GetGroupQueryOutput, error) 76 GetGroupQueryWithContext(aws.Context, *resourcegroups.GetGroupQueryInput, ...request.Option) (*resourcegroups.GetGroupQueryOutput, error) 77 GetGroupQueryRequest(*resourcegroups.GetGroupQueryInput) (*request.Request, *resourcegroups.GetGroupQueryOutput) 78 79 GetTags(*resourcegroups.GetTagsInput) (*resourcegroups.GetTagsOutput, error) 80 GetTagsWithContext(aws.Context, *resourcegroups.GetTagsInput, ...request.Option) (*resourcegroups.GetTagsOutput, error) 81 GetTagsRequest(*resourcegroups.GetTagsInput) (*request.Request, *resourcegroups.GetTagsOutput) 82 83 ListGroupResources(*resourcegroups.ListGroupResourcesInput) (*resourcegroups.ListGroupResourcesOutput, error) 84 ListGroupResourcesWithContext(aws.Context, *resourcegroups.ListGroupResourcesInput, ...request.Option) (*resourcegroups.ListGroupResourcesOutput, error) 85 ListGroupResourcesRequest(*resourcegroups.ListGroupResourcesInput) (*request.Request, *resourcegroups.ListGroupResourcesOutput) 86 87 ListGroupResourcesPages(*resourcegroups.ListGroupResourcesInput, func(*resourcegroups.ListGroupResourcesOutput, bool) bool) error 88 ListGroupResourcesPagesWithContext(aws.Context, *resourcegroups.ListGroupResourcesInput, func(*resourcegroups.ListGroupResourcesOutput, bool) bool, ...request.Option) error 89 90 ListGroups(*resourcegroups.ListGroupsInput) (*resourcegroups.ListGroupsOutput, error) 91 ListGroupsWithContext(aws.Context, *resourcegroups.ListGroupsInput, ...request.Option) (*resourcegroups.ListGroupsOutput, error) 92 ListGroupsRequest(*resourcegroups.ListGroupsInput) (*request.Request, *resourcegroups.ListGroupsOutput) 93 94 ListGroupsPages(*resourcegroups.ListGroupsInput, func(*resourcegroups.ListGroupsOutput, bool) bool) error 95 ListGroupsPagesWithContext(aws.Context, *resourcegroups.ListGroupsInput, func(*resourcegroups.ListGroupsOutput, bool) bool, ...request.Option) error 96 97 SearchResources(*resourcegroups.SearchResourcesInput) (*resourcegroups.SearchResourcesOutput, error) 98 SearchResourcesWithContext(aws.Context, *resourcegroups.SearchResourcesInput, ...request.Option) (*resourcegroups.SearchResourcesOutput, error) 99 SearchResourcesRequest(*resourcegroups.SearchResourcesInput) (*request.Request, *resourcegroups.SearchResourcesOutput) 100 101 SearchResourcesPages(*resourcegroups.SearchResourcesInput, func(*resourcegroups.SearchResourcesOutput, bool) bool) error 102 SearchResourcesPagesWithContext(aws.Context, *resourcegroups.SearchResourcesInput, func(*resourcegroups.SearchResourcesOutput, bool) bool, ...request.Option) error 103 104 Tag(*resourcegroups.TagInput) (*resourcegroups.TagOutput, error) 105 TagWithContext(aws.Context, *resourcegroups.TagInput, ...request.Option) (*resourcegroups.TagOutput, error) 106 TagRequest(*resourcegroups.TagInput) (*request.Request, *resourcegroups.TagOutput) 107 108 Untag(*resourcegroups.UntagInput) (*resourcegroups.UntagOutput, error) 109 UntagWithContext(aws.Context, *resourcegroups.UntagInput, ...request.Option) (*resourcegroups.UntagOutput, error) 110 UntagRequest(*resourcegroups.UntagInput) (*request.Request, *resourcegroups.UntagOutput) 111 112 UpdateGroup(*resourcegroups.UpdateGroupInput) (*resourcegroups.UpdateGroupOutput, error) 113 UpdateGroupWithContext(aws.Context, *resourcegroups.UpdateGroupInput, ...request.Option) (*resourcegroups.UpdateGroupOutput, error) 114 UpdateGroupRequest(*resourcegroups.UpdateGroupInput) (*request.Request, *resourcegroups.UpdateGroupOutput) 115 116 UpdateGroupQuery(*resourcegroups.UpdateGroupQueryInput) (*resourcegroups.UpdateGroupQueryOutput, error) 117 UpdateGroupQueryWithContext(aws.Context, *resourcegroups.UpdateGroupQueryInput, ...request.Option) (*resourcegroups.UpdateGroupQueryOutput, error) 118 UpdateGroupQueryRequest(*resourcegroups.UpdateGroupQueryInput) (*request.Request, *resourcegroups.UpdateGroupQueryOutput) 119} 120 121var _ ResourceGroupsAPI = (*resourcegroups.ResourceGroups)(nil) 122