1// Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT. 2 3// Package greengrassv2iface provides an interface to enable mocking the AWS IoT Greengrass V2 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 greengrassv2iface 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/greengrassv2" 15) 16 17// GreengrassV2API provides an interface to enable mocking the 18// greengrassv2.GreengrassV2 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 IoT Greengrass V2. 28// func myFunc(svc greengrassv2iface.GreengrassV2API) bool { 29// // Make svc.BatchAssociateClientDeviceWithCoreDevice request 30// } 31// 32// func main() { 33// sess := session.New() 34// svc := greengrassv2.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 mockGreengrassV2Client struct { 43// greengrassv2iface.GreengrassV2API 44// } 45// func (m *mockGreengrassV2Client) BatchAssociateClientDeviceWithCoreDevice(input *greengrassv2.BatchAssociateClientDeviceWithCoreDeviceInput) (*greengrassv2.BatchAssociateClientDeviceWithCoreDeviceOutput, error) { 46// // mock response/functionality 47// } 48// 49// func TestMyFunc(t *testing.T) { 50// // Setup Test 51// mockSvc := &mockGreengrassV2Client{} 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 GreengrassV2API interface { 63 BatchAssociateClientDeviceWithCoreDevice(*greengrassv2.BatchAssociateClientDeviceWithCoreDeviceInput) (*greengrassv2.BatchAssociateClientDeviceWithCoreDeviceOutput, error) 64 BatchAssociateClientDeviceWithCoreDeviceWithContext(aws.Context, *greengrassv2.BatchAssociateClientDeviceWithCoreDeviceInput, ...request.Option) (*greengrassv2.BatchAssociateClientDeviceWithCoreDeviceOutput, error) 65 BatchAssociateClientDeviceWithCoreDeviceRequest(*greengrassv2.BatchAssociateClientDeviceWithCoreDeviceInput) (*request.Request, *greengrassv2.BatchAssociateClientDeviceWithCoreDeviceOutput) 66 67 BatchDisassociateClientDeviceFromCoreDevice(*greengrassv2.BatchDisassociateClientDeviceFromCoreDeviceInput) (*greengrassv2.BatchDisassociateClientDeviceFromCoreDeviceOutput, error) 68 BatchDisassociateClientDeviceFromCoreDeviceWithContext(aws.Context, *greengrassv2.BatchDisassociateClientDeviceFromCoreDeviceInput, ...request.Option) (*greengrassv2.BatchDisassociateClientDeviceFromCoreDeviceOutput, error) 69 BatchDisassociateClientDeviceFromCoreDeviceRequest(*greengrassv2.BatchDisassociateClientDeviceFromCoreDeviceInput) (*request.Request, *greengrassv2.BatchDisassociateClientDeviceFromCoreDeviceOutput) 70 71 CancelDeployment(*greengrassv2.CancelDeploymentInput) (*greengrassv2.CancelDeploymentOutput, error) 72 CancelDeploymentWithContext(aws.Context, *greengrassv2.CancelDeploymentInput, ...request.Option) (*greengrassv2.CancelDeploymentOutput, error) 73 CancelDeploymentRequest(*greengrassv2.CancelDeploymentInput) (*request.Request, *greengrassv2.CancelDeploymentOutput) 74 75 CreateComponentVersion(*greengrassv2.CreateComponentVersionInput) (*greengrassv2.CreateComponentVersionOutput, error) 76 CreateComponentVersionWithContext(aws.Context, *greengrassv2.CreateComponentVersionInput, ...request.Option) (*greengrassv2.CreateComponentVersionOutput, error) 77 CreateComponentVersionRequest(*greengrassv2.CreateComponentVersionInput) (*request.Request, *greengrassv2.CreateComponentVersionOutput) 78 79 CreateDeployment(*greengrassv2.CreateDeploymentInput) (*greengrassv2.CreateDeploymentOutput, error) 80 CreateDeploymentWithContext(aws.Context, *greengrassv2.CreateDeploymentInput, ...request.Option) (*greengrassv2.CreateDeploymentOutput, error) 81 CreateDeploymentRequest(*greengrassv2.CreateDeploymentInput) (*request.Request, *greengrassv2.CreateDeploymentOutput) 82 83 DeleteComponent(*greengrassv2.DeleteComponentInput) (*greengrassv2.DeleteComponentOutput, error) 84 DeleteComponentWithContext(aws.Context, *greengrassv2.DeleteComponentInput, ...request.Option) (*greengrassv2.DeleteComponentOutput, error) 85 DeleteComponentRequest(*greengrassv2.DeleteComponentInput) (*request.Request, *greengrassv2.DeleteComponentOutput) 86 87 DeleteCoreDevice(*greengrassv2.DeleteCoreDeviceInput) (*greengrassv2.DeleteCoreDeviceOutput, error) 88 DeleteCoreDeviceWithContext(aws.Context, *greengrassv2.DeleteCoreDeviceInput, ...request.Option) (*greengrassv2.DeleteCoreDeviceOutput, error) 89 DeleteCoreDeviceRequest(*greengrassv2.DeleteCoreDeviceInput) (*request.Request, *greengrassv2.DeleteCoreDeviceOutput) 90 91 DescribeComponent(*greengrassv2.DescribeComponentInput) (*greengrassv2.DescribeComponentOutput, error) 92 DescribeComponentWithContext(aws.Context, *greengrassv2.DescribeComponentInput, ...request.Option) (*greengrassv2.DescribeComponentOutput, error) 93 DescribeComponentRequest(*greengrassv2.DescribeComponentInput) (*request.Request, *greengrassv2.DescribeComponentOutput) 94 95 GetComponent(*greengrassv2.GetComponentInput) (*greengrassv2.GetComponentOutput, error) 96 GetComponentWithContext(aws.Context, *greengrassv2.GetComponentInput, ...request.Option) (*greengrassv2.GetComponentOutput, error) 97 GetComponentRequest(*greengrassv2.GetComponentInput) (*request.Request, *greengrassv2.GetComponentOutput) 98 99 GetComponentVersionArtifact(*greengrassv2.GetComponentVersionArtifactInput) (*greengrassv2.GetComponentVersionArtifactOutput, error) 100 GetComponentVersionArtifactWithContext(aws.Context, *greengrassv2.GetComponentVersionArtifactInput, ...request.Option) (*greengrassv2.GetComponentVersionArtifactOutput, error) 101 GetComponentVersionArtifactRequest(*greengrassv2.GetComponentVersionArtifactInput) (*request.Request, *greengrassv2.GetComponentVersionArtifactOutput) 102 103 GetCoreDevice(*greengrassv2.GetCoreDeviceInput) (*greengrassv2.GetCoreDeviceOutput, error) 104 GetCoreDeviceWithContext(aws.Context, *greengrassv2.GetCoreDeviceInput, ...request.Option) (*greengrassv2.GetCoreDeviceOutput, error) 105 GetCoreDeviceRequest(*greengrassv2.GetCoreDeviceInput) (*request.Request, *greengrassv2.GetCoreDeviceOutput) 106 107 GetDeployment(*greengrassv2.GetDeploymentInput) (*greengrassv2.GetDeploymentOutput, error) 108 GetDeploymentWithContext(aws.Context, *greengrassv2.GetDeploymentInput, ...request.Option) (*greengrassv2.GetDeploymentOutput, error) 109 GetDeploymentRequest(*greengrassv2.GetDeploymentInput) (*request.Request, *greengrassv2.GetDeploymentOutput) 110 111 ListClientDevicesAssociatedWithCoreDevice(*greengrassv2.ListClientDevicesAssociatedWithCoreDeviceInput) (*greengrassv2.ListClientDevicesAssociatedWithCoreDeviceOutput, error) 112 ListClientDevicesAssociatedWithCoreDeviceWithContext(aws.Context, *greengrassv2.ListClientDevicesAssociatedWithCoreDeviceInput, ...request.Option) (*greengrassv2.ListClientDevicesAssociatedWithCoreDeviceOutput, error) 113 ListClientDevicesAssociatedWithCoreDeviceRequest(*greengrassv2.ListClientDevicesAssociatedWithCoreDeviceInput) (*request.Request, *greengrassv2.ListClientDevicesAssociatedWithCoreDeviceOutput) 114 115 ListClientDevicesAssociatedWithCoreDevicePages(*greengrassv2.ListClientDevicesAssociatedWithCoreDeviceInput, func(*greengrassv2.ListClientDevicesAssociatedWithCoreDeviceOutput, bool) bool) error 116 ListClientDevicesAssociatedWithCoreDevicePagesWithContext(aws.Context, *greengrassv2.ListClientDevicesAssociatedWithCoreDeviceInput, func(*greengrassv2.ListClientDevicesAssociatedWithCoreDeviceOutput, bool) bool, ...request.Option) error 117 118 ListComponentVersions(*greengrassv2.ListComponentVersionsInput) (*greengrassv2.ListComponentVersionsOutput, error) 119 ListComponentVersionsWithContext(aws.Context, *greengrassv2.ListComponentVersionsInput, ...request.Option) (*greengrassv2.ListComponentVersionsOutput, error) 120 ListComponentVersionsRequest(*greengrassv2.ListComponentVersionsInput) (*request.Request, *greengrassv2.ListComponentVersionsOutput) 121 122 ListComponentVersionsPages(*greengrassv2.ListComponentVersionsInput, func(*greengrassv2.ListComponentVersionsOutput, bool) bool) error 123 ListComponentVersionsPagesWithContext(aws.Context, *greengrassv2.ListComponentVersionsInput, func(*greengrassv2.ListComponentVersionsOutput, bool) bool, ...request.Option) error 124 125 ListComponents(*greengrassv2.ListComponentsInput) (*greengrassv2.ListComponentsOutput, error) 126 ListComponentsWithContext(aws.Context, *greengrassv2.ListComponentsInput, ...request.Option) (*greengrassv2.ListComponentsOutput, error) 127 ListComponentsRequest(*greengrassv2.ListComponentsInput) (*request.Request, *greengrassv2.ListComponentsOutput) 128 129 ListComponentsPages(*greengrassv2.ListComponentsInput, func(*greengrassv2.ListComponentsOutput, bool) bool) error 130 ListComponentsPagesWithContext(aws.Context, *greengrassv2.ListComponentsInput, func(*greengrassv2.ListComponentsOutput, bool) bool, ...request.Option) error 131 132 ListCoreDevices(*greengrassv2.ListCoreDevicesInput) (*greengrassv2.ListCoreDevicesOutput, error) 133 ListCoreDevicesWithContext(aws.Context, *greengrassv2.ListCoreDevicesInput, ...request.Option) (*greengrassv2.ListCoreDevicesOutput, error) 134 ListCoreDevicesRequest(*greengrassv2.ListCoreDevicesInput) (*request.Request, *greengrassv2.ListCoreDevicesOutput) 135 136 ListCoreDevicesPages(*greengrassv2.ListCoreDevicesInput, func(*greengrassv2.ListCoreDevicesOutput, bool) bool) error 137 ListCoreDevicesPagesWithContext(aws.Context, *greengrassv2.ListCoreDevicesInput, func(*greengrassv2.ListCoreDevicesOutput, bool) bool, ...request.Option) error 138 139 ListDeployments(*greengrassv2.ListDeploymentsInput) (*greengrassv2.ListDeploymentsOutput, error) 140 ListDeploymentsWithContext(aws.Context, *greengrassv2.ListDeploymentsInput, ...request.Option) (*greengrassv2.ListDeploymentsOutput, error) 141 ListDeploymentsRequest(*greengrassv2.ListDeploymentsInput) (*request.Request, *greengrassv2.ListDeploymentsOutput) 142 143 ListDeploymentsPages(*greengrassv2.ListDeploymentsInput, func(*greengrassv2.ListDeploymentsOutput, bool) bool) error 144 ListDeploymentsPagesWithContext(aws.Context, *greengrassv2.ListDeploymentsInput, func(*greengrassv2.ListDeploymentsOutput, bool) bool, ...request.Option) error 145 146 ListEffectiveDeployments(*greengrassv2.ListEffectiveDeploymentsInput) (*greengrassv2.ListEffectiveDeploymentsOutput, error) 147 ListEffectiveDeploymentsWithContext(aws.Context, *greengrassv2.ListEffectiveDeploymentsInput, ...request.Option) (*greengrassv2.ListEffectiveDeploymentsOutput, error) 148 ListEffectiveDeploymentsRequest(*greengrassv2.ListEffectiveDeploymentsInput) (*request.Request, *greengrassv2.ListEffectiveDeploymentsOutput) 149 150 ListEffectiveDeploymentsPages(*greengrassv2.ListEffectiveDeploymentsInput, func(*greengrassv2.ListEffectiveDeploymentsOutput, bool) bool) error 151 ListEffectiveDeploymentsPagesWithContext(aws.Context, *greengrassv2.ListEffectiveDeploymentsInput, func(*greengrassv2.ListEffectiveDeploymentsOutput, bool) bool, ...request.Option) error 152 153 ListInstalledComponents(*greengrassv2.ListInstalledComponentsInput) (*greengrassv2.ListInstalledComponentsOutput, error) 154 ListInstalledComponentsWithContext(aws.Context, *greengrassv2.ListInstalledComponentsInput, ...request.Option) (*greengrassv2.ListInstalledComponentsOutput, error) 155 ListInstalledComponentsRequest(*greengrassv2.ListInstalledComponentsInput) (*request.Request, *greengrassv2.ListInstalledComponentsOutput) 156 157 ListInstalledComponentsPages(*greengrassv2.ListInstalledComponentsInput, func(*greengrassv2.ListInstalledComponentsOutput, bool) bool) error 158 ListInstalledComponentsPagesWithContext(aws.Context, *greengrassv2.ListInstalledComponentsInput, func(*greengrassv2.ListInstalledComponentsOutput, bool) bool, ...request.Option) error 159 160 ListTagsForResource(*greengrassv2.ListTagsForResourceInput) (*greengrassv2.ListTagsForResourceOutput, error) 161 ListTagsForResourceWithContext(aws.Context, *greengrassv2.ListTagsForResourceInput, ...request.Option) (*greengrassv2.ListTagsForResourceOutput, error) 162 ListTagsForResourceRequest(*greengrassv2.ListTagsForResourceInput) (*request.Request, *greengrassv2.ListTagsForResourceOutput) 163 164 ResolveComponentCandidates(*greengrassv2.ResolveComponentCandidatesInput) (*greengrassv2.ResolveComponentCandidatesOutput, error) 165 ResolveComponentCandidatesWithContext(aws.Context, *greengrassv2.ResolveComponentCandidatesInput, ...request.Option) (*greengrassv2.ResolveComponentCandidatesOutput, error) 166 ResolveComponentCandidatesRequest(*greengrassv2.ResolveComponentCandidatesInput) (*request.Request, *greengrassv2.ResolveComponentCandidatesOutput) 167 168 TagResource(*greengrassv2.TagResourceInput) (*greengrassv2.TagResourceOutput, error) 169 TagResourceWithContext(aws.Context, *greengrassv2.TagResourceInput, ...request.Option) (*greengrassv2.TagResourceOutput, error) 170 TagResourceRequest(*greengrassv2.TagResourceInput) (*request.Request, *greengrassv2.TagResourceOutput) 171 172 UntagResource(*greengrassv2.UntagResourceInput) (*greengrassv2.UntagResourceOutput, error) 173 UntagResourceWithContext(aws.Context, *greengrassv2.UntagResourceInput, ...request.Option) (*greengrassv2.UntagResourceOutput, error) 174 UntagResourceRequest(*greengrassv2.UntagResourceInput) (*request.Request, *greengrassv2.UntagResourceOutput) 175} 176 177var _ GreengrassV2API = (*greengrassv2.GreengrassV2)(nil) 178