Documentation ¶
Index ¶
- Constants
- Variables
- func AllRegions() []string
- func InitServices(region, profile string) error
- func InitSession(region, profile string) (*session.Session, error)
- func IsValidRegion(given string) bool
- type Access
- func (s *Access) FetchByType(t string) (*graph.Graph, error)
- func (s *Access) FetchResources() (*graph.Graph, error)
- func (s *Access) Name() string
- func (s *Access) Provider() string
- func (s *Access) ProviderAPI() string
- func (s *Access) ProviderRunnableAPI() interface{}
- func (s *Access) ResourceTypes() (all []string)
- type Infra
- func (s *Infra) FetchByType(t string) (*graph.Graph, error)
- func (s *Infra) FetchResources() (*graph.Graph, error)
- func (s *Infra) Name() string
- func (s *Infra) Provider() string
- func (s *Infra) ProviderAPI() string
- func (s *Infra) ProviderRunnableAPI() interface{}
- func (s *Infra) ResourceTypes() (all []string)
- type Notification
- func (s *Notification) FetchByType(t string) (*graph.Graph, error)
- func (s *Notification) FetchResources() (*graph.Graph, error)
- func (s *Notification) Name() string
- func (s *Notification) Provider() string
- func (s *Notification) ProviderAPI() string
- func (s *Notification) ProviderRunnableAPI() interface{}
- func (s *Notification) ResourceTypes() (all []string)
- type Security
- type Storage
- func (s *Storage) FetchByType(t string) (*graph.Graph, error)
- func (s *Storage) FetchResources() (*graph.Graph, error)
- func (s *Storage) Name() string
- func (s *Storage) Provider() string
- func (s *Storage) ProviderAPI() string
- func (s *Storage) ProviderRunnableAPI() interface{}
- func (s *Storage) ResourceTypes() (all []string)
Constants ¶
View Source
const ( PARENT_OF = iota // default APPLIES_ON DEPENDING_ON )
Variables ¶
View Source
var DefaultAMIUsers = []string{"ec2-user", "ubuntu", "centos", "bitnami", "admin", "root"}
View Source
var ErrFieldNotFound = errors.New("aws struct field not found")
View Source
var ErrTagNotFound = errors.New("aws tag key not found")
View Source
var ResourceTypesPerAPI = map[string][]string{
"ec2": {
"instance",
"subnet",
"vpc",
"keypair",
"securitygroup",
"volume",
"internetgateway",
"routetable",
},
"iam": {
"user",
"group",
"role",
"policy",
},
"s3": {
"bucket",
"storageobject",
},
"sns": {
"subscription",
"topic",
},
}
View Source
var ServiceNames = []string{}
View Source
var ServicePerAPI = map[string]string{
"ec2": "infra",
"iam": "access",
"s3": "storage",
"sns": "notification",
}
View Source
var ServicePerResourceType = map[string]string{
"instance": "infra",
"subnet": "infra",
"vpc": "infra",
"keypair": "infra",
"securitygroup": "infra",
"volume": "infra",
"internetgateway": "infra",
"routetable": "infra",
"user": "access",
"group": "access",
"role": "access",
"policy": "access",
"bucket": "storage",
"storageobject": "storage",
"subscription": "notification",
"topic": "notification",
}
Functions ¶
func AllRegions ¶
func AllRegions() []string
func InitServices ¶
func IsValidRegion ¶
Types ¶
type Access ¶
func (*Access) ProviderAPI ¶
func (*Access) ProviderRunnableAPI ¶
func (s *Access) ProviderRunnableAPI() interface{}
func (*Access) ResourceTypes ¶
type Infra ¶
func (*Infra) ProviderAPI ¶
func (*Infra) ProviderRunnableAPI ¶
func (s *Infra) ProviderRunnableAPI() interface{}
func (*Infra) ResourceTypes ¶
type Notification ¶
func NewNotification ¶
func NewNotification(sess *session.Session) *Notification
func (*Notification) FetchByType ¶
func (s *Notification) FetchByType(t string) (*graph.Graph, error)
func (*Notification) FetchResources ¶
func (s *Notification) FetchResources() (*graph.Graph, error)
func (*Notification) Name ¶
func (s *Notification) Name() string
func (*Notification) Provider ¶
func (s *Notification) Provider() string
func (*Notification) ProviderAPI ¶
func (s *Notification) ProviderAPI() string
func (*Notification) ProviderRunnableAPI ¶
func (s *Notification) ProviderRunnableAPI() interface{}
func (*Notification) ResourceTypes ¶
func (s *Notification) ResourceTypes() (all []string)
type Security ¶
type Security interface { stsiface.STSAPI GetUserId() (string, error) GetAccountId() (string, error) }
type Storage ¶
func NewStorage ¶
func (*Storage) ProviderAPI ¶
func (*Storage) ProviderRunnableAPI ¶
func (s *Storage) ProviderRunnableAPI() interface{}
func (*Storage) ResourceTypes ¶
Click to show internal directories.
Click to hide internal directories.