awsservice

package
v0.0.0-...-e119815 Latest Latest
Warning

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

Go to latest
Published: Feb 4, 2019 License: MIT Imports: 11 Imported by: 0

README

GoDoc

More developer-friendly wrapper around the AWS Go SDK.

Documentation

Index

Constants

This section is empty.

Variables

View Source
var False = false
View Source
var True = true

AWS SDK pointer-itis

Functions

This section is empty.

Types

type AWSActionLog

type AWSActionLog struct {
	Action        string
	NotableParams map[string]string
}

Testing types

type AWSEC2Service

type AWSEC2Service interface {
	RunInstances(*InstancesDefinition) ([]string, error)
	StartInstances([]string) error
	StopInstances([]string) error
	FindInstancesByTag(string, string) ([]string, error)
	TagInstances([]string, string, string) error
	DeleteTag([]string, string) error
	GetSubnetInfo(string) (*SubnetInfo, error)
	GetInstancesInfo([]string) ([]InstanceInfo, error)
	TerminateInstances([]string) error
}

type AWSLoadBalancerService

type AWSLoadBalancerService interface {
	CreateLoadBalancer(*LoadBalancerDefinition) (string, error)
	DeleteLoadBalancer(string) error
	RegisterInstances(string, []string) error
	DeregisterInstances(string, []string) error
	GetLoadBalancerInfo(string) (*LoadBalancerInfo, error)
	GetInstanceHealth(string) (*LBInstanceHealthInfo, error)
	SetHealthCheck(string, *LBHealthCheck) error
}

type AWSRoute53Service

type AWSRoute53Service interface {
	CreateDNSRecord(*Route53RecordDefinition) error
	DeleteDNSRecord(*Route53RecordDefinition) error
}

type AWSService

func NewAWSService

func NewAWSService() AWSService

NewAWSService uses the default Environment credential store

func NewStaticAWSService

func NewStaticAWSService(id string, secret string) AWSService

NewStaticAWSService uses the static credential provider (pass in access key ID and secret key)

type BlockDeviceDefinition

type BlockDeviceDefinition struct {
	Name                string
	DeleteOnTermination bool
	Encrypted           bool
	Iops                int64
	SnapshotID          string
	Size                int64
	Type                EBSVolumeType
}

type EBSVolumeType

type EBSVolumeType int

EBSVolumeType represents the different types of EBS volumes available

const (
	Gp2 EBSVolumeType = iota
	Io1
	Sc1
	St1
	Standard
)

func (EBSVolumeType) String

func (i EBSVolumeType) String() string

type ELBListener

type ELBListener struct {
	InstancePort         int64
	LoadBalancerPort     int64
	LoadBalancerProtocol string
	InstanceProtocol     string
	CertificateID        string
}

type InstanceInfo

type InstanceInfo struct {
	AMI                string
	Keypair            string
	Type               string
	ID                 string
	PrivateIP          string
	PublicIP           string
	Subnet             string
	SecurityGroups     []string
	State              string
	StateReasonCode    string
	StateReasonMessage string
	Tags               map[string]string
}

type InstancesDefinition

type InstancesDefinition struct {
	AMI           string
	Subnet        string
	SecurityGroup string
	Keypair       string
	Type          string
	GetPublicIP   bool
	PrivateIPs    []string // Optional. Must be valid unused IPs within Subnet with length matching Count
	UserData      []byte
	Count         int
	RootSizeGB    int // Optional (default: 20)
	EncryptedRoot bool
	BlockDevices  []BlockDeviceDefinition
}

type LBHealthCheck

type LBHealthCheck struct {
	Target             string
	Interval           int64
	Timeout            int64
	HealthyThreshold   int64
	UnhealthyThreshold int64
}

type LBInstanceHealth

type LBInstanceHealth struct {
	ID          string
	Description string
	ReasonCode  string
	State       string
}

type LBInstanceHealthInfo

type LBInstanceHealthInfo struct {
	LBName    string
	Instances []LBInstanceHealth
}

type LimitedRoute53API

type LimitedRoute53API interface {
	ChangeResourceRecordSets(*route53.ChangeResourceRecordSetsInput) (*route53.ChangeResourceRecordSetsOutput, error)
}

type LoadBalancerDefinition

