fixture

package
v1.29.0 Latest Latest
Warning

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

Go to latest
Published: Jan 17, 2024 License: Apache-2.0 Imports: 18 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AzureAllowSecurityRuleFixture

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

AzureAllowSecurityRuleFixture is a fixture for an allow security rule.

func (*AzureAllowSecurityRuleFixture) Build

func (*AzureAllowSecurityRuleFixture) WithDestination

func (f *AzureAllowSecurityRuleFixture) WithDestination(prefixes ...string) *AzureAllowSecurityRuleFixture

func (*AzureAllowSecurityRuleFixture) WithPriority

type AzureDenyAllSecurityRuleFixture

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

AzureDenyAllSecurityRuleFixture is a fixture for a deny-all security rule.

func (*AzureDenyAllSecurityRuleFixture) Build

func (*AzureDenyAllSecurityRuleFixture) WithDestination

func (*AzureDenyAllSecurityRuleFixture) WithPriority

type AzureFixture

type AzureFixture struct{}

func (*AzureFixture) AllowSecurityRule

func (f *AzureFixture) AllowSecurityRule(
	protocol network.SecurityRuleProtocol,
	ipFamily iputil.Family,
	srcPrefixes []string,
	dstPorts []int32,
) *AzureAllowSecurityRuleFixture

func (*AzureFixture) DenyAllSecurityRule

func (f *AzureFixture) DenyAllSecurityRule(ipFamily iputil.Family) *AzureDenyAllSecurityRuleFixture

func (*AzureFixture) LoadBalancer

func (f *AzureFixture) LoadBalancer() *AzureLoadBalancerFixture

func (*AzureFixture) NoiseSecurityRules

func (f *AzureFixture) NoiseSecurityRules(nRules int) []network.SecurityRule

NoiseSecurityRules returns N non cloud-provider-specific security rules. It's not random, but it's good enough for testing.

func (*AzureFixture) SecurityGroup

func (f *AzureFixture) SecurityGroup() *AzureSecurityGroupFixture

func (*AzureFixture) ServiceTag

func (f *AzureFixture) ServiceTag() string

func (*AzureFixture) ServiceTags

func (f *AzureFixture) ServiceTags(n int) []string

type AzureLoadBalancerFixture

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

func (*AzureLoadBalancerFixture) AdditionalAddresses

func (f *AzureLoadBalancerFixture) AdditionalAddresses() []string

func (*AzureLoadBalancerFixture) AdditionalIPv4Addresses

func (f *AzureLoadBalancerFixture) AdditionalIPv4Addresses() []string

func (*AzureLoadBalancerFixture) AdditionalIPv6Addresses

func (f *AzureLoadBalancerFixture) AdditionalIPv6Addresses() []string

func (*AzureLoadBalancerFixture) Addresses

func (f *AzureLoadBalancerFixture) Addresses() []string

func (*AzureLoadBalancerFixture) BackendPoolAddresses

func (f *AzureLoadBalancerFixture) BackendPoolAddresses() []string

func (*AzureLoadBalancerFixture) BackendPoolIPv4Addresses

func (f *AzureLoadBalancerFixture) BackendPoolIPv4Addresses() []string

func (*AzureLoadBalancerFixture) BackendPoolIPv6Addresses

func (f *AzureLoadBalancerFixture) BackendPoolIPv6Addresses() []string

func (*AzureLoadBalancerFixture) Build

func (*AzureLoadBalancerFixture) IPv4Addresses

func (f *AzureLoadBalancerFixture) IPv4Addresses() []string

func (*AzureLoadBalancerFixture) IPv6Addresses

func (f *AzureLoadBalancerFixture) IPv6Addresses() []string

type AzureSecurityGroupFixture

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

AzureSecurityGroupFixture is a fixture for an Azure security group.

func (*AzureSecurityGroupFixture) Build

func (*AzureSecurityGroupFixture) WithRules

type Fixture

type Fixture struct{}

func NewFixture

func NewFixture() *Fixture

func (*Fixture) Azure

func (f *Fixture) Azure() *AzureFixture

func (*Fixture) Kubernetes

func (f *Fixture) Kubernetes() *KubernetesFixture

func (*Fixture) RandomIPv4AddressStrings

func (f *Fixture) RandomIPv4AddressStrings(n int) []string

func (*Fixture) RandomIPv4Addresses

func (f *Fixture) RandomIPv4Addresses(n int) []netip.Addr

func (*Fixture) RandomIPv4PrefixStrings

func (f *Fixture) RandomIPv4PrefixStrings(n int) []string

func (*Fixture) RandomIPv4Prefixes

func (f *Fixture) RandomIPv4Prefixes(n int) []netip.Prefix

func (*Fixture) RandomIPv6AddressStrings

func (f *Fixture) RandomIPv6AddressStrings(n int) []string

func (*Fixture) RandomIPv6Addresses

func (f *Fixture) RandomIPv6Addresses(n int) []netip.Addr

func (*Fixture) RandomIPv6PrefixStrings

func (f *Fixture) RandomIPv6PrefixStrings(n int) []string

func (*Fixture) RandomIPv6Prefixes

func (f *Fixture) RandomIPv6Prefixes(n int) []netip.Prefix

func (*Fixture) RandomUint32

func (f *Fixture) RandomUint32(n uint32) uint32

func (*Fixture) RandomUint64

func (f *Fixture) RandomUint64(n uint64) uint64

type KubernetesFixture

type KubernetesFixture struct{}

func (*KubernetesFixture) Service

type KubernetesServiceFixture

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

func (*KubernetesServiceFixture) Build

func (f *KubernetesServiceFixture) Build() v1.Service

func (*KubernetesServiceFixture) TCPNodePorts

func (f *KubernetesServiceFixture) TCPNodePorts() []int32

func (*KubernetesServiceFixture) TCPPorts

func (f *KubernetesServiceFixture) TCPPorts() []int32

func (*KubernetesServiceFixture) UDPNodePorts

func (f *KubernetesServiceFixture) UDPNodePorts() []int32

func (*KubernetesServiceFixture) UDPPorts

func (f *KubernetesServiceFixture) UDPPorts() []int32

func (*KubernetesServiceFixture) WithAllowedIPRanges

func (f *KubernetesServiceFixture) WithAllowedIPRanges(parts ...string) *KubernetesServiceFixture

func (*KubernetesServiceFixture) WithAllowedServiceTags

func (f *KubernetesServiceFixture) WithAllowedServiceTags(parts ...string) *KubernetesServiceFixture

func (*KubernetesServiceFixture) WithDenyAllExceptLoadBalancerSourceRanges

func (f *KubernetesServiceFixture) WithDenyAllExceptLoadBalancerSourceRanges() *KubernetesServiceFixture

func (*KubernetesServiceFixture) WithInternalEnabled

func (f *KubernetesServiceFixture) WithInternalEnabled() *KubernetesServiceFixture

func (*KubernetesServiceFixture) WithLoadBalancerSourceRanges

func (f *KubernetesServiceFixture) WithLoadBalancerSourceRanges(parts ...string) *KubernetesServiceFixture

Jump to

Keyboard shortcuts

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