awsvpc

package
v0.7.1 Latest Latest
Warning

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

Go to latest
Published: Jan 14, 2025 License: Apache-2.0 Imports: 16 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AWSNACLAnalyzer

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

AWSNACLAnalyzer implements commonvpc.SpecificNACLAnalyzer

func NewAWSNACLAnalyzer

func NewAWSNACLAnalyzer(nacl *types.NetworkAcl) *AWSNACLAnalyzer

func (*AWSNACLAnalyzer) GetNACLRule

func (na *AWSNACLAnalyzer) GetNACLRule(index int) (ruleStr string, ruleRes *commonvpc.NACLRule, isIngress bool, err error)

GetNACLRule gets index of the rule and returns the rule results line and obj

func (*AWSNACLAnalyzer) GetNACLRules

func (na *AWSNACLAnalyzer) GetNACLRules() (ingressRules, egressRules []*commonvpc.NACLRule, err error)

GetNACLRules returns ingress and egress rule objects

func (*AWSNACLAnalyzer) GetNumberOfRules

func (na *AWSNACLAnalyzer) GetNumberOfRules() int

return number of ingress and egress rules

func (*AWSNACLAnalyzer) Name

func (na *AWSNACLAnalyzer) Name() *string

func (*AWSNACLAnalyzer) ReferencedIPblocks

func (na *AWSNACLAnalyzer) ReferencedIPblocks() []*netset.IPBlock

func (*AWSNACLAnalyzer) SetReferencedIPblocks

func (na *AWSNACLAnalyzer) SetReferencedIPblocks(referencedIPblocks []*netset.IPBlock)

SetReferencedIPblocks updates referenced ip blocks

type AWSSGAnalyzer

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

AWSSGAnalyzer implements commonvpc.SpecificSGAnalyzer

func NewAWSSGAnalyzer

func NewAWSSGAnalyzer(sg *types.SecurityGroup) *AWSSGAnalyzer

func (*AWSSGAnalyzer) GetNumberOfRules

func (sga *AWSSGAnalyzer) GetNumberOfRules() int

GetNumberOfRules returns number of egress and ingress rules of the securityGroup obj in AWSSGAnalyzer

func (*AWSSGAnalyzer) GetSGRule

func (sga *AWSSGAnalyzer) GetSGRule(index int) (
	ruleStr string, ruleRes *commonvpc.SGRule, isIngress bool, err error)

GetSGRule gets index of the rule and returns the rule results line and obj

func (*AWSSGAnalyzer) GetSGRules

func (sga *AWSSGAnalyzer) GetSGRules() (ingressRules, egressRules []*commonvpc.SGRule, err error)

GetSGRules returns ingress and egress rule objects

func (*AWSSGAnalyzer) Name

func (sga *AWSSGAnalyzer) Name() *string

func (*AWSSGAnalyzer) ReferencedIPblocks

func (sga *AWSSGAnalyzer) ReferencedIPblocks() []*netset.IPBlock

ReferencedIPblocks returns referencedIPblocks filed

func (*AWSSGAnalyzer) SetSGmap

func (sga *AWSSGAnalyzer) SetSGmap(sgMap map[string]*commonvpc.SecurityGroup)

SetSGmap gets sgMap (a map from sg groupID to SecurityGroup obj) and save it in AWSSGAnalyzer

type AWSresourcesContainer

type AWSresourcesContainer struct {
	aws.ResourcesContainer
}

AWSresourcesContainer implements commonvpc.ResourceContainer

func CopyAWSresourcesContainer added in v0.7.0

func CopyAWSresourcesContainer(rc common.ResourcesContainerInf) (*AWSresourcesContainer, error)

func NewAWSresourcesContainer

func NewAWSresourcesContainer() *AWSresourcesContainer

NewAWSresourcesContainer is used to return empty NewAWSresourcesContainer and also initialize vpcmodel.NetworkAddressLists with aws Public internet and service network if you do not use this function, you need to initialize vpcmodel.NetworkAddressLists

func (*AWSresourcesContainer) ParseResourcesFromFile

func (rc *AWSresourcesContainer) ParseResourcesFromFile(fileName string) error

parseResourcesFromFile returns aws.ResourcesContainer object, containing the configured resources structs from the input JSON file

func (*AWSresourcesContainer) VPCConfigsFromResources

func (rc *AWSresourcesContainer) VPCConfigsFromResources(resourceGroup string, vpcIDs, regions []string) (
	*vpcmodel.MultipleVPCConfigs, error)

VPCConfigsFromResources returns a map from VPC UID (string) to its corresponding VPCConfig object, containing the parsed resources in the relevant model objects

func (*AWSresourcesContainer) VpcConfigsFromFiles

func (rc *AWSresourcesContainer) VpcConfigsFromFiles(fileNames []string, resourceGroup string, vpcIDs, regions []string) (
	*vpcmodel.MultipleVPCConfigs, error)

VpcConfigsFromFiles gets file names and returns vpc configs from it vpcID, resourceGroup and regions are used to filter the vpc configs. resourceGroup nad regions are not supported yet for aws

type InternetGateway

type InternetGateway struct {
	vpcmodel.VPCResource
	// contains filtered or unexported fields
}

func (*InternetGateway) AllowedConnectivity

func (igw *InternetGateway) AllowedConnectivity(src, dst vpcmodel.VPCResourceIntf) (*netset.TransportSet, error)

func (*InternetGateway) Destinations

func (igw *InternetGateway) Destinations() []vpcmodel.Node

func (*InternetGateway) ExternalIP

func (igw *InternetGateway) ExternalIP() string

func (*InternetGateway) GenerateDrawioTreeNode

func (igw *InternetGateway) GenerateDrawioTreeNode(gen *vpcmodel.DrawioGenerator) drawio.TreeNodeInterface

func (*InternetGateway) IsMultipleVPCs added in v0.6.1

func (igw *InternetGateway) IsMultipleVPCs() bool

func (*InternetGateway) RouterDefined

func (igw *InternetGateway) RouterDefined(src, dst vpcmodel.Node) bool

func (*InternetGateway) RulesInConnectivity

func (igw *InternetGateway) RulesInConnectivity(src, dst vpcmodel.Node) []vpcmodel.RulesInTable

func (*InternetGateway) SetExternalDestinations

func (igw *InternetGateway) SetExternalDestinations(destinations []vpcmodel.Node)

func (*InternetGateway) ShowOnSubnetMode

func (igw *InternetGateway) ShowOnSubnetMode() bool

func (*InternetGateway) Sources

func (igw *InternetGateway) Sources() []vpcmodel.Node

func (*InternetGateway) SourcesSubnets

func (igw *InternetGateway) SourcesSubnets() []vpcmodel.Subnet

func (*InternetGateway) StringOfRouterRules

func (igw *InternetGateway) StringOfRouterRules(listRulesInFilter []vpcmodel.RulesInTable,
	verbose bool) (string, error)

func (*InternetGateway) VPC

Jump to

Keyboard shortcuts

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