plans

package
v0.12.1 Latest Latest
Warning

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

Go to latest
Published: May 8, 2024 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type API

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

func NewAPI

func NewAPI(client HttpClient, logger Log) *API

func (*API) List

func (a *API) List(ctx context.Context) ([]*GetPlanResponse, error)

List will list all the plans available to the current account

func (*API) ListWithProvider

func (a *API) ListWithProvider(ctx context.Context, provider string) ([]*GetPlanResponse, error)

ListWithProvider will list all the plans available to the current account, filtered by provider

type GetPlanResponse

type GetPlanResponse struct {
	ID                            *int      `json:"id,omitempty"`
	Name                          *string   `json:"name,omitempty"`
	Size                          *float64  `json:"size,omitempty"`
	SizeMeasurementUnit           *string   `json:"sizeMeasurementUnit,omitempty"`
	Provider                      *string   `json:"provider,omitempty"`
	Region                        *string   `json:"region,omitempty"`
	RegionID                      *int      `json:"regionId,omitempty"`
	Price                         *int      `json:"price,omitempty"`
	PriceCurrency                 *string   `json:"priceCurrency,omitempty"`
	PricePeriod                   *string   `json:"pricePeriod,omitempty"`
	MaximumDatabases              *int      `json:"maximumDatabases,omitempty"`
	MaximumThroughput             *int      `json:"maximumThroughput,omitempty"`
	MaximumBandwidthGB            *int      `json:"maximumBandwidthGB,omitempty"`
	Availability                  *string   `json:"availability,omitempty"`
	Connections                   *string   `json:"connections,omitempty"` // Could be a number or 'unlimited'
	CidrAllowRules                *int      `json:"cidrAllowRules,omitempty"`
	SupportDataPersistence        *bool     `json:"supportDataPersistence,omitempty"`
	SupportInstantAndDailyBackups *bool     `json:"supportInstantAndDailyBackups,omitempty"`
	SupportReplication            *bool     `json:"supportReplication,omitempty"`
	SupportClustering             *bool     `json:"supportClustering,omitempty"`
	SupportedAlerts               []*string `json:"supportedAlerts,omitempty"`
	CustomerSupport               *string   `json:"customerSupport,omitempty"`
}

func (GetPlanResponse) String

func (o GetPlanResponse) String() string

type HttpClient

type HttpClient interface {
	Get(ctx context.Context, name, path string, responseBody interface{}) error
	GetWithQuery(ctx context.Context, name, path string, query url.Values, responseBody interface{}) error
}

type ListPlansResponse

type ListPlansResponse struct {
	Plans []*GetPlanResponse `json:"plans,omitempty"`
}

func (ListPlansResponse) String

func (o ListPlansResponse) String() string

type Log

type Log interface {
	Printf(format string, args ...interface{})
}

Jump to

Keyboard shortcuts

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