billingsku

package
v1.1.0 Latest Latest
Warning

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

Go to latest
Published: Sep 24, 2021 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ZoneInRegion

func ZoneInRegion(zone string, regions []string) bool

ZoneInRegion checks if a region is a substring of a zone

Types

type BillingSKU

type BillingSKU struct {
	*billingpb.Sku
}

BillingSKU model

func (*BillingSKU) GetSKUPrice

func (b *BillingSKU) GetSKUPrice() float64

GetSKUPrice returns the BillingSku usage price

func (*BillingSKU) GetSKUUsage

func (b *BillingSKU) GetSKUUsage() string

GetSKUUsage return the BillingSku usage type

func (*BillingSKU) HasFamily

func (b *BillingSKU) HasFamily(family string) bool

HasFamily checks if BillingSKU has matching family

func (*BillingSKU) HasGroup

func (b *BillingSKU) HasGroup(group string) bool

HasGroup checks if BillingSKU has matching group

func (*BillingSKU) HasRegionOrZone

func (b *BillingSKU) HasRegionOrZone(value string) bool

HasRegionOrZone checks if BillingSKU has a zone or region

type BillingSKUs

type BillingSKUs []*BillingSKU

BillingSKUs model

func (*BillingSKUs) LookUp

func (b *BillingSKUs) LookUp(group string, zone string, keyword string) *BillingSKU

LookUp returns a BillingSKU from a slice of BillingSKUs

type Service

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

Service implements the SKU service

func New

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

New returns a new SKU service

Jump to

Keyboard shortcuts

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