introduce mapper package

The mapper package contains functions related to creating and marshalling
reponses to machines.

Signed-off-by: Kristoffer Dalby <kristoffer@tailscale.com>
This commit is contained in:
Kristoffer Dalby 2023-05-26 11:26:34 +01:00 committed by Kristoffer Dalby
parent 699655a93f
commit f7f472ae07
18 changed files with 780 additions and 1063 deletions

View file

@ -80,7 +80,7 @@ type Headscale struct {
dbString string
dbType string
dbDebug bool
privateKey *key.MachinePrivate
privateKey2019 *key.MachinePrivate
noisePrivateKey *key.MachinePrivate
DERPMap *tailcfg.DERPMap
@ -166,7 +166,7 @@ func NewHeadscale(cfg *Config) (*Headscale, error) {
cfg: cfg,
dbType: cfg.DBtype,
dbString: dbString,
privateKey: privateKey,
privateKey2019: privateKey,
noisePrivateKey: noisePrivateKey,
aclRules: tailcfg.FilterAllowAll, // default allowall
registrationCache: registrationCache,