|
|
@ -2,12 +2,11 @@
|
|
|
|
// Use of this source code is governed by a BSD-style
|
|
|
|
// Use of this source code is governed by a BSD-style
|
|
|
|
// license that can be found in the LICENSE file.
|
|
|
|
// license that can be found in the LICENSE file.
|
|
|
|
|
|
|
|
|
|
|
|
// AUTO-GENERATED by tailscale.com/cmd/cloner -type User,Node,NetInfo
|
|
|
|
// Code generated by tailscale.com/cmd/cloner -type User,Node,Hostinfo,NetInfo; DO NOT EDIT.
|
|
|
|
|
|
|
|
|
|
|
|
package tailcfg
|
|
|
|
package tailcfg
|
|
|
|
|
|
|
|
|
|
|
|
import (
|
|
|
|
import (
|
|
|
|
"github.com/tailscale/wireguard-go/wgcfg"
|
|
|
|
|
|
|
|
"time"
|
|
|
|
"time"
|
|
|
|
)
|
|
|
|
)
|
|
|
|
|
|
|
|
|
|
|
@ -19,8 +18,8 @@ func (src *User) Clone() *User {
|
|
|
|
}
|
|
|
|
}
|
|
|
|
dst := new(User)
|
|
|
|
dst := new(User)
|
|
|
|
*dst = *src
|
|
|
|
*dst = *src
|
|
|
|
dst.Logins = append([]LoginID(nil), src.Logins...)
|
|
|
|
dst.Logins = append(src.Logins[:0:0], src.Logins...)
|
|
|
|
dst.Roles = append([]RoleID(nil), src.Roles...)
|
|
|
|
dst.Roles = append(src.Roles[:0:0], src.Roles...)
|
|
|
|
return dst
|
|
|
|
return dst
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
@ -32,9 +31,9 @@ func (src *Node) Clone() *Node {
|
|
|
|
}
|
|
|
|
}
|
|
|
|
dst := new(Node)
|
|
|
|
dst := new(Node)
|
|
|
|
*dst = *src
|
|
|
|
*dst = *src
|
|
|
|
dst.Addresses = append([]wgcfg.CIDR(nil), src.Addresses...)
|
|
|
|
dst.Addresses = append(src.Addresses[:0:0], src.Addresses...)
|
|
|
|
dst.AllowedIPs = append([]wgcfg.CIDR(nil), src.AllowedIPs...)
|
|
|
|
dst.AllowedIPs = append(src.AllowedIPs[:0:0], src.AllowedIPs...)
|
|
|
|
dst.Endpoints = append([]string(nil), src.Endpoints...)
|
|
|
|
dst.Endpoints = append(src.Endpoints[:0:0], src.Endpoints...)
|
|
|
|
dst.Hostinfo = *src.Hostinfo.Clone()
|
|
|
|
dst.Hostinfo = *src.Hostinfo.Clone()
|
|
|
|
if dst.LastSeen != nil {
|
|
|
|
if dst.LastSeen != nil {
|
|
|
|
dst.LastSeen = new(time.Time)
|
|
|
|
dst.LastSeen = new(time.Time)
|
|
|
@ -43,6 +42,21 @@ func (src *Node) Clone() *Node {
|
|
|
|
return dst
|
|
|
|
return dst
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// Clone makes a deep copy of Hostinfo.
|
|
|
|
|
|
|
|
// The result aliases no memory with the original.
|
|
|
|
|
|
|
|
func (src *Hostinfo) Clone() *Hostinfo {
|
|
|
|
|
|
|
|
if src == nil {
|
|
|
|
|
|
|
|
return nil
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
dst := new(Hostinfo)
|
|
|
|
|
|
|
|
*dst = *src
|
|
|
|
|
|
|
|
dst.RoutableIPs = append(src.RoutableIPs[:0:0], src.RoutableIPs...)
|
|
|
|
|
|
|
|
dst.RequestTags = append(src.RequestTags[:0:0], src.RequestTags...)
|
|
|
|
|
|
|
|
dst.Services = append(src.Services[:0:0], src.Services...)
|
|
|
|
|
|
|
|
dst.NetInfo = src.NetInfo.Clone()
|
|
|
|
|
|
|
|
return dst
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
// Clone makes a deep copy of NetInfo.
|
|
|
|
// Clone makes a deep copy of NetInfo.
|
|
|
|
// The result aliases no memory with the original.
|
|
|
|
// The result aliases no memory with the original.
|
|
|
|
func (src *NetInfo) Clone() *NetInfo {
|
|
|
|
func (src *NetInfo) Clone() *NetInfo {
|
|
|
|