@@ -11,25 +11,6 @@ import (
1111 "github.com/aws/aws-sdk-go-v2/service/ssm"
1212)
1313
14- // SSMGetParametersAPI and SSMDescribeParametersAPI defines the interface
15- // for the GetParameters and DescribeParameters function.
16- // We use this interface to test the function using a mocked service
17- type SSMGetParametersAPI interface {
18- GetParameters (
19- ctx context.Context ,
20- params * ssm.GetParametersInput ,
21- optFns ... func (* ssm.Options ),
22- ) (* ssm.GetParametersOutput , error )
23- }
24-
25- type SSMDescribeParametersAPI interface {
26- DescribeParameters (
27- ctx context.Context ,
28- params * ssm.DescribeParametersInput ,
29- optFns ... func (* ssm.Options ),
30- ) (* ssm.DescribeParametersOutput , error )
31- }
32-
3314type AWSSystemsManagerParameterStore interface {
3415 GetParameters (
3516 ctx context.Context ,
@@ -52,11 +33,11 @@ type AWSSystemsManagerParameterStore interface {
5233// Output:
5334// If success, a GetParametersOutput object containing the result of the service call and nil
5435// Otherwise, nil and an error from the call to GetParameters
55- func ExecGetParameters (c context.Context , api SSMGetParametersAPI , input * ssm.GetParametersInput ) (* ssm.GetParametersOutput , error ) {
36+ func ExecGetParameters (c context.Context , api AWSSystemsManagerParameterStore , input * ssm.GetParametersInput ) (* ssm.GetParametersOutput , error ) {
5637 return api .GetParameters (c , input )
5738}
5839
59- func ExecDescribeParameters (c context.Context , api SSMDescribeParametersAPI , input * ssm.DescribeParametersInput ) (* ssm.DescribeParametersOutput , error ) {
40+ func ExecDescribeParameters (c context.Context , api AWSSystemsManagerParameterStore , input * ssm.DescribeParametersInput ) (* ssm.DescribeParametersOutput , error ) {
6041 return api .DescribeParameters (c , input )
6142}
6243
0 commit comments