diff options
Diffstat (limited to 'vendor/github.com/aws/aws-sdk-go/service/sts/stsiface/interface.go')
-rw-r--r-- | vendor/github.com/aws/aws-sdk-go/service/sts/stsiface/interface.go | 96 |
1 files changed, 96 insertions, 0 deletions
diff --git a/vendor/github.com/aws/aws-sdk-go/service/sts/stsiface/interface.go b/vendor/github.com/aws/aws-sdk-go/service/sts/stsiface/interface.go new file mode 100644 index 0000000..e2e1d6e --- /dev/null +++ b/vendor/github.com/aws/aws-sdk-go/service/sts/stsiface/interface.go | |||
@@ -0,0 +1,96 @@ | |||
1 | // Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT. | ||
2 | |||
3 | // Package stsiface provides an interface to enable mocking the AWS Security Token Service 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 stsiface | ||
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/sts" | ||
15 | ) | ||
16 | |||
17 | // STSAPI provides an interface to enable mocking the | ||
18 | // sts.STS 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 Security Token Service. | ||
28 | // func myFunc(svc stsiface.STSAPI) bool { | ||
29 | // // Make svc.AssumeRole request | ||
30 | // } | ||
31 | // | ||
32 | // func main() { | ||
33 | // sess := session.New() | ||
34 | // svc := sts.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 mockSTSClient struct { | ||
43 | // stsiface.STSAPI | ||
44 | // } | ||
45 | // func (m *mockSTSClient) AssumeRole(input *sts.AssumeRoleInput) (*sts.AssumeRoleOutput, error) { | ||
46 | // // mock response/functionality | ||
47 | // } | ||
48 | // | ||
49 | // func TestMyFunc(t *testing.T) { | ||
50 | // // Setup Test | ||
51 | // mockSvc := &mockSTSClient{} | ||
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 STSAPI interface { | ||
63 | AssumeRole(*sts.AssumeRoleInput) (*sts.AssumeRoleOutput, error) | ||
64 | AssumeRoleWithContext(aws.Context, *sts.AssumeRoleInput, ...request.Option) (*sts.AssumeRoleOutput, error) | ||
65 | AssumeRoleRequest(*sts.AssumeRoleInput) (*request.Request, *sts.AssumeRoleOutput) | ||
66 | |||
67 | AssumeRoleWithSAML(*sts.AssumeRoleWithSAMLInput) (*sts.AssumeRoleWithSAMLOutput, error) | ||
68 | AssumeRoleWithSAMLWithContext(aws.Context, *sts.AssumeRoleWithSAMLInput, ...request.Option) (*sts.AssumeRoleWithSAMLOutput, error) | ||
69 | AssumeRoleWithSAMLRequest(*sts.AssumeRoleWithSAMLInput) (*request.Request, *sts.AssumeRoleWithSAMLOutput) | ||
70 | |||
71 | AssumeRoleWithWebIdentity(*sts.AssumeRoleWithWebIdentityInput) (*sts.AssumeRoleWithWebIdentityOutput, error) | ||
72 | AssumeRoleWithWebIdentityWithContext(aws.Context, *sts.AssumeRoleWithWebIdentityInput, ...request.Option) (*sts.AssumeRoleWithWebIdentityOutput, error) | ||
73 | AssumeRoleWithWebIdentityRequest(*sts.AssumeRoleWithWebIdentityInput) (*request.Request, *sts.AssumeRoleWithWebIdentityOutput) | ||
74 | |||
75 | DecodeAuthorizationMessage(*sts.DecodeAuthorizationMessageInput) (*sts.DecodeAuthorizationMessageOutput, error) | ||
76 | DecodeAuthorizationMessageWithContext(aws.Context, *sts.DecodeAuthorizationMessageInput, ...request.Option) (*sts.DecodeAuthorizationMessageOutput, error) | ||
77 | DecodeAuthorizationMessageRequest(*sts.DecodeAuthorizationMessageInput) (*request.Request, *sts.DecodeAuthorizationMessageOutput) | ||
78 | |||
79 | GetAccessKeyInfo(*sts.GetAccessKeyInfoInput) (*sts.GetAccessKeyInfoOutput, error) | ||
80 | GetAccessKeyInfoWithContext(aws.Context, *sts.GetAccessKeyInfoInput, ...request.Option) (*sts.GetAccessKeyInfoOutput, error) | ||
81 | GetAccessKeyInfoRequest(*sts.GetAccessKeyInfoInput) (*request.Request, *sts.GetAccessKeyInfoOutput) | ||
82 | |||
83 | GetCallerIdentity(*sts.GetCallerIdentityInput) (*sts.GetCallerIdentityOutput, error) | ||
84 | GetCallerIdentityWithContext(aws.Context, *sts.GetCallerIdentityInput, ...request.Option) (*sts.GetCallerIdentityOutput, error) | ||
85 | GetCallerIdentityRequest(*sts.GetCallerIdentityInput) (*request.Request, *sts.GetCallerIdentityOutput) | ||
86 | |||
87 | GetFederationToken(*sts.GetFederationTokenInput) (*sts.GetFederationTokenOutput, error) | ||
88 | GetFederationTokenWithContext(aws.Context, *sts.GetFederationTokenInput, ...request.Option) (*sts.GetFederationTokenOutput, error) | ||
89 | GetFederationTokenRequest(*sts.GetFederationTokenInput) (*request.Request, *sts.GetFederationTokenOutput) | ||
90 | |||
91 | GetSessionToken(*sts.GetSessionTokenInput) (*sts.GetSessionTokenOutput, error) | ||
92 | GetSessionTokenWithContext(aws.Context, *sts.GetSessionTokenInput, ...request.Option) (*sts.GetSessionTokenOutput, error) | ||
93 | GetSessionTokenRequest(*sts.GetSessionTokenInput) (*request.Request, *sts.GetSessionTokenOutput) | ||
94 | } | ||
95 | |||
96 | var _ STSAPI = (*sts.STS)(nil) | ||