aws

package
v0.0.23 Latest Latest
Warning

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

Go to latest
Published: May 5, 2017 License: Apache-2.0 Imports: 48 Imported by: 0

Documentation

Index

Constants

View Source
const (
	PARENT_OF = iota // default
	APPLIES_ON
	DEPENDING_ON
)

Variables

View Source
var APIPerResourceType = map[string]string{
	"instance":            "ec2",
	"subnet":              "ec2",
	"vpc":                 "ec2",
	"keypair":             "ec2",
	"securitygroup":       "ec2",
	"volume":              "ec2",
	"internetgateway":     "ec2",
	"routetable":          "ec2",
	"availabilityzone":    "ec2",
	"image":               "ec2",
	"elasticip":           "ec2",
	"snapshot":            "ec2",
	"loadbalancer":        "elbv2",
	"targetgroup":         "elbv2",
	"listener":            "elbv2",
	"database":            "rds",
	"dbsubnetgroup":       "rds",
	"launchconfiguration": "autoscaling",
	"scalinggroup":        "autoscaling",
	"scalingpolicy":       "autoscaling",
	"user":                "iam",
	"group":               "iam",
	"role":                "iam",
	"policy":              "iam",
	"accesskey":           "iam",
	"bucket":              "s3",
	"s3object":            "s3",
	"subscription":        "sns",
	"topic":               "sns",
	"queue":               "sqs",
	"zone":                "route53",
	"record":              "route53",
	"function":            "lambda",
	"metric":              "cloudwatch",
	"alarm":               "cloudwatch",
}
View Source
var (
	AccessService, InfraService, StorageService, NotificationService, QueueService, DnsService, LambdaService, MonitoringService cloud.Service
)
View Source
var ErrTagNotFound = errors.New("aws tag key not found")
View Source
var ResourceTypes = []string{
	"instance",
	"subnet",
	"vpc",
	"keypair",
	"securitygroup",
	"volume",
	"internetgateway",
	"routetable",
	"availabilityzone",
	"image",
	"elasticip",
	"snapshot",
	"loadbalancer",
	"targetgroup",
	"listener",
	"database",
	"dbsubnetgroup",
	"launchconfiguration",
	"scalinggroup",
	"scalingpolicy",
	"user",
	"group",
	"role",
	"policy",
	"accesskey",
	"bucket",
	"s3object",
	"subscription",
	"topic",
	"queue",
	"zone",
	"record",
	"function",
	"metric",
	"alarm",
}
View Source
var ServiceNames = []string{
	"infra",
	"access",
	"storage",
	"notification",
	"queue",
	"dns",
	"lambda",
	"monitoring",
}
View Source
var ServicePerAPI = map[string]string{
	"ec2":         "infra",
	"elbv2":       "infra",
	"rds":         "infra",
	"autoscaling": "infra",
	"iam":         "access",
	"sts":         "access",
	"s3":          "storage",
	"sns":         "notification",
	"sqs":         "queue",
	"route53":     "dns",
	"lambda":      "lambda",
	"cloudwatch":  "monitoring",
}
View Source
var ServicePerResourceType = map[string]string{
	"instance":            "infra",
	"subnet":              "infra",
	"vpc":                 "infra",
	"keypair":             "infra",
	"securitygroup":       "infra",
	"volume":              "infra",
	"internetgateway":     "infra",
	"routetable":          "infra",
	"availabilityzone":    "infra",
	"image":               "infra",
	"elasticip":           "infra",
	"snapshot":            "infra",
	"loadbalancer":        "infra",
	"targetgroup":         "infra",
	"listener":            "infra",
	"database":            "infra",
	"dbsubnetgroup":       "infra",
	"launchconfiguration": "infra",
	"scalinggroup":        "infra",
	"scalingpolicy":       "infra",
	"user":                "access",
	"group":               "access",
	"role":                "access",
	"policy":              "access",
	"accesskey":           "access",
	"bucket":              "storage",
	"s3object":            "storage",
	"subscription":        "notification",
	"topic":               "notification",
	"queue":               "queue",
	"zone":                "dns",
	"record":              "dns",
	"function":            "lambda",
	"metric":              "monitoring",
	"alarm":               "monitoring",
}

