Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type WireGuardHandler ¶
type WireGuardHandler struct {
// contains filtered or unexported fields
}
WireGuardHandler provides an interface to the WireGuard client.
func NewWireGuardHandler ¶
func NewWireGuardHandler() (*WireGuardHandler, error)
New initializes a new WireGuardHandler.
No parameters. Returns a pointer to a WireGuardHandler and an error.
func (*WireGuardHandler) SetKey ¶
func (wg *WireGuardHandler) SetKey(interfaceName, peerPublicKey, pskString string) error
SetKey sets the preshared key for a WireGuard device.
Parameters: - interfaceName: the name of the WireGuard interface. - peerPublicKey: the public key of the peer. - pskString: the preshared key as a string.
Returns: - error: an error if any occurred during the process.
Click to show internal directories.
Click to hide internal directories.