vpc

package
v1.1.1 Latest Latest
Warning

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

Go to latest
Published: Mar 19, 2026 License: MIT Imports: 6 Imported by: 0

Documentation

Overview

Package vpc provides an in-memory mock implementation of AWS VPC networking.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Mock

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

Mock is an in-memory mock implementation of the AWS VPC networking service.

func New

func New(opts *config.Options) *Mock

New creates a new VPC mock with the given configuration options.

func (*Mock) AddEgressRule

func (m *Mock) AddEgressRule(_ context.Context, groupID string, rule driver.SecurityRule) error

AddEgressRule adds an egress rule to the specified security group.

func (*Mock) AddIngressRule

func (m *Mock) AddIngressRule(_ context.Context, groupID string, rule driver.SecurityRule) error

AddIngressRule adds an ingress rule to the specified security group.

func (*Mock) CreateSecurityGroup

func (m *Mock) CreateSecurityGroup(_ context.Context, cfg driver.SecurityGroupConfig) (*driver.SecurityGroupInfo, error)

CreateSecurityGroup creates a new security group with the given configuration.

func (*Mock) CreateSubnet

func (m *Mock) CreateSubnet(_ context.Context, cfg driver.SubnetConfig) (*driver.SubnetInfo, error)

CreateSubnet creates a new subnet with the given configuration.

func (*Mock) CreateVPC

func (m *Mock) CreateVPC(_ context.Context, cfg driver.VPCConfig) (*driver.VPCInfo, error)

CreateVPC creates a new VPC with the given configuration.

func (*Mock) DeleteSecurityGroup

func (m *Mock) DeleteSecurityGroup(_ context.Context, id string) error

DeleteSecurityGroup deletes the security group with the given ID.

func (*Mock) DeleteSubnet

func (m *Mock) DeleteSubnet(_ context.Context, id string) error

DeleteSubnet deletes the subnet with the given ID.

func (*Mock) DeleteVPC

func (m *Mock) DeleteVPC(_ context.Context, id string) error

DeleteVPC deletes the VPC with the given ID.

func (*Mock) DescribeSecurityGroups

func (m *Mock) DescribeSecurityGroups(_ context.Context, ids []string) ([]driver.SecurityGroupInfo, error)

DescribeSecurityGroups returns security groups matching the given IDs, or all if ids is empty.

func (*Mock) DescribeSubnets

func (m *Mock) DescribeSubnets(_ context.Context, ids []string) ([]driver.SubnetInfo, error)

DescribeSubnets returns subnets matching the given IDs, or all subnets if ids is empty.

func (*Mock) DescribeVPCs

func (m *Mock) DescribeVPCs(_ context.Context, ids []string) ([]driver.VPCInfo, error)

DescribeVPCs returns VPCs matching the given IDs, or all VPCs if ids is empty.

func (*Mock) RemoveEgressRule

func (m *Mock) RemoveEgressRule(_ context.Context, groupID string, rule driver.SecurityRule) error

RemoveEgressRule removes a matching egress rule from the specified security group.

func (*Mock) RemoveIngressRule

func (m *Mock) RemoveIngressRule(_ context.Context, groupID string, rule driver.SecurityRule) error

RemoveIngressRule removes a matching ingress rule from the specified security group.

Jump to

Keyboard shortcuts

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