interface.go 8.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140
  1. // Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT.
  2. // Package codebuildiface provides an interface to enable mocking the AWS CodeBuild 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 codebuildiface
  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/codebuild"
  13. )
  14. // CodeBuildAPI provides an interface to enable mocking the
  15. // codebuild.CodeBuild 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 CodeBuild.
  25. // func myFunc(svc codebuildiface.CodeBuildAPI) bool {
  26. // // Make svc.BatchDeleteBuilds request
  27. // }
  28. //
  29. // func main() {
  30. // sess := session.New()
  31. // svc := codebuild.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 mockCodeBuildClient struct {
  40. // codebuildiface.CodeBuildAPI
  41. // }
  42. // func (m *mockCodeBuildClient) BatchDeleteBuilds(input *codebuild.BatchDeleteBuildsInput) (*codebuild.BatchDeleteBuildsOutput, error) {
  43. // // mock response/functionality
  44. // }
  45. //
  46. // func TestMyFunc(t *testing.T) {
  47. // // Setup Test
  48. // mockSvc := &mockCodeBuildClient{}
  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 CodeBuildAPI interface {
  60. BatchDeleteBuilds(*codebuild.BatchDeleteBuildsInput) (*codebuild.BatchDeleteBuildsOutput, error)
  61. BatchDeleteBuildsWithContext(aws.Context, *codebuild.BatchDeleteBuildsInput, ...request.Option) (*codebuild.BatchDeleteBuildsOutput, error)
  62. BatchDeleteBuildsRequest(*codebuild.BatchDeleteBuildsInput) (*request.Request, *codebuild.BatchDeleteBuildsOutput)
  63. BatchGetBuilds(*codebuild.BatchGetBuildsInput) (*codebuild.BatchGetBuildsOutput, error)
  64. BatchGetBuildsWithContext(aws.Context, *codebuild.BatchGetBuildsInput, ...request.Option) (*codebuild.BatchGetBuildsOutput, error)
  65. BatchGetBuildsRequest(*codebuild.BatchGetBuildsInput) (*request.Request, *codebuild.BatchGetBuildsOutput)
  66. BatchGetProjects(*codebuild.BatchGetProjectsInput) (*codebuild.BatchGetProjectsOutput, error)
  67. BatchGetProjectsWithContext(aws.Context, *codebuild.BatchGetProjectsInput, ...request.Option) (*codebuild.BatchGetProjectsOutput, error)
  68. BatchGetProjectsRequest(*codebuild.BatchGetProjectsInput) (*request.Request, *codebuild.BatchGetProjectsOutput)
  69. CreateProject(*codebuild.CreateProjectInput) (*codebuild.CreateProjectOutput, error)
  70. CreateProjectWithContext(aws.Context, *codebuild.CreateProjectInput, ...request.Option) (*codebuild.CreateProjectOutput, error)
  71. CreateProjectRequest(*codebuild.CreateProjectInput) (*request.Request, *codebuild.CreateProjectOutput)
  72. CreateWebhook(*codebuild.CreateWebhookInput) (*codebuild.CreateWebhookOutput, error)
  73. CreateWebhookWithContext(aws.Context, *codebuild.CreateWebhookInput, ...request.Option) (*codebuild.CreateWebhookOutput, error)
  74. CreateWebhookRequest(*codebuild.CreateWebhookInput) (*request.Request, *codebuild.CreateWebhookOutput)
  75. DeleteProject(*codebuild.DeleteProjectInput) (*codebuild.DeleteProjectOutput, error)
  76. DeleteProjectWithContext(aws.Context, *codebuild.DeleteProjectInput, ...request.Option) (*codebuild.DeleteProjectOutput, error)
  77. DeleteProjectRequest(*codebuild.DeleteProjectInput) (*request.Request, *codebuild.DeleteProjectOutput)
  78. DeleteSourceCredentials(*codebuild.DeleteSourceCredentialsInput) (*codebuild.DeleteSourceCredentialsOutput, error)
  79. DeleteSourceCredentialsWithContext(aws.Context, *codebuild.DeleteSourceCredentialsInput, ...request.Option) (*codebuild.DeleteSourceCredentialsOutput, error)
  80. DeleteSourceCredentialsRequest(*codebuild.DeleteSourceCredentialsInput) (*request.Request, *codebuild.DeleteSourceCredentialsOutput)
  81. DeleteWebhook(*codebuild.DeleteWebhookInput) (*codebuild.DeleteWebhookOutput, error)
  82. DeleteWebhookWithContext(aws.Context, *codebuild.DeleteWebhookInput, ...request.Option) (*codebuild.DeleteWebhookOutput, error)
  83. DeleteWebhookRequest(*codebuild.DeleteWebhookInput) (*request.Request, *codebuild.DeleteWebhookOutput)
  84. ImportSourceCredentials(*codebuild.ImportSourceCredentialsInput) (*codebuild.ImportSourceCredentialsOutput, error)
  85. ImportSourceCredentialsWithContext(aws.Context, *codebuild.ImportSourceCredentialsInput, ...request.Option) (*codebuild.ImportSourceCredentialsOutput, error)
  86. ImportSourceCredentialsRequest(*codebuild.ImportSourceCredentialsInput) (*request.Request, *codebuild.ImportSourceCredentialsOutput)
  87. InvalidateProjectCache(*codebuild.InvalidateProjectCacheInput) (*codebuild.InvalidateProjectCacheOutput, error)
  88. InvalidateProjectCacheWithContext(aws.Context, *codebuild.InvalidateProjectCacheInput, ...request.Option) (*codebuild.InvalidateProjectCacheOutput, error)
  89. InvalidateProjectCacheRequest(*codebuild.InvalidateProjectCacheInput) (*request.Request, *codebuild.InvalidateProjectCacheOutput)
  90. ListBuilds(*codebuild.ListBuildsInput) (*codebuild.ListBuildsOutput, error)
  91. ListBuildsWithContext(aws.Context, *codebuild.ListBuildsInput, ...request.Option) (*codebuild.ListBuildsOutput, error)
  92. ListBuildsRequest(*codebuild.ListBuildsInput) (*request.Request, *codebuild.ListBuildsOutput)
  93. ListBuildsForProject(*codebuild.ListBuildsForProjectInput) (*codebuild.ListBuildsForProjectOutput, error)
  94. ListBuildsForProjectWithContext(aws.Context, *codebuild.ListBuildsForProjectInput, ...request.Option) (*codebuild.ListBuildsForProjectOutput, error)
  95. ListBuildsForProjectRequest(*codebuild.ListBuildsForProjectInput) (*request.Request, *codebuild.ListBuildsForProjectOutput)
  96. ListCuratedEnvironmentImages(*codebuild.ListCuratedEnvironmentImagesInput) (*codebuild.ListCuratedEnvironmentImagesOutput, error)
  97. ListCuratedEnvironmentImagesWithContext(aws.Context, *codebuild.ListCuratedEnvironmentImagesInput, ...request.Option) (*codebuild.ListCuratedEnvironmentImagesOutput, error)
  98. ListCuratedEnvironmentImagesRequest(*codebuild.ListCuratedEnvironmentImagesInput) (*request.Request, *codebuild.ListCuratedEnvironmentImagesOutput)
  99. ListProjects(*codebuild.ListProjectsInput) (*codebuild.ListProjectsOutput, error)
  100. ListProjectsWithContext(aws.Context, *codebuild.ListProjectsInput, ...request.Option) (*codebuild.ListProjectsOutput, error)
  101. ListProjectsRequest(*codebuild.ListProjectsInput) (*request.Request, *codebuild.ListProjectsOutput)
  102. ListSourceCredentials(*codebuild.ListSourceCredentialsInput) (*codebuild.ListSourceCredentialsOutput, error)
  103. ListSourceCredentialsWithContext(aws.Context, *codebuild.ListSourceCredentialsInput, ...request.Option) (*codebuild.ListSourceCredentialsOutput, error)
  104. ListSourceCredentialsRequest(*codebuild.ListSourceCredentialsInput) (*request.Request, *codebuild.ListSourceCredentialsOutput)
  105. StartBuild(*codebuild.StartBuildInput) (*codebuild.StartBuildOutput, error)
  106. StartBuildWithContext(aws.Context, *codebuild.StartBuildInput, ...request.Option) (*codebuild.StartBuildOutput, error)
  107. StartBuildRequest(*codebuild.StartBuildInput) (*request.Request, *codebuild.StartBuildOutput)
  108. StopBuild(*codebuild.StopBuildInput) (*codebuild.StopBuildOutput, error)
  109. StopBuildWithContext(aws.Context, *codebuild.StopBuildInput, ...request.Option) (*codebuild.StopBuildOutput, error)
  110. StopBuildRequest(*codebuild.StopBuildInput) (*request.Request, *codebuild.StopBuildOutput)
  111. UpdateProject(*codebuild.UpdateProjectInput) (*codebuild.UpdateProjectOutput, error)
  112. UpdateProjectWithContext(aws.Context, *codebuild.UpdateProjectInput, ...request.Option) (*codebuild.UpdateProjectOutput, error)
  113. UpdateProjectRequest(*codebuild.UpdateProjectInput) (*request.Request, *codebuild.UpdateProjectOutput)
  114. UpdateWebhook(*codebuild.UpdateWebhookInput) (*codebuild.UpdateWebhookOutput, error)
  115. UpdateWebhookWithContext(aws.Context, *codebuild.UpdateWebhookInput, ...request.Option) (*codebuild.UpdateWebhookOutput, error)
  116. UpdateWebhookRequest(*codebuild.UpdateWebhookInput) (*request.Request, *codebuild.UpdateWebhookOutput)
  117. }
  118. var _ CodeBuildAPI = (*codebuild.CodeBuild)(nil)