b2aws

package module
v0.0.0-...-37bcdfb Latest Latest
Warning

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

Go to latest
Published: Dec 15, 2014 License: MIT Imports: 7 Imported by: 0

README

go-b2aws

GoLang AWS Rest library

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetRegions

func GetRegions(accessKey string, secretKey string, client *http.Client) (regionMap map[string]string, err error)

func GetS3Object

func GetS3Object(accessKey string, secretKey string, bucketObjectUrl string, client *http.Client) (body []byte, err error)

func MultiInstancesURL

func MultiInstancesURL(regionEndpoint string, action string, instanceIds ...string) (ourl string, err error)

Types

type AwsRequest

type AwsRequest struct {
	RequestId string `xml:"requestId"`
}

type DBSnapshot

type DBSnapshot struct {
	Port                 int
	OptionGroupName      string
	Engine               string
	Status               string
	SnapshotType         string
	LicenseModel         string
	EngineVersion        string
	DBInstanceIdentifier string
	DBSnapshotIdentifier string
	SnapshotCreateTime   time.Time
	AvailabilityZone     string
	InstanceCreateTime   time.Time
	PercentProgress      int
	AllocatedStorage     int
	MasterUsername       string
}

type DescribeDBSnapshotsResponse

type DescribeDBSnapshotsResponse struct {
	RequestId   string       `xml:"ResponseMetadata>RequestId"`
	DBSnapshots []DBSnapshot `xml:"DescribeDBSnapshotsResult>DBSnapshots>DBSnapshot"`
}

func GetRDSSnapshots

func GetRDSSnapshots(accessKey string, secretKey string, regionEndpoint string, client *http.Client, params string) (dbSnapshots DescribeDBSnapshotsResponse, err error)

type Group

type Group struct {
	GroupId   string `xml:"groupId"`
	GroupName string `xml:"groupName"`
}

type Instance

type Instance struct {
	InstanceId            string `xml:"instanceId",json:"Id"`
	Architecture          string `xml:"architecture"`
	InstanceType          string `xml:"instanceType"`
	PrivateDnsName        string `xml:"privateDnsName"`
	Tags                  []Tag  `xml:"tagSet>item"`
	IpAddress             string `xml:"ipAddress"`
	InstanceState         string `xml:"instanceState>name"`
	CurrentInstanceState  string `xml:"currentState>name"`
	PreviousInstanceState string `xml:"previousState>name"`
	InstanceStateCode     string `xml:"instanceState>code"`
	ProfileName           string // custom field
	Region                string // custom field
}

func GetInstances

func GetInstances(accessKey string, secretKey string, regionEndpoint string, client *http.Client) (instanceList []Instance, err error)

type Instances

type Instances struct {
	AwsRequest
	Reservations []Reservation `xml:"reservationSet>item"`
}

type InstantStatuses

type InstantStatuses struct {
	AwsRequest
	Instances []Instance `xml:"instanceStatusSet>item"`
}

func GetInstancesStatus

func GetInstancesStatus(accessKey string, secretKey string, regionEndpoint string, client *http.Client, all bool, instanceIds ...string) (instantStatuses InstantStatuses, err error)

type RegionInfo

type RegionInfo struct {
	RegionName     string `xml:"regionName"`
	RegionEndpoint string `xml:"regionEndpoint"`
}

type Regions

type Regions struct {
	AwsRequest
	RegionInfo []RegionInfo `xml:"regionInfo>item"`
}

type Reservation

type Reservation struct {
	ReservationId string     `xml:"reservationId"`
	OwnerId       string     `xml:"ownerId"`
	Groups        []Group    `xml:"groupSet>item"`
	Instances     []Instance `xml:"instancesSet>item"`
}

type StartInstance

type StartInstance struct {
	AwsRequest
	Instances []Instance `xml:"instancesSet>item"`
}

func StartInstances

func StartInstances(accessKey string, secretKey string, regionEndpoint string, client *http.Client, instanceIds ...string) (instances StartInstance, err error, rurl string)

func StopInstances

func StopInstances(accessKey string, secretKey string, regionEndpoint string, client *http.Client, instanceIds ...string) (instances StartInstance, err error, rurl string)

type Tag

type Tag struct {
	Key   string `xml:"key"`
	Value string `xml:"value"`
}

Jump to

Keyboard shortcuts

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