Functions

func GetCloudServicesForAPIs added in v0.0.21

func GetCloudServicesForAPIs(apis ...string) (services []cloud.Service)

func GetCloudServicesForTypes added in v0.0.21

func GetCloudServicesForTypes(types ...string) (services []cloud.Service)

func InitServices

func InitServices(conf map[string]interface{}, log *logger.Logger) error

func NewAccess

func NewAccess(sess *session.Session, awsconf config, log *logger.Logger) cloud.Service

func NewDns

func NewDns(sess *session.Session, awsconf config, log *logger.Logger) cloud.Service

func NewDriver added in v0.0.23

func NewDriver(region, profile string, log ...*logger.Logger) (driver.Driver, error)

func NewInfra

func NewInfra(sess *session.Session, awsconf config, log *logger.Logger) cloud.Service

func NewLambda added in v0.0.23

func NewLambda(sess *session.Session, awsconf config, log *logger.Logger) cloud.Service

func NewMonitoring added in v0.0.23

func NewMonitoring(sess *session.Session, awsconf config, log *logger.Logger) cloud.Service

func NewNotification

func NewNotification(sess *session.Session, awsconf config, log *logger.Logger) cloud.Service

func NewQueue

func NewQueue(sess *session.Session, awsconf config, log *logger.Logger) cloud.Service

func NewStorage

func NewStorage(sess *session.Session, awsconf config, log *logger.Logger) cloud.Service

func ResourceTypesPerServiceName added in v0.0.22

func ResourceTypesPerServiceName() map[string][]string

Types

type Access

type Access struct {
	iamiface.IAMAPI
	stsiface.STSAPI
	// contains filtered or unexported fields
}

func (*Access) Drivers

func (s *Access) Drivers() []driver.Driver

func (*Access) FetchByType

func (s *Access) FetchByType(t string) (*graph.Graph, error)

func (*Access) FetchResources

func (s *Access) FetchResources() (*graph.Graph, error)

func (*Access) GetIdentity added in v0.0.21

func (s *Access) GetIdentity() (*Identity, error)

func (*Access) GetUserPolicies added in v0.0.21

func (s *Access) GetUserPolicies(username string) (*UserPolicies, error)

func (*Access) IsSyncDisabled

func (s *Access) IsSyncDisabled() bool

func (*Access) Name

func (s *Access) Name() string

func (*Access) ResourceTypes

func (s *Access) ResourceTypes() []string

type Dns

type Dns struct {
	route53iface.Route53API
	// contains filtered or unexported fields
}

func (*Dns) Drivers

func (s *Dns) Drivers() []driver.Driver

func (*Dns) FetchByType

func (s *Dns) FetchByType(t string) (*graph.Graph, error)

func (*Dns) FetchResources

func (s *Dns) FetchResources() (*graph.Graph, error)

func (*Dns) IsSyncDisabled

func (s *Dns) IsSyncDisabled() bool

func (*Dns) Name

func (s *Dns) Name() string

func (*Dns) ResourceTypes

func (s *Dns) ResourceTypes() []string

type Identity added in v0.0.21

type Identity struct {
	Account, Arn, UserId, Username string
}

type Infra

type Infra struct {
	ec2iface.EC2API
	elbv2iface.ELBV2API
	rdsiface.RDSAPI
	autoscalingiface.AutoScalingAPI
	// contains filtered or unexported fields
}

func (*Infra) Drivers

func (s *Infra) Drivers() []driver.Driver

func (*Infra) FetchByType

func (s *Infra) FetchByType(t string) (*graph.Graph, error)

func (*Infra) FetchResources

func (s *Infra) FetchResources() (*graph.Graph, error)

func (*Infra) IsSyncDisabled

func (s *Infra) IsSyncDisabled() bool

func (*Infra) Name

func (s *Infra) Name() string

func (*Infra) ResourceTypes

func (s *Infra) ResourceTypes() []string

type Lambda added in v0.0.23

type Lambda struct {
	lambdaiface.LambdaAPI
	// contains filtered or unexported fields
}

