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

     1  // Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT.
     2  
     3  // Package lakeformationiface provides an interface to enable mocking the AWS Lake Formation 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 lakeformationiface
    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/lakeformation"
    15  )
    16  
    17  // LakeFormationAPI provides an interface to enable mocking the
    18  // lakeformation.LakeFormation 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 Lake Formation.
    28  //    func myFunc(svc lakeformationiface.LakeFormationAPI) bool {
    29  //        // Make svc.AddLFTagsToResource request
    30  //    }
    31  //
    32  //    func main() {
    33  //        sess := session.New()
    34  //        svc := lakeformation.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 mockLakeFormationClient struct {
    43  //        lakeformationiface.LakeFormationAPI
    44  //    }
    45  //    func (m *mockLakeFormationClient) AddLFTagsToResource(input *lakeformation.AddLFTagsToResourceInput) (*lakeformation.AddLFTagsToResourceOutput, error) {
    46  //        // mock response/functionality
    47  //    }
    48  //
    49  //    func TestMyFunc(t *testing.T) {
    50  //        // Setup Test
    51  //        mockSvc := &mockLakeFormationClient{}
    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 LakeFormationAPI interface {
    63  	AddLFTagsToResource(*lakeformation.AddLFTagsToResourceInput) (*lakeformation.AddLFTagsToResourceOutput, error)
    64  	AddLFTagsToResourceWithContext(aws.Context, *lakeformation.AddLFTagsToResourceInput, ...request.Option) (*lakeformation.AddLFTagsToResourceOutput, error)
    65  	AddLFTagsToResourceRequest(*lakeformation.AddLFTagsToResourceInput) (*request.Request, *lakeformation.AddLFTagsToResourceOutput)
    66  
    67  	BatchGrantPermissions(*lakeformation.BatchGrantPermissionsInput) (*lakeformation.BatchGrantPermissionsOutput, error)
    68  	BatchGrantPermissionsWithContext(aws.Context, *lakeformation.BatchGrantPermissionsInput, ...request.Option) (*lakeformation.BatchGrantPermissionsOutput, error)
    69  	BatchGrantPermissionsRequest(*lakeformation.BatchGrantPermissionsInput) (*request.Request, *lakeformation.BatchGrantPermissionsOutput)
    70  
    71  	BatchRevokePermissions(*lakeformation.BatchRevokePermissionsInput) (*lakeformation.BatchRevokePermissionsOutput, error)
    72  	BatchRevokePermissionsWithContext(aws.Context, *lakeformation.BatchRevokePermissionsInput, ...request.Option) (*lakeformation.BatchRevokePermissionsOutput, error)
    73  	BatchRevokePermissionsRequest(*lakeformation.BatchRevokePermissionsInput) (*request.Request, *lakeformation.BatchRevokePermissionsOutput)
    74  
    75  	CreateLFTag(*lakeformation.CreateLFTagInput) (*lakeformation.CreateLFTagOutput, error)
    76  	CreateLFTagWithContext(aws.Context, *lakeformation.CreateLFTagInput, ...request.Option) (*lakeformation.CreateLFTagOutput, error)
    77  	CreateLFTagRequest(*lakeformation.CreateLFTagInput) (*request.Request, *lakeformation.CreateLFTagOutput)
    78  
    79  	DeleteLFTag(*lakeformation.DeleteLFTagInput) (*lakeformation.DeleteLFTagOutput, error)
    80  	DeleteLFTagWithContext(aws.Context, *lakeformation.DeleteLFTagInput, ...request.Option) (*lakeformation.DeleteLFTagOutput, error)
    81  	DeleteLFTagRequest(*lakeformation.DeleteLFTagInput) (*request.Request, *lakeformation.DeleteLFTagOutput)
    82  
    83  	DeregisterResource(*lakeformation.DeregisterResourceInput) (*lakeformation.DeregisterResourceOutput, error)
    84  	DeregisterResourceWithContext(aws.Context, *lakeformation.DeregisterResourceInput, ...request.Option) (*lakeformation.DeregisterResourceOutput, error)
    85  	DeregisterResourceRequest(*lakeformation.DeregisterResourceInput) (*request.Request, *lakeformation.DeregisterResourceOutput)
    86  
    87  	DescribeResource(*lakeformation.DescribeResourceInput) (*lakeformation.DescribeResourceOutput, error)
    88  	DescribeResourceWithContext(aws.Context, *lakeformation.DescribeResourceInput, ...request.Option) (*lakeformation.DescribeResourceOutput, error)
    89  	DescribeResourceRequest(*lakeformation.DescribeResourceInput) (*request.Request, *lakeformation.DescribeResourceOutput)
    90  
    91  	GetDataLakeSettings(*lakeformation.GetDataLakeSettingsInput) (*lakeformation.GetDataLakeSettingsOutput, error)
    92  	GetDataLakeSettingsWithContext(aws.Context, *lakeformation.GetDataLakeSettingsInput, ...request.Option) (*lakeformation.GetDataLakeSettingsOutput, error)
    93  	GetDataLakeSettingsRequest(*lakeformation.GetDataLakeSettingsInput) (*request.Request, *lakeformation.GetDataLakeSettingsOutput)
    94  
    95  	GetEffectivePermissionsForPath(*lakeformation.GetEffectivePermissionsForPathInput) (*lakeformation.GetEffectivePermissionsForPathOutput, error)
    96  	GetEffectivePermissionsForPathWithContext(aws.Context, *lakeformation.GetEffectivePermissionsForPathInput, ...request.Option) (*lakeformation.GetEffectivePermissionsForPathOutput, error)
    97  	GetEffectivePermissionsForPathRequest(*lakeformation.GetEffectivePermissionsForPathInput) (*request.Request, *lakeformation.GetEffectivePermissionsForPathOutput)
    98  
    99  	GetEffectivePermissionsForPathPages(*lakeformation.GetEffectivePermissionsForPathInput, func(*lakeformation.GetEffectivePermissionsForPathOutput, bool) bool) error
   100  	GetEffectivePermissionsForPathPagesWithContext(aws.Context, *lakeformation.GetEffectivePermissionsForPathInput, func(*lakeformation.GetEffectivePermissionsForPathOutput, bool) bool, ...request.Option) error
   101  
   102  	GetLFTag(*lakeformation.GetLFTagInput) (*lakeformation.GetLFTagOutput, error)
   103  	GetLFTagWithContext(aws.Context, *lakeformation.GetLFTagInput, ...request.Option) (*lakeformation.GetLFTagOutput, error)
   104  	GetLFTagRequest(*lakeformation.GetLFTagInput) (*request.Request, *lakeformation.GetLFTagOutput)
   105  
   106  	GetResourceLFTags(*lakeformation.GetResourceLFTagsInput) (*lakeformation.GetResourceLFTagsOutput, error)
   107  	GetResourceLFTagsWithContext(aws.Context, *lakeformation.GetResourceLFTagsInput, ...request.Option) (*lakeformation.GetResourceLFTagsOutput, error)
   108  	GetResourceLFTagsRequest(*lakeformation.GetResourceLFTagsInput) (*request.Request, *lakeformation.GetResourceLFTagsOutput)
   109  
   110  	GrantPermissions(*lakeformation.GrantPermissionsInput) (*lakeformation.GrantPermissionsOutput, error)
   111  	GrantPermissionsWithContext(aws.Context, *lakeformation.GrantPermissionsInput, ...request.Option) (*lakeformation.GrantPermissionsOutput, error)
   112  	GrantPermissionsRequest(*lakeformation.GrantPermissionsInput) (*request.Request, *lakeformation.GrantPermissionsOutput)
   113  
   114  	ListLFTags(*lakeformation.ListLFTagsInput) (*lakeformation.ListLFTagsOutput, error)
   115  	ListLFTagsWithContext(aws.Context, *lakeformation.ListLFTagsInput, ...request.Option) (*lakeformation.ListLFTagsOutput, error)
   116  	ListLFTagsRequest(*lakeformation.ListLFTagsInput) (*request.Request, *lakeformation.ListLFTagsOutput)
   117  
   118  	ListPermissions(*lakeformation.ListPermissionsInput) (*lakeformation.ListPermissionsOutput, error)
   119  	ListPermissionsWithContext(aws.Context, *lakeformation.ListPermissionsInput, ...request.Option) (*lakeformation.ListPermissionsOutput, error)
   120  	ListPermissionsRequest(*lakeformation.ListPermissionsInput) (*request.Request, *lakeformation.ListPermissionsOutput)
   121  
   122  	ListPermissionsPages(*lakeformation.ListPermissionsInput, func(*lakeformation.ListPermissionsOutput, bool) bool) error
   123  	ListPermissionsPagesWithContext(aws.Context, *lakeformation.ListPermissionsInput, func(*lakeformation.ListPermissionsOutput, bool) bool, ...request.Option) error
   124  
   125  	ListResources(*lakeformation.ListResourcesInput) (*lakeformation.ListResourcesOutput, error)
   126  	ListResourcesWithContext(aws.Context, *lakeformation.ListResourcesInput, ...request.Option) (*lakeformation.ListResourcesOutput, error)
   127  	ListResourcesRequest(*lakeformation.ListResourcesInput) (*request.Request, *lakeformation.ListResourcesOutput)
   128  
   129  	ListResourcesPages(*lakeformation.ListResourcesInput, func(*lakeformation.ListResourcesOutput, bool) bool) error
   130  	ListResourcesPagesWithContext(aws.Context, *lakeformation.ListResourcesInput, func(*lakeformation.ListResourcesOutput, bool) bool, ...request.Option) error
   131  
   132  	PutDataLakeSettings(*lakeformation.PutDataLakeSettingsInput) (*lakeformation.PutDataLakeSettingsOutput, error)
   133  	PutDataLakeSettingsWithContext(aws.Context, *lakeformation.PutDataLakeSettingsInput, ...request.Option) (*lakeformation.PutDataLakeSettingsOutput, error)
   134  	PutDataLakeSettingsRequest(*lakeformation.PutDataLakeSettingsInput) (*request.Request, *lakeformation.PutDataLakeSettingsOutput)
   135  
   136  	RegisterResource(*lakeformation.RegisterResourceInput) (*lakeformation.RegisterResourceOutput, error)
   137  	RegisterResourceWithContext(aws.Context, *lakeformation.RegisterResourceInput, ...request.Option) (*lakeformation.RegisterResourceOutput, error)
   138  	RegisterResourceRequest(*lakeformation.RegisterResourceInput) (*request.Request, *lakeformation.RegisterResourceOutput)
   139  
   140  	RemoveLFTagsFromResource(*lakeformation.RemoveLFTagsFromResourceInput) (*lakeformation.RemoveLFTagsFromResourceOutput, error)
   141  	RemoveLFTagsFromResourceWithContext(aws.Context, *lakeformation.RemoveLFTagsFromResourceInput, ...request.Option) (*lakeformation.RemoveLFTagsFromResourceOutput, error)
   142  	RemoveLFTagsFromResourceRequest(*lakeformation.RemoveLFTagsFromResourceInput) (*request.Request, *lakeformation.RemoveLFTagsFromResourceOutput)
   143  
   144  	RevokePermissions(*lakeformation.RevokePermissionsInput) (*lakeformation.RevokePermissionsOutput, error)
   145  	RevokePermissionsWithContext(aws.Context, *lakeformation.RevokePermissionsInput, ...request.Option) (*lakeformation.RevokePermissionsOutput, error)
   146  	RevokePermissionsRequest(*lakeformation.RevokePermissionsInput) (*request.Request, *lakeformation.RevokePermissionsOutput)
   147  
   148  	SearchDatabasesByLFTags(*lakeformation.SearchDatabasesByLFTagsInput) (*lakeformation.SearchDatabasesByLFTagsOutput, error)
   149  	SearchDatabasesByLFTagsWithContext(aws.Context, *lakeformation.SearchDatabasesByLFTagsInput, ...request.Option) (*lakeformation.SearchDatabasesByLFTagsOutput, error)
   150  	SearchDatabasesByLFTagsRequest(*lakeformation.SearchDatabasesByLFTagsInput) (*request.Request, *lakeformation.SearchDatabasesByLFTagsOutput)
   151  
   152  	SearchTablesByLFTags(*lakeformation.SearchTablesByLFTagsInput) (*lakeformation.SearchTablesByLFTagsOutput, error)
   153  	SearchTablesByLFTagsWithContext(aws.Context, *lakeformation.SearchTablesByLFTagsInput, ...request.Option) (*lakeformation.SearchTablesByLFTagsOutput, error)
   154  	SearchTablesByLFTagsRequest(*lakeformation.SearchTablesByLFTagsInput) (*request.Request, *lakeformation.SearchTablesByLFTagsOutput)
   155  
   156  	UpdateLFTag(*lakeformation.UpdateLFTagInput) (*lakeformation.UpdateLFTagOutput, error)
   157  	UpdateLFTagWithContext(aws.Context, *lakeformation.UpdateLFTagInput, ...request.Option) (*lakeformation.UpdateLFTagOutput, error)
   158  	UpdateLFTagRequest(*lakeformation.UpdateLFTagInput) (*request.Request, *lakeformation.UpdateLFTagOutput)
   159  
   160  	UpdateResource(*lakeformation.UpdateResourceInput) (*lakeformation.UpdateResourceOutput, error)
   161  	UpdateResourceWithContext(aws.Context, *lakeformation.UpdateResourceInput, ...request.Option) (*lakeformation.UpdateResourceOutput, error)
   162  	UpdateResourceRequest(*lakeformation.UpdateResourceInput) (*request.Request, *lakeformation.UpdateResourceOutput)
   163  }
   164  
   165  var _ LakeFormationAPI = (*lakeformation.LakeFormation)(nil)