gcp

package
v0.0.0-...-a432987 Latest Latest
Warning

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

Go to latest
Published: Jan 15, 2024 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ComputeService

type ComputeService interface {
	// Asegúrate de incluir aquí todos los métodos que usas de compute.Service.
	//NewService(ctx context.Context, opts ...option.ClientOption) (*compute.Service, error)
	DisksGet(ctx context.Context, projectID string, zone string, diskID string) (*compute.Disk, error)
	DisksDelete(ctx context.Context, projectID string, zone string, diskID string) (*compute.Operation, error)
	DisksList(projectID string, zone string) *compute.DisksListCall
}

func NewComputeService

func NewComputeService(ctx context.Context) (ComputeService, error)

type Deleter

type Deleter interface {
	DeleteResource(resourceType string, resourceID string) error
}

type GCPChecker

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

GCPChecker es una estructura que implementa la interfaz Checker para GCP.

func NewGCPChecker

func NewGCPChecker(service ComputeService, projectID string, zone string) (*GCPChecker, error)

NewGCPChecker crea una nueva instancia de GCPChecker.

func (*GCPChecker) IsResourceUnused

func (c *GCPChecker) IsResourceUnused(resourceID string) (bool, string, error)

func (*GCPChecker) ListResources

func (c *GCPChecker) ListResources() ([]interface{}, error)

type GCPDeleter

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

func NewGCPDeleter

func NewGCPDeleter(client ComputeService, projectID string, zone string) (*GCPDeleter, error)

func (*GCPDeleter) DeleteResource

func (d *GCPDeleter) DeleteResource(resourceType string, resourceID string) error

Jump to

Keyboard shortcuts

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