vnet

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 vnet provides an in-memory mock implementation of Azure Virtual Network.

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 Azure Virtual Network service.

func New

func New(opts *config.Options) *Mock

New creates a new Azure Virtual Network mock.

func (*Mock) AddEgressRule

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

AddEgressRule adds an outbound security rule to the specified network security group.

func (*Mock) AddIngressRule

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

AddIngressRule adds an inbound security rule to the specified network security group.

func (*Mock) CreateSecurityGroup

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

CreateSecurityGroup creates a new network security group.

func (*Mock) CreateSubnet

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

CreateSubnet creates a new subnet within a virtual network.

func (*Mock) CreateVPC

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

CreateVPC creates a new virtual network with the given configuration.

func (*Mock) DeleteSecurityGroup

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

DeleteSecurityGroup deletes the network 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 virtual network 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 if ids is empty.

func (*Mock) DescribeVPCs

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

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

func (*Mock) RemoveEgressRule

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

RemoveEgressRule removes a matching outbound rule from the specified network security group.

func (*Mock) RemoveIngressRule

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

RemoveIngressRule removes a matching inbound rule from the specified network security group.

Jump to

Keyboard shortcuts

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