Documentation
¶
Overview ¶
Code generated by MockGen. DO NOT EDIT. Source: operator_collection.go
Generated by this command:
mockgen -source=operator_collection.go -destination=operator_collection_mock.go -package=operation -write_package_comment=false
Code generated by MockGen. DO NOT EDIT. Source: operator_manager.go
Generated by this command:
mockgen -source=operator_manager.go -destination=operator_manager_mock.go -package=operation -write_package_comment=false
Code generated by MockGen. DO NOT EDIT. Source: operator.go
Generated by this command:
mockgen -source=operator.go -destination=operator_mock.go -package=operation -write_package_comment=false
Index ¶
- Constants
- Variables
- type BackupVaultOperator
- func (o *BackupVaultOperator) AddResource(resource *types.StackResourceSummary)
- func (o *BackupVaultOperator) DeleteBackupVault(ctx context.Context, backupVaultName *string) error
- func (o *BackupVaultOperator) DeleteResources(ctx context.Context) error
- func (o *BackupVaultOperator) GetResourcesLength() int
- type CloudFormationStackOperator
- func (o *CloudFormationStackOperator) AddResource(resource *types.StackResourceSummary)
- func (o *CloudFormationStackOperator) DeleteCloudFormationStack(ctx context.Context, stackName *string, isRootStack bool, ...) error
- func (o *CloudFormationStackOperator) DeleteResources(ctx context.Context) error
- func (o *CloudFormationStackOperator) GetResourcesLength() int
- func (o *CloudFormationStackOperator) GetSortedStackNames(ctx context.Context, stackNames []string) ([]string, error)
- func (o *CloudFormationStackOperator) ListStacksFilteredByKeyword(ctx context.Context, keyword *string) ([]string, error)
- type CustomOperator
- type EcrRepositoryOperator
- func (o *EcrRepositoryOperator) AddResource(resource *types.StackResourceSummary)
- func (o *EcrRepositoryOperator) DeleteEcrRepository(ctx context.Context, repositoryName *string) error
- func (o *EcrRepositoryOperator) DeleteResources(ctx context.Context) error
- func (o *EcrRepositoryOperator) GetResourcesLength() int
- type IOperator
- type IOperatorCollection
- type IOperatorManager
- type IamGroupOperator
- type MockIOperator
- type MockIOperatorCollection
- func (m *MockIOperatorCollection) EXPECT() *MockIOperatorCollectionMockRecorder
- func (m *MockIOperatorCollection) GetLogicalResourceIds() []string
- func (m *MockIOperatorCollection) GetOperators() []IOperator
- func (m *MockIOperatorCollection) RaiseUnsupportedResourceError() error
- func (m *MockIOperatorCollection) SetOperatorCollection(stackName *string, stackResourceSummaries []types.StackResourceSummary)
- type MockIOperatorCollectionMockRecorder
- func (mr *MockIOperatorCollectionMockRecorder) GetLogicalResourceIds() *gomock.Call
- func (mr *MockIOperatorCollectionMockRecorder) GetOperators() *gomock.Call
- func (mr *MockIOperatorCollectionMockRecorder) RaiseUnsupportedResourceError() *gomock.Call
- func (mr *MockIOperatorCollectionMockRecorder) SetOperatorCollection(stackName, stackResourceSummaries any) *gomock.Call
- type MockIOperatorManager
- func (m *MockIOperatorManager) CheckResourceCounts() error
- func (m *MockIOperatorManager) DeleteResourceCollection(ctx context.Context) error
- func (m *MockIOperatorManager) EXPECT() *MockIOperatorManagerMockRecorder
- func (m *MockIOperatorManager) GetLogicalResourceIds() []string
- func (m *MockIOperatorManager) SetOperatorCollection(stackName *string, stackResourceSummaries []types.StackResourceSummary)
- type MockIOperatorManagerMockRecorder
- func (mr *MockIOperatorManagerMockRecorder) CheckResourceCounts() *gomock.Call
- func (mr *MockIOperatorManagerMockRecorder) DeleteResourceCollection(ctx any) *gomock.Call
- func (mr *MockIOperatorManagerMockRecorder) GetLogicalResourceIds() *gomock.Call
- func (mr *MockIOperatorManagerMockRecorder) SetOperatorCollection(stackName, stackResourceSummaries any) *gomock.Call
- type MockIOperatorMockRecorder
- type OperatorCollection
- func (c *OperatorCollection) GetLogicalResourceIds() []string
- func (c *OperatorCollection) GetOperators() []IOperator
- func (c *OperatorCollection) RaiseUnsupportedResourceError() error
- func (c *OperatorCollection) SetOperatorCollection(stackName *string, stackResourceSummaries []types.StackResourceSummary)
- type OperatorFactory
- func (f *OperatorFactory) CreateBackupVaultOperator() *BackupVaultOperator
- func (f *OperatorFactory) CreateCloudFormationStackOperator(targetResourceTypes []string) *CloudFormationStackOperator
- func (f *OperatorFactory) CreateCustomOperator() *CustomOperator
- func (f *OperatorFactory) CreateEcrRepositoryOperator() *EcrRepositoryOperator
- func (f *OperatorFactory) CreateIamGroupOperator() *IamGroupOperator
- func (f *OperatorFactory) CreateS3BucketOperator() *S3BucketOperator
- func (f *OperatorFactory) CreateS3DirectoryBucketOperator() *S3BucketOperator
- type OperatorManager
- func (m *OperatorManager) CheckResourceCounts() error
- func (m *OperatorManager) DeleteResourceCollection(ctx context.Context) error
- func (m *OperatorManager) GetLogicalResourceIds() []string
- func (m *OperatorManager) SetOperatorCollection(stackName *string, stackResourceSummaries []types.StackResourceSummary)
- type S3BucketOperator
- func (o *S3BucketOperator) AddResource(resource *cfntypes.StackResourceSummary)
- func (o *S3BucketOperator) DeleteResources(ctx context.Context) error
- func (o *S3BucketOperator) DeleteS3Bucket(ctx context.Context, bucketName *string) error
- func (o *S3BucketOperator) GetDirectoryBucketsFlag() bool
- func (o *S3BucketOperator) GetResourcesLength() int
Constants ¶
const SDKRetryMaxAttempts = 3
const StackNameRule = `^arn:aws:cloudformation:[^:]*:[0-9]*:stack/([^/]*)/.*$`
Variables ¶
var StackNameRuleRegExp = regexp.MustCompile(StackNameRule)
var StackStatusExceptionsForDescribeStacks = []types.StackStatus{ types.StackStatusCreateInProgress, types.StackStatusRollbackInProgress, types.StackStatusDeleteInProgress, types.StackStatusUpdateInProgress, types.StackStatusUpdateCompleteCleanupInProgress, types.StackStatusUpdateRollbackInProgress, types.StackStatusUpdateRollbackCompleteCleanupInProgress, types.StackStatusReviewInProgress, types.StackStatusImportInProgress, types.StackStatusImportRollbackInProgress, }
Except xxInProgress StackStatusDeleteComplete is not included because DescribeStacks does not return a DELETE_COMPLETE stack.
Functions ¶
This section is empty.
Types ¶
type BackupVaultOperator ¶
type BackupVaultOperator struct {
// contains filtered or unexported fields
}
func NewBackupVaultOperator ¶
func NewBackupVaultOperator(client client.IBackup) *BackupVaultOperator
func (*BackupVaultOperator) AddResource ¶
func (o *BackupVaultOperator) AddResource(resource *types.StackResourceSummary)
func (*BackupVaultOperator) DeleteBackupVault ¶
func (o *BackupVaultOperator) DeleteBackupVault(ctx context.Context, backupVaultName *string) error
func (*BackupVaultOperator) DeleteResources ¶
func (o *BackupVaultOperator) DeleteResources(ctx context.Context) error
func (*BackupVaultOperator) GetResourcesLength ¶
func (o *BackupVaultOperator) GetResourcesLength() int
type CloudFormationStackOperator ¶ added in v0.9.0
type CloudFormationStackOperator struct {
// contains filtered or unexported fields
}
func NewCloudFormationStackOperator ¶ added in v0.9.0
func NewCloudFormationStackOperator(config aws.Config, client client.ICloudFormation, targetResourceTypes []string) *CloudFormationStackOperator
func (*CloudFormationStackOperator) AddResource ¶ added in v0.9.0
func (o *CloudFormationStackOperator) AddResource(resource *types.StackResourceSummary)
func (*CloudFormationStackOperator) DeleteCloudFormationStack ¶ added in v0.9.0
func (o *CloudFormationStackOperator) DeleteCloudFormationStack(ctx context.Context, stackName *string, isRootStack bool, operatorManager IOperatorManager) error
func (*CloudFormationStackOperator) DeleteResources ¶ added in v0.9.0
func (o *CloudFormationStackOperator) DeleteResources(ctx context.Context) error
func (*CloudFormationStackOperator) GetResourcesLength ¶ added in v0.9.0
func (o *CloudFormationStackOperator) GetResourcesLength() int
func (*CloudFormationStackOperator) GetSortedStackNames ¶ added in v1.6.0
func (*CloudFormationStackOperator) ListStacksFilteredByKeyword ¶ added in v0.9.0
type CustomOperator ¶
type CustomOperator struct {
// contains filtered or unexported fields
}
func NewCustomOperator ¶
func NewCustomOperator() *CustomOperator
func (*CustomOperator) AddResource ¶
func (o *CustomOperator) AddResource(resource *types.StackResourceSummary)
func (*CustomOperator) DeleteResources ¶
func (o *CustomOperator) DeleteResources(ctx context.Context) error
Implicit implements (these resources will be deleted on its own)
func (*CustomOperator) GetResourcesLength ¶
func (o *CustomOperator) GetResourcesLength() int
type EcrRepositoryOperator ¶ added in v0.9.0
type EcrRepositoryOperator struct {
// contains filtered or unexported fields
}
func NewEcrRepositoryOperator ¶ added in v0.9.0
func NewEcrRepositoryOperator(client client.IEcr) *EcrRepositoryOperator
func (*EcrRepositoryOperator) AddResource ¶ added in v0.9.0
func (o *EcrRepositoryOperator) AddResource(resource *types.StackResourceSummary)
func (*EcrRepositoryOperator) DeleteEcrRepository ¶ added in v0.9.0
func (o *EcrRepositoryOperator) DeleteEcrRepository(ctx context.Context, repositoryName *string) error
func (*EcrRepositoryOperator) DeleteResources ¶ added in v0.9.0
func (o *EcrRepositoryOperator) DeleteResources(ctx context.Context) error
func (*EcrRepositoryOperator) GetResourcesLength ¶ added in v0.9.0
func (o *EcrRepositoryOperator) GetResourcesLength() int
type IOperatorCollection ¶
type IOperatorManager ¶
type IamGroupOperator ¶ added in v1.12.0
type IamGroupOperator struct {
// contains filtered or unexported fields
}
func NewIamGroupOperator ¶ added in v1.12.0
func NewIamGroupOperator(client client.IIam) *IamGroupOperator
func (*IamGroupOperator) AddResource ¶ added in v1.12.0
func (o *IamGroupOperator) AddResource(resource *types.StackResourceSummary)
func (*IamGroupOperator) DeleteIamGroup ¶ added in v1.12.0
func (o *IamGroupOperator) DeleteIamGroup(ctx context.Context, groupName *string) error
func (*IamGroupOperator) DeleteResources ¶ added in v1.12.0
func (o *IamGroupOperator) DeleteResources(ctx context.Context) error
func (*IamGroupOperator) GetResourcesLength ¶ added in v1.12.0
func (o *IamGroupOperator) GetResourcesLength() int
type MockIOperator ¶ added in v0.9.0
type MockIOperator struct {
// contains filtered or unexported fields
}
MockIOperator is a mock of IOperator interface.
func NewMockIOperator ¶ added in v0.9.0
func NewMockIOperator(ctrl *gomock.Controller) *MockIOperator
NewMockIOperator creates a new mock instance.
func (*MockIOperator) AddResource ¶ added in v0.9.0
func (m *MockIOperator) AddResource(resource *types.StackResourceSummary)
AddResource mocks base method.
func (*MockIOperator) DeleteResources ¶ added in v0.9.0
func (m *MockIOperator) DeleteResources(ctx context.Context) error
DeleteResources mocks base method.
func (*MockIOperator) EXPECT ¶ added in v0.9.0
func (m *MockIOperator) EXPECT() *MockIOperatorMockRecorder
EXPECT returns an object that allows the caller to indicate expected use.
func (*MockIOperator) GetResourcesLength ¶ added in v0.9.0
func (m *MockIOperator) GetResourcesLength() int
GetResourcesLength mocks base method.
type MockIOperatorCollection ¶ added in v0.9.0
type MockIOperatorCollection struct {
// contains filtered or unexported fields
}
MockIOperatorCollection is a mock of IOperatorCollection interface.
func NewMockIOperatorCollection ¶ added in v0.9.0
func NewMockIOperatorCollection(ctrl *gomock.Controller) *MockIOperatorCollection
NewMockIOperatorCollection creates a new mock instance.
func (*MockIOperatorCollection) EXPECT ¶ added in v0.9.0
func (m *MockIOperatorCollection) EXPECT() *MockIOperatorCollectionMockRecorder
EXPECT returns an object that allows the caller to indicate expected use.
func (*MockIOperatorCollection) GetLogicalResourceIds ¶ added in v0.9.0
func (m *MockIOperatorCollection) GetLogicalResourceIds() []string
GetLogicalResourceIds mocks base method.
func (*MockIOperatorCollection) GetOperators ¶ added in v0.9.0
func (m *MockIOperatorCollection) GetOperators() []IOperator
GetOperators mocks base method.
func (*MockIOperatorCollection) RaiseUnsupportedResourceError ¶ added in v0.9.0
func (m *MockIOperatorCollection) RaiseUnsupportedResourceError() error
RaiseUnsupportedResourceError mocks base method.
func (*MockIOperatorCollection) SetOperatorCollection ¶ added in v0.9.0
func (m *MockIOperatorCollection) SetOperatorCollection(stackName *string, stackResourceSummaries []types.StackResourceSummary)
SetOperatorCollection mocks base method.
type MockIOperatorCollectionMockRecorder ¶ added in v0.9.0
type MockIOperatorCollectionMockRecorder struct {
// contains filtered or unexported fields
}
MockIOperatorCollectionMockRecorder is the mock recorder for MockIOperatorCollection.
func (*MockIOperatorCollectionMockRecorder) GetLogicalResourceIds ¶ added in v0.9.0
func (mr *MockIOperatorCollectionMockRecorder) GetLogicalResourceIds() *gomock.Call
GetLogicalResourceIds indicates an expected call of GetLogicalResourceIds.
func (*MockIOperatorCollectionMockRecorder) GetOperators ¶ added in v0.9.0
func (mr *MockIOperatorCollectionMockRecorder) GetOperators() *gomock.Call
GetOperators indicates an expected call of GetOperators.
func (*MockIOperatorCollectionMockRecorder) RaiseUnsupportedResourceError ¶ added in v0.9.0
func (mr *MockIOperatorCollectionMockRecorder) RaiseUnsupportedResourceError() *gomock.Call
RaiseUnsupportedResourceError indicates an expected call of RaiseUnsupportedResourceError.
func (*MockIOperatorCollectionMockRecorder) SetOperatorCollection ¶ added in v0.9.0
func (mr *MockIOperatorCollectionMockRecorder) SetOperatorCollection(stackName, stackResourceSummaries any) *gomock.Call
SetOperatorCollection indicates an expected call of SetOperatorCollection.
type MockIOperatorManager ¶ added in v0.9.0
type MockIOperatorManager struct {
// contains filtered or unexported fields
}
MockIOperatorManager is a mock of IOperatorManager interface.
func NewMockIOperatorManager ¶ added in v0.9.0
func NewMockIOperatorManager(ctrl *gomock.Controller) *MockIOperatorManager
NewMockIOperatorManager creates a new mock instance.
func (*MockIOperatorManager) CheckResourceCounts ¶ added in v0.9.0
func (m *MockIOperatorManager) CheckResourceCounts() error
CheckResourceCounts mocks base method.
func (*MockIOperatorManager) DeleteResourceCollection ¶ added in v0.9.0
func (m *MockIOperatorManager) DeleteResourceCollection(ctx context.Context) error
DeleteResourceCollection mocks base method.
func (*MockIOperatorManager) EXPECT ¶ added in v0.9.0
func (m *MockIOperatorManager) EXPECT() *MockIOperatorManagerMockRecorder
EXPECT returns an object that allows the caller to indicate expected use.
func (*MockIOperatorManager) GetLogicalResourceIds ¶ added in v0.9.0
func (m *MockIOperatorManager) GetLogicalResourceIds() []string
GetLogicalResourceIds mocks base method.
func (*MockIOperatorManager) SetOperatorCollection ¶ added in v0.9.0
func (m *MockIOperatorManager) SetOperatorCollection(stackName *string, stackResourceSummaries []types.StackResourceSummary)
SetOperatorCollection mocks base method.
type MockIOperatorManagerMockRecorder ¶ added in v0.9.0
type MockIOperatorManagerMockRecorder struct {
// contains filtered or unexported fields
}
MockIOperatorManagerMockRecorder is the mock recorder for MockIOperatorManager.
func (*MockIOperatorManagerMockRecorder) CheckResourceCounts ¶ added in v0.9.0
func (mr *MockIOperatorManagerMockRecorder) CheckResourceCounts() *gomock.Call
CheckResourceCounts indicates an expected call of CheckResourceCounts.
func (*MockIOperatorManagerMockRecorder) DeleteResourceCollection ¶ added in v0.9.0
func (mr *MockIOperatorManagerMockRecorder) DeleteResourceCollection(ctx any) *gomock.Call
DeleteResourceCollection indicates an expected call of DeleteResourceCollection.
func (*MockIOperatorManagerMockRecorder) GetLogicalResourceIds ¶ added in v0.9.0
func (mr *MockIOperatorManagerMockRecorder) GetLogicalResourceIds() *gomock.Call
GetLogicalResourceIds indicates an expected call of GetLogicalResourceIds.
func (*MockIOperatorManagerMockRecorder) SetOperatorCollection ¶ added in v0.9.0
func (mr *MockIOperatorManagerMockRecorder) SetOperatorCollection(stackName, stackResourceSummaries any) *gomock.Call
SetOperatorCollection indicates an expected call of SetOperatorCollection.
type MockIOperatorMockRecorder ¶ added in v0.9.0
type MockIOperatorMockRecorder struct {
// contains filtered or unexported fields
}
MockIOperatorMockRecorder is the mock recorder for MockIOperator.
func (*MockIOperatorMockRecorder) AddResource ¶ added in v0.9.0
func (mr *MockIOperatorMockRecorder) AddResource(resource any) *gomock.Call
AddResource indicates an expected call of AddResource.
func (*MockIOperatorMockRecorder) DeleteResources ¶ added in v0.9.0
func (mr *MockIOperatorMockRecorder) DeleteResources(ctx any) *gomock.Call
DeleteResources indicates an expected call of DeleteResources.
func (*MockIOperatorMockRecorder) GetResourcesLength ¶ added in v0.9.0
func (mr *MockIOperatorMockRecorder) GetResourcesLength() *gomock.Call
GetResourcesLength indicates an expected call of GetResourcesLength.
type OperatorCollection ¶
type OperatorCollection struct {
// contains filtered or unexported fields
}
func NewOperatorCollection ¶
func NewOperatorCollection(config aws.Config, operatorFactory *OperatorFactory, targetResourceTypes []string) *OperatorCollection
func (*OperatorCollection) GetLogicalResourceIds ¶
func (c *OperatorCollection) GetLogicalResourceIds() []string
func (*OperatorCollection) GetOperators ¶
func (c *OperatorCollection) GetOperators() []IOperator
func (*OperatorCollection) RaiseUnsupportedResourceError ¶
func (c *OperatorCollection) RaiseUnsupportedResourceError() error
func (*OperatorCollection) SetOperatorCollection ¶
func (c *OperatorCollection) SetOperatorCollection(stackName *string, stackResourceSummaries []types.StackResourceSummary)
type OperatorFactory ¶
type OperatorFactory struct {
// contains filtered or unexported fields
}
func NewOperatorFactory ¶
func NewOperatorFactory(config aws.Config) *OperatorFactory
func (*OperatorFactory) CreateBackupVaultOperator ¶
func (f *OperatorFactory) CreateBackupVaultOperator() *BackupVaultOperator
func (*OperatorFactory) CreateCloudFormationStackOperator ¶ added in v0.9.0
func (f *OperatorFactory) CreateCloudFormationStackOperator(targetResourceTypes []string) *CloudFormationStackOperator
func (*OperatorFactory) CreateCustomOperator ¶
func (f *OperatorFactory) CreateCustomOperator() *CustomOperator
func (*OperatorFactory) CreateEcrRepositoryOperator ¶ added in v0.9.0
func (f *OperatorFactory) CreateEcrRepositoryOperator() *EcrRepositoryOperator
func (*OperatorFactory) CreateIamGroupOperator ¶ added in v1.12.0
func (f *OperatorFactory) CreateIamGroupOperator() *IamGroupOperator
func (*OperatorFactory) CreateS3BucketOperator ¶ added in v0.9.0
func (f *OperatorFactory) CreateS3BucketOperator() *S3BucketOperator
func (*OperatorFactory) CreateS3DirectoryBucketOperator ¶ added in v1.11.0
func (f *OperatorFactory) CreateS3DirectoryBucketOperator() *S3BucketOperator
type OperatorManager ¶
type OperatorManager struct {
// contains filtered or unexported fields
}
func NewOperatorManager ¶
func NewOperatorManager(operatorCollection IOperatorCollection) *OperatorManager
func (*OperatorManager) CheckResourceCounts ¶
func (m *OperatorManager) CheckResourceCounts() error
func (*OperatorManager) DeleteResourceCollection ¶
func (m *OperatorManager) DeleteResourceCollection(ctx context.Context) error
func (*OperatorManager) GetLogicalResourceIds ¶
func (m *OperatorManager) GetLogicalResourceIds() []string
func (*OperatorManager) SetOperatorCollection ¶
func (m *OperatorManager) SetOperatorCollection(stackName *string, stackResourceSummaries []types.StackResourceSummary)
type S3BucketOperator ¶ added in v0.9.0
type S3BucketOperator struct {
// contains filtered or unexported fields
}
func NewS3BucketOperator ¶ added in v0.9.0
func NewS3BucketOperator(client client.IS3) *S3BucketOperator
func (*S3BucketOperator) AddResource ¶ added in v0.9.0
func (o *S3BucketOperator) AddResource(resource *cfntypes.StackResourceSummary)
func (*S3BucketOperator) DeleteResources ¶ added in v0.9.0
func (o *S3BucketOperator) DeleteResources(ctx context.Context) error
func (*S3BucketOperator) DeleteS3Bucket ¶ added in v0.9.0
func (o *S3BucketOperator) DeleteS3Bucket(ctx context.Context, bucketName *string) error
func (*S3BucketOperator) GetDirectoryBucketsFlag ¶ added in v1.11.0
func (o *S3BucketOperator) GetDirectoryBucketsFlag() bool
func (*S3BucketOperator) GetResourcesLength ¶ added in v0.9.0
func (o *S3BucketOperator) GetResourcesLength() int