common

package
v0.14.32 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CheckClusterSnapshot

func CheckClusterSnapshot(snap *rds.DBClusterSnapshot) bool

func CheckElasticacheSnapshot added in v0.13.27

func CheckElasticacheSnapshot(snap *elasticache.Snapshot) bool

func CheckEnvVars

func CheckEnvVars(cloudProvider string, cmd *cobra.Command)

func CheckIfExpired

func CheckIfExpired(creationTime time.Time, ttl int64, resourceNameDescription string, disableTTLCheck bool) bool

func CheckSnapshot

func CheckSnapshot(snap *rds.DBSnapshot) bool

func DeleteBucket

func DeleteBucket(bucketApi *minio.Client, bucket MinioBucket, region string)

func ElemToDeleteFormattedInfos

func ElemToDeleteFormattedInfos(elemName string, arraySize int, region string, isZone ...bool) (string, string)

func EmptyBucket

func EmptyBucket(bucketApi *minio.Client, bucketName string, objects []minio.ObjectInfo)

func InitFlags

func InitFlags(cloudProvider string, startCmd *cobra.Command)

func IsAssociatedToLivingCluster

func IsAssociatedToLivingCluster(tagsInput interface{}, svc *eks.EKS) bool

func ListBucketObjects

func ListBucketObjects(bucketApi *minio.Client, ctx context.Context, bucketName string) []minio.ObjectInfo

Types

type CloudProviderResource

type CloudProviderResource struct {
	Identifier   string
	Description  string
	CreationDate time.Time
	TTL          int64
	Tag          string
	IsProtected  bool
}

func (*CloudProviderResource) IsResourceExpired

func (resource *CloudProviderResource) IsResourceExpired(commandLineTagValue string, disableTTLCheck bool) bool

type EssentialTags

type EssentialTags struct {
	CreationDate time.Time
	TTL          int64
	IsProtected  bool
	ClusterId    string
	Tag          string
}

func GetEssentialTags

func GetEssentialTags(tagsInput interface{}, tagName string) EssentialTags

type MinioBucket

type MinioBucket struct {
	CloudProviderResource
	ObjectsInfos []minio.ObjectInfo
}

func GetExpiredBuckets

func GetExpiredBuckets(bucketApi *minio.Client, tagName string, region string, tagValue string, disableTTLCheck bool) []MinioBucket

func GetUnusedBuckets

func GetUnusedBuckets(bucketApi *minio.Client, tagName string, region string, isDestroyingCommand bool) []MinioBucket

type MyTag

type MyTag struct {
	Key   string `type:"string"`
	Value string `type:"string"`
	// contains filtered or unexported fields
}

type ResourceTags added in v0.14.0

type ResourceTags struct {
	TTL                   *json.Number `json:"ttl"`
	CreationUnixTimestamp *json.Number `json:"creation_date"`
}

type Tag

type Tag struct {
	Key   *string `type:"string"`
	Value *string `type:"string"`
	// contains filtered or unexported fields
}

Jump to

Keyboard shortcuts

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