github.com/aavshr/aws-sdk-go@v1.41.3/service/cognitoidentity/cognitoidentityiface/interface.go (about)

     1  // Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT.
     2  
     3  // Package cognitoidentityiface provides an interface to enable mocking the Amazon Cognito Identity 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 cognitoidentityiface
    10  
    11  import (
    12  	"github.com/aavshr/aws-sdk-go/aws"
    13  	"github.com/aavshr/aws-sdk-go/aws/request"
    14  	"github.com/aavshr/aws-sdk-go/service/cognitoidentity"
    15  )
    16  
    17  // CognitoIdentityAPI provides an interface to enable mocking the
    18  // cognitoidentity.CognitoIdentity 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  //    // Amazon Cognito Identity.
    28  //    func myFunc(svc cognitoidentityiface.CognitoIdentityAPI) bool {
    29  //        // Make svc.CreateIdentityPool request
    30  //    }
    31  //
    32  //    func main() {
    33  //        sess := session.New()
    34  //        svc := cognitoidentity.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 mockCognitoIdentityClient struct {
    43  //        cognitoidentityiface.CognitoIdentityAPI
    44  //    }
    45  //    func (m *mockCognitoIdentityClient) CreateIdentityPool(input *cognitoidentity.CreateIdentityPoolInput) (*cognitoidentity.IdentityPool, error) {
    46  //        // mock response/functionality
    47  //    }
    48  //
    49  //    func TestMyFunc(t *testing.T) {
    50  //        // Setup Test
    51  //        mockSvc := &mockCognitoIdentityClient{}
    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 CognitoIdentityAPI interface {
    63  	CreateIdentityPool(*cognitoidentity.CreateIdentityPoolInput) (*cognitoidentity.IdentityPool, error)
    64  	CreateIdentityPoolWithContext(aws.Context, *cognitoidentity.CreateIdentityPoolInput, ...request.Option) (*cognitoidentity.IdentityPool, error)
    65  	CreateIdentityPoolRequest(*cognitoidentity.CreateIdentityPoolInput) (*request.Request, *cognitoidentity.IdentityPool)
    66  
    67  	DeleteIdentities(*cognitoidentity.DeleteIdentitiesInput) (*cognitoidentity.DeleteIdentitiesOutput, error)
    68  	DeleteIdentitiesWithContext(aws.Context, *cognitoidentity.DeleteIdentitiesInput, ...request.Option) (*cognitoidentity.DeleteIdentitiesOutput, error)
    69  	DeleteIdentitiesRequest(*cognitoidentity.DeleteIdentitiesInput) (*request.Request, *cognitoidentity.DeleteIdentitiesOutput)
    70  
    71  	DeleteIdentityPool(*cognitoidentity.DeleteIdentityPoolInput) (*cognitoidentity.DeleteIdentityPoolOutput, error)
    72  	DeleteIdentityPoolWithContext(aws.Context, *cognitoidentity.DeleteIdentityPoolInput, ...request.Option) (*cognitoidentity.DeleteIdentityPoolOutput, error)
    73  	DeleteIdentityPoolRequest(*cognitoidentity.DeleteIdentityPoolInput) (*request.Request, *cognitoidentity.DeleteIdentityPoolOutput)
    74  
    75  	DescribeIdentity(*cognitoidentity.DescribeIdentityInput) (*cognitoidentity.IdentityDescription, error)
    76  	DescribeIdentityWithContext(aws.Context, *cognitoidentity.DescribeIdentityInput, ...request.Option) (*cognitoidentity.IdentityDescription, error)
    77  	DescribeIdentityRequest(*cognitoidentity.DescribeIdentityInput) (*request.Request, *cognitoidentity.IdentityDescription)
    78  
    79  	DescribeIdentityPool(*cognitoidentity.DescribeIdentityPoolInput) (*cognitoidentity.IdentityPool, error)
    80  	DescribeIdentityPoolWithContext(aws.Context, *cognitoidentity.DescribeIdentityPoolInput, ...request.Option) (*cognitoidentity.IdentityPool, error)
    81  	DescribeIdentityPoolRequest(*cognitoidentity.DescribeIdentityPoolInput) (*request.Request, *cognitoidentity.IdentityPool)
    82  
    83  	GetCredentialsForIdentity(*cognitoidentity.GetCredentialsForIdentityInput) (*cognitoidentity.GetCredentialsForIdentityOutput, error)
    84  	GetCredentialsForIdentityWithContext(aws.Context, *cognitoidentity.GetCredentialsForIdentityInput, ...request.Option) (*cognitoidentity.GetCredentialsForIdentityOutput, error)
    85  	GetCredentialsForIdentityRequest(*cognitoidentity.GetCredentialsForIdentityInput) (*request.Request, *cognitoidentity.GetCredentialsForIdentityOutput)
    86  
    87  	GetId(*cognitoidentity.GetIdInput) (*cognitoidentity.GetIdOutput, error)
    88  	GetIdWithContext(aws.Context, *cognitoidentity.GetIdInput, ...request.Option) (*cognitoidentity.GetIdOutput, error)
    89  	GetIdRequest(*cognitoidentity.GetIdInput) (*request.Request, *cognitoidentity.GetIdOutput)
    90  
    91  	GetIdentityPoolRoles(*cognitoidentity.GetIdentityPoolRolesInput) (*cognitoidentity.GetIdentityPoolRolesOutput, error)
    92  	GetIdentityPoolRolesWithContext(aws.Context, *cognitoidentity.GetIdentityPoolRolesInput, ...request.Option) (*cognitoidentity.GetIdentityPoolRolesOutput, error)
    93  	GetIdentityPoolRolesRequest(*cognitoidentity.GetIdentityPoolRolesInput) (*request.Request, *cognitoidentity.GetIdentityPoolRolesOutput)
    94  
    95  	GetOpenIdToken(*cognitoidentity.GetOpenIdTokenInput) (*cognitoidentity.GetOpenIdTokenOutput, error)
    96  	GetOpenIdTokenWithContext(aws.Context, *cognitoidentity.GetOpenIdTokenInput, ...request.Option) (*cognitoidentity.GetOpenIdTokenOutput, error)
    97  	GetOpenIdTokenRequest(*cognitoidentity.GetOpenIdTokenInput) (*request.Request, *cognitoidentity.GetOpenIdTokenOutput)
    98  
    99  	GetOpenIdTokenForDeveloperIdentity(*cognitoidentity.GetOpenIdTokenForDeveloperIdentityInput) (*cognitoidentity.GetOpenIdTokenForDeveloperIdentityOutput, error)
   100  	GetOpenIdTokenForDeveloperIdentityWithContext(aws.Context, *cognitoidentity.GetOpenIdTokenForDeveloperIdentityInput, ...request.Option) (*cognitoidentity.GetOpenIdTokenForDeveloperIdentityOutput, error)
   101  	GetOpenIdTokenForDeveloperIdentityRequest(*cognitoidentity.GetOpenIdTokenForDeveloperIdentityInput) (*request.Request, *cognitoidentity.GetOpenIdTokenForDeveloperIdentityOutput)
   102  
   103  	GetPrincipalTagAttributeMap(*cognitoidentity.GetPrincipalTagAttributeMapInput) (*cognitoidentity.GetPrincipalTagAttributeMapOutput, error)
   104  	GetPrincipalTagAttributeMapWithContext(aws.Context, *cognitoidentity.GetPrincipalTagAttributeMapInput, ...request.Option) (*cognitoidentity.GetPrincipalTagAttributeMapOutput, error)
   105  	GetPrincipalTagAttributeMapRequest(*cognitoidentity.GetPrincipalTagAttributeMapInput) (*request.Request, *cognitoidentity.GetPrincipalTagAttributeMapOutput)
   106  
   107  	ListIdentities(*cognitoidentity.ListIdentitiesInput) (*cognitoidentity.ListIdentitiesOutput, error)
   108  	ListIdentitiesWithContext(aws.Context, *cognitoidentity.ListIdentitiesInput, ...request.Option) (*cognitoidentity.ListIdentitiesOutput, error)
   109  	ListIdentitiesRequest(*cognitoidentity.ListIdentitiesInput) (*request.Request, *cognitoidentity.ListIdentitiesOutput)
   110  
   111  	ListIdentityPools(*cognitoidentity.ListIdentityPoolsInput) (*cognitoidentity.ListIdentityPoolsOutput, error)
   112  	ListIdentityPoolsWithContext(aws.Context, *cognitoidentity.ListIdentityPoolsInput, ...request.Option) (*cognitoidentity.ListIdentityPoolsOutput, error)
   113  	ListIdentityPoolsRequest(*cognitoidentity.ListIdentityPoolsInput) (*request.Request, *cognitoidentity.ListIdentityPoolsOutput)
   114  
   115  	ListIdentityPoolsPages(*cognitoidentity.ListIdentityPoolsInput, func(*cognitoidentity.ListIdentityPoolsOutput, bool) bool) error
   116  	ListIdentityPoolsPagesWithContext(aws.Context, *cognitoidentity.ListIdentityPoolsInput, func(*cognitoidentity.ListIdentityPoolsOutput, bool) bool, ...request.Option) error
   117  
   118  	ListTagsForResource(*cognitoidentity.ListTagsForResourceInput) (*cognitoidentity.ListTagsForResourceOutput, error)
   119  	ListTagsForResourceWithContext(aws.Context, *cognitoidentity.ListTagsForResourceInput, ...request.Option) (*cognitoidentity.ListTagsForResourceOutput, error)
   120  	ListTagsForResourceRequest(*cognitoidentity.ListTagsForResourceInput) (*request.Request, *cognitoidentity.ListTagsForResourceOutput)
   121  
   122  	LookupDeveloperIdentity(*cognitoidentity.LookupDeveloperIdentityInput) (*cognitoidentity.LookupDeveloperIdentityOutput, error)
   123  	LookupDeveloperIdentityWithContext(aws.Context, *cognitoidentity.LookupDeveloperIdentityInput, ...request.Option) (*cognitoidentity.LookupDeveloperIdentityOutput, error)
   124  	LookupDeveloperIdentityRequest(*cognitoidentity.LookupDeveloperIdentityInput) (*request.Request, *cognitoidentity.LookupDeveloperIdentityOutput)
   125  
   126  	MergeDeveloperIdentities(*cognitoidentity.MergeDeveloperIdentitiesInput) (*cognitoidentity.MergeDeveloperIdentitiesOutput, error)
   127  	MergeDeveloperIdentitiesWithContext(aws.Context, *cognitoidentity.MergeDeveloperIdentitiesInput, ...request.Option) (*cognitoidentity.MergeDeveloperIdentitiesOutput, error)
   128  	MergeDeveloperIdentitiesRequest(*cognitoidentity.MergeDeveloperIdentitiesInput) (*request.Request, *cognitoidentity.MergeDeveloperIdentitiesOutput)
   129  
   130  	SetIdentityPoolRoles(*cognitoidentity.SetIdentityPoolRolesInput) (*cognitoidentity.SetIdentityPoolRolesOutput, error)
   131  	SetIdentityPoolRolesWithContext(aws.Context, *cognitoidentity.SetIdentityPoolRolesInput, ...request.Option) (*cognitoidentity.SetIdentityPoolRolesOutput, error)
   132  	SetIdentityPoolRolesRequest(*cognitoidentity.SetIdentityPoolRolesInput) (*request.Request, *cognitoidentity.SetIdentityPoolRolesOutput)
   133  
   134  	SetPrincipalTagAttributeMap(*cognitoidentity.SetPrincipalTagAttributeMapInput) (*cognitoidentity.SetPrincipalTagAttributeMapOutput, error)
   135  	SetPrincipalTagAttributeMapWithContext(aws.Context, *cognitoidentity.SetPrincipalTagAttributeMapInput, ...request.Option) (*cognitoidentity.SetPrincipalTagAttributeMapOutput, error)
   136  	SetPrincipalTagAttributeMapRequest(*cognitoidentity.SetPrincipalTagAttributeMapInput) (*request.Request, *cognitoidentity.SetPrincipalTagAttributeMapOutput)
   137  
   138  	TagResource(*cognitoidentity.TagResourceInput) (*cognitoidentity.TagResourceOutput, error)
   139  	TagResourceWithContext(aws.Context, *cognitoidentity.TagResourceInput, ...request.Option) (*cognitoidentity.TagResourceOutput, error)
   140  	TagResourceRequest(*cognitoidentity.TagResourceInput) (*request.Request, *cognitoidentity.TagResourceOutput)
   141  
   142  	UnlinkDeveloperIdentity(*cognitoidentity.UnlinkDeveloperIdentityInput) (*cognitoidentity.UnlinkDeveloperIdentityOutput, error)
   143  	UnlinkDeveloperIdentityWithContext(aws.Context, *cognitoidentity.UnlinkDeveloperIdentityInput, ...request.Option) (*cognitoidentity.UnlinkDeveloperIdentityOutput, error)
   144  	UnlinkDeveloperIdentityRequest(*cognitoidentity.UnlinkDeveloperIdentityInput) (*request.Request, *cognitoidentity.UnlinkDeveloperIdentityOutput)
   145  
   146  	UnlinkIdentity(*cognitoidentity.UnlinkIdentityInput) (*cognitoidentity.UnlinkIdentityOutput, error)
   147  	UnlinkIdentityWithContext(aws.Context, *cognitoidentity.UnlinkIdentityInput, ...request.Option) (*cognitoidentity.UnlinkIdentityOutput, error)
   148  	UnlinkIdentityRequest(*cognitoidentity.UnlinkIdentityInput) (*request.Request, *cognitoidentity.UnlinkIdentityOutput)
   149  
   150  	UntagResource(*cognitoidentity.UntagResourceInput) (*cognitoidentity.UntagResourceOutput, error)
   151  	UntagResourceWithContext(aws.Context, *cognitoidentity.UntagResourceInput, ...request.Option) (*cognitoidentity.UntagResourceOutput, error)
   152  	UntagResourceRequest(*cognitoidentity.UntagResourceInput) (*request.Request, *cognitoidentity.UntagResourceOutput)
   153  
   154  	UpdateIdentityPool(*cognitoidentity.IdentityPool) (*cognitoidentity.IdentityPool, error)
   155  	UpdateIdentityPoolWithContext(aws.Context, *cognitoidentity.IdentityPool, ...request.Option) (*cognitoidentity.IdentityPool, error)
   156  	UpdateIdentityPoolRequest(*cognitoidentity.IdentityPool) (*request.Request, *cognitoidentity.IdentityPool)
   157  }
   158  
   159  var _ CognitoIdentityAPI = (*cognitoidentity.CognitoIdentity)(nil)