func (*Lambda) Drivers added in v0.0.23

func (s *Lambda) Drivers() []driver.Driver

func (*Lambda) FetchByType added in v0.0.23

func (s *Lambda) FetchByType(t string) (*graph.Graph, error)

func (*Lambda) FetchResources added in v0.0.23

func (s *Lambda) FetchResources() (*graph.Graph, error)

func (*Lambda) IsSyncDisabled added in v0.0.23

func (s *Lambda) IsSyncDisabled() bool

func (*Lambda) Name added in v0.0.23

func (s *Lambda) Name() string

func (*Lambda) ResourceTypes added in v0.0.23

func (s *Lambda) ResourceTypes() []string

type Monitoring added in v0.0.23

type Monitoring struct {
	cloudwatchiface.CloudWatchAPI
	// contains filtered or unexported fields
}

func (*Monitoring) Drivers added in v0.0.23

func (s *Monitoring) Drivers() []driver.Driver

func (*Monitoring) FetchByType added in v0.0.23

func (s *Monitoring) FetchByType(t string) (*graph.Graph, error)

func (*Monitoring) FetchResources added in v0.0.23

func (s *Monitoring) FetchResources() (*graph.Graph, error)

func (*Monitoring) IsSyncDisabled added in v0.0.23

func (s *Monitoring) IsSyncDisabled() bool

func (*Monitoring) Name added in v0.0.23

func (s *Monitoring) Name() string

func (*Monitoring) ResourceTypes added in v0.0.23

func (s *Monitoring) ResourceTypes() []string

type Notification

type Notification struct {
	snsiface.SNSAPI
	// contains filtered or unexported fields
}

func (*Notification) Drivers

func (s *Notification) Drivers() []driver.Driver

func (*Notification) FetchByType

func (s *Notification) FetchByType(t string) (*graph.Graph, error)

func (*Notification) FetchResources

func (s *Notification) FetchResources() (*graph.Graph, error)

func (*Notification) IsSyncDisabled

func (s *Notification) IsSyncDisabled() bool

func (*Notification) Name

func (s *Notification) Name() string

func (*Notification) ResourceTypes

func (s *Notification) ResourceTypes() []string

type Queue

type Queue struct {
	sqsiface.SQSAPI
	// contains filtered or unexported fields
}

func (*Queue) Drivers

func (s *Queue) Drivers() []driver.Driver

func (*Queue) FetchByType

func (s *Queue) FetchByType(t string) (*graph.Graph, error)

func (*Queue) FetchResources

func (s *Queue) FetchResources() (*graph.Graph, error)

func (*Queue) IsSyncDisabled

func (s *Queue) IsSyncDisabled() bool

func (*Queue) Name

func (s *Queue) Name() string

func (*Queue) ResourceTypes

func (s *Queue) ResourceTypes() []string

type Storage

type Storage struct {
	s3iface.S3API
	// contains filtered or unexported fields
}

func (*Storage) Drivers

func (s *Storage) Drivers() []driver.Driver

func (*Storage) FetchByType

func (s *Storage) FetchByType(t string) (*graph.Graph, error)

func (*Storage) FetchResources

func (s *Storage) FetchResources() (*graph.Graph, error)

func (*Storage) IsSyncDisabled

func (s *Storage) IsSyncDisabled() bool

func (*Storage) Name

func (s *Storage) Name() string

func (*Storage) ResourceTypes

func (s *Storage) ResourceTypes() []string

type UserPolicies added in v0.0.21

type UserPolicies struct {
	Username string
	Inlined  []string
	Attached []string
	ByGroup  map[string][]string
}

Directories

Path Synopsis
DO NOT EDIT This file was automatically generated with go generate
DO NOT EDIT This file was automatically generated with go generate
DO NOT EDIT This file was automatically generated with go generate DO NOT EDIT This file was automatically generated with go generate DO NOT EDIT This file was automatically generated with go generate
DO NOT EDIT This file was automatically generated with go generate DO NOT EDIT This file was automatically generated with go generate DO NOT EDIT This file was automatically generated with go generate

Jump to

Keyboard shortcuts

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