Documentation
¶
Overview ¶
Code generated by MockGen. DO NOT EDIT. Source: backup.go
Generated by this command:
mockgen -source=backup.go -destination=backup_mock.go -package=client -write_package_comment=false
Code generated by MockGen. DO NOT EDIT. Source: cloudformation.go
Generated by this command:
mockgen -source=cloudformation.go -destination=cloudformation_mock.go -package=client -write_package_comment=false
Code generated by MockGen. DO NOT EDIT. Source: ecr.go
Generated by this command:
mockgen -source=ecr.go -destination=ecr_mock.go -package=client -write_package_comment=false
Code generated by MockGen. DO NOT EDIT. Source: iam.go
Generated by this command:
mockgen -source=iam.go -destination=iam_mock.go -package=client -write_package_comment=false
Code generated by MockGen. DO NOT EDIT. Source: s3.go
Generated by this command:
mockgen -source=s3.go -destination=s3_mock.go -package=client -write_package_comment=false
Index ¶
- Constants
- Variables
- func LoadAWSConfig(ctx context.Context, region string, profile string) (aws.Config, error)
- type Backup
- func (b *Backup) CheckBackupVaultExists(ctx context.Context, backupVaultName *string) (bool, error)
- func (b *Backup) DeleteBackupVault(ctx context.Context, backupVaultName *string) error
- func (b *Backup) DeleteRecoveryPoints(ctx context.Context, backupVaultName *string, ...) error
- func (b *Backup) ListRecoveryPointsByBackupVault(ctx context.Context, backupVaultName *string) ([]types.RecoveryPointByBackupVault, error)
- type ClientError
- type CloudFormation
- func (c *CloudFormation) DeleteStack(ctx context.Context, stackName *string, retainResources []string) error
- func (c *CloudFormation) DescribeStacks(ctx context.Context, stackName *string) ([]types.Stack, error)
- func (c *CloudFormation) ListStackResources(ctx context.Context, stackName *string) ([]types.StackResourceSummary, error)
- type Ecr
- type IBackup
- type ICloudFormation
- type IEcr
- type IIam
- type IS3
- type Iam
- func (i *Iam) CheckGroupExists(ctx context.Context, groupName *string) (bool, error)
- func (i *Iam) DeleteGroup(ctx context.Context, groupName *string) error
- func (i *Iam) GetGroupUsers(ctx context.Context, groupName *string) ([]types.User, error)
- func (i *Iam) RemoveUsersFromGroup(ctx context.Context, groupName *string, users []types.User) error
- type ListObjectsOrVersionsByPageOutput
- type MockIBackup
- func (m *MockIBackup) CheckBackupVaultExists(ctx context.Context, backupVaultName *string) (bool, error)
- func (m *MockIBackup) DeleteBackupVault(ctx context.Context, backupVaultName *string) error
- func (m *MockIBackup) DeleteRecoveryPoints(ctx context.Context, backupVaultName *string, ...) error
- func (m *MockIBackup) EXPECT() *MockIBackupMockRecorder
- func (m *MockIBackup) ListRecoveryPointsByBackupVault(ctx context.Context, backupVaultName *string) ([]types.RecoveryPointByBackupVault, error)
- type MockIBackupMockRecorder
- func (mr *MockIBackupMockRecorder) CheckBackupVaultExists(ctx, backupVaultName any) *gomock.Call
- func (mr *MockIBackupMockRecorder) DeleteBackupVault(ctx, backupVaultName any) *gomock.Call
- func (mr *MockIBackupMockRecorder) DeleteRecoveryPoints(ctx, backupVaultName, recoveryPoints any) *gomock.Call
- func (mr *MockIBackupMockRecorder) ListRecoveryPointsByBackupVault(ctx, backupVaultName any) *gomock.Call
- type MockICloudFormation
- func (m *MockICloudFormation) DeleteStack(ctx context.Context, stackName *string, retainResources []string) error
- func (m *MockICloudFormation) DescribeStacks(ctx context.Context, stackName *string) ([]types.Stack, error)
- func (m *MockICloudFormation) EXPECT() *MockICloudFormationMockRecorder
- func (m *MockICloudFormation) ListStackResources(ctx context.Context, stackName *string) ([]types.StackResourceSummary, error)
- type MockICloudFormationMockRecorder
- type MockIEcr
- type MockIEcrMockRecorder
- type MockIIam
- func (m *MockIIam) CheckGroupExists(ctx context.Context, groupName *string) (bool, error)
- func (m *MockIIam) DeleteGroup(ctx context.Context, groupName *string) error
- func (m *MockIIam) EXPECT() *MockIIamMockRecorder
- func (m *MockIIam) GetGroupUsers(ctx context.Context, groupName *string) ([]types.User, error)
- func (m *MockIIam) RemoveUsersFromGroup(ctx context.Context, groupName *string, users []types.User) error
- type MockIIamMockRecorder
- func (mr *MockIIamMockRecorder) CheckGroupExists(ctx, groupName any) *gomock.Call
- func (mr *MockIIamMockRecorder) DeleteGroup(ctx, groupName any) *gomock.Call
- func (mr *MockIIamMockRecorder) GetGroupUsers(ctx, groupName any) *gomock.Call
- func (mr *MockIIamMockRecorder) RemoveUsersFromGroup(ctx, groupName, users any) *gomock.Call
- type MockIS3
- func (m *MockIS3) CheckBucketExists(ctx context.Context, bucketName *string) (bool, error)
- func (m *MockIS3) DeleteBucket(ctx context.Context, bucketName *string) error
- func (m *MockIS3) DeleteObjects(ctx context.Context, bucketName *string, objects []types.ObjectIdentifier) ([]types.Error, error)
- func (m *MockIS3) EXPECT() *MockIS3MockRecorder
- func (m *MockIS3) GetDirectoryBucketsFlag() bool
- func (m *MockIS3) ListObjectsOrVersionsByPage(ctx context.Context, bucketName, keyMarker, versionIdMarker *string) (*ListObjectsOrVersionsByPageOutput, error)
- type MockIS3MockRecorder
- func (mr *MockIS3MockRecorder) CheckBucketExists(ctx, bucketName any) *gomock.Call
- func (mr *MockIS3MockRecorder) DeleteBucket(ctx, bucketName any) *gomock.Call
- func (mr *MockIS3MockRecorder) DeleteObjects(ctx, bucketName, objects any) *gomock.Call
- func (mr *MockIS3MockRecorder) GetDirectoryBucketsFlag() *gomock.Call
- func (mr *MockIS3MockRecorder) ListObjectsOrVersionsByPage(ctx, bucketName, keyMarker, versionIdMarker any) *gomock.Call
- type Retryer
- func (r *Retryer) GetAttemptToken(context.Context) (func(error) error, error)
- func (r *Retryer) GetInitialToken() func(error) error
- func (r *Retryer) GetRetryToken(context.Context, error) (func(error) error, error)
- func (r *Retryer) IsErrorRetryable(err error) bool
- func (r *Retryer) MaxAttempts() int
- func (r *Retryer) RetryDelay(int, error) (time.Duration, error)
- type S3
- func (s *S3) CheckBucketExists(ctx context.Context, bucketName *string) (bool, error)
- func (s *S3) DeleteBucket(ctx context.Context, bucketName *string) error
- func (s *S3) DeleteObjects(ctx context.Context, bucketName *string, objects []types.ObjectIdentifier) ([]types.Error, error)
- func (s *S3) GetDirectoryBucketsFlag() bool
- func (s *S3) ListObjectsOrVersionsByPage(ctx context.Context, bucketName *string, keyMarker *string, ...) (*ListObjectsOrVersionsByPageOutput, error)
Constants ¶
const CloudFormationWaitNanoSecTime = time.Duration(4500000000000)
const DefaultAwsRegion = "us-east-1"
const MaxRetryCount = 10
Variables ¶
var SleepTimeSecForIam = 5
var SleepTimeSecForS3 = 10
Functions ¶
Types ¶
type Backup ¶
type Backup struct {
// contains filtered or unexported fields
}
func (*Backup) CheckBackupVaultExists ¶
func (*Backup) DeleteBackupVault ¶
func (*Backup) DeleteRecoveryPoints ¶
func (*Backup) ListRecoveryPointsByBackupVault ¶
type ClientError ¶
ClientError provides the error with a resource name
func (*ClientError) Error ¶
func (e *ClientError) Error() string
func (*ClientError) Unwrap ¶
func (e *ClientError) Unwrap() error
type CloudFormation ¶
type CloudFormation struct {
// contains filtered or unexported fields
}
func NewCloudFormation ¶
func NewCloudFormation(client *cloudformation.Client, waiter *cloudformation.StackDeleteCompleteWaiter) *CloudFormation
func (*CloudFormation) DeleteStack ¶
func (*CloudFormation) DescribeStacks ¶
func (*CloudFormation) ListStackResources ¶
func (c *CloudFormation) ListStackResources(ctx context.Context, stackName *string) ([]types.StackResourceSummary, error)
type Ecr ¶
type Ecr struct {
// contains filtered or unexported fields
}
func (*Ecr) CheckEcrExists ¶
type IBackup ¶
type IBackup interface {
ListRecoveryPointsByBackupVault(ctx context.Context, backupVaultName *string) ([]types.RecoveryPointByBackupVault, error)
DeleteRecoveryPoints(ctx context.Context, backupVaultName *string, recoveryPoints []types.RecoveryPointByBackupVault) error
DeleteBackupVault(ctx context.Context, backupVaultName *string) error
CheckBackupVaultExists(ctx context.Context, backupVaultName *string) (bool, error)
}
type ICloudFormation ¶
type IIam ¶
type IIam interface {
DeleteGroup(ctx context.Context, groupName *string) error
CheckGroupExists(ctx context.Context, groupName *string) (bool, error)
GetGroupUsers(ctx context.Context, groupName *string) ([]types.User, error)
RemoveUsersFromGroup(ctx context.Context, groupName *string, users []types.User) error
}
type IS3 ¶
type IS3 interface {
DeleteBucket(ctx context.Context, bucketName *string) error
DeleteObjects(ctx context.Context, bucketName *string, objects []types.ObjectIdentifier) ([]types.Error, error)
ListObjectsOrVersionsByPage(
ctx context.Context,
bucketName *string,
keyMarker *string,
versionIdMarker *string,
) (*ListObjectsOrVersionsByPageOutput, error)
CheckBucketExists(ctx context.Context, bucketName *string) (bool, error)
GetDirectoryBucketsFlag() bool
}
type Iam ¶
type Iam struct {
// contains filtered or unexported fields
}
func (*Iam) CheckGroupExists ¶
func (*Iam) GetGroupUsers ¶
type ListObjectsOrVersionsByPageOutput ¶
type ListObjectsOrVersionsByPageOutput struct {
ObjectIdentifiers []types.ObjectIdentifier
NextKeyMarker *string
NextVersionIdMarker *string
}
type MockIBackup ¶
type MockIBackup struct {
// contains filtered or unexported fields
}
MockIBackup is a mock of IBackup interface.
func NewMockIBackup ¶
func NewMockIBackup(ctrl *gomock.Controller) *MockIBackup
NewMockIBackup creates a new mock instance.
func (*MockIBackup) CheckBackupVaultExists ¶
func (m *MockIBackup) CheckBackupVaultExists(ctx context.Context, backupVaultName *string) (bool, error)
CheckBackupVaultExists mocks base method.
func (*MockIBackup) DeleteBackupVault ¶
func (m *MockIBackup) DeleteBackupVault(ctx context.Context, backupVaultName *string) error
DeleteBackupVault mocks base method.
func (*MockIBackup) DeleteRecoveryPoints ¶
func (m *MockIBackup) DeleteRecoveryPoints(ctx context.Context, backupVaultName *string, recoveryPoints []types.RecoveryPointByBackupVault) error
DeleteRecoveryPoints mocks base method.
func (*MockIBackup) EXPECT ¶
func (m *MockIBackup) EXPECT() *MockIBackupMockRecorder
EXPECT returns an object that allows the caller to indicate expected use.
func (*MockIBackup) ListRecoveryPointsByBackupVault ¶
func (m *MockIBackup) ListRecoveryPointsByBackupVault(ctx context.Context, backupVaultName *string) ([]types.RecoveryPointByBackupVault, error)
ListRecoveryPointsByBackupVault mocks base method.
type MockIBackupMockRecorder ¶
type MockIBackupMockRecorder struct {
// contains filtered or unexported fields
}
MockIBackupMockRecorder is the mock recorder for MockIBackup.
func (*MockIBackupMockRecorder) CheckBackupVaultExists ¶
func (mr *MockIBackupMockRecorder) CheckBackupVaultExists(ctx, backupVaultName any) *gomock.Call
CheckBackupVaultExists indicates an expected call of CheckBackupVaultExists.
func (*MockIBackupMockRecorder) DeleteBackupVault ¶
func (mr *MockIBackupMockRecorder) DeleteBackupVault(ctx, backupVaultName any) *gomock.Call
DeleteBackupVault indicates an expected call of DeleteBackupVault.
func (*MockIBackupMockRecorder) DeleteRecoveryPoints ¶
func (mr *MockIBackupMockRecorder) DeleteRecoveryPoints(ctx, backupVaultName, recoveryPoints any) *gomock.Call
DeleteRecoveryPoints indicates an expected call of DeleteRecoveryPoints.
func (*MockIBackupMockRecorder) ListRecoveryPointsByBackupVault ¶
func (mr *MockIBackupMockRecorder) ListRecoveryPointsByBackupVault(ctx, backupVaultName any) *gomock.Call
ListRecoveryPointsByBackupVault indicates an expected call of ListRecoveryPointsByBackupVault.
type MockICloudFormation ¶
type MockICloudFormation struct {
// contains filtered or unexported fields
}
MockICloudFormation is a mock of ICloudFormation interface.
func NewMockICloudFormation ¶
func NewMockICloudFormation(ctrl *gomock.Controller) *MockICloudFormation
NewMockICloudFormation creates a new mock instance.
func (*MockICloudFormation) DeleteStack ¶
func (m *MockICloudFormation) DeleteStack(ctx context.Context, stackName *string, retainResources []string) error
DeleteStack mocks base method.
func (*MockICloudFormation) DescribeStacks ¶
func (m *MockICloudFormation) DescribeStacks(ctx context.Context, stackName *string) ([]types.Stack, error)
DescribeStacks mocks base method.
func (*MockICloudFormation) EXPECT ¶
func (m *MockICloudFormation) EXPECT() *MockICloudFormationMockRecorder
EXPECT returns an object that allows the caller to indicate expected use.
func (*MockICloudFormation) ListStackResources ¶
func (m *MockICloudFormation) ListStackResources(ctx context.Context, stackName *string) ([]types.StackResourceSummary, error)
ListStackResources mocks base method.
type MockICloudFormationMockRecorder ¶
type MockICloudFormationMockRecorder struct {
// contains filtered or unexported fields
}
MockICloudFormationMockRecorder is the mock recorder for MockICloudFormation.
func (*MockICloudFormationMockRecorder) DeleteStack ¶
func (mr *MockICloudFormationMockRecorder) DeleteStack(ctx, stackName, retainResources any) *gomock.Call
DeleteStack indicates an expected call of DeleteStack.
func (*MockICloudFormationMockRecorder) DescribeStacks ¶
func (mr *MockICloudFormationMockRecorder) DescribeStacks(ctx, stackName any) *gomock.Call
DescribeStacks indicates an expected call of DescribeStacks.
func (*MockICloudFormationMockRecorder) ListStackResources ¶
func (mr *MockICloudFormationMockRecorder) ListStackResources(ctx, stackName any) *gomock.Call
ListStackResources indicates an expected call of ListStackResources.
type MockIEcr ¶
type MockIEcr struct {
// contains filtered or unexported fields
}
MockIEcr is a mock of IEcr interface.
func NewMockIEcr ¶
func NewMockIEcr(ctrl *gomock.Controller) *MockIEcr
NewMockIEcr creates a new mock instance.
func (*MockIEcr) CheckEcrExists ¶
CheckEcrExists mocks base method.
func (*MockIEcr) DeleteRepository ¶
DeleteRepository mocks base method.
func (*MockIEcr) EXPECT ¶
func (m *MockIEcr) EXPECT() *MockIEcrMockRecorder
EXPECT returns an object that allows the caller to indicate expected use.
type MockIEcrMockRecorder ¶
type MockIEcrMockRecorder struct {
// contains filtered or unexported fields
}
MockIEcrMockRecorder is the mock recorder for MockIEcr.
func (*MockIEcrMockRecorder) CheckEcrExists ¶
func (mr *MockIEcrMockRecorder) CheckEcrExists(ctx, repositoryName any) *gomock.Call
CheckEcrExists indicates an expected call of CheckEcrExists.
func (*MockIEcrMockRecorder) DeleteRepository ¶
func (mr *MockIEcrMockRecorder) DeleteRepository(ctx, repositoryName any) *gomock.Call
DeleteRepository indicates an expected call of DeleteRepository.
type MockIIam ¶
type MockIIam struct {
// contains filtered or unexported fields
}
MockIIam is a mock of IIam interface.
func NewMockIIam ¶
func NewMockIIam(ctrl *gomock.Controller) *MockIIam
NewMockIIam creates a new mock instance.
func (*MockIIam) CheckGroupExists ¶
CheckGroupExists mocks base method.
func (*MockIIam) DeleteGroup ¶
DeleteGroup mocks base method.
func (*MockIIam) EXPECT ¶
func (m *MockIIam) EXPECT() *MockIIamMockRecorder
EXPECT returns an object that allows the caller to indicate expected use.
func (*MockIIam) GetGroupUsers ¶
GetGroupUsers mocks base method.
type MockIIamMockRecorder ¶
type MockIIamMockRecorder struct {
// contains filtered or unexported fields
}
MockIIamMockRecorder is the mock recorder for MockIIam.
func (*MockIIamMockRecorder) CheckGroupExists ¶
func (mr *MockIIamMockRecorder) CheckGroupExists(ctx, groupName any) *gomock.Call
CheckGroupExists indicates an expected call of CheckGroupExists.
func (*MockIIamMockRecorder) DeleteGroup ¶
func (mr *MockIIamMockRecorder) DeleteGroup(ctx, groupName any) *gomock.Call
DeleteGroup indicates an expected call of DeleteGroup.
func (*MockIIamMockRecorder) GetGroupUsers ¶
func (mr *MockIIamMockRecorder) GetGroupUsers(ctx, groupName any) *gomock.Call
GetGroupUsers indicates an expected call of GetGroupUsers.
func (*MockIIamMockRecorder) RemoveUsersFromGroup ¶
func (mr *MockIIamMockRecorder) RemoveUsersFromGroup(ctx, groupName, users any) *gomock.Call
RemoveUsersFromGroup indicates an expected call of RemoveUsersFromGroup.
type MockIS3 ¶
type MockIS3 struct {
// contains filtered or unexported fields
}
MockIS3 is a mock of IS3 interface.
func NewMockIS3 ¶
func NewMockIS3(ctrl *gomock.Controller) *MockIS3
NewMockIS3 creates a new mock instance.
func (*MockIS3) CheckBucketExists ¶
CheckBucketExists mocks base method.
func (*MockIS3) DeleteBucket ¶
DeleteBucket mocks base method.
func (*MockIS3) DeleteObjects ¶
func (m *MockIS3) DeleteObjects(ctx context.Context, bucketName *string, objects []types.ObjectIdentifier) ([]types.Error, error)
DeleteObjects mocks base method.
func (*MockIS3) EXPECT ¶
func (m *MockIS3) EXPECT() *MockIS3MockRecorder
EXPECT returns an object that allows the caller to indicate expected use.
func (*MockIS3) GetDirectoryBucketsFlag ¶
GetDirectoryBucketsFlag mocks base method.
func (*MockIS3) ListObjectsOrVersionsByPage ¶
func (m *MockIS3) ListObjectsOrVersionsByPage(ctx context.Context, bucketName, keyMarker, versionIdMarker *string) (*ListObjectsOrVersionsByPageOutput, error)
ListObjectsOrVersionsByPage mocks base method.
type MockIS3MockRecorder ¶
type MockIS3MockRecorder struct {
// contains filtered or unexported fields
}
MockIS3MockRecorder is the mock recorder for MockIS3.
func (*MockIS3MockRecorder) CheckBucketExists ¶
func (mr *MockIS3MockRecorder) CheckBucketExists(ctx, bucketName any) *gomock.Call
CheckBucketExists indicates an expected call of CheckBucketExists.
func (*MockIS3MockRecorder) DeleteBucket ¶
func (mr *MockIS3MockRecorder) DeleteBucket(ctx, bucketName any) *gomock.Call
DeleteBucket indicates an expected call of DeleteBucket.
func (*MockIS3MockRecorder) DeleteObjects ¶
func (mr *MockIS3MockRecorder) DeleteObjects(ctx, bucketName, objects any) *gomock.Call
DeleteObjects indicates an expected call of DeleteObjects.
func (*MockIS3MockRecorder) GetDirectoryBucketsFlag ¶
func (mr *MockIS3MockRecorder) GetDirectoryBucketsFlag() *gomock.Call
GetDirectoryBucketsFlag indicates an expected call of GetDirectoryBucketsFlag.
func (*MockIS3MockRecorder) ListObjectsOrVersionsByPage ¶
func (mr *MockIS3MockRecorder) ListObjectsOrVersionsByPage(ctx, bucketName, keyMarker, versionIdMarker any) *gomock.Call
ListObjectsOrVersionsByPage indicates an expected call of ListObjectsOrVersionsByPage.
type Retryer ¶
type Retryer struct {
// contains filtered or unexported fields
}
func (*Retryer) GetAttemptToken ¶
func (*Retryer) GetInitialToken ¶
func (*Retryer) GetRetryToken ¶
func (*Retryer) IsErrorRetryable ¶
func (*Retryer) MaxAttempts ¶
type S3 ¶
type S3 struct {
// contains filtered or unexported fields
}