facts

package
v0.14.3 Latest Latest
Warning

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

Go to latest
Published: Feb 9, 2024 License: AGPL-3.0 Imports: 6 Imported by: 0

Documentation

Overview

Package facts provides helper code for generating facts for use in unit tests.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AliveFact added in v0.9.0

func AliveFact(peer *wgtypes.Key, expires time.Time) *fact.Fact

AliveFact generates an alive fact for the peer, with a zero boot ID

func AliveFactFull added in v0.9.1

func AliveFactFull(peer *wgtypes.Key, expires time.Time, bootID uuid.UUID) *fact.Fact

AliveFactFull generates an alive fact for the peer, with the given boot ID

func AllowedIPFactFull

func AllowedIPFactFull(aip net.IPNet, peer *wgtypes.Key, expires time.Time) *fact.Fact

AllowedIPFactFull wraps an IPNet in a Fact, with all fields filled

func EndpointFact

func EndpointFact(ep *net.UDPAddr) *fact.Fact

EndpointFact wraps a UDPAddr in a Fact, with just the Attribute and Value filled

func EndpointFactFull

func EndpointFactFull(ep *net.UDPAddr, peer *wgtypes.Key, expires time.Time) *fact.Fact

EndpointFactFull wraps a UDPAddr in a Fact, with all fields filled

func EndpointValue

func EndpointValue(ep *net.UDPAddr) *fact.IPPortValue

EndpointValue wraps a UDPAddr in an IPPortValue

func MemberFactFull added in v0.9.0

func MemberFactFull(peer *wgtypes.Key, expires time.Time) *fact.Fact

MemberFactFull returns a membership fact for the given peer. Deprecated: AttributeMember should not be generated any more

func MemberMetadataFactEmpty added in v0.13.0

func MemberMetadataFactEmpty(peer *wgtypes.Key, expires time.Time) *fact.Fact

MemberMetadataFactEmpty returns a member metadata fact for the given peer

func MemberMetadataFactFull added in v0.11.2

func MemberMetadataFactFull(peer *wgtypes.Key, expires time.Time, name string, basic bool) *fact.Fact

MemberMetadataFactFull returns a member metadata fact for the given peer

Types

This section is empty.

Jump to

Keyboard shortcuts

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