Documentation
¶
Index ¶
- type Attributes
- type AuthOpts
- type Card
- type Client
- func (c *Client) Build(params map[string]interface{}) (api.ClientAPI, error)
- func (c *Client) CopyObject(containerSrc, objectSrc, objectDst string) error
- func (c *Client) CreateContainer(name string) error
- func (c *Client) CreateGateway(req model.GWRequest) (*model.Host, error)
- func (c *Client) CreateHost(request model.HostRequest) (*model.Host, error)
- func (c *Client) CreateKeyPair(name string) (*model.KeyPair, error)
- func (c *Client) CreateNetwork(req model.NetworkRequest) (*model.Network, error)
- func (c *Client) CreateVolume(request model.VolumeRequest) (*model.Volume, error)
- func (c *Client) CreateVolumeAttachment(request model.VolumeAttachmentRequest) (*model.VolumeAttachment, error)
- func (c *Client) DeleteContainer(name string) error
- func (c *Client) DeleteGateway(networkID string) error
- func (c *Client) DeleteHost(id string) error
- func (c *Client) DeleteKeyPair(id string) error
- func (c *Client) DeleteNetwork(id string) error
- func (c *Client) DeleteObject(container, object string) error
- func (c *Client) DeleteVolume(id string) error
- func (c *Client) DeleteVolumeAttachment(serverID, id string) error
- func (c *Client) GetAuthOpts() (model.Config, error)
- func (c *Client) GetCfgOpts() (model.Config, error)
- func (c *Client) GetContainer(name string) (*api.ContainerInfo, error)
- func (c *Client) GetHost(hostParam interface{}) (*model.Host, error)
- func (c *Client) GetImage(id string) (*model.Image, error)
- func (c *Client) GetKeyPair(id string) (*model.KeyPair, error)
- func (c *Client) GetNetwork(id string) (*model.Network, error)
- func (c *Client) GetObject(container string, name string, ranges []model.Range) (*model.Object, error)
- func (c *Client) GetObjectMetadata(container string, name string) (*model.Object, error)
- func (c *Client) GetTemplate(id string) (*model.HostTemplate, error)
- func (c *Client) GetVolume(id string) (*model.Volume, error)
- func (c *Client) GetVolumeAttachment(serverID, id string) (*model.VolumeAttachment, error)
- func (c *Client) ListContainers() ([]string, error)
- func (c *Client) ListHosts() ([]model.Host, error)
- func (c *Client) ListImages(all bool) ([]model.Image, error)
- func (c *Client) ListKeyPairs() ([]model.KeyPair, error)
- func (c *Client) ListNetworks() ([]model.Network, error)
- func (c *Client) ListObjects(container string, filter model.ObjectFilter) ([]string, error)
- func (c *Client) ListTemplates(all bool) ([]model.HostTemplate, error)
- func (c *Client) ListVolumeAttachments(serverID string) ([]model.VolumeAttachment, error)
- func (c *Client) ListVolumes() ([]model.Volume, error)
- func (c *Client) PutObject(container string, obj model.Object) error
- func (c *Client) RebootHost(id string) error
- func (c *Client) StartHost(id string) error
- func (c *Client) StopHost(id string) error
- func (c *Client) UpdateObjectMetadata(container string, obj model.Object) error
- type OnDemand
- type Price
- type PriceDimension
- type PriceDimensions
- type Product
- type Reserved
- type TermAttributes
- type Terms
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Attributes ¶
type Attributes struct {
ClockSpeed string `json:"clockSpeed,omitempty"`
CurrentGeneration string `json:"currentGeneration,omitempty"`
DedicatedEbsThroughput string `json:"dedicatedEbsThroughput,omitempty"`
Ecu string `json:"ecu,omitempty"`
EnhancedNetworkingSupported string `json:"enhancedNetworkingSupported,omitempty"`
InstanceFamily string `json:"instanceFamily,omitempty"`
InstanceType string `json:"instanceType,omitempty"`
LicenseModel string `json:"licenseModel,omitempty"`
Location string `json:"location,omitempty"`
LocationType string `json:"locationType,omitempty"`
Memory string `json:"memory,omitempty"`
MetworkPerformance string `json:"metworkPerformance,omitempty"`
NormalizationSizeFactor string `json:"normalizationSizeFactor,omitempty"`
OperatingSystem string `json:"operatingSystem,omitempty"`
Operation string `json:"operation,omitempty"`
PhysicalProcessor string `json:"physicalProcessor,omitempty"`
PreInstalledSw string `json:"preInstalled_sw,omitempty"`
ProcessorArchitecture string `json:"processorArchitecture,omitempty"`
ProcessorFeatures string `json:"processorFeatures,omitempty"`
Servicecode string `json:"servicecode,omitempty"`
Servicename string `json:"servicename,omitempty"`
Storage string `json:"storage,omitempty"`
Tenancy string `json:"tenancy,omitempty"`
Usagetype string `json:"usagetype,omitempty"`
Vcpu string `json:"vcpu,omitempty"`
}
Attributes attributes of a compute instance
type AuthOpts ¶
type AuthOpts struct {
// AWS Access key ID
AccessKeyID string
// AWS Secret Access Key
SecretAccessKey string
// The region to send requests to. This parameter is required and must
// be configured globally or on a per-client basis unless otherwise
// noted. A full list of regions is found in the "Regions and Endpoints"
// document.
//
// @see http://docs.aws.amazon.com/general/latest/gr/rande.html
// AWS Regions and Endpoints
Region string
}
AuthOpts AWS credentials
type Card ¶
type Card struct {
EffectiveDate string `json:"effectiveDate,omitempty"`
OfferTermCode string `json:"offerTermCode,omitempty"`
PriceDimensions PriceDimensions `json:"priceDimensions,omitempty"`
Sku string `json:"sku,omitempty"`
TermAttributes TermAttributes `json:"termAttributes,omitempty"`
}
Card compute instance price card
type Client ¶
type Client struct {
Session *session.Session
EC2 *ec2.EC2
Pricing *pricing.Pricing
AuthOpts AuthOpts
UserDataTpl *template.Template
}
Client a AWS provider client
func AuthenticatedClient ¶
AuthenticatedClient returns an authenticated client
func (*Client) CopyObject ¶
CopyObject copies an object
func (*Client) CreateContainer ¶
CreateContainer creates an object container
func (*Client) CreateGateway ¶
CreateGateway exists only to comply with api.ClientAPI interface
func (*Client) CreateHost ¶
CreateHost creates an host that fulfils the request
func (*Client) CreateKeyPair ¶
CreateKeyPair creates and import a key pair
func (*Client) CreateNetwork ¶
CreateNetwork creates a network
func (*Client) CreateVolume ¶
CreateVolume creates a block volume - name is the name of the volume - size is the size of the volume in GB - volumeType is the type of volume to create, if volumeType is empty the driver use a default type
func (*Client) CreateVolumeAttachment ¶
func (c *Client) CreateVolumeAttachment(request model.VolumeAttachmentRequest) (*model.VolumeAttachment, error)
CreateVolumeAttachment attaches a volume to an host - name the name of the volume attachment - volume the volume to attach - host on which the volume is attached
func (*Client) DeleteContainer ¶
DeleteContainer deletes an object container
func (*Client) DeleteGateway ¶
DeleteGateway exists only to comply with api.ClientAPI interface
func (*Client) DeleteHost ¶
DeleteHost deletes the host identified by id
func (*Client) DeleteKeyPair ¶
DeleteKeyPair deletes the key pair identified by id
func (*Client) DeleteNetwork ¶
DeleteNetwork deletes the network identified by id
func (*Client) DeleteObject ¶
DeleteObject deleta an object from a container
func (*Client) DeleteVolume ¶
DeleteVolume deletes the volume identified by id
func (*Client) DeleteVolumeAttachment ¶
DeleteVolumeAttachment deletes the volume attachment identifed by id
func (*Client) GetCfgOpts ¶
GetCfgOpts return configuration parameters
func (*Client) GetContainer ¶
func (c *Client) GetContainer(name string) (*api.ContainerInfo, error)
func (*Client) GetKeyPair ¶
GetKeyPair returns the key pair identified by id
func (*Client) GetNetwork ¶
GetNetwork returns the network identified by id
func (*Client) GetObject ¶
func (c *Client) GetObject(container string, name string, ranges []model.Range) (*model.Object, error)
GetObject get object content from an object container
func (*Client) GetObjectMetadata ¶
GetObjectMetadata get object metadata from an object container
func (*Client) GetTemplate ¶
func (c *Client) GetTemplate(id string) (*model.HostTemplate, error)
GetTemplate returns the Template referenced by id
func (*Client) GetVolumeAttachment ¶
func (c *Client) GetVolumeAttachment(serverID, id string) (*model.VolumeAttachment, error)
GetVolumeAttachment returns the volume attachment identified by id
func (*Client) ListContainers ¶
ListContainers list object containers
func (*Client) ListImages ¶
ListImages lists available OS images
func (*Client) ListKeyPairs ¶
ListKeyPairs lists available key pairs
func (*Client) ListNetworks ¶
ListNetworks lists available networks
func (*Client) ListObjects ¶
ListObjects list objects of a container
func (*Client) ListTemplates ¶
func (c *Client) ListTemplates(all bool) ([]model.HostTemplate, error)
ListTemplates lists available host templates Host templates are sorted using Dominant Resource Fairness Algorithm
func (*Client) ListVolumeAttachments ¶
func (c *Client) ListVolumeAttachments(serverID string) ([]model.VolumeAttachment, error)
ListVolumeAttachments lists available volume attachment
func (*Client) ListVolumes ¶
ListVolumes list available volumes
func (*Client) RebootHost ¶
type Price ¶
type Price struct {
Product Product `json:"product,omitempty"`
PublicationDate string `json:"publicationDate,omitempty"`
ServiceCode string `json:"serviceCode,omitempty"`
Terms Terms `json:"terms,omitempty"`
}
Price Compute instance price information
type PriceDimension ¶
type PriceDimension struct {
AppliesTo []string `json:"appliesTo,omitempty"`
BeginRange string `json:"beginRange,omitempty"`
Description string `json:"description,omitempty"`
EndRange string `json:"endRange,omitempty"`
PricePerUnit map[string]float32 `json:"pricePerUnit,omitempty"`
RateCode string `json:"RateCode,omitempty"`
Unit string `json:"Unit,omitempty"`
}
PriceDimension compute instance price related to term condition
type PriceDimensions ¶
type PriceDimensions struct {
PriceDimensionMap map[string]PriceDimension `json:"price_dimension_map,omitempty"`
}
PriceDimensions compute instance price dimensions
type Product ¶
type Product struct {
Attributes Attributes `json:"attributes,omitempty"`
ProductFamily string `json:"productFamily,omitempty"`
Sku string `json:"sku,omitempty"`
}
Product compute instance product
type TermAttributes ¶
type TermAttributes struct {
LeaseContractLength string `json:"leaseContractLength,omitempty"`
OfferingClass string `json:"offeringClass,omitempty"`
PurchaseOption string `json:"purchaseOption,omitempty"`
}
TermAttributes compute instance terms