billingsku

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: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

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) HasRegion added in v1.1.2

func (b *BillingSKU) HasRegion(region string) bool

HasRegion checks if BillingSKU has a region

func (*BillingSKU) HasZone added in v1.1.2

func (b *BillingSKU) HasZone(zone string) bool

HasZone checks if BillingSKU has a zone

type BillingSKUs

type BillingSKUs []*BillingSKU

BillingSKUs model

func (*BillingSKUs) GetFiltered added in v1.1.3

func (b *BillingSKUs) GetFiltered(family, group, region string) (*BillingSKUs, error)

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