Documentation ¶
Overview ¶
Package facts provides helper code for generating facts for use in unit tests.
Index ¶
- func AliveFact(peer *wgtypes.Key, expires time.Time) *fact.Fact
- func AliveFactFull(peer *wgtypes.Key, expires time.Time, bootID uuid.UUID) *fact.Fact
- func AllowedIPFactFull(aip net.IPNet, peer *wgtypes.Key, expires time.Time) *fact.Fact
- func EndpointFact(ep *net.UDPAddr) *fact.Fact
- func EndpointFactFull(ep *net.UDPAddr, peer *wgtypes.Key, expires time.Time) *fact.Fact
- func EndpointValue(ep *net.UDPAddr) *fact.IPPortValue
- func MemberFactFull(peer *wgtypes.Key, expires time.Time) *fact.Fact
- func MemberMetadataFactEmpty(peer *wgtypes.Key, expires time.Time) *fact.Fact
- func MemberMetadataFactFull(peer *wgtypes.Key, expires time.Time, name string, basic bool) *fact.Fact
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AliveFact ¶ added in v0.9.0
AliveFact generates an alive fact for the peer, with a zero boot ID
func AliveFactFull ¶ added in v0.9.1
AliveFactFull generates an alive fact for the peer, with the given boot ID
func AllowedIPFactFull ¶
AllowedIPFactFull wraps an IPNet in a Fact, with all fields filled
func EndpointFact ¶
EndpointFact wraps a UDPAddr in a Fact, with just the Attribute and Value filled
func EndpointFactFull ¶
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
MemberFactFull returns a membership fact for the given peer. Deprecated: AttributeMember should not be generated any more
func MemberMetadataFactEmpty ¶ added in v0.13.0
MemberMetadataFactEmpty returns a member metadata fact for the given peer
Types ¶
This section is empty.