ec2

package
v0.0.0-...-15aa78f Latest Latest
Warning

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

Go to latest
Published: Sep 12, 2016 License: Apache-2.0 Imports: 12 Imported by: 1

Documentation

Index

Constants

View Source
const DEFAULT_NAME = "cloug"
View Source
const DEFAULT_REGION = "us-west-2"

Variables

This section is empty.

Functions

func Bool

func Bool(b *bool) bool

func EC2FromJSON

func EC2FromJSON(jsonData []byte) (compute.Provider, error)

func Int64

func Int64(x *int64) int64

func String

func String(str *string) string

Types

type EC2

type EC2 struct {
	Session *session.Session
}

func MakeEC2

func MakeEC2(keyID string, secretKey string, apiToken string) (*EC2, error)

func (*EC2) ComputeService

func (e *EC2) ComputeService() compute.Service

func (*EC2) CreateImage

func (e *EC2) CreateImage(imageTemplate *compute.Image) (*compute.Image, error)

func (*EC2) CreateInstance

func (e *EC2) CreateInstance(instance *compute.Instance) (*compute.Instance, error)

func (*EC2) DeleteImage

func (e *EC2) DeleteImage(imageID string) error

func (*EC2) DeleteInstance

func (e *EC2) DeleteInstance(instanceID string) error

func (*EC2) FindFlavor

func (e *EC2) FindFlavor(flavor *compute.Flavor) (string, error)

func (*EC2) FindImage

func (e *EC2) FindImage(image *compute.Image) (string, error)

func (*EC2) GetImage

func (e *EC2) GetImage(imageID string) (*compute.Image, error)

func (*EC2) GetInstance

func (e *EC2) GetInstance(instanceID string) (*compute.Instance, error)

func (*EC2) ListFlavors

func (e *EC2) ListFlavors() ([]*compute.Flavor, error)

func (*EC2) ListImages

func (e *EC2) ListImages() ([]*compute.Image, error)

func (*EC2) ListInstances

func (e *EC2) ListInstances() ([]*compute.Instance, error)

func (*EC2) RebootInstance

func (e *EC2) RebootInstance(instanceID string) error

func (*EC2) StartInstance

func (e *EC2) StartInstance(instanceID string) error

func (*EC2) StopInstance

func (e *EC2) StopInstance(instanceID string) error

type EC2JSONConfig

type EC2JSONConfig struct {
	KeyID     string `json:"key_id"`
	SecretKey string `json:"secret_key"`
	Token     string `json:"token"`
}

Jump to

Keyboard shortcuts

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