Documentation ¶
Overview ¶
Package keciface provides an interface to enable mocking the kec service client for testing your code.
It is important to note that this interface will have breaking changes when the service model is updated and adds new API operations, paginators, and waiters.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type KecAPI ¶
type KecAPI interface { AddVmIntoDataGuard(*map[string]interface{}) (*map[string]interface{}, error) AddVmIntoDataGuardWithContext(aws.Context, *map[string]interface{}, ...request.Option) (*map[string]interface{}, error) AddVmIntoDataGuardRequest(*map[string]interface{}) (*request.Request, *map[string]interface{}) ApplyAutoSnapshotPolicy(*map[string]interface{}) (*map[string]interface{}, error) ApplyAutoSnapshotPolicyWithContext(aws.Context, *map[string]interface{}, ...request.Option) (*map[string]interface{}, error) ApplyAutoSnapshotPolicyRequest(*map[string]interface{}) (*request.Request, *map[string]interface{}) AttachInstance(*map[string]interface{}) (*map[string]interface{}, error) AttachInstanceWithContext(aws.Context, *map[string]interface{}, ...request.Option) (*map[string]interface{}, error) AttachInstanceRequest(*map[string]interface{}) (*request.Request, *map[string]interface{}) AttachInstancesIamRole(*map[string]interface{}) (*map[string]interface{}, error) AttachInstancesIamRoleWithContext(aws.Context, *map[string]interface{}, ...request.Option) (*map[string]interface{}, error) AttachInstancesIamRoleRequest(*map[string]interface{}) (*request.Request, *map[string]interface{}) AttachKey(*map[string]interface{}) (*map[string]interface{}, error) AttachKeyWithContext(aws.Context, *map[string]interface{}, ...request.Option) (*map[string]interface{}, error) AttachKeyRequest(*map[string]interface{}) (*request.Request, *map[string]interface{}) AttachNetworkInterface(*map[string]interface{}) (*map[string]interface{}, error) AttachNetworkInterfaceWithContext(aws.Context, *map[string]interface{}, ...request.Option) (*map[string]interface{}, error) AttachNetworkInterfaceRequest(*map[string]interface{}) (*request.Request, *map[string]interface{}) CalculatePolicyInVolumeNum(*map[string]interface{}) (*map[string]interface{}, error) CalculatePolicyInVolumeNumWithContext(aws.Context, *map[string]interface{}, ...request.Option) (*map[string]interface{}, error) CalculatePolicyInVolumeNumRequest(*map[string]interface{}) (*request.Request, *map[string]interface{}) CalculatePolicyNum(*map[string]interface{}) (*map[string]interface{}, error) CalculatePolicyNumWithContext(aws.Context, *map[string]interface{}, ...request.Option) (*map[string]interface{}, error) CalculatePolicyNumRequest(*map[string]interface{}) (*request.Request, *map[string]interface{}) CancelAutoSnapshotPolicy(*map[string]interface{}) (*map[string]interface{}, error) CancelAutoSnapshotPolicyWithContext(aws.Context, *map[string]interface{}, ...request.Option) (*map[string]interface{}, error) CancelAutoSnapshotPolicyRequest(*map[string]interface{}) (*request.Request, *map[string]interface{}) CopyImage(*map[string]interface{}) (*map[string]interface{}, error) CopyImageWithContext(aws.Context, *map[string]interface{}, ...request.Option) (*map[string]interface{}, error) CopyImageRequest(*map[string]interface{}) (*request.Request, *map[string]interface{}) CreateAutoSnapshotPolicy(*map[string]interface{}) (*map[string]interface{}, error) CreateAutoSnapshotPolicyWithContext(aws.Context, *map[string]interface{}, ...request.Option) (*map[string]interface{}, error) CreateAutoSnapshotPolicyRequest(*map[string]interface{}) (*request.Request, *map[string]interface{}) CreateDataGuardGroup(*map[string]interface{}) (*map[string]interface{}, error) CreateDataGuardGroupWithContext(aws.Context, *map[string]interface{}, ...request.Option) (*map[string]interface{}, error) CreateDataGuardGroupRequest(*map[string]interface{}) (*request.Request, *map[string]interface{}) CreateImage(*map[string]interface{}) (*map[string]interface{}, error) CreateImageWithContext(aws.Context, *map[string]interface{}, ...request.Option) (*map[string]interface{}, error) CreateImageRequest(*map[string]interface{}) (*request.Request, *map[string]interface{}) CreateLocalVolumeSnapshot(*map[string]interface{}) (*map[string]interface{}, error) CreateLocalVolumeSnapshotWithContext(aws.Context, *map[string]interface{}, ...request.Option) (*map[string]interface{}, error) CreateLocalVolumeSnapshotRequest(*map[string]interface{}) (*request.Request, *map[string]interface{}) CreateScalingConfiguration(*map[string]interface{}) (*map[string]interface{}, error) CreateScalingConfigurationWithContext(aws.Context, *map[string]interface{}, ...request.Option) (*map[string]interface{}, error) CreateScalingConfigurationRequest(*map[string]interface{}) (*request.Request, *map[string]interface{}) CreateScalingGroup(*map[string]interface{}) (*map[string]interface{}, error) CreateScalingGroupWithContext(aws.Context, *map[string]interface{}, ...request.Option) (*map[string]interface{}, error) CreateScalingGroupRequest(*map[string]interface{}) (*request.Request, *map[string]interface{}) CreateScalingNotification(*map[string]interface{}) (*map[string]interface{}, error) CreateScalingNotificationWithContext(aws.Context, *map[string]interface{}, ...request.Option) (*map[string]interface{}, error) CreateScalingNotificationRequest(*map[string]interface{}) (*request.Request, *map[string]interface{}) CreateScalingPolicy(*map[string]interface{}) (*map[string]interface{}, error) CreateScalingPolicyWithContext(aws.Context, *map[string]interface{}, ...request.Option) (*map[string]interface{}, error) CreateScalingPolicyRequest(*map[string]interface{}) (*request.Request, *map[string]interface{}) CreateScheduledTask(*map[string]interface{}) (*map[string]interface{}, error) CreateScheduledTaskWithContext(aws.Context, *map[string]interface{}, ...request.Option) (*map[string]interface{}, error) CreateScheduledTaskRequest(*map[string]interface{}) (*request.Request, *map[string]interface{}) DeleteAutoSnapshotPolicy(*map[string]interface{}) (*map[string]interface{}, error) DeleteAutoSnapshotPolicyWithContext(aws.Context, *map[string]interface{}, ...request.Option) (*map[string]interface{}, error) DeleteAutoSnapshotPolicyRequest(*map[string]interface{}) (*request.Request, *map[string]interface{}) DeleteDataGuardGroups(*map[string]interface{}) (*map[string]interface{}, error) DeleteDataGuardGroupsWithContext(aws.Context, *map[string]interface{}, ...request.Option) (*map[string]interface{}, error) DeleteDataGuardGroupsRequest(*map[string]interface{}) (*request.Request, *map[string]interface{}) DeleteLocalVolumeSnapshot(*map[string]interface{}) (*map[string]interface{}, error) DeleteLocalVolumeSnapshotWithContext(aws.Context, *map[string]interface{}, ...request.Option) (*map[string]interface{}, error) DeleteLocalVolumeSnapshotRequest(*map[string]interface{}) (*request.Request, *map[string]interface{}) DeleteScalingConfiguration(*map[string]interface{}) (*map[string]interface{}, error) DeleteScalingConfigurationWithContext(aws.Context, *map[string]interface{}, ...request.Option) (*map[string]interface{}, error) DeleteScalingConfigurationRequest(*map[string]interface{}) (*request.Request, *map[string]interface{}) DeleteScalingGroup(*map[string]interface{}) (*map[string]interface{}, error) DeleteScalingGroupWithContext(aws.Context, *map[string]interface{}, ...request.Option) (*map[string]interface{}, error) DeleteScalingGroupRequest(*map[string]interface{}) (*request.Request, *map[string]interface{}) DeleteScalingPolicy(*map[string]interface{}) (*map[string]interface{}, error) DeleteScalingPolicyWithContext(aws.Context, *map[string]interface{}, ...request.Option) (*map[string]interface{}, error) DeleteScalingPolicyRequest(*map[string]interface{}) (*request.Request, *map[string]interface{}) DeleteScheduledTask(*map[string]interface{}) (*map[string]interface{}, error) DeleteScheduledTaskWithContext(aws.Context, *map[string]interface{}, ...request.Option) (*map[string]interface{}, error) DeleteScheduledTaskRequest(*map[string]interface{}) (*request.Request, *map[string]interface{}) DescribeAutoSnapshotPolicy(*map[string]interface{}) (*map[string]interface{}, error) DescribeAutoSnapshotPolicyWithContext(aws.Context, *map[string]interface{}, ...request.Option) (*map[string]interface{}, error) DescribeAutoSnapshotPolicyRequest(*map[string]interface{}) (*request.Request, *map[string]interface{}) DescribeAvailabilityZones(*map[string]interface{}) (*map[string]interface{}, error) DescribeAvailabilityZonesWithContext(aws.Context, *map[string]interface{}, ...request.Option) (*map[string]interface{}, error) DescribeAvailabilityZonesRequest(*map[string]interface{}) (*request.Request, *map[string]interface{}) DescribeDataGuardCapacity(*map[string]interface{}) (*map[string]interface{}, error) DescribeDataGuardCapacityWithContext(aws.Context, *map[string]interface{}, ...request.Option) (*map[string]interface{}, error) DescribeDataGuardCapacityRequest(*map[string]interface{}) (*request.Request, *map[string]interface{}) DescribeDataGuardGroup(*map[string]interface{}) (*map[string]interface{}, error) DescribeDataGuardGroupWithContext(aws.Context, *map[string]interface{}, ...request.Option) (*map[string]interface{}, error) DescribeDataGuardGroupRequest(*map[string]interface{}) (*request.Request, *map[string]interface{}) DescribeImages(*map[string]interface{}) (*map[string]interface{}, error) DescribeImagesWithContext(aws.Context, *map[string]interface{}, ...request.Option) (*map[string]interface{}, error) DescribeImagesRequest(*map[string]interface{}) (*request.Request, *map[string]interface{}) DescribeInstanceFamilys(*map[string]interface{}) (*map[string]interface{}, error) DescribeInstanceFamilysWithContext(aws.Context, *map[string]interface{}, ...request.Option) (*map[string]interface{}, error) DescribeInstanceFamilysRequest(*map[string]interface{}) (*request.Request, *map[string]interface{}) DescribeInstanceTypeConfigs(*map[string]interface{}) (*map[string]interface{}, error) DescribeInstanceTypeConfigsWithContext(aws.Context, *map[string]interface{}, ...request.Option) (*map[string]interface{}, error) DescribeInstanceTypeConfigsRequest(*map[string]interface{}) (*request.Request, *map[string]interface{}) DescribeInstanceVnc(*map[string]interface{}) (*map[string]interface{}, error) DescribeInstanceVncWithContext(aws.Context, *map[string]interface{}, ...request.Option) (*map[string]interface{}, error) DescribeInstanceVncRequest(*map[string]interface{}) (*request.Request, *map[string]interface{}) DescribeInstances(*map[string]interface{}) (*map[string]interface{}, error) DescribeInstancesWithContext(aws.Context, *map[string]interface{}, ...request.Option) (*map[string]interface{}, error) DescribeInstancesRequest(*map[string]interface{}) (*request.Request, *map[string]interface{}) DescribeKecIamRoles(*map[string]interface{}) (*map[string]interface{}, error) DescribeKecIamRolesWithContext(aws.Context, *map[string]interface{}, ...request.Option) (*map[string]interface{}, error) DescribeKecIamRolesRequest(*map[string]interface{}) (*request.Request, *map[string]interface{}) DescribeKecInventory(*map[string]interface{}) (*map[string]interface{}, error) DescribeKecInventoryWithContext(aws.Context, *map[string]interface{}, ...request.Option) (*map[string]interface{}, error) DescribeKecInventoryRequest(*map[string]interface{}) (*request.Request, *map[string]interface{}) DescribeLocalVolumeSnapshots(*map[string]interface{}) (*map[string]interface{}, error) DescribeLocalVolumeSnapshotsWithContext(aws.Context, *map[string]interface{}, ...request.Option) (*map[string]interface{}, error) DescribeLocalVolumeSnapshotsRequest(*map[string]interface{}) (*request.Request, *map[string]interface{}) DescribeLocalVolumes(*map[string]interface{}) (*map[string]interface{}, error) DescribeLocalVolumesWithContext(aws.Context, *map[string]interface{}, ...request.Option) (*map[string]interface{}, error) DescribeLocalVolumesRequest(*map[string]interface{}) (*request.Request, *map[string]interface{}) DescribeRegions(*map[string]interface{}) (*map[string]interface{}, error) DescribeRegionsWithContext(aws.Context, *map[string]interface{}, ...request.Option) (*map[string]interface{}, error) DescribeRegionsRequest(*map[string]interface{}) (*request.Request, *map[string]interface{}) DescribeScalingActivity(*map[string]interface{}) (*map[string]interface{}, error) DescribeScalingActivityWithContext(aws.Context, *map[string]interface{}, ...request.Option) (*map[string]interface{}, error) DescribeScalingActivityRequest(*map[string]interface{}) (*request.Request, *map[string]interface{}) DescribeScalingConfiguration(*map[string]interface{}) (*map[string]interface{}, error) DescribeScalingConfigurationWithContext(aws.Context, *map[string]interface{}, ...request.Option) (*map[string]interface{}, error) DescribeScalingConfigurationRequest(*map[string]interface{}) (*request.Request, *map[string]interface{}) DescribeScalingGroup(*map[string]interface{}) (*map[string]interface{}, error) DescribeScalingGroupWithContext(aws.Context, *map[string]interface{}, ...request.Option) (*map[string]interface{}, error) DescribeScalingGroupRequest(*map[string]interface{}) (*request.Request, *map[string]interface{}) DescribeScalingInstance(*map[string]interface{}) (*map[string]interface{}, error) DescribeScalingInstanceWithContext(aws.Context, *map[string]interface{}, ...request.Option) (*map[string]interface{}, error) DescribeScalingInstanceRequest(*map[string]interface{}) (*request.Request, *map[string]interface{}) DescribeScalingNotification(*map[string]interface{}) (*map[string]interface{}, error) DescribeScalingNotificationWithContext(aws.Context, *map[string]interface{}, ...request.Option) (*map[string]interface{}, error) DescribeScalingNotificationRequest(*map[string]interface{}) (*request.Request, *map[string]interface{}) DescribeScalingPolicy(*map[string]interface{}) (*map[string]interface{}, error) DescribeScalingPolicyWithContext(aws.Context, *map[string]interface{}, ...request.Option) (*map[string]interface{}, error) DescribeScalingPolicyRequest(*map[string]interface{}) (*request.Request, *map[string]interface{}) DescribeScheduledTask(*map[string]interface{}) (*map[string]interface{}, error) DescribeScheduledTaskWithContext(aws.Context, *map[string]interface{}, ...request.Option) (*map[string]interface{}, error) DescribeScheduledTaskRequest(*map[string]interface{}) (*request.Request, *map[string]interface{}) DetachInstance(*map[string]interface{}) (*map[string]interface{}, error) DetachInstanceWithContext(aws.Context, *map[string]interface{}, ...request.Option) (*map[string]interface{}, error) DetachInstanceRequest(*map[string]interface{}) (*request.Request, *map[string]interface{}) DetachInstancesIamRole(*map[string]interface{}) (*map[string]interface{}, error) DetachInstancesIamRoleWithContext(aws.Context, *map[string]interface{}, ...request.Option) (*map[string]interface{}, error) DetachInstancesIamRoleRequest(*map[string]interface{}) (*request.Request, *map[string]interface{}) DetachKey(*map[string]interface{}) (*map[string]interface{}, error) DetachKeyWithContext(aws.Context, *map[string]interface{}, ...request.Option) (*map[string]interface{}, error) DetachKeyRequest(*map[string]interface{}) (*request.Request, *map[string]interface{}) DetachNetworkInterface(*map[string]interface{}) (*map[string]interface{}, error) DetachNetworkInterfaceWithContext(aws.Context, *map[string]interface{}, ...request.Option) (*map[string]interface{}, error) DetachNetworkInterfaceRequest(*map[string]interface{}) (*request.Request, *map[string]interface{}) DisableScalingGroup(*map[string]interface{}) (*map[string]interface{}, error) DisableScalingGroupWithContext(aws.Context, *map[string]interface{}, ...request.Option) (*map[string]interface{}, error) DisableScalingGroupRequest(*map[string]interface{}) (*request.Request, *map[string]interface{}) EnableImageCaching(*map[string]interface{}) (*map[string]interface{}, error) EnableImageCachingWithContext(aws.Context, *map[string]interface{}, ...request.Option) (*map[string]interface{}, error) EnableImageCachingRequest(*map[string]interface{}) (*request.Request, *map[string]interface{}) EnableScalingGroup(*map[string]interface{}) (*map[string]interface{}, error) EnableScalingGroupWithContext(aws.Context, *map[string]interface{}, ...request.Option) (*map[string]interface{}, error) EnableScalingGroupRequest(*map[string]interface{}) (*request.Request, *map[string]interface{}) ImportImage(*map[string]interface{}) (*map[string]interface{}, error) ImportImageWithContext(aws.Context, *map[string]interface{}, ...request.Option) (*map[string]interface{}, error) ImportImageRequest(*map[string]interface{}) (*request.Request, *map[string]interface{}) ModifyAutoSnapshotPolicy(*map[string]interface{}) (*map[string]interface{}, error) ModifyAutoSnapshotPolicyWithContext(aws.Context, *map[string]interface{}, ...request.Option) (*map[string]interface{}, error) ModifyAutoSnapshotPolicyRequest(*map[string]interface{}) (*request.Request, *map[string]interface{}) ModifyDataGuardGroups(*map[string]interface{}) (*map[string]interface{}, error) ModifyDataGuardGroupsWithContext(aws.Context, *map[string]interface{}, ...request.Option) (*map[string]interface{}, error) ModifyDataGuardGroupsRequest(*map[string]interface{}) (*request.Request, *map[string]interface{}) ModifyImageAttribute(*map[string]interface{}) (*map[string]interface{}, error) ModifyImageAttributeWithContext(aws.Context, *map[string]interface{}, ...request.Option) (*map[string]interface{}, error) ModifyImageAttributeRequest(*map[string]interface{}) (*request.Request, *map[string]interface{}) ModifyInstanceAttribute(*map[string]interface{}) (*map[string]interface{}, error) ModifyInstanceAttributeWithContext(aws.Context, *map[string]interface{}, ...request.Option) (*map[string]interface{}, error) ModifyInstanceAttributeRequest(*map[string]interface{}) (*request.Request, *map[string]interface{}) ModifyInstanceImage(*map[string]interface{}) (*map[string]interface{}, error) ModifyInstanceImageWithContext(aws.Context, *map[string]interface{}, ...request.Option) (*map[string]interface{}, error) ModifyInstanceImageRequest(*map[string]interface{}) (*request.Request, *map[string]interface{}) ModifyInstanceType(*map[string]interface{}) (*map[string]interface{}, error) ModifyInstanceTypeWithContext(aws.Context, *map[string]interface{}, ...request.Option) (*map[string]interface{}, error) ModifyInstanceTypeRequest(*map[string]interface{}) (*request.Request, *map[string]interface{}) ModifyNetworkInterfaceAttribute(*map[string]interface{}) (*map[string]interface{}, error) ModifyNetworkInterfaceAttributeWithContext(aws.Context, *map[string]interface{}, ...request.Option) (*map[string]interface{}, error) ModifyNetworkInterfaceAttributeRequest(*map[string]interface{}) (*request.Request, *map[string]interface{}) ModifyScalingConfiguration(*map[string]interface{}) (*map[string]interface{}, error) ModifyScalingConfigurationWithContext(aws.Context, *map[string]interface{}, ...request.Option) (*map[string]interface{}, error) ModifyScalingConfigurationRequest(*map[string]interface{}) (*request.Request, *map[string]interface{}) ModifyScalingGroup(*map[string]interface{}) (*map[string]interface{}, error) ModifyScalingGroupWithContext(aws.Context, *map[string]interface{}, ...request.Option) (*map[string]interface{}, error) ModifyScalingGroupRequest(*map[string]interface{}) (*request.Request, *map[string]interface{}) ModifyScalingLoadBalancers(*map[string]interface{}) (*map[string]interface{}, error) ModifyScalingLoadBalancersWithContext(aws.Context, *map[string]interface{}, ...request.Option) (*map[string]interface{}, error) ModifyScalingLoadBalancersRequest(*map[string]interface{}) (*request.Request, *map[string]interface{}) ModifyScalingNotification(*map[string]interface{}) (*map[string]interface{}, error) ModifyScalingNotificationWithContext(aws.Context, *map[string]interface{}, ...request.Option) (*map[string]interface{}, error) ModifyScalingNotificationRequest(*map[string]interface{}) (*request.Request, *map[string]interface{}) ModifyScalingPolicy(*map[string]interface{}) (*map[string]interface{}, error) ModifyScalingPolicyWithContext(aws.Context, *map[string]interface{}, ...request.Option) (*map[string]interface{}, error) ModifyScalingPolicyRequest(*map[string]interface{}) (*request.Request, *map[string]interface{}) ModifyScheduledTask(*map[string]interface{}) (*map[string]interface{}, error) ModifyScheduledTaskWithContext(aws.Context, *map[string]interface{}, ...request.Option) (*map[string]interface{}, error) ModifyScheduledTaskRequest(*map[string]interface{}) (*request.Request, *map[string]interface{}) RebootInstances(*map[string]interface{}) (*map[string]interface{}, error) RebootInstancesWithContext(aws.Context, *map[string]interface{}, ...request.Option) (*map[string]interface{}, error) RebootInstancesRequest(*map[string]interface{}) (*request.Request, *map[string]interface{}) RemoveImages(*map[string]interface{}) (*map[string]interface{}, error) RemoveImagesWithContext(aws.Context, *map[string]interface{}, ...request.Option) (*map[string]interface{}, error) RemoveImagesRequest(*map[string]interface{}) (*request.Request, *map[string]interface{}) RemoveVmFromDataGuard(*map[string]interface{}) (*map[string]interface{}, error) RemoveVmFromDataGuardWithContext(aws.Context, *map[string]interface{}, ...request.Option) (*map[string]interface{}, error) RemoveVmFromDataGuardRequest(*map[string]interface{}) (*request.Request, *map[string]interface{}) RollbackLocalVolume(*map[string]interface{}) (*map[string]interface{}, error) RollbackLocalVolumeWithContext(aws.Context, *map[string]interface{}, ...request.Option) (*map[string]interface{}, error) RollbackLocalVolumeRequest(*map[string]interface{}) (*request.Request, *map[string]interface{}) RunInstances(*map[string]interface{}) (*map[string]interface{}, error) RunInstancesWithContext(aws.Context, *map[string]interface{}, ...request.Option) (*map[string]interface{}, error) RunInstancesRequest(*map[string]interface{}) (*request.Request, *map[string]interface{}) SetKvmProtectedDetach(*map[string]interface{}) (*map[string]interface{}, error) SetKvmProtectedDetachWithContext(aws.Context, *map[string]interface{}, ...request.Option) (*map[string]interface{}, error) SetKvmProtectedDetachRequest(*map[string]interface{}) (*request.Request, *map[string]interface{}) StartInstances(*map[string]interface{}) (*map[string]interface{}, error) StartInstancesWithContext(aws.Context, *map[string]interface{}, ...request.Option) (*map[string]interface{}, error) StartInstancesRequest(*map[string]interface{}) (*request.Request, *map[string]interface{}) StopInstances(*map[string]interface{}) (*map[string]interface{}, error) StopInstancesWithContext(aws.Context, *map[string]interface{}, ...request.Option) (*map[string]interface{}, error) StopInstancesRequest(*map[string]interface{}) (*request.Request, *map[string]interface{}) TerminateInstances(*map[string]interface{}) (*map[string]interface{}, error) TerminateInstancesWithContext(aws.Context, *map[string]interface{}, ...request.Option) (*map[string]interface{}, error) TerminateInstancesRequest(*map[string]interface{}) (*request.Request, *map[string]interface{}) }
KecAPI provides an interface to enable mocking the kec.Kec service client's API operation, paginators, and waiters. This make unit testing your code that calls out to the SDK's service client's calls easier.
The best way to use this interface is so the SDK's service client's calls can be stubbed out for unit testing your code with the SDK without needing to inject custom request handlers into the SDK's request pipeline.
// myFunc uses an SDK service client to make a request to // kec. func myFunc(svc keciface.KecAPI) bool { // Make svc.AddVmIntoDataGuard request } func main() { sess := session.New() svc := kec.New(sess) myFunc(svc) }
In your _test.go file:
// Define a mock struct to be used in your unit tests of myFunc. type mockKecClient struct { keciface.KecAPI } func (m *mockKecClient) AddVmIntoDataGuard(input *map[string]interface{}) (*map[string]interface{}, error) { // mock response/functionality } func TestMyFunc(t *testing.T) { // Setup Test mockSvc := &mockKecClient{} myfunc(mockSvc) // Verify myFunc's functionality }
It is important to note that this interface will have breaking changes when the service model is updated and adds new API operations, paginators, and waiters. Its suggested to use the pattern above for testing, or using tooling to generate mocks to satisfy the interfaces.