Documentation
¶
Overview ¶
Package vnet provides an in-memory mock implementation of Azure Virtual Network.
Index ¶
- type Mock
- func (m *Mock) AddEgressRule(_ context.Context, groupID string, rule driver.SecurityRule) error
- func (m *Mock) AddIngressRule(_ context.Context, groupID string, rule driver.SecurityRule) error
- func (m *Mock) CreateSecurityGroup(_ context.Context, cfg driver.SecurityGroupConfig) (*driver.SecurityGroupInfo, error)
- func (m *Mock) CreateSubnet(_ context.Context, cfg driver.SubnetConfig) (*driver.SubnetInfo, error)
- func (m *Mock) CreateVPC(_ context.Context, cfg driver.VPCConfig) (*driver.VPCInfo, error)
- func (m *Mock) DeleteSecurityGroup(_ context.Context, id string) error
- func (m *Mock) DeleteSubnet(_ context.Context, id string) error
- func (m *Mock) DeleteVPC(_ context.Context, id string) error
- func (m *Mock) DescribeSecurityGroups(_ context.Context, ids []string) ([]driver.SecurityGroupInfo, error)
- func (m *Mock) DescribeSubnets(_ context.Context, ids []string) ([]driver.SubnetInfo, error)
- func (m *Mock) DescribeVPCs(_ context.Context, ids []string) ([]driver.VPCInfo, error)
- func (m *Mock) RemoveEgressRule(_ context.Context, groupID string, rule driver.SecurityRule) error
- func (m *Mock) RemoveIngressRule(_ context.Context, groupID string, rule driver.SecurityRule) error
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 (*Mock) AddEgressRule ¶
AddEgressRule adds an outbound security rule to the specified network security group.
func (*Mock) AddIngressRule ¶
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) DeleteSecurityGroup ¶
DeleteSecurityGroup deletes the network security group with the given ID.
func (*Mock) DeleteSubnet ¶
DeleteSubnet deletes the subnet 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 ¶
DescribeSubnets returns subnets matching the given IDs, or all if ids is empty.
func (*Mock) DescribeVPCs ¶
DescribeVPCs returns virtual networks matching the given IDs, or all if ids is empty.
func (*Mock) RemoveEgressRule ¶
RemoveEgressRule removes a matching outbound rule from the specified network security group.
func (*Mock) RemoveIngressRule ¶
RemoveIngressRule removes a matching inbound rule from the specified network security group.