Documentation
¶
Overview ¶
Package gcpvpc provides an in-memory mock implementation of Google Cloud VPC networking.
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 GCP VPC networking.
func (*Mock) AddEgressRule ¶
AddEgressRule adds an egress rule to the specified firewall rule group.
func (*Mock) AddIngressRule ¶
AddIngressRule adds an ingress rule to the specified firewall rule group.
func (*Mock) CreateSecurityGroup ¶
func (m *Mock) CreateSecurityGroup(_ context.Context, cfg driver.SecurityGroupConfig) (*driver.SecurityGroupInfo, error)
CreateSecurityGroup creates a new firewall rule group.
func (*Mock) CreateSubnet ¶
func (m *Mock) CreateSubnet(_ context.Context, cfg driver.SubnetConfig) (*driver.SubnetInfo, error)
CreateSubnet creates a new subnetwork.
func (*Mock) DeleteSecurityGroup ¶
DeleteSecurityGroup deletes the firewall rule group with the given ID.
func (*Mock) DeleteSubnet ¶
DeleteSubnet deletes the subnetwork with the given ID.
func (*Mock) DescribeSecurityGroups ¶
func (m *Mock) DescribeSecurityGroups(_ context.Context, ids []string) ([]driver.SecurityGroupInfo, error)
DescribeSecurityGroups returns firewall rule groups matching the given IDs, or all if ids is empty.
func (*Mock) DescribeSubnets ¶
DescribeSubnets returns subnets matching the given IDs, or all subnets if ids is empty.
func (*Mock) DescribeVPCs ¶
DescribeVPCs returns VPCs matching the given IDs, or all VPCs if ids is empty.
func (*Mock) RemoveEgressRule ¶
RemoveEgressRule removes a matching egress rule from the specified firewall rule group.
func (*Mock) RemoveIngressRule ¶
RemoveIngressRule removes a matching ingress rule from the specified firewall rule group.