type LoadBalancerDefinition struct {
	Listeners      []ELBListener
	Name           string
	SecurityGroups []string
	Scheme         string
	Subnets        []string
}

type LoadBalancerInfo

type LoadBalancerInfo struct {
	Name              string
	Scheme            string
	SecurityGroups    []string
	Subnets           []string
	VPCID             string
	AvailabilityZones []string
	DNSName           string
	Instances         []string
}

type RealAWSService

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

func (*RealAWSService) CreateDNSRecord

func (aws *RealAWSService) CreateDNSRecord(rd *Route53RecordDefinition) error

func (*RealAWSService) CreateLoadBalancer

func (aws *RealAWSService) CreateLoadBalancer(lbd *LoadBalancerDefinition) (string, error)

func (*RealAWSService) DeleteDNSRecord

func (aws *RealAWSService) DeleteDNSRecord(rd *Route53RecordDefinition) error

func (*RealAWSService) DeleteLoadBalancer

func (aws *RealAWSService) DeleteLoadBalancer(n string) error

func (*RealAWSService) DeleteTag

func (aws *RealAWSService) DeleteTag(ids []string, n string) error

func (*RealAWSService) DeregisterInstances

func (aws *RealAWSService) DeregisterInstances(n string, ids []string) error

func (*RealAWSService) FindInstancesByTag

func (aws *RealAWSService) FindInstancesByTag(n string, v string) ([]string, error)

func (*RealAWSService) GetInstanceHealth

func (aws *RealAWSService) GetInstanceHealth(n string) (*LBInstanceHealthInfo, error)

func (*RealAWSService) GetInstancesInfo

func (aws *RealAWSService) GetInstancesInfo(ids []string) ([]InstanceInfo, error)

func (*RealAWSService) GetLoadBalancerInfo

func (aws *RealAWSService) GetLoadBalancerInfo(n string) (*LoadBalancerInfo, error)

func (*RealAWSService) GetSubnetInfo

func (aws *RealAWSService) GetSubnetInfo(id string) (*SubnetInfo, error)

func (*RealAWSService) RegisterInstances

func (aws *RealAWSService) RegisterInstances(n string, ids []string) error

func (*RealAWSService) RunInstances

func (aws *RealAWSService) RunInstances(idef *InstancesDefinition) ([]string, error)

func (*RealAWSService) SetHealthCheck

func (aws *RealAWSService) SetHealthCheck(n string, hc *LBHealthCheck) error

func (*RealAWSService) StartInstances

func (aws *RealAWSService) StartInstances(ids []string) error

func (*RealAWSService) StopInstances

func (aws *RealAWSService) StopInstances(ids []string) error

func (*RealAWSService) TagInstances

func (aws *RealAWSService) TagInstances(ids []string, n string, v string) error

func (*RealAWSService) TerminateInstances

func (aws *RealAWSService) TerminateInstances(ids []string) error

type Route53RecordDefinition

type Route53RecordDefinition struct {
	ZoneID string
	Name   string
	Value  string
	Type   string
	TTL    int64
}

type SubnetInfo

type SubnetInfo struct {
	AvailabilityZone     string
	AvailableIPAddresses int64
	CIDR                 string
	State                string
	ID                   string
	Tags                 map[string]string
	VPC                  string
}

type TestingAWSService

type TestingAWSService struct {
	Log []AWSActionLog
}

func (*TestingAWSService) CreateDNSRecord

func (aws *TestingAWSService) CreateDNSRecord(rd *Route53RecordDefinition) error

func (*TestingAWSService) CreateLoadBalancer

func (aws *TestingAWSService) CreateLoadBalancer(lbd *LoadBalancerDefinition) (string, error)

func (*TestingAWSService) DeleteDNSRecord

func (aws *TestingAWSService) DeleteDNSRecord(rd *Route53RecordDefinition) error

func (*TestingAWSService) DeleteLoadBalancer

func (aws *TestingAWSService) DeleteLoadBalancer(n string) error

func (*TestingAWSService) DeregisterInstances

func (aws *TestingAWSService) DeregisterInstances(n string, ids []string) error

func (*TestingAWSService) RegisterInstances

func (aws *TestingAWSService) RegisterInstances(n string, ids []string) error

Jump to

Keyboard shortcuts

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