Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ListResourceTypes ¶
func ListResourceTypes() []string
ListResourceTypes - Returns list of resources which can be passed to --resource-type
func NukeAllResources ¶
func NukeAllResources(account *GcpProjectResources, bar *pterm.ProgressbarPrinter)
NukeAllResources - Nukes all GCP resources
Types ¶
type GcpProjectResources ¶
type GcpProjectResources struct {
Resources map[string]GcpResources
}
GcpProjectResources is a struct that represents the resources found in a single GCP project
func GetAllResources ¶
func GetAllResources(projectID string, configObj config.Config, excludeAfter time.Time, includeAfter time.Time) (*GcpProjectResources, error)
GetAllResources - Lists all GCP resources that can be deleted.
func (*GcpProjectResources) GetRegion ¶
func (g *GcpProjectResources) GetRegion(region string) GcpResources
func (*GcpProjectResources) MapResourceTypeToIdentifiers ¶
func (g *GcpProjectResources) MapResourceTypeToIdentifiers() map[string][]string
MapResourceTypeToIdentifiers converts a slice of Resources to a map of resource types to their found identifiers
func (*GcpProjectResources) TotalResourceCount ¶
func (g *GcpProjectResources) TotalResourceCount() int
TotalResourceCount returns the number of resources found, that are eligible for nuking
type GcpResource ¶
type GcpResource interface {
Init(projectID string)
ResourceName() string
ResourceIdentifiers() []string
MaxBatchSize() int
Nuke(identifiers []string) error
GetAndSetIdentifiers(c context.Context, configObj config.Config) ([]string, error)
IsNukable(string) (bool, error)
GetAndSetResourceConfig(config.Config) config.ResourceType
PrepareContext(context.Context, config.ResourceType) error
}
GcpResource is an interface that represents a single GCP resource
type GcpResources ¶
type GcpResources struct {
Resources []*GcpResource
}
GcpResources is a struct to hold multiple instances of GcpResource.
Click to show internal directories.
Click to hide internal directories.