test

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Dec 24, 2023 License: Apache-2.0 Imports: 18 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func BenchmarkIPv4AddAndRemove

func BenchmarkIPv4AddAndRemove(b *testing.B)

func BenchmarkIPv4Ceiling

func BenchmarkIPv4Ceiling(b *testing.B)

func BenchmarkIPv4Contains

func BenchmarkIPv4Contains(b *testing.B)

func BenchmarkIPv4ElementContains

func BenchmarkIPv4ElementContains(b *testing.B)

func BenchmarkIPv4ElementNotContains

func BenchmarkIPv4ElementNotContains(b *testing.B)

func BenchmarkIPv4ElementsContainedBy

func BenchmarkIPv4ElementsContainedBy(b *testing.B)

func BenchmarkIPv4ElementsContaining

func BenchmarkIPv4ElementsContaining(b *testing.B)

func BenchmarkIPv4Floor

func BenchmarkIPv4Floor(b *testing.B)

func BenchmarkIPv4LongestPrefixMatch

func BenchmarkIPv4LongestPrefixMatch(b *testing.B)

func BenchmarkIPv4LongestPrefixNoMatch

func BenchmarkIPv4LongestPrefixNoMatch(b *testing.B)

func BenchmarkIPv4NotContains

func BenchmarkIPv4NotContains(b *testing.B)

func BenchmarkIPv4ShortestPrefixMatch

func BenchmarkIPv4ShortestPrefixMatch(b *testing.B)

func BenchmarkIPv4ShortestPrefixNoMatch

func BenchmarkIPv4ShortestPrefixNoMatch(b *testing.B)

func BenchmarkIPv6AddAndRemove

func BenchmarkIPv6AddAndRemove(b *testing.B)

func BenchmarkIPv6Ceiling

func BenchmarkIPv6Ceiling(b *testing.B)

func BenchmarkIPv6Contains

func BenchmarkIPv6Contains(b *testing.B)

func BenchmarkIPv6ElementContains

func BenchmarkIPv6ElementContains(b *testing.B)

func BenchmarkIPv6ElementNotContains

func BenchmarkIPv6ElementNotContains(b *testing.B)

func BenchmarkIPv6ElementsContainedBy

func BenchmarkIPv6ElementsContainedBy(b *testing.B)

func BenchmarkIPv6ElementsContaining

func BenchmarkIPv6ElementsContaining(b *testing.B)

func BenchmarkIPv6Floor

func BenchmarkIPv6Floor(b *testing.B)

func BenchmarkIPv6LongestPrefixMatch

func BenchmarkIPv6LongestPrefixMatch(b *testing.B)

func BenchmarkIPv6LongestPrefixNoMatch

func BenchmarkIPv6LongestPrefixNoMatch(b *testing.B)

func BenchmarkIPv6NotContains

func BenchmarkIPv6NotContains(b *testing.B)

func BenchmarkIPv6ShortestPrefixMatch

func BenchmarkIPv6ShortestPrefixMatch(b *testing.B)

func BenchmarkIPv6ShortestPrefixNoMatch

func BenchmarkIPv6ShortestPrefixNoMatch(b *testing.B)

func NewAssociativeAddressGenericTrie

func NewAssociativeAddressGenericTrie[V any]() *goip.AssociativeTrie[*goip.Address, V]

func NewIPv4AddressAssociativeGenericTrie

func NewIPv4AddressAssociativeGenericTrie[V any]() *goip.AssociativeTrie[*goip.Address, V]

func NewIPv6AddressAssociativeGenericTrie

func NewIPv6AddressAssociativeGenericTrie[V any]() *goip.AssociativeTrie[*goip.Address, V]

func Test

func Test(isLimited bool)

func TestTrieCreation

func TestTrieCreation(t *testing.T)

func ToPort

func ToPort(i goip.PortInt) goip.Port

Types

type AddrConstraint

type AddrConstraint[T goip.KeyConstraint[T]] interface {
	goip.GenericKeyConstraint[T]
	goip.AddressType
}

type AddressKey

type AddressKey = goip.Key[*goip.Address]

type AddressTrie

type AddressTrie = goip.AddressTrie

func NewAddressGenericTrie

func NewAddressGenericTrie() *AddressTrie

func NewIPv4AddressGenericTrie

func NewIPv4AddressGenericTrie() *AddressTrie

func NewIPv6AddressGenericTrie

func NewIPv6AddressGenericTrie() *AddressTrie

type AddressTrieNode

type AddressTrieNode = goip.TrieNode[*goip.Address]

type ExpectedPrefixes

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

type IPAddressActionAdapter

type IPAddressActionAdapter struct {
	Adapted func(*goip.Address)
}

IPAddressActionAdapter has methods to supply IP, IPv4, and IPv6 addresses to a wrapped consumer function that takes Address arguments

func (IPAddressActionAdapter) IPAction

func (a IPAddressActionAdapter) IPAction(addr *goip.IPAddress)

IPAction calls the wrapped consumer function with the given IP address as the argument

func (IPAddressActionAdapter) IPv4Action

func (a IPAddressActionAdapter) IPv4Action(addr *goip.IPv4Address)

IPv4Action calls the wrapped consumer function with the given IPv4 address as the argument

func (IPAddressActionAdapter) IPv6Action

func (a IPAddressActionAdapter) IPv6Action(addr *goip.IPv6Address)

IPv6Action calls the wrapped consumer function with the given IPv6 address as the argument

type IPAddressPredicateAdapter

type IPAddressPredicateAdapter struct {
	Adapted func(*goip.Address) bool
}

IPAddressPredicateAdapter has methods to supply IP, IPv4, and IPv6 addresses to a wrapped predicate function that takes Address arguments

func (IPAddressPredicateAdapter) IPPredicate

func (a IPAddressPredicateAdapter) IPPredicate(addr *goip.IPAddress) bool

IPPredicate calls the wrapped predicate function with the given IP address as the argument

func (IPAddressPredicateAdapter) IPv4Predicate

func (a IPAddressPredicateAdapter) IPv4Predicate(addr *goip.IPv4Address) bool

IPv4Predicate calls the wrapped predicate function with the given IPv4 address as the argument

func (IPAddressPredicateAdapter) IPv6Predicate

func (a IPAddressPredicateAdapter) IPv6Predicate(addr *goip.IPv6Address) bool

IPv6Predicate calls the wrapped predicate function with the given IPv6 address as the argument

type Ordering

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

func (*Ordering) CompareTo

func (o *Ordering) CompareTo(other *Ordering) int

type OrderingComparator

type OrderingComparator func(one, two *Ordering) int

type OrderingSupplier

type OrderingSupplier func(string, int) *Ordering

Jump to

Keyboard shortcuts

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