client

package
v0.5.0 Latest Latest
Warning

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

Go to latest
Published: Nov 27, 2022 License: MIT Imports: 19 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func WaitForRetry

func WaitForRetry(retryCount int, sleepTimeSec int, targetResource *string, err error) error

Types

type Backup

type Backup struct {
	// contains filtered or unexported fields
}

func NewBackup

func NewBackup(client IBackupSDKClient) *Backup

func (*Backup) CheckBackupVaultExists

func (backupClient *Backup) CheckBackupVaultExists(backupVaultName *string) (bool, error)

func (*Backup) DeleteBackupVault

func (backupClient *Backup) DeleteBackupVault(backupVaultName *string) error

func (*Backup) DeleteRecoveryPoint

func (backupClient *Backup) DeleteRecoveryPoint(backupVaultName *string, recoveryPointArn *string) error

func (*Backup) DeleteRecoveryPoints

func (backupClient *Backup) DeleteRecoveryPoints(backupVaultName *string, recoveryPoints []types.RecoveryPointByBackupVault) error

func (*Backup) ListRecoveryPointsByBackupVault

func (backupClient *Backup) ListRecoveryPointsByBackupVault(backupVaultName *string) ([]types.RecoveryPointByBackupVault, error)

type CloudFormation

type CloudFormation struct {
	// contains filtered or unexported fields
}

func (*CloudFormation) DeleteStack

func (cfnClient *CloudFormation) DeleteStack(stackName *string, retainResources []string) error

func (*CloudFormation) DescribeStacks

func (cfnClient *CloudFormation) DescribeStacks(stackName *string) (*cloudformation.DescribeStacksOutput, bool, error)

func (*CloudFormation) ListStackResources

func (cfnClient *CloudFormation) ListStackResources(stackName *string) ([]types.StackResourceSummary, error)

type Ecr

type Ecr struct {
	// contains filtered or unexported fields
}

func NewEcr

func NewEcr(client IEcrSDKClient) *Ecr

func (*Ecr) CheckEcrExists

func (ecrClient *Ecr) CheckEcrExists(repositoryName *string) (bool, error)

func (*Ecr) DeleteRepository

func (ecrClient *Ecr) DeleteRepository(repositoryName *string) error

type IBackup

type IBackup interface {
	ListRecoveryPointsByBackupVault(backupVaultName *string) ([]types.RecoveryPointByBackupVault, error)
	DeleteRecoveryPoints(backupVaultName *string, recoveryPoints []types.RecoveryPointByBackupVault) error
	DeleteRecoveryPoint(backupVaultName *string, recoveryPointArn *string) error
	DeleteBackupVault(backupVaultName *string) error
	CheckBackupVaultExists(backupVaultName *string) (bool, error)
}

type IBackupSDKClient

type IBackupSDKClient interface {
	ListRecoveryPointsByBackupVault(ctx context.Context, params *backup.ListRecoveryPointsByBackupVaultInput, optFns ...func(*backup.Options)) (*backup.ListRecoveryPointsByBackupVaultOutput, error)
	DeleteRecoveryPoint(ctx context.Context, params *backup.DeleteRecoveryPointInput, optFns ...func(*backup.Options)) (*backup.DeleteRecoveryPointOutput, error)
	DeleteBackupVault(ctx context.Context, params *backup.DeleteBackupVaultInput, optFns ...func(*backup.Options)) (*backup.DeleteBackupVaultOutput, error)
	ListBackupVaults(ctx context.Context, params *backup.ListBackupVaultsInput, optFns ...func(*backup.Options)) (*backup.ListBackupVaultsOutput, error)
}

type ICloudFormation

type ICloudFormation interface {
	DeleteStack(stackName *string, retainResources []string) error
	DescribeStacks(stackName *string) (*cloudformation.DescribeStacksOutput, bool, error)
	ListStackResources(stackName *string) ([]types.StackResourceSummary, error)
}

type ICloudFormationSDKClient

type ICloudFormationSDKClient interface {
	DeleteStack(ctx context.Context, params *cloudformation.DeleteStackInput, optFns ...func(*cloudformation.Options)) (*cloudformation.DeleteStackOutput, error)
	DescribeStacks(ctx context.Context, params *cloudformation.DescribeStacksInput, optFns ...func(*cloudformation.Options)) (*cloudformation.DescribeStacksOutput, error)
	ListStackResources(ctx context.Context, params *cloudformation.ListStackResourcesInput, optFns ...func(*cloudformation.Options)) (*cloudformation.ListStackResourcesOutput, error)
}

type ICloudFormationSDKWaiter

