interface.go 8.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136
  1. // Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT.
  2. // Package codestariface provides an interface to enable mocking the AWS CodeStar 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 codestariface
  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/codestar"
  13. )
  14. // CodeStarAPI provides an interface to enable mocking the
  15. // codestar.CodeStar 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 CodeStar.
  25. // func myFunc(svc codestariface.CodeStarAPI) bool {
  26. // // Make svc.AssociateTeamMember request
  27. // }
  28. //
  29. // func main() {
  30. // sess := session.New()
  31. // svc := codestar.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 mockCodeStarClient struct {
  40. // codestariface.CodeStarAPI
  41. // }
  42. // func (m *mockCodeStarClient) AssociateTeamMember(input *codestar.AssociateTeamMemberInput) (*codestar.AssociateTeamMemberOutput, error) {
  43. // // mock response/functionality
  44. // }
  45. //
  46. // func TestMyFunc(t *testing.T) {
  47. // // Setup Test
  48. // mockSvc := &mockCodeStarClient{}
  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 CodeStarAPI interface {
  60. AssociateTeamMember(*codestar.AssociateTeamMemberInput) (*codestar.AssociateTeamMemberOutput, error)
  61. AssociateTeamMemberWithContext(aws.Context, *codestar.AssociateTeamMemberInput, ...request.Option) (*codestar.AssociateTeamMemberOutput, error)
  62. AssociateTeamMemberRequest(*codestar.AssociateTeamMemberInput) (*request.Request, *codestar.AssociateTeamMemberOutput)
  63. CreateProject(*codestar.CreateProjectInput) (*codestar.CreateProjectOutput, error)
  64. CreateProjectWithContext(aws.Context, *codestar.CreateProjectInput, ...request.Option) (*codestar.CreateProjectOutput, error)
  65. CreateProjectRequest(*codestar.CreateProjectInput) (*request.Request, *codestar.CreateProjectOutput)
  66. CreateUserProfile(*codestar.CreateUserProfileInput) (*codestar.CreateUserProfileOutput, error)
  67. CreateUserProfileWithContext(aws.Context, *codestar.CreateUserProfileInput, ...request.Option) (*codestar.CreateUserProfileOutput, error)
  68. CreateUserProfileRequest(*codestar.CreateUserProfileInput) (*request.Request, *codestar.CreateUserProfileOutput)
  69. DeleteProject(*codestar.DeleteProjectInput) (*codestar.DeleteProjectOutput, error)
  70. DeleteProjectWithContext(aws.Context, *codestar.DeleteProjectInput, ...request.Option) (*codestar.DeleteProjectOutput, error)
  71. DeleteProjectRequest(*codestar.DeleteProjectInput) (*request.Request, *codestar.DeleteProjectOutput)
  72. DeleteUserProfile(*codestar.DeleteUserProfileInput) (*codestar.DeleteUserProfileOutput, error)
  73. DeleteUserProfileWithContext(aws.Context, *codestar.DeleteUserProfileInput, ...request.Option) (*codestar.DeleteUserProfileOutput, error)
  74. DeleteUserProfileRequest(*codestar.DeleteUserProfileInput) (*request.Request, *codestar.DeleteUserProfileOutput)
  75. DescribeProject(*codestar.DescribeProjectInput) (*codestar.DescribeProjectOutput, error)
  76. DescribeProjectWithContext(aws.Context, *codestar.DescribeProjectInput, ...request.Option) (*codestar.DescribeProjectOutput, error)
  77. DescribeProjectRequest(*codestar.DescribeProjectInput) (*request.Request, *codestar.DescribeProjectOutput)
  78. DescribeUserProfile(*codestar.DescribeUserProfileInput) (*codestar.DescribeUserProfileOutput, error)
  79. DescribeUserProfileWithContext(aws.Context, *codestar.DescribeUserProfileInput, ...request.Option) (*codestar.DescribeUserProfileOutput, error)
  80. DescribeUserProfileRequest(*codestar.DescribeUserProfileInput) (*request.Request, *codestar.DescribeUserProfileOutput)
  81. DisassociateTeamMember(*codestar.DisassociateTeamMemberInput) (*codestar.DisassociateTeamMemberOutput, error)
  82. DisassociateTeamMemberWithContext(aws.Context, *codestar.DisassociateTeamMemberInput, ...request.Option) (*codestar.DisassociateTeamMemberOutput, error)
  83. DisassociateTeamMemberRequest(*codestar.DisassociateTeamMemberInput) (*request.Request, *codestar.DisassociateTeamMemberOutput)
  84. ListProjects(*codestar.ListProjectsInput) (*codestar.ListProjectsOutput, error)
  85. ListProjectsWithContext(aws.Context, *codestar.ListProjectsInput, ...request.Option) (*codestar.ListProjectsOutput, error)
  86. ListProjectsRequest(*codestar.ListProjectsInput) (*request.Request, *codestar.ListProjectsOutput)
  87. ListResources(*codestar.ListResourcesInput) (*codestar.ListResourcesOutput, error)
  88. ListResourcesWithContext(aws.Context, *codestar.ListResourcesInput, ...request.Option) (*codestar.ListResourcesOutput, error)
  89. ListResourcesRequest(*codestar.ListResourcesInput) (*request.Request, *codestar.ListResourcesOutput)
  90. ListTagsForProject(*codestar.ListTagsForProjectInput) (*codestar.ListTagsForProjectOutput, error)
  91. ListTagsForProjectWithContext(aws.Context, *codestar.ListTagsForProjectInput, ...request.Option) (*codestar.ListTagsForProjectOutput, error)
  92. ListTagsForProjectRequest(*codestar.ListTagsForProjectInput) (*request.Request, *codestar.ListTagsForProjectOutput)
  93. ListTeamMembers(*codestar.ListTeamMembersInput) (*codestar.ListTeamMembersOutput, error)
  94. ListTeamMembersWithContext(aws.Context, *codestar.ListTeamMembersInput, ...request.Option) (*codestar.ListTeamMembersOutput, error)
  95. ListTeamMembersRequest(*codestar.ListTeamMembersInput) (*request.Request, *codestar.ListTeamMembersOutput)
  96. ListUserProfiles(*codestar.ListUserProfilesInput) (*codestar.ListUserProfilesOutput, error)
  97. ListUserProfilesWithContext(aws.Context, *codestar.ListUserProfilesInput, ...request.Option) (*codestar.ListUserProfilesOutput, error)
  98. ListUserProfilesRequest(*codestar.ListUserProfilesInput) (*request.Request, *codestar.ListUserProfilesOutput)
  99. TagProject(*codestar.TagProjectInput) (*codestar.TagProjectOutput, error)
  100. TagProjectWithContext(aws.Context, *codestar.TagProjectInput, ...request.Option) (*codestar.TagProjectOutput, error)
  101. TagProjectRequest(*codestar.TagProjectInput) (*request.Request, *codestar.TagProjectOutput)
  102. UntagProject(*codestar.UntagProjectInput) (*codestar.UntagProjectOutput, error)
  103. UntagProjectWithContext(aws.Context, *codestar.UntagProjectInput, ...request.Option) (*codestar.UntagProjectOutput, error)
  104. UntagProjectRequest(*codestar.UntagProjectInput) (*request.Request, *codestar.UntagProjectOutput)
  105. UpdateProject(*codestar.UpdateProjectInput) (*codestar.UpdateProjectOutput, error)
  106. UpdateProjectWithContext(aws.Context, *codestar.UpdateProjectInput, ...request.Option) (*codestar.UpdateProjectOutput, error)
  107. UpdateProjectRequest(*codestar.UpdateProjectInput) (*request.Request, *codestar.UpdateProjectOutput)
  108. UpdateTeamMember(*codestar.UpdateTeamMemberInput) (*codestar.UpdateTeamMemberOutput, error)
  109. UpdateTeamMemberWithContext(aws.Context, *codestar.UpdateTeamMemberInput, ...request.Option) (*codestar.UpdateTeamMemberOutput, error)
  110. UpdateTeamMemberRequest(*codestar.UpdateTeamMemberInput) (*request.Request, *codestar.UpdateTeamMemberOutput)
  111. UpdateUserProfile(*codestar.UpdateUserProfileInput) (*codestar.UpdateUserProfileOutput, error)
  112. UpdateUserProfileWithContext(aws.Context, *codestar.UpdateUserProfileInput, ...request.Option) (*codestar.UpdateUserProfileOutput, error)
  113. UpdateUserProfileRequest(*codestar.UpdateUserProfileInput) (*request.Request, *codestar.UpdateUserProfileOutput)
  114. }
  115. var _ CodeStarAPI = (*codestar.CodeStar)(nil)