compute

package module
v0.0.0-...-ac431fb Latest Latest
Warning

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

Go to latest
Published: Apr 26, 2014 License: BSD-3-Clause Imports: 1 Imported by: 1

README

GCloud - Compute

GCloud, Go Packages for Cloud Services. Build Status

API

Servers
  • list
  • show
  • create
  • destroy
  • reboot
  • start
  • stop
Locations
  • list
  • show
Images
  • list
  • show
  • create
  • destroy
  • distribute
Sizes
  • list
  • show

Development

cd $GOPATH
go get github.com/gcloud/compute

Documentation

Overview

GCloud compute package for cloud services.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func RegisterImages

func RegisterImages(name string, images Images)

func RegisterLocations

func RegisterLocations(name string, locations Locations)

func RegisterServers

func RegisterServers(provider string, servers Servers)

func RegisterSizes

func RegisterSizes(name string, sizes Sizes)

Types

type Image

type Image interface {
	Id() string
	Name() string
	Path() string
	String() string
	MarshalJSON() ([]byte, error)
	Map() Map
}

type Images

type Images interface {
	New(Map) Image
	List() ([]Image, error)
	Show(Image) (Image, error)
	Create(Image) (Image, error)
	Destroy(Image) (bool, error)
}

func GetImages

func GetImages(provider string, account *i.Account) Images

type Location

type Location interface {
	Id() string
	Name() string
	Region() string
}

type Locations

type Locations interface {
	List() ([]Location, error)
	Show(string) (Location, error)
}

func GetLocations

func GetLocations(provider string, account *i.Account) Locations

type Map

type Map map[string]interface{}

type Provider

type Provider struct {
	Endpoint  string
	Account   *i.Account
	Servers   Servers
	Images    Images
	Locations Locations
	Sizes     Sizes
}

func GetProvider

func GetProvider(name string) *Provider

func (*Provider) GetAccount

func (p *Provider) GetAccount() *i.Account

func (*Provider) SetAccount

func (p *Provider) SetAccount(account *i.Account)

type Server

type Server interface {
	Id() string
	Name() string
	State() string
	Ips(string) []string
	Size() string
	Image() string
	String() string
	MarshalJSON() ([]byte, error)
	Map() Map
}

type Servers

type Servers interface {
	New(Map) Server
	List() ([]Server, error)
	Show(Server) (Server, error)
	Create(Server) (Server, error)
	Destroy(Server) (bool, error)
	Reboot(Server) (bool, error)
	Start(Server) (bool, error)
	Stop(Server) (bool, error)
}

func GetServers

func GetServers(provider string, account *i.Account) Servers

type Size

type Size interface {
	Id() string
	Name() string
}

type Sizes

type Sizes interface {
	List() ([]Size, error)
	Show(string) (Size, error)
}

func GetSizes

func GetSizes(provider string, account *i.Account) Sizes

Directories

Path Synopsis
providers

Jump to

Keyboard shortcuts

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