disk

package
v1.1.3 Latest Latest
Warning

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

Go to latest
Published: Sep 25, 2021 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Disk

type Disk struct {
	*computepb.Disk
}

Disk handles the disk struct

func (*Disk) GetDiskCost added in v1.1.0

func (d *Disk) GetDiskCost(skus *billingsku.BillingSKUs) float64

GetDiskCost returns the disk monthly cost

func (*Disk) GetDiskLastAttached added in v1.1.0

func (d *Disk) GetDiskLastAttached() string

func (*Disk) GetDiskType added in v1.1.0

func (d *Disk) GetDiskType() string

func (*Disk) GetDiskZone added in v1.1.0

func (d *Disk) GetDiskZone() string

type Disks

type Disks []*Disk

Disks holds a slice of disks

func (*Disks) GetAbandoned added in v1.1.3

func (d *Disks) GetAbandoned(lastAttached int) (*Disks, error)

GetAbandoned returns a slice of Disks

func (Disks) GetDisksCost added in v1.1.0

func (d Disks) GetDisksCost(skus *billingsku.BillingSKUs) float64

GetDisksCost returns the sum of the disks' cost

func (Disks) GetDisksCount added in v1.1.0

func (d Disks) GetDisksCount() int

GetDisksCount returns the length of disks

type Service

type Service interface {
	List(ctx context.Context, filter *string) (*Disks, error)
	Close() error
}

Service implements the disk service

func New

func New(ctx *context.Context, project string, options []*option.ClientOption) (Service, error)

New returns a disk service

Jump to

Keyboard shortcuts

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