interface.go 7.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121
  1. // Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT.
  2. // Package resourcegroupsiface provides an interface to enable mocking the AWS Resource Groups service client
  3. // for testing your code.
  4. //
  5. // It is important to note that this interface will have breaking changes
  6. // when the service model is updated and adds new API operations, paginators,
  7. // and waiters.
  8. package resourcegroupsiface
  9. import (
  10. "github.com/aws/aws-sdk-go/aws"
  11. "github.com/aws/aws-sdk-go/aws/request"
  12. "github.com/aws/aws-sdk-go/service/resourcegroups"
  13. )
  14. // ResourceGroupsAPI provides an interface to enable mocking the
  15. // resourcegroups.ResourceGroups service client's API operation,
  16. // paginators, and waiters. This make unit testing your code that calls out
  17. // to the SDK's service client's calls easier.
  18. //
  19. // The best way to use this interface is so the SDK's service client's calls
  20. // can be stubbed out for unit testing your code with the SDK without needing
  21. // to inject custom request handlers into the SDK's request pipeline.
  22. //
  23. // // myFunc uses an SDK service client to make a request to
  24. // // AWS Resource Groups.
  25. // func myFunc(svc resourcegroupsiface.ResourceGroupsAPI) bool {
  26. // // Make svc.CreateGroup request
  27. // }
  28. //
  29. // func main() {
  30. // sess := session.New()
  31. // svc := resourcegroups.New(sess)
  32. //
  33. // myFunc(svc)
  34. // }
  35. //
  36. // In your _test.go file:
  37. //
  38. // // Define a mock struct to be used in your unit tests of myFunc.
  39. // type mockResourceGroupsClient struct {
  40. // resourcegroupsiface.ResourceGroupsAPI
  41. // }
  42. // func (m *mockResourceGroupsClient) CreateGroup(input *resourcegroups.CreateGroupInput) (*resourcegroups.CreateGroupOutput, error) {
  43. // // mock response/functionality
  44. // }
  45. //
  46. // func TestMyFunc(t *testing.T) {
  47. // // Setup Test
  48. // mockSvc := &mockResourceGroupsClient{}
  49. //
  50. // myfunc(mockSvc)
  51. //
  52. // // Verify myFunc's functionality
  53. // }
  54. //
  55. // It is important to note that this interface will have breaking changes
  56. // when the service model is updated and adds new API operations, paginators,
  57. // and waiters. Its suggested to use the pattern above for testing, or using
  58. // tooling to generate mocks to satisfy the interfaces.
  59. type ResourceGroupsAPI interface {
  60. CreateGroup(*resourcegroups.CreateGroupInput) (*resourcegroups.CreateGroupOutput, error)
  61. CreateGroupWithContext(aws.Context, *resourcegroups.CreateGroupInput, ...request.Option) (*resourcegroups.CreateGroupOutput, error)
  62. CreateGroupRequest(*resourcegroups.CreateGroupInput) (*request.Request, *resourcegroups.CreateGroupOutput)
  63. DeleteGroup(*resourcegroups.DeleteGroupInput) (*resourcegroups.DeleteGroupOutput, error)
  64. DeleteGroupWithContext(aws.Context, *resourcegroups.DeleteGroupInput, ...request.Option) (*resourcegroups.DeleteGroupOutput, error)
  65. DeleteGroupRequest(*resourcegroups.DeleteGroupInput) (*request.Request, *resourcegroups.DeleteGroupOutput)
  66. GetGroup(*resourcegroups.GetGroupInput) (*resourcegroups.GetGroupOutput, error)
  67. GetGroupWithContext(aws.Context, *resourcegroups.GetGroupInput, ...request.Option) (*resourcegroups.GetGroupOutput, error)
  68. GetGroupRequest(*resourcegroups.GetGroupInput) (*request.Request, *resourcegroups.GetGroupOutput)
  69. GetGroupQuery(*resourcegroups.GetGroupQueryInput) (*resourcegroups.GetGroupQueryOutput, error)
  70. GetGroupQueryWithContext(aws.Context, *resourcegroups.GetGroupQueryInput, ...request.Option) (*resourcegroups.GetGroupQueryOutput, error)
  71. GetGroupQueryRequest(*resourcegroups.GetGroupQueryInput) (*request.Request, *resourcegroups.GetGroupQueryOutput)
  72. GetTags(*resourcegroups.GetTagsInput) (*resourcegroups.GetTagsOutput, error)
  73. GetTagsWithContext(aws.Context, *resourcegroups.GetTagsInput, ...request.Option) (*resourcegroups.GetTagsOutput, error)
  74. GetTagsRequest(*resourcegroups.GetTagsInput) (*request.Request, *resourcegroups.GetTagsOutput)
  75. ListGroupResources(*resourcegroups.ListGroupResourcesInput) (*resourcegroups.ListGroupResourcesOutput, error)
  76. ListGroupResourcesWithContext(aws.Context, *resourcegroups.ListGroupResourcesInput, ...request.Option) (*resourcegroups.ListGroupResourcesOutput, error)
  77. ListGroupResourcesRequest(*resourcegroups.ListGroupResourcesInput) (*request.Request, *resourcegroups.ListGroupResourcesOutput)
  78. ListGroupResourcesPages(*resourcegroups.ListGroupResourcesInput, func(*resourcegroups.ListGroupResourcesOutput, bool) bool) error
  79. ListGroupResourcesPagesWithContext(aws.Context, *resourcegroups.ListGroupResourcesInput, func(*resourcegroups.ListGroupResourcesOutput, bool) bool, ...request.Option) error
  80. ListGroups(*resourcegroups.ListGroupsInput) (*resourcegroups.ListGroupsOutput, error)
  81. ListGroupsWithContext(aws.Context, *resourcegroups.ListGroupsInput, ...request.Option) (*resourcegroups.ListGroupsOutput, error)
  82. ListGroupsRequest(*resourcegroups.ListGroupsInput) (*request.Request, *resourcegroups.ListGroupsOutput)
  83. ListGroupsPages(*resourcegroups.ListGroupsInput, func(*resourcegroups.ListGroupsOutput, bool) bool) error
  84. ListGroupsPagesWithContext(aws.Context, *resourcegroups.ListGroupsInput, func(*resourcegroups.ListGroupsOutput, bool) bool, ...request.Option) error
  85. SearchResources(*resourcegroups.SearchResourcesInput) (*resourcegroups.SearchResourcesOutput, error)
  86. SearchResourcesWithContext(aws.Context, *resourcegroups.SearchResourcesInput, ...request.Option) (*resourcegroups.SearchResourcesOutput, error)
  87. SearchResourcesRequest(*resourcegroups.SearchResourcesInput) (*request.Request, *resourcegroups.SearchResourcesOutput)
  88. SearchResourcesPages(*resourcegroups.SearchResourcesInput, func(*resourcegroups.SearchResourcesOutput, bool) bool) error
  89. SearchResourcesPagesWithContext(aws.Context, *resourcegroups.SearchResourcesInput, func(*resourcegroups.SearchResourcesOutput, bool) bool, ...request.Option) error
  90. Tag(*resourcegroups.TagInput) (*resourcegroups.TagOutput, error)
  91. TagWithContext(aws.Context, *resourcegroups.TagInput, ...request.Option) (*resourcegroups.TagOutput, error)
  92. TagRequest(*resourcegroups.TagInput) (*request.Request, *resourcegroups.TagOutput)
  93. Untag(*resourcegroups.UntagInput) (*resourcegroups.UntagOutput, error)
  94. UntagWithContext(aws.Context, *resourcegroups.UntagInput, ...request.Option) (*resourcegroups.UntagOutput, error)
  95. UntagRequest(*resourcegroups.UntagInput) (*request.Request, *resourcegroups.UntagOutput)
  96. UpdateGroup(*resourcegroups.UpdateGroupInput) (*resourcegroups.UpdateGroupOutput, error)
  97. UpdateGroupWithContext(aws.Context, *resourcegroups.UpdateGroupInput, ...request.Option) (*resourcegroups.UpdateGroupOutput, error)
  98. UpdateGroupRequest(*resourcegroups.UpdateGroupInput) (*request.Request, *resourcegroups.UpdateGroupOutput)
  99. UpdateGroupQuery(*resourcegroups.UpdateGroupQueryInput) (*resourcegroups.UpdateGroupQueryOutput, error)
  100. UpdateGroupQueryWithContext(aws.Context, *resourcegroups.UpdateGroupQueryInput, ...request.Option) (*resourcegroups.UpdateGroupQueryOutput, error)
  101. UpdateGroupQueryRequest(*resourcegroups.UpdateGroupQueryInput) (*request.Request, *resourcegroups.UpdateGroupQueryOutput)
  102. }
  103. var _ ResourceGroupsAPI = (*resourcegroups.ResourceGroups)(nil)