@ -2,12 +2,13 @@
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
// Code generated by tailscale.com/cmd/cloner -type User,Node,Hostinfo,NetInfo,Login,DNSConfig, DNSResolver, RegisterResponse,DERPRegion,DERPMap,DERPNode; DO NOT EDIT.
// Code generated by tailscale.com/cmd/cloner -type User,Node,Hostinfo,NetInfo,Login,DNSConfig, RegisterResponse,DERPRegion,DERPMap,DERPNode; DO NOT EDIT.
package tailcfg
import (
"inet.af/netaddr"
"tailscale.com/types/dnstype"
"tailscale.com/types/opt"
"tailscale.com/types/structs"
"time"
@ -26,7 +27,7 @@ func (src *User) Clone() *User {
}
// A compilation failure here means this code must be regenerated, with command:
// tailscale.com/cmd/cloner -type User,Node,Hostinfo,NetInfo,Login,DNSConfig, DNSResolver, RegisterResponse,DERPRegion,DERPMap,DERPNode
// tailscale.com/cmd/cloner -type User,Node,Hostinfo,NetInfo,Login,DNSConfig, RegisterResponse,DERPRegion,DERPMap,DERPNode
var _UserNeedsRegeneration = User ( struct {
ID UserID
LoginName string
@ -63,7 +64,7 @@ func (src *Node) Clone() *Node {
}
// A compilation failure here means this code must be regenerated, with command:
// tailscale.com/cmd/cloner -type User,Node,Hostinfo,NetInfo,Login,DNSConfig, DNSResolver, RegisterResponse,DERPRegion,DERPMap,DERPNode
// tailscale.com/cmd/cloner -type User,Node,Hostinfo,NetInfo,Login,DNSConfig, RegisterResponse,DERPRegion,DERPMap,DERPNode
var _NodeNeedsRegeneration = Node ( struct {
ID NodeID
StableID StableNodeID
@ -107,7 +108,7 @@ func (src *Hostinfo) Clone() *Hostinfo {
}
// A compilation failure here means this code must be regenerated, with command:
// tailscale.com/cmd/cloner -type User,Node,Hostinfo,NetInfo,Login,DNSConfig, DNSResolver, RegisterResponse,DERPRegion,DERPMap,DERPNode
// tailscale.com/cmd/cloner -type User,Node,Hostinfo,NetInfo,Login,DNSConfig, RegisterResponse,DERPRegion,DERPMap,DERPNode
var _HostinfoNeedsRegeneration = Hostinfo ( struct {
IPNVersion string
FrontendLogID string
@ -144,7 +145,7 @@ func (src *NetInfo) Clone() *NetInfo {
}
// A compilation failure here means this code must be regenerated, with command:
// tailscale.com/cmd/cloner -type User,Node,Hostinfo,NetInfo,Login,DNSConfig, DNSResolver, RegisterResponse,DERPRegion,DERPMap,DERPNode
// tailscale.com/cmd/cloner -type User,Node,Hostinfo,NetInfo,Login,DNSConfig, RegisterResponse,DERPRegion,DERPMap,DERPNode
var _NetInfoNeedsRegeneration = NetInfo ( struct {
MappingVariesByDestIP opt . Bool
HairPinning opt . Bool
@ -171,7 +172,7 @@ func (src *Login) Clone() *Login {
}
// A compilation failure here means this code must be regenerated, with command:
// tailscale.com/cmd/cloner -type User,Node,Hostinfo,NetInfo,Login,DNSConfig, DNSResolver, RegisterResponse,DERPRegion,DERPMap,DERPNode
// tailscale.com/cmd/cloner -type User,Node,Hostinfo,NetInfo,Login,DNSConfig, RegisterResponse,DERPRegion,DERPMap,DERPNode
var _LoginNeedsRegeneration = Login ( struct {
_ structs . Incomparable
ID LoginID
@ -190,17 +191,17 @@ func (src *DNSConfig) Clone() *DNSConfig {
}
dst := new ( DNSConfig )
* dst = * src
dst . Resolvers = make ( [ ] DNS Resolver, len ( src . Resolvers ) )
dst . Resolvers = make ( [ ] dnstype. Resolver, len ( src . Resolvers ) )
for i := range dst . Resolvers {
dst . Resolvers [ i ] = * src . Resolvers [ i ] . Clone ( )
}
if dst . Routes != nil {
dst . Routes = map [ string ] [ ] DNS Resolver{ }
dst . Routes = map [ string ] [ ] dnstype. Resolver{ }
for k := range src . Routes {
dst . Routes [ k ] = append ( [ ] DNS Resolver{ } , src . Routes [ k ] ... )
dst . Routes [ k ] = append ( [ ] dnstype. Resolver{ } , src . Routes [ k ] ... )
}
}
dst . FallbackResolvers = make ( [ ] DNS Resolver, len ( src . FallbackResolvers ) )
dst . FallbackResolvers = make ( [ ] dnstype. Resolver, len ( src . FallbackResolvers ) )
for i := range dst . FallbackResolvers {
dst . FallbackResolvers [ i ] = * src . FallbackResolvers [ i ] . Clone ( )
}
@ -212,11 +213,11 @@ func (src *DNSConfig) Clone() *DNSConfig {
}
// A compilation failure here means this code must be regenerated, with command:
// tailscale.com/cmd/cloner -type User,Node,Hostinfo,NetInfo,Login,DNSConfig, DNSResolver, RegisterResponse,DERPRegion,DERPMap,DERPNode
// tailscale.com/cmd/cloner -type User,Node,Hostinfo,NetInfo,Login,DNSConfig, RegisterResponse,DERPRegion,DERPMap,DERPNode
var _DNSConfigNeedsRegeneration = DNSConfig ( struct {
Resolvers [ ] DNS Resolver
Routes map [ string ] [ ] DNS Resolver
FallbackResolvers [ ] DNS Resolver
Resolvers [ ] dnstype. Resolver
Routes map [ string ] [ ] dnstype. Resolver
FallbackResolvers [ ] dnstype. Resolver
Domains [ ] string
Proxied bool
Nameservers [ ] netaddr . IP
@ -225,25 +226,6 @@ var _DNSConfigNeedsRegeneration = DNSConfig(struct {
ExtraRecords [ ] DNSRecord
} { } )
// Clone makes a deep copy of DNSResolver.
// The result aliases no memory with the original.
func ( src * DNSResolver ) Clone ( ) * DNSResolver {
if src == nil {
return nil
}
dst := new ( DNSResolver )
* dst = * src
dst . BootstrapResolution = append ( src . BootstrapResolution [ : 0 : 0 ] , src . BootstrapResolution ... )
return dst
}
// A compilation failure here means this code must be regenerated, with command:
// tailscale.com/cmd/cloner -type User,Node,Hostinfo,NetInfo,Login,DNSConfig,DNSResolver,RegisterResponse,DERPRegion,DERPMap,DERPNode
var _DNSResolverNeedsRegeneration = DNSResolver ( struct {
Addr string
BootstrapResolution [ ] netaddr . IP
} { } )
// Clone makes a deep copy of RegisterResponse.
// The result aliases no memory with the original.
func ( src * RegisterResponse ) Clone ( ) * RegisterResponse {
@ -257,7 +239,7 @@ func (src *RegisterResponse) Clone() *RegisterResponse {
}
// A compilation failure here means this code must be regenerated, with command:
// tailscale.com/cmd/cloner -type User,Node,Hostinfo,NetInfo,Login,DNSConfig, DNSResolver, RegisterResponse,DERPRegion,DERPMap,DERPNode
// tailscale.com/cmd/cloner -type User,Node,Hostinfo,NetInfo,Login,DNSConfig, RegisterResponse,DERPRegion,DERPMap,DERPNode
var _RegisterResponseNeedsRegeneration = RegisterResponse ( struct {
User User
Login Login
@ -282,7 +264,7 @@ func (src *DERPRegion) Clone() *DERPRegion {
}
// A compilation failure here means this code must be regenerated, with command:
// tailscale.com/cmd/cloner -type User,Node,Hostinfo,NetInfo,Login,DNSConfig, DNSResolver, RegisterResponse,DERPRegion,DERPMap,DERPNode
// tailscale.com/cmd/cloner -type User,Node,Hostinfo,NetInfo,Login,DNSConfig, RegisterResponse,DERPRegion,DERPMap,DERPNode
var _DERPRegionNeedsRegeneration = DERPRegion ( struct {
RegionID int
RegionCode string
@ -309,7 +291,7 @@ func (src *DERPMap) Clone() *DERPMap {
}
// A compilation failure here means this code must be regenerated, with command:
// tailscale.com/cmd/cloner -type User,Node,Hostinfo,NetInfo,Login,DNSConfig, DNSResolver, RegisterResponse,DERPRegion,DERPMap,DERPNode
// tailscale.com/cmd/cloner -type User,Node,Hostinfo,NetInfo,Login,DNSConfig, RegisterResponse,DERPRegion,DERPMap,DERPNode
var _DERPMapNeedsRegeneration = DERPMap ( struct {
Regions map [ int ] * DERPRegion
OmitDefaultRegions bool
@ -327,7 +309,7 @@ func (src *DERPNode) Clone() *DERPNode {
}
// A compilation failure here means this code must be regenerated, with command:
// tailscale.com/cmd/cloner -type User,Node,Hostinfo,NetInfo,Login,DNSConfig, DNSResolver, RegisterResponse,DERPRegion,DERPMap,DERPNode
// tailscale.com/cmd/cloner -type User,Node,Hostinfo,NetInfo,Login,DNSConfig, RegisterResponse,DERPRegion,DERPMap,DERPNode
var _DERPNodeNeedsRegeneration = DERPNode ( struct {
Name string
RegionID int
@ -344,7 +326,7 @@ var _DERPNodeNeedsRegeneration = DERPNode(struct {
// Clone duplicates src into dst and reports whether it succeeded.
// To succeed, <src, dst> must be of types <*T, *T> or <*T, **T>,
// where T is one of User,Node,Hostinfo,NetInfo,Login,DNSConfig, DNSResolver, RegisterResponse,DERPRegion,DERPMap,DERPNode.
// where T is one of User,Node,Hostinfo,NetInfo,Login,DNSConfig, RegisterResponse,DERPRegion,DERPMap,DERPNode.
func Clone ( dst , src interface { } ) bool {
switch src := src . ( type ) {
case * User :
@ -401,15 +383,6 @@ func Clone(dst, src interface{}) bool {
* dst = src . Clone ( )
return true
}
case * DNSResolver :
switch dst := dst . ( type ) {
case * DNSResolver :
* dst = * src . Clone ( )
return true
case * * DNSResolver :
* dst = src . Clone ( )
return true
}
case * RegisterResponse :
switch dst := dst . ( type ) {
case * RegisterResponse :