analyzer

package
v0.0.0-...-88bddab Latest Latest
Warning

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

Go to latest
Published: Aug 6, 2024 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Analyzer

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

func NewAnalyzer

func NewAnalyzer(ec2Service *ec2.Client, rdsService *rds.Client) *Analyzer

func (*Analyzer) Analyze

func (analyzer *Analyzer) Analyze(ctx context.Context) error

type Connection

type Connection struct {
	Rule                Rule
	Source              Instance
	SourceSecurityGroup types.SecurityGroup
}

type EC2Instance

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

func NewEC2Instance

func NewEC2Instance(instance types.Instance, reservation types.Reservation) *EC2Instance

func (*EC2Instance) Id

func (ec2Instance *EC2Instance) Id() string

func (*EC2Instance) Name

func (ec2Instance *EC2Instance) Name() string

func (*EC2Instance) SecurityGroupIds

func (ec2Instance *EC2Instance) SecurityGroupIds() []string

func (*EC2Instance) String

func (ec2Instance *EC2Instance) String() string

func (*EC2Instance) Tag

func (ec2Instance *EC2Instance) Tag(name string) string

func (*EC2Instance) Type

func (ec2Instance *EC2Instance) Type() string

type Instance

type Instance interface {
	fmt.Stringer

	Type() string
	Id() string
	Name() string
	Tag(name string) string
	SecurityGroupIds() []string
}

type RDSInstance

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

func NewRDSInstance

func NewRDSInstance(instance rdsTypes.DBInstance) *RDSInstance

func (*RDSInstance) Id

func (rdsInstance *RDSInstance) Id() string

func (*RDSInstance) Name

func (rdsInstance *RDSInstance) Name() string

func (*RDSInstance) SecurityGroupIds

func (rdsInstance *RDSInstance) SecurityGroupIds() []string

func (*RDSInstance) String

func (rdsInstance *RDSInstance) String() string

func (*RDSInstance) Tag

func (rdsInstance *RDSInstance) Tag(name string) string

func (*RDSInstance) Type

func (rdsInstance *RDSInstance) Type() string

type Rule

type Rule struct {
	Type              string
	DeclaredBy        SecurityGroupDescriptor
	TrafficDescriptor TrafficDescriptor
	Description       string
}

func (Rule) String

func (rule Rule) String() string

type SecurityGroupDescriptor

type SecurityGroupDescriptor struct {
	GroupId   string
	GroupName string
}

type SecurityGroupReportEntry

type SecurityGroupReportEntry struct {
	SecurityGroup   types.SecurityGroup
	Descriptor      SecurityGroupDescriptor
	UsedBy          []Instance
	ReferencedBy    []Rule
	ReferenceErrors []SecurityGroupDescriptor
}

func (*SecurityGroupReportEntry) AddReferenceError

func (entry *SecurityGroupReportEntry) AddReferenceError(securityGroupDescriptor SecurityGroupDescriptor)

func (*SecurityGroupReportEntry) AddReferencedBy

func (entry *SecurityGroupReportEntry) AddReferencedBy(rule Rule)

func (*SecurityGroupReportEntry) AddUsedBy

func (entry *SecurityGroupReportEntry) AddUsedBy(instance Instance)

type TrafficDescriptor

type TrafficDescriptor struct {
	IpProtocol string
	FromPort   *int32
	ToPort     *int32
}

func (TrafficDescriptor) String

func (descriptor TrafficDescriptor) String() string

Jump to

Keyboard shortcuts

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