Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ErrMissingProject = errors.New("missing project id")
ErrMissingProject is the error used when no project ID is provided when trying to create a provider.
Functions ¶
This section is empty.
Types ¶
type Disk ¶
type Disk struct { *compute.Disk // contains filtered or unexported fields }
Disk holds information about a GCP compute disk.
func (*Disk) LastUsedAt ¶
LastUsedAt returns the time when the GCP compute disk was last detached.
type Provider ¶
type Provider struct {
// contains filtered or unexported fields
}
Provider implements unused.Provider for GCP.
func NewProvider ¶
func NewProvider(logger *logfmt.Logger, svc *compute.Service, project string, meta unused.Meta) (*Provider, error)
NewProvider creates a new GCP unused.Provider.
A valid GCP compute service must be supplied in order to listed the unused resources. It also requires a valid project ID which should be the project where the disks were created.
func (*Provider) ListUnusedDisks ¶
ListUnusedDisks returns all the GCP compute disks that aren't associated to any users, meaning that are not being in use.
Click to show internal directories.
Click to hide internal directories.