provider

package
v0.10.8 Latest Latest
Warning

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

Go to latest
Published: Apr 10, 2018 License: Apache-2.0 Imports: 16 Imported by: 0

Documentation

Index

Constants

View Source
const (
	AP_NORTHEAST_1 = "ap-northeast-1"
	AP_SOUTHEAST_1 = "ap-southeast-1"
	AP_SOUTHEAST_2 = "ap-southeast-2"
	EU_CENTRAL_1   = "eu-central-1"
	EU_WEST_1      = "eu-west-1"
	SA_EAST_1      = "sa-east-1"
	US_EAST_1      = "us-east-1"
	US_WEST_1      = "us-west-1"
	US_WEST_2      = "us-west-2"
)

Variables

View Source
var GetAutoScalingConnection = func(credProvider CredProvider, region string) (connection *autoscaling.AutoScaling, err error) {
	sess, err := getConfig(credProvider, region)
	if err != nil {
		return
	}

	connection = autoscaling.New(sess)
	return
}
View Source
var GetCloudFormationConnection = func(credProvider CredProvider, region string) (connection *cloudformation.CloudFormation, err error) {
	sess, err := getConfig(credProvider, region)
	if err != nil {
		return
	}

	connection = cloudformation.New(sess)
	return
}
View Source
var GetCloudWatchConnection = func(credProvider CredProvider, region string) (connection *cloudwatch.CloudWatch, err error) {
	sess, err := getConfig(credProvider, region)
	if err != nil {
		return
	}

	connection = cloudwatch.New(sess)
	return
}
View Source
var GetCloudWatchLogsConnection = func(credProvider CredProvider, region string) (connection *cloudwatchlogs.CloudWatchLogs, err error) {
	sess, err := getConfig(credProvider, region)
	if err != nil {
		return
	}

	connection = cloudwatchlogs.New(sess)
	return
}
View Source
var GetEC2Connection = func(credProvider CredProvider, region string) (connection *ec2.EC2, err error) {
	sess, err := getConfig(credProvider, region)
	if err != nil {
		return
	}

	connection = ec2.New(sess)
	return
}
View Source
var GetECSConnection = func(credProvider CredProvider, region string) (connection *ecs.ECS, err error) {
	sess, err := getConfig(credProvider, region)
	if err != nil {
		return
	}

	connection = ecs.New(sess)
	return
}
View Source
var GetELBConnection = func(credProvider CredProvider, region string) (connection *elb.ELB, err error) {
	sess, err := getConfig(credProvider, region)
	if err != nil {
		return
	}

	connection = elb.New(sess)
	return
}
View Source
var GetElasticBeanstalkConnection = func(credProvider CredProvider, region string) (connection *elasticbeanstalk.ElasticBeanstalk, err error) {
	sess, err := getConfig(credProvider, region)
	if err != nil {
		return
	}

	connection = elasticbeanstalk.New(sess)
	return
}
View Source
var GetIAMConnection = func(credProvider CredProvider, region string) (connection *iam.IAM, err error) {
	sess, err := getConfig(credProvider, region)
	if err != nil {
		return
	}

	connection = iam.New(sess)
	return
}
View Source
var GetS3Connection = func(credProvider CredProvider, region string) (connection *s3.S3, err error) {
	sess, err := getConfig(credProvider, region)
	if err != nil {
		return
	}

	connection = s3.New(sess)
	return
}

Functions

This section is empty.

Types

type CredProvider

type CredProvider interface {
	GetAWSAccessKeyID() (string, error)
	GetAWSSecretAccessKey() (string, error)
}

type ExplicitCredProvider

type ExplicitCredProvider struct {
	AccessKey, SecretKey string
}

func NewExplicitCredProvider

func NewExplicitCredProvider(access, secret string) *ExplicitCredProvider

func (*ExplicitCredProvider) GetAWSAccessKeyID

func (this *ExplicitCredProvider) GetAWSAccessKeyID() (string, error)

func (*ExplicitCredProvider) GetAWSSecretAccessKey

func (this *ExplicitCredProvider) GetAWSSecretAccessKey() (string, error)

type MockCredProvider

type MockCredProvider struct {
	GetAWSAccessKeyID_fn     func() (string, error)
	GetAWSSecretAccessKey_fn func() (string, error)
}

func (*MockCredProvider) GetAWSAccessKeyID

func (this *MockCredProvider) GetAWSAccessKeyID() (string, error)

func (*MockCredProvider) GetAWSSecretAccessKey

func (this *MockCredProvider) GetAWSSecretAccessKey() (string, error)

Jump to

Keyboard shortcuts

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