type ICloudFormationSDKWaiter interface {
	Wait(ctx context.Context, params *cloudformation.DescribeStacksInput, maxWaitDur time.Duration, optFns ...func(*cloudformation.StackDeleteCompleteWaiterOptions)) error
}

type IEcr

type IEcr interface {
	DeleteRepository(repositoryName *string) error
	CheckEcrExists(repositoryName *string) (bool, error)
}

type IEcrSDKClient

type IEcrSDKClient interface {
	DeleteRepository(ctx context.Context, params *ecr.DeleteRepositoryInput, optFns ...func(*ecr.Options)) (*ecr.DeleteRepositoryOutput, error)
	DescribeRepositories(ctx context.Context, params *ecr.DescribeRepositoriesInput, optFns ...func(*ecr.Options)) (*ecr.DescribeRepositoriesOutput, error)
}

type IIam

type IIam interface {
	DeleteRole(roleName *string, sleepTimeSec int) error
	ListAttachedRolePolicies(roleName *string) ([]types.AttachedPolicy, error)
	DetachRolePolicies(roleName *string, policies []types.AttachedPolicy, sleepTimeSec int) error
	DetachRolePolicy(roleName *string, PolicyArn *string, sleepTimeSec int) error
	CheckRoleExists(roleName *string) (bool, error)
}

type IIamSDKClient

type IIamSDKClient interface {
	DeleteRole(ctx context.Context, params *iam.DeleteRoleInput, optFns ...func(*iam.Options)) (*iam.DeleteRoleOutput, error)
	ListAttachedRolePolicies(ctx context.Context, params *iam.ListAttachedRolePoliciesInput, optFns ...func(*iam.Options)) (*iam.ListAttachedRolePoliciesOutput, error)
	DetachRolePolicy(ctx context.Context, params *iam.DetachRolePolicyInput, optFns ...func(*iam.Options)) (*iam.DetachRolePolicyOutput, error)
	GetRole(ctx context.Context, params *iam.GetRoleInput, optFns ...func(*iam.Options)) (*iam.GetRoleOutput, error)
}

type IS3

type IS3 interface {
	DeleteBucket(bucketName *string) error
	DeleteObjects(bucketName *string, objects []types.ObjectIdentifier, sleepTimeSec int) ([]types.Error, error)
	ListObjectVersions(bucketName *string) ([]types.ObjectIdentifier, error)
	CheckBucketExists(bucketName *string) (bool, error)
}

type IS3SDKClient

type IS3SDKClient interface {
	DeleteBucket(ctx context.Context, params *s3.DeleteBucketInput, optFns ...func(*s3.Options)) (*s3.DeleteBucketOutput, error)
	DeleteObjects(ctx context.Context, params *s3.DeleteObjectsInput, optFns ...func(*s3.Options)) (*s3.DeleteObjectsOutput, error)
	ListObjectVersions(ctx context.Context, params *s3.ListObjectVersionsInput, optFns ...func(*s3.Options)) (*s3.ListObjectVersionsOutput, error)
	ListBuckets(ctx context.Context, params *s3.ListBucketsInput, optFns ...func(*s3.Options)) (*s3.ListBucketsOutput, error)
}

type Iam

type Iam struct {
	// contains filtered or unexported fields
}

func NewIam

func NewIam(client IIamSDKClient) *Iam

func (*Iam) CheckRoleExists

func (iamClient *Iam) CheckRoleExists(roleName *string) (bool, error)

func (*Iam) DeleteRole

func (iamClient *Iam) DeleteRole(roleName *string, sleepTimeSec int) error

func (*Iam) DetachRolePolicies

func (iamClient *Iam) DetachRolePolicies(roleName *string, policies []types.AttachedPolicy, sleepTimeSec int) error

func (*Iam) DetachRolePolicy

func (iamClient *Iam) DetachRolePolicy(roleName *string, PolicyArn *string, sleepTimeSec int) error

func (*Iam) ListAttachedRolePolicies

func (iamClient *Iam) ListAttachedRolePolicies(roleName *string) ([]types.AttachedPolicy, error)

type S3

type S3 struct {
	// contains filtered or unexported fields
}

func NewS3

func NewS3(client IS3SDKClient) *S3

func (*S3) CheckBucketExists

func (s3Client *S3) CheckBucketExists(bucketName *string) (bool, error)

func (*S3) DeleteBucket

func (s3Client *S3) DeleteBucket(bucketName *string) error

func (*S3) DeleteObjects

func (s3Client *S3) DeleteObjects(bucketName *string, objects []types.ObjectIdentifier, sleepTimeSec int) ([]types.Error, error)

func (*S3) ListObjectVersions

func (s3Client *S3) ListObjectVersions(bucketName *string) ([]types.ObjectIdentifier, error)

Jump to

Keyboard shortcuts

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