inspector2iface

package
v0.0.0-...-59aefbc Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 12, 2024 License: Apache-2.0, Apache-2.0 Imports: 3 Imported by: 0

Documentation

Overview

Package inspector2iface provides an interface to enable mocking the Inspector2 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 Inspector2API

type Inspector2API interface {
	AssociateMember(*inspector2.AssociateMemberInput) (*inspector2.AssociateMemberOutput, error)
	AssociateMemberWithContext(aws.Context, *inspector2.AssociateMemberInput, ...request.Option) (*inspector2.AssociateMemberOutput, error)
	AssociateMemberRequest(*inspector2.AssociateMemberInput) (*request.Request, *inspector2.AssociateMemberOutput)

	BatchGetAccountStatus(*inspector2.BatchGetAccountStatusInput) (*inspector2.BatchGetAccountStatusOutput, error)
	BatchGetAccountStatusWithContext(aws.Context, *inspector2.BatchGetAccountStatusInput, ...request.Option) (*inspector2.BatchGetAccountStatusOutput, error)
	BatchGetAccountStatusRequest(*inspector2.BatchGetAccountStatusInput) (*request.Request, *inspector2.BatchGetAccountStatusOutput)

	BatchGetCodeSnippet(*inspector2.BatchGetCodeSnippetInput) (*inspector2.BatchGetCodeSnippetOutput, error)
	BatchGetCodeSnippetWithContext(aws.Context, *inspector2.BatchGetCodeSnippetInput, ...request.Option) (*inspector2.BatchGetCodeSnippetOutput, error)
	BatchGetCodeSnippetRequest(*inspector2.BatchGetCodeSnippetInput) (*request.Request, *inspector2.BatchGetCodeSnippetOutput)

	BatchGetFindingDetails(*inspector2.BatchGetFindingDetailsInput) (*inspector2.BatchGetFindingDetailsOutput, error)
	BatchGetFindingDetailsWithContext(aws.Context, *inspector2.BatchGetFindingDetailsInput, ...request.Option) (*inspector2.BatchGetFindingDetailsOutput, error)
	BatchGetFindingDetailsRequest(*inspector2.BatchGetFindingDetailsInput) (*request.Request, *inspector2.BatchGetFindingDetailsOutput)

	BatchGetFreeTrialInfo(*inspector2.BatchGetFreeTrialInfoInput) (*inspector2.BatchGetFreeTrialInfoOutput, error)
	BatchGetFreeTrialInfoWithContext(aws.Context, *inspector2.BatchGetFreeTrialInfoInput, ...request.Option) (*inspector2.BatchGetFreeTrialInfoOutput, error)
	BatchGetFreeTrialInfoRequest(*inspector2.BatchGetFreeTrialInfoInput) (*request.Request, *inspector2.BatchGetFreeTrialInfoOutput)

	BatchGetMemberEc2DeepInspectionStatus(*inspector2.BatchGetMemberEc2DeepInspectionStatusInput) (*inspector2.BatchGetMemberEc2DeepInspectionStatusOutput, error)
	BatchGetMemberEc2DeepInspectionStatusWithContext(aws.Context, *inspector2.BatchGetMemberEc2DeepInspectionStatusInput, ...request.Option) (*inspector2.BatchGetMemberEc2DeepInspectionStatusOutput, error)
	BatchGetMemberEc2DeepInspectionStatusRequest(*inspector2.BatchGetMemberEc2DeepInspectionStatusInput) (*request.Request, *inspector2.BatchGetMemberEc2DeepInspectionStatusOutput)

	BatchUpdateMemberEc2DeepInspectionStatus(*inspector2.BatchUpdateMemberEc2DeepInspectionStatusInput) (*inspector2.BatchUpdateMemberEc2DeepInspectionStatusOutput, error)
	BatchUpdateMemberEc2DeepInspectionStatusWithContext(aws.Context, *inspector2.BatchUpdateMemberEc2DeepInspectionStatusInput, ...request.Option) (*inspector2.BatchUpdateMemberEc2DeepInspectionStatusOutput, error)
	BatchUpdateMemberEc2DeepInspectionStatusRequest(*inspector2.BatchUpdateMemberEc2DeepInspectionStatusInput) (*request.Request, *inspector2.BatchUpdateMemberEc2DeepInspectionStatusOutput)

	CancelFindingsReport(*inspector2.CancelFindingsReportInput) (*inspector2.CancelFindingsReportOutput, error)
	CancelFindingsReportWithContext(aws.Context, *inspector2.CancelFindingsReportInput, ...request.Option) (*inspector2.CancelFindingsReportOutput, error)
	CancelFindingsReportRequest(*inspector2.CancelFindingsReportInput) (*request.Request, *inspector2.CancelFindingsReportOutput)

	CancelSbomExport(*inspector2.CancelSbomExportInput) (*inspector2.CancelSbomExportOutput, error)
	CancelSbomExportWithContext(aws.Context, *inspector2.CancelSbomExportInput, ...request.Option) (*inspector2.CancelSbomExportOutput, error)
	CancelSbomExportRequest(*inspector2.CancelSbomExportInput) (*request.Request, *inspector2.CancelSbomExportOutput)

	CreateFilter(*inspector2.CreateFilterInput) (*inspector2.CreateFilterOutput, error)
	CreateFilterWithContext(aws.Context, *inspector2.CreateFilterInput, ...request.Option) (*inspector2.CreateFilterOutput, error)
	CreateFilterRequest(*inspector2.CreateFilterInput) (*request.Request, *inspector2.CreateFilterOutput)

	CreateFindingsReport(*inspector2.CreateFindingsReportInput) (*inspector2.CreateFindingsReportOutput, error)
	CreateFindingsReportWithContext(aws.Context, *inspector2.CreateFindingsReportInput, ...request.Option) (*inspector2.CreateFindingsReportOutput, error)
	CreateFindingsReportRequest(*inspector2.CreateFindingsReportInput) (*request.Request, *inspector2.CreateFindingsReportOutput)

	CreateSbomExport(*inspector2.CreateSbomExportInput) (*inspector2.CreateSbomExportOutput, error)
	CreateSbomExportWithContext(aws.Context, *inspector2.CreateSbomExportInput, ...request.Option) (*inspector2.CreateSbomExportOutput, error)
	CreateSbomExportRequest(*inspector2.CreateSbomExportInput) (*request.Request, *inspector2.CreateSbomExportOutput)

	DeleteFilter(*inspector2.DeleteFilterInput) (*inspector2.DeleteFilterOutput, error)
	DeleteFilterWithContext(aws.Context, *inspector2.DeleteFilterInput, ...request.Option) (*inspector2.DeleteFilterOutput, error)
	DeleteFilterRequest(*inspector2.DeleteFilterInput) (*request.Request, *inspector2.DeleteFilterOutput)

	DescribeOrganizationConfiguration(*inspector2.DescribeOrganizationConfigurationInput) (*inspector2.DescribeOrganizationConfigurationOutput, error)
	DescribeOrganizationConfigurationWithContext(aws.Context, *inspector2.DescribeOrganizationConfigurationInput, ...request.Option) (*inspector2.DescribeOrganizationConfigurationOutput, error)
	DescribeOrganizationConfigurationRequest(*inspector2.DescribeOrganizationConfigurationInput) (*request.Request, *inspector2.DescribeOrganizationConfigurationOutput)

	Disable(*inspector2.DisableInput) (*inspector2.DisableOutput, error)
	DisableWithContext(aws.Context, *inspector2.DisableInput, ...request.Option) (*inspector2.DisableOutput, error)
	DisableRequest(*inspector2.DisableInput) (*request.Request, *inspector2.DisableOutput)

	DisableDelegatedAdminAccount(*inspector2.DisableDelegatedAdminAccountInput) (*inspector2.DisableDelegatedAdminAccountOutput, error)
	DisableDelegatedAdminAccountWithContext(aws.Context, *inspector2.DisableDelegatedAdminAccountInput, ...request.Option) (*inspector2.DisableDelegatedAdminAccountOutput, error)
	DisableDelegatedAdminAccountRequest(*inspector2.DisableDelegatedAdminAccountInput) (*request.Request, *inspector2.DisableDelegatedAdminAccountOutput)

	DisassociateMember(*inspector2.DisassociateMemberInput) (*inspector2.DisassociateMemberOutput, error)
	DisassociateMemberWithContext(aws.Context, *inspector2.DisassociateMemberInput, ...request.Option) (*inspector2.DisassociateMemberOutput, error)
	DisassociateMemberRequest(*inspector2.DisassociateMemberInput) (*request.Request, *inspector2.DisassociateMemberOutput)

	Enable(*inspector2.EnableInput) (*inspector2.EnableOutput, error)
	EnableWithContext(aws.Context, *inspector2.EnableInput, ...request.Option) (*inspector2.EnableOutput, error)
	EnableRequest(*inspector2.EnableInput) (*request.Request, *inspector2.EnableOutput)

	EnableDelegatedAdminAccount(*inspector2.EnableDelegatedAdminAccountInput) (*inspector2.EnableDelegatedAdminAccountOutput, error)
	EnableDelegatedAdminAccountWithContext(aws.Context, *inspector2.EnableDelegatedAdminAccountInput, ...request.Option) (*inspector2.EnableDelegatedAdminAccountOutput, error)
	EnableDelegatedAdminAccountRequest(*inspector2.EnableDelegatedAdminAccountInput) (*request.Request, *inspector2.EnableDelegatedAdminAccountOutput)

	GetConfiguration(*inspector2.GetConfigurationInput) (*inspector2.GetConfigurationOutput, error)
	GetConfigurationWithContext(aws.Context, *inspector2.GetConfigurationInput, ...request.Option) (*inspector2.GetConfigurationOutput, error)
	GetConfigurationRequest(*inspector2.GetConfigurationInput) (*request.Request, *inspector2.GetConfigurationOutput)

	GetDelegatedAdminAccount(*inspector2.GetDelegatedAdminAccountInput) (*inspector2.GetDelegatedAdminAccountOutput, error)
	GetDelegatedAdminAccountWithContext(aws.Context, *inspector2.GetDelegatedAdminAccountInput, ...request.Option) (*inspector2.GetDelegatedAdminAccountOutput, error)
	GetDelegatedAdminAccountRequest(*inspector2.GetDelegatedAdminAccountInput) (*request.Request, *inspector2.GetDelegatedAdminAccountOutput)

	GetEc2DeepInspectionConfiguration(*inspector2.GetEc2DeepInspectionConfigurationInput) (*inspector2.GetEc2DeepInspectionConfigurationOutput, error)
	GetEc2DeepInspectionConfigurationWithContext(aws.Context, *inspector2.GetEc2DeepInspectionConfigurationInput, ...request.Option) (*inspector2.GetEc2DeepInspectionConfigurationOutput, error)
	GetEc2DeepInspectionConfigurationRequest(*inspector2.GetEc2DeepInspectionConfigurationInput) (*request.Request, *inspector2.GetEc2DeepInspectionConfigurationOutput)

	GetEncryptionKey(*inspector2.GetEncryptionKeyInput) (*inspector2.GetEncryptionKeyOutput, error)
	GetEncryptionKeyWithContext(aws.Context, *inspector2.GetEncryptionKeyInput, ...request.Option) (*inspector2.GetEncryptionKeyOutput, error)
	GetEncryptionKeyRequest(*inspector2.GetEncryptionKeyInput) (*request.Request, *inspector2.GetEncryptionKeyOutput)

	GetFindingsReportStatus(*inspector2.GetFindingsReportStatusInput) (*inspector2.GetFindingsReportStatusOutput, error)
	GetFindingsReportStatusWithContext(aws.Context, *inspector2.GetFindingsReportStatusInput, ...request.Option) (*inspector2.GetFindingsReportStatusOutput, error)
	GetFindingsReportStatusRequest(*inspector2.GetFindingsReportStatusInput) (*request.Request, *inspector2.GetFindingsReportStatusOutput)

	GetMember(*inspector2.GetMemberInput) (*inspector2.GetMemberOutput, error)
	GetMemberWithContext(aws.Context, *inspector2.GetMemberInput, ...request.Option) (*inspector2.GetMemberOutput, error)
	GetMemberRequest(*inspector2.GetMemberInput) (*request.Request, *inspector2.GetMemberOutput)

	GetSbomExport(*inspector2.GetSbomExportInput) (*inspector2.GetSbomExportOutput, error)
	GetSbomExportWithContext(aws.Context, *inspector2.GetSbomExportInput, ...request.Option) (*inspector2.GetSbomExportOutput, error)
	GetSbomExportRequest(*inspector2.GetSbomExportInput) (*request.Request, *inspector2.GetSbomExportOutput)

	ListAccountPermissions(*inspector2.ListAccountPermissionsInput) (*inspector2.ListAccountPermissionsOutput, error)
	ListAccountPermissionsWithContext(aws.Context, *inspector2.ListAccountPermissionsInput, ...request.Option) (*inspector2.ListAccountPermissionsOutput, error)
	ListAccountPermissionsRequest(*inspector2.ListAccountPermissionsInput) (*request.Request, *inspector2.ListAccountPermissionsOutput)

	ListAccountPermissionsPages(*inspector2.ListAccountPermissionsInput, func(*inspector2.ListAccountPermissionsOutput, bool) bool) error
	ListAccountPermissionsPagesWithContext(aws.Context, *inspector2.ListAccountPermissionsInput, func(*inspector2.ListAccountPermissionsOutput, bool) bool, ...request.Option) error

	ListCoverage(*inspector2.ListCoverageInput) (*inspector2.ListCoverageOutput, error)
	ListCoverageWithContext(aws.Context, *inspector2.ListCoverageInput, ...request.Option) (*inspector2.ListCoverageOutput, error)
	ListCoverageRequest(*inspector2.ListCoverageInput) (*request.Request, *inspector2.ListCoverageOutput)

	ListCoveragePages(*inspector2.ListCoverageInput, func(*inspector2.ListCoverageOutput, bool) bool) error
	ListCoveragePagesWithContext(aws.Context, *inspector2.ListCoverageInput, func(*inspector2.ListCoverageOutput, bool) bool, ...request.Option) error

	ListCoverageStatistics(*inspector2.ListCoverageStatisticsInput) (*inspector2.ListCoverageStatisticsOutput, error)
	ListCoverageStatisticsWithContext(aws.Context, *inspector2.ListCoverageStatisticsInput, ...request.Option) (*inspector2.ListCoverageStatisticsOutput, error)
	ListCoverageStatisticsRequest(*inspector2.ListCoverageStatisticsInput) (*request.Request, *inspector2.ListCoverageStatisticsOutput)

	ListCoverageStatisticsPages(*inspector2.ListCoverageStatisticsInput, func(*inspector2.ListCoverageStatisticsOutput, bool) bool) error
	ListCoverageStatisticsPagesWithContext(aws.Context, *inspector2.ListCoverageStatisticsInput, func(*inspector2.ListCoverageStatisticsOutput, bool) bool, ...request.Option) error

	ListDelegatedAdminAccounts(*inspector2.ListDelegatedAdminAccountsInput) (*inspector2.ListDelegatedAdminAccountsOutput, error)
	ListDelegatedAdminAccountsWithContext(aws.Context, *inspector2.ListDelegatedAdminAccountsInput, ...request.Option) (*inspector2.ListDelegatedAdminAccountsOutput, error)
	ListDelegatedAdminAccountsRequest(*inspector2.ListDelegatedAdminAccountsInput) (*request.Request, *inspector2.ListDelegatedAdminAccountsOutput)

	ListDelegatedAdminAccountsPages(*inspector2.ListDelegatedAdminAccountsInput, func(*inspector2.ListDelegatedAdminAccountsOutput, bool) bool) error
	ListDelegatedAdminAccountsPagesWithContext(aws.Context, *inspector2.ListDelegatedAdminAccountsInput, func(*inspector2.ListDelegatedAdminAccountsOutput, bool) bool, ...request.Option) error

	ListFilters(*inspector2.ListFiltersInput) (*inspector2.ListFiltersOutput, error)
	ListFiltersWithContext(aws.Context, *inspector2.ListFiltersInput, ...request.Option) (*inspector2.ListFiltersOutput, error)
	ListFiltersRequest(*inspector2.ListFiltersInput) (*request.Request, *inspector2.ListFiltersOutput)

	ListFiltersPages(*inspector2.ListFiltersInput, func(*inspector2.ListFiltersOutput, bool) bool) error
	ListFiltersPagesWithContext(aws.Context, *inspector2.ListFiltersInput, func(*inspector2.ListFiltersOutput, bool) bool, ...request.Option) error

	ListFindingAggregations(*inspector2.ListFindingAggregationsInput) (*inspector2.ListFindingAggregationsOutput, error)
	ListFindingAggregationsWithContext(aws.Context, *inspector2.ListFindingAggregationsInput, ...request.Option) (*inspector2.ListFindingAggregationsOutput, error)
	ListFindingAggregationsRequest(*inspector2.ListFindingAggregationsInput) (*request.Request, *inspector2.ListFindingAggregationsOutput)

	ListFindingAggregationsPages(*inspector2.ListFindingAggregationsInput, func(*inspector2.ListFindingAggregationsOutput, bool) bool) error
	ListFindingAggregationsPagesWithContext(aws.Context, *inspector2.ListFindingAggregationsInput, func(*inspector2.ListFindingAggregationsOutput, bool) bool, ...request.Option) error

	ListFindings(*inspector2.ListFindingsInput) (*inspector2.ListFindingsOutput, error)
	ListFindingsWithContext(aws.Context, *inspector2.ListFindingsInput, ...request.Option) (*inspector2.ListFindingsOutput, error)
	ListFindingsRequest(*inspector2.ListFindingsInput) (*request.Request, *inspector2.ListFindingsOutput)

	ListFindingsPages(*inspector2.ListFindingsInput, func(*inspector2.ListFindingsOutput, bool) bool) error
	ListFindingsPagesWithContext(aws.Context, *inspector2.ListFindingsInput, func(*inspector2.ListFindingsOutput, bool) bool, ...request.Option) error

	ListMembers(*inspector2.ListMembersInput) (*inspector2.ListMembersOutput, error)
	ListMembersWithContext(aws.Context, *inspector2.ListMembersInput, ...request.Option) (*inspector2.ListMembersOutput, error)
	ListMembersRequest(*inspector2.ListMembersInput) (*request.Request, *inspector2.ListMembersOutput)

	ListMembersPages(*inspector2.ListMembersInput, func(*inspector2.ListMembersOutput, bool) bool) error
	ListMembersPagesWithContext(aws.Context, *inspector2.ListMembersInput, func(*inspector2.ListMembersOutput, bool) bool, ...request.Option) error

	ListTagsForResource(*inspector2.ListTagsForResourceInput) (*inspector2.ListTagsForResourceOutput, error)
	ListTagsForResourceWithContext(aws.Context, *inspector2.ListTagsForResourceInput, ...request.Option) (*inspector2.ListTagsForResourceOutput, error)
	ListTagsForResourceRequest(*inspector2.ListTagsForResourceInput) (*request.Request, *inspector2.ListTagsForResourceOutput)

	ListUsageTotals(*inspector2.ListUsageTotalsInput) (*inspector2.ListUsageTotalsOutput, error)
	ListUsageTotalsWithContext(aws.Context, *inspector2.ListUsageTotalsInput, ...request.Option) (*inspector2.ListUsageTotalsOutput, error)
	ListUsageTotalsRequest(*inspector2.ListUsageTotalsInput) (*request.Request, *inspector2.ListUsageTotalsOutput)

	ListUsageTotalsPages(*inspector2.ListUsageTotalsInput, func(*inspector2.ListUsageTotalsOutput, bool) bool) error
	ListUsageTotalsPagesWithContext(aws.Context, *inspector2.ListUsageTotalsInput, func(*inspector2.ListUsageTotalsOutput, bool) bool, ...request.Option) error

	ResetEncryptionKey(*inspector2.ResetEncryptionKeyInput) (*inspector2.ResetEncryptionKeyOutput, error)
	ResetEncryptionKeyWithContext(aws.Context, *inspector2.ResetEncryptionKeyInput, ...request.Option) (*inspector2.ResetEncryptionKeyOutput, error)
	ResetEncryptionKeyRequest(*inspector2.ResetEncryptionKeyInput) (*request.Request, *inspector2.ResetEncryptionKeyOutput)

	SearchVulnerabilities(*inspector2.SearchVulnerabilitiesInput) (*inspector2.SearchVulnerabilitiesOutput, error)
	SearchVulnerabilitiesWithContext(aws.Context, *inspector2.SearchVulnerabilitiesInput, ...request.Option) (*inspector2.SearchVulnerabilitiesOutput, error)
	SearchVulnerabilitiesRequest(*inspector2.SearchVulnerabilitiesInput) (*request.Request, *inspector2.SearchVulnerabilitiesOutput)

	SearchVulnerabilitiesPages(*inspector2.SearchVulnerabilitiesInput, func(*inspector2.SearchVulnerabilitiesOutput, bool) bool) error
	SearchVulnerabilitiesPagesWithContext(aws.Context, *inspector2.SearchVulnerabilitiesInput, func(*inspector2.SearchVulnerabilitiesOutput, bool) bool, ...request.Option) error

	TagResource(*inspector2.TagResourceInput) (*inspector2.TagResourceOutput, error)
	TagResourceWithContext(aws.Context, *inspector2.TagResourceInput, ...request.Option) (*inspector2.TagResourceOutput, error)
	TagResourceRequest(*inspector2.TagResourceInput) (*request.Request, *inspector2.TagResourceOutput)

	UntagResource(*inspector2.UntagResourceInput) (*inspector2.UntagResourceOutput, error)
	UntagResourceWithContext(aws.Context, *inspector2.UntagResourceInput, ...request.Option) (*inspector2.UntagResourceOutput, error)
	UntagResourceRequest(*inspector2.UntagResourceInput) (*request.Request, *inspector2.UntagResourceOutput)

	UpdateConfiguration(*inspector2.UpdateConfigurationInput) (*inspector2.UpdateConfigurationOutput, error)
	UpdateConfigurationWithContext(aws.Context, *inspector2.UpdateConfigurationInput, ...request.Option) (*inspector2.UpdateConfigurationOutput, error)
	UpdateConfigurationRequest(*inspector2.UpdateConfigurationInput) (*request.Request, *inspector2.UpdateConfigurationOutput)

	UpdateEc2DeepInspectionConfiguration(*inspector2.UpdateEc2DeepInspectionConfigurationInput) (*inspector2.UpdateEc2DeepInspectionConfigurationOutput, error)
	UpdateEc2DeepInspectionConfigurationWithContext(aws.Context, *inspector2.UpdateEc2DeepInspectionConfigurationInput, ...request.Option) (*inspector2.UpdateEc2DeepInspectionConfigurationOutput, error)
	UpdateEc2DeepInspectionConfigurationRequest(*inspector2.UpdateEc2DeepInspectionConfigurationInput) (*request.Request, *inspector2.UpdateEc2DeepInspectionConfigurationOutput)

	UpdateEncryptionKey(*inspector2.UpdateEncryptionKeyInput) (*inspector2.UpdateEncryptionKeyOutput, error)
	UpdateEncryptionKeyWithContext(aws.Context, *inspector2.UpdateEncryptionKeyInput, ...request.Option) (*inspector2.UpdateEncryptionKeyOutput, error)
	UpdateEncryptionKeyRequest(*inspector2.UpdateEncryptionKeyInput) (*request.Request, *inspector2.UpdateEncryptionKeyOutput)

	UpdateFilter(*inspector2.UpdateFilterInput) (*inspector2.UpdateFilterOutput, error)
	UpdateFilterWithContext(aws.Context, *inspector2.UpdateFilterInput, ...request.Option) (*inspector2.UpdateFilterOutput, error)
	UpdateFilterRequest(*inspector2.UpdateFilterInput) (*request.Request, *inspector2.UpdateFilterOutput)

	UpdateOrgEc2DeepInspectionConfiguration(*inspector2.UpdateOrgEc2DeepInspectionConfigurationInput) (*inspector2.UpdateOrgEc2DeepInspectionConfigurationOutput, error)
	UpdateOrgEc2DeepInspectionConfigurationWithContext(aws.Context, *inspector2.UpdateOrgEc2DeepInspectionConfigurationInput, ...request.Option) (*inspector2.UpdateOrgEc2DeepInspectionConfigurationOutput, error)
	UpdateOrgEc2DeepInspectionConfigurationRequest(*inspector2.UpdateOrgEc2DeepInspectionConfigurationInput) (*request.Request, *inspector2.UpdateOrgEc2DeepInspectionConfigurationOutput)

	UpdateOrganizationConfiguration(*inspector2.UpdateOrganizationConfigurationInput) (*inspector2.UpdateOrganizationConfigurationOutput, error)
	UpdateOrganizationConfigurationWithContext(aws.Context, *inspector2.UpdateOrganizationConfigurationInput, ...request.Option) (*inspector2.UpdateOrganizationConfigurationOutput, error)
	UpdateOrganizationConfigurationRequest(*inspector2.UpdateOrganizationConfigurationInput) (*request.Request, *inspector2.UpdateOrganizationConfigurationOutput)
}

Inspector2API provides an interface to enable mocking the inspector2.Inspector2 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
// Inspector2.
func myFunc(svc inspector2iface.Inspector2API) bool {
    // Make svc.AssociateMember request
}

func main() {
    sess := session.New()
    svc := inspector2.New(sess)

    myFunc(svc)
}

In your _test.go file:

// Define a mock struct to be used in your unit tests of myFunc.
type mockInspector2Client struct {
    inspector2iface.Inspector2API
}
func (m *mockInspector2Client) AssociateMember(input *inspector2.AssociateMemberInput) (*inspector2.AssociateMemberOutput, error) {
    // mock response/functionality
}

func TestMyFunc(t *testing.T) {
    // Setup Test
    mockSvc := &mockInspector2Client{}

    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.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL