wireguard

package
v0.0.0-...-4bcbab6 Latest Latest
Warning

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

Go to latest
Published: Feb 12, 2021 License: MIT Imports: 16 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrNoIPAvailable = errors.New("no ip available")

ErrNoIPAvailable : Error if there is no ip left in the subnet

View Source
var ErrWrongSubnet = errors.New("wrong subnet for this ip address")

ErrWrongSubnet : Error if the subnet matches not the server

Functions

This section is empty.

Types

type Peer

type Peer struct {
	PrivateKey  wgtypes.Key
	PublicKey   wgtypes.Key
	IPV4Address net.IP
	IPV6Address net.IP
}

Peer : Wireguard Peer

type Service

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

Service : Service struct for wireguard

func (*Service) CreatePeer

func (w *Service) CreatePeer() (*Peer, error)

CreatePeer : Create a new wireguard device

type Wireguard

type Wireguard interface {
	CreatePeer() (*Peer, error)
}

Wireguard : Wireguard service interface

func NewService

func NewService(
	repo repository.Repository,
	hub *hub.Hub,
	logger *zap.Logger,
	config *config.Config,
) (Wireguard, error)

NewService : Create a new wireguard service

Jump to

Keyboard shortcuts

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