Versions in this module Expand all Collapse all v1 v1.0.0 Mar 23, 2020 Changes in this version + var EmptyPSK = [32]byte + func AnyError(errs ...error) bool + func FirstError(errs ...error) error + func GetConfigPath() string + func GetInstanceFromArg(path string) string + func GetKey(t *testing.T) []byte + type Config struct + Interface Interface + Peers []*Peer + func ParseConfig(instance string) (*Config, error) + func ParseConfigReader(config io.Reader) (*Config, error) + func (c *Config) Check() error + func (c *Config) GetPeer(publicKey string) *Peer + type IPMask struct + IP net.IP + Mask int + func (ip *IPMask) MarshalYAML() (interface{}, error) + func (ip *IPMask) UnmarshalYAML(f func(interface{}) error) error + func (ip IPMask) String() string + type IPNet net.IPNet + func GetSubnet(t *testing.T) IPNet + func (ip *IPNet) UnmarshalYAML(f func(interface{}) error) error + func (ip IPNet) MarshalYAML() (interface{}, error) + type Interface struct + Address *IPMask + Description string + FWMark int + ListenPort int + PostUp [][]string + PreDown [][]string + PrivateKey PrivateKey + SetUpRoutes *bool + type Key []byte + func ComputePublicKey(b []byte) Key + func (k *Key) Bytes() [wgtypes.KeyLen]byte + func (k *Key) String() string + func (k *Key) UnmarshalYAML(f func(interface{}) error) error + func (k Key) MarshalYAML() (interface{}, error) + type Peer struct + AllowedIPS []IPNet + Description string + Endpoint *UDPAddr + KeepaliveInterval time.Duration + PresharedKey *PresharedKey + PublicKey Key + type PresharedKey []byte + func GeneratePSK() (PresharedKey, error) + func GetPSK(t *testing.T) *PresharedKey + func (k *PresharedKey) Bytes() [wgtypes.KeyLen]byte + func (k *PresharedKey) String() string + func (k *PresharedKey) UnmarshalYAML(f func(interface{}) error) error + func (k PresharedKey) MarshalYAML() (interface{}, error) + type PrivateKey struct + Data [wgtypes.KeyLen]byte + Path string + func GeneratePrivateKey() (*PrivateKey, error) + func NewPrivateKey(bk []byte) PrivateKey + func (k *PrivateKey) Bytes() [wgtypes.KeyLen]byte + func (k *PrivateKey) String() string + func (k *PrivateKey) UnmarshalYAML(f func(interface{}) error) error + func (k PrivateKey) MarshalYAML() (interface{}, error) + type UDPAddr net.UDPAddr + func GetEndpoint(t *testing.T) *UDPAddr + func (ip *UDPAddr) UnmarshalYAML(f func(interface{}) error) error + func (ip UDPAddr) MarshalYAML() (interface{}, error)