dc

package
v0.0.0-...-f62483c Latest Latest
Warning

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

Go to latest
Published: Oct 4, 2016 License: Apache-2.0 Imports: 2 Imported by: 3

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type BareMetalCapabilitiesResponse

type BareMetalCapabilitiesResponse struct {
	SKUs []struct {
		ID           string  `json:"id"`
		HourlyRate   float32 `json:"hourlyRate"`
		Availability string  `json:"availability"`
		Memory       []struct {
			CapacityInGB int `json:"capacityGB"`
		} `json:"memory"`
		Processor struct {
			Sockets        int    `json:"sockets"`
			CoresPerSocket int    `json:"coresPerSocket"`
			Description    string `json:"description"`
		} `json:"processor"`
		Storage []struct {
			Type         string `json:"type"`
			CapacityInGB int    `json:"capacityGB"`
			SpeedInRPM   int    `json:"speedRpm"`
		} `json:"storage"`
	} `json:"skus"`
	OperatingSystems []struct {
		Type                string  `json:"type"`
		Description         string  `json:"description"`
		HourlyRatePerSocket float32 `json:"hourlyRatePerSocket"`
	} `json:"operatingSystems"`
}

type CapabilitiesResponse

type CapabilitiesResponse struct {
	SupportsPremiumStorage     bool `json:"supportsPremiumStorage"`
	SupportsBareMetalServers   bool `json:"supportsBareMetalServers"`
	SupportsSharedLoadBalancer bool `json:"supportsSharedLoadBalancer"`
	Templates                  []struct {
		Name               string   `json:"name"`
		Description        string   `json:"description"`
		StorageSizeGB      int      `json:"storageSizeGB"`
		Capabilities       []string `json:"capabilities"`
		ReservedDrivePaths []string `json:"reservedDrivePaths"`
	} `json:"templates"`
	DeployableNetworks []struct {
		Name      string `json:"name"`
		NetworkId string `json:"networkId"`
		Type      string `json:"type"`
		AccountID string `json:"accountID"`
	} `json:"deployableNetworks"`
}

type Response

type Response struct {
	ID    string    `json:"id"`
	Name  string    `json:"name"`
	Links api.Links `json:"links"`
}

type Service

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

func New

func New(client api.HTTP) *Service

func (*Service) Get

func (s *Service) Get(id string) (*Response, error)

func (*Service) GetAll

func (s *Service) GetAll() ([]*Response, error)

func (*Service) GetBareMetalCapabilities

func (s *Service) GetBareMetalCapabilities(dataCenterId string) (*BareMetalCapabilitiesResponse, error)

func (*Service) GetCapabilities

func (s *Service) GetCapabilities(id string) (*CapabilitiesResponse, error)

Jump to

Keyboard shortcuts

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