Documentation
¶
Index ¶
- Variables
- type Disk
- func (d *Disk) CreatedAt() time.Time
- func (d *Disk) DiskType() unused.DiskType
- func (d *Disk) ID() string
- func (d *Disk) LastUsedAt() time.Time
- func (d *Disk) Meta() unused.Meta
- func (d *Disk) Name() string
- func (d *Disk) Provider() unused.Provider
- func (d *Disk) SizeBytes() float64
- func (d *Disk) SizeGB() int
- type Provider
Constants ¶
This section is empty.
Variables ¶
var ProviderName = "AWS"
Functions ¶
This section is empty.
Types ¶
type Disk ¶
Disk holds information about an AWS EC2 volume.
func (*Disk) LastUsedAt ¶
LastUsedAt returns a zero time.Time value, as AWS does not provide this information.
func (*Disk) Name ¶
Name returns the name of this AWS EC2 volume.
AWS EC2 volumes do not have a name property, instead they store the name in tags. This method will try to find the Name or CSIVolumeName, otherwise it will return empty.
type Provider ¶
type Provider struct {
// contains filtered or unexported fields
}
Provider implements unused.Provider for AWS.
func NewProvider ¶
NewProvider creates a new AWS unused.Provider.
A valid EC2 client must be supplied in order to list the unused resources. The metadata passed will be used to identify the provider.
func (*Provider) ListUnusedDisks ¶
ListUnusedDisks returns all the AWS EC2 volumes that are available, ie. not used by any other resource.