azure

package
v0.0.3 Latest Latest
Warning

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

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

Documentation

Index

Constants

View Source
const ResourceGroupMetaKey = "resource-group"

Variables

This section is empty.

Functions

This section is empty.

Types

type Disk

type Disk struct {
	compute.Disk
	// contains filtered or unexported fields
}

Disk holds information about an Azure compute disk.

func (*Disk) CreatedAt

func (d *Disk) CreatedAt() time.Time

CreatedAt returns the time when this Azure compute disk was created.

func (*Disk) DiskType added in v0.0.2

func (d *Disk) DiskType() unused.DiskType

DiskType Type returns the type of this Azure compute disk.

func (*Disk) ID

func (d *Disk) ID() string

ID returns the Azure compute disk ID.

func (*Disk) LastUsedAt

func (d *Disk) LastUsedAt() time.Time

LastUsedAt returns a zero time.Time value, as Azure does not provide this information.

func (*Disk) Meta

func (d *Disk) Meta() unused.Meta

Meta returns the disk metadata.

func (*Disk) Name

func (d *Disk) Name() string

Name returns the name of this Azure compute disk.

func (*Disk) Provider

func (d *Disk) Provider() unused.Provider

Provider returns a reference to the provider used to instantiate this disk.

func (*Disk) SizeGB added in v0.0.2

func (d *Disk) SizeGB() int

SizeGB returns the size of this Azure compute disk in GB.

type Provider

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

Providcer implements unused.Provider for Azure.

func NewProvider

func NewProvider(client compute.DisksClient, meta unused.Meta) (*Provider, error)

NewProvider creates a new Azure unused.Provider.

A valid Azure compute disks client must be supplied in order to list the unused resources.

func (*Provider) Delete

func (p *Provider) Delete(ctx context.Context, disk unused.Disk) error

Delete deletes the given disk from Azure.

func (*Provider) ListUnusedDisks

func (p *Provider) ListUnusedDisks(ctx context.Context) (unused.Disks, error)

ListUnusedDisks returns all the Azure compute disks that are not managed by other resources.

func (*Provider) Meta

func (p *Provider) Meta() unused.Meta

Meta returns the provider metadata.

func (*Provider) Name

func (p *Provider) Name() string

Name returns Azure.

Jump to

Keyboard shortcuts

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