pcaconnectoradiface

package
v0.0.0-...-eeb2ccb Latest Latest
Warning

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

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

Documentation

Overview

Package pcaconnectoradiface provides an interface to enable mocking the PcaConnectorAd 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 PcaConnectorAdAPI

type PcaConnectorAdAPI interface {
	CreateConnector(*pcaconnectorad.CreateConnectorInput) (*pcaconnectorad.CreateConnectorOutput, error)
	CreateConnectorWithContext(aws.Context, *pcaconnectorad.CreateConnectorInput, ...request.Option) (*pcaconnectorad.CreateConnectorOutput, error)
	CreateConnectorRequest(*pcaconnectorad.CreateConnectorInput) (*request.Request, *pcaconnectorad.CreateConnectorOutput)

	CreateDirectoryRegistration(*pcaconnectorad.CreateDirectoryRegistrationInput) (*pcaconnectorad.CreateDirectoryRegistrationOutput, error)
	CreateDirectoryRegistrationWithContext(aws.Context, *pcaconnectorad.CreateDirectoryRegistrationInput, ...request.Option) (*pcaconnectorad.CreateDirectoryRegistrationOutput, error)
	CreateDirectoryRegistrationRequest(*pcaconnectorad.CreateDirectoryRegistrationInput) (*request.Request, *pcaconnectorad.CreateDirectoryRegistrationOutput)

	CreateServicePrincipalName(*pcaconnectorad.CreateServicePrincipalNameInput) (*pcaconnectorad.CreateServicePrincipalNameOutput, error)
	CreateServicePrincipalNameWithContext(aws.Context, *pcaconnectorad.CreateServicePrincipalNameInput, ...request.Option) (*pcaconnectorad.CreateServicePrincipalNameOutput, error)
	CreateServicePrincipalNameRequest(*pcaconnectorad.CreateServicePrincipalNameInput) (*request.Request, *pcaconnectorad.CreateServicePrincipalNameOutput)

	CreateTemplate(*pcaconnectorad.CreateTemplateInput) (*pcaconnectorad.CreateTemplateOutput, error)
	CreateTemplateWithContext(aws.Context, *pcaconnectorad.CreateTemplateInput, ...request.Option) (*pcaconnectorad.CreateTemplateOutput, error)
	CreateTemplateRequest(*pcaconnectorad.CreateTemplateInput) (*request.Request, *pcaconnectorad.CreateTemplateOutput)

	CreateTemplateGroupAccessControlEntry(*pcaconnectorad.CreateTemplateGroupAccessControlEntryInput) (*pcaconnectorad.CreateTemplateGroupAccessControlEntryOutput, error)
	CreateTemplateGroupAccessControlEntryWithContext(aws.Context, *pcaconnectorad.CreateTemplateGroupAccessControlEntryInput, ...request.Option) (*pcaconnectorad.CreateTemplateGroupAccessControlEntryOutput, error)
	CreateTemplateGroupAccessControlEntryRequest(*pcaconnectorad.CreateTemplateGroupAccessControlEntryInput) (*request.Request, *pcaconnectorad.CreateTemplateGroupAccessControlEntryOutput)

	DeleteConnector(*pcaconnectorad.DeleteConnectorInput) (*pcaconnectorad.DeleteConnectorOutput, error)
	DeleteConnectorWithContext(aws.Context, *pcaconnectorad.DeleteConnectorInput, ...request.Option) (*pcaconnectorad.DeleteConnectorOutput, error)
	DeleteConnectorRequest(*pcaconnectorad.DeleteConnectorInput) (*request.Request, *pcaconnectorad.DeleteConnectorOutput)

	DeleteDirectoryRegistration(*pcaconnectorad.DeleteDirectoryRegistrationInput) (*pcaconnectorad.DeleteDirectoryRegistrationOutput, error)
	DeleteDirectoryRegistrationWithContext(aws.Context, *pcaconnectorad.DeleteDirectoryRegistrationInput, ...request.Option) (*pcaconnectorad.DeleteDirectoryRegistrationOutput, error)
	DeleteDirectoryRegistrationRequest(*pcaconnectorad.DeleteDirectoryRegistrationInput) (*request.Request, *pcaconnectorad.DeleteDirectoryRegistrationOutput)

	DeleteServicePrincipalName(*pcaconnectorad.DeleteServicePrincipalNameInput) (*pcaconnectorad.DeleteServicePrincipalNameOutput, error)
	DeleteServicePrincipalNameWithContext(aws.Context, *pcaconnectorad.DeleteServicePrincipalNameInput, ...request.Option) (*pcaconnectorad.DeleteServicePrincipalNameOutput, error)
	DeleteServicePrincipalNameRequest(*pcaconnectorad.DeleteServicePrincipalNameInput) (*request.Request, *pcaconnectorad.DeleteServicePrincipalNameOutput)

	DeleteTemplate(*pcaconnectorad.DeleteTemplateInput) (*pcaconnectorad.DeleteTemplateOutput, error)
	DeleteTemplateWithContext(aws.Context, *pcaconnectorad.DeleteTemplateInput, ...request.Option) (*pcaconnectorad.DeleteTemplateOutput, error)
	DeleteTemplateRequest(*pcaconnectorad.DeleteTemplateInput) (*request.Request, *pcaconnectorad.DeleteTemplateOutput)

	DeleteTemplateGroupAccessControlEntry(*pcaconnectorad.DeleteTemplateGroupAccessControlEntryInput) (*pcaconnectorad.DeleteTemplateGroupAccessControlEntryOutput, error)
	DeleteTemplateGroupAccessControlEntryWithContext(aws.Context, *pcaconnectorad.DeleteTemplateGroupAccessControlEntryInput, ...request.Option) (*pcaconnectorad.DeleteTemplateGroupAccessControlEntryOutput, error)
	DeleteTemplateGroupAccessControlEntryRequest(*pcaconnectorad.DeleteTemplateGroupAccessControlEntryInput) (*request.Request, *pcaconnectorad.DeleteTemplateGroupAccessControlEntryOutput)

	GetConnector(*pcaconnectorad.GetConnectorInput) (*pcaconnectorad.GetConnectorOutput, error)
	GetConnectorWithContext(aws.Context, *pcaconnectorad.GetConnectorInput, ...request.Option) (*pcaconnectorad.GetConnectorOutput, error)
	GetConnectorRequest(*pcaconnectorad.GetConnectorInput) (*request.Request, *pcaconnectorad.GetConnectorOutput)

	GetDirectoryRegistration(*pcaconnectorad.GetDirectoryRegistrationInput) (*pcaconnectorad.GetDirectoryRegistrationOutput, error)
	GetDirectoryRegistrationWithContext(aws.Context, *pcaconnectorad.GetDirectoryRegistrationInput, ...request.Option) (*pcaconnectorad.GetDirectoryRegistrationOutput, error)
	GetDirectoryRegistrationRequest(*pcaconnectorad.GetDirectoryRegistrationInput) (*request.Request, *pcaconnectorad.GetDirectoryRegistrationOutput)

	GetServicePrincipalName(*pcaconnectorad.GetServicePrincipalNameInput) (*pcaconnectorad.GetServicePrincipalNameOutput, error)
	GetServicePrincipalNameWithContext(aws.Context, *pcaconnectorad.GetServicePrincipalNameInput, ...request.Option) (*pcaconnectorad.GetServicePrincipalNameOutput, error)
	GetServicePrincipalNameRequest(*pcaconnectorad.GetServicePrincipalNameInput) (*request.Request, *pcaconnectorad.GetServicePrincipalNameOutput)

	GetTemplate(*pcaconnectorad.GetTemplateInput) (*pcaconnectorad.GetTemplateOutput, error)
	GetTemplateWithContext(aws.Context, *pcaconnectorad.GetTemplateInput, ...request.Option) (*pcaconnectorad.GetTemplateOutput, error)
	GetTemplateRequest(*pcaconnectorad.GetTemplateInput) (*request.Request, *pcaconnectorad.GetTemplateOutput)

	GetTemplateGroupAccessControlEntry(*pcaconnectorad.GetTemplateGroupAccessControlEntryInput) (*pcaconnectorad.GetTemplateGroupAccessControlEntryOutput, error)
	GetTemplateGroupAccessControlEntryWithContext(aws.Context, *pcaconnectorad.GetTemplateGroupAccessControlEntryInput, ...request.Option) (*pcaconnectorad.GetTemplateGroupAccessControlEntryOutput, error)
	GetTemplateGroupAccessControlEntryRequest(*pcaconnectorad.GetTemplateGroupAccessControlEntryInput) (*request.Request, *pcaconnectorad.GetTemplateGroupAccessControlEntryOutput)

	ListConnectors(*pcaconnectorad.ListConnectorsInput) (*pcaconnectorad.ListConnectorsOutput, error)
	ListConnectorsWithContext(aws.Context, *pcaconnectorad.ListConnectorsInput, ...request.Option) (*pcaconnectorad.ListConnectorsOutput, error)
	ListConnectorsRequest(*pcaconnectorad.ListConnectorsInput) (*request.Request, *pcaconnectorad.ListConnectorsOutput)

	ListConnectorsPages(*pcaconnectorad.ListConnectorsInput, func(*pcaconnectorad.ListConnectorsOutput, bool) bool) error
	ListConnectorsPagesWithContext(aws.Context, *pcaconnectorad.ListConnectorsInput, func(*pcaconnectorad.ListConnectorsOutput, bool) bool, ...request.Option) error

	ListDirectoryRegistrations(*pcaconnectorad.ListDirectoryRegistrationsInput) (*pcaconnectorad.ListDirectoryRegistrationsOutput, error)
	ListDirectoryRegistrationsWithContext(aws.Context, *pcaconnectorad.ListDirectoryRegistrationsInput, ...request.Option) (*pcaconnectorad.ListDirectoryRegistrationsOutput, error)
	ListDirectoryRegistrationsRequest(*pcaconnectorad.ListDirectoryRegistrationsInput) (*request.Request, *pcaconnectorad.ListDirectoryRegistrationsOutput)

	ListDirectoryRegistrationsPages(*pcaconnectorad.ListDirectoryRegistrationsInput, func(*pcaconnectorad.ListDirectoryRegistrationsOutput, bool) bool) error
	ListDirectoryRegistrationsPagesWithContext(aws.Context, *pcaconnectorad.ListDirectoryRegistrationsInput, func(*pcaconnectorad.ListDirectoryRegistrationsOutput, bool) bool, ...request.Option) error

	ListServicePrincipalNames(*pcaconnectorad.ListServicePrincipalNamesInput) (*pcaconnectorad.ListServicePrincipalNamesOutput, error)
	ListServicePrincipalNamesWithContext(aws.Context, *pcaconnectorad.ListServicePrincipalNamesInput, ...request.Option) (*pcaconnectorad.ListServicePrincipalNamesOutput, error)
	ListServicePrincipalNamesRequest(*pcaconnectorad.ListServicePrincipalNamesInput) (*request.Request, *pcaconnectorad.ListServicePrincipalNamesOutput)

	ListServicePrincipalNamesPages(*pcaconnectorad.ListServicePrincipalNamesInput, func(*pcaconnectorad.ListServicePrincipalNamesOutput, bool) bool) error
	ListServicePrincipalNamesPagesWithContext(aws.Context, *pcaconnectorad.ListServicePrincipalNamesInput, func(*pcaconnectorad.ListServicePrincipalNamesOutput, bool) bool, ...request.Option) error

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

	ListTemplateGroupAccessControlEntries(*pcaconnectorad.ListTemplateGroupAccessControlEntriesInput) (*pcaconnectorad.ListTemplateGroupAccessControlEntriesOutput, error)
	ListTemplateGroupAccessControlEntriesWithContext(aws.Context, *pcaconnectorad.ListTemplateGroupAccessControlEntriesInput, ...request.Option) (*pcaconnectorad.ListTemplateGroupAccessControlEntriesOutput, error)
	ListTemplateGroupAccessControlEntriesRequest(*pcaconnectorad.ListTemplateGroupAccessControlEntriesInput) (*request.Request, *pcaconnectorad.ListTemplateGroupAccessControlEntriesOutput)

	ListTemplateGroupAccessControlEntriesPages(*pcaconnectorad.ListTemplateGroupAccessControlEntriesInput, func(*pcaconnectorad.ListTemplateGroupAccessControlEntriesOutput, bool) bool) error
	ListTemplateGroupAccessControlEntriesPagesWithContext(aws.Context, *pcaconnectorad.ListTemplateGroupAccessControlEntriesInput, func(*pcaconnectorad.ListTemplateGroupAccessControlEntriesOutput, bool) bool, ...request.Option) error

	ListTemplates(*pcaconnectorad.ListTemplatesInput) (*pcaconnectorad.ListTemplatesOutput, error)
	ListTemplatesWithContext(aws.Context, *pcaconnectorad.ListTemplatesInput, ...request.Option) (*pcaconnectorad.ListTemplatesOutput, error)
	ListTemplatesRequest(*pcaconnectorad.ListTemplatesInput) (*request.Request, *pcaconnectorad.ListTemplatesOutput)

	ListTemplatesPages(*pcaconnectorad.ListTemplatesInput, func(*pcaconnectorad.ListTemplatesOutput, bool) bool) error
	ListTemplatesPagesWithContext(aws.Context, *pcaconnectorad.ListTemplatesInput, func(*pcaconnectorad.ListTemplatesOutput, bool) bool, ...request.Option) error

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

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

	UpdateTemplate(*pcaconnectorad.UpdateTemplateInput) (*pcaconnectorad.UpdateTemplateOutput, error)
	UpdateTemplateWithContext(aws.Context, *pcaconnectorad.UpdateTemplateInput, ...request.Option) (*pcaconnectorad.UpdateTemplateOutput, error)
	UpdateTemplateRequest(*pcaconnectorad.UpdateTemplateInput) (*request.Request, *pcaconnectorad.UpdateTemplateOutput)

	UpdateTemplateGroupAccessControlEntry(*pcaconnectorad.UpdateTemplateGroupAccessControlEntryInput) (*pcaconnectorad.UpdateTemplateGroupAccessControlEntryOutput, error)
	UpdateTemplateGroupAccessControlEntryWithContext(aws.Context, *pcaconnectorad.UpdateTemplateGroupAccessControlEntryInput, ...request.Option) (*pcaconnectorad.UpdateTemplateGroupAccessControlEntryOutput, error)
	UpdateTemplateGroupAccessControlEntryRequest(*pcaconnectorad.UpdateTemplateGroupAccessControlEntryInput) (*request.Request, *pcaconnectorad.UpdateTemplateGroupAccessControlEntryOutput)
}

PcaConnectorAdAPI provides an interface to enable mocking the pcaconnectorad.PcaConnectorAd 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
// PcaConnectorAd.
func myFunc(svc pcaconnectoradiface.PcaConnectorAdAPI) bool {
    // Make svc.CreateConnector request
}

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

    myFunc(svc)
}

In your _test.go file:

// Define a mock struct to be used in your unit tests of myFunc.
type mockPcaConnectorAdClient struct {
    pcaconnectoradiface.PcaConnectorAdAPI
}
func (m *mockPcaConnectorAdClient) CreateConnector(input *pcaconnectorad.CreateConnectorInput) (*pcaconnectorad.CreateConnectorOutput, error) {
    // mock response/functionality
}

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

    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