Debian Codegraph @

service/opsworkscm/opsworkscmiface/interface.go

raw
1 // Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT.
2
3 // Package opsworkscmiface provides an interface to enable mocking the AWS OpsWorks CM 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 opsworkscmiface
10
11 import (
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/opsworkscm"
15 )
16
17 // OpsWorksCMAPI provides an interface to enable mocking the
18 // opsworkscm.OpsWorksCM 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 OpsWorks CM.
28 // func myFunc(svc opsworkscmiface.OpsWorksCMAPI) bool {
29 // // Make svc.AssociateNode request
30 // }
31 //
32 // func main() {
33 // sess := session.New()
34 // svc := opsworkscm.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 mockOpsWorksCMClient struct {
43 // opsworkscmiface.OpsWorksCMAPI
44 // }
45 // func (m *mockOpsWorksCMClient) AssociateNode(input *opsworkscm.AssociateNodeInput) (*opsworkscm.AssociateNodeOutput, error) {
46 // // mock response/functionality
47 // }
48 //
49 // func TestMyFunc(t *testing.T) {
50 // // Setup Test
51 // mockSvc := &mockOpsWorksCMClient{}
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 OpsWorksCMAPI interface {
63 AssociateNode(*opsworkscm.AssociateNodeInput) (*opsworkscm.AssociateNodeOutput, error)
64 AssociateNodeWithContext(aws.Context, *opsworkscm.AssociateNodeInput, ...request.Option) (*opsworkscm.AssociateNodeOutput, error)
65 AssociateNodeRequest(*opsworkscm.AssociateNodeInput) (*request.Request, *opsworkscm.AssociateNodeOutput)
66
67 CreateBackup(*opsworkscm.CreateBackupInput) (*opsworkscm.CreateBackupOutput, error)
68 CreateBackupWithContext(aws.Context, *opsworkscm.CreateBackupInput, ...request.Option) (*opsworkscm.CreateBackupOutput, error)
69 CreateBackupRequest(*opsworkscm.CreateBackupInput) (*request.Request, *opsworkscm.CreateBackupOutput)
70
71 CreateServer(*opsworkscm.CreateServerInput) (*opsworkscm.CreateServerOutput, error)
72 CreateServerWithContext(aws.Context, *opsworkscm.CreateServerInput, ...request.Option) (*opsworkscm.CreateServerOutput, error)
73 CreateServerRequest(*opsworkscm.CreateServerInput) (*request.Request, *opsworkscm.CreateServerOutput)
74
75 DeleteBackup(*opsworkscm.DeleteBackupInput) (*opsworkscm.DeleteBackupOutput, error)
76 DeleteBackupWithContext(aws.Context, *opsworkscm.DeleteBackupInput, ...request.Option) (*opsworkscm.DeleteBackupOutput, error)
77 DeleteBackupRequest(*opsworkscm.DeleteBackupInput) (*request.Request, *opsworkscm.DeleteBackupOutput)
78
79 DeleteServer(*opsworkscm.DeleteServerInput) (*opsworkscm.DeleteServerOutput, error)
80 DeleteServerWithContext(aws.Context, *opsworkscm.DeleteServerInput, ...request.Option) (*opsworkscm.DeleteServerOutput, error)
81 DeleteServerRequest(*opsworkscm.DeleteServerInput) (*request.Request, *opsworkscm.DeleteServerOutput)
82
83 DescribeAccountAttributes(*opsworkscm.DescribeAccountAttributesInput) (*opsworkscm.DescribeAccountAttributesOutput, error)
84 DescribeAccountAttributesWithContext(aws.Context, *opsworkscm.DescribeAccountAttributesInput, ...request.Option) (*opsworkscm.DescribeAccountAttributesOutput, error)
85 DescribeAccountAttributesRequest(*opsworkscm.DescribeAccountAttributesInput) (*request.Request, *opsworkscm.DescribeAccountAttributesOutput)
86
87 DescribeBackups(*opsworkscm.DescribeBackupsInput) (*opsworkscm.DescribeBackupsOutput, error)
88 DescribeBackupsWithContext(aws.Context, *opsworkscm.DescribeBackupsInput, ...request.Option) (*opsworkscm.DescribeBackupsOutput, error)
89 DescribeBackupsRequest(*opsworkscm.DescribeBackupsInput) (*request.Request, *opsworkscm.DescribeBackupsOutput)
90
91 DescribeBackupsPages(*opsworkscm.DescribeBackupsInput, func(*opsworkscm.DescribeBackupsOutput, bool) bool) error
92 DescribeBackupsPagesWithContext(aws.Context, *opsworkscm.DescribeBackupsInput, func(*opsworkscm.DescribeBackupsOutput, bool) bool, ...request.Option) error
93
94 DescribeEvents(*opsworkscm.DescribeEventsInput) (*opsworkscm.DescribeEventsOutput, error)
95 DescribeEventsWithContext(aws.Context, *opsworkscm.DescribeEventsInput, ...request.Option) (*opsworkscm.DescribeEventsOutput, error)
96 DescribeEventsRequest(*opsworkscm.DescribeEventsInput) (*request.Request, *opsworkscm.DescribeEventsOutput)
97
98 DescribeEventsPages(*opsworkscm.DescribeEventsInput, func(*opsworkscm.DescribeEventsOutput, bool) bool) error
99 DescribeEventsPagesWithContext(aws.Context, *opsworkscm.DescribeEventsInput, func(*opsworkscm.DescribeEventsOutput, bool) bool, ...request.Option) error
100
101 DescribeNodeAssociationStatus(*opsworkscm.DescribeNodeAssociationStatusInput) (*opsworkscm.DescribeNodeAssociationStatusOutput, error)
102 DescribeNodeAssociationStatusWithContext(aws.Context, *opsworkscm.DescribeNodeAssociationStatusInput, ...request.Option) (*opsworkscm.DescribeNodeAssociationStatusOutput, error)
103 DescribeNodeAssociationStatusRequest(*opsworkscm.DescribeNodeAssociationStatusInput) (*request.Request, *opsworkscm.DescribeNodeAssociationStatusOutput)
104
105 DescribeServers(*opsworkscm.DescribeServersInput) (*opsworkscm.DescribeServersOutput, error)
106 DescribeServersWithContext(aws.Context, *opsworkscm.DescribeServersInput, ...request.Option) (*opsworkscm.DescribeServersOutput, error)
107 DescribeServersRequest(*opsworkscm.DescribeServersInput) (*request.Request, *opsworkscm.DescribeServersOutput)
108
109 DescribeServersPages(*opsworkscm.DescribeServersInput, func(*opsworkscm.DescribeServersOutput, bool) bool) error
110 DescribeServersPagesWithContext(aws.Context, *opsworkscm.DescribeServersInput, func(*opsworkscm.DescribeServersOutput, bool) bool, ...request.Option) error
111
112 DisassociateNode(*opsworkscm.DisassociateNodeInput) (*opsworkscm.DisassociateNodeOutput, error)
113 DisassociateNodeWithContext(aws.Context, *opsworkscm.DisassociateNodeInput, ...request.Option) (*opsworkscm.DisassociateNodeOutput, error)
114 DisassociateNodeRequest(*opsworkscm.DisassociateNodeInput) (*request.Request, *opsworkscm.DisassociateNodeOutput)
115
116 ExportServerEngineAttribute(*opsworkscm.ExportServerEngineAttributeInput) (*opsworkscm.ExportServerEngineAttributeOutput, error)
117 ExportServerEngineAttributeWithContext(aws.Context, *opsworkscm.ExportServerEngineAttributeInput, ...request.Option) (*opsworkscm.ExportServerEngineAttributeOutput, error)
118 ExportServerEngineAttributeRequest(*opsworkscm.ExportServerEngineAttributeInput) (*request.Request, *opsworkscm.ExportServerEngineAttributeOutput)
119
120 ListTagsForResource(*opsworkscm.ListTagsForResourceInput) (*opsworkscm.ListTagsForResourceOutput, error)
121 ListTagsForResourceWithContext(aws.Context, *opsworkscm.ListTagsForResourceInput, ...request.Option) (*opsworkscm.ListTagsForResourceOutput, error)
122 ListTagsForResourceRequest(*opsworkscm.ListTagsForResourceInput) (*request.Request, *opsworkscm.ListTagsForResourceOutput)
123
124 ListTagsForResourcePages(*opsworkscm.ListTagsForResourceInput, func(*opsworkscm.ListTagsForResourceOutput, bool) bool) error
125 ListTagsForResourcePagesWithContext(aws.Context, *opsworkscm.ListTagsForResourceInput, func(*opsworkscm.ListTagsForResourceOutput, bool) bool, ...request.Option) error
126
127 RestoreServer(*opsworkscm.RestoreServerInput) (*opsworkscm.RestoreServerOutput, error)
128 RestoreServerWithContext(aws.Context, *opsworkscm.RestoreServerInput, ...request.Option) (*opsworkscm.RestoreServerOutput, error)
129 RestoreServerRequest(*opsworkscm.RestoreServerInput) (*request.Request, *opsworkscm.RestoreServerOutput)
130
131 StartMaintenance(*opsworkscm.StartMaintenanceInput) (*opsworkscm.StartMaintenanceOutput, error)
132 StartMaintenanceWithContext(aws.Context, *opsworkscm.StartMaintenanceInput, ...request.Option) (*opsworkscm.StartMaintenanceOutput, error)
133 StartMaintenanceRequest(*opsworkscm.StartMaintenanceInput) (*request.Request, *opsworkscm.StartMaintenanceOutput)
134
135 TagResource(*opsworkscm.TagResourceInput) (*opsworkscm.TagResourceOutput, error)
136 TagResourceWithContext(aws.Context, *opsworkscm.TagResourceInput, ...request.Option) (*opsworkscm.TagResourceOutput, error)
137 TagResourceRequest(*opsworkscm.TagResourceInput) (*request.Request, *opsworkscm.TagResourceOutput)
138
139 UntagResource(*opsworkscm.UntagResourceInput) (*opsworkscm.UntagResourceOutput, error)
140 UntagResourceWithContext(aws.Context, *opsworkscm.UntagResourceInput, ...request.Option) (*opsworkscm.UntagResourceOutput, error)
141 UntagResourceRequest(*opsworkscm.UntagResourceInput) (*request.Request, *opsworkscm.UntagResourceOutput)
142
143 UpdateServer(*opsworkscm.UpdateServerInput) (*opsworkscm.UpdateServerOutput, error)
144 UpdateServerWithContext(aws.Context, *opsworkscm.UpdateServerInput, ...request.Option) (*opsworkscm.UpdateServerOutput, error)
145 UpdateServerRequest(*opsworkscm.UpdateServerInput) (*request.Request, *opsworkscm.UpdateServerOutput)
146
147 UpdateServerEngineAttributes(*opsworkscm.UpdateServerEngineAttributesInput) (*opsworkscm.UpdateServerEngineAttributesOutput, error)
148 UpdateServerEngineAttributesWithContext(aws.Context, *opsworkscm.UpdateServerEngineAttributesInput, ...request.Option) (*opsworkscm.UpdateServerEngineAttributesOutput, error)
149 UpdateServerEngineAttributesRequest(*opsworkscm.UpdateServerEngineAttributesInput) (*request.Request, *opsworkscm.UpdateServerEngineAttributesOutput)
150
151 WaitUntilNodeAssociated(*opsworkscm.DescribeNodeAssociationStatusInput) error
152 WaitUntilNodeAssociatedWithContext(aws.Context, *opsworkscm.DescribeNodeAssociationStatusInput, ...request.WaiterOption) error
153 }
154
155 var _ OpsWorksCMAPI = (*opsworkscm.OpsWorksCM)